You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Ben Laurie <be...@hyperreal.com> on 1996/09/08 15:52:42 UTC

cvs commit: apache/src CutRule Configuration.tmpl Configure

ben         96/09/08 06:52:41

  Modified:    src       Configuration.tmpl Configure
  Added:       src       CutRule
  Log:
  Make HSREGEX and BADMMAP per-platform configurable, with override. Tidy up the
  way rules are parsed as a side-effect.
  
  Revision  Changes    Path
  1.33      +7 -3      apache/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===================================================================
  RCS file: /export/home/cvs/apache/src/Configuration.tmpl,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -C3 -r1.32 -r1.33
  *** Configuration.tmpl	1996/08/21 18:40:00	1.32
  --- Configuration.tmpl	1996/09/08 13:52:39	1.33
  ***************
  *** 1,4 ****
  ! # $Id: Configuration.tmpl,v 1.32 1996/08/21 18:40:00 akosut Exp $
    # Config file for the Apache httpd.
    
    # Configuration.tmpl is the template for Configuration. Configuration should
  --- 1,4 ----
  ! # $Id: Configuration.tmpl,v 1.33 1996/09/08 13:52:39 ben Exp $
    # Config file for the Apache httpd.
    
    # Configuration.tmpl is the template for Configuration. Configuration should
  ***************
  *** 86,95 ****
    #  this to 'yes'.
    #  
    #
  - Rule HSREGEX=yes
    Rule STATUS=yes
    Rule SOCKS=no
  ! Rule BADMMAP=no
    
    ###############
    #
  --- 86,99 ----
    #  this to 'yes'.
    #  
    #
    Rule STATUS=yes
    Rule SOCKS=no
  ! 
  ! # 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
  ! # your platform) you may override them here.
  ! Rule HSREGEX=default
  ! Rule BADMMAP=default
    
    ###############
    #
  
  
  
  1.14      +47 -5     apache/src/Configure
  
  Index: Configure
  ===================================================================
  RCS file: /export/home/cvs/apache/src/Configure,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -C3 -r1.13 -r1.14
  *** Configure	1996/08/21 18:40:02	1.13
  --- Configure	1996/09/08 13:52:39	1.14
  ***************
  *** 1,5 ****
    #!/bin/sh
  ! # $Id: Configure,v 1.13 1996/08/21 18:40:02 akosut Exp $
    trap 'rm $tmpfile; exit' 0 1 2 3 15
    
    # Apache configuration script, first cut --- rst.
  --- 1,5 ----
    #!/bin/sh
  ! # $Id: Configure,v 1.14 1996/09/08 13:52:39 ben Exp $
    trap 'rm $tmpfile; exit' 0 1 2 3 15
    
    # Apache configuration script, first cut --- rst.
  ***************
  *** 105,116 ****
  --- 105,124 ----
    # options) as required. Setting CC and OPTIM here has no effect
    # if they were set in Configure.
    #
  + # Also, we set DEF_HSREGEX and DEF_BADMMAP to the appropriate value for each
  + # platform.
  + #
    # As more PLATFORMs are added to Configuration.tmpl, be sure to
    # add the required lines below.
    #
    
    PLAT=`grep "PLATFORM=" Makefile | awk '{ print $1 }' | awk -F= '{ print $2 }'`
    
  + if [ "$PLAT" = "" ]; then
  + 	echo "PLATFORM has not been set!"
  + 	exit 1
  + fi
  + 
    case "$PLAT" in
        A/UX)
    	OS='A/UX 3.1.x'
  ***************
  *** 199,204 ****
  --- 207,214 ----
    	CFLAGS="$CFLAGS -DSCO5"
    	LIBS="$LIBS -lsocket -lmalloc -lprot"
    	OSBPRINTF=" -K noinline"
  + 	DEF_HSREGEX=no
  + 	DEF_BADMMAP=no
    	;;
        SOLARIS2)
    	OS='Solaris 2'
  ***************
  *** 233,244 ****
  --- 243,286 ----
    	;;
    esac
    
  + # Extract the rules
  + 
  + RULE_HSREGEX=`CutRule HSREGEX`
  + RULE_STATUS=`CutRule STATUS`
  + RULE_SOCKS=`CutRule SOCKS`
  + RULE_BADMMAP=`CutRule BADMMAP`
  + 
  + if [ "$RULE_HSREGEX" = "default" ]; then
  + 	if [ "$DEF_HSREGEX" = "" ]; then
  + 		RULE_HSREGEX=no
  + 	else
  + 		RULE_HSREGEX=$DEF_HSREGEX
  + 	fi
  + fi
  + 
  + if [ "$RULE_BADMMAP" = "default" ]; then
  + 	if [ "$DEF_BADMMAP" = "" ]; then
  + 		RULE_BADMMAP=no
  + 	else
  + 		RULE_BADMMAP=$DEF_BADMMAP
  + 	fi
  + fi
  + 
  + # Show the final values of the rules
  + 
  + echo "# Platform: $OS" >> Makefile
  + echo "# Final Rules:" >> Makefile
  + echo "# Rule HSREGEX=$RULE_HSREGEX" >> Makefile
  + echo "# Rule BADMMAP=$RULE_BADMMAP" >> Makefile
  + echo "###############" >> Makefile
  + 
    #
    # Now that _that's_ done, get on with it
    #
    
    echo "Configured for $OS platform"
    echo
  + 
    #
    # Handle the setting of CC and OPTIM. The values in Configure
    # have priority. If not set there, then we check if they were
  ***************
  *** 266,272 ****
    #
    STAT_MOD="mod_status"
    if grep "$STAT_MOD" Makefile > /dev/null; then
  !     if grep "Rule:STATUS=yes" Makefile > /dev/null; then
    	CFLAGS="$CFLAGS -DSTATUS"
        fi
    fi
  --- 308,314 ----
    #
    STAT_MOD="mod_status"
    if grep "$STAT_MOD" Makefile > /dev/null; then
  !     if [ "$RULE_STATUS" = "yes" ]; then
    	CFLAGS="$CFLAGS -DSTATUS"
        fi
    fi
  ***************
  *** 274,280 ****
    #
    # Now HS's POSIX regex implementation if needed/wanted
    #
  ! if grep "Rule:HSREGEX=yes" Makefile > /dev/null; then
        REGLIB="regex/libregex.a"
        INCLUDES="$INCLUDES -Iregex"
    fi
  --- 316,322 ----
    #
    # Now HS's POSIX regex implementation if needed/wanted
    #
  ! if [ "$RULE_HSREGEX" = "yes" ]; then
        REGLIB="regex/libregex.a"
        INCLUDES="$INCLUDES -Iregex"
    fi
  ***************
  *** 282,288 ****
    #
    # Broken mmap?
    #
  ! if grep "Rule:BADMMAP=yes" Makefile > /dev/null; then
        CFLAGS="$CFLAGS -DNO_MMAP"
    fi
    
  --- 324,330 ----
    #
    # Broken mmap?
    #
  ! if [ "$RULE_BADMMAP" = "yes" ]; then
        CFLAGS="$CFLAGS -DNO_MMAP"
    fi
    
  ***************
  *** 292,298 ****
    #   adjusted EXTRA_LIBS and/or EXTRA_LFLAGS as required,
    #   otherwise we assume "-L/usr/local/lib -lsocks"
    #
  ! if grep "Rule:SOCKS=yes" Makefile > /dev/null; then
        # Set flag and check Makefile for -lsocks line
        CFLAGS="$CFLAGS -Dconnect=Rconnect -Dselect=Rselect"
        CFLAGS="$CFLAGS -Dgethostbyname=Rgethostbyname"
  --- 334,340 ----
    #   adjusted EXTRA_LIBS and/or EXTRA_LFLAGS as required,
    #   otherwise we assume "-L/usr/local/lib -lsocks"
    #
  ! if [ "$RULE_SOCKS" = "yes" ]; then
        # Set flag and check Makefile for -lsocks line
        CFLAGS="$CFLAGS -Dconnect=Rconnect -Dselect=Rselect"
        CFLAGS="$CFLAGS -Dgethostbyname=Rgethostbyname"