diff --git a/samples/Makefile.incl b/samples/Makefile.incl
index 33cbbc7e64f0ef97a92863afcb4568c8066fe3bb..53512d0ad96f15d80556c0342c88696e14813520 100644
--- a/samples/Makefile.incl
+++ b/samples/Makefile.incl
@@ -156,7 +156,13 @@ endif
 
 #================= AIX SPECIFIC OPTIONS ===========================
 ifeq (${PLATFORM}, AIX)
-CMP= -c ${CXXFLAGS} -qnotempinc
+
+ifeq (${CXXVER}, v5compat)
+   CMP= -c ${CXXFLAGS} -qnotempinc -qnamemangling=v5   
+else
+   CMP= -c ${CXXFLAGS} -qnotempinc -qnamemangling=ansi
+endif
+
 CC=${COMPILER} -D${PLATFORM}
 LINK =  ${COMPILER} ${LDFLAGS}
 # the compiler knows about this two
diff --git a/samples/runConfigure b/samples/runConfigure
index 2b7b1ff652f5a4dcace82a63ff121aadf09ee1e4..0683fd2a39e8cdcdc97aefab2d80841be41d6ed2 100755
--- a/samples/runConfigure
+++ b/samples/runConfigure
@@ -90,7 +90,7 @@ platforms"
             [required: no default]"
     echo "       -c <C compiler name> (e.g. gcc, cc, xlc_r, icc or ecc)"
     echo "            [default is make default; cc for gnu make]"
-    echo "       -x <C++ compiler name> (e.g. g++, CC, aCC, aCC05, xlC_r, icc or ecc)"
+    echo "       -x <C++ compiler name> (e.g. g++, CC, aCC, aCC05, xlC_r, xlC_rv5compat, icc or ecc)"
     echo "            [default is make default; g++ for gnu make]"
     echo "       -d (specifies that you want to build debug version) [default: not debug]"
     echo "       -r <thread option> can be 'pthread' or 'dce'
@@ -470,6 +470,11 @@ fi
 # Set the C compiler and C++ compiler environment variables
 #
 case $cppcompiler in
+   xlC_rv5compat)
+      CXX="xlC_r"
+      CXXVER="v5compat"
+      ;;
+      
    xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx | ecc)
       CXX="$cppcompiler"      
       ;;
diff --git a/scripts/packageBinaries.pl b/scripts/packageBinaries.pl
index 5cb6acd6fa13f530ad528904d18e9220d4a8ff4a..9b9b991c27619577d7d33b720f57efad29b759d3 100644
--- a/scripts/packageBinaries.pl
+++ b/scripts/packageBinaries.pl
@@ -497,8 +497,13 @@ if ( ($platform =~ m/AIX/i)      ||
         if ($opt_c eq "") {$opt_c = "xlc_r"; }
         if ($opt_x eq "") {$opt_x = "xlC_r"; }
 
-        $icu_cxxflags = '"-w -O2 -qmaxmem=-1"';
-        $icu_cflags = '"-w -O2 -qmaxmem=-1"';
+        if ($opt_x eq "xlC_rv5compat") {
+            $icu_cxxflags = '"-w -O2 -qmaxmem=-1 -qnamemangling=v5"';
+            $icu_cflags   = '"-w -O2 -qmaxmem=-1 -qnamemangling=v5"';        	
+        } else {
+            $icu_cxxflags = '"-w -O2 -qmaxmem=-1"';
+            $icu_cflags = '"-w -O2 -qmaxmem=-1"';
+        }
 
         if ($opt_m =~ m/icu/i) {
         	$ENV{'LIBPATH'}="$ICUROOT/lib:$XERCESCROOT/lib:$ENV{'LIBPATH'}";
@@ -704,8 +709,21 @@ if ( ($platform =~ m/AIX/i)      ||
                 }
                 else {
                     psystem ("CC=$opt_c CXX=$cXX CXXFLAGS=$icu_cxxflags CFLAGS=$icu_cflags sh ./configure --prefix=$ICUROOT");
-                }                                   
+                }         
+           }elsif ($platform eq 'aix') {
+
+                my $cXX = $opt_x;                 
+                if ($opt_x eq "xlC_rv5compat") {
+                    $cXX = "xlC_r";
+                }
 
+                if ($opt_b eq "32") {
+                    psystem ("CC=$opt_c CXX=$cXX CXXFLAGS=$icu_cxxflags CFLAGS=$icu_cflags sh ./configure --prefix=$ICUROOT --disable-64bit-libs");
+                }
+                else {
+                    psystem ("CC=$opt_c CXX=$cXX CXXFLAGS=$icu_cxxflags CFLAGS=$icu_cflags sh ./configure --prefix=$ICUROOT");
+                }
+                                                    
             } else {
             # set the 32 bit or 64 bit
                 if ($opt_b eq "32") {
diff --git a/src/xercesc/Makefile.incl b/src/xercesc/Makefile.incl
index 82fb9be6666519d1257c2d20f1b7e516cda82175..6e52b55af0b83c3d28ddffb16a57fcefe1bc7e6c 100644
--- a/src/xercesc/Makefile.incl
+++ b/src/xercesc/Makefile.incl
@@ -253,8 +253,12 @@ ifeq (${MESSAGELOADER}, ICU)
     ALLLIBS = ${LIBS} -L/usr/lpp/xlC/lib -licuuc30 -licudata30 -lXercesMessages25
 endif
 
-PLATFORM_COMPILE_OPTIONS = -qnotempinc -D_THREAD_SAFE
-
+ifeq (${CXXVER}, v5compat)
+   PLATFORM_COMPILE_OPTIONS = -qnotempinc -D_THREAD_SAFE -qnamemangling=v5
+else
+   PLATFORM_COMPILE_OPTIONS = -qnotempinc -D_THREAD_SAFE -qnamemangling=ansi
+endif
+    
 ifeq (${BITSTOBUILD}, 64)
     MAKE_SHARED = makeC++SharedLib_r -p 5000 ${LDFLAGS} -X64
     MAKE_SHARED_C = makeC++SharedLib_r -p 5000 ${LDFLAGS} -X64
diff --git a/src/xercesc/runConfigure b/src/xercesc/runConfigure
index 39b8dc7252578e55f476edaaed11c8e64f03bcb2..2f1e2e64747840dc94d872a062804e176b12cebe 100755
--- a/src/xercesc/runConfigure
+++ b/src/xercesc/runConfigure
@@ -92,7 +92,7 @@ usage()
             [required; no default]"
     echo "       -c <C compiler name> (e.g. gcc, cc, xlc_r, qcc, icc or ecc) 
             [default is make default; cc for gnu make]"
-    echo "       -x <C++ compiler name> (e.g. g++, CC, aCC, aCC05, xlC_r, QCC, 
+    echo "       -x <C++ compiler name> (e.g. g++, CC, aCC, aCC05, xlC_r, xlC_rv5compat, QCC, 
             icc or ecc) [default is make default; g++ for gnu make]"
     echo "       -d (specifies that you want to build debug version)
             [default: no debug]"
@@ -661,10 +661,15 @@ export NETACCESSOR
 #
 
 case $cppcompiler in
+   xlC_rv5compat)
+      CXX="xlC_r"
+      CXXVER="v5compat"
+      ;;
+      
    xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx | ecc | QCC )
       CXX="$cppcompiler"
       ;;
