summaryrefslogtreecommitdiffstats
path: root/configure.ac
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 /configure.ac
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.
Diffstat (limited to 'configure.ac')
-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
52AC_FUNC_REALLOC 52AC_FUNC_REALLOC
53AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) 53AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])
54 54
55python_bindings=yes
56AC_ARG_WITH([swig], 55AC_ARG_WITH([swig],
57 [AS_HELP_STRING([--without-swig], 56 [AS_HELP_STRING([--without-swig],
58 [build Python bindings using swig (default is yes)])], 57 [build Python bindings using swig (default is yes)])],
59 [build_swig=false], 58 [build_swig=false],
60 [build_swig=true]) 59 [build_swig=true])
61if test "$build_swig" = "true" -a "$SWIG" != "false" ; then 60if test "$build_swig" = "true"; then
62 AM_PATH_PYTHON(2.3) 61 AM_PATH_PYTHON(2.3)
63 AC_PROG_SWIG(1.3.21) 62 AC_PROG_SWIG(1.3.21)
64 AX_SWIG_ENABLE_CXX 63 AX_SWIG_ENABLE_CXX
65 SWIG_PYTHON 64 SWIG_PYTHON
66 SWIG_SUB=swig
67else 65else
68 SWIG_SUB= 66 SWIG=false
69 python_bindings=no
70fi 67fi
71 68
72AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG_SUB" = "xswig"]) 69if [test "x$SWIG" != "xfalse"]; then
70 python_bindings=yes
71else
72 python_bindings=no
73fi
74
75AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG" != "xfalse"])
73 76
74AC_SUBST([DEV_SUB]) 77AC_SUBST([DEV_SUB])
75 78