httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Semi-intelligent Configure
Date Wed, 31 Jul 1996 02:31:40 GMT
Here's my first cut at a semi-intelligent Configure. The bulk of the
information in Configuration.tmpl concerning platforms is now included
in Configure. A simple menu asks which platform you're on and sets the
flags accordingly. Future versions will auto-determine that. Also,
you can totally avoid any Configure Q&A by "Rules" that are set in
Configuration.tmpl. For example, if you always want to include -DSTATUS
if the mod_status module is used, add

	!STATUS=yes

to Configuration and Configure will set it iff mod_status is included.

At this point it's 50-50 Q&A and "take what's in Configuration". There
more that can be done, but I don't want to put the effort in if not
desired.

Let me know what you think :) :)

PS: It's a BIG patch 

Index: apache/src/Configuration.tmpl
===================================================================
RCS file: /export/home/cvs/apache/src/Configuration.tmpl,v
retrieving revision 1.25
diff -c -r1.25 Configuration.tmpl
*** Configuration.tmpl	1996/07/30 19:36:57	1.25
--- Configuration.tmpl	1996/07/31 02:23:54
***************
*** 1,185 ****
  # Config file for the Apache httpd.
  
  # Configuration.tmpl is the template for Configuration. Configuration should
! # be edited to select system type. Configuration.tmpl should only be changed
! # when a new system or module is added, or an existing one modified.
  
! # There are three types of lines here:
  
  # '#' comments, distinguished by having a '#' as the first non-blank character
  #
! # Lines which set a Make option --- these are simply copied into the Makefile
  #
  # Module selection lines, distinguished by having 'Module' at the front.
  # These list the configured modules, in priority order (highest priority
  # first).  They're down at the bottom.
  
- # First, ordinary compile-time configuration.
- 
- # What to call the compiler:  For normal machines with ANSI compilers
- # CC= cc
- # For Suns or other non-ANSI platforms. Please make sure your gcc is
- # 2.0 or later, as 1.40 seems to create bad code for the Sun 4.
- CC= gcc
- 
- # CFLAGS, compile flags.
- 
- # -DMINIMAL_DNS is now obsolete. Use httpd.conf settings of
- # HostnameLookups on
- # or
- # HostnameLookups off
- #
- # If you want to have more secure hostname resolution at the cost of some 
- # performance, use -DMAXIMUM_DNS.
- # If you want setting the xbit of a file to cause it to be treated as
- # server-included HTML (unless it is a CGI script), say -DXBITHACK.  Note
- # that this is a run-time option, per-directory, either way (via the XBITHACK
- # command); this option only sets the default.
- 
- # If you find that your OS can't cope with mmap (compiles OKAY but refuses
- # to run and moans "httpd: Could not mmap memory" .. or similar) try
- # disabling use of shared memory for process management (scoreboard with
- # -DNO_MMAP) by uncommenting the line below:
- #NOMMAPCFLAG= -DNO_MMAP
- 
- # Status Instrumentation
- # In order for the status module to obtain full statistics Apache must
- # be modified to keep track of various information.  This is not
- # turned on by default. In order to enable full status details uncomment
- # the line below:
- #STATCFLAG= -DSTATUS
- 
- # Using SOCKS
- # Apache can be compiled to work over a SOCKS firewall by 
- # uncommenting the line below:
- #SOCKSCFLAG= -Dconnect=Rconnect -Dselect=Rselect -Dgethostbyname=Rgethostbyname
- 
- #
- # Also add the following to the EXTRA_LIBS define:
- #
- #  -L/usr/local/lib -lsocks
- #
- # making sure that -L points to wherever you've put libsocks.a.
- 
- # [Some other former Apache compile-time options are now treated differently;
- #  the virtual host code is always present; DBM auth is an optional module, and
- #  may be configured out by changing the module config below, though it still
- #  defaults in.  Note that this config file does not include DBM auth by
- #  default --- configure it in below if you need it].
- 
- # What level of optimization?
- OPTMCFLAG= -O2
- 
- # Add whatever other flags you'd like here... Like, maybe -Wall
- XTRACFLAG=
- 
- # Apache requires a POSIX regex implementation. Some/most platforms provide
- # this capability, but for those that don't, Apache provides, simply for
- # convenience, a regex implementation. The regex code is NOT official
- # Apache code and the Apache team does not support or guarantee the code.
- # If you want to use the supplied regex package, uncomment the following
- # line (or set it equal to the regex lib on your system). ALSO: If
- # using this _regex_ package, be sure to also uncomment REGINC as well
- #REGLIBS=regex/libregex.a
- #REGINC= -Iregex
- 
- # Default to using ranlib on libraries (for regex). Set this to something else
- # if ranlib kills your system (usually by setting it again in the OS specific
- # section below)
- RANLIB=ranlib
- 
- # Place here any flags you may need upon linking, such as a flag to
- # prevent dynamic linking (if desired)
- LFLAGS= 
  
