changeset 10868:fe92b59cff81

gl_ASSERT: don't say assertions are disabled when they're not * m4/assert.m4 (gl_ASSERT): Do not make configure report "checking whether to enable assertions... no", when they are in fact enabled. This is solely a bug in the output of configure. In spite of saying "no", NDEBUG was not defined in that case.
author Jim Meyering <meyering@redhat.com>
date Wed, 10 Dec 2008 15:06:42 +0100
parents 08d977c4e513
children eace73e5e2f9
files ChangeLog m4/assert.m4
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-12-10  Jim Meyering  <meyering@redhat.com>
+
+	gl_ASSERT: don't say assertions are disabled when they're not
+	* m4/assert.m4 (gl_ASSERT): Do not make configure report
+	"checking whether to enable assertions... no", when they are in
+	fact enabled.  This is solely a bug in the output of configure.
+	In spite of saying "no", NDEBUG was not defined in that case.
+	Also, as noted by Eric Blake, leave assertions enabled upon
+	--enable-assert=INVALID.
+
 2008-12-10  Bruno Haible  <bruno@clisp.org>
 
 	Change MODULES.html to refer to POSIX:2008 where possible.
--- a/m4/assert.m4
+++ b/m4/assert.m4
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
 
 # Copyright (C) 1998, 1999, 2001, 2004, 2008 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -18,7 +18,7 @@
 	[Define to 1 if assertions should be disabled.])],
       [test "x$enableval" != xyes],
       [AC_MSG_WARN([invalid argument supplied to --enable-assert])
-      enable_assert=no])],
-    [enable_assert=no])
+      enable_assert=yes])],
+    [enable_assert=yes])
   AC_MSG_RESULT([$enable_assert])
 ])