From: Akim Demaille Date: Thu, 10 Feb 2000 09:37:37 +0000 (+0000) Subject: Standardize the error messages in the options handling of X-Git-Tag: autoconf-2.50~1167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe71f613f1ac97be20582d54fe27ad56857ac545;p=thirdparty%2Fautoconf.git Standardize the error messages in the options handling of `configure' and `config.status'. * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Renamed as... (_AC_OUTPUT_CONFIG_STATUS): this. Change the error messages from value: invalid feature name to invalid feature: value Invite the user to try --help for invalid options. (AC_INIT_PARSE_ARGS): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 479de31e5..188d55473 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2000-02-10 Akim Demaille + + Standardize the error messages in the options handling of + `configure' and `config.status'. + + * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Renamed as... + (_AC_OUTPUT_CONFIG_STATUS): this. + Change the error messages from + value: invalid feature name + to + invalid feature: value + Invite the user to try --help for invalid options. + (AC_INIT_PARSE_ARGS): Likewise. + 2000-02-10 Akim Demaille * acgeneral.m4 (AC_OUTPUT_COMMANDS_COMMANDS): Renamed as... diff --git a/acgeneral.m4 b/acgeneral.m4 index 11053a089..a4548b80e 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -658,7 +658,7 @@ do ac_feature=`echo "$ac_option"|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_feature: invalid feature name)[ + ]AC_MSG_ERROR(invalid feature: $ac_feature)[ fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; @@ -667,7 +667,7 @@ do ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_feature: invalid feature name)[ + ]AC_MSG_ERROR(invalid feature: $ac_feature)[ fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in @@ -918,7 +918,7 @@ Some influent environment variables:$ac_arg_var_help" ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_package: invalid package name)[ + ]AC_MSG_ERROR(invalid package: $ac_package)[ fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in @@ -931,7 +931,7 @@ Some influent environment variables:$ac_arg_var_help" ac_package=`echo "$ac_option"|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_package: invalid package name)[ + ]AC_MSG_ERROR(invalid package: $ac_package)[ fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; @@ -954,14 +954,15 @@ Some influent environment variables:$ac_arg_var_help" | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; - -*) ]AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])[ + -*) ]AC_MSG_ERROR([unrecognized option: $ac_option +Try `configure --help' for more information.])[ ;; *=*) ac_envvar=`echo "$ac_option" | sed -e 's/=.*//'` # Reject names that are not valid shell variable names. if echo "$ac_envvar" | grep '[^a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_envvar: invalid variable name)[ + ]AC_MSG_ERROR(invalid variable name: $ac_envvar)[ fi ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" @@ -969,7 +970,7 @@ Some influent environment variables:$ac_arg_var_help" *) if echo "$ac_feature" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then - ]AC_MSG_WARN($ac_option: invalid host type)[ + ]AC_MSG_WARN(invalid host type: $ac_option)[ fi if test "x$nonopt" != xNONE; then ]AC_MSG_ERROR(can only configure for one host and one target at a time)[ @@ -3276,7 +3277,7 @@ AC_OUTPUT_COMMANDS_PRE()dnl : ${CONFIG_STATUS=./config.status} trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -AC_OUTPUT_CONFIG_STATUS()dnl +_AC_OUTPUT_CONFIG_STATUS()dnl rm -fr confdefs* $ac_clean_files trap 'exit 1' 1 2 15 @@ -3306,12 +3307,12 @@ ifval([$2$3], [`AC_OUTPUT' should be used without arguments.]) -# AC_OUTPUT_CONFIG_STATUS -# ----------------------- +# _AC_OUTPUT_CONFIG_STATUS +# ------------------------ # Produce config.status. Called by AC_OUTPUT. # Pay special attention not to have too long here docs: some old # shells die. Unfortunately the limit is not known precisely... -define(AC_OUTPUT_CONFIG_STATUS, +define(_AC_OUTPUT_CONFIG_STATUS, [echo creating $CONFIG_STATUS cat >$CONFIG_STATUS </dev/null 2>&1; then - ]AC_MSG_ERROR($ac_feature: invalid feature name)[ + ]AC_MSG_ERROR(invalid feature: $ac_feature)[ fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; @@ -667,7 +667,7 @@ do ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_feature: invalid feature name)[ + ]AC_MSG_ERROR(invalid feature: $ac_feature)[ fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in @@ -918,7 +918,7 @@ Some influent environment variables:$ac_arg_var_help" ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_package: invalid package name)[ + ]AC_MSG_ERROR(invalid package: $ac_package)[ fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in @@ -931,7 +931,7 @@ Some influent environment variables:$ac_arg_var_help" ac_package=`echo "$ac_option"|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_package: invalid package name)[ + ]AC_MSG_ERROR(invalid package: $ac_package)[ fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; @@ -954,14 +954,15 @@ Some influent environment variables:$ac_arg_var_help" | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; - -*) ]AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])[ + -*) ]AC_MSG_ERROR([unrecognized option: $ac_option +Try `configure --help' for more information.])[ ;; *=*) ac_envvar=`echo "$ac_option" | sed -e 's/=.*//'` # Reject names that are not valid shell variable names. if echo "$ac_envvar" | grep '[^a-zA-Z0-9_]' >/dev/null 2>&1; then - ]AC_MSG_ERROR($ac_envvar: invalid variable name)[ + ]AC_MSG_ERROR(invalid variable name: $ac_envvar)[ fi ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" @@ -969,7 +970,7 @@ Some influent environment variables:$ac_arg_var_help" *) if echo "$ac_feature" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then - ]AC_MSG_WARN($ac_option: invalid host type)[ + ]AC_MSG_WARN(invalid host type: $ac_option)[ fi if test "x$nonopt" != xNONE; then ]AC_MSG_ERROR(can only configure for one host and one target at a time)[ @@ -3276,7 +3277,7 @@ AC_OUTPUT_COMMANDS_PRE()dnl : ${CONFIG_STATUS=./config.status} trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -AC_OUTPUT_CONFIG_STATUS()dnl +_AC_OUTPUT_CONFIG_STATUS()dnl rm -fr confdefs* $ac_clean_files trap 'exit 1' 1 2 15 @@ -3306,12 +3307,12 @@ ifval([$2$3], [`AC_OUTPUT' should be used without arguments.]) -# AC_OUTPUT_CONFIG_STATUS -# ----------------------- +# _AC_OUTPUT_CONFIG_STATUS +# ------------------------ # Produce config.status. Called by AC_OUTPUT. # Pay special attention not to have too long here docs: some old # shells die. Unfortunately the limit is not known precisely... -define(AC_OUTPUT_CONFIG_STATUS, +define(_AC_OUTPUT_CONFIG_STATUS, [echo creating $CONFIG_STATUS cat >$CONFIG_STATUS <