From d3faf0314f16051a820279f8b5668eed9a9c033c Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 11 Mar 2011 20:38:58 +0100 Subject: Fix swig detection AC_PROG_SWIG indicates failure to detect swig by setting the SWIG variable to false. Commit f489971b6b moved the "$SWIG != false" test before the call to AC_PROG_SWIG, which leads to the rest of configure.ac to think swig has been successfully detected even when not present. Move this test after the call to AC_PROG_SWIG. This also gets rid of the SWIG_SUB variable which is not really useful since the SWIG variable can be used for the same purpose. --- configure.ac | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index c996625..a982b7b 100644 --- a/configure.ac +++ b/configure.ac @@ -52,24 +52,27 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) -python_bindings=yes AC_ARG_WITH([swig], [AS_HELP_STRING([--without-swig], [build Python bindings using swig (default is yes)])], [build_swig=false], [build_swig=true]) -if test "$build_swig" = "true" -a "$SWIG" != "false" ; then +if test "$build_swig" = "true"; then AM_PATH_PYTHON(2.3) AC_PROG_SWIG(1.3.21) AX_SWIG_ENABLE_CXX SWIG_PYTHON - SWIG_SUB=swig else - SWIG_SUB= - python_bindings=no + SWIG=false fi -AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG_SUB" = "xswig"]) +if [test "x$SWIG" != "xfalse"]; then + python_bindings=yes +else + python_bindings=no +fi + +AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG" != "xfalse"]) AC_SUBST([DEV_SUB]) -- cgit v1.1-32-gdbae