]> sigrok.org Git - libsigrok.git/blobdiff - configure.ac
scpi-dmm: use INIT instead of MEAS for Agilent to start acquisition
[libsigrok.git] / configure.ac
index aa0d49a85f86f7a706b2b56ac43a519e581ffd8d..ba2d4513316ee9368bb563fadbeea6fbda61c3c2 100644 (file)
@@ -107,6 +107,8 @@ SR_ARG_OPT_PKG([libhidapi], [LIBHIDAPI], ,
 
 SR_ARG_OPT_PKG([libbluez], [LIBBLUEZ], , [bluez >= 4.0])
 
+SR_ARG_OPT_PKG([libnettle], [LIBNETTLE], , [nettle])
+
 # FreeBSD comes with an "integrated" libusb-1.0-style USB API.
 # This means libusb-1.0 is always available; no need to check for it.
 # On Windows, require the latest version we can get our hands on,
@@ -186,28 +188,31 @@ AS_CASE([$host_os], [mingw*], [SR_PREPEND([SR_EXTRA_LIBS], [-lws2_32])])
 SR_SEARCH_LIBS([SR_EXTRA_LIBS], [pow], [m])
 
 # RPC is only needed for VXI support.
-AC_CACHE_CHECK([for RPC support], [sr_cv_have_rpc],
+AC_CACHE_CHECK([for SunRPC support], [sr_cv_have_sunrpc],
        [AC_LINK_IFELSE([AC_LANG_PROGRAM(
                        [[#include <rpc/rpc.h>]m4_newline[CLIENT *rpc_test(void);]],
                        [[(void) clnt_create("", 0, 0, "");]])],
-               [sr_cv_have_rpc=yes], [sr_cv_have_rpc=no])])
+               [RPC_CFLAGS=""; RPC_LIBS=""; sr_cv_have_sunrpc=yes],
+               [sr_cv_have_sunrpc=no])])
+PKG_CHECK_MODULES([TIRPC],
+       [libtirpc],
+       [RPC_CFLAGS=$TIRPC_CFLAGS; SR_PREPEND([SR_EXTRA_LIBS], [$TIRPC_LIBS]); sr_cv_have_tirpc=yes],
+       [sr_cv_have_tirpc=no])
+AS_IF([test "x$sr_cv_have_sunrpc" = xyes -o "x$sr_cv_have_tirpc" = xyes],
+       [sr_cv_have_rpc=yes], [sr_cv_have_rpc=no])
+
+AC_SUBST(RPC_CFLAGS)
+AC_SUBST(RPC_LIBS)
+
 AS_IF([test "x$sr_cv_have_rpc" = xyes],
-       [AC_DEFINE([HAVE_RPC], [1], [Specifies whether we have RPC support.])])
+       [AC_DEFINE([HAVE_RPC], [1], [Specifies whether we have RPC support (either by SunRPC or libtirpc).])])
+
 # VXI support is only compiled if RPC support was found.
 AM_CONDITIONAL([NEED_RPC], [test "x$sr_cv_have_rpc" = xyes])
 
 # Check for compiler support of 128 bit integers
 AC_CHECK_TYPES([__int128_t, __uint128_t], [], [], [])
 
