]> sigrok.org Git - libsigrok.git/commitdiff
build: Add more dependency checks for building bindings.
authorBert Vermeulen <redacted>
Wed, 23 Jul 2014 10:57:37 +0000 (12:57 +0200)
committerBert Vermeulen <redacted>
Wed, 23 Jul 2014 11:05:10 +0000 (13:05 +0200)
configure.ac

index c3eb9b51ef4d50d8c1ec8816f0ed67f0b01fe9d5..6047a158e9205bb0e2f8241dadafeb07b60fa793 100644 (file)
@@ -207,8 +207,25 @@ if test "x$HAVE_PYMOD_PYGCCXML" != "xyes"; then
        BINDINGS_CXX="no"
 fi
 
-# Python and Java bindings depend on C++ bindings.
+# The C++ bindings need the setuptools Python module.
+m4_ifdef([AX_PYTHON_MODULE], [AX_PYTHON_MODULE([setuptools])],
+       # We'll let it go through even if the macro wasn't found, the python
+       # module may still be there.
+       [HAVE_PYTHON_SETUPTOOLS="yes";
+               AC_MSG_NOTICE([Missing macro m4_toupper(aX_PYTHON_MODULE), no setuptools check])]
+)
+if test "x$HAVE_PYMOD_SETUPTOOLS" != "xyes"; then
+       BINDINGS_CXX="no"
+fi
 
+# The Python and Java bindings use swig to generate code.
+AC_CHECK_PROG([HAVE_SWIG], [swig], [yes])
+if test "x$HAVE_SWIG" != "xyes"; then
+       BINDINGS_PYTHON="no"
+       BINDINGS_JAVA="no"
+fi
+
+# Python and Java bindings depend on C++ bindings.
 if test "x$BINDINGS_CXX" != "xyes"; then
        BINDINGS_PYTHON="no"
        BINDINGS_JAVA="no"