--- c/src/Makefile.in.dist	2003-03-20 21:15:54.000000000 +0100
+++ c/src/Makefile.in	2003-06-02 17:57:31.000000000 +0200
@@ -68,6 +68,8 @@
 
 #MACROS defining commands
 MKDIR=mkdir
+AR=@l_ar@
+RANLIB=@l_ranlib@
 
 ifndef XALANCROOT 
 noxalanroot:
@@ -151,8 +153,9 @@
 ifeq ($(PLATFORM), LINUX)
 
   SUPPORTED = TRUE
-  ALLLIBS = ${LIBS} -L/usr/lib
+  ALLLIBS = ${LIBS}
   SHLIBSUFFIX=.so
+  LIBSUFFIX=.a
   PIC_OPTION=
 
   ifeq (${CXX}, icpc)
@@ -162,7 +165,7 @@
 
   else
 
-    PIC_OPTION=-fPIC
+    PIC_OPTION=
     PLATFORM_COMPILE_OPTIONS = -Wall
 
   endif
@@ -179,7 +182,7 @@
   CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   CC4 = $(CC) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared ${PIC_OPTION}
-  LINK = $(CXX) -D${PLATFORM} ${PIC_OPTION}
+  LINK = $(CXX) -D${PLATFORM} ${PIC_OPTION} ${LDFLAGS}
 
 endif
 
@@ -192,6 +195,7 @@
   PLATFORM_CXX_COMPILE_OPTIONS = +p -mt -Aa
   ALLLIBS = ${LIBS}
   SHLIBSUFFIX=.sl
+  LIBSUFFIX=.a
   CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) $(PLATFORM_CXX_COMPILE_OPTIONS)
   CC4 = $(CC) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   MAKE_SHARED = $(CXX) -b +Z ${LDFLAGS} -Wl,+s
@@ -207,7 +211,7 @@
 
   ifeq (${CXX}, g++)
 
-	PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT
+	PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT
 
 	ifdef XALAN_USE_ICU
 	LD_RPATH_PRE=  -Wl,-rpath,
@@ -216,10 +220,10 @@
 	EXTRA_LINK_OPTIONS=-lc
 	CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
     CC4 = $(CC) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
-	MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
-	LINK =  g++ -D${PLATFORM} -fPIC
+	MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared 
+	LINK =  g++ -D${PLATFORM} 
 
-	ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+	ALLLIBS = ${LIBS}
 
   else
 
@@ -236,6 +240,7 @@
   endif
 
   SHLIBSUFFIX=.so
+  LIBSUFFIX=.a
 
 endif
 
@@ -246,16 +251,15 @@
 
   ifeq (${CXX}, g++)
 
-	PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT
-	ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+	PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT
 
 	EXTRA_LINK_OPTIONS=-lc
 	CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
     CC4 = $(CC) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
-	MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
-	LINK =  g++ -D${PLATFORM} -fPIC
+	MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared
+	LINK =  g++ -D${PLATFORM}
 
-	ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+	ALLLIBS = ${LIBS}
 
     SHLIBSUFFIX=.a
 
@@ -282,6 +286,7 @@
 endif
 
 	SHLIBSUFFIX=.so
+	LIBSUFFIX=.a
 
   endif
 
@@ -296,6 +301,7 @@
   PLATFORM_COMPILE_OPTIONS2 =-Wc,dll -W0,"langlvl(extended),notempinc,float(ieee),targ(osv2r8)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED
   ALLLIBS =
   SHLIBSUFFIX=.dll
+  LIBSUFFIX=.a
   OS390SIDEDECK=.x
 
   CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)  -I${STLPORTROOT}/stlport
@@ -317,8 +323,9 @@
 
   SUPPORTED = TRUE
   PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${ALL_OBJECTS_DIR}/.cxx_repository -ieee -pthread -std strict_ansi_errors
-  ALLLIBS = ${LIBS} -L/usr/lib -lm
+  ALLLIBS = ${LIBS} -lm
   SHLIBSUFFIX = .so
+  LIBSUFFIX=.a
   CC1 = $(CXX) ${CXXFLAGS} $(PLATFORM_COMPILE_OPTIONS) -nocxxstd
   CC4 = $(CC) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   MAKE_SHARED = ${CXX} ${CXXFLAGS} -shared -D${PLATFORM} -ptr ${ALL_OBJECTS_DIR}/.cxx_repository -ieee -pthread -std strict_ansi_errors -nocxxstd
