-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
-
-# 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"],
- [LA_LINK_MSO19=no])
-AM_CONDITIONAL(LA_LINK_MSO19, test x$LA_LINK_MSO19 = xyes)
-if test "x$LA_LINK_MSO19" = "xyes"; then
- AC_DEFINE(HAVE_LA_LINK_MSO19, 1, [Link Instruments MSO-19 support])
-fi
-
-AC_ARG_ENABLE(ols, AC_HELP_STRING([--enable-ols],
- [enable OpenBench Logic Sniffer (OLS) support [default=yes]]),
- [LA_OLS="$enableval"],
- [LA_OLS=yes])
-AM_CONDITIONAL(LA_OLS, test x$LA_OLS = xyes)
-if test "x$LA_OLS" = "xyes"; then
- AC_DEFINE(HAVE_LA_OLS, 1, [OpenBench Logic Sniffer (OLS) support])
-fi
-
-AC_ARG_ENABLE(saleae-logic, AC_HELP_STRING([--enable-saleae-logic],
- [enable Saleae Logic support [default=yes]]),
- [LA_SALEAE_LOGIC="$enableval"],
- [LA_SALEAE_LOGIC=yes])
-AM_CONDITIONAL(LA_SALEAE_LOGIC, test x$LA_SALEAE_LOGIC = xyes)
-if test "x$LA_SALEAE_LOGIC" = "xyes"; then
- AC_DEFINE(HAVE_LA_SALEAE_LOGIC, 1, [Saleae Logic support])
-fi
-
-AC_ARG_ENABLE(zeroplus-logic-cube,
- AC_HELP_STRING([--enable-zeroplus-logic-cube],
- [enable Zeroplus Logic Cube support [default=yes]]),
- [LA_ZEROPLUS_LOGIC_CUBE="$enableval"],
- [LA_ZEROPLUS_LOGIC_CUBE=yes])
-AM_CONDITIONAL(LA_ZEROPLUS_LOGIC_CUBE, test x$LA_ZEROPLUS_LOGIC_CUBE = xyes)
-if test "x$LA_ZEROPLUS_LOGIC_CUBE" = "xyes"; then
- AC_DEFINE(HAVE_LA_ZEROPLUS_LOGIC_CUBE, 1, [Zeroplus Logic Cube support])
-fi
-
-# Checks for libraries.
-
-# 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.
-LIBSIGROK_PKGLIBS=""
-
-# libglib-2.0 is always needed.
-# Note: glib-2.0 is part of the libsigrok API (hard pkg-config requirement).
-AM_PATH_GLIB_2_0([2.22.0],
- [CFLAGS="$CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"])
-
-# libgthread-2.0 is always needed (e.g. for the demo hardware driver).
-PKG_CHECK_MODULES([gthread], [gthread-2.0 >= 2.22.0],
- [CFLAGS="$CFLAGS $gthread_CFLAGS"; LIBS="$LIBS $gthread_LIBS";
- LIBSIGROK_PKGLIBS="$LIBSIGROK_PKGLIBS gthread-2.0"])
-
-# libusb is only needed for some hardware drivers.
-if test "x$LA_SALEAE_LOGIC" != xno \
- -o "x$LA_ASIX_SIGMA" != xno \
- -o "x$LA_CHRONOVU_LA8" != xno \
- -o "x$LA_ZEROPLUS_LOGIC_CUBE" != xno; then
- case "$build" in
- *freebsd*)
- # FreeBSD comes with an "integrated" libusb-1.0-style USB API.
- AC_DEFINE_UNQUOTED(HAVE_LIBUSB_1_0, [1],
- [Specifies whether we have a libusb.h header.])
- ;;
- *)
- PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.5],
- [CFLAGS="$CFLAGS $libusb_CFLAGS";
- LIBS="$LIBS $libusb_LIBS";
- LIBSIGROK_PKGLIBS="$LIBSIGROK_PKGLIBS libusb-1.0"])
- AC_CHECK_LIB(usb-1.0, libusb_init)
- ;;
- esac
-fi