]> sigrok.org Git - libsigrok.git/blobdiff - configure.ac
C++ bindings: Reimplement enums.py using doxygen XML output instead of gccxml.
[libsigrok.git] / configure.ac
index 84960e183ba727aa9c0d141f624c97ab12f5a18e..d2f8926a3b1d4ecb79fdab777747a0fceb9283f7 100644 (file)
@@ -184,30 +184,25 @@ if test "x$HAVE_CXX11" != "x1"; then
        BINDINGS_CXX="no"; cxx_msg="C++11 compiler required"
 fi
 
-# The C++ bindings use gccxml to parse libsigrok symbols.
-AC_CHECK_PROG([HAVE_GCCXML], [gccxml], [yes])
-if test "x$HAVE_GCCXML" != "xyes"; then
-       BINDINGS_CXX="no"; cxx_msg="gccxml required"
+# The C++ bindings use doxygen to parse libsigrok symbols.
+AC_CHECK_PROG([HAVE_DOXYGEN], [doxygen], [yes])
+if test "x$HAVE_DOXYGEN" != "xyes"; then
+       BINDINGS_CXX="no"; cxx_msg="doxygen required"
 fi
 
-# Python is needed for the C++ (and Python) bindings.
+# Python is needed for the C++ bindings.
+AC_CHECK_PROG([HAVE_PYTHON], [python], [yes])
+if test "x$HAVE_PYTHON" != "xyes"; then
+       BINDINGS_CXX="no"; cxx_msg="Python required"
+fi
+
+# The Python bindings need Python development files
 PKG_CHECK_MODULES([python], [python >= 2.7],
         [CXXFLAGS="$CXXFLAGS $python_CFLAGS";
         CXXLIBS="$CXXLIBS $python_LIBS"],
-               [BINDINGS_CXX="no"; cxx_msg="Python required"])
-
-# The C++ bindings need the pygccxml Python module.
-m4_ifdef([AX_PYTHON_MODULE], [AX_PYTHON_MODULE([pygccxml])],
-       # We'll let it go through even if the macro wasn't found, the python
-       # module may still be there.
-       [HAVE_PYTHON_PYGCCXML="yes";
-               AC_MSG_NOTICE([Missing macro m4_toupper(aX_PYTHON_MODULE), no pygccxml check])]
-)
-if test "x$HAVE_PYMOD_PYGCCXML" != "xyes"; then
-       BINDINGS_CXX="no"; cxx_msg="Python pygccxml module required"
-fi
+               [BINDINGS_PYTHON="no"; python_msg="Python headers required"])
 
-# The C++ bindings need the setuptools Python module.
+# The Python 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.
@@ -215,7 +210,7 @@ m4_ifdef([AX_PYTHON_MODULE], [AX_PYTHON_MODULE([setuptools])],
                AC_MSG_NOTICE([Missing macro m4_toupper(aX_PYTHON_MODULE), no setuptools check])]
 )
 if test "x$HAVE_PYMOD_SETUPTOOLS" != "xyes"; then
-       BINDINGS_CXX="no"; cxx_msg="Python setuptools module required"
+       BINDINGS_PYTHON="no"; python_msg="Python setuptools module required"
 fi
 
 # The Python and Java bindings use swig to generate code.
@@ -403,6 +398,10 @@ case "$host" in
        ;;
 esac
 
+# The BeagleLogic driver needs sys/mman.h and sys/ioctl.h. Don't try to
+# build it if these headers aren't available.
+AC_CHECK_HEADERS([sys/mman.h sys/ioctl.h], [], [HW_BEAGLELOGIC="no"])
+
 AC_SUBST(SR_PKGLIBS)
 
 CFLAGS="$CFLAGS -I./include/libsigrok $LIB_CFLAGS"
@@ -627,7 +626,8 @@ AM_CONDITIONAL(BINDINGS_PYTHON, test x$BINDINGS_PYTHON = xyes)
 AM_CONDITIONAL(BINDINGS_JAVA, test x$BINDINGS_JAVA = xyes)
 
 # Checks for header files.
-# These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
+# These are already implicitly checked: inttypes.h stdint.h stdlib.h string.h
+# unistd.h memory.h strings.h dlfcn.h sys/types.h sys/stat.h.
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_BIGENDIAN