diff --git a/doc/releases.xml b/doc/releases.xml
index 0230e1952778c9a6b07297390ba08d94aeb31ad2..b03792b6976f09fc862f6b05abfbaafba1e8d904 100644
--- a/doc/releases.xml
+++ b/doc/releases.xml
@@ -54,6 +54,14 @@
         </td>
     </tr>
 
+    <tr>
+        <td>2001-12-06</td>
+        <td>Tinny Ng</td>
+        <td>Make the runConfigure and associated config*, Makefile* in folders tests,
+            samples and src more consistent.
+        </td>
+    </tr>
+
     <tr>
         <td>2001-12-05</td>
         <td>Khaled Noaman</td>
@@ -75,6 +83,13 @@
         </td>
     </tr>
 
+    <tr>
+        <td>2001-12-05</td>
+        <td>Tinny Ng</td>
+        <td>Generate linker map for certain platforms
+        </td>
+    </tr>
+
     <tr>
         <td>2001-12-03</td>
         <td>Tinny Ng</td>
diff --git a/samples/runConfigure b/samples/runConfigure
index 5d895f6dc7533f1aa5df195bf56826b411bc25b1..0d4643e0c878423d02f8d8f5a231f4b9654b86db 100755
--- a/samples/runConfigure
+++ b/samples/runConfigure
@@ -73,8 +73,9 @@ usage()
     echo "       -c <C compiler name> (e.g. gcc, xlc or icc)"
     echo "       -x <C++ compiler name> (e.g. g++, xlC, or icc)"
     echo "       -d (specifies that you want to build debug version)"
-    echo "       -h (get help on the above commands)"
+    echo "       -l <extra linker options>"
     echo "       -z <extra compiler options>"
+    echo "       -h (get help on the above commands)"
 }
 
 ERROR_EXIT_CODE=1
@@ -99,11 +100,11 @@ if test $1 = "-h"; then
    exit ${ERROR_EXIT_CODE}
 fi
 
-# Get the command line parameters
+# Check the command line parameters
 if test -x /usr/bin/getopt; then
-set -- `getopt p:c:x:dm:n:t:r:l:z:h $*`
+getoptErr=`getopt p:c:x:dm:n:t:r:l:z:h $*`
 else
-set -- `getopts p:c:x:dm:n:t:r:l:z:h `$*``
+getoptErr=`getopts p:c:x:dm:n:t:r:l:z:h `$*``
 fi
 if [ $? != 0 ]
    then
@@ -111,6 +112,13 @@ if [ $? != 0 ]
    exit ${ERROR_EXIT_CODE}
 fi
 
+# Now get the command line parameters
+if test -x /usr/bin/getopt; then
+set -- `getopt p:c:x:dm:n:t:r:l:z:h $*`
+else
+set --`getopts p:c:x:dm:n:t:r:l:z:h `$*``
+fi
+
 # Set up the default values for each parameter
 debug=off                # by default debug is off
 transcoder=native        # by default use native transcoder
@@ -163,6 +171,24 @@ echo "Generating makefiles with the following options ..."
 echo "Platform: $platform"
 echo "C Compiler: $ccompiler"
 echo "C++ Compiler: $cppcompiler"
+echo "Extra compile options: $compileroptions"
+echo "Extra link options: $linkeroptions"
+
+#
+# Now check if the options are correct or not, bail out if incorrect
+#
+case $platform in
+   aix | unixware | linux | freebsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx)
+       # platform has been recognized
+       ;;
+   *)
+      echo "I do not recognize the platform '$platform'. Please type '${0} -h' for help."
+      exit ${ERROR_EXIT_CODE};;
+esac
+
+#
+# Enable debugging or not...
+#
 if test $debug = "off"; then
     echo "Debug is OFF"
     if test $platform = "os400"; then
@@ -179,63 +205,37 @@ else
     debugflag="-g";
 fi
 
-# Now check if the options are correct or not, bail out if incorrect
-case $platform in
-   aix | unixware | linux | freebsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx)
-       # platform has been recognized
-       ;;
-   *)
-      echo "I do not recognize the platform '$platform'. Please type '${0} -h' for help."
-      exit ${ERROR_EXIT_CODE};;
-esac
-
+#
 # Set the C compiler and C++ compiler environment variables
-CC=$ccompiler; export CC
-CXX=$cppcompiler; export CXX
-
+#
 case $cppcompiler in
-   xlC* | xlc*)
-      #the compiler knows better about this stuff
-      #LDFLAGS="-lC"; export LDFLAGS
-      #LIBS="-L/usr/lpp/xlC/lib"; export LIBS
-       ;;
-
-   g++ | c++)
-       LDFLAGS="-lc"; export LDFLAGS
-if test $platform = "ptx"; then
-	if test -z $XMLINSTALL; then
-		XMLINSTALL=$ICUROOT
-	fi
-       LIBS="-L$XMLINSTALL/lib";
-else
-       LIBS="-L/usr/local/lib";
-fi
-	export LIBS ;;
-
-   cc | CC)
-       LDFLAGS="-lC"; export LDFLAGS
-       if test $platform = "irix"; then
-          LIBS=""; export LIBS
-       else
-          LIBS="-L/usr/lib -L/usr/ccs/lib"; export LIBS
-       fi ;;
-
-   acc | aCC)
-       LDFLAGS="-lC"; export LDFLAGS
-       LIBS="-L/usr/lib -L/opt/aCC/lib"; export LIBS ;;
+   xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx)
+      ;;
 
-   icc | ICC)
-       ;;
-	cxx)
-		;;
    *)
       echo "I do not recognize the C++ compiler '$cppcompiler'. Continuing anyway ..."
       ;;
 esac
 
+CC="$ccompiler"
+export CC
+
+CXX="$cppcompiler"
+export CXX
+
+#
 # Set the extra C and C++ compiler flags
-CXXFLAGS="$compileroptions $debugflag $compileroption"; export CXXFLAGS
-CFLAGS="$compileroptions $debugflag $compileroption"; export CFLAGS
+#
+CXXFLAGS="$compileroptions $debugflag"; export CXXFLAGS
+CFLAGS="$compileroptions $debugflag"; export CFLAGS
+
+# gcc crashes if optimisation is turned on in a Tru64 environment
+if [ $platform = "tru64" -a $CXX = "g++" ]; then
+    CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]*//g'`
+    CFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]*//g'`
+    export CXXFLAGS CFLAGS
+fi
+
 LDFLAGS="$linkeroptions"; export LDFLAGS
 
 echo
diff --git a/src/runConfigure b/src/runConfigure
index dc5e182a93452e69760294497adcca10e96f0ab1..0f9f883543e6db957e111cd435d50662826c590d 100755
--- a/src/runConfigure
+++ b/src/runConfigure
@@ -116,11 +116,11 @@ if test $1 = "-h"; then
    exit ${ERROR_EXIT_CODE}
 fi
 
-# Get the command line parameters
+# Check the command line parameters
 if test -x /usr/bin/getopt; then
-set -- `getopt p:c:x:dm:n:t:r:l:z:P:C:h $*`
+getoptErr=`getopt p:c:x:dm:n:t:r:l:z:P:C:h $*`
 else
-set -- `getopts p:c:x:dm:n:t:r:l:z:P:C:h `$*``
+getoptErr=`getopts p:c:x:dm:n:t:r:l:z:P:C:h `$*``
 fi
 if [ $? != 0 ]
    then
@@ -128,6 +128,13 @@ if [ $? != 0 ]
    exit ${ERROR_EXIT_CODE}
 fi
 
