autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] Fix treatment of --enable-assert in AC_HEADER_ASSERT


From: William Pursell
Subject: [PATCH] Fix treatment of --enable-assert in AC_HEADER_ASSERT
Date: Sun, 07 Dec 2008 07:11:12 +0000
User-agent: Thunderbird 2.0.0.18 (Macintosh/20081105)


diff --git a/ChangeLog b/ChangeLog
index a250ee2..bde246f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-06  William Pursell  <address@hidden>
+
+       Fix AC_HEADER_ASSERT to honor --enable-assert, rather than
+       treat --enable-assert and --disable-assert equivalently.
+       * lib/autoconf/headers.m4
+
 2008-12-05  William Pursell  <address@hidden>  (tiny change)

        Fix some typos and grammatical errors in documentation.
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index f4a4528..8b2c912 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -436,8 +436,12 @@ AC_DEFUN([AC_HEADER_ASSERT],
   AC_MSG_CHECKING([whether to enable assertions])
   AC_ARG_ENABLE([assert],
     [  --disable-assert        turn off assertions],
-    [AC_MSG_RESULT([no])
-     AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])],
+    [ if test "x$enableval" != xyes; then
+    AC_MSG_RESULT([no])
+     AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])
+    else
+    AC_MSG_RESULT([yes])
+    fi ],
     [AC_MSG_RESULT(yes)])
 ])


-- William Pursell
-- 
William Pursell




reply via email to

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