gstein 99/05/25 03:15:07
Modified: src Configuration.tmpl Configure Makefile.tmpl src/main http_main.c Log: Add RULE_EXPAT. Add src/lib/ handling. Revision Changes Path 1.113 +7 -0 apache-1.3/src/Configuration.tmpl Index: Configuration.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/src/Configuration.tmpl,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- Configuration.tmpl 1998/12/01 23:59:53 1.112 +++ Configuration.tmpl 1999/05/25 10:15:03 1.113 @@ -160,12 +160,19 @@ # is performing this function. If PARANOID is set to yes, it will # actually print-out the code that the modules execute # +# EXPAT: +# Include James Clark's Expat package into Apache, for use by the +# modules. The "default" is to include it if the ./expat/ directory +# is present. This rule will always be interpreted as "no" if the +# directory is not present. +# Rule SOCKS4=no Rule SOCKS5=no Rule IRIXNIS=no Rule IRIXN32=yes Rule PARANOID=no +Rule EXPAT=default # The following rules should be set automatically by Configure. However, if # they are not set by Configure (because we don't know the correct value for 1.349 +61 -3 apache-1.3/src/Configure Index: Configure =================================================================== RCS file: /home/cvs/apache-1.3/src/Configure,v retrieving revision 1.348 retrieving revision 1.349 diff -u -r1.348 -r1.349 --- Configure 1999/05/23 16:55:28 1.348 +++ Configure 1999/05/25 10:15:04 1.349 @@ -77,7 +77,8 @@ tmpfile3=$tmpfile.3 awkfile=$tmpfile.4 tmpconfig=$tmpfile.5 -SUBDIRS="ap main modules" +SUBDIRS="ap main" +APLIBDIRS="" #################################################################### ## Now handle any arguments, which, for now, is -file @@ -223,6 +224,7 @@ RULE_IRIXNIS=`./helpers/CutRule IRIXNIS $file` RULE_IRIXN32=`./helpers/CutRule IRIXN32 $file` RULE_PARANOID=`./helpers/CutRule PARANOID $file` +RULE_EXPAT=`./helpers/CutRule EXPAT $file` RULE_SHARED_CORE=`./helpers/CutRule SHARED_CORE $file` RULE_SHARED_CHAIN=`./helpers/CutRule SHARED_CHAIN $file` @@ -1565,6 +1567,27 @@ fi #################################################################### +## Add in the Expat library if needed/wanted. +## +if [ -d ./lib/expat/ ]; then + if [ "$RULE_EXPAT" = "default" ]; then + RULE_EXPAT=yes + fi +else + if [ "$RULE_EXPAT" = "yes" ]; then + echo "ERROR: RULE_EXPAT set to \"yes\" but is not available." + exit 1 + else + RULE_EXPAT=no + fi +fi +if [ "$RULE_EXPAT" = "yes" ]; then + EXPATLIB="lib/expat/libexpat.a" + APLIBDIRS="expat $APLIBDIRS" + CFLAGS="$CFLAGS -DUSE_EXPAT -I\$(SRCDIR)/lib/expat" +fi + +#################################################################### ## Now the SHARED_CHAIN stuff ## if [ "x$using_shlib" = "x1" ] ; then @@ -1779,7 +1802,7 @@ #################################################################### ## Now add the target for the main Makefile ## -echo "SUBDIRS=$SUBDIRS" >> Makefile +echo "SUBDIRS=$SUBDIRS lib modules" >> Makefile echo "SUBTARGET=$SUBTARGET" >> Makefile echo "SHLIB_SUFFIX_NAME=$SHLIB_SUFFIX_NAME" >> Makefile echo "SHLIB_SUFFIX_LIST=$SHLIB_SUFFIX_LIST" >> Makefile @@ -1807,6 +1830,7 @@ echo "LDFLAGS1=$LDFLAGS" >>Makefile.config echo "MFLAGS_STATIC=$MFLAGS_STATIC" >>Makefile.config echo "REGLIB=$REGLIB" >>Makefile.config +echo "EXPATLIB=$EXPATLIB" >>Makefile.config echo "RANLIB=$RANLIB" >>Makefile.config #################################################################### @@ -1991,12 +2015,46 @@ sed -e "s#@@Configuration@@#$file#" "Makefile.tmpl" >>Makefile # xxx/Makefile -MAKEDIRS="support main ap regex $OSDIR" +MAKEDIRS="support $SUBDIRS" for dir in $MAKEDIRS ; do echo Creating Makefile in $dir ./helpers/mfhead $dir $file > $dir/Makefile $CAT Makefile.config $dir/Makefile.tmpl |\ sed -e "s:^SRCDIR=.*:SRCDIR=`./helpers/fp2rp $dir`:" >> $dir/Makefile +done + +#################################################################### +## Now create the lib/Makefile +## +./helpers/mfhead modules $file > lib/Makefile +$CAT Makefile.config | sed -e 's:^SRCDIR=.*:SRCDIR=..:' >> lib/Makefile + +$CAT << EOF >> lib/Makefile +APLIBS=$APLIBDIRS +CFLAGS=\$(OPTIM) \$(CFLAGS1) \$(EXTRA_CFLAGS) + +default: all + +all clean distclean depend :: + @for i in \$(APLIBS) ""; do \\ + if [ "x\$\$i" != "x" ]; then \\ + echo "===> \$(SDP)lib/\$\$i"; \\ + (cd \$\$i && \$(MAKE) \$(MFLAGS_STATIC) SDP='\$(SDP)' CC='\$(CC)' AUX_CFLAGS='\$(CFLAGS)' RANLIB='\$(RANLIB)' \$@) || exit 1; \\ + echo "<=== \$(SDP)lib/\$\$i"; \\ + fi; \\ + done + +EOF + +#################################################################### +## Now create the lib/xxx/Makefile +## + +for dir in $APLIBDIRS ; do + echo Creating Makefile in lib/$dir + ./helpers/mfhead lib/$dir $file > lib/$dir/Makefile + $CAT Makefile.config lib/$dir/Makefile.tmpl |\ + sed -e "s:^SRCDIR=.*:SRCDIR=`./helpers/fp2rp lib/$dir`:" >> lib/$dir/Makefile done #################################################################### 1.113 +3 -2 apache-1.3/src/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/src/Makefile.tmpl,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- Makefile.tmpl 1999/05/12 20:00:07 1.112 +++ Makefile.tmpl 1999/05/25 10:15:04 1.113 @@ -33,7 +33,7 @@ target_static: subdirs modules.o $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ - -o $(TARGET) buildmark.o $(OBJS) $(REGLIB) $(LIBS) + -o $(TARGET) buildmark.o $(OBJS) $(REGLIB) $(EXPATLIB) $(LIBS) target_compile_only: subdirs modules.o $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c @@ -50,7 +50,7 @@ lib$(TARGET).$(SHLIB_SUFFIX_NAME): subdirs modules.o $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS) $(REGLIB) $(LD_SHCORE_DEF) $(LD_SHCORE_LIBS) + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS) $(REGLIB) $(EXPATLIB) $(LD_SHCORE_DEF) $(LD_SHCORE_LIBS) @if [ ".$(SHLIB_SUFFIX_LIST)" != . ]; then \ rm -f lib$(TARGET).$(SHLIB_SUFFIX_NAME).*; \ for suffix in $(SHLIB_SUFFIX_LIST) ""; do \ @@ -93,6 +93,7 @@ -rm -f modules.c -rm -f modules/Makefile -rm -f regex/Makefile + -rm -f lib/Makefile -rm -f Makefile.config -rm -f Makefile 1.438 +8 -0 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.437 retrieving revision 1.438 diff -u -r1.437 -r1.438 --- http_main.c 1999/05/21 16:49:08 1.437 +++ http_main.c 1999/05/25 10:15:06 1.438 @@ -6514,4 +6514,12 @@ #endif /* def OS2 */ #endif /* ndef SHARED_CORE_BOOTSTRAP */ +/* force Expat to be linked into the server executable */ +#ifdef USE_EXPAT +#include "xmlparse.h" +const XML_LChar * suck_in_expat(void) +{ + return XML_ErrorString(XML_ERROR_NONE); +} +#endif /* USE_EXPAT */