--- obj/Makefile.in.dist	2003-05-27 17:04:32.000000000 +0200
+++ obj/Makefile.in	2003-06-02 16:27:08.000000000 +0200
@@ -1,4 +1,4 @@
-#
+
 # The Apache Software License, Version 1.1
 #
 # Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
@@ -83,6 +83,10 @@
 include ../version.incl
 include ../src/xercesc/Makefile.incl
 
+#override AR definition in Makefile.incl
+AR  = @l_ar@
+RANLIB  = @l_ranlib@
+
 LIB=${XERCESCROOT}/lib
 ## OS390BATCH
 ifeq (${OS390BATCH},1)
@@ -121,7 +125,8 @@
 	\rm -f $(DUMMYEXE)
 
     $(DUMMYEXE): $(ALL_OBJECTS)
-	${MAKE_SHARED} -o ${@} $^ $(PLATFORM_LIBRARIES) $(ALLLIBS)
+	${AR} ${FQ_LINK_NAME:.so=.a} ${^} $(TEMPLATESOBJS)
+	${RANLIB} ${FQ_LINK_NAME:.so=.a}
 
     ######  End HP-UX  CC compiler specific stuff #######
   else
@@ -164,14 +169,9 @@
 endif
 
 ${FQ_REAL_NAME}:	$(ALL_OBJECTS)
-	@echo Building ${FQ_REAL_NAME}
-	${MAKE_SHARED} ${LD_SONAME} -o ${@} ${^} $(TEMPLATESOBJS) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(ALLLIBS)
-    ifneq (${FQ_SO_NAME},${FQ_REAL_NAME})
-	@echo symlink ${FQ_SO_NAME} 
-	rm -rf ${FQ_SO_NAME}   && ln -s ${FQ_REAL_NAME} ${FQ_SO_NAME}
-    endif
-	@echo symlink ${FQ_LINK_NAME}
-	rm -rf ${FQ_LINK_NAME} && ln -s ${FQ_SO_NAME} ${FQ_LINK_NAME}
+	@echo Building ${FQ_LINK_NAME:.so=.a}
+	${AR} ${FQ_LINK_NAME:.so=.a} ${^} $(TEMPLATESOBJS)
+	${RANLIB} ${FQ_LINK_NAME:.so=.a} 2>/dev/null || true
 
 ## Start OS390 ##
 ifeq (${PLATFORM},OS390)
@@ -226,8 +226,7 @@
 	$(CP) $(XML_LIB_DIR)/${LIBNAME}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a ${DESTDIR}${PREFIX}/lib
 	(cd ${DESTDIR}$(PREFIX)/lib; rm -f ${LINK_NAME}.a libxerces.dll.a; ln -s ${LIBNAME}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a ${LINK_NAME}.a; ln -s ${LIBNAME}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a libxerces.dll.a)
 else
-	$(CP) ${FQ_REAL_NAME} ${DESTDIR}$(PREFIX)/lib
-	(cd ${DESTDIR}$(PREFIX)/lib; ln -s ${REAL_NAME} ${SO_NAME}; ln -s ${REAL_NAME} ${LINK_NAME})
+	$(CP) ${FQ_LINK_NAME:.so=.a} ${DESTDIR}$(PREFIX)/lib
 endif
 ifeq (${PLATFORM},OS390)
 	$(CP) ${LIBNAME}${VER}${OS390SIDEDECK} ${DESTDIR}$(PREFIX)/lib
--- samples/Makefile.incl.dist	2003-05-27 17:04:33.000000000 +0200
+++ samples/Makefile.incl	2003-06-02 16:25:06.000000000 +0200
@@ -71,8 +71,8 @@
 endif
 THISLIB=${LIB_DIR}/${LIBNAME}
 
-LIBRARY_NAMES=-l${LIBNAME}
-LIBRARY_SEARCH_PATHS=-L${LIB_DIR}
+LIBRARY_NAMES=${LIB_DIR}/lib${LIBNAME}.a
+LIBRARY_SEARCH_PATHS=
 
 TO = o
 ####################### PLATFORM DEPENDENCIES #####################
@@ -83,11 +83,11 @@
 	CMP= -c ${CXXFLAGS}
 	CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
 	LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
-	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
   else
 	CMP= -c ${CXXFLAGS}
-	CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT -I/usr/local/include
+	CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT
 	LINK =  CC -D${PLATFORM} ${LDFLAGS}
 	PLATFORM_LIB_LINK_OPTIONS=
 	EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
@@ -101,7 +101,7 @@
 	CMP= -c ${CXXFLAGS}
 	CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
 	LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
