X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=595dafe25623ed48b822b095bbc281b59e6f21e3;hb=3c5582595a024e6221018eced858e62f0bed849b;hp=5f9cf6521953c79247d1bc2ba102ba10aedce9fc;hpb=52ff4f6a04cbdb966ee538bd447ae206215b528a;p=libsigrok.git diff --git a/configure.ac b/configure.ac index 5f9cf652..595dafe2 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,9 @@ AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([autostuff]) AC_CONFIG_AUX_DIR([autostuff]) +# We require this to know the target settings if we're cross-compiling. +AC_CANONICAL_SYSTEM + # We require at least automake 1.11 (needed for 'silent rules'). AM_INIT_AUTOMAKE([1.11 -Wall -Werror subdir-objects check-news color-tests]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -260,8 +263,8 @@ AM_CONDITIONAL(NEED_RPC, test "x$have_rpc" != "x0") # libglib-2.0 is always needed. Abort if it's not found. # Note: glib-2.0 is part of the libsigrok API (hard pkg-config requirement). -# We require at least 2.34.0 due to e.g. g_slist_deep_copy(). -AM_PATH_GLIB_2_0([2.34.0], +# We require at least 2.32.0 due to e.g. g_variant_new_fixed_array(). +AM_PATH_GLIB_2_0([2.32.0], [LIB_CFLAGS="$LIB_CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"]) # libzip is always needed. Abort if it's not found. @@ -302,7 +305,7 @@ fi AM_CONDITIONAL(NEED_SERIAL, test "x$have_libserialport" != xno) # The VISA SCPI backend is only compiled in if librevisa was found. -PKG_CHECK_MODULES([librevisa], [librevisa >= 0.0.20130812], +PKG_CHECK_MODULES([librevisa], [librevisa >= 0.0.20130412], [have_librevisa="yes"; LIB_CFLAGS="$LIB_CFLAGS $librevisa_CFLAGS"; LIBS="$LIBS $librevisa_LIBS"; SR_PKGLIBS="$SR_PKGLIBS librevisa"], @@ -396,7 +399,7 @@ PKG_CHECK_MODULES([glibmm], [glibmm-2.4 >= 2.32.0], [BINDINGS_CXX="no"; cxx_msg="glibmm required"]) # C++ bindings want stoi and stod. -if test "x$BINDINGS_CXX" == "xyes"; then +if test "x$BINDINGS_CXX" = "xyes"; then AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for stoi and stod]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], @@ -430,7 +433,7 @@ AC_CHECK_HEADERS([sys/mman.h sys/ioctl.h], [], [HW_BEAGLELOGIC="no"]) AC_SUBST(SR_PKGLIBS) CFLAGS="$CFLAGS -Iinclude/libsigrok -I${srcdir}/include/libsigrok $LIB_CFLAGS" -CXXFLAGS="$CXXFLAGS -Iinclude/libsigrok -I${srcdir}/include -Ibindings/cxx -Ibindings/cxx/include/libsigrok -I${srcdir}/bindings/cxx/include $LIB_CFLAGS" +CXXFLAGS="$CXXFLAGS -Iinclude/libsigrok -I${srcdir}/include -Ibindings/cxx -Ibindings/cxx/include/libsigrokcxx -I${srcdir}/bindings/cxx/include $LIB_CFLAGS" # Find Java compiler and JNI includes for Java bindings. AC_CHECK_PROG([HAVE_JAVAC], [javac], [yes], [no]) @@ -554,13 +557,13 @@ echo "Detected libraries:" echo # Note: This only works for libs with pkg-config integration. -for lib in "glib-2.0 >= 2.34.0" "libzip >= 0.10" "libserialport >= 0.2.0" \ - "librevisa >= 0.0.20130812" "libusb-1.0 >= 1.0.16" "libftdi >= 0.16" \ +for lib in "glib-2.0 >= 2.32.0" "libzip >= 0.10" "libserialport >= 0.2.0" \ + "librevisa >= 0.0.20130412" "libusb-1.0 >= 1.0.16" "libftdi >= 0.16" \ "libftdi1 >= 1.0" "libgpib" "glibmm-2.4 >= 2.32.0" \ "pygobject-3.0 >= 3.0.0" "check >= 0.9.4" do optional="OPTIONAL" - if test "x$lib" = "xglib-2.0 >= 2.34.0"; then optional="REQUIRED"; fi + if test "x$lib" = "xglib-2.0 >= 2.32.0"; then optional="REQUIRED"; fi if test "x$lib" = "xlibzip >= 0.10"; then optional="REQUIRED"; fi if `$PKG_CONFIG --exists $lib`; then ver=`$PKG_CONFIG --modversion $lib`