From 010fcc4437c55ed5a92c01d3c776eae2f03cfb05 Mon Sep 17 00:00:00 2001
From: Pierre Chifflier <chifflier@edenwall.com>
Date: Mon, 7 Jun 2010 23:28:34 +0200
Subject: [PATCH] Fix autoconf code for Prelude option (Fix: #175)

Third and forth arguments of AC_ARG_ENABLE are the actions to be done
if option was specified (respect. not given), NOT if option
is true (false).

Signed-off-by: Pierre Chifflier <chifflier@edenwall.com>
---
 configure.in |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/configure.in b/configure.in
index 849545d..8dbbd02 100644
--- a/configure.in
+++ b/configure.in
@@ -430,10 +430,8 @@ esac
 #prelude
 
     AC_ARG_ENABLE(prelude,
-            [  --enable-prelude  Enable Prelude support for alerts],
-            [ enable_prelude=yes ],
-            [ enable_prelude=no ])
-    if test "$enable_prelude" = "yes"; then
+            AS_HELP_STRING([--enable-prelude], [Enable Prelude support for alerts]))
+    AS_IF([test "x$enable_prelude" = "xyes"], [
         CFLAGS="$CFLAGS -DPRELUDE"
         AM_PATH_LIBPRELUDE(0.9.9, , AC_MSG_ERROR(Cannot find libprelude: Is libprelude-config in the path?), no)
         if test "x${LIBPRELUDE_CFLAGS}" != "x"; then
@@ -447,8 +445,7 @@ esac
         if test "x${LIBPRELUDE_LIBS}" != "x"; then
             LDFLAGS="${LDFLAGS} ${LIBPRELUDE_LIBS}"
         fi
-
-    fi
+    ])
 
 
 #libnet
-- 
1.7.1

