summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christophe Fergeau2011-03-11 20:38:58 +0100
committerGravatar Martin Szulecki2011-03-26 11:53:52 +0100
commitb22e695c5546439035febd29c6fbb06b2ffd29af (patch)
tree7e255b4a58dd1b90bd37759ddc7890a7c506e077
parent7eb76c0f7bd5710b7d37c1aac4dd9585d249c2db (diff)
downloadlibimobiledevice-b22e695c5546439035febd29c6fbb06b2ffd29af.tar.gz
libimobiledevice-b22e695c5546439035febd29c6fbb06b2ffd29af.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 70e31a7..f9bd693 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])