From 4a51103c6c0827b1e763c11bca73d564b0470ff7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 19 Dec 2006 05:41:18 +0000 Subject: [PATCH] * lib/autoconf/general.m4 (AC_ARG_ENABLE): Print help about --disable-option-checking to --help output even when AC_PRESERVE_HELP_ORDER is not used. (_AC_INIT_PARSE_ENABLE2): Print warnings using actual --enable or --with argument, rather than argument with [-.] replaced by underscores. * NEWS: Fix typo in previous change; the news was in the wrong section. --- ChangeLog | 11 +++++++++++ NEWS | 10 ++++------ lib/autoconf/general.m4 | 4 +++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed018cac..99eeb938 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-12-18 Steven G. Johnson + + * lib/autoconf/general.m4 (AC_ARG_ENABLE): Print help about + --disable-option-checking to --help output even when + AC_PRESERVE_HELP_ORDER is not used. + (_AC_INIT_PARSE_ENABLE2): Print warnings using actual --enable or + --with argument, rather than argument with [-.] replaced by + underscores. + * NEWS: Fix typo in previous change; the news was in the + wrong section. + 2006-12-18 Paul Eggert * NEWS: Warnings are now generated by default for unknown diff --git a/NEWS b/NEWS index d481dc68..9fac7c4a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ * Major changes in Autoconf 2.61b (????-??-??) -** None yet... +** Warnings are now generated by default when an installer invokes + 'configure' with an unknown --enable-* or --with-* option. + These warnings can be disabled with the new AC_DISABLE_OPTION_CHECKING + macro, or by invoking 'configure' with --disable-option-checking. * Major changes in Autoconf 2.61a (2006-12-11) @@ -14,11 +17,6 @@ on some modern systems and could no longer be maintained reliably due to lack of ancient systems to test it on. -** Warnings are now generated by default when an installer invokes - 'configure' with an unknown --enable-* or --with-* option. - These warnings can be disabled with the new AC_DISABLE_OPTION_CHECKING - macro, or by invoking 'configure' with --disable-option-checking. - ** config.status now uses awk instead of sed for most substitutions, for speed. - As a side effect multi-line values of substituted variables no diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index f4e1f443..5e10d7bd 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -957,10 +957,11 @@ m4_define([_AC_INIT_PARSE_ENABLE2], expr "x$ac_useropt" : "[.*[^-._$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR( [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt]) + ac_useropt_orig=$ac_useropt ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-.]]/_/g'` case $ac_user_opts in *:$2_$ac_useropt:*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt" + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl @@ -1401,6 +1402,7 @@ AC_DEFUN([AC_ARG_ENABLE], [], [m4_divert_once([HELP_ENABLE], [[ Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl m4_divert_once([HELP_ENABLE], [$2])dnl