@@ -332,8 +339,9 @@
 
   SUPPORTED = TRUE
   PLATFORM_COMPILE_OPTIONS = -Wall -fno-elide-constructors -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
-  ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib
+  ALLLIBS = ${LIBS}
   SHLIBSUFFIX=.dylib
+  LIBSUFFIX=.a
   CC1 = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   CC4 = ${CC} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
   MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -dynamiclib
@@ -421,21 +429,29 @@
 
 all:	 lib  testXSLT testXPath XalanExe
 
+.PHONY: all
+
 prepare:
 	@echo Preparing the directory structure for a build ...
 	-${MKDIR} -p ${ALL_OBJECTS_DIR}
 	-${MKDIR} -p ${LIB_DIR}
 	-${MKDIR} -p $(BINTARGETDIR)
 
+.PHONY: prepare
+
 # Create header dependencies file -- this must be run before any objects are
 # built
 depend:
 	$(MAKE) -f makedepends DEPFILE=$(DEPFILE)
 
+.PHONY: depend
+
 -include $(DEPFILE)	
 
 compile:	 $(ALL_OBJECTS) 
 
+.PHONY: compile
+
 ifeq ($(PLATFORM), AIX)
 templates: ${ALL_OBJECTS_DIR}/XalanTemplate.o
 
@@ -449,18 +465,20 @@
 endif
 endif
 
+.PHONY: templates
+
 XalanExe: lib  $(BINTARGETDIR)/Xalan
 
 ifeq ($(PLATFORM), OS390)                                                       
-$(BINTARGETDIR)/Xalan: ${ALL_OBJECTS_DIR}/XalanExe.o                          
+$(BINTARGETDIR)/Xalan: ${ALL_OBJECTS_DIR}/XalanExe.o lib
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} ${ALL_OBJECTS_DIR}/XalanExe.o -o $@	$(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) 
 ${ALL_OBJECTS_DIR}/XalanExe.o: $(XALANEXE_DIR)/XalanExe.cpp                       
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else                                                            
-$(BINTARGETDIR)/Xalan: ${ALL_OBJECTS_DIR}/XalanExe.o
+$(BINTARGETDIR)/Xalan: ${ALL_OBJECTS_DIR}/XalanExe.o lib
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} ${ALL_OBJECTS_DIR}/XalanExe.o -o $@	-L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) 
 ${ALL_OBJECTS_DIR}/XalanExe.o: $(XALANEXE_DIR)/XalanExe.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
@@ -468,15 +486,15 @@
 testXSLT: lib  $(BINTARGETDIR)/testXSLT
 
 ifeq ($(PLATFORM), OS390)                                                       
-$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o                          
+$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o lib
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} ${ALL_OBJECTS_DIR}/process.o -o $@	$(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) 
 ${ALL_OBJECTS_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp                       
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else                                                            
-$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o
+$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o lib
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} ${ALL_OBJECTS_DIR}/process.o -o $@	-L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) 
 ${ALL_OBJECTS_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
@@ -484,47 +502,57 @@
 testXPath: lib  $(BINTARGETDIR)/testXPath
 
 ifeq ($(PLATFORM), OS390)                                                       
-$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o
+$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o lib
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} $(CXXFLAGS) $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/TestXPath.o: $(TESTXPATH_DIR)/TestXPath.cpp
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o: $(TESTXPATH_DIR)/NodeNameTreeWalker.cpp
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else                                                                 
-$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o
+$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o lib
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(TESTXPATH_DIR)/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 samples : Samples
 
+.PHONY: samles
+
 tests : ThreadTest
 
+.PHONY: tests
+
 Samples: lib CompileStylesheet DocumentBuilder ExternalFunction ParsedSourceWrappers \
          SimpleTransform SerializeNodeSet SimpleXPathAPI SimpleXPathCAPI StreamTransform \
 		 TraceListen TransformToXercesDOM UseStylesheetParam XalanTransform \
 		 XalanTransformerCallback XPathWrapper
 
+.PHONY: Samples
+
 ApacheModuleXSLT: lib ${LIB_DIR}/mod_xslt$(SHLIBSUFFIX) 
 