-      
+    
    aCC05)
       CXX="aCC"
       CXXVER="aCC05"
diff --git a/tests/Makefile.incl b/tests/Makefile.incl
index f09d721bf7bffa994cf4a7faaa06cf43fdda6a22..757a6bae807cc2fa36998d44468106124f8d7a0a 100644
--- a/tests/Makefile.incl
+++ b/tests/Makefile.incl
@@ -155,7 +155,13 @@ endif
 
 #================= AIX SPECIFIC OPTIONS ===========================
 ifeq (${PLATFORM}, AIX)
-CMP= -c ${CXXFLAGS} -qnotempinc
+
+ifeq (${CXXVER}, v5compat)
+   CMP= -c ${CXXFLAGS} -qnotempinc -qnamemangling=v5   
+else
+   CMP= -c ${CXXFLAGS} -qnotempinc -qnamemangling=ansi
+endif
+
 CC=${COMPILER} -D${PLATFORM}
 LINK =  ${COMPILER} ${LDFLAGS}
 # the compiler knows about this two
diff --git a/tests/runConfigure b/tests/runConfigure
index b2fda4966f24e9c27a795fe9c126cca92cd282e6..8b4e7b6fabdb5fb7038353d44162619d268b4c8d 100755
--- a/tests/runConfigure
+++ b/tests/runConfigure
@@ -89,7 +89,7 @@ usage()
             [required: no default]"
     echo "       -c <C compiler name> (e.g. gcc, cc, xlc_r, icc or ecc)"
     echo "            [default is make default; cc for gnu make]"
-    echo "       -x <C++ compiler name> (e.g. g++, CC, aCC, aCC05, xlC_r, icc or ecc)"
+    echo "       -x <C++ compiler name> (e.g. g++, CC, aCC, aCC05, xlC_r, xlC_rv5compate, icc or ecc)"
     echo "            [default is make default; g++ for gnu make]"
     echo "       -d (specifies that you want to build debug version) [default: not debug]"
     echo "       -r <thread option> can be 'pthread' or 'dce'
@@ -469,6 +469,11 @@ fi
 # Set the C compiler and C++ compiler environment variables
 #
 case $cppcompiler in
+   xlC_rv5compat)
+      CXX="xlC_r"
+      CXXVER="v5compat"
+      ;;
+      
    xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx | ecc)
    CXX="$cppcompiler"
       ;;