-	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
   else
 	CMP= -c ${CXXFLAGS}
@@ -119,7 +119,7 @@
   CMP=-c ${CXXFLAGS}
   LINK=${CC} ${LDFLAGS}
   EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
-  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
   SHLIBSUFFIX=.so
 endif
 
@@ -129,7 +129,7 @@
   CC= ${COMPILER} -O2 -c -D${PLATFORM} -D_REENTRANT -fpic -pthread
   LINK = ${COMPILER} -D${PLATFORM} -fpic -pthread ${LDFLAGS}
   EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
-  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
   SHLIBSUFFIX=.so
 endif
 
@@ -145,7 +145,7 @@
 PLATFORM_COMPILE_OPTIONS = -KPIC -Kthread -DPTX
 MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -DPTX -G
 MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -DPTX  -G
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib -L${XMLINSTALL}/lib
+PLATFORM_LIB_LINK_OPTIONS=-L${XMLINSTALL}/lib
 EXTRA_LINK_OPTIONS=-lm -lgen ${EXTRA_LIBS}
 SHLIBSUFFIX=.so
 endif
@@ -194,7 +194,7 @@
 CMP= -c ${CXXFLAGS}
 CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
 LINK =  ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib
+PLATFORM_LIB_LINK_OPTIONS=
 EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
 SHLIBSUFFIX=.so
 endif
@@ -215,7 +215,7 @@
 CMP= -c ${CXXFLAGS}
 CC= ${COMPILER} -c -D__${PLATFORM}__
 LINK =  ${COMPILER} -D__${PLATFORM}__ ${LDFLAGS}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
 SHLIBSUFFIX=.dll
 endif
@@ -225,7 +225,7 @@
   CMP= -c ${CXXFLAGS}
   CC= ${COMPILER} -c -D${PLATFORM} -fPIC
   LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS}
-  PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib
+  PLATFORM_LIB_LINK_OPTIONS=
   ifdef ICUROOT
     PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT}
     EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS}
@@ -325,7 +325,7 @@
 CMP= -c ${CXXFLAGS}
 CC = ${COMPILER} -c -D${PLATFORM}
 LINK = ${COMPILER} -D${PLATFORM} ${LDFLAGS}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 SHLIBSUFFIX=.so
 endif
 
@@ -335,6 +335,6 @@
 	CMP= -c ${CXXFLAGS}
 	CC= c++ -c -D${PLATFORM} -D_REENTRANT
 	LINK = c++ -D${PLATFORM} ${LDFLAGS}
-	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	SHLIBSUFFIX=.dylib
 endif
--- tests/Makefile.incl.dist	2003-05-27 17:05:07.000000000 +0200
+++ tests/Makefile.incl	2003-06-02 16:25:06.000000000 +0200
@@ -71,8 +71,8 @@
 endif
 THISLIB=${LIB_DIR}/${LIBNAME}
 
-LIBRARY_NAMES=-l${LIBNAME}
-LIBRARY_SEARCH_PATHS=-L${LIB_DIR}
+LIBRARY_NAMES=${LIB_DIR}/lib${LIBNAME}.a
+LIBRARY_SEARCH_PATHS=
 
 TO = o
 ####################### PLATFORM DEPENDENCIES #####################
@@ -83,11 +83,11 @@
 	CMP= -c ${CXXFLAGS}
 	CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
 	LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
-	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
   else
 	CMP= -c ${CXXFLAGS}
-	CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT -I/usr/local/include
+	CC= CC -c -D${PLATFORM} -LANG:pch -LANG:std -O2 -D_REENTRANT
 	LINK =  CC -D${PLATFORM} ${LDFLAGS}
 	PLATFORM_LIB_LINK_OPTIONS=
 	EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
@@ -101,7 +101,7 @@
 	CMP= -c ${CXXFLAGS}
 	CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
 	LINK = ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
-	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
   else
 	CMP= -c ${CXXFLAGS}
@@ -119,7 +119,7 @@
   CMP=-c ${CXXFLAGS}
   LINK=${CC} ${LDFLAGS}
   EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
-  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
   SHLIBSUFFIX=.so
 endif
 
@@ -129,7 +129,7 @@
   CC= ${COMPILER} -O2 -c -D${PLATFORM} -D_REENTRANT -fpic -pthread
   LINK = ${COMPILER} -D${PLATFORM} -fpic -pthread ${LDFLAGS}
   EXTRA_LINK_OPTIONS=-lc -lsocket ${EXTRA_LIBS}
