From 2dc83ae174d9f21edfa37a7f4c5874920a2548c1 Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Thu, 31 Mar 1994 01:02:47 +0000 Subject: [PATCH] (AC_PARSEARGS): Add --disable-FEATURE; remove --site. --- acgeneral.m4 | 25 ++++++++++++++++--------- lib/autoconf/general.m4 | 25 ++++++++++++++++--------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/acgeneral.m4 b/acgeneral.m4 index f289a7d5..c9eb3581 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -33,7 +33,7 @@ dnl dnl Utility functions for stamping the configure script. dnl dnl -define(AC_ACVERSION, 1.7.9)dnl +define(AC_ACVERSION, 1.7.10)dnl dnl This is defined by the --version option of the autoconf script. ifdef([AC_PRINT_VERSION], [errprint(Autoconf version AC_ACVERSION )])dnl @@ -89,6 +89,7 @@ ac_configure_args="[$]*" changequote(,)dnl ac_usage="Usage: configure [options] [host] Options: [defaults in brackets] +--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=VAL] include FEATURE [VAL=yes] --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] --help print this message @@ -128,12 +129,12 @@ do continue fi - # Accept but ignore most of the Cygnus configure options, - # so we can diagnose typos and other invalid options. + # Accept (but ignore some of) the most important Cygnus configure + # options, so we can diagnose typos. case "$ac_option" in changequote(,)dnl - *=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; changequote([,])dnl *) ac_optarg= ;; esac @@ -145,6 +146,17 @@ changequote([,])dnl -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) build="$ac_optarg" ;; + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that aren't valid shell variable names. +changequote(,)dnl + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then +changequote([,])dnl + AC_ERROR($ac_feature: invalid feature name) + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that aren't valid shell variable names. @@ -229,11 +241,6 @@ EOF | -silent | --silent | --silen | --sile | --sil) ac_silent=yes ;; - -site | --site | --sit) - ac_prev=site ;; - -site= | --site=* | --sit=*) - site="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index f289a7d5..c9eb3581 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -33,7 +33,7 @@ dnl dnl Utility functions for stamping the configure script. dnl dnl -define(AC_ACVERSION, 1.7.9)dnl +define(AC_ACVERSION, 1.7.10)dnl dnl This is defined by the --version option of the autoconf script. ifdef([AC_PRINT_VERSION], [errprint(Autoconf version AC_ACVERSION )])dnl @@ -89,6 +89,7 @@ ac_configure_args="[$]*" changequote(,)dnl ac_usage="Usage: configure [options] [host] Options: [defaults in brackets] +--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=VAL] include FEATURE [VAL=yes] --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] --help print this message @@ -128,12 +129,12 @@ do continue fi - # Accept but ignore most of the Cygnus configure options, - # so we can diagnose typos and other invalid options. + # Accept (but ignore some of) the most important Cygnus configure + # options, so we can diagnose typos. case "$ac_option" in changequote(,)dnl - *=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; changequote([,])dnl *) ac_optarg= ;; esac @@ -145,6 +146,17 @@ changequote([,])dnl -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) build="$ac_optarg" ;; + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that aren't valid shell variable names. +changequote(,)dnl + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then +changequote([,])dnl + AC_ERROR($ac_feature: invalid feature name) + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that aren't valid shell variable names. @@ -229,11 +241,6 @@ EOF | -silent | --silent | --silen | --sile | --sil) ac_silent=yes ;; - -site | --site | --sit) - ac_prev=site ;; - -site= | --site=* | --sit=*) - site="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)