X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=3ab83af9fba43fa0f5fb6b95063da4561297f003;hb=b50970a54195302dad73c668e263c71188a8d727;hp=1d1462839545ce09d8dcc1607b785cd38834e013;hpb=4417074c68ce998c2d666fc8a034204a1b74fc2f;p=libsigrok.git diff --git a/configure.ac b/configure.ac index 1d146283..3ab83af9 100644 --- a/configure.ac +++ b/configure.ac @@ -101,9 +101,12 @@ SR_ARG_OPT_PKG([libserialport], [LIBSERIALPORT], , SR_ARG_OPT_PKG([libftdi], [LIBFTDI], , [libftdi1 >= 1.0]) +# pkg-config file names: MinGW/MacOSX: hidapi; Linux: hidapi-hidraw/-libusb SR_ARG_OPT_PKG([libhidapi], [LIBHIDAPI], , [hidapi >= 0.8.0], [hidapi-hidraw >= 0.8.0], [hidapi-libusb >= 0.8.0]) +SR_ARG_OPT_PKG([libbluez], [LIBBLUEZ], , [bluez >= 4.0]) + # 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, @@ -133,7 +136,14 @@ SR_ARG_OPT_CHECK([libieee1284], [LIBIEEE1284],, [ AS_IF([test "x$sr_have_libieee1284" = xyes], [SR_PREPEND([SR_EXTRA_LIBS], [-lieee1284])]) -AS_IF([test "x$sr_have_libserialport" = xyes -o "x$sr_have_libhidapi" = xyes], +# See if any of the (potentially platform specific) libs are available +# which provide some means of Bluetooth communication. +AS_IF([test "x$sr_have_libbluez" = xyes], + sr_have_bluetooth=yes, sr_have_bluetooth=no) +AS_IF([test "x$sr_have_bluetooth" = xyes], + [AC_DEFINE([HAVE_BLUETOOTH], [1], [Specifies whether Bluetooth communication is supported.])]) + +AS_IF([test "x$sr_have_libserialport" = xyes -o "x$sr_have_libhidapi" = xyes -o "x$sr_have_bluetooth" = xyes], sr_have_serial_comm=yes, sr_have_serial_comm=no) AS_IF([test "x$sr_have_serial_comm" = xyes], [AC_DEFINE([HAVE_SERIAL_COMM], [1], [Specifies whether serial communication is supported.])]) @@ -185,6 +195,15 @@ 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 ]], + [[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 ## ######################## @@ -236,7 +255,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 BM86x], [brymen-bm86x], [libusb]) 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]) @@ -293,8 +311,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 UT32x], [uni-t-ut32x], [libusb]) -SR_DRIVER([Victor DMM], [victor-dmm], [libusb]) +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]) SR_DRIVER([ZKETECH EBD-USB], [zketech-ebd-usb], [serial_comm]) @@ -616,6 +633,8 @@ Enabled serial communication transports: - serial comm ................... $sr_have_serial_comm - libserialport ................. $sr_have_libserialport - hidapi ........................ $sr_have_libhidapi + - bluetooth ..................... $sr_have_bluetooth + - bluez ......................... $sr_have_libbluez Enabled SCPI backends: - TCP............................. yes