]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix AC_HEADER_ASSERT w.r.t. --enable-assert.
authorWilliam Pursell <bill.pursell@gmail.com>
Mon, 8 Dec 2008 21:16:38 +0000 (14:16 -0700)
committerEric Blake <ebb9@byu.net>
Mon, 8 Dec 2008 23:30:50 +0000 (16:30 -0700)
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Honor --enable-assert,
rather than treating it as a synonym for --disable-assert.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
NEWS
lib/autoconf/headers.m4

index 8a18ebfa98c62683d7fa9fb837f0d09f17d1a709..17eadc78043947bf930ba08c08b10e5b8542cf08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-08  William Pursell  <bill.pursell@gmail.com>  (tiny change)
+       and Eric Blake  <ebb9@byu.net>
+
+       Fix AC_HEADER_ASSERT w.r.t. --enable-assert.
+       * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Honor --enable-assert,
+       rather than treating it as a synonym for --disable-assert.
+       * NEWS: Document the fix.
+
 2008-12-06  William Pursell  <bill.pursell@gmail.com>  (tiny change)
 
        Fix AC_HEADER_ASSERT to honor --enable-assert, rather than
diff --git a/NEWS b/NEWS
index 86bf8d5da7a8f2ba2ec155f7f034588a1be60a37..65e5486cb2ec7992eddd7ba527f6e56947184f35 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ GNU Autoconf NEWS - User visible changes.
 
 ** AC_LANG_ERLANG works once again (regression introduced in 2.61a).
 
+** AC_HEADER_ASSERT is fixed so that './configure --enable-assert' no
+   longer mistakenly disables assertions.
+
 ** Autotest testsuites accept an option --jobs[=N] for parallel testing.
 
 ** Autotest testsuites do not attempt to write startup error messages
index 7b3b9d318415bb4bc7ba1c0dc39abe02bf27a9a8..7fe94af64ceccebefab54b5afbd406477d1789ad 100644 (file)
@@ -436,13 +436,15 @@ AC_DEFUN([AC_HEADER_ASSERT],
   AC_MSG_CHECKING([whether to enable assertions])
   AC_ARG_ENABLE([assert],
     [AS_HELP_STRING([--disable-assert], [turn off assertions])],
-    [AS_IF([test "x$enableval" = xno],
-      [AC_DEFINE([NDEBUG], [1], [Define to 1 if assertions should be disabled.]),
+    [ac_enable_assert=$enableval
+     AS_IF([test "x$enableval" = xno],
+      [AC_DEFINE([NDEBUG], [1],
+       [Define to 1 if assertions should be disabled.])],
       [test "x$enableval" != xyes],
-      AC_MSG_WARN([invalid argument supplied to --enable-assert.])
-      [enable_assert=no]
-  ])])
-  AC_MSG_RESULT([$enable_assert])
+      [AC_MSG_WARN([invalid argument supplied to --enable-assert])
+      ac_enable_assert=no])],
+    [ac_enable_assert=no])
+  AC_MSG_RESULT([$ac_enable_assert])
 ])