-# Availability of bt_put_le16() depends on the bluez library version.
-AC_CACHE_CHECK([for bt_put_le16], [sr_cv_have_btputle16],
-       [AC_LINK_IFELSE([AC_LANG_PROGRAM(
-                       [[#include <bluetooth/bluetooth.h>]],
-                       [[bt_put_le16(0, (void *)0);]])],
-               [sr_cv_have_btputle16=yes], [sr_cv_have_btputle16=no])])
-AS_IF([test "x$sr_cv_have_btputle16" = xyes],
-       [AC_DEFINE([HAVE_BT_PUT_LE16], [1], [Specifies whether we have bt_put_le16().])])
-
 ########################
 ##  Hardware drivers  ##
 ########################
@@ -259,7 +264,6 @@ SR_DRIVER([ASIX SIGMA/SIGMA2], [asix-sigma], [libftdi])
 SR_DRIVER([Atten PPS3xxx], [atten-pps3xxx], [serial_comm])
 SR_DRIVER([BayLibre ACME], [baylibre-acme], [sys_timerfd_h])
 SR_DRIVER([BeagleLogic], [beaglelogic], [sys_mman_h sys_ioctl_h])
-SR_DRIVER([Brymen DMM], [brymen-dmm], [serial_comm])
 SR_DRIVER([CEM DT-885x], [cem-dt-885x], [serial_comm])
 SR_DRIVER([Center 3xx], [center-3xx], [serial_comm])
 SR_DRIVER([ChronoVu LA], [chronovu-la], [libusb libftdi])
@@ -280,12 +284,15 @@ SR_DRIVER([Hantek 6xxx], [hantek-6xxx], [libusb])
 SR_DRIVER([Hantek DSO], [hantek-dso], [libusb])
 SR_DRIVER([HP 3457A], [hp-3457a])
 SR_DRIVER([HP 3478A], [hp-3478a], [libgpib])
+SR_DRIVER([hp-59306a], [hp-59306a])
 SR_DRIVER([Hung-Chang DSO-2100], [hung-chang-dso-2100], [libieee1284])
 SR_DRIVER([Ikalogic Scanalogic-2], [ikalogic-scanalogic2], [libusb])
 SR_DRIVER([Ikalogic Scanaplus], [ikalogic-scanaplus], [libftdi])
 SR_DRIVER([IPDBG LA], [ipdbg-la])
+SR_DRIVER([ITECH IT8500], [itech-it8500], [serial_comm])
 SR_DRIVER([Kecheng KC-330B], [kecheng-kc-330b], [libusb])
 SR_DRIVER([KERN scale], [kern-scale], [serial_comm])
+SR_DRIVER([Kingst LA2016], [kingst-la2016], [libusb])
 SR_DRIVER([Korad KAxxxxP], [korad-kaxxxxp], [serial_comm])
 SR_DRIVER([Lascar EL-USB], [lascar-el-usb], [libusb])
 SR_DRIVER([LeCroy LogicStudio], [lecroy-logicstudio], [libusb])
@@ -302,7 +309,10 @@ SR_DRIVER([OpenBench Logic Sniffer], [openbench-logic-sniffer], [serial_comm])
 SR_DRIVER([PCE PCE-322A], [pce-322a], [serial_comm])
 SR_DRIVER([Pipistrello-OLS], [pipistrello-ols], [libftdi])
 SR_DRIVER([RDTech DPSxxxx/DPHxxxx], [rdtech-dps], [serial_comm])
+SR_DRIVER([RDTech UMXX], [rdtech-um], [serial_comm])
+SR_DRIVER([RDTech TCXX], [rdtech-tc], [serial_comm libnettle])
 SR_DRIVER([Rigol DS], [rigol-ds])
+SR_DRIVER([Rigol DG], [rigol-dg])
 SR_DRIVER([Rohde&Schwarz SME-0x], [rohde-schwarz-sme-0x], [serial_comm])
 SR_DRIVER([Saleae Logic16], [saleae-logic16], [libusb])
 SR_DRIVER([Saleae Logic Pro], [saleae-logic-pro], [libusb])
@@ -317,6 +327,7 @@ SR_DRIVER([Teleinfo], [teleinfo], [serial_comm])
 SR_DRIVER([Testo], [testo], [libusb])
 SR_DRIVER([Tondaj SL-814], [tondaj-sl-814], [serial_comm])
 SR_DRIVER([UNI-T DMM], [uni-t-dmm], [libusb])
+SR_DRIVER([UNI-T UT181A], [uni-t-ut181a], [serial_comm])
 SR_DRIVER([UNI-T UT32x], [uni-t-ut32x], [serial_comm])
 SR_DRIVER([Yokogawa DL/DLM], [yokogawa-dlm])
 SR_DRIVER([ZEROPLUS Logic Cube], [zeroplus-logic-cube], [libusb])
@@ -444,7 +455,7 @@ AS_IF([test "x$HAVE_PYMOD_NUMPY" != xyes],
        [SR_APPEND([sr_python_missing], [', '], [numpy])])
 
 # The Python bindings use SWIG to generate code.
-AC_CHECK_PROGS([SWIG], [swig swig3.0 swig2.0])
+AC_CHECK_PROGS([SWIG], [swig swig4.0 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 //p'`]
@@ -482,8 +493,8 @@ sr_rbminor=${sr_rbminor%%.*}
 
 # The Ruby bindings need Ruby development files.
 SR_PKG_CHECK([ruby_dev], [SR_PKGLIBS_RUBY],
-       [ruby],
-       [ruby-$sr_rbmajor.$sr_rbminor])
+       [ruby >= 2.5.0],
+       [ruby-$sr_rbmajor.$sr_rbminor >= 2.5.0])
 
 AS_IF([test "x$sr_have_ruby_dev" != xyes],
        [SR_APPEND([sr_ruby_missing], [', '], [Headers])])
@@ -644,6 +655,8 @@ Enabled serial communication transports:
 
 Enabled SCPI backends:
  - TCP............................. yes
+ - SunRPC ......................... $sr_cv_have_sunrpc
+ - TI-RPC ......................... $sr_cv_have_tirpc
  - RPC............................. $sr_cv_have_rpc
  - serial.......................... $sr_have_serial_comm
  - VISA............................ $sr_have_librevisa