+# Now get the command line parameters
+if test -x /usr/bin/getopt; then
+set -- `getopt p:c:x:dm:n:t:r:l:z:P:C:h $*`
+else
+set -- `getopts p:c:x:dm:n:t:r:l:z:P:C:h `$*``
+fi
+
 # Set up the default values for each parameter
 debug=off                # by default debug is off
 transcoder=native        # by default use native transcoder
diff --git a/tests/DOM/DOMIDTest/Makefile.in b/tests/DOM/DOMIDTest/Makefile.in
index 45c890af7bf6e35afb86a09bc8e1c9ad8e26c53c..28ed8f06ebaedef62d1921aae87285bda9b0d841 100644
--- a/tests/DOM/DOMIDTest/Makefile.in
+++ b/tests/DOM/DOMIDTest/Makefile.in
@@ -1,37 +1,37 @@
 #
 # The Apache Software License, Version 1.1
-# 
+#
 # Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
 # reserved.
-# 
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
-# 
+#
 # 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-# 
+#    notice, this list of conditions and the following disclaimer.
+#
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in
 #    the documentation and/or other materials provided with the
 #    distribution.
-# 
+#
 # 3. The end-user documentation included with the redistribution,
-#    if any, must include the following acknowledgment:  
+#    if any, must include the following acknowledgment:
 #       "This product includes software developed by the
 #        Apache Software Foundation (http://www.apache.org/)."
 #    Alternately, this acknowledgment may appear in the software itself,
 #    if and wherever such third-party acknowledgments normally appear.
-# 
+#
 # 4. The names "Xerces" and "Apache Software Foundation" must
 #    not be used to endorse or promote products derived from this
-#    software without prior written permission. For written 
+#    software without prior written permission. For written
 #    permission, please contact apache\@apache.org.
-# 
+#
 # 5. Products derived from this software may not be called "Apache",
 #    nor may "Apache" appear in their name, without prior written
 #    permission of the Apache Software Foundation.
-# 
+#
 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,14 +45,14 @@
 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 # ====================================================================
-# 
+#
 # This software consists of voluntary contributions made by many
 # individuals on behalf of the Apache Software Foundation, and was
 # originally based on software copyright (c) 1999, International
 # Business Machines, Inc., http://www.ibm.com .  For more information
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
-# 
+#
 #
 # $Id$
 #
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,24 +91,24 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(DOMIDTST)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
-${BATCH_TARGET}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${EXEC}/${APP_NAME}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
+${BATCH_TARGET}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/DOMIDTest.o: ${SRC}/DOMIDTest.cpp ${HEADER_FILES}
+$(OUTDIR)/DOMIDTest.o:: ${SRC}/DOMIDTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/DOMIDTest.o ${SRC}/DOMIDTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/DOM/DOMMemTest/Makefile.in b/tests/DOM/DOMMemTest/Makefile.in
index 3f87bbdb3f1e3b4529ff4b7bb04f6723cd4e0ee0..45c2578c4dc31f249ab763d2e44db9f6b019bb2b 100644
--- a/tests/DOM/DOMMemTest/Makefile.in
+++ b/tests/DOM/DOMMemTest/Makefile.in
@@ -1,37 +1,37 @@
 #
 # The Apache Software License, Version 1.1
-# 
+#
 # Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
 # reserved.
-# 
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
-# 
+#
 # 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-# 
+#    notice, this list of conditions and the following disclaimer.
+#
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in
 #    the documentation and/or other materials provided with the
 #    distribution.
-# 
+#
 # 3. The end-user documentation included with the redistribution,
-#    if any, must include the following acknowledgment:  
+#    if any, must include the following acknowledgment:
 #       "This product includes software developed by the
 #        Apache Software Foundation (http://www.apache.org/)."
 #    Alternately, this acknowledgment may appear in the software itself,
 #    if and wherever such third-party acknowledgments normally appear.
-# 
+#
 # 4. The names "Xerces" and "Apache Software Foundation" must
 #    not be used to endorse or promote products derived from this
-#    software without prior written permission. For written 
+#    software without prior written permission. For written
 #    permission, please contact apache\@apache.org.
-# 
+#
 # 5. Products derived from this software may not be called "Apache",
 #    nor may "Apache" appear in their name, without prior written
 #    permission of the Apache Software Foundation.
-# 
+#
 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,14 +45,14 @@
 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 # ====================================================================
-# 
+#
 # This software consists of voluntary contributions made by many
 # individuals on behalf of the Apache Software Foundation, and was
 # originally based on software copyright (c) 1999, International
 # Business Machines, Inc., http://www.ibm.com .  For more information
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
-# 
+#
 #
 # $Id$
 #
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,25 +91,25 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(DOMEMTST)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${EXEC}/${APP_NAME}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-${BATCH_TARGET}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${BATCH_TARGET}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/DOMMemTest.o: ${SRC}/DOMMemTest.cpp ${HEADER_FILES}
+$(OUTDIR)/DOMMemTest.o:: ${SRC}/DOMMemTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/DOMMemTest.o ${SRC}/DOMMemTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/DOM/DOMTest/Makefile.in b/tests/DOM/DOMTest/Makefile.in
index 469a8c913e24ba6c70d097fcc189e01afdafde02..7497421c291b7eb501e218d7bf88780e0821c676 100644
--- a/tests/DOM/DOMTest/Makefile.in
+++ b/tests/DOM/DOMTest/Makefile.in
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,24 +91,24 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/DTest.o: ${SRC}/DTest.cpp ${HEADER_FILES}
+$(OUTDIR)/DTest.o:: ${SRC}/DTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/DTest.o ${SRC}/DTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/DOM/RangeTest/Makefile.in b/tests/DOM/RangeTest/Makefile.in
index d10e94acaf573b82a2797bb09b9fde406a28e01d..791c23ebe22cf0d2a48c93702e4d34c3b330736e 100644
--- a/tests/DOM/RangeTest/Makefile.in
+++ b/tests/DOM/RangeTest/Makefile.in
@@ -1,37 +1,37 @@
 #
 # The Apache Software License, Version 1.1
-# 
+#
 # Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
 # reserved.
-# 
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
-# 
+#
 # 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-# 
+#    notice, this list of conditions and the following disclaimer.
+#
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in
 #    the documentation and/or other materials provided with the
 #    distribution.
-# 
+#
 # 3. The end-user documentation included with the redistribution,
-#    if any, must include the following acknowledgment:  
+#    if any, must include the following acknowledgment:
 #       "This product includes software developed by the
 #        Apache Software Foundation (http://www.apache.org/)."
 #    Alternately, this acknowledgment may appear in the software itself,
 #    if and wherever such third-party acknowledgments normally appear.
-# 
+#
 # 4. The names "Xerces" and "Apache Software Foundation" must
 #    not be used to endorse or promote products derived from this
-#    software without prior written permission. For written 
+#    software without prior written permission. For written
 #    permission, please contact apache\@apache.org.
-# 
+#
 # 5. Products derived from this software may not be called "Apache",
 #    nor may "Apache" appear in their name, without prior written
 #    permission of the Apache Software Foundation.
-# 
+#
 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,14 +45,14 @@
 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 # ====================================================================
