Explicitly check for 'expect' presence when --enable-testcases is
enabled.

Plus a couple of braces in autoconf macros just for consistency

Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
---
 configure.in |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index ebea596..55413b3 100644
--- a/configure.in
+++ b/configure.in
@@ -498,19 +498,27 @@ dnl --- package is available
 dnl ---
 
 dnl --- enable_debug
-AM_CONDITIONAL([ENABLE_DEBUG], test "x$enable_debug" = "xyes")
+AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
 if test "x$enable_debug" = "xyes"; then
        DEBUG_CFLAGS="-g -O0"
 fi
 
 dnl --- enable_testcases
-AM_CONDITIONAL([ENABLE_TESTCASES], test "x$enable_testcases" = "xyes")
+if test "x$enable_testcases" = "xyes"; then
+       AC_CHECK_PROG([HAVE_EXPECT], [expect], [yes], [no])
+
+       if test "x$HAVE_EXPECT" = "xno"; then
+               AC_MSG_ERROR([*** testcases requires 'expect' interpreter, 
which wasn't found])
+                enable_testcases=no
+       fi
+fi
+AM_CONDITIONAL([ENABLE_TESTCASES], [test "x$enable_testcases" = "xyes"])
 
 dnl --- enable_daemon
-AM_CONDITIONAL([ENABLE_DAEMON], test "x$enable_daemon" = "xyes")
+AM_CONDITIONAL([ENABLE_DAEMON], [test "x$enable_daemon" = "xyes"])
 
 dnl --- enable_library
-AM_CONDITIONAL([ENABLE_LIBRARY], test "x$enable_library" = "xyes")
+AM_CONDITIONAL([ENABLE_LIBRARY], [test "x$enable_library" = "xyes"])
 
 dnl --- enable_icatok
 if test "x$enable_icatok" != "xno"; then
-- 
1.6.6.1


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to