From: William Pursell Date: Mon, 8 Dec 2008 21:16:38 +0000 (-0700) Subject: Fix AC_HEADER_ASSERT w.r.t. --enable-assert. X-Git-Tag: v2.63b~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=276044d3556000a8aa1f23beb2520d8249fa39ae;p=thirdparty%2Fautoconf.git 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. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 8a18ebfa9..17eadc780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-08 William Pursell (tiny change) + and Eric Blake + + 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 (tiny change) Fix AC_HEADER_ASSERT to honor --enable-assert, rather than diff --git a/NEWS b/NEWS index 86bf8d5da..65e5486cb 100644 --- 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 diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 7b3b9d318..7fe94af64 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -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]) ])