-# 
+#
 # This software consists of voluntary contributions made by many
 # individuals on behalf of the Apache Software Foundation, and was
 # originally based on software copyright (c) 1999, International
 # Business Machines, Inc., http://www.ibm.com .  For more information
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
-# 
+#
 #
 # $Id$
 #
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,25 +91,25 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(RANGETST)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${EXEC}/${APP_NAME}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-${BATCH_TARGET}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${BATCH_TARGET}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/RangeTest.o: ${SRC}/RangeTest.cpp ${HEADER_FILES}
+$(OUTDIR)/RangeTest.o:: ${SRC}/RangeTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/RangeTest.o ${SRC}/RangeTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/DOM/Traversal/Makefile.in b/tests/DOM/Traversal/Makefile.in
index dad3f96a79b38526b2c4ebaf4650350fcc240948..42cff46d44ceb976c0dba8a7a1aa229036ec41f2 100644
--- a/tests/DOM/Traversal/Makefile.in
+++ b/tests/DOM/Traversal/Makefile.in
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,24 +91,24 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(TRAVERSA)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/Traversal.o: ${SRC}/Traversal.cpp ${HEADER_FILES}
+$(OUTDIR)/Traversal.o:: ${SRC}/Traversal.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/Traversal.o ${SRC}/Traversal.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/EncodingTest/Makefile.in b/tests/EncodingTest/Makefile.in
index f424884cf416db0d12950f2137c1a40a437ee8fc..3ed2df5524aa34a096e2cba55540c3b6c93a8cd5 100644
--- a/tests/EncodingTest/Makefile.in
+++ b/tests/EncodingTest/Makefile.in
@@ -1,37 +1,37 @@
 #
 # The Apache Software License, Version 1.1
-# 
+#
 # Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
 # reserved.
-# 
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
-# 
+#
 # 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-# 
+#    notice, this list of conditions and the following disclaimer.
+#
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in
 #    the documentation and/or other materials provided with the
 #    distribution.
-# 
+#
 # 3. The end-user documentation included with the redistribution,
-#    if any, must include the following acknowledgment:  
+#    if any, must include the following acknowledgment:
 #       "This product includes software developed by the
 #        Apache Software Foundation (http://www.apache.org/)."
 #    Alternately, this acknowledgment may appear in the software itself,
 #    if and wherever such third-party acknowledgments normally appear.
-# 
+#
 # 4. The names "Xerces" and "Apache Software Foundation" must
 #    not be used to endorse or promote products derived from this
-#    software without prior written permission. For written 
+#    software without prior written permission. For written
 #    permission, please contact apache\@apache.org.
-# 
+#
 # 5. Products derived from this software may not be called "Apache",
 #    nor may "Apache" appear in their name, without prior written
 #    permission of the Apache Software Foundation.
-# 
+#
 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,14 +45,14 @@
 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 # ====================================================================
-# 
+#
 # This software consists of voluntary contributions made by many
 # individuals on behalf of the Apache Software Foundation, and was
 # originally based on software copyright (c) 1999, International
 # Business Machines, Inc., http://www.ibm.com .  For more information
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
-# 
+#
 #
 # $Id$
 #
@@ -71,10 +71,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../version.incl
 include ../Makefile.incl
@@ -91,25 +89,25 @@ HEADER_FILES=
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(ENCDNTST)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${EXEC}/${APP_NAME}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-${BATCH_TARGET}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${BATCH_TARGET}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/EncodingTest.o: ${SRC}/EncodingTest.cpp ${HEADER_FILES}
+$(OUTDIR)/EncodingTest.o:: ${SRC}/EncodingTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/EncodingTest.o ${SRC}/EncodingTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/IDom/IDOMTest/Makefile.in b/tests/IDom/IDOMTest/Makefile.in
index d1db645dda1cdf402ed1103c0c2d9a2b1df769b7..13862aefbcbd82f68a40b1263f44a2b5bc9ad9e9 100644
--- a/tests/IDom/IDOMTest/Makefile.in
+++ b/tests/IDom/IDOMTest/Makefile.in
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,24 +91,24 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/IDTest.o: ${SRC}/IDTest.cpp ${HEADER_FILES}
+$(OUTDIR)/IDTest.o:: ${SRC}/IDTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/IDTest.o ${SRC}/IDTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/IDom/IRangeTest/Makefile.in b/tests/IDom/IRangeTest/Makefile.in
index ff5a4660376bfbb54151b63be2dd98e6bf4d97ba..9ce0b00cefb33e9a7aef105eafe7d132e4e879f8 100644
--- a/tests/IDom/IRangeTest/Makefile.in
+++ b/tests/IDom/IRangeTest/Makefile.in
@@ -73,9 +73,7 @@ COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
+LDFLAGS = @ldflags@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,25 +91,25 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(IRANGTST)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/IRangeTest.o: ${SRC}/IRangeTest.cpp ${HEADER_FILES}
+$(OUTDIR)/IRangeTest.o:: ${SRC}/IRangeTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/IRangeTest.o ${SRC}/IRangeTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/IDom/ITraversal/Makefile.in b/tests/IDom/ITraversal/Makefile.in
index 6f4a8eb1ad557a912618a5f6f947072983aeb6f7..db19d14bcb1f76930a08b13422065bdc9778cfc2 100644
--- a/tests/IDom/ITraversal/Makefile.in
+++ b/tests/IDom/ITraversal/Makefile.in
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../../version.incl
 include ../../Makefile.incl
@@ -93,24 +91,24 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(ITRAVERS)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/ITraversal.o: ${SRC}/ITraversal.cpp ${HEADER_FILES}
+$(OUTDIR)/ITraversal.o:: ${SRC}/ITraversal.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/ITraversal.o ${SRC}/ITraversal.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/IThreadTest/Makefile.in b/tests/IThreadTest/Makefile.in
index 371ef818b1f06b1222c567e4e4ee375c02bcc43b..d4245db13f42b361f676950421ca6bcc6c369c95 100644
--- a/tests/IThreadTest/Makefile.in
+++ b/tests/IThreadTest/Makefile.in
@@ -71,10 +71,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../version.incl
 include ../Makefile.incl
@@ -91,25 +89,25 @@ HEADER_FILES=
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(ITHREDTS)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} ${LIBS}
 
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/IThreadTest.o: ${SRC}/IThreadTest.cpp ${HEADER_FILES}
+$(OUTDIR)/IThreadTest.o:: ${SRC}/IThreadTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/IThreadTest.o ${SRC}/IThreadTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/InitTermTest/Makefile.in b/tests/InitTermTest/Makefile.in
index 960237d760c74e5afe2a7a8366eb03feed893932..f15d8344f587ee1a979e363eaf4e64b6d7135634 100644
--- a/tests/InitTermTest/Makefile.in
+++ b/tests/InitTermTest/Makefile.in
@@ -72,10 +72,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../version.incl
 include ../Makefile.incl
@@ -93,24 +91,24 @@ INCLUDE = ${INCLUDES}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(${APP_NAME})'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
-${BATCH_TARGET}: ${OBJS}
+${BATCH_TARGET}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/InitTermTest.o: ${SRC}/InitTermTest.cpp ${HEADER_FILES}
+$(OUTDIR)/InitTermTest.o:: ${SRC}/InitTermTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDE) -o $(OUTDIR)/InitTermTest.o ${SRC}/InitTermTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 790fbd192331b3b6a08c46973bb1da611ad3c8c9..237b8ed44e850a9aad6f41a02ebf31410e29d064 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -77,67 +77,66 @@ COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
 PREFIX = @prefix@
-OSVER = @osver@
 
 ifeq (${PLATFORM},HPUX)
   ifeq (${OSVER}, HPUX10)
-      all:	threadtest ithreadtest encodingtest traversal itraversal
+      all::	threadtest ithreadtest encodingtest traversal itraversal
   else
-      all:	domidtest dommemtest domtest idomtest threadtest ithreadtest encodingtest traversal itraversal rangetest irangetest inittermtest
+      all::	domidtest dommemtest domtest idomtest threadtest ithreadtest encodingtest traversal itraversal rangetest irangetest inittermtest
   endif
 else
