You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by aa...@apache.org on 2002/03/06 19:48:22 UTC

cvs commit: httpd-2.0 acinclude.m4 configure.in

aaron       02/03/06 10:48:22

  Modified:    .        acinclude.m4 configure.in
  Log:
  Fix a problem in the new --enable-layout functionality where
  it wouldn't allow overrides from variables like --prefix,
  --bindir, etc.
  
  Obtained from:  Partly from an autoconf-generated configure script.
  Submitted by:	Thom May <th...@planetarytramp.net>
  Reviewed by:	Aaron Bannert, Justin Erenkrantz
  
  Revision  Changes    Path
  1.114     +139 -0    httpd-2.0/acinclude.m4
  
  Index: acinclude.m4
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/acinclude.m4,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- acinclude.m4	28 Feb 2002 01:38:11 -0000	1.113
  +++ acinclude.m4	6 Mar 2002 18:48:22 -0000	1.114
  @@ -350,6 +350,24 @@
   ])dnl
   
   dnl
  +dnl APACHE_ENABLE_LAYOUT
  +dnl
  +AC_DEFUN(APACHE_ENABLE_LAYOUT,[
  +AC_ARG_ENABLE(layout,
  +[  --enable-layout=LAYOUT],[
  +  LAYOUT=$enableval
  +])
  +
  +if test -z "$LAYOUT"; then
  +  LAYOUT="Apache"
  +fi
  +APACHE_LAYOUT($srcdir/config.layout, $LAYOUT)
  +
  +AC_MSG_CHECKING(for chosen layout)
  +AC_MSG_RESULT($layout_name)
  +])
  +
  +dnl
   dnl APACHE_ENABLE_MODULES
   dnl
   AC_DEFUN(APACHE_ENABLE_MODULES,[
  @@ -497,3 +515,124 @@
   fi
   ])
   
  +dnl
  +dnl APACHE_PARSE_ARGUMENTS
  +dnl a reimplementation of autoconf's argument parser,
  +dnl used here to allow us to co-exist layouts and argument based
  +dnl set ups.
  +AC_DEFUN(APACHE_PARSE_ARGUMENTS,[
  +ac_prev=
  +for ac_option
  +do
  +  # If the previous option needs an argument, assign it.
  +  if test -n "$ac_prev"; then
  +    eval "$ac_prev=\$ac_option"
  +    ac_prev=
  +    continue
  +  fi
  +
  +  ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
  +
  +  case $ac_option in
  +
  +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
  +    ac_prev=bindir ;;
  +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  +    bindir=$ac_optarg ;;
  +
  +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  +    ac_prev=datadir ;;
  +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  +  | --da=*)
  +    datadir=$ac_optarg ;;
  +
  +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  +  | --exec | --exe | --ex)
  +    ac_prev=exec_prefix ;;
  +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  +  | --exec=* | --exe=* | --ex=*)
  +    exec_prefix=$ac_optarg ;;
  +
  +  -includedir | --includedir | --includedi | --included | --include \
  +  | --includ | --inclu | --incl | --inc)
  +    ac_prev=includedir ;;
  +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  +  | --includ=* | --inclu=* | --incl=* | --inc=*)
  +    includedir=$ac_optarg ;;
  +
  +  -infodir | --infodir | --infodi | --infod | --info | --inf)
  +    ac_prev=infodir ;;
  +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  +    infodir=$ac_optarg ;;
  +
  +  -libdir | --libdir | --libdi | --libd)
  +    ac_prev=libdir ;;
  +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
  +    libdir=$ac_optarg ;;
  +
  +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  +  | --libexe | --libex | --libe)
  +    ac_prev=libexecdir ;;
  +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  +  | --libexe=* | --libex=* | --libe=*)
  +    libexecdir=$ac_optarg ;;
  +
  +  -localstatedir | --localstatedir | --localstatedi | --localstated \
  +  | --localstate | --localstat | --localsta | --localst \
  +  | --locals | --local | --loca | --loc | --lo)
  +    ac_prev=localstatedir ;;
  +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  +    localstatedir=$ac_optarg ;;
  +
  +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  +    ac_prev=mandir ;;
  +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  +    mandir=$ac_optarg ;;
  +
  +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  +    ac_prev=prefix ;;
  +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  +    prefix=$ac_optarg ;;
  +
  +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  +    ac_prev=sbindir ;;
  +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  +  | --sbi=* | --sb=*)
  +    sbindir=$ac_optarg ;;
  +
  +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  +  | --sharedst | --shareds | --shared | --share | --shar \
  +  | --sha | --sh)
  +    ac_prev=sharedstatedir ;;
  +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  +  | --sha=* | --sh=*)
  +    sharedstatedir=$ac_optarg ;;
  +
  +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  +  | --syscon | --sysco | --sysc | --sys | --sy)
  +    ac_prev=sysconfdir ;;
  +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  +    sysconfdir=$ac_optarg ;;
  +
  +  esac
  +done
  +
  +# Be sure to have absolute paths.
  +for ac_var in exec_prefix prefix
  +do
  +  eval ac_val=$`echo $ac_var`
  +  case $ac_val in
  +    [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
  +    *)  AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
  +  esac
  +done
  +
  +])dnl
  
  
  
  1.206     +4 -11     httpd-2.0/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/configure.in,v
  retrieving revision 1.205
  retrieving revision 1.206
  diff -u -r1.205 -r1.206
  --- configure.in	28 Feb 2002 15:44:43 -0000	1.205
  +++ configure.in	6 Mar 2002 18:48:22 -0000	1.206
  @@ -24,17 +24,10 @@
   AC_PREFIX_DEFAULT(/usr/local/apache2)
   
   dnl Get the layout here, so we can pass the required variables to apr
  -dnl APACHE_ENABLE_LAYOUT
  -AC_MSG_CHECKING(for chosen layout)
  -AC_ARG_ENABLE(layout,
  -APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[
  -  LAYOUT=$enableval
  -  APACHE_LAYOUT($srcdir/config.layout, $LAYOUT)
  -  AC_MSG_RESULT($LAYOUT)
  -], [
  -  APACHE_LAYOUT_DEFAULTS
  -  AC_MSG_RESULT([Autoconf Defaults])
  -])
  +APACHE_ENABLE_LAYOUT
  +
  +dnl reparse the configure arguments.
  +APACHE_PARSE_ARGUMENTS
   
   dnl Save user-defined environment settings for later restoration
   dnl