-  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+  PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
   SHLIBSUFFIX=.so
 endif
 
@@ -145,7 +145,7 @@
 PLATFORM_COMPILE_OPTIONS = -KPIC -Kthread -DPTX
 MAKE_SHARED = ${PLATFORM_CPP_COMPILER} -DPTX -G
 MAKE_SHARED_C = ${PLATFORM_C_COMPILER} -DPTX  -G
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib -L${XMLINSTALL}/lib
+PLATFORM_LIB_LINK_OPTIONS=-L${XMLINSTALL}/lib
 EXTRA_LINK_OPTIONS=-lm -lgen ${EXTRA_LIBS}
 SHLIBSUFFIX=.so
 endif
@@ -193,7 +193,7 @@
 CMP= -c ${CXXFLAGS}
 CC= ${COMPILER} -c -D${PLATFORM} -D_REENTRANT -fpic
 LINK =  ${COMPILER} -D${PLATFORM} -fpic ${LDFLAGS}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/local/lib
+PLATFORM_LIB_LINK_OPTIONS=
 EXTRA_LINK_OPTIONS=-lc ${EXTRA_LIBS}
 SHLIBSUFFIX=.so
 endif
@@ -214,7 +214,7 @@
 CMP= -c ${CXXFLAGS}
 CC= ${COMPILER} -c -D__${PLATFORM}__
 LINK =  ${COMPILER} -D__${PLATFORM}__ ${LDFLAGS}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 EXTRA_LINK_OPTIONS=${EXTRA_LIBS}
 SHLIBSUFFIX=.dll
 endif
@@ -224,7 +224,7 @@
   CMP= -c ${CXXFLAGS}
   CC= ${COMPILER} -c -D${PLATFORM} -fPIC
   LINK = ${COMPILER} -D${PLATFORM} -fPIC ${LDFLAGS}
-  PLATFORM_LIB_LINK_OPTIONS=-Wl,-rpath,${XERCESCROOT}/lib
+  PLATFORM_LIB_LINK_OPTIONS=
   ifdef ICUROOT
     PLATFORM_LIB_LINK_OPTIONS+=-L${ICUROOT} -Wl,-rpath,${ICUROOT}
     EXTRA_LINK_OPTIONS=-licudata -lstdc++ ${EXTRA_LIBS}
@@ -324,7 +324,7 @@
 CMP= -c ${CXXFLAGS}
 CC = ${COMPILER} -c -D${PLATFORM}
 LINK = ${COMPILER} -D${PLATFORM} ${LDFLAGS}
-PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 SHLIBSUFFIX=.so
 endif
 
@@ -334,6 +334,6 @@
 	CMP= -c ${CXXFLAGS}
 	CC= c++ -c -D${PLATFORM} -D_REENTRANT
 	LINK = c++ -D${PLATFORM} ${LDFLAGS}
-	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
+	PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib
 	SHLIBSUFFIX=.dylib
 endif
--- samples/runConfigure.dist	2003-07-03 17:00:52.000000000 +0200
+++ samples/runConfigure	2003-07-03 17:02:56.000000000 +0200
@@ -415,6 +415,73 @@
 fi
 
 #
+# Check for the type of net accessor
+#
+
+netaccessor=socket
+NETACCESSOR=Socket               # By default use socket (does HTTP URL's)
+if test $netaccessor ; then
+case $netaccessor in
+   fileonly)
+       NETACCESSOR=FileOnly
+       netaccessorDefines="" ;;
+
+   socket)
+       NETACCESSOR=Socket
+       netaccessorDefines="-DXML_USE_NETACCESSOR_SOCKET"
+       case $platform in
+           unixware|openserver)
+               netaccessorLibs="-lnsl -lsocket";;
+           hp-11)
+               netaccessorLibs="-lnsl";;
+           aix)
+               #netaccessorLibs="-lbsd";;
+               netaccessorLibs="";;
+           beos)
+               netaccessorLibs="-lnet";;
+           qnx) 
+               netaccessorLibs="-lsocket";;
+           solaris)
+               netaccessorLibs="-lnsl -lsocket"
+             if test $thread = "dce"; then
+                 netaccessorLibs=""
+             fi
+             ;;
+           *)
+               ;;
+       esac;;
+
+   libwww)
+       NETACCESSOR=LibWWW
+       if test -z "`libwww-config --libs 2>/dev/null`" ; then
+           echo "Netaccessor is libwww, but libwww-config is not found. Cannot proceed further."
+           exit ${ERROR_EXIT_CODE};
+       fi
+       netaccessorDefines="-DXML_USE_NETACCESSOR_LIBWWW `libwww-config --cflags`"
+       netaccessorLibs="`libwww-config --libs`"
+       USELIBWWW=1;;
+
+   native)
+       if test $platform = "macosx"; then
+           NETACCESSOR=NATIVE
+           netaccessorDefines="-DXML_USE_NETACCESSOR_NATIVE"
+           netaccessorLibs=""
+       else
+           echo "netaccessor option '$netaccessor' is supported on 'macosx' only."
+           exit ${ERROR_EXIT_CODE}
+       fi
+
+       ;;
+
+   *)
+       echo "I do not recognize the netaccessor option '$netaccessor'. Please type '${0} -h' for help."
+       exit ${ERROR_EXIT_CODE};;
+esac
+fi
+
+export NETACCESSOR
+
+#
 # Set the C compiler and C++ compiler environment variables
 #
 case $cppcompiler in