-    all:	domidtest dommemtest domtest idomtest threadtest ithreadtest encodingtest traversal itraversal rangetest irangetest inittermtest
+    all::	domidtest dommemtest domtest idomtest threadtest ithreadtest encodingtest traversal itraversal rangetest irangetest inittermtest
 endif
 
-domidtest:
+domidtest::
 	@echo Building "DOMIDTest"
 	cd $(DOMIDTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-dommemtest:
+dommemtest::
 	@echo Building "DOMMemTest"
 	cd $(DOMMemTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-domtest:
+domtest::
 	@echo Building "DOMTest"
 	cd $(DOMTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-idomtest:
+idomtest::
 	@echo Building "IDOMTest"
 	cd $(IDOMTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-threadtest:
+threadtest::
 	@echo Building "ThreadTest"
 	cd $(ThreadTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-ithreadtest:
+ithreadtest::
 	@echo Building "IThreadTest"
 	cd $(IThreadTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-encodingtest:
+encodingtest::
 	@echo Building "EncodingTest"
 	cd $(EncodingTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-traversal:
+traversal::
 	@echo Building "Traversal"
 	cd $(Traversal_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-itraversal:
+itraversal::
 	@echo Building "ITraversal"
 	cd $(ITraversal_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-rangetest:
+rangetest::
 	@echo Building "Range"
 	cd $(DOMRange_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-irangetest:
+irangetest::
 	@echo Building "Range"
 	cd $(IDOMRange_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-inittermtest:
+inittermtest::
 	@echo Building "InitTermTest"
 	cd $(InitTermTest_DIR) ; $(MAKE) $(MAKE_FLAGS) ; cd ..
 
-clean:
+clean::
 	cd $(DOMIDTest_DIR) && $(MAKE) $@ && cd ..
 	cd $(DOMMemTest_DIR) && $(MAKE) $@ && cd ..
 	cd $(DOMTest_DIR) && $(MAKE) $@ && cd ..
@@ -151,7 +150,7 @@ clean:
 	cd $(IDOMRange_DIR) && $(MAKE) $@ && cd ..
 	cd $(InitTermTest_DIR) && $(MAKE) $@ && cd ..
 
-distclean:
+distclean::
 	cd $(DOMIDTest_DIR) && $(MAKE) $@ && cd ..
 	cd $(DOMMemTest_DIR) && $(MAKE) $@ && cd ..
 	cd $(DOMTest_DIR) && $(MAKE) $@ && cd ..
diff --git a/tests/Makefile.incl b/tests/Makefile.incl
index 86c3f67c06e48e25ac82237cc0c207215ea0463f..9b0182798379064f270c6e28cb7902f0c5ab4b22 100644
--- a/tests/Makefile.incl
+++ b/tests/Makefile.incl
@@ -1,7 +1,7 @@
 #
 # The Apache Software License, Version 1.1
 #
-# Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
+# Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
 # reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -53,59 +53,74 @@
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
 #
-
 #
 # $Id$
 #
 
 ################## LIBRARY NAMES AND DIRECTORIES ##################
 
+ifeq (${SYSOVR},OS400)
+PLATFORM = OS400
+endif
 INCLUDES= -I. -I${XERCESCROOT}/include
 LIB_DIR=${XERCESCROOT}/lib
+ifneq (${PLATFORM},OS400)
 LIBNAME=xerces-c
+else
+LIBNAME=xercesc
+endif
 THISLIB=${LIB_DIR}/${LIBNAME}
 
 LIBRARY_NAMES=-l${LIBNAME}${VER}
 LIBRARY_SEARCH_PATHS=-L${LIB_DIR}
 
+TO = o
 ####################### PLATFORM DEPENDENCIES #####################
 
+#=============== IRIX SPECIFIC OPTIONS =========================
+ifeq (${PLATFORM}, IRIX)
+  ifeq (${COMPILER}, g++)
+	CMP= -c ${CXXFLAGS}
+	CC= g++ -c -D${PLATFORM} -D_REENTRANT -fpic -instances=static
+	LINK = g++ -D${PLATFORM} -fpic
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	EXTRA_LINK_OPTIONS=-lc
+  else
+	CMP= -c ${CXXFLAGS}
+	CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT -I/usr/local/include
+	LINK =  CC -D${PLATFORM}
+	PLATFORM_LIB_LINK_OPTIONS=
+	EXTRA_LINK_OPTIONS=
+  endif
+  SHLIBSUFFIX=.so
+endif
+
 #=============== SOLARIS SPECIFIC OPTIONS =========================
 ifeq (${PLATFORM}, SOLARIS)
   ifeq (${COMPILER}, g++)
 	CMP= -c ${CXXFLAGS}
 	CC= g++ -c -D${PLATFORM} -D_REENTRANT -fpic
-	LINK = g++ -D${PLATFORM} -fpic
+ LINK = g++ -D${PLATFORM} -fpic ${LDFLAGS}
 	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
 	EXTRA_LINK_OPTIONS=-lc
   else
 	CMP= -c ${CXXFLAGS}
 	CC= CC -c -D${PLATFORM} -D_REENTRANT -pic
-	LINK =  CC -D${PLATFORM}
+ LINK =  CC -D${PLATFORM} ${LDFLAGS}
 	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	EXTRA_LINK_OPTIONS=-lc -lgen
   endif
   SHLIBSUFFIX=.so
 endif
 
-#================= AIX SPECIFIC OPTIONS ===========================
-ifeq (${PLATFORM}, AIX)
-CMP= -c ${CXXFLAGS} -qnotempinc
-CC=xlC_r -D${PLATFORM}
-LINK =  ${CC}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/lpp/xlC/lib
-EXTRA_LINK_OPTIONS=-lC
-SHLIBSUFFIX=.a
-endif
-
 #=============== UNIXWARE SPECIFIC OPTIONS =========================
 ifeq (${PLATFORM}, UNIXWARE)
-CMP= -O2 -c ${CXXFLAGS} -pthread
-CC= g++ -O2 -c -D${PLATFORM} -D_REENTRANT -fpic
-LINK =  g++ -O2 -D${PLATFORM} -fpic  -pthread
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
-EXTRA_LINK_OPTIONS=-lc -lsocket
-SHLIBSUFFIX=.so
+  CMP= -O2 -c ${CXXFLAGS} -pthread
+  CC= g++ -O2 -c -D${PLATFORM} -D_REENTRANT -fpic -pthread
+  LINK = g++ -D${PLATFORM} -fpic -pthread
+  EXTRA_LINK_OPTIONS=-lc -lsocket
+  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+  SHLIBSUFFIX=.so
 endif
 
 #================= PTX SPECIFIC OPTIONS ===========================
@@ -119,12 +134,40 @@ PLATFORM_C_COMPILER = cc
 PLATFORM_LIBRARIES =
 PLATFORM_COMPILE_OPTIONS = -KPIC -Kthread -DPTX
 MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -DPTX -G
-MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -DPTX -G
+MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -DPTX  -G
 PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib -L${XMLINSTALL}/lib
 EXTRA_LINK_OPTIONS=-lm -lgen
 SHLIBSUFFIX=.so
 endif
 
+#================= AIX SPECIFIC OPTIONS ===========================
+ifeq (${PLATFORM}, AIX)
+CMP= -c ${CXXFLAGS} -qnotempinc
+CC=${COMPILER} -D${PLATFORM}
+LINK =  ${COMPILER}
+# the compiler knows about this two
+# PLATFORM_LIB_LINK_OPTIONS=-L/usr/lpp/xlC/lib
+# EXTRA_LINK_OPTIONS=-lC
+SHLIBSUFFIX=.a
+endif
+
+#=============== OS400 SPECIFIC OPTIONS =========================
+ifeq (${PLATFORM}, OS400)
+ifeq (${SYSOVR},OS400)
+MYCC = cross compiler path here
+TO = qwobj
+else
+MYCC = icc
+LINK =  ${CC} -v
+endif
+CMP= -c -DOS400 ${CXXFLAGS}
+CXX = $(MYCC)
+CC = $(MYCC)
+#INCLUDES    += -I${ICUROOT}/include
+SHLIBSUFFIX=.a
+EXTRA_LINK_OPTIONS=-q OPTION='*DUPPROC *DUPVAR'
+endif
+
 #=============== LINUX SPECIFIC OPTIONS =========================
 ifeq (${PLATFORM}, LINUX)
 CMP= -c ${CXXFLAGS}
@@ -135,25 +178,39 @@ EXTRA_LINK_OPTIONS=-lc
 SHLIBSUFFIX=.so
 endif
 
-#================= HP SPECIFIC OPTIONS ===========================
-ifeq (${PLATFORM}, HPUX)
-
-  OSVERDEFINE=HPUX11
-  ifeq (${OSVER}, HPUX10)
-    OSVERDEFINE=HPUX10
+#=============== FREEBSD SPECIFIC OPTIONS =========================
+ifeq (${PLATFORM}, FREEBSD)
+  CMP= -c ${CXXFLAGS}
+  CC= g++ -c -D${PLATFORM} -fPIC
+  LINK = g++ -D${PLATFORM} -fPIC
+  ifdef ICUROOT
+    PLATFORM_LIB_LINK_OPTIONS=-L$(ICUROOT)
+    EXTRA_LINK_OPTIONS=-licudata -lstdc++ -pthread
+  else
+    PLATFORM_LIB_LINK_OPTIONS=
+    EXTRA_LINK_OPTIONS=-lstdc++ -pthread
   endif
+  SHLIBSUFFIX=.so
+endif
 
+#================= HP SPECIFIC OPTIONS ===========================
+ifeq (${PLATFORM}, HPUX)
   ifeq (${COMPILER}, aCC)
-    CMP = -c $(CXXFLAGS) -D$(OSVERDEFINE) -D_HP_UX -DHPaCC +DAportable -w +z
+    CMP = -c $(CXXFLAGS) -D_HP_UX -DHPaCC +DAportable -w +z
+    CC = aCC
     LINK =  ${CC} -Wl,+s
     PLATFORM_LIB_LINK_OPTIONS=-L/opt/aCC/lib -L/usr/ccs/lib
     SHLIBSUFFIX=.sl
   else
+    ifneq (${DEBUG}, 1)
+      CXXFLAGS = -w +O1
+    endif
     APPL_NAME = $(notdir $(shell pwd))
     TEMPLATESDIR = $(XERCESCROOT)/bin/obj/$(APPL_NAME)/ptrepository
-    COMMON_CMP = $(CXXFLAGS) -D_HP_UX -DHPCC -D$(OSVERDEFINE) +DAportable -w \
-                 +eh +z -z +a1 -ptr$(TEMPLATESDIR)
+    COMMON_CMP = $(CXXFLAGS) -D_HP_UX -DHPCC +DAportable -w +eh +z -z \
+        -ptr$(TEMPLATESDIR)
     CMP = -c $(COMMON_CMP)
+    CC = CC
     LINK =  ${CC} $(COMMON_CMP) -Wl,+s
     PLATFORM_LIB_LINK_OPTIONS=-L/opt/CC/lib -L/usr/lib
     SHLIBSUFFIX=.sl
@@ -177,18 +234,19 @@ endif
 # Also,                                                           #
 #                                                                 #
 #   export LOADMOD=USERID.LOAD                                    #
-#   export LOADEXP=USERID.EXP                                     #
+#   export LOADEXP=SYS1.SIXMEXP or &hlq.SIXMEXP                   #
 #                                                                 #
-# to specify your LOADMOD and the definition sidedeck dataset.    #
+# to specify your LOADMOD and the IXM4C31 definition sidedeck     #
+# dataset.  													  #
 ###################################################################
 
 ifeq (${PLATFORM}, OS390)
 CMP= -c -DOS390 ${CXXFLAGS}
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
-CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -DOS390 -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH
+CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -DOS390 -DOPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -DOS390BATCH
 else
-CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -DOS390 -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED
+CC = _CXX_CXXSUFFIX="cpp" _CXX_STEPS="-1" c++ -W0,"langlvl(extended)" -DOS390 -DOPEN_THREADS -D_XOPEN_SOURCE_EXTENDED
 endif
 LINK =  ${CC}
 PLATFORM_LIB_LINK_OPTIONS=
@@ -204,6 +262,17 @@ endif
 LIBRARY_SEARCH_PATHS=
 endif
 
+
+#=============== TRU64 SPECIFIC OPTIONS =========================
+ifeq (${PLATFORM}, TRU64)
+CMP= -c ${CXXFLAGS}
+CC = ${COMPILER} -c -D${PLATFORM}
+LINK = ${COMPILER} -D${PLATFORM}
+PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+SHLIBSUFFIX=.so
+endif
+
+
 #=============== MacOS SPECIFIC OPTIONS =========================
 ifeq (${PLATFORM}, MACOSX)
 	CMP= -c ${CXXFLAGS}
@@ -212,4 +281,3 @@ ifeq (${PLATFORM}, MACOSX)
 	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
 	SHLIBSUFFIX=.dylib
 endif
-
diff --git a/tests/ThreadTest/Makefile.in b/tests/ThreadTest/Makefile.in
index 957a2004daccf62501690fb1adeca5f90870dc11..e9ceba3beee44656506f9c66f2c16bb42434fede 100644
--- a/tests/ThreadTest/Makefile.in
+++ b/tests/ThreadTest/Makefile.in
@@ -1,37 +1,37 @@
 #
 # The Apache Software License, Version 1.1
-# 
+#
 # Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
 # reserved.
-# 
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
-# 
+#
 # 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
-# 
+#    notice, this list of conditions and the following disclaimer.
+#
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in
 #    the documentation and/or other materials provided with the
 #    distribution.
-# 
+#
 # 3. The end-user documentation included with the redistribution,
-#    if any, must include the following acknowledgment:  
+#    if any, must include the following acknowledgment:
 #       "This product includes software developed by the
 #        Apache Software Foundation (http://www.apache.org/)."
 #    Alternately, this acknowledgment may appear in the software itself,
 #    if and wherever such third-party acknowledgments normally appear.
-# 
+#
 # 4. The names "Xerces" and "Apache Software Foundation" must
 #    not be used to endorse or promote products derived from this
-#    software without prior written permission. For written 
+#    software without prior written permission. For written
 #    permission, please contact apache\@apache.org.
-# 
+#
 # 5. Products derived from this software may not be called "Apache",
 #    nor may "Apache" appear in their name, without prior written
 #    permission of the Apache Software Foundation.
-# 
+#
 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,14 +45,14 @@
 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 # ====================================================================
-# 
+#
 # This software consists of voluntary contributions made by many
 # individuals on behalf of the Apache Software Foundation, and was
 # originally based on software copyright (c) 1999, International
 # Business Machines, Inc., http://www.ibm.com .  For more information
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
-# 
+#
 #
 # $Id$
 #
@@ -71,10 +71,8 @@ PLATFORM = @platform@
 COMPILER = @compiler@
 CXXFLAGS = @cxxflags@
 CFLAGS = @cflags@
+LDFLAGS = @ldflags@
 PREFIX = @prefix@
-OSVER = @osver@
-LIBS = @libs@
-CC = @compiler@
 
 include ../../version.incl
 include ../Makefile.incl
@@ -91,25 +89,25 @@ HEADER_FILES=
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
 BATCH_TARGET= "//'${LOADMOD}(THREDTST)'"
-all: makedir ${BATCH_TARGET}
+all:: makedir ${BATCH_TARGET}
 else
-all: makedir ${EXEC}/${APP_NAME}
+all:: makedir ${EXEC}/${APP_NAME}
 endif
 
-makedir:
+makedir::
 	-mkdir -p $(OUTDIR)
 
-${EXEC}/${APP_NAME}: ${OBJS}
+${EXEC}/${APP_NAME}:: ${OBJS}
 	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} ${LIBS}
 
-${BATCH_TARGET}: ${OBJS}
-	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} 
+${BATCH_TARGET}:: ${OBJS}
+	${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJS} -o $@ ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS}
 
-$(OUTDIR)/ThreadTest.o: ${SRC}/ThreadTest.cpp ${HEADER_FILES}
+$(OUTDIR)/ThreadTest.o:: ${SRC}/ThreadTest.cpp ${HEADER_FILES}
 	${CC} ${CMP} $(INCLUDES) -o $(OUTDIR)/ThreadTest.o ${SRC}/ThreadTest.cpp
 
-clean:
+clean::
 	rm -f ${OBJS} ${EXEC}/${APP_NAME}
 
-distclean:	clean
+distclean::	clean
 	rm -f Makefile
diff --git a/tests/config.h.in b/tests/config.h.in
index 473cf74e561f97bdf8d8dca0ab3ec308a286fb33..f7759c48ca582e1552013836245cc23436d77386 100644
--- a/tests/config.h.in
+++ b/tests/config.h.in
@@ -1,8 +1,3 @@
-# $Log$
-# Revision 1.1  2000/01/31 22:21:53  aruna1
-# initial checkin
-#
-#
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
 
 /* Define if you have the ANSI C header files.  */
diff --git a/tests/configure b/tests/configure
index 6ef3c9a05a81055a7fa27dd3b2495f060c8dd44d..0b53dc3e829565be95ad97a7ef957814d2e1762c 100755
--- a/tests/configure
+++ b/tests/configure
@@ -1303,11 +1303,14 @@ echo "$ac_t""$host" 1>&6
 
 case "${host}" in
         *-*-solaris*)   platform=SOLARIS ;;
+        *-*-sysv5*)     platform=UNIXWARE ;;
+        *-*-UnixWare*)  platform=UNIXWARE ;;
+        *-*-*unixware*)  platform=UNIXWARE ;;
+        *-*-sysv5uw7*)  platform=UNIXWARE ;;
         *-*-linux*)     platform=LINUX ;;
-        *-*-*unixware*)     platform=UNIXWARE ;;
-        *-*-sysv5uw7*)     platform=UNIXWARE ;;
+	*-*-freebsd*)	platform=FREEBSD ;;
+        *-*-irix*)      platform=IRIX ;;
         *-*-aix*)       platform=AIX ;;