! # Place here any extra libraries you may need to link to. 
! # -lndbm is commonly required for DBM auth, if that is configured in.
  EXTRA_LIBS=
  
! # Build CFLAGS
! CFLAGS= $(OPTMCFLAG) $(NOMMAPCFLAG) $(STATCFLAG) $(SOCKSCFLAG) $(XTRACFLAG)
  
  #
! # AUX_CFLAGS are system-specific control flags.
! # NOTE: IF YOU DO NOT CHOOSE ONE OF THESE, EDIT httpd.h AND CHOOSE
! # SETTINGS FOR THE SYSTEM FLAGS. IF YOU DON'T, BAD THINGS WILL HAPPEN.
! 
! # For SunOS 4
! #AUX_CFLAGS= -DSUNOS4
! # For Solaris 2.
! #AUX_CFLAGS= -DSOLARIS2
! #AUX_LIBS= -lsocket -lnsl
! # For SGI IRIX. Use the AUX_LIBS line if you're using NIS and want
! # user-supported directories
! #AUX_CFLAGS= -DIRIX
! #AUX_LIBS= -lsun
! # For HP-UX       n.b. if you use the paid-for HP CC compiler, use flag -Ae
! #AUX_CFLAGS= -DHPUX
! # For HP-UX 10
! #AUX_CFLAGS= -DHPUX10
! # For AIX
! #AUX_CFLAGS= -DAIX -U__STR__
! # For Ultrix
! #AUX_CFLAGS= -DULTRIX
! # For DEC OSF/1
! #AUX_CFLAGS= -DOSF1
! # For NeXT
! #AUX_CFLAGS= -DNEXT
! # For Sequent
! #AUX_CFLAGS= -DSEQUENT
! # For Linux -m486 ONLY IF YOU HAVE 486 BINARY SUPPORT IN KERNEL
! #AUX_CFLAGS= -DLINUX
! # For A/UX
! #AUX_CFLAGS= -DAUX -D_POSIX_SOURCE
! #AUX_LIBS= -lposix -lbsd -s
! # For SCO ODT 3
! # libcrypt_i available from sosco.sco.com, files /SLS/lng225b.Z and
! # /SLS/lng225b.ltr.Z
! # the -Oe option causes cc to die compiling mod_imap (using 3.0.0a of the dev sys)
! #CFLAGS= -Oacgiltz
! #AUX_CFLAGS= -DSCO
! #AUX_LIBS= -lPW -lsocket -lmalloc -lcrypt_i
! # For SCO OpenServer Release 5
! # -K noinline is needed to work around an optimiser bug which appears in
! # http_bprintf.c
! #AUX_CFLAGS= -DSCO5
! #AUX_LIBS=-lsocket -lmalloc -lprot
! #BROKEN_BPRINTF_FLAGS=-K noinline
! #RANLIB=true
! # For SVR4
! # Some SVR4 implementations will require SO_LINGER option to be set in order
! # to guarantee buffer flushes. Dell, Esix, and UnixWare are a few of these.
! # Use -DNEED_LINGER in addition to other AUX_CFLAGS for these.
! #AUX_CFLAGS= -DSVR4
! #AUX_LIBS= -lsocket -lnsl -lc
! # For UnixWare 2.x, no longer just SVR4 (sigh) - use cc, not gcc
! # AUX_LIBS= -lsocket -lnsl -lcrypt
! # For Amdahl UTS 2.1
! # -Xa enables ANSI mode, -eft is expanded types
! #AUX_CFLAGS= -Xa -eft -DUTS21
! #AUX_LIBS= -lsocket -lbsd -la
! # For HP/Apollo Domain/OS
! #AUX_CFLAGS= -DAPOLLO
! # For NetBSD/FreeBSD/BSDI 2.x
! # -m486 only if you are running on Intel 486/586
! #AUX_CFLAGS= -m486
! # BSDI doesn't need -lcrypt
! #AUX_LIBS= -lcrypt
! # For QNX
! #AUX_CFLAGS= -DQNX
! #AUX_LFLAGS= -N 0x20000
! # For LynxOS
! #AUX_CFLAGS= -DLYNXOS
! #EXTRA_LIBS=-lbsd -ldes -lc_p
! # For DG/UX 5.4
! #AUX_CFLAGS= -DDGUX
! #AUX_LIBS=
! 
! # For EMX OS/2 port
! #AUX_CFLAGS= -Zbsd-signals -Zbin-files
! #-DNO_KILLPG -DNEED_STRCASECMP -DNO_SETSID
! #-g
! #AUX_LIBS= -lsocket -llibufc -lgdbm -lbsd
  
  ################################################################
  # Module configuration
