From: Uwe Hermann Date: Tue, 18 Aug 2015 16:01:54 +0000 (+0200) Subject: FreeBSD: Also check for swig2.0 in addition to swig. X-Git-Tag: libsigrok-0.4.0~419 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3f03ffaf2f7c9c65d0bf35e611df8fb720ed0e8c;p=libsigrok.git FreeBSD: Also check for swig2.0 in addition to swig. On FreeBSD (for example) the SWIG binary is called "swig2.0". This fixes bug #557. --- diff --git a/Makefile.am b/Makefile.am index 424d3444..f66c9cea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -609,7 +609,7 @@ $(JDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC) $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i \ $(library_include_HEADERS) $(nodist_library_include_HEADERS) $(AM_V_at)make java-clean - $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \ + $(AM_V_GEN)$(SWIG) -c++ -java -package org.sigrok.core.classes \ -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) diff --git a/configure.ac b/configure.ac index fc76b2a9..86ead343 100644 --- a/configure.ac +++ b/configure.ac @@ -396,8 +396,8 @@ test "x$HAVE_PYMOD_SETUPTOOLS" = xyes \ || sr_python_missing="$sr_python_missing Setuptools" # The Python bindings use SWIG to generate code. -AC_CHECK_PROG([HAVE_SWIG], [swig], [yes], [no]) -test "x$HAVE_SWIG" = xyes || sr_python_missing="$sr_python_missing SWIG" +AC_CHECK_PROGS([SWIG], [swig swig2.0], [no]) +test "x$SWIG" != xno || sr_python_missing="$sr_python_missing SWIG" AS_IF([test -z "$sr_python_missing"], [BINDINGS_PYTHON=$enable_python], [BINDINGS_PYTHON=no]) @@ -411,7 +411,7 @@ sr_java_missing= test "x$BINDINGS_CXX" = xyes || sr_java_missing=" C++ bindings" # The Java bindings use SWIG to generate code. -test "x$HAVE_SWIG" = xyes || sr_java_missing="$sr_java_missing SWIG" +test "x$SWIG" != xno || sr_java_missing="$sr_java_missing SWIG" # Find Java compiler and JNI includes for Java bindings. AC_CHECK_PROG([HAVE_JAVAC], [javac], [yes], [no])