-        *-sequent-*)    platform=PTX ;;
         *-*-hp*)        platform=HPUX ;
                         case "${host}" in
                             *-*-hpux11*)  osver=HPUX11;;
@@ -1315,15 +1318,18 @@ case "${host}" in
                             *)            osver=HPUX11;;
                         esac;;
         *-*-mvs*)       platform=OS390 ;;
+        *-*-os400*)     platform=OS400 ;;
+        *-*-OS400*)     platform=OS400 ;;
+		*-*-osf*)	platform=TRU64 ;;
         *-apple-*)		platform=MACOSX ;;
         *)              platform=UNKNOWN ;;
 esac
 
 
-
 compiler=${CXX}
 
 
+# prefix=${prefix}
 
 
 cxxflags=${CXXFLAGS}
@@ -1332,8 +1338,7 @@ cxxflags=${CXXFLAGS}
 cflags=${CFLAGS}
 
 
-libs=${LIBS}
-
+ldflags=${LDFLAGS}
 
 
 trap '' 1 2 15
@@ -1507,11 +1512,10 @@ s%@host_cpu@%$host_cpu%g
 s%@host_vendor@%$host_vendor%g
 s%@host_os@%$host_os%g
 s%@platform@%$platform%g
-s%@osver@%$osver%g
 s%@compiler@%$compiler%g
 s%@cxxflags@%$cxxflags%g
 s%@cflags@%$cflags%g
