]> sigrok.org Git - libsigrok.git/blobdiff - configure.ac
configure.ac: Add missing AM_PROG_CC_C_O.
[libsigrok.git] / configure.ac
index 356debf46509e4e6f74663fa4367b757dc13f519..908afe9a905022d90ec413a10beee59eac36b884 100644 (file)
@@ -47,12 +47,14 @@ AH_BOTTOM([#endif /* SR_CONFIG_H */])
 CFLAGS="$CFLAGS -Wall -Wextra -fvisibility=hidden"
 
 # Checks for programs.
-AC_PROG_CXX
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_LN_S
 
+# Required for per-target flags or subdir-objects with C sources.
+AM_PROG_CC_C_O
+
 # Initialize libtool.
 LT_INIT
 
@@ -109,6 +111,15 @@ if test "x$LA_ASIX_SIGMA" = "xyes"; then
        AC_DEFINE(HAVE_LA_ASIX_SIGMA, 1, [ASIX SIGMA/SIGMA2 support])
 fi
 
+AC_ARG_ENABLE(brymen-dmm, AC_HELP_STRING([--enable-brymen-dmm],
+       [enable Brymen DMM support [default=yes]]),
+       [HW_BRYMEN_DMM="$enableval"],
+       [HW_BRYMEN_DMM=yes])
+AM_CONDITIONAL(HW_BRYMEN_DMM, test x$HW_BRYMEN_DMM = xyes)
+if test "x$HW_BRYMEN_DMM" = "xyes"; then
+       AC_DEFINE(HAVE_HW_BRYMEN_DMM, 1, [brymen-dmm support])
+fi
+
 AC_ARG_ENABLE(chronovu-la8, AC_HELP_STRING([--enable-chronovu-la8],
        [enable ChronoVu LA8 support [default=yes]]),
        [LA_CHRONOVU_LA8="$enableval"],
@@ -181,6 +192,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(mic-985xx, AC_HELP_STRING([--enable-mic-985xx],
+       [enable MIC 985xx support [default=yes]]),
+       [HW_MIC_985XX="$enableval"],
+       [HW_MIC_985XX=yes])
+AM_CONDITIONAL(HW_MIC_985XX, test x$HW_MIC_985XX = xyes)
+if test "x$HW_MIC_985XX" = "xyes"; then
+       AC_DEFINE(HAVE_HW_MIC_985XX, 1, [MIC 985xx support])
+fi
+
 AC_ARG_ENABLE(nexus-osciprime, AC_HELP_STRING([--enable-nexus-osciprime],
        [enable Nexus Osciprime support [default=yes]]),
        [HW_NEXUS_OSCIPRIME="$enableval"],
@@ -320,6 +340,12 @@ if test "x$HW_ALSA" != xno; then
                SR_PKGLIBS="$SR_PKGLIBS alsa"])
 fi
 
+# The Check unit testing framework is optional.
+PKG_CHECK_MODULES([check], [check >= 0.9.4],
+       [have_check="yes"; CFLAGS="$CFLAGS $check_CFLAGS";
+       LIBS="$LIBS $check_LIBS"], [have_check="no"])
+AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+
 # EZUSB FX2 firmware helper code is only needed for some hardware drivers.
 AM_CONDITIONAL(NEED_EZUSB, \
        test "x$LA_FX2LAFW" != xno \
@@ -376,10 +402,12 @@ AC_CONFIG_FILES([Makefile version.h hardware/Makefile
                 hardware/agilent-dmm/Makefile
                 hardware/alsa/Makefile
                 hardware/asix-sigma/Makefile
+                hardware/brymen-dmm/Makefile
                 hardware/chronovu-la8/Makefile
                 hardware/colead-slm/Makefile
                 hardware/common/Makefile
                 hardware/lascar-el-usb/Makefile
+                hardware/mic-985xx/Makefile
                 hardware/nexus-osciprime/Makefile
                 hardware/rigol-ds1xx2/Makefile
                 hardware/tondaj-sl-814/Makefile
@@ -399,6 +427,7 @@ AC_CONFIG_FILES([Makefile version.h hardware/Makefile
                 output/text/Makefile
                 libsigrok.pc
                 contrib/Makefile
+                tests/Makefile
                ])
 
 AC_OUTPUT
@@ -414,7 +443,7 @@ echo "Detected libraries:"
 echo
 
 # Note: This only works for libs with pkg-config integration.
-for lib in "glib-2.0" "libusb-1.0" "libzip" "libftdi" "libudev" "alsa"; do
+for lib in "glib-2.0" "libusb-1.0" "libzip" "libftdi" "libudev" "alsa" "check"; do
        if `$PKG_CONFIG --exists $lib`; then
                ver=`$PKG_CONFIG --modversion $lib`
                answer="yes ($ver)"
@@ -428,6 +457,7 @@ echo -e "\nEnabled hardware drivers:\n"
 echo "  - Agilent DMM..................... $HW_AGILENT_DMM"
 echo "  - ALSA............................ $HW_ALSA"
 echo "  - ASIX SIGMA/SIGMA2............... $LA_ASIX_SIGMA"
+echo "  - Brymen DMM...................... $HW_BRYMEN_DMM"
 echo "  - ChronoVu LA8.................... $LA_CHRONOVU_LA8"
 echo "  - Colead SLM...................... $HW_COLEAD_SLM"
 echo "  - Demo driver..................... $LA_DEMO"
@@ -436,6 +466,7 @@ echo "  - fx2lafw (for FX2 LAs)........... $LA_FX2LAFW"
 echo "  - Hantek DSO...................... $HW_HANTEK_DSO"
 echo "  - Lascar EL-USB................... $HW_LASCAR_EL_USB"
 echo "  - Link MSO-19..................... $LA_LINK_MSO19"
+echo "  - MIC 985xx....................... $HW_MIC_985XX"
 echo "  - Nexus Osciprime................. $HW_NEXUS_OSCIPRIME"
 echo "  - Openbench Logic Sniffer......... $LA_OLS"
 echo "  - Rigol DS1xx2.................... $HW_RIGOL_DS1XX2"