Delay checking for want_apcupsd.
authorNikos Ntarmos <ntarmos@cs.uoi.gr>
Fri, 22 May 2009 19:20:10 +0000 (22:20 +0300)
committerBrenden Matthews <brenden@rty.ca>
Sun, 24 May 2009 03:08:32 +0000 (21:08 -0600)
The if-clause checking for the host operating system being Linux may
change the value of want_apcupsd. Delay checking for its value until
after that.

Signed-off-by: Brenden Matthews <brenden@rty.ca>

configure.ac.in

index da5c566..18b779f 100644 (file)
@@ -222,7 +222,6 @@ AC_ARG_ENABLE([apcupsd],
                              [disable if you do not want apcupsd support @<:@default=yes@:>@]),
               [want_apcupsd="$enableval"], [want_apcupsd=yes])
 
-AM_CONDITIONAL(BUILD_APCUPSD, test x$want_apcupsd = xyes)
 if test x$want_apcupsd = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([apcupsd not supported on $uname... disabling])
@@ -231,6 +230,7 @@ if test x$want_apcupsd = xyes; then
       AC_DEFINE(APCUPSD, 1, [Define if you want apcupsd support])
   fi
 fi
+AM_CONDITIONAL(BUILD_APCUPSD, test x$want_apcupsd = xyes)
 
 AC_ARG_ENABLE([math],
               AC_HELP_STRING([--disable-math], [disable if you do not want math support @<:@default=yes@:>@]),