+.PHONY: ApacheModuleXSLT
+
 ${LIB_DIR}/mod_xslt$(SHLIBSUFFIX) : ${ALL_OBJECTS_DIR}/mod_xslt.o
 ifeq ($(PLATFORM), OS390)                                                       
 	$(MAKE_SHARED) $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
 	${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x  $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
-	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	$(MAKE_SHARED) $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
-	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 CompileStylesheet: lib $(BINTARGETDIR)/CompileStylesheet
 
+.PHONY: CompileStyleSheet
+
 $(BINTARGETDIR)/CompileStylesheet: ${ALL_OBJECTS_DIR}/CompileStylesheet.o
 ifeq ($(PLATFORM), OS390)                                                       
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -533,13 +561,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 DocumentBuilder: lib $(BINTARGETDIR)/DocumentBuilder
 
+.PHONY: DocumentBuilder
+
 $(BINTARGETDIR)/DocumentBuilder: ${ALL_OBJECTS_DIR}/DocumentBuilder.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -548,13 +578,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 ExternalFunction: lib $(BINTARGETDIR)/ExternalFunction
 
+.PHONY: ExternalFunction
+
 $(BINTARGETDIR)/ExternalFunction: ${ALL_OBJECTS_DIR}/ExternalFunction.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -563,13 +595,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 ParsedSourceWrappers: lib $(BINTARGETDIR)/ParsedSourceWrappers
 
+.PHONY: ParsedSourceWrappers
+
 $(BINTARGETDIR)/ParsedSourceWrappers: ${ALL_OBJECTS_DIR}/ParsedSourceWrappers.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -578,13 +612,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ParsedSourceWrappers/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 SerializeNodeSet: lib $(BINTARGETDIR)/SerializeNodeSet
 
+.PHONY: SerializeNodeSet
+
 $(BINTARGETDIR)/SerializeNodeSet: ${ALL_OBJECTS_DIR}/SerializeNodeSet.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -593,13 +629,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SerializeNodeSet/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 SimpleTransform: lib $(BINTARGETDIR)/SimpleTransform
 
+.PHONY: SimpleTransform
+
 $(BINTARGETDIR)/SimpleTransform: ${ALL_OBJECTS_DIR}/SimpleTransform.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -608,13 +646,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 SimpleXPathAPI: lib $(BINTARGETDIR)/SimpleXPathAPI
 
+.PHONY: SimpleXPathAPI
+
 $(BINTARGETDIR)/SimpleXPathAPI: ${ALL_OBJECTS_DIR}/SimpleXPathAPI.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -623,13 +663,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 SimpleXPathCAPI: lib $(BINTARGETDIR)/SimpleXPathCAPI
 
+.PHONY: SimpleXPathCAPI
+
 $(BINTARGETDIR)/SimpleXPathCAPI: ${ALL_OBJECTS_DIR}/SimpleXPathCAPI.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -638,13 +680,15 @@
 	$(CC4) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleXPathCAPI/%.c
 	$(CC4) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 StreamTransform: lib $(BINTARGETDIR)/StreamTransform
 
+.PHONY: StreamTransform
+
 $(BINTARGETDIR)/StreamTransform: ${ALL_OBJECTS_DIR}/StreamTransform.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -653,13 +697,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<		
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<		
 endif
 
 TraceListen: lib $(BINTARGETDIR)/TraceListen
 
+.PHONY: TraceListen
+
 $(BINTARGETDIR)/TraceListen: ${ALL_OBJECTS_DIR}/TraceListen.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -668,7 +714,7 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<		
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<		
 endif
@@ -683,13 +729,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<		
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/TransformToXercesDOM/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<		
 endif
 
 UseStylesheetParam: lib $(BINTARGETDIR)/UseStylesheetParam
 
+.PHONY: UseStyleSheetParam
+
 $(BINTARGETDIR)/UseStylesheetParam: ${ALL_OBJECTS_DIR}/UseStylesheetParam.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -698,13 +746,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<	
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<	
 endif
 
 XalanTransform: lib $(BINTARGETDIR)/XalanTransform
 
+.PHONY: XalanTransform
+
 $(BINTARGETDIR)/XalanTransform: ${ALL_OBJECTS_DIR}/XalanTransform.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -713,13 +763,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 XalanTransformerCallback: lib $(BINTARGETDIR)/XalanTransformerCallback
 
+.PHONY: XalanTransformerCallback
+
 $(BINTARGETDIR)/XalanTransformerCallback: ${ALL_OBJECTS_DIR}/XalanTransformerCallback.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -728,13 +780,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 XPathWrapper: lib $(BINTARGETDIR)/XPathWrapper
 
+.PHONY: XPathWrapper
+
 $(BINTARGETDIR)/XPathWrapper: ${ALL_OBJECTS_DIR}/XPathWrapper.o ${ALL_OBJECTS_DIR}/TestDriver.o
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -743,15 +797,19 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XPathWrapper/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 Tests: lib  ThreadTest Conf
 
+.PHONY: Tests
+
 ThreadTest: lib $(BINTARGETDIR)/ThreadTest
 
+.PHONY: ThreadTest
+
 $(BINTARGETDIR)/ThreadTest: ${ALL_OBJECTS_DIR}/ThreadTest.o 
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -760,13 +818,15 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
 Harness : lib ${ALL_OBJECTS_DIR}/XMLFileReporter.o ${ALL_OBJECTS_DIR}/FileUtility.o
 
+.PHONY: Harness
+
 ${ALL_OBJECTS_DIR}/FileUtility.o:
 ifeq ($(PLATFORM), OS390)
 ${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Harness/%.cpp
@@ -788,6 +848,8 @@
 
 Conf: Harness $(BINTARGETDIR)/Conf
 
+.PHONY: Conf
+
 $(BINTARGETDIR)/Conf: ${ALL_OBJECTS_DIR}/conf.o ${ALL_OBJECTS_DIR}/FileUtility.o ${ALL_OBJECTS_DIR}/XMLFileReporter.o 
 ifeq ($(PLATFORM), OS390)
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
@@ -796,15 +858,18 @@
 	$(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I$(TESTS_DIR) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 else
 	${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
-	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
+	${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME) $(ALLLIBS) $(CXXFLAGS) $^ -o $@	
 ${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Conf/%.cpp
 	$(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I$(TESTS_DIR) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
 endif
 
-lib:	prepare compile $(THISLIB)$(VER)$(SHLIBSUFFIX)
+lib:	prepare compile $(THISLIB)$(LIBSUFFIX)
+
+.PHONY: lib
 
-$(THISLIB)$(VER)$(SHLIBSUFFIX): $(ALL_OBJECTS)
-	$(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(ALLLIBS) $^ -o $@ 
+$(THISLIB)$(LIBSUFFIX): $(ALL_OBJECTS)
+	$(AR) $@ $^
+	$(RANLIB) $@ 2>/dev/null || true
 ifeq ($(PLATFORM), OS390)
 	cp -p *.x  ${LIB_DIR}        
 endif                                
@@ -817,6 +882,7 @@
 	rm -rf $(OUTDIR)/so_locations
 endif
 	rm -f $(THISLIB)$(VER)$(SHLIBSUFFIX)
+	rm -f $(THISLIB)$(LIBSUFFIX)
 	rm -f $(THISLIB)$(VER).map1
 	rm -f $(BINTARGETDIR)/testXSLT
 	rm -f $(BINTARGETDIR)/testXPath
@@ -838,3 +904,6 @@
 	rm -f $(BINTARGETDIR)/XalanTransform
 	rm -f $(BINTARGETDIR)/XalanTransformerCallback
 	rm -f $(BINTARGETDIR)/XPathWrapper
+
+.PHONY: clean
+
--- c/src/XPath/XPathExpression.hpp.dist	2003-03-05 05:41:11.000000000 +0100
+++ c/src/XPath/XPathExpression.hpp	2003-06-02 17:45:50.000000000 +0200
@@ -834,7 +834,7 @@
 		}
 		else
 		{
-			assert(theSize == OpCodeMapValueType(theSize));
+			assert(theSize == (OpCodeMapSizeType)OpCodeMapValueType(theSize));
 
 			return OpCodeMapValueType(theSize);
 		}
@@ -903,7 +903,7 @@
 	{
 		assert(opPos < opCodeMapSize());
 
-		assert(opPos + m_opMap[opPos + s_opCodeMapLengthIndex] == OpCodeMapValueType(opPos + m_opMap[opPos + s_opCodeMapLengthIndex]));
+		assert(opPos + m_opMap[opPos + s_opCodeMapLengthIndex] == (OpCodeMapSizeType)OpCodeMapValueType(opPos + m_opMap[opPos + s_opCodeMapLengthIndex]));
 
 		return OpCodeMapValueType(opPos + m_opMap[opPos + s_opCodeMapLengthIndex]);
 	}
--- c/src/Include/GCCDefinitions.hpp.dist	2003-02-19 10:21:29.000000000 +0100
+++ c/src/Include/GCCDefinitions.hpp	2003-06-02 17:45:50.000000000 +0200
@@ -90,4 +90,6 @@
 
 #define XALAN_UNALIGNED
 
+#define XALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
+
 #endif	// GCCDEFINITIONS_HEADER_GUARD_1357924680