@@ -458,7 +524,7 @@
 LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildLink"
 export LDFLAGS
 
-EXTRA_LIBS="$transcodingLibs $threadingLibs"
+EXTRA_LIBS="$transcodingLibs $threadingLibs $netaccessorLibs"
 export EXTRA_LIBS
 
 echo
--- tests/runConfigure.dist	2003-07-03 17:47:41.000000000 +0200
+++ tests/runConfigure	2003-07-03 17:48:03.000000000 +0200
@@ -415,6 +415,73 @@
 fi
 
 #
+# Check for the type of net accessor
+#
+
+netaccessor=socket
+NETACCESSOR=Socket               # By default use socket (does HTTP URL's)
+if test $netaccessor ; then
+case $netaccessor in
+   fileonly)
+       NETACCESSOR=FileOnly
+       netaccessorDefines="" ;;
+
+   socket)
+       NETACCESSOR=Socket
+       netaccessorDefines="-DXML_USE_NETACCESSOR_SOCKET"
+       case $platform in
+           unixware|openserver)
+               netaccessorLibs="-lnsl -lsocket";;
+           hp-11)
+               netaccessorLibs="-lnsl";;
+           aix)
+               #netaccessorLibs="-lbsd";;
+               netaccessorLibs="";;
+           beos)
+               netaccessorLibs="-lnet";;
+           qnx) 
+               netaccessorLibs="-lsocket";;
+           solaris)
+               netaccessorLibs="-lnsl -lsocket"
+             if test $thread = "dce"; then
+                 netaccessorLibs=""
+             fi
+             ;;
+           *)
+               ;;
+       esac;;
+
+   libwww)
+       NETACCESSOR=LibWWW
+       if test -z "`libwww-config --libs 2>/dev/null`" ; then
+           echo "Netaccessor is libwww, but libwww-config is not found. Cannot proceed further."
+           exit ${ERROR_EXIT_CODE};
+       fi
+       netaccessorDefines="-DXML_USE_NETACCESSOR_LIBWWW `libwww-config --cflags`"
+       netaccessorLibs="`libwww-config --libs`"
+       USELIBWWW=1;;
+
+   native)
+       if test $platform = "macosx"; then
+           NETACCESSOR=NATIVE
+           netaccessorDefines="-DXML_USE_NETACCESSOR_NATIVE"
+           netaccessorLibs=""
+       else
+           echo "netaccessor option '$netaccessor' is supported on 'macosx' only."
+           exit ${ERROR_EXIT_CODE}
+       fi
+
+       ;;
+
+   *)
+       echo "I do not recognize the netaccessor option '$netaccessor'. Please type '${0} -h' for help."
+       exit ${ERROR_EXIT_CODE};;
+esac
+fi
+
+export NETACCESSOR
+
+#
 # Set the C compiler and C++ compiler environment variables
 #
 case $cppcompiler in
@@ -458,7 +524,7 @@
 LDFLAGS="$LDFLAGS $linkeroptions $bitstobuildLink"
 export LDFLAGS
 
-EXTRA_LIBS="$transcodingLibs $threadingLibs"
+EXTRA_LIBS="$transcodingLibs $threadingLibs $netaccessorLibs"
 export EXTRA_LIBS
 
 echo
--- src/xercesc/util/RefArrayOf.c.orig	2004-10-25 16:47:18 +0200
+++ src/xercesc/util/RefArrayOf.c	2004-10-25 17:03:22 +0200
@@ -92,6 +92,8 @@
 #include <xercesc/util/RefArrayOf.hpp>
 #endif
 
+#include <xercesc/framework/MemoryManager.hpp>
+
 XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