-s%@libs@%$libs%g
+s%@ldflags@%$ldflags%g
 
 CEOF
 EOF
diff --git a/tests/configure.in b/tests/configure.in
index f021a10119cdfdead3fb38e0ecf26e66121c3509..25c490f4e3f5fb76a91d00e712473416c8765410 100644
--- a/tests/configure.in
+++ b/tests/configure.in
@@ -1,7 +1,3 @@
-# $Id$
-#
-#
-
 dnl Process this file with autoconf to produce a configure script
 AC_INIT(DOM/DOMTest/DTest.h)
 
@@ -35,11 +31,14 @@ AC_CANONICAL_HOST
 dnl Platform-specific Makefile setup
 case "${host}" in
         *-*-solaris*)   platform=SOLARIS ;;
+        *-*-sysv5*)     platform=UNIXWARE ;;
+        *-*-UnixWare*)  platform=UNIXWARE ;;
+        *-*-*unixware*)  platform=UNIXWARE ;;
+        *-*-sysv5uw7*)  platform=UNIXWARE ;;
         *-*-linux*)     platform=LINUX ;;
-        *-*-*unixware*)     platform=UNIXWARE ;;
-        *-*-sysv5uw7*)     platform=UNIXWARE ;;
+	*-*-freebsd*)	platform=FREEBSD ;;
+        *-*-irix*)      platform=IRIX ;;
         *-*-aix*)       platform=AIX ;;
-        *-sequent-*)    platform=PTX ;;
         *-*-hp*)        platform=HPUX ;
                         case "${host}" in
                             *-*-hpux11*)  osver=HPUX11;;
@@ -47,15 +46,18 @@ case "${host}" in
                             *)            osver=HPUX11;;
                         esac;;
         *-*-mvs*)       platform=OS390 ;;
+        *-*-os400*)     platform=OS400 ;;
+        *-*-OS400*)     platform=OS400 ;;
+		*-*-osf*)	platform=TRU64 ;;
         *-apple-*)		platform=MACOSX ;;
         *)              platform=UNKNOWN ;;
 esac
 AC_SUBST(platform)
-AC_SUBST(osver)
 
 compiler=${CXX}
 AC_SUBST(compiler)
 
+# prefix=${prefix}
 AC_SUBST(prefix)
 
 cxxflags=${CXXFLAGS}
@@ -64,9 +66,8 @@ AC_SUBST(cxxflags)
 cflags=${CFLAGS}
 AC_SUBST(cflags)
 