--- 1,58 ----
  # Config file for the Apache httpd.
  
  # Configuration.tmpl is the template for Configuration. Configuration should
! # be edited to select the modules to be included as well as various flags
! # for Makefile.
  
! # The template should only be changed when a new system or module is added,
! # or an existing one modified.
! 
! # There are 4 types of lines here:
  
  # '#' comments, distinguished by having a '#' as the first non-blank character
  #
! # Makefile options, such as CC=gcc, etc...
! #
! # Rules, distinquished by having a '!' as the first non-blank character.
! # These can be used to bypass Configure's "question and answer" if desired.
  #
  # Module selection lines, distinguished by having 'Module' at the front.
  # These list the configured modules, in priority order (highest priority
  # first).  They're down at the bottom.
  
  
! ################################################################
! # Makefile configuration
! #
! # These are added to the general flags determined by Configure.
! # Edit these to work around Configure if needed. The EXTRA_* family
! # will be added to the regular Makefile flags. At present, only
! # CC and OPTIM should be set here... all others are over-
! # ruled by Configure
! #
! EXTRA_CFLAGS=
! EXTRA_LFLAGS=
  EXTRA_LIBS=
+ EXTRA_INCLUDES=
  
! CC=gcc
! OPTIM=-O2
  
+ ################################################################
+ # Rules configuration
  #
! # These are used to let Configure know that we want certain
! # functions. The format is: !RULE=yes|no
! # At present, only the following RULES are known: REGEX, SOCKS and STATUS
! # if set to "yes" then Configure knows we want it, and doesn't
! # bother asking; if set to "no" then Configure knows we don't
! # want it, and doesn't ask. If set to something else, or absent,
! # Then Configure asks.
! #
! !REGEX=yes
! !STATUS=yes
! !SOCKS=no
! 
  
  ################################################################
  # Module configuration
Index: apache/src/Configure
===================================================================
RCS file: /export/home/cvs/apache/src/Configure,v
retrieving revision 1.6
diff -c -r1.6 Configure
*** Configure	1996/05/12 21:51:28	1.6
--- Configure	1996/07/31 02:23:55
***************
*** 1,8 ****
! #! /bin/sh
  
  # Apache configuration script, first cut --- rst.
  # Dont like it?  Inspired to do something better?  Go for it.
  
  file=Configuration
  tmpfile=htconf.$$
  
--- 1,13 ----
! #!/bin/sh
  
  # Apache configuration script, first cut --- rst.
  # Dont like it?  Inspired to do something better?  Go for it.
  
