[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: allow dots in AC_ARG_WITH
From: |
Paul Eggert |
Subject: |
Re: feature request: allow dots in AC_ARG_WITH |
Date: |
Mon, 13 Nov 2006 12:41:43 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Thanks for that suggestion and patch. I installed the following; it's
the same as your proposal except I added a NEWS item and tweaked another
sentence in the documentation.
2006-11-13 Paul Eggert <address@hidden>
* NEWS: Document the AC_ARG_WITH change.
2006-11-13 Bruno Haible <address@hidden>
* 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.
--- NEWS 8 Nov 2006 08:26:44 -0000 1.409
+++ NEWS 13 Nov 2006 20:39:25 -0000
@@ -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.
--- lib/autoconf/general.m4 23 Oct 2006 06:12:40 -0000 1.936
+++ lib/autoconf/general.m4 13 Nov 2006 20:39:25 -0000
@@ -843,17 +843,17 @@
-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([_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],
--- doc/autoconf.texi 8 Nov 2006 08:26:44 -0000 1.1105
+++ doc/autoconf.texi 13 Nov 2006 20:39:26 -0000
@@ -15526,12 +15526,12 @@
@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 @address@hidden,
-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