* NEWS: Document the AC_ARG_WITH change.

2006-11-13  Bruno Haible  <bruno@clisp.org>

* 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.
This commit is contained in:
Paul Eggert 2006-11-13 20:40:06 +00:00
parent 5bcf9bc19c
commit 0e4acb04cc
4 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,15 @@
2006-11-13 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: Document the AC_ARG_WITH change.
2006-11-13 Bruno Haible <bruno@clisp.org>
* 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 <eggert@cs.ucla.edu>
* tests/mktests.sh (ac_exclude_list): Exclude AC_PROG_CXX_C_O, for

2
NEWS
View File

@ -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.

View File

@ -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

View File

@ -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],