+ # second cut --- jmj
+ # At this point we change what Configuration contains. It should just
+ # be a list Modules to be included plus EXTRA_FLAGS and EXTRA_LIBS
+ # (as a catch-all).
+ 
  file=Configuration
  tmpfile=htconf.$$
  
***************
*** 13,33 ****
    echo "Using '$file' as config file"
  fi
  
! # First, strip comments and blank lines...
  
! sed 's/#.*//' $file | sed '/^[ 	]*$/d' | sed 's/[ 	]*$//' > $tmpfile
  
  # Check for syntax errors...
  
! if grep -v = $tmpfile | \
!    egrep -v '^Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' > /dev/null
  then
!    echo "Syntax error --- each config file command must either"
!    echo "set a Makefile option, or configure a module (giving a"
!    echo "module name and a filename).  This doesn't appear to be"
!    echo "doing either:"
!    grep -v = $tmpfile | \
!       egrep -v '^Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$'
     rm $tmpfile
     exit 1
  fi
--- 18,38 ----
    echo "Using '$file' as config file"
  fi
  
! # First, strip comments and blank lines and then change Rules to comments
  
! sed 's/#.*//' $file | sed '/^[ 	]*$/d' | sed 's/[ 	]*$//' | \
!  sed 's/^!/#/' > $tmpfile
  
  # Check for syntax errors...
  
! if egrep -v '^Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' $tmpfile | \
!    grep -v = > /dev/null
  then
!    echo "Syntax error --- The configuration file is used only to"
!    echo "define the list of included modules or to set Makefile"
!    echo "options or Configure rules, and I don't see that at all:"
!    egrep -v '^Module[ 	]+[A-Za-z0-9_]+[ 	]+[^ 	]+$' $tmpfile | \
!      grep -v =
     rm $tmpfile
     exit 1
  fi
***************
*** 65,70 ****
--- 70,78 ----
           print "};"; \
     }'
  
+ #
+ # Add module set only
+ #
  awk >Makefile <$tmpfile '\
     BEGIN { print "# Makefile automatically generated from Makefile.tmpl"; \
  	   print "# and configuration file by Apache config script. "; \
***************
*** 72,78 ****
  	   print "# is re-run."; \
           } \
     /^Module/ { modules[n++] = $3 } \
-    /\=/ { print } \
     END { print "MODULES=\\"; \
           for (i = 0; i < n; ++i) { \
               if (i < n-1) printf ("  %s \\\n", modules[i]); \
--- 80,85 ----
***************
*** 80,85 ****
--- 87,377 ----
           } \
           print "" \
         }'
