X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=40da7be8f64b6a47f1417733029228e35846272a;hb=a97a3d708930a62bbc296785664b0d2677b233b2;hp=f177c87f56f900cb0e642a24338515e7b28a87c4;hpb=ef2345bc29fc8b3bc31e5d89e028be31c7b39428;p=libsigrok.git diff --git a/configure.ac b/configure.ac index f177c87f..40da7be8 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,7 @@ ## This file is part of the sigrok project. ## ## Copyright (C) 2010-2012 Bert Vermeulen +## Copyright (C) 2012 Alexandru Gagniuc ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -63,7 +64,7 @@ PKG_PROG_PKG_CONFIG([0.22]) # 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_CURRENT=1 +SR_LIB_VERSION_CURRENT=2 SR_LIB_VERSION_REVISION=0 SR_LIB_VERSION_AGE=0 SR_LIB_VERSION="$SR_LIB_VERSION_CURRENT:$SR_LIB_VERSION_REVISION:$SR_LIB_VERSION_AGE" @@ -74,16 +75,24 @@ AC_SUBST(SR_LIB_VERSION_AGE) AC_SUBST(SR_LIB_VERSION) AC_SUBST(SR_LIB_LDFLAGS) -# Logic analyzer hardware support '--enable' options. +# Hardware support '--enable' options. + +AC_ARG_ENABLE(agilent-dmm, AC_HELP_STRING([--enable-agilent-dmm], + [enable Agilent DMM support [default=yes]]), + [HW_AGILENT_DMM="$enableval"], + [HW_AGILENT_DMM=yes]) +AM_CONDITIONAL(HW_AGILENT_DMM, test x$HW_AGILENT_DMM = xyes) +if test "x$HW_AGILENT_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_AGILENT_DMM, 1, [Agilent DMM support]) +fi -# Disabled by default, unfinished. AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], - [enable ALSA driver support [default=no]]), - [LA_ALSA="$enableval"], - [LA_ALSA=no]) -AM_CONDITIONAL(LA_ALSA, test x$LA_ALSA = xyes) -if test "x$LA_ALSA" = "xyes"; then - AC_DEFINE(HAVE_LA_ALSA, 1, [ALSA driver support]) + [enable ALSA driver support [default=yes]]), + [HW_ALSA="$enableval"], + [HW_ALSA=yes]) +AM_CONDITIONAL(HW_ALSA, test x$HW_ALSA = xyes) +if test "x$HW_ALSA" = "xyes"; then + AC_DEFINE(HAVE_HW_ALSA, 1, [ALSA driver support]) fi AC_ARG_ENABLE(asix-sigma, AC_HELP_STRING([--enable-asix-sigma], @@ -104,6 +113,33 @@ if test "x$LA_CHRONOVU_LA8" = "xyes"; then AC_DEFINE(HAVE_LA_CHRONOVU_LA8, 1, [ChronoVu LA8 support]) fi +AC_ARG_ENABLE(colead-slm, AC_HELP_STRING([--enable-colead-slm], + [enable Colead SLM support [default=yes]]), + [HW_COLEAD_SLM="$enableval"], + [HW_COLEAD_SLM=yes]) +AM_CONDITIONAL(HW_COLEAD_SLM, test x$HW_COLEAD_SLM = xyes) +if test "x$HW_COLEAD_SLM" = "xyes"; then + AC_DEFINE(HAVE_HW_COLEAD_SLM, 1, [Colead SLM support]) +fi + +AC_ARG_ENABLE(demo, AC_HELP_STRING([--enable-demo], + [enable demo driver support [default=yes]]), + [LA_DEMO="$enableval"], + [LA_DEMO=yes]) +AM_CONDITIONAL(LA_DEMO, test x$LA_DEMO = xyes) +if test "x$LA_DEMO" = "xyes"; then + AC_DEFINE(HAVE_LA_DEMO, 1, [Demo driver support]) +fi + +AC_ARG_ENABLE(fluke-dmm, AC_HELP_STRING([--enable-fluke-dmm], + [enable Fluke DMM support [default=yes]]), + [HW_FLUKE_DMM="$enableval"], + [HW_FLUKE_DMM=yes]) +AM_CONDITIONAL(HW_FLUKE_DMM, test x$HW_FLUKE_DMM = xyes) +if test "x$HW_FLUKE_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_FLUKE_DMM, 1, [Fluke DMM support]) +fi + AC_ARG_ENABLE(fx2lafw, AC_HELP_STRING([--enable-fx2lafw], [enable fx2lafw support (for FX2 LAs). [default=yes]]), [LA_FX2LAFW="$enableval"], @@ -113,26 +149,25 @@ if test "x$LA_FX2LAFW" = "xyes"; then AC_DEFINE(HAVE_LA_FX2LAFW, 1, [fx2lafw support]) fi -# Disabled by default for now -AC_ARG_ENABLE(genericdmm, AC_HELP_STRING([--enable-genericdmm], - [enable genericdmm support (for most DMMs). [default=no]]), - [HW_GENERICDMM="$enableval"], - [HW_GENERICDMM=no]) -AM_CONDITIONAL(HW_GENERICDMM, test x$HW_GENERICDMM = xyes) -if test "x$HW_GENERICDMM" = "xyes"; then - AC_DEFINE(HAVE_HW_GENERICDMM, 1, [Generic DMM support]) +AC_ARG_ENABLE(hantek-dso, AC_HELP_STRING([--enable-hantek-dso], + [enable Hantek DSO support [default=yes]]), + [HW_HANTEK_DSO="$enableval"], + [HW_HANTEK_DSO=yes]) +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 -AC_ARG_ENABLE(demo, AC_HELP_STRING([--enable-demo], - [enable demo driver support [default=yes]]), - [LA_DEMO="$enableval"], - [LA_DEMO=yes]) -AM_CONDITIONAL(LA_DEMO, test x$LA_DEMO = xyes) -if test "x$LA_DEMO" = "xyes"; then - AC_DEFINE(HAVE_LA_DEMO, 1, [Demo driver support]) +# Disabled by default, unfinished. +AC_ARG_ENABLE(lascar-el-usb, AC_HELP_STRING([--enable-lascar-el-usb], + [enable Lascar EL-USB support [default=yes]]), + [HW_LASCAR_EL_USB="$enableval"], + [HW_LASCAR_EL_USB=yes]) +AM_CONDITIONAL(HW_LASCAR_EL_USB, test x$HW_LASCAR_EL_USB = xyes) +if test "x$HW_LASCAR_EL_USB" = "xyes"; then + AC_DEFINE(HAVE_HW_LASCAR_EL_USB, 1, [Lascar EL-USB support]) fi -# Disabled by default, unfinished. AC_ARG_ENABLE(link-mso19, AC_HELP_STRING([--enable-link-mso19], [enable Link Instruments MSO-19 support [default=no]]), [LA_LINK_MSO19="$enableval"], @@ -142,6 +177,15 @@ if test "x$LA_LINK_MSO19" = "xyes"; then AC_DEFINE(HAVE_LA_LINK_MSO19, 1, [Link Instruments MSO-19 support]) fi +AC_ARG_ENABLE(nexus-osciprime, AC_HELP_STRING([--enable-nexus-osciprime], + [enable Nexus Osciprime support [default=yes]]), + [HW_NEXUS_OSCIPRIME="$enableval"], + [HW_NEXUS_OSCIPRIME=yes]) +AM_CONDITIONAL(HW_NEXUS_OSCIPRIME, test x$HW_NEXUS_OSCIPRIME = xyes) +if test "x$HW_NEXUS_OSCIPRIME" = "xyes"; then + AC_DEFINE(HAVE_HW_NEXUS_OSCIPRIME, 1, [Nexus Osciprime support]) +fi + AC_ARG_ENABLE(ols, AC_HELP_STRING([--enable-ols], [enable OpenBench Logic Sniffer (OLS) support [default=yes]]), [LA_OLS="$enableval"], @@ -151,6 +195,42 @@ if test "x$LA_OLS" = "xyes"; then AC_DEFINE(HAVE_LA_OLS, 1, [OpenBench Logic Sniffer (OLS) support]) fi +AC_ARG_ENABLE(serial-dmm, AC_HELP_STRING([--enable-serial-dmm], + [enable serial DMM support [default=yes]]), + [HW_SERIAL_DMM="$enableval"], + [HW_SERIAL_DMM=yes]) +AM_CONDITIONAL(HW_SERIAL_DMM, test x$HW_SERIAL_DMM = xyes) +if test "x$HW_SERIAL_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_SERIAL_DMM, 1, [Serial DMM support]) +fi + +AC_ARG_ENABLE(tondaj-sl-814, AC_HELP_STRING([--enable-tondaj-sl-814], + [enable Tondaj SL-814 support [default=yes]]), + [HW_TONDAJ_SL_814="$enableval"], + [HW_TONDAJ_SL_814=yes]) +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]) +fi + +AC_ARG_ENABLE(uni-t-dmm, AC_HELP_STRING([--enable-uni-t-dmm], + [enable UNI-T DMM support [default=yes]]), + [HW_UNI_T_DMM="$enableval"], + [HW_UNI_T_DMM=yes]) +AM_CONDITIONAL(HW_UNI_T_DMM, test x$HW_UNI_T_DMM = xyes) +if test "x$HW_UNI_T_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_UNI_T_DMM, 1, [UNI-T DMM support]) +fi + +AC_ARG_ENABLE(victor-dmm, AC_HELP_STRING([--enable-victor-dmm], + [enable victor-dmm support [default=yes]]), + [HW_VICTOR_DMM="$enableval"], + [HW_VICTOR_DMM=yes]) +AM_CONDITIONAL(HW_VICTOR_DMM, test x$HW_VICTOR_DMM = xyes) +if test "x$HW_VICTOR_DMM" = "xyes"; then + AC_DEFINE(HAVE_HW_VICTOR_DMM, 1, [victor-dmm support]) +fi + AC_ARG_ENABLE(zeroplus-logic-cube, AC_HELP_STRING([--enable-zeroplus-logic-cube], [enable ZEROPLUS Logic Cube support [default=yes]]), @@ -161,16 +241,6 @@ if test "x$LA_ZEROPLUS_LOGIC_CUBE" = "xyes"; then AC_DEFINE(HAVE_LA_ZEROPLUS_LOGIC_CUBE, 1, [ZEROPLUS Logic Cube support]) fi -AC_ARG_ENABLE(hantek-dso, - AC_HELP_STRING([--enable-hantek-dso], - [enable Hantek DSO support [default=yes]]), - [HW_HANTEK_DSO="$enableval"], - [HW_HANTEK_DSO=yes]) -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 - # Checks for libraries. # This variable collects the pkg-config names of all detected libs. @@ -188,7 +258,7 @@ PKG_CHECK_MODULES([gthread], [gthread-2.0 >= 2.22.0], [CFLAGS="$CFLAGS $gthread_CFLAGS"; LIBS="$LIBS $gthread_LIBS"; SR_PKGLIBS="$SR_PKGLIBS gthread-2.0"]) -# libusb is only needed for some hardware drivers. +# libusb-1.0 is only needed for some hardware drivers. if test "x$LA_ASIX_SIGMA" != xno \ -o "x$LA_CHRONOVU_LA8" != xno \ -o "x$LA_FX2LAFW" != xno \ @@ -201,11 +271,15 @@ if test "x$LA_ASIX_SIGMA" != xno \ [Specifies whether we have a libusb.h header.]) ;; *) - PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.5], + PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.9], [CFLAGS="$CFLAGS $libusb_CFLAGS"; LIBS="$LIBS $libusb_LIBS"; SR_PKGLIBS="$SR_PKGLIBS libusb-1.0"]) - AC_CHECK_LIB(usb-1.0, libusb_init) + # Define HAVE_LIBUSB_1_0 in config.h if we found libusb-1.0. + if test "x$libusb_CFLAGS" != "x"; then + AC_DEFINE_UNQUOTED(HAVE_LIBUSB_1_0, [1], + [Specifies whether we have a libusb.h header.]) + fi ;; esac fi @@ -232,22 +306,27 @@ if test "x$LA_LINK_MSO19" != xno; then fi # ALSA is only needed for some hardware drivers. -if test "x$LA_ALSA" != xno; then +if test "x$HW_ALSA" != xno; then PKG_CHECK_MODULES([alsa], [alsa >= 1.0], [CFLAGS="$CFLAGS $alsa_CFLAGS"; LIBS="$LIBS $alsa_LIBS"; SR_PKGLIBS="$SR_PKGLIBS alsa"]) fi -# EZUSB FX2 firmware helpers only needed for some hardware drivers +# EZUSB FX2 firmware helper code is only needed for some hardware drivers. AM_CONDITIONAL(NEED_EZUSB, \ test "x$LA_FX2LAFW" != xno \ -o "x$HW_HANTEK_DSO" != xno \ ) -# Serial port helpers only needed for some hardware drivers +# Serial port helper code is only needed for some hardware drivers. AM_CONDITIONAL(NEED_SERIAL, \ - test "x$LA_OLS" != xno \ - -o "x$HW_GENERICDMM" != xno \ + test "x$HW_AGILENT_DMM" != xno \ + -o "x$HW_COLEAD_SLM" != xno \ + -o "x$HW_FLUKE_DMM" != xno \ + -o "x$LA_LINK_MSO19" != xno \ + -o "x$LA_OLS" != xno \ + -o "x$HW_SERIAL_DMM" != xno \ + -o "x$HW_TONDAJ_SL_814" != xno \ ) AC_SUBST(SR_PKGLIBS) @@ -285,20 +364,27 @@ AC_SUBST(SR_PACKAGE_VERSION_MINOR) AC_SUBST(SR_PACKAGE_VERSION_MICRO) AC_SUBST(SR_PACKAGE_VERSION) -AC_CONFIG_FILES([Makefile - version.h - hardware/Makefile +AC_CONFIG_FILES([Makefile version.h hardware/Makefile + hardware/agilent-dmm/Makefile hardware/alsa/Makefile hardware/asix-sigma/Makefile hardware/chronovu-la8/Makefile + hardware/colead-slm/Makefile hardware/common/Makefile + hardware/lascar-el-usb/Makefile + hardware/nexus-osciprime/Makefile + hardware/tondaj-sl-814/Makefile + hardware/victor-dmm/Makefile + hardware/common/dmm/Makefile hardware/demo/Makefile + hardware/fluke-dmm/Makefile hardware/fx2lafw/Makefile - hardware/genericdmm/Makefile + hardware/hantek-dso/Makefile hardware/link-mso19/Makefile hardware/openbench-logic-sniffer/Makefile + hardware/serial-dmm/Makefile + hardware/uni-t-dmm/Makefile hardware/zeroplus-logic-cube/Makefile - hardware/hantek-dso/Makefile input/Makefile output/Makefile output/text/Makefile @@ -329,17 +415,24 @@ for lib in "glib-2.0" "gthread-2.0" "libusb-1.0" "libzip" "libftdi" "libudev" "a echo " - $lib: $answer" done -echo -echo "Enabled hardware drivers:" -echo +echo -e "\nEnabled hardware drivers:\n" +echo " - Agilent DMM..................... $HW_AGILENT_DMM" +echo " - ALSA............................ $HW_ALSA" echo " - ASIX SIGMA/SIGMA2............... $LA_ASIX_SIGMA" echo " - ChronoVu LA8.................... $LA_CHRONOVU_LA8" +echo " - Colead SLM...................... $HW_COLEAD_SLM" echo " - Demo driver..................... $LA_DEMO" +echo " - Fluke DMM....................... $HW_FLUKE_DMM" echo " - fx2lafw (for FX2 LAs)........... $LA_FX2LAFW" -echo " - Generic DMM..................... $HW_GENERICDMM" +echo " - Hantek DSO...................... $HW_HANTEK_DSO" +echo " - Lascar EL-USB................... $HW_LASCAR_EL_USB" echo " - Link MSO-19..................... $LA_LINK_MSO19" +echo " - Nexus Osciprime................. $HW_NEXUS_OSCIPRIME" echo " - Openbench Logic Sniffer......... $LA_OLS" +echo " - Serial DMM...................... $HW_SERIAL_DMM" +echo " - Tondaj SL-814................... $HW_TONDAJ_SL_814" +echo " - UNI-T DMM....................... $HW_UNI_T_DMM" +echo " - Victor DMM...................... $HW_VICTOR_DMM" echo " - ZEROPLUS Logic Cube............. $LA_ZEROPLUS_LOGIC_CUBE" -echo " - Hantek DSO...................... $HW_HANTEK_DSO" echo