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 1999/08/12 13:24:51 UTC

cvs commit: apache-2.0/mpm config.option configure

rse         99/08/12 04:24:50

  Modified:    mpm      configure
  Added:       mpm      config.option
  Log:
  It was stated that Apache/mpm is for hacking, so I felt free to impliment
  something I always wanted for APACI: a config.option file similar to
  config.layout which allows one to load pre-defined options via
  --with-option=ID.  Because I got tired of having staying around lots of small
  config.status.<foo> files in my source trees.  This way one can put all their
  stuff into one file _AND_ their shared parts are only there _ONCE_ in order to
  reduce redundancy...
  
  Revision  Changes    Path
  1.6       +40 -1     apache-2.0/mpm/configure
  
  Index: configure
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/configure,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- configure	1999/08/12 08:22:34	1.5
  +++ configure	1999/08/12 11:24:49	1.6
  @@ -82,6 +82,7 @@
   tplconf=src/.apaci.tplconf
   pldconf=src/.apaci.pldconf
   configlayout=config.layout
  +configoption=config.option
   configstatus=config.status
   shadow=''
   
  @@ -478,6 +479,43 @@
               name_layout=$name
               with_layout=1
               ;;
  +        --with-option=*)
  +            case $apc_optarg in
  +                *:* ) 
  +                    file=`echo $apc_optarg | sed -e 's/:.*//'`
  +                    name=`echo $apc_optarg | sed -e 's/.*://'`
  +                    ;;
  +                * ) 
  +                    name=$apc_optarg
  +                    file=$configoption
  +                    ;;
  +            esac
  +            if [ ! -f "$file" ]; then
  +                echo "configure:Error: Option definition file $file not found" 1>&2
  +                exit 1
  +            fi
  +            echo "loadopt=''" >$pldconf
  +            sed -e "1,/[ 	]*<[Oo]ption[ 	]*common[ 	]*>[ 	]*/d" \
  +                -e '/[ 	]*<\/[Oo]ption>[ 	]*/,$d' \
  +                -e 's/^[ 	]*//g' \
  +                -e 's/^\(--.*=.*\)$/loadopt="$loadopt \1"/' \
  +                $file >>$pldconf
  +            sed -e "1,/[ 	]*<[Oo]ption[ 	]*$name[ 	]*>[ 	]*/d" \
  +                -e '/[ 	]*<\/[Oo]ption>[ 	]*/,$d' \
  +                -e 's/^[ 	]*//g' \
  +                -e 's/^\(--.*=.*\)$/loadopt="$loadopt \1"/' \
  +                $file >>$pldconf
  +            . $pldconf
  +            if [ "x$*" = "x" ]; then
  +                set -- $loadopt
  +            else
  +                set -- "$@" $loadopt
  +            fi
  +            rm -f $pldconf 2>/dev/null
  +            if [ "x$quiet" = "xno" ]; then
  +                echo " + loaded configuration options: $name ($file)"
  +            fi
  +            ;;
           *)
               ;;
       esac
  @@ -505,7 +543,7 @@
       esac
       #  accept only the most important GNU Autoconf-style options
       case "$apc_option" in
  -        --help|-h|-help|--with-layout=*|-compat)
  +        --help|-h|-help|--with-layout=*|--with-option=*|-compat)
               #   just ignore already parsed options
               ;;
           --quiet | --silent) 
  @@ -983,6 +1021,7 @@
   for arg
   do
       echo "$arg" |\
  +    grep -v '^--with-option' |\
       sed -e 's:\(["$\\]\):\\\1:g' \
           -e 's:^:":' \
           -e 's:$:" \\:' >>$configstatus
  
  
  
  1.1                  apache-2.0/mpm/config.option
  
  Index: config.option
  ===================================================================
  ##
  ##  config.option -- APACI Pre-defined Configuration Options
  ##  Hints: options can be loaded with APACI's --with-option=ID
  ##
  
  #   Common standard options
  #   (these are loaded first)
  <Option common>
      OPTIM='-pipe -O2'
      --with-layout=GNU
      --target=apache
      --prefix=/tmp/apache-mpm
      --disable-module=status
      --disable-module=include
      --disable-module=cgi
  </Option>
  
  #   prefork MPM
  #   (the good old Apache 1.3 preforking process model)
  <Option mpm-prefork>
      --set-rule=MPM_METHOD:prefork
  </Option>
  
  #   dexter MPM with GNU Pth
  #   (a portable variant of the hybrid (preforking/prethreading) model)
  #   assumptions: 
  #   - Pth source tree was extracted to apache-mpm/pth/
  #   - Pth was configured with ``--enable-pthread --enable-syscall-soft''
  #   - Pth was already build (but has not to be installed)
  <Option mpm-dexter-pth>
      CFLAGS='-I\$(SRCDIR)/../../pth -DPTHREAD_EVERYWHERE -DNO_SERIALIZED_ACCEPT'
      LDFLAGS='-L\$(SRCDIR)/../../pth/.libs'
      LIBS=-lpthread
      --set-rule=MPM_METHOD:dexter
  </Option>
  
  #   dexter MPM with FreeBSD's uthread and RSE's poll emulation
  #   (a FreeBSD specific variant of the hybrid (preforking/prethreading) model)
  #   assumptions: 
  #   - FreeBSD uthread is available in libc_r and cc knows ``-pthread''
  #   - RSE's poll(2) emulation library stays in apache-apr/poll/
  #   - RSE's poll(2) emulation library was already build
  <Option mpm-dexter-uthread>
      CC=cc
      CFLAGS='-pthread -I\$(SRCDIR)/../../../apache-apr/poll -DNO_SERIALIZED_ACCEPT'
      LDFLAGS='-pthread -L\$(SRCDIR)/../../../apache-apr/poll'
      LIBS=-lpoll
      --set-rule=MPM_METHOD:dexter
  </Option>