X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=e14f4a25ee661c60f57923a17b858a2931acdca0;hb=c3e2b08dc9a252ada9b9a51ae47ea588135944e1;hp=bf6603da3d31cf9404d6297b9109a32a9650f3a9;hpb=8e796cb438a80c6bcab5d44afaae0c74d757b673;p=libsigrok.git diff --git a/configure.ac b/configure.ac index bf6603da..e14f4a25 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.63]) # libsigrok package version number (NOT the same as shared lib version!). m4_define([sr_package_version_major], [0]) m4_define([sr_package_version_minor], [2]) -m4_define([sr_package_version_micro], [1]) +m4_define([sr_package_version_micro], [2]) m4_define([sr_package_version], [sr_package_version_major.sr_package_version_minor.sr_package_version_micro]) AC_INIT([libsigrok], [sr_package_version], [sigrok-devel@lists.sourceforge.net], @@ -67,7 +67,7 @@ PKG_PROG_PKG_CONFIG([0.22]) # 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_CURRENT=1 -SR_LIB_VERSION_REVISION=1 +SR_LIB_VERSION_REVISION=2 SR_LIB_VERSION_AGE=0 SR_LIB_VERSION="$SR_LIB_VERSION_CURRENT:$SR_LIB_VERSION_REVISION:$SR_LIB_VERSION_AGE" SR_LIB_LDFLAGS="-version-info $SR_LIB_VERSION" @@ -139,6 +139,16 @@ AC_ARG_ENABLE(fx2lafw, AC_HELP_STRING([--enable-fx2lafw], [HW_FX2LAFW="$enableval"], [HW_FX2LAFW=$HW_ENABLED_DEFAULT]) +AC_ARG_ENABLE(gmc-mh-1x-2x, AC_HELP_STRING([--enable-gmc-mh-1x-2x], + [enable gmc-mh-1x-2x support [default=yes]]), + [HW_GMC_MH_1X_2X="$enableval"], + [HW_GMC_MH_1X_2X=$HW_ENABLED_DEFAULT]) + +AC_ARG_ENABLE(hameg-hmo, AC_HELP_STRING([--enable-hameg-hmo], + [enable Hameg HMO support [default=yes]]), + [HW_HAMEG_HMO="$enableval"], + [HW_HAMEG_HMO=$HW_ENABLED_DEFAULT]) + AC_ARG_ENABLE(hantek-dso, AC_HELP_STRING([--enable-hantek-dso], [enable Hantek DSO support [default=yes]]), [HW_HANTEK_DSO="$enableval"], @@ -174,15 +184,20 @@ AC_ARG_ENABLE(mic-985xx, AC_HELP_STRING([--enable-mic-985xx], [HW_MIC_985XX="$enableval"], [HW_MIC_985XX=$HW_ENABLED_DEFAULT]) +AC_ARG_ENABLE(norma-dmm, AC_HELP_STRING([--enable-norma-dmm], + [enable Norma DMM support [default=yes]]), + [HW_NORMA_DMM="$enableval"], + [HW_NORMA_DMM=$HW_ENABLED_DEFAULT]) + AC_ARG_ENABLE(ols, AC_HELP_STRING([--enable-ols], [enable OpenBench Logic Sniffer (OLS) support [default=yes]]), [HW_OLS="$enableval"], [HW_OLS=$HW_ENABLED_DEFAULT]) -AC_ARG_ENABLE(rigol-ds1xx2, AC_HELP_STRING([--enable-rigol-ds1xx2], - [enable Rigol DS1xx2 support [default=yes]]), - [HW_RIGOL_DS1XX2="$enableval"], - [HW_RIGOL_DS1XX2=$HW_ENABLED_DEFAULT]) +AC_ARG_ENABLE(rigol-ds, AC_HELP_STRING([--enable-rigol-ds], + [enable Rigol DS support [default=yes]]), + [HW_RIGOL_DS="$enableval"], + [HW_RIGOL_DS=$HW_ENABLED_DEFAULT]) AC_ARG_ENABLE(saleae-logic16, AC_HELP_STRING([--enable-saleae-logic16], [enable Saleae Logic16 support [default=yes]]), @@ -198,10 +213,6 @@ AC_ARG_ENABLE(teleinfo, AC_HELP_STRING([--enable-teleinfo], [enable Teleinfo support [default=yes]]), [HW_TELEINFO="$enableval"], [HW_TELEINFO=$HW_ENABLED_DEFAULT]) -AM_CONDITIONAL(HW_TELEINFO, test x$HW_TELEINFO = xyes) -if test "x$HW_TELEINFO" = "xyes"; then - AC_DEFINE(HAVE_HW_TELEINFO, 1, [Teleinfo support]) -fi AC_ARG_ENABLE(tondaj-sl-814, AC_HELP_STRING([--enable-tondaj-sl-814], [enable Tondaj SL-814 support [default=yes]]), @@ -231,6 +242,12 @@ AC_ARG_ENABLE(zeroplus-logic-cube, # Checks for libraries. +case "$host" in +*mingw*) + # We need to link against the Winsock2 library for SCPI over TCP. + LIBS="$LIBS -lws2_32";; +esac + # This variable collects the pkg-config names of all detected libs. # It is then used to construct the "Requires.private:" field in the # libsigrok.pc file. @@ -250,6 +267,28 @@ PKG_CHECK_MODULES([libzip], [libzip >= 0.10], [CFLAGS="$CFLAGS $libzip_CFLAGS"; LIBS="$LIBS $libzip_LIBS"; SR_PKGLIBS="$SR_PKGLIBS libzip"]) +# libserialport is only needed for some hardware drivers. Disable the +# respective drivers if it is not found. +PKG_CHECK_MODULES([libserialport], [libserialport >= 0.1.0], + [have_libserialport="yes"; CFLAGS="$CFLAGS $libserialport_CFLAGS"; + LIBS="$LIBS $libserialport_LIBS"; + SR_PKGLIBS="$SR_PKGLIBS libserialport"], + [have_libserialport="no"; HW_AGILENT_DMM="no"; HW_BRYMEN_DMM="no"; + HW_CEM_DT_885X="no"; HW_CENTER_3XX="no"; HW_COLEAD_SLM="no"; + HW_FLUKE_DMM="no"; HW_GMC_MH_1X_2X="no"; HW_HAMEG_HMO="no"; + HW_LINK_MSO19="no"; HW_MIC_985XX="no"; + HW_NORMA_DMM="no"; HW_OLS="no"; HW_RIGOL_DS="no"; + HW_SERIAL_DMM="no"; HW_TELEINFO="no"; HW_TONDAJ_SL_814="no"]) + +# Define HAVE_LIBSERIALPORT in config.h if we found libserialport. +if test "x$have_libserialport" != "xno"; then + AC_DEFINE_UNQUOTED(HAVE_LIBSERIALPORT, [1], + [Specifies whether we have libserialport.]) +fi + +# Serial port helper code is only compiled in if libserialport was found. +AM_CONDITIONAL(NEED_SERIAL, test "x$have_libserialport" != xno) + # libusb-1.0 is only needed for some hardware drivers. Disable the respective # drivers if it is not found. case "$host" in @@ -307,21 +346,6 @@ PKG_CHECK_MODULES([check], [check >= 0.9.4], LIBS="$LIBS $check_LIBS"], [have_check="no"]) AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes") -# The Rigol DS1xx2 driver currently uses the Linux kernel usbtmc module -# (though it is planned to rewrite the driver to be portable later). -# Thus, it will be disabled for non-Linux builds for now. -case "$host" in -*linux*) - # Do nothing. Whether the driver is enabled is determined by the - # previous --enable-all-drivers/--disable-all-drivers and/or any - # --enable-rigol-ds1xx2/--disable-rigol-ds1xx2 options. - ;; -*) - # Disable the driver for builds that don't target Linux. - HW_RIGOL_DS1XX2="no" - ;; -esac - AC_SUBST(SR_PKGLIBS) # Now set AM_CONDITIONALs and AC_DEFINEs for the enabled/disabled drivers. @@ -381,11 +405,21 @@ if test "x$HW_FX2LAFW" = "xyes"; then AC_DEFINE(HAVE_HW_FX2LAFW, 1, [fx2lafw support]) fi +AM_CONDITIONAL(HW_GMC_MH_1X_2X, test x$HW_GMC_MH_1X_2X = xyes) +if test "x$HW_GMC_MH_1X_2X" = "xyes"; then + AC_DEFINE(HAVE_HW_GMC_MH_1X_2X, 1, [gmc-mh-1x-2x support]) +fi + AM_CONDITIONAL(HW_HANTEK_DSO, test x$HW_HANTEK_DSO = xyes) if test "x$HW_HANTEK_DSO" = "xyes"; then AC_DEFINE(HAVE_HW_HANTEK_DSO, 1, [Hantek DSO support]) fi +AM_CONDITIONAL(HW_HAMEG_HMO, test x$HW_HAMEG_HMO = xyes) +if test "x$HW_HAMEG_HMO" = "xyes"; then + AC_DEFINE(HAVE_HW_HAMEG_HMO, 1, [Hameg HMO support]) +fi + AM_CONDITIONAL(HW_IKALOGIC_SCANALOGIC2, test x$HW_IKALOGIC_SCANALOGIC2 = xyes) if test "x$HW_IKALOGIC_SCANALOGIC2" = "xyes"; then AC_DEFINE(HAVE_HW_IKALOGIC_SCANALOGIC2, 1, [IKALOGIC Scanalogic-2 support]) @@ -416,14 +450,24 @@ if test "x$HW_MIC_985XX" = "xyes"; then AC_DEFINE(HAVE_HW_MIC_985XX, 1, [MIC 985xx support]) fi +AM_CONDITIONAL(HW_NORMA_DMM, test x$HW_NORMA_DMM = xyes) +if test "x$HW_NORMA_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_NORMA_DMM, 1, [Norma DMM support]) +fi + AM_CONDITIONAL(HW_OLS, test x$HW_OLS = xyes) if test "x$HW_OLS" = "xyes"; then AC_DEFINE(HAVE_HW_OLS, 1, [OpenBench Logic Sniffer (OLS) support]) fi -AM_CONDITIONAL(HW_RIGOL_DS1XX2, test x$HW_RIGOL_DS1XX2 = xyes) -if test "x$HW_RIGOL_DS1XX2" = "xyes"; then - AC_DEFINE(HAVE_HW_RIGOL_DS1XX2, 1, [Rigol DS1xx2 support]) +AM_CONDITIONAL(HW_RIGOL_DS, test x$HW_RIGOL_DS = xyes) +if test "x$HW_RIGOL_DS" = "xyes"; then + AC_DEFINE(HAVE_HW_RIGOL_DS, 1, [Rigol DS support]) +fi + +AM_CONDITIONAL(HW_SALEAE_LOGIC16, test x$HW_SALEAE_LOGIC16 = xyes) +if test "x$HW_SALEAE_LOGIC16" = "xyes"; then + AC_DEFINE(HAVE_HW_SALEAE_LOGIC16, 1, [Saleae Logic16 support]) fi AM_CONDITIONAL(HW_SERIAL_DMM, test x$HW_SERIAL_DMM = xyes) @@ -431,6 +475,11 @@ if test "x$HW_SERIAL_DMM" = "xyes"; then AC_DEFINE(HAVE_HW_SERIAL_DMM, 1, [Serial DMM support]) fi +AM_CONDITIONAL(HW_TELEINFO, test x$HW_TELEINFO = xyes) +if test "x$HW_TELEINFO" = "xyes"; then + AC_DEFINE(HAVE_HW_TELEINFO, 1, [Teleinfo support]) +fi + AM_CONDITIONAL(HW_TONDAJ_SL_814, test x$HW_TONDAJ_SL_814 = xyes) if test "x$HW_TONDAJ_SL_814" = "xyes"; then AC_DEFINE(HAVE_HW_TONDAJ_SL_814, 1, [Tondaj SL-814 support]) @@ -456,11 +505,6 @@ if test "x$HW_ZEROPLUS_LOGIC_CUBE" = "xyes"; then AC_DEFINE(HAVE_HW_ZEROPLUS_LOGIC_CUBE, 1, [ZEROPLUS Logic Cube support]) fi -AM_CONDITIONAL(HW_SALEAE_LOGIC16, test x$HW_SALEAE_LOGIC16 = xyes) -if test "x$HW_SALEAE_LOGIC16" = "xyes"; then - AC_DEFINE(HAVE_HW_SALEAE_LOGIC16, 1, [Saleae Logic16 support]) -fi - # Checks for header files. # These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h. AC_CHECK_HEADERS([fcntl.h sys/time.h termios.h]) @@ -505,12 +549,14 @@ AC_CONFIG_FILES([Makefile version.h hardware/Makefile hardware/chronovu-la8/Makefile hardware/colead-slm/Makefile hardware/common/Makefile + hardware/gmc-mh-1x-2x/Makefile + hardware/hameg-hmo/Makefile hardware/ikalogic-scanalogic2/Makefile hardware/ikalogic-scanaplus/Makefile hardware/kecheng-kc-330b/Makefile hardware/lascar-el-usb/Makefile hardware/mic-985xx/Makefile - hardware/rigol-ds1xx2/Makefile + hardware/rigol-ds/Makefile hardware/saleae-logic16/Makefile hardware/teleinfo/Makefile hardware/tondaj-sl-814/Makefile @@ -521,6 +567,7 @@ AC_CONFIG_FILES([Makefile version.h hardware/Makefile hardware/fx2lafw/Makefile hardware/hantek-dso/Makefile hardware/link-mso19/Makefile + hardware/norma-dmm/Makefile hardware/openbench-logic-sniffer/Makefile hardware/serial-dmm/Makefile hardware/uni-t-dmm/Makefile @@ -549,7 +596,7 @@ echo "Detected libraries:" echo # Note: This only works for libs with pkg-config integration. -for lib in "glib-2.0 >= 2.32.0" "libzip >= 0.10" "libusb-1.0 >= 1.0.9" "libftdi >= 0.16" "libudev >= 151" "alsa >= 1.0" "check >= 0.9.4"; do +for lib in "glib-2.0 >= 2.32.0" "libzip >= 0.10" "libserialport >= 0.1.0" "libusb-1.0 >= 1.0.9" "libftdi >= 0.16" "libudev >= 151" "alsa >= 1.0" "check >= 0.9.4"; do if `$PKG_CONFIG --exists $lib`; then ver=`$PKG_CONFIG --modversion $lib` answer="yes ($ver)" @@ -571,6 +618,8 @@ echo " - colead-slm...................... $HW_COLEAD_SLM" echo " - demo............................ $HW_DEMO" echo " - fluke-dmm....................... $HW_FLUKE_DMM" echo " - fx2lafw......................... $HW_FX2LAFW" +echo " - gmc-mh-1x-2x.................... $HW_GMC_MH_1X_2X" +echo " - hameg-hmo....................... $HW_HAMEG_HMO" echo " - hantek-dso...................... $HW_HANTEK_DSO" echo " - ikalogic-scanalogic2............ $HW_IKALOGIC_SCANALOGIC2" echo " - ikalogic-scanaplus.............. $HW_IKALOGIC_SCANAPLUS" @@ -578,8 +627,9 @@ echo " - kecheng-kc-330b................. $HW_KECHENG_KC_330B" echo " - lascar-el-usb................... $HW_LASCAR_EL_USB" echo " - link-mso19 (EXPERIMENTAL)....... $HW_LINK_MSO19" echo " - mic-985xx....................... $HW_MIC_985XX" +echo " - norma-dmm....................... $HW_NORMA_DMM" echo " - openbench-logic-sniffer......... $HW_OLS" -echo " - rigol-ds1xx2.................... $HW_RIGOL_DS1XX2" +echo " - rigol-ds........................ $HW_RIGOL_DS" echo " - saleae-logic16.................. $HW_SALEAE_LOGIC16" echo " - serial-dmm...................... $HW_SERIAL_DMM" echo " - teleinfo........................ $HW_TELEINFO"