From: Bert Vermeulen Date: Wed, 23 Jul 2014 10:57:37 +0000 (+0200) Subject: build: Add more dependency checks for building bindings. X-Git-Tag: libsigrok-0.4.0~1214 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0afa91b765542c7efaf745b218e118823dccd052;p=libsigrok.git build: Add more dependency checks for building bindings. --- diff --git a/configure.ac b/configure.ac index c3eb9b51..6047a158 100644 --- a/configure.ac +++ b/configure.ac @@ -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"