You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rs...@hyperreal.org on 1998/10/27 11:20:16 UTC

cvs commit: apache-1.3 configure INSTALL

rse         98/10/27 02:20:15

  Modified:    src      CHANGES
               .        configure INSTALL
  Log:
  Add APACI --permute-module=foo:bar option which can be used to
  on-the-fly/batch permute the order of two modules (mod_foo and mod_bar)
  in the Configuration[.apaci] file. Two special and important variants are
  supported for the option argument: first BEGIN:foo which permutes module
  mod_foo with the begin of the module list, i.e. it `moves' the module to
  the begin of the list (gives it lowest priority).  And second foo:END
  which permutes mod_foo with the end of the module list, i.e. it `moves'
  the module to the end of the list (gives it highest priority).
  
  Notice:
  The way it is implemented looks a little bit too complicated but has to be
  done this way because of portability reasons.  And this implementation is now
  already tested by me for portability under the following platforms:
   o FreeBSD 2.2.2
   o Debian GNU/Linux 1.3/2.0.35
   o Solaris 2.5.1
   o SunOS 4.1.3
  
  Revision  Changes    Path
  1.1125    +10 -0     apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1124
  retrieving revision 1.1125
  diff -u -r1.1124 -r1.1125
  --- CHANGES	1998/10/26 21:30:17	1.1124
  +++ CHANGES	1998/10/27 10:20:00	1.1125
  @@ -1,5 +1,15 @@
   Changes with Apache 1.3.4
   
  +  *) Add APACI --permute-module=foo:bar option which can be used to
  +     on-the-fly/batch permute the order of two modules (mod_foo and mod_bar)
  +     in the Configuration[.apaci] file. Two special and important variants are
  +     supported for the option argument: first BEGIN:foo which permutes module
  +     mod_foo with the begin of the module list, i.e. it `moves' the module to
  +     the begin of the list (gives it lowest priority).  And second foo:END
  +     which permutes mod_foo with the end of the module list, i.e. it `moves'
  +     the module to the end of the list (gives it highest priority). 
  +     [Ralf S. Engelschall]
  +
     *) Fix problem with 'apache -k shutdown' and startup event
        synchronisation (Win32).  [Ken Parzygnat <kp...@raleigh.ibm.com>]
        PR#3255
  
  
  
  1.49      +103 -1    apache-1.3/configure
  
  Index: configure
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/configure,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- configure	1998/09/17 08:07:53	1.48
  +++ configure	1998/10/27 10:20:12	1.49
  @@ -75,6 +75,7 @@
   aux=src/helpers
   sedsubst=src/.apaci.sedsubst
   addconf=src/.apaci.addconf
  +tplconf=src/.apaci.tplconf
   configstatus=config.status
   
   ##
  @@ -203,6 +204,9 @@
   #   with adjustments
   confadjust=1
   
  +#   module ordering
  +permute=''
  +
   #   determine rules
   rules=""
   rulelist=""
  @@ -357,6 +361,7 @@
               shadowaux="src.$gnutriple/helpers"
               shadowsedsubst="src.$gnutriple/.apaci.sedsubst"
               shadowaddconf="src.$gnutriple/.apaci.addconf"
  +            shadowtplconf="src.$gnutriple/.apaci.tplconf"
               #   (re)create shadow tree
               if [ .$quiet = .no ]; then
                   echo " + create shadow tree ($shadowsrc)"
  @@ -372,6 +377,7 @@
               addconf=$shadowaddconf
               rm -f $addconf 2>/dev/null
               touch $addconf
  +            tplconf=$shadowtplconf
               ;;
           --help | -h | -help )
               echo "Usage: configure [options]"
  @@ -407,6 +413,7 @@
               $aux/ppl.sh $rulelist
               echo " --add-module=FILE      on-the-fly copy & activate a third-party Module source"
               echo " --activate-module=FILE on-the-fly activate existing third-party Module source"
  +            echo " --permute-module=N1:N2 permute module 'N1' with module 'N2' in the configuration"
               echo " --enable-module=NAME   enable  a particular Module named 'NAME'"
               echo " --disable-module=NAME  disable a particular Module named 'NAME'"
               $aux/ppl.sh $modulelist
  @@ -693,6 +700,29 @@
                       ;;
               esac
               ;;
  +        --permute-module=*:*)
  +            mod1=`echo $apc_optarg | sed -e 's/:.*//'`
  +            mod2=`echo $apc_optarg | sed -e 's/.*://'`
  +            for mod in $mod1 $mod2; do
  +                case $mod in
  +                    BEGIN|END)
  +                        ;;
  +                    *)  eval "exists=\$module_${mod}" 
  +                        if [ ".$exists" = . ]; then
  +                            echo "configure:Error: No such module named '${mod}'" 1>&2
  +                            exit 1
  +                        fi
  +                        ;;
  +                esac
  +            done
  +            case $mod1:$mod2 in
  +                BEGIN:END|*:BEGIN|END:*)
  +                    echo "configure:Error: Invalid combination of pseudo module identifiers" 1>&2
  +                    exit 1
  +                    ;;
  +            esac
  +            permute="${permute},${mod1}:${mod2}"
  +            ;;
           --with-perl=*)
               PERL="$apc_optarg"
               ;;
  @@ -1008,6 +1038,77 @@
       exit 1
   fi
   
  +#   module permutation support
  +if [ ".$permute" != . ]; then
  +    sed -e '/## mod_mmap_static/,$d' <src/Configuration.tmpl >$tplconf
  +    OIFS="$IFS" IFS='
  +'
  +    for line in `cat src/Configuration.tmpl $addconf | egrep '^[# ]*(Add|Shared)Module'`; do
  +        name=`echo "$line" |\
  +              sed -e 's%^.*/\(.*\)$%\1%' \
  +                  -e 's/\.[oa]$//' \
  +                  -e 's/^mod_//' \
  +                  -e 's/^lib//'`
  +        echo "${name}:${line}"
  +    done |\
  +    $AWK -F: '
  +        BEGIN { 
  +            n = 0; 
  +        }
  +        { 
  +            module_pos[$1]  = n; 
  +            module_list[n]  = $1; 
  +            module_line[$1] = $2;
  +            n++; 
  +        }
  +        END {
  +            pn = split(permute, perm, ",");
  +            for (p = 1; p <= pn; p++) {
  +                split(perm[p], m, ":")
  +                m1 = m[1];
  +                m2 = m[2];
  +                if (m1 == "BEGIN") {
  +                    for (i = module_pos[m2]-1; i >= 0; i--) {
  +                        n1 = module_list[i];
  +                        n2 = module_list[i+1];
  +                        module_list[i]   = n2;
  +                        module_list[i+1] = n1;
  +                        module_pos[n1]   = i+1;
  +                        module_pos[n2]   = i;
  +                    }
  +                }
  +                else if (m2 == "END") {
  +                    for (i = module_pos[m1]; i < n-1; i++) {
  +                        n1 = module_list[i];
  +                        n2 = module_list[i+1];
  +                        module_list[i]   = n2;
  +                        module_list[i+1] = n1;
  +                        module_pos[n1]   = i+1;
  +                        module_pos[n2]   = i;
  +                    }
  +                }
  +                else {
  +                    p1 = module_pos[m1];
  +                    p2 = module_pos[m2];
  +                    n1 = module_list[p1];
  +                    n2 = module_list[p2];
  +                    module_list[p1] = n2;
  +                    module_list[p2] = n1;
  +                    module_pos[m1] = p2;
  +                    module_pos[m2] = p1;
  +                }
  +            }
  +            for (i = 0; i < n; i++) {
  +                name = module_list[i];
  +                printf("%s\n", module_line[name]);
  +            }
  +        }
  +    ' "permute=$permute" >>$tplconf
  +    IFS="$OIFS"
  +else
  +    cat $src/Configuration.tmpl $addconf >$tplconf
  +fi
  +
   #   generate module directives
   OIFS="$IFS" IFS=':'
   for module in $modules; do
  @@ -1056,11 +1157,12 @@
   
   #   and finally translate the config template 
   #   according to our defined configuration
  -eval "cat $src/Configuration.tmpl $addconf | $substcmd >$src/Configuration.apaci"
  +eval "cat $tplconf | $substcmd >$src/Configuration.apaci"
   
   #   cleanup
   rm -f $sedsubst $sedsubst.[0-9] 2>/dev/null
   rm -f $addconf 2>/dev/null
  +rm -f $tplconf 2>/dev/null
   
   ##
   ##  create all other Makefiles by running the proprietary 
  
  
  
  1.45      +20 -10    apache-1.3/INSTALL
  
  Index: INSTALL
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/INSTALL,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- INSTALL	1998/10/03 13:26:02	1.44
  +++ INSTALL	1998/10/27 10:20:13	1.45
  @@ -149,18 +149,19 @@
                                  [--mandir=DIR]         [--disable-module=NAME] 
                                  [--sysconfdir=DIR]     [--enable-shared=NAME]  
                                  [--datadir=DIR]        [--disable-shared=NAME] 
  -                               [--includedir=DIR]     
  -                               [--localstatedir=DIR]  [--enable-suexec]     
  -                               [--runtimedir=DIR]     [--suexec-caller=UID] 
  -                               [--logfiledir=DIR]     [--suexec-userdir=DIR]
  -                               [--proxycachedir=DIR]  [--suexec-uidmin=UID]
  -                               [--compat]             [--suexec-gidmin=GID]
  +                               [--includedir=DIR]     [--permute-module=N1:N2]
  +                               [--localstatedir=DIR]  
  +                               [--runtimedir=DIR]     [--enable-suexec]        
  +                               [--logfiledir=DIR]     [--suexec-caller=UID]    
  +                               [--proxycachedir=DIR]  [--suexec-userdir=DIR]   
  +                               [--compat]             [--suexec-uidmin=UID]    
  +                                                      [--suexec-gidmin=GID]    
                                                         [--suexec-safepath=PATH] 
  +                                                                                
  +                                                      [--with-perl=FILE]       
  +                                                      [--without-support]      
  +                                                      [--without-confadjust]   
   
  -                                                      [--with-perl=FILE]   
  -                                                      [--without-support]  
  -                                                      [--without-confadjust]
  -
        Use the CC, OPTIM, CFLAGS, INCLUDES, LDFLAGS, LIBS, CFLAGS_SHLIB,
        LD_SHLIB, LDFLAGS_SHLIB, LDFLAGS_SHLIB_EXPORT and RANLIB environment
        variables to override the corresponding default entries in the
  @@ -339,6 +340,15 @@
                    --enable-shared for some modules on these platforms you also
                    have to enable the SHARED_CORE rule. For more details please
                    read the document `htdocs/manual/dso.html'.
  +
  +     Use the --permute-module=N1:N2 option to permutate the AddModule lines of
  +     modules mod_N1 and mod_N2 in the Configuration file. This way one can
  +     give modules different priorities.  Two special and important variants
  +     are supported for the option argument: first BEGIN:N which permutes
  +     module mod_N with the begin of the module list, i.e. it `moves' the
  +     module to the begin of the list (gives it lowest priority).  And second
  +     N:END which permutes mod_N with the end of the module list, i.e. it
  +     `moves' the module to the end of the list (gives it highest priority).
   
        Use the --with-perl=FILE option to select a particular Perl interpreter
        executable to be used with Apache. Per default APACI tries to find it