]> sigrok.org Git - libsigrok.git/commitdiff
FreeBSD: Also check for swig2.0 in addition to swig.
authorUwe Hermann <redacted>
Tue, 18 Aug 2015 16:01:54 +0000 (18:01 +0200)
committerUwe Hermann <redacted>
Tue, 18 Aug 2015 16:28:30 +0000 (18:28 +0200)
On FreeBSD (for example) the SWIG binary is called "swig2.0".

This fixes bug #557.

Makefile.am
configure.ac

index 424d344490fcc780201d49c88cb81028448aa8e5..f66c9cea248de4e92a153710f8ac66fb9129dce1 100644 (file)
@@ -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)
 
index fc76b2a93c2f932470c3ed6c70dedc294d027d86..86ead343dbe21a8c42476f1c82180532ea3ec25e 100644 (file)
@@ -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])