]> sigrok.org Git - libsigrok.git/blobdiff - configure.ac
Enable loading of session files without total probes defined
[libsigrok.git] / configure.ac
index 5e8ba9331f149988b713f63906d83b62e5fe4d9f..4462efeddeb42a0c9dac80d416cb4c12bd035fec 100644 (file)
@@ -21,7 +21,7 @@
 # We require at least autoconf 2.63 (AC_INIT format changed there).
 AC_PREREQ([2.63])
 
-AC_INIT([libsigrok], [0.4.0],
+AC_INIT([libsigrok], [0.5.0],
        [sigrok-devel@lists.sourceforge.net],
        [libsigrok], [http://www.sigrok.org])
 AC_CONFIG_MACRO_DIR([m4])
@@ -67,7 +67,8 @@ SR_PKG_VERSION_SET([SR_PACKAGE_VERSION], [AC_PACKAGE_VERSION])
 # Carefully read the libtool docs before updating these numbers!
 # The algorithm for determining which number to change (and how) is nontrivial!
 # http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
-SR_LIB_VERSION_SET([SR_LIB_VERSION], [2:0:0])
+# Format: current:revision:age.
+SR_LIB_VERSION_SET([SR_LIB_VERSION], [3:0:0])
 
 AM_CONDITIONAL([WIN32], [test -z "${host_os##mingw*}" || test -z "${host_os##cygwin*}"])
 
@@ -216,6 +217,7 @@ m4_define([SR_DRIVER],
 
 SR_DRIVER([Agilent DMM], [agilent-dmm], [libserialport])
 SR_DRIVER([Appa 55II], [appa-55ii], [libserialport])
+SR_DRIVER([Arachnid Labs Re:load Pro], [arachnid-labs-re-load-pro], [libserialport])
 SR_DRIVER([ASIX SIGMA/SIGMA2], [asix-sigma], [libftdi])
 SR_DRIVER([Atten PPS3xxx], [atten-pps3xxx], [libserialport])
 SR_DRIVER([BayLibre ACME], [baylibre-acme], [sys_timerfd_h])
@@ -234,6 +236,7 @@ SR_DRIVER([fx2lafw], [fx2lafw], [libusb])
 SR_DRIVER([GMC MH 1x/2x], [gmc-mh-1x-2x], [libserialport])
 SR_DRIVER([GW Instek GDS-800], [gwinstek-gds-800], [libserialport])
 SR_DRIVER([Hameg HMO], [hameg-hmo], [libserialport])
+SR_DRIVER([Hantek 6xxx], [hantek-6xxx], [libusb])
 SR_DRIVER([Hantek DSO], [hantek-dso], [libusb])
 SR_DRIVER([Hung-Chang DSO-2100], [hung-chang-dso-2100], [libieee1284])
 SR_DRIVER([Ikalogic Scanalogic-2], [ikalogic-scanalogic2], [libusb])
@@ -384,6 +387,10 @@ AS_IF([test "x$HAVE_PYMOD_NUMPY" != xyes],
 
 # The Python bindings use SWIG to generate code.
 AC_CHECK_PROGS([SWIG], [swig swig3.0 swig2.0])
+AS_IF([test "x$SWIG" != x],
+    AC_MSG_CHECKING([for $SWIG version])
+    [SWIG_VERSION=`$SWIG -version 2>&1 | sed -n 's/SWIG Version\s*//p'`]
+    AC_MSG_RESULT([$SWIG_VERSION]))
 AS_IF([test "x$SWIG" = x],
        [SR_APPEND([sr_python_missing], [', '], [SWIG])])
 
@@ -399,10 +406,16 @@ AS_IF([test "x$BINDINGS_CXX" = xyes],
        [sr_ruby_missing=],
        [sr_ruby_missing='C++ bindings'])
 
-AX_RUBY_EXT
+AC_PATH_PROGS(RUBY, ["${RUBY-ruby}"], [])
+AS_IF([test "x$RUBY" != x],
+       AC_MSG_CHECKING([for Ruby version])
+    [RUBY_VERSION=`$RUBY -e 'puts RUBY_VERSION'`]
+    AC_MSG_RESULT([$RUBY_VERSION])
+    [RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["DLEXT"]]'`]
+    AC_SUBST(RUBY_DLEXT))
 
 AS_IF([test "x$RUBY" = x],
-       [SR_APPEND([sr_ruby_missing], [', '], ['Ruby'])])
+       [SR_APPEND([sr_ruby_missing], [', '], [Ruby])])
 
 # Extract major and minor version number of the Ruby interpreter.
 sr_rbmajor=${RUBY_VERSION%%.*}
@@ -417,14 +430,15 @@ SR_PKG_CHECK([ruby_dev], [SR_PKGLIBS_RUBY],
 AS_IF([test "x$sr_have_ruby_dev" != xyes],
        [SR_APPEND([sr_ruby_missing], [', '], [Headers])])
 
-# The Ruby bindings use SWIG to generate code.
+# The Ruby bindings use SWIG >= 3.0.8 to generate code.
 AS_IF([test "x$SWIG" = x],
-       [SR_APPEND([sr_ruby_missing], [', '], [SWIG])])
+       [SR_APPEND([sr_ruby_missing], [', '], [SWIG])],
+       [AS_VERSION_COMPARE($SWIG_VERSION, "3.0.8",
+               [SR_APPEND([sr_ruby_missing], [', '], ['SWIG >= 3.0.8'])])])
 
 AS_IF([test -z "$sr_ruby_missing"],
        [BINDINGS_RUBY=$enable_ruby], [BINDINGS_RUBY=no])
 AM_CONDITIONAL([BINDINGS_RUBY], [test "x$BINDINGS_RUBY" = xyes])
-# AC_SUBST(RUBY_EXT_DLEXT, $RUBY_EXT_DLEXT)
 
 ####################
 ##  Java bindings ##