Fix FOPENCOOKIE detection glitch
authorNikos Ntarmos <ntarmos@cs.uoi.gr>
Sat, 28 Mar 2009 17:49:56 +0000 (19:49 +0200)
committerPhil Sutter <phil@nwl.cc>
Sun, 29 Mar 2009 00:25:39 +0000 (01:25 +0100)
Using AM_CONDITIONAL's inside an if block is considered "confusing" by
the automake manual[1] and in fact leads to configure code that won't
work unless fopencookie actually exists in a system.

[1] http://sources.redhat.com/automake/automake.html#Conditionals

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

configure.ac.in

index eec0df4..dcd4cb5 100644 (file)
@@ -99,9 +99,10 @@ AC_ARG_ENABLE([config_output],
               [want_config_output="$enableval"], [want_config_output=yes])
 
 AM_CONDITIONAL(BUILD_CONFIG_OUTPUT, test x$want_config_output = xyes)
+AM_CONDITIONAL(BUILD_FOR_FOPENCOOKIE, test x$want_config_output = xyes)
 if test x$want_config_output = xyes; then
   AC_DEFINE(CONFIG_OUTPUT, 1, [Define if you want conky to output a default config (with -C)])
-  AC_CHECK_FUNCS(fopencookie, AM_CONDITIONAL(BUILD_FOR_FOPENCOOKIE, true))
+  AC_CHECK_FUNCS(fopencookie)
 fi
 
 dnl