+ #
+ # Now add Makefile additions and Rules
+ #
+ awk >>Makefile <$tmpfile ' /\=/ { print } '
+ 
+ #
+ # For now, we define RANLIB as 'ranlib'. It can be overriden below in the
+ # OS Specific section if we want
+ #
+ RANLIB="ranlib"
+ 
+ #
+ # print out with list of known platforms
+ #
+ echo " Known Apache Platforms:"
+ echo
+ echo "    1) A/UX 3.1.x           2) AIX                       3) Apollo"
+ echo "    4) DG/UX 5.4            5) EMX OS/2                  6) HP/UX"
+ echo "    7) HP/UX 10             8) IRIX                      9) Linux (-m486)"
+ echo "   10) LynxOS              11) NetBSD/FreeBSD/BSDI 2    12) NeXT"
+ echo "   13) OSF 1 (Dec)         14) QNX                      15) SCO ODT 3"
+ echo "   16) SCO ODT 5           17) Solaris 2                18) SunOS 4"
+ echo "   19) SVR4                20) UTS (Amdahl)"
+ echo
+ echo
+ echo "Which system is yours?"
+ read system
+ case $system in
+ # A/UX
+ 1)  OSCFLAGS="-DAUX -D_POSIX_SOURCE"
+     OSLIBS="-lposix -lbsd"
+     OSLFLAGS="-s"
+     ;;
+ # AIX
+ 2)  OSCFLAGS="-DAIX -U__STR__"
+     ;;
+ # Apollo
+ 3)  OSCFLAGS="-DAPOLLO"
+     ;;
+ # DG/UX 5.4
+ 4)  OSCFLAGS="-DDGUX"
+     ;;
+ # EMX OS/2
+ 5)  OSCFLAGS="-Zbsd-signals -Zbin-files -DNO_KILLPG -DNEED_STRCASECMP -DNO_SETSID -g"
+     OSLIBS="-lsocket -llibufc -lgdbm -lbsd"
+     ;;
+ # HP/UX
+ 6)  OSCFLAGS="-DHPUX"
+     ;;
+ # HP/UX 10
+ 7)  OSCFLAGS="-DHPUX10"
+     ;;
+ # IRIX
+ 8)  OSCFLAGS="-DIRIX"
+     echo
+     echo "================="
+     echo "  Will you be using NIS and user-supported directories? [Y/n]"
+     read answer
+     echo "================="
+     case $answer in
+     n*|N*) ;;
+     *) OSLIBS="-lsun"
+        ;;
+     esac
+     ;;
+ # Linux (-m486)
+ 9)  OSCFLAGS="-DLINUX"
+     ;;
+ # LynxOS
+ 10) OSCFLAGS="-DLYNXOS"
+     OSLIBS="-lbsd -ldes -lc_p"
+     ;;
+ # NetBSD/FreeBSD/BSDI 2
+ 11) echo
+     echo "================="
+     echo "  Are you running on an Intel 486? [Y/n]"
+     read answer
+     case $answer in
+     n*|N*) ;;
+     *) OSCFLAGS="-m486"
+        ;;
+     esac
+     echo "  Are you running BSDI? [y/N]"
+     read answer
+     echo "================="
+     case $answer in
+     n*|N*) OSLIBS="-lcrypt"
+         ;;
+     esac
+     ;;
+ # NeXT
+ 12) OSCFLAGS="-DNEXT"
+     ;;
+ # DEC OSF/1
+ 13) OSCFLAGS="-DOSF1"
+     ;;
+ # QNX
+ 14) OSCFLAGS="-DQNX"
+     OSLIBS="-N 0x20000"
+     ;;
+ # SCO ODT 3
+ 15) OSCFLAGS="-DSCO -Oacgiltz"
+     OSLIBS="-lPW -lsocket -lmalloc -lcrypt_i"
+     ;;
+ # SCO ODT 5
+ 16) OSCFLAGS="-DSCO5"
+     OSLIBS="-lsocket -lmalloc -lprot"
+     OSBPRINTF="-K noinline"
+     ;;
+ # Solaris 2
+ 17) OSCFLAGS="-DSOLARIS2"
+     OSLIBS="-lsocket -lnsl"
+     ;;
+ # SunOS 4
+ 18) OSCFLAGS="-DSUNOS4"
+     ;;
+ # SVR4
+ 19) OSCFLAGS="-DSVR4"
+     echo
+     echo "Are you running Unixware? [y/N]"
+     read answer
+     case $answer in
+     n*|N*) OSCFLAGS="-lsocket -lnsl -lc"
+         ;;
+     *)  OSCFLAGS="-lsocket -lnsl -lcrypt"
+         ;;
+     esac
+     ;;
+ # Amdahl UTS
+ 20) OSCFLAGS="-Xa -eft -DUTS21"
+     OSLIBS="-lsocket -lbsd -la"
+     ;;
+ # default
+ *)  echo
+     echo "Sorry, I do not understand \"$system\""
+     echo "Exiting..."
+     exit 1
+ esac
+ 
+ #
+ # Now that _that's_ done, get on with it
+ #
+ 
+ echo
+ echo "---------------"
+ #
+ # See if CC already set
+ #
+ if egrep "CC=" Makefile > /dev/null
+ then
+     :
+ else
+     COMPILER="gcc"
+     echo
+     echo "Compiler to use? [$COMPILER]"
+     read answer
+     case $answer in
+     "") ;;
+     *) COMPILER="$answer"
+        ;;
+     esac
+ fi
+ 
+ #
+ # Ditto for optimization
+ #
+ if  egrep "OPTIM=" Makefile > /dev/null
+ then
+     :
+ else
+     OPTIMIZATION="-O2"
+     echo "Optimization? [$OPTIMIZATION]"
+     read answer
+     case $answer in
+     "") ;;
+     *) OPTIMIZATION="$answer"
+        ;;
+     esac
+ fi
+ 
+ #
+ # Are they using the status monitor module?
+ #
+ if egrep mod_status Makefile > /dev/null
+ then
+    flag=0
+    if egrep "STATUS=yes" Makefile > /dev/null; then flag=1;fi
+    if egrep "STATUS=no" Makefile > /dev/null; then flag=2;fi
+    case $flag in
+    0)
+        echo "I see you are using the status_module"
+        echo "Would you like full status support? [Y/n]"
+        read answer
+        case $answer in
+        n*|N*) ;;
+        *)  STATFLAG="-DSTATUS"
+ 	   ;;
+        esac
+        ;;
+     1) STATFLAG="-DSTATUS"
+        ;;
+     esac
+ fi
+ 
+ #
+ # Now ask about REGEX if needed
+ #
+ flag=0
+ if egrep "REGEX=yes" Makefile > /dev/null; then flag=1;fi
+ if egrep "REGEX=no" Makefile > /dev/null; then flag=2;fi
+ case $flag in
+ 0)
+     echo "Do you want or need to use the included regex implementation? [Y/n]"
+     read answer
+     case $answer in
+ 	n*|N*) ;;
+ 	*)  REGLIB="regex/libregex.a"
+ 	    REGINC="-Iregex"
+ 	    ;;
+     esac
+     ;;
+ 1)
+     REGLIB="regex/libregex.a"
+     REGINC="-Iregex"
+     ;;
+ esac
+ 
+ #
+ # Now SOCKS
+ #
+ flag=0
+ if egrep "SOCKS=yes" Makefile > /dev/null; then flag=1;fi
+ if egrep "SOCKS=no" Makefile > /dev/null; then flag=2;fi
+ case $flag in
+ 0)
+     echo "Are you using SOCKS? [y/N]"
+     read answer
+     case $answer in
+     y*|Y*) SOCKFLAG="-Dconnect=Rconnect -Dselect=Rselect -Dgethostbyname=Rgethostbyname"
+ 	SOCKLIB="-L/usr/local/lib"
+ 	echo "Where is -lsocks? [$SOCKLIB]"
+ 	read answer
+ 	case $answer in
+ 	"") SOCKLIB="$SOCKLIB -lsocks"
+ 	    ;;
+ 	 *) SOCKLIB="$answer -lsocks"
+ 	    ;;
+ 	 esac
+ 	;;
+     *)  ;;
+     esac
+     ;;
+ 1)
+     # Assume the above is OK :/
+     SOCKFLAG="-Dconnect=Rconnect -Dselect=Rselect -Dgethostbyname=Rgethostbyname"
+     SOCKLIB="-L/usr/local/lib"
+     ;;
+ esac
+ 
+ #
+ # Good enough
+ #
+ CFLAGS="$STATFLAG $SOCKFLAG $OSCFLAGS"
+ LIBS="$SOCKLIB $OSLIBS"
+ INCLUDES="$REGINC $OSINCLUDES"
+ LFLAGS="$OSLFLAGS"
+ 
+ case "$COMPILER" in
+     "") ;;
+     *)echo "CC=$COMPILER" >> Makefile;;
+ esac
+ case "$OPTIMIZATION" in
+     "") ;;
+     *)echo "OPTIM=$OPTIMIZATION" >> Makefile;;
+ esac
+ echo "CFLAGS1=$CFLAGS">> Makefile
+ echo "INCLUDES1=$INCLUDES">> Makefile
+ echo "LIBS1=$LIBS">> Makefile
+ echo "LFLAGS1=$LFLAGS">> Makefile
+ echo "BROKEN_BPRINTF_FLAGS=$OSBPRINTF">> Makefile
+ echo "REGLIB=$REGLIB">> Makefile
+ echo "RANLIB=$RANLIB">>Makefile
+ echo "">> Makefile
+ echo "# End of Configure created section">> Makefile
+ echo "">> Makefile
  
  cat Makefile.tmpl >> Makefile
  rm $tmpfile