-libs=${LIBS}
-AC_SUBST(libs)
-
+ldflags=${LDFLAGS}
+AC_SUBST(ldflags)
 
 dnl output the Makefiles
 AC_OUTPUT([Makefile \
diff --git a/tests/install-sh b/tests/install-sh
index 7e26d2444edce1abc6b1d222d392122b34bb7c3d..e9de23842dcd44d2953129c866b1ad25f7e1f1d9 100644
--- a/tests/install-sh
+++ b/tests/install-sh
@@ -22,12 +22,7 @@
 # This script is compatible with the BSD install script, but was written
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
-#
-# $Log$
-# Revision 1.1  2000/01/31 22:21:53  aruna1
-# initial checkin
-#
-#
+
 
 # set DOITPROG to echo to test this script
 
diff --git a/tests/runConfigure b/tests/runConfigure
index 01aafa9a81a0003ad0b53c6e4693d3e68769bc6c..8b54116e09090de5df31c55a6c3b524f8afc5960 100755
--- a/tests/runConfigure
+++ b/tests/runConfigure
@@ -1,10 +1,8 @@
 #!/bin/sh
-
-
 #
 # The Apache Software License, Version 1.1
 #
-# Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
+# Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
 # reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -56,49 +54,11 @@
 # on the Apache Software Foundation, please see
 # <http://www.apache.org/>.
 #
+
 #
-# $Log$
-# Revision 1.12  2001/12/05 16:49:53  tng
-# Fix runConfigure which can run into infinite loop with invalid argument  By Edward Avis.
-#
-# Revision 1.11  2001/11/23 16:17:46  tng
-# Remove -lC for Solaris build.
-#
-# Revision 1.10  2001/10/18 18:16:47  tng
-# Use opt2 on AIX platform.
-#
-# Revision 1.9  2001/06/09 18:06:50  jberry
-# Add MacOS build support for tests
-#
-# Revision 1.8  2001/02/13 13:10:50  tng
-# Update samples/tests files for on UnixWare 7.1.1 with gcc 2.95.  Add UNIXWARE platform defines to Makefile.incl, add recognition of sysv5uw7 to configure.in, and add unixware as recognized platform to runConfigure.  Updated by Hiram Clawson.
-#
-# Revision 1.7  2000/05/10 01:13:52  abagchi
-# Now detects AIX version and introduces -lpthreads_compat accordingly
-#
-# Revision 1.6  2000/04/12 20:33:08  abagchi
-# Included some more PTX changes
-#
-# Revision 1.5  2000/04/04 20:10:16  abagchi
-# Added PTX support
-#
-# Revision 1.4  2000/02/29 02:19:11  rahulj
-# No more compilation errors under HPUX 11.0. We do not build
-# DOMMemTest as it crashes the aCC compiler.
-#
-# Revision 1.3  2000/02/26 07:20:18  rahulj
-#  - The threading tests now work on HPUX.
-#  - Under HPUX 10.20 we do no build DOMMemTest and DOMTest.
-#    It crashes the compiler.
-#  - One could not write more worse makefiles than what exists for the
-#    tests. Hopefully, I will get bugged enough to fix them oneday.
-#
-# Revision 1.2  2000/02/06 07:48:34  rahulj
-# Year 2K copyright swat.
-#
-# Revision 1.1  2000/01/31 22:21:53  aruna1
-# initial checkin
+# $Id$
 #
+
 #
 # runConfigure : This script will run the "configure" script for the appropriate platform
 # Only supported platforms are recognized
@@ -108,11 +68,14 @@ usage()
     echo "runConfigure: Helper script to run \"configure\" for one of the supported platforms"
     echo "Usage: runConfigure \"options\""
     echo "       where options may be any of the following:"
-    echo "       -p <platform> (accepts 'aix', 'unixware', 'linux', 'solaris', 'hp-10', 'hp-11', 'ptx', 'macosx')"
-    echo "       -c <C compiler name> (e.g. gcc or xlc_r)"
-    echo "       -x <C++ compiler name> (e.g. g++ or xlC_r)"
+    echo "       -p <platform> (accepts 'aix', 'unixware', 'linux', 'freebsd', 'solaris',
+'hp-10', 'hp-11', 'os400', 'irix', 'ptx', 'tru64', 'macosx')"
+    echo "       -c <C compiler name> (e.g. gcc, xlc or icc)"
+    echo "       -x <C++ compiler name> (e.g. g++, xlC, or icc)"
     echo "       -d (specifies that you want to build debug version)"
-    echo "       -r <thread option> can be 'pthread' or 'dce' (only used on HP-11)"
+    echo "       -r <thread option> can be 'pthread' or 'dce' (only used on aix, HP-11 and solaris) or 'sproc' (only on IRIX) or 'none'"
+    echo "       -l <extra linker options>"
+    echo "       -z <extra compiler options>"
     echo "       -h (get help on the above commands)"
 }
 
@@ -138,23 +101,35 @@ if test $1 = "-h"; then
    exit ${ERROR_EXIT_CODE}
 fi
 
-# Get the command line parameters
-set -- `getopt p:c:x:dm:n:t:r:l:z:h $*`
+# Check the command line parameters
+if test -x /usr/bin/getopt; then
+getoptErr=`getopt p:c:x:dm:n:t:r:l:z:h $*`
+else
+getoptErr=`getopts p:c:x:dm:n:t:r:l:z:h `$*``
+fi
 if [ $? != 0 ]
    then
    usage
    exit ${ERROR_EXIT_CODE}
 fi
 
+# Now get the command line parameters
+if test -x /usr/bin/getopt; then
+set -- `getopt p:c:x:dm:n:t:r:l:z:h $*`
+else
+set -- `getopts p:c:x:dm:n:t:r:l:z:h `$*``
+fi
+
 # Set up the default values for each parameter
 debug=off                # by default debug is off
 transcoder=native        # by default use native transcoder
 msgloader=iconv          # by default use native transcoder
 netaccessor=fileonly     # by default use fileonly
-
-for i in $*
+thread=pthread           # by default use POSIX threads
+compileroptions=""
+while [ $# -gt 0 ]
    do
-   case $i in
+   case $1 in
    -p)
         platform=$2; shift 2;;
 
@@ -164,11 +139,17 @@ for i in $*
    -x)
         cppcompiler=$2; shift 2;;
 
+   -d)
+        debug=on; shift;;
+
    -r)
         thread=$2; shift 2;;
 
-   -d)
-        debug=on; shift;;
+   -z)
+        compileroptions="$compileroptions $2"; shift 2;;
+
+   -l)
+        linkeroptions="$linkeroptions $2"; shift 2;;
 
    -h)
         usage
@@ -184,29 +165,26 @@ for i in $*
    esac
 done
 
+if test $platform = "aix"; then
+      if test ! -n "$ccompiler" -o ! -n "$cppcompiler"; then
+              ccompiler=xlc
+              cppcompiler=xlC
+      fi
+fi
+
 echo "Generating makefiles with the following options ..."
 echo "Platform: $platform"
 echo "C Compiler: $ccompiler"
 echo "C++ Compiler: $cppcompiler"
+echo "Extra compile options: $compileroptions"
+echo "Extra link options: $linkeroptions"
 echo "Thread option: $thread"
 
-if test $debug = "off"; then
-    echo "Debug is OFF"
-    if test $platform = "irix"; then
-       debugflag="-O2";
-    elif test $platform = "aix"; then
-       debugflag="-O2";
-    else
-    debugflag="-O";
-    fi
-else
-    echo "Debug is ON"
-    debugflag="-g";
-fi
-
+#
 # Now check if the options are correct or not, bail out if incorrect
+#
 case $platform in
-   aix | unixware | linux | solaris | hp-10 | hp-11 | ptx | macosx)
+   aix | unixware | linux | freebsd | solaris | hp-10 | hp-11 | os400 | irix | ptx | tru64 | macosx)
        # platform has been recognized
        ;;
    *)
@@ -214,108 +192,181 @@ case $platform in
       exit ${ERROR_EXIT_CODE};;
 esac
 
-# Set the C compiler and C++ compiler environment variables
+#
+# Enable debugging or not...
+#
+if test $debug = "off"; then
+    echo "Debug is OFF"
+    if test $platform = "os400"; then
+    debugflag="-O";
+    elif test $platform = "irix"; then
+       debugflag="-w -O2";
+    elif test $platform = "aix"; then
+       debugflag="-w -O2";
+    else
+    debugflag="-w -O";
+    fi
+else
+    echo "Debug is ON"
+    debugflag="-g";
+fi
 
