On (10/01/14 15:35), Lukas Slebodnik wrote:
On (10/01/14 15:06), Stef Walter wrote:
>For whatever reason, that's not the case here, for some reason. In my
>experience AC_ARG_ENABLE is a tristate. When:
>
> * --enable-xxx is not present then $enable_xxx == ""
I need to
apologize. You are right.
I had something cached :-(
I have different experience :-) Could you try one more time?
If you want to be sure you can use 4th optional argument of AC_ARG_ENABLE
and set [enable_strict="no"]. I don't like your solution
https://www.gnu.org/software/autoconf/manual/autoconf.html#Package-Options
— Macro: AC_ARG_ENABLE (feature,
help-string,
[action-if-given],
[action-if-not-given])
I prefer to do it with this way
diff --git a/configure.ac b/configure.ac
index 42941ac..f47f8d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,14 +339,13 @@ dnl Strict Compilation -- -Werror etc.
AC_ARG_ENABLE(strict, [
AS_HELP_STRING([--enable-strict],
- [Strict code compilation [default: auto]])
- ])
+ [Strict code compilation [default: no]])
+ ],
+ [],[enable_strict="no"])
AC_MSG_CHECKING([build strict])
if test "$enable_strict" = "yes"; then
CFLAGS="$CFLAGS -Werror"
-else
- enable_strict="no"
> * --enable-xxx is present then $enable_xxx == "yes"
Right, from documentation:
--enable-feature[=arg]
The user can give an argument by following the feature name with ‘=’ and
the argument. If no argument is given, it defaults to ‘yes’.
> * --disable-xxx is present then $disable_xxx == "no"
Right,
--disable-feature is equivalent to --enable-feature=no.
>
>Do you have a different a sufficiently different autoconf (mine is
>2.69)? I'd be sucprised if they changed something like that though...
>
bash$ rpm -q autoconf
autoconf-2.69-14.fc20.noarch
LS