Index: apache/src/Makefile.tmpl
===================================================================
RCS file: /export/home/cvs/apache/src/Makefile.tmpl,v
retrieving revision 1.19
diff -c -r1.19 Makefile.tmpl
*** Makefile.tmpl	1996/07/30 19:36:58	1.19
--- Makefile.tmpl	1996/07/31 02:23:55
***************
*** 3,14 ****
  # This is combined with the information in the "Configuration" file
  # by the configure script to make the actual Makefile.
  
  OBJS= alloc.o http_main.o http_core.o http_config.o http_request.o \
    http_log.o http_protocol.o rfc1413.o util.o util_script.o modules.o buff.o\
    md5c.o util_md5.o explain.o http_bprintf.o $(MODULES)
  
  .c.o:
! 	$(CC) -c $(REGINC) $(CFLAGS) $(AUX_CFLAGS) $<
  
  all: Configuration httpd
  
--- 3,19 ----
  # This is combined with the information in the "Configuration" file
  # by the configure script to make the actual Makefile.
  
+ CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_FLAGS)
+ LIBS=$(EXTRA_LIBS) $(LIBS1)
+ INCLUDES=$(INCLUDES1) $(EXTRA_INCLUDES)
+ LFLAGS=$(LFLAGS1) $(EXTRA_LFLAGS)
+ 
  OBJS= alloc.o http_main.o http_core.o http_config.o http_request.o \
    http_log.o http_protocol.o rfc1413.o util.o util_script.o modules.o buff.o\
    md5c.o util_md5.o explain.o http_bprintf.o $(MODULES)
  
  .c.o:
