rse         98/03/08 04:58:21

  Modified:    src      Configure
  Log:
  Fix Configure script:
  
  1. move generation of ap_config.h to a later point in the script
     because else it doesn't pick up HIDE or STATUS correctly.
  
  2. change the generation of shared objects from explicit rules to
     implicit rules: First the $< is only portable for implict
     rules (e.g. FreeBSD's make fails) and second we already build
     .o's implicitly, so we should do with .so's the same way.
  
  Revision  Changes    Path
  1.195     +26 -23    apache-1.3/src/Configure
  
  Index: Configure
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -r1.194 -r1.195
  --- Configure 1998/03/05 18:58:31     1.194
  +++ Configure 1998/03/08 12:58:19     1.195
  @@ -841,24 +841,6 @@
        }'`
   
   #
  -# At this point we can pick out all -D's from CFLAGS and create ap_config.h
  -# to be used by external modules needing to include Apache header files.
  -#
  -
  -for cflag in $CFLAGS; do
  -     echo $cflag >>$tmpconfig ;
  -done
  -awk > include/ap_config.h < $tmpconfig '
  -     BEGIN {
  -             printf "/* Automatically generated file - do not edit */\n\n"
  -     }
  -     /^-D.*/ {
  -             split(substr($1,3,length($1)),parts,"=")
  -             printf ("#define %s %s\n",parts[1],parts[2])
  -     }
  -'
  -
  -#
   # Now autoconfigure each of the modules specified by AddModule.
   # Use tmpfile2 for the module definition file, and tmpfile3 for the
   # shell commands to be executed for this module.
  @@ -1078,6 +1060,25 @@
   echo "#### End of Configure created section ####">> Makefile.config
   
   ####################################################################
  +# Continue building include/ap_config.h
  +#
  +# We pick out all -D's from CFLAGS and create ap_config.h which
  +# can be used by external modules needing to include Apache
  +# header files.
  +for cflag in $CFLAGS; do
  +     echo $cflag >>$tmpconfig ;
  +done
  +awk > include/ap_config.h < $tmpconfig '
  +     BEGIN {
  +             printf "/* Automatically generated file - do not edit */\n\n"
  +     }
  +     /^-D.*/ {
  +             split(substr($1,3,length($1)),parts,"=")
  +             printf ("#define %s %s\n",parts[1],parts[2])
  +     }
  +'
  +
  +####################################################################
   # Use TestCompile to see if $(CC) is ANSI and as a "final" sanity
   # check
   #
  @@ -1167,15 +1168,11 @@
                split(pp[3], parts, ".")
                base=parts[1]
                shlibsobj=shlibsobj " " base "-so.o"
  -             comp=comp base ".so: " base "-so.o\n"
  -             comp=comp "     $(LD) $(LDFLAGS) $(LDFLAGS_SHLIB) -o " base 
".so $<\n"
  -             comp=comp base "-so.o: " base ".c\n"
  -             comp=comp "     $(CC) $(CFLAGS) $(INCLUDES) $(CFLAGS_SHLIB) -c 
-o " base "-so.o $<\n"
            }
            END { 
                printf "SHLIBS=%s\n", shlibs;
                printf "SHLIBS_OBJ=%s\n", shlibsobj;
  -             print "\n" comp "\n" }'
  +            }'
   
            $CAT << 'EOF' >> $moddir/Makefile
   
  @@ -1188,8 +1185,14 @@
        ar cr $@ $(OBJS)
        $(RANLIB) $@
   
  +.SUFFIXES: .o .so
  +
   .c.o:
        $(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $<
  +
  +.c.so:
  +     $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $(SPACER) -o $*-so.o $<
  +     $(LD) $(LDFLAGS) $(LDFLAGS_SHLIB) -o $@ $*-so.o
   
   clean:
        rm -f $(OBJS) $(SHLIBS) $(SHLIBS_OBJ) $(LIB) $(SHLIB)
  
  
  

Reply via email to