From 0e4acb04cc8f48191cdc83125ebf7719694e686e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 13 Nov 2006 20:40:06 +0000 Subject: [PATCH] * NEWS: Document the AC_ARG_WITH change. 2006-11-13 Bruno Haible * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): For --with, --without options, transliterate also dots to underscores. (_AC_ENABLE_IF): Transliterate also dots to underscores. * doc/autoconf.texi (External Software): Document that AC_ARG_WITH's first argument may also contain dots. --- ChangeLog | 12 ++++++++++++ NEWS | 2 ++ doc/autoconf.texi | 4 ++-- lib/autoconf/general.m4 | 10 +++++----- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b025aee9..0e829b19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-11-13 Paul Eggert + + * NEWS: Document the AC_ARG_WITH change. + +2006-11-13 Bruno Haible + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): For --with, --without + options, transliterate also dots to underscores. + (_AC_ENABLE_IF): Transliterate also dots to underscores. + * doc/autoconf.texi (External Software): Document that AC_ARG_WITH's + first argument may also contain dots. + 2006-11-09 Paul Eggert * tests/mktests.sh (ac_exclude_list): Exclude AC_PROG_CXX_C_O, for diff --git a/NEWS b/NEWS index e9c16527..b6546658 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ ** New macros AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS. +** AC_ARG_WITH now allows '.' in package names. + ** AC_CHECK_DECL now also works with aggregate objects. ** AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for NonStop platforms. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 9aa70d9d..ae117806 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -15526,12 +15526,12 @@ or @option{--without-@var{package}}, run shell commands @var{action-if-given}. If neither option was given, run shell commands @var{action-if-not-given}. The name @var{package} indicates another software package that this program should work with. It should consist -only of alphanumeric characters and dashes. +only of alphanumeric characters, dashes, and dots. The option's argument is available to the shell commands @var{action-if-given} in the shell variable @code{withval}, which is actually just the value of the shell variable @code{with_@var{package}}, -with any @option{-} characters changed into @samp{_}. You may use that +with any non-alphanumeric characters changed into @samp{_}. You may use that variable instead, if you wish. The argument @var{help-string} is a description of the option that diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index bdf48f64..3f5b4595 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -843,17 +843,17 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null && + expr "x$ac_package" : "[.*[^-._$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid package name: $ac_package]) - ac_package=`echo $ac_package| sed 's/-/_/g'` + [ac_package=`echo $ac_package | sed 's/[-.]/_/g'`] eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null && + expr "x$ac_package" : "[.*[^-._$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid package name: $ac_package]) - ac_package=`echo $ac_package | sed 's/-/_/g'` + [ac_package=`echo $ac_package | sed 's/[-.]/_/g'`] eval with_$ac_package=no ;; --x) @@ -1361,7 +1361,7 @@ m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH)) # m4_define([_AC_ENABLE_IF], [# Check whether --$1-$2 was given. -_AC_ENABLE_IF_ACTION([$1], m4_bpatsubst([$2], -, _), [$3], [$4])[]dnl +_AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl ]) m4_define([_AC_ENABLE_IF_ACTION], -- 2.11.4.GIT