autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.65-86-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.65-86-gee0ecf0
Date: Mon, 14 Jun 2010 20:30:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=ee0ecf0c37a41661c42ac9425ba50adb40bea4f7

The branch, master has been updated
       via  ee0ecf0c37a41661c42ac9425ba50adb40bea4f7 (commit)
      from  e3e31f6dc457512879823bcf0f35d6cb175c45e7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ee0ecf0c37a41661c42ac9425ba50adb40bea4f7
Author: Bruno Haible <address@hidden>
Date:   Tue Mar 16 07:04:40 2010 +0100

    Allow plus signs in AC_ARG_ENABLE and AC_ARG_WITH.
    
    * doc/autoconf.texi (External Software): Mention that AC_ARG_WITH
    accepts packages with a + sign in it.
    (Package Options): Likewise for AC_ARG_ENABLE.
    * lib/autoconf/general.m4 (_AC_ENABLE_IF): Also replace '+' with '_'.
    * tests/base.at (AC_ARG_ENABLE and AC_ARG_WITH): New test.
    * NEWS: Update.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |   11 ++++++++++
 NEWS                    |    4 +++
 doc/autoconf.texi       |    4 +-
 lib/autoconf/general.m4 |    2 +-
 tests/base.at           |   52 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d1fc70e..c0c4bc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-13  Bruno Haible  <address@hidden>
+       and Ralf Wildenhues  <address@hidden>
+
+       Allow plus signs in AC_ARG_ENABLE and AC_ARG_WITH.
+       * doc/autoconf.texi (External Software): Mention that AC_ARG_WITH
+       accepts packages with a + sign in it.
+       (Package Options): Likewise for AC_ARG_ENABLE.
+       * lib/autoconf/general.m4 (_AC_ENABLE_IF): Also replace '+' with '_'.
+       * tests/base.at (AC_ARG_ENABLE and AC_ARG_WITH): New test.
+       * NEWS: Update.
+
 2010-06-14  Ralf Wildenhues  <address@hidden>
 
        Autotest: simplify logic to compute test group result.
diff --git a/NEWS b/NEWS
index f1fdefb..5c0d130 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,10 @@ GNU Autoconf NEWS - User visible changes.
 ** Autotest testsuites accept an option --recheck to rerun tests that
    failed or passed unexpectedly during the last non-debug testsuite run.
 
+** AC_ARG_ENABLE and AC_ARG_WITH now also accept `+' signs in `--enable-*'
+   and `--with-*' arguments, converting them to underscores for the variable
+   names.
+
 * Major changes in Autoconf 2.65 (2009-11-21) [stable]
   Released by Eric Blake, based on git versions 2.64.*.
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index ca0d85c..519158c 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -20534,7 +20534,7 @@ or @address@hidden, 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, dashes, and dots.
+only of alphanumeric characters, dashes, plus signs, and dots.
 
 The option's argument is available to the shell commands
 @var{action-if-given} in the shell variable @code{withval}, which is
@@ -20686,7 +20686,7 @@ If the user gave @command{configure} the option
 shell commands @var{action-if-given}.  If neither option was given, run
 shell commands @var{action-if-not-given}.  The name @var{feature}
 indicates an optional user-level facility.  It should consist only of
-alphanumeric characters, dashes, and dots.
+alphanumeric characters, dashes, plus signs, and dots.
 
 The option's argument is available to the shell commands
 @var{action-if-given} in the shell variable @code{enableval}, which is
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 9c24b3f..e764b16 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1440,7 +1440,7 @@ m4_define([_m4_divert(HELP_ENABLE)],    
_m4_divert(HELP_WITH))
 #
 m4_define([_AC_ENABLE_IF],
 address@hidden:@ Check whether --$1-$2 was given.
-_AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])
+_AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-+.], [___]), [$3], [$4])
 ])
 
 m4_define([_AC_ENABLE_IF_ACTION],
diff --git a/tests/base.at b/tests/base.at
index 042f16c..54ccd8a 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -532,6 +532,58 @@ AT_CHECK_CONFIGURE([1=2], [1], [], [ignore], [ignore])
 AT_CLEANUP
 
 
+## ------------------------------ ##
+## AC_ARG_ENABLE and AC_ARG_WITH. ##
+## ------------------------------ ##
+
+AT_SETUP([AC_ARG_ENABLE and AC_ARG_WITH])
+
+AT_DATA_M4SH([configure.ac],
+[[AC_INIT
+# Taken from autoconf.texi:Pretty Help Strings.
+AC_ARG_WITH([foo],
+  [AS_HELP_STRING([--with-foo],
+     [use foo (default is no)])],
+  [use_foo=$withval],
+  [use_foo=no])
+AC_ARG_WITH([c++],
+  [AS_HELP_STRING([--with-c++],
+     [with c++])],
+  [choice_with=$withval])
+AC_ARG_ENABLE([c++],
+  [AS_HELP_STRING([--enable-c++],
+     [enable c++])],
+  [choice_enable=$enableval])
+echo "use_foo: $use_foo"
+echo "with_c++: $with_c__, $choice_with"
+echo "enable_c++: $enable_c__, $choice_enable"
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([--help | grep foo], [0],
+[[  --with-foo              use foo (default is no)
+]], [ignore])
+AT_CHECK_CONFIGURE([--with-foo=yes --with-c++ --disable-c++],
+  [], [stdout], [ignore])
+AT_CHECK([grep 'use_foo: yes' stdout], [], [ignore])
+AT_CHECK([grep 'with_c++: yes, yes' stdout], [], [ignore])
+AT_CHECK([grep 'enable_c++: no, no' stdout], [], [ignore])
+AT_CHECK([grep 'unrecognized option' stdout], [1])
+AT_CHECK_CONFIGURE([--without-foo --with-c++=no --enable-c++=maybe],
+  [], [stdout], [ignore])
+AT_CHECK([grep 'use_foo: no' stdout], [], [ignore])
+AT_CHECK([grep 'with_c++: no, no' stdout], [], [ignore])
+AT_CHECK([grep 'enable_c++: maybe, maybe' stdout], [], [ignore])
+AT_CHECK([grep 'unrecognized option' stdout], [1])
+AT_CHECK_CONFIGURE([], [], [stdout], [ignore])
+AT_CHECK([grep 'use_foo: no' stdout], [], [ignore])
+AT_CHECK([grep 'with_c++: , $' stdout], [], [ignore])
+AT_CHECK([grep 'enable_c++: , $' stdout], [], [ignore])
+AT_CHECK([grep 'unrecognized option' stdout], [1])
+
+AT_CLEANUP
+
+
 ## --------------------- ##
 ## configure directories ##
 ## --------------------- ##


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

[Prev in Thread] Current Thread [Next in Thread]