! 	$(CC) -c $(INCLUDES) $(CFLAGS) $<
  
  all: Configuration httpd
  
***************
*** 19,29 ****
  	@echo "If not, you will at least have to touch Configuration."
  	@false
  
! httpd: $(REGLIBS) $(OBJS)
! 	$(CC) $(LFLAGS) $(AUX_LFLAGS) -o httpd $(OBJS) $(REGLIBS) $(EXTRA_LIBS) $(AUX_LIBS)
  
  regex/libregex.a:
! 	cd regex; make lib CC=$(CC) AUX_CFLAGS="$(CFLAGS) $(AUX_CFLAGS)" RANLIB=$(RANLIB)
  
  clean:
  	rm -f httpd $(OBJS) *pure*
--- 24,34 ----
  	@echo "If not, you will at least have to touch Configuration."
  	@false
  
! httpd: $(REGLIB) $(OBJS)
! 	$(CC) $(LFLAGS)  -o httpd $(OBJS) $(REGLIB) $(LIBS)
  
  regex/libregex.a:
! 	cd regex; make lib CC=$(CC) AUX_CFLAGS="$(CFLAGS)" RANLIB=$(RANLIB)
  
  clean:
  	rm -f httpd $(OBJS) *pure*
***************
*** 38,44 ****
  
  # Work around broken compilers
  http_bprintf.o: http_bprintf.c
! 	$(CC) -c $(REGINC) $(CFLAGS) $(AUX_CFLAGS) $(BROKEN_BPRINTF_FLAGS) http_bprintf.c
  
  #Dependencies
  #Core code
--- 43,49 ----
  
  # Work around broken compilers
  http_bprintf.o: http_bprintf.c
! 	$(CC) -c $(INCLUDES) $(CFLAGS) $(BROKEN_BPRINTF_FLAGS) http_bprintf.c
  
  #Dependencies
  #Core code

-- 
Jim Jagielski  << jim@jaguNET.com >>   |   "There is a time for laughing,
  **  jaguNET Access Services  **      |    and a time for not laughing,
      Email: info@jaguNET.com          |    and this is not one of them"
++    http://www.jaguNET.com/         +++      Voice/Fax: 410-931-3157       ++

Mime
View raw message