summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christophe Fergeau2011-03-11 20:38:58 +0100
committerGravatar Martin Szulecki2011-03-12 03:13:22 +0100
commitd3faf0314f16051a820279f8b5668eed9a9c033c (patch)
treee9bf2d543ecf7f47178b725b28ce60d4c73e6868
parent14912f87c6dc2ebcc54771c92558652ae486b089 (diff)
downloadlibimobiledevice-d3faf0314f16051a820279f8b5668eed9a9c033c.tar.gz
libimobiledevice-d3faf0314f16051a820279f8b5668eed9a9c033c.tar.bz2
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.
-rw-r--r--configure.ac15
1 files 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])