-case $cppcompiler in
-   xlC | xlc | xlC_r | xlc_r)
-       standardLibFlags="-L/usr/lpp/xlC/lib -lC";;
-
-   g++ | c++)
-if test $platform = "ptx"; then
-	if test -z $XMLINSTALL; then
-		XMLINSTALL=$ICUROOT
-	fi	
-       standardLibFlags="-L${XMLINSTALL}/lib -lc";
+#
+# Check for the threading option
+#
+if test $thread = "none"; then
+    THREADS=none
+    threadingLibs=""
+    threadingDefines="-DAPP_NO_THREADS -DXML_USE_NO_THREADS"
 else
-       standardLibFlags="-L/usr/local/lib -lc";
+    THREADS=pthread
+    threadingDefines="-DXML_USE_PTHREADS"
+    threadingLibs="-lpthread"
+    if test $platform = "hp-11"; then
+        if test $thread; then
+        case $thread in
+           pthread)
+               ;;
+           dce)
+               THREADS=dce ;
+               threadingLibs="-lcma" ;
+               threadingDefines="-D_PTHREADS_DRAFT4 -D_THREAD_SAFE -DXML_USE_DCE" ;;
+           *)
+               echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
+               exit ${ERROR_EXIT_CODE};;
+        esac
+        fi
+    elif test $platform = "freebsd"; then
+	threadingLibs="-pthread -lc_r"
+	threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
+    elif test $platform = "aix"; then
+        aix_version=`./config.guess`;
+        echo Found host system to be $aix_version
+        case $aix_version in
+           *4.3*)
+              ## Linkflags control the use of libpthreads on AIX
+              threadingLibs="-lpthreads_compat";;
+           *)
+              threadingLibs="-lpthreads";;
+        esac
+        if test $thread; then
+        case $thread in
+           pthread)
+               ;;
+           dce)
+               THREADS=dce ;
+               threadingDefines="-DXML_USE_DCE"
+               case $aix_version in
+                  *4.3*)
+                     ## Linkflags control the use of libpthreads on AIX
+                     threadingLibs="-ldcelibc_r -ldcepthreads -lpthreads_compat";;
+                  *)
+                     threadingLibs="-lC_r -lC -ldcelibc_r -ldcepthreads";;
+               esac
+               ;;
+           *)
+               echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help." ;
+               exit ${ERROR_EXIT_CODE};;
+        esac
+        fi
+    elif test $platform = "ptx"; then
+        threadingLibs=" "
+        if test -z $XMLINSTALL; then
+            XMLINSTALL=$ICUROOT         ## use either the -C or the -P option now.
+        fi
+    elif test $platform = "hp-10"; then
+        THREADS=dce
+        threadingLibs="-lcma"
+        threadingDefines="-DXML_USE_DCE"
+    elif test $platform = "unixware"; then
+        threadingLibs="" ## Linkflags control the use of threads on UnixWare
+    elif test $platform = "solaris"; then
+        if test $thread; then
+        case $thread in
+           pthread)
+               ;;
+           dce)
+               THREADS=dce ;
+               threadingLibs="-ldce";
+               threadingDefines="-DXML_USE_DCE";;
+           *)
+               echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help."
+               exit ${ERROR_EXIT_CODE};;
+        esac
+        fi
+    elif test $platform = "irix"; then
+        if test $thread; then
+        case $thread in
+        pthread)
+            ;;
+
+        sproc)
+            threadingLibs=" ";
+            threadingDefines="-DXML_USE_SPROC" ;;
+        *)
+           echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help."
+            exit ${ERROR_EXIT_CODE};;
+        esac
+        fi
+    fi
 fi
-	;;
 
-   cc | CC)
-       standardLibFlags="-L/usr/lib -L/usr/ccs/lib";;
+export THREADS
 
-   acc | aCC)
-       standardLibFlags="";;
+#
+# Set the C compiler and C++ compiler environment variables
+#
+case $cppcompiler in
+   xlC* | xlc* | g++ | c++ | cc | CC | aCC | icc | ICC | cxx)
+      ;;
 
    *)
       echo "I do not recognize the C++ compiler '$cppcompiler'. Continuing anyway ..."
       ;;
 esac
 
-CC=$ccompiler
+CC="$ccompiler"
 export CC
 
-CXX=$cppcompiler
+CXX="$cppcompiler"
 export CXX
 
-
 #
-# Check for the threading option only for hp-11
+# Set the extra C and C++ compiler flags
 #
-
-threadingLibs="-lpthread"
-if test $platform = "hp-11"; then
-    if test $thread; then
-    case $thread in
-       pthread)
-           ;;
-
-       dce)
-           threadingLibs="-lcma";
-           threadingDefines="-D_PTHREADS_DRAFT4 -DXML_USE_DCE" ;;
-
-       *)
-           echo "I do not recognize the thread option '$thread'. Please type '${0} -h' for help."
-           exit ${ERROR_EXIT_CODE};;
-    esac
-    fi
-elif test $platform = "aix"; then
-    aix_version=`./config.guess`;
-    echo Found host system to be $aix_version
-    case $aix_version in
-       *4.3*)
-          threadingLibs="-lpthreads_compat -lpthreads";;
-       *)
-          threadingLibs="-lpthreads";;
-    esac
-elif test $platform = "ptx"; then
-    threadingLibs=" "
-elif test $platform = "hp-10"; then
-    threadingLibs="-lcma"
-    threadingDefines="-DXML_USE_DCE"
-elif test $platform = "unixware"; then
-    threadingLibs="-pthread"
-    threadingDefines="-pthread"
+CXXFLAGS="$compileroptions $debugflag $threadingDefines"; export CXXFLAGS
+CFLAGS="$compileroptions $debugflag $threadingDefines"; export CFLAGS
+
+# gcc crashes if optimisation is turned on in a Tru64 environment
+if [ $platform = "tru64" -a $CXX = "g++" ]; then
+    CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]*//g'`
+    CFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]*//g'`
+    export CXXFLAGS CFLAGS
 fi
 
-#
-# Set the extra C and C++ compiler flags before invoking configure.
-#
-
-CXXFLAGS="$debugflag $compileroption $threadingDefines"
-export CXXFLAGS
-
-CFLAGS="$debugflag $compileroption $threadingDefines"
-export CFLAGS
-
-LIBS="$threadingLibs $standardLibFlags"
-export LIBS
-
-if test $platform = "ptx"; then
-if test ${XMLINSTALL}o = "o"; then
-XMLINSTALL = /usr/local; export XMLINSTALL
-fi
-fi
+LDFLAGS="$linkeroptions"; export LDFLAGS
+LIBS="$threadingLibs"; export LIBS
 
 echo
 rm -f config.cache
 rm -f config.log
 rm -f config.status
+if test $platform = "os400"; then
+./configure --host AS400-OS400
+elif test $platform = "ptx"; then
+./configure --prefix=$XMLINSTALL
+else
 ./configure
+fi
+# exit if configure failed
+if test $? != 0; then
+  exit 1
+fi
 
 echo
 echo In future, you may also directly type the following commands to create the Makefiles.
 echo
+echo export THREADS=\"$THREADS\"
 echo export CC=$CC
 echo export CXX=$CXX
 echo export CXXFLAGS=$CXXFLAGS
@@ -326,7 +377,7 @@ echo configure
 
 echo
 echo If the result of the above commands look OK to you, go to the directory
-echo ${XERCESCROOT}/tests and type \"gmake\" to make the XERCES-C system.
+echo ${XERCESCROOT}/tests and type \"gmake\" to make the test cases.
 
 exit 0;