[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_HEADER_ASSERT: don't say assertions are disabled when they're not
From: |
Eric Blake |
Subject: |
Re: AC_HEADER_ASSERT: don't say assertions are disabled when they're not |
Date: |
Wed, 10 Dec 2008 14:39:15 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Jim Meyering <jim <at> meyering.net> writes:
>
> I was surprised to see assertions being turned off by default:
> checking whether to enable assertions... no <-- wrong! default is to
enable
Aaargh. So much for my careful review.
> + AS_IF(dnl
> + [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])
> - ac_enable_assert=no])],
> - [ac_enable_assert=no])
> + [AC_MSG_WARN([invalid argument supplied to --enable-assert])
> + ac_enable_assert=no])],
This line also needs to be ac_enable_assert=yes. In short, a warning is
printed, and _assertions remain enabled_, if you did --enable-assert=oops
> + [ac_enable_assert=yes])
> AC_MSG_RESULT([$ac_enable_assert])
Other than that, yes, please apply and please sync to gnulib.
--
Eric Blake