X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=c35bf4245ab8c02b0d6ee5bbebe0cd8cb97ba3de;hb=82b01e42f8c1bace29fb273417571543548618ad;hp=b4a4332eae15f01932c649a693a790af3f3f490b;hpb=bbb3996c06f2b1ebc9529d1e2181ddc55f70d9da;p=libsigrok.git diff --git a/configure.ac b/configure.ac index b4a4332e..c35bf424 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,9 @@ AC_PROG_LN_S # Required for per-target flags or subdir-objects with C sources. AM_PROG_CC_C_O +# Check if order-only dependencies are supported. +SR_PROG_MAKE_ORDER_ONLY + # Initialize libtool. LT_INIT @@ -62,6 +65,8 @@ SR_LIB_VERSION_SET([SR_LIB_VERSION], [2:0:0]) ## Optional dependencies ## ############################# +AC_LANG([C]) + # Initialize pkg-config. # We require at least 0.22, as "Requires.private" behaviour changed there. PKG_PROG_PKG_CONFIG([0.22]) @@ -76,6 +81,7 @@ SR_VAR_OPT_PKG([SR_PKGLIBS], [sr_deps_avail]) SR_PKGLIBS_TESTS= SR_PKGLIBS_CXX= SR_PKGLIBS_PYTHON= +SR_EXTRA_LIBS= SR_ARG_OPT_PKG([libserialport], [LIBSERIALPORT], [NEED_SERIAL], [libserialport >= 0.1.1]) @@ -96,6 +102,17 @@ SR_ARG_OPT_PKG([librevisa], [LIBREVISA], [NEED_VISA], SR_ARG_OPT_PKG([libgpib], [LIBGPIB], [NEED_GPIB], [libgpib]) +SR_ARG_OPT_CHECK([libieee1284], [LIBIEEE1284],, [ + sr_save_LIBS=$LIBS + LIBS="-lieee1284 $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[(void) ieee1284_open(0, 0, 0);]])], + [sr_have_libieee1284=yes], [sr_have_libieee1284=no]) + sr_save_LIBS=$LIBS +]) +AS_IF([test "x$sr_have_libieee1284" = xyes], + [SR_PREPEND([SR_EXTRA_LIBS], [-lieee1284])]) + ###################### ## Feature checks ## ###################### @@ -104,8 +121,6 @@ SR_ARG_OPT_PKG([libgpib], [LIBGPIB], [NEED_GPIB], SR_PKG_CHECK([check], [SR_PKGLIBS_TESTS], [check >= 0.9.4]) AM_CONDITIONAL([HAVE_CHECK], [test "x$sr_have_check" = xyes]) -AC_LANG([C]) - # Enable the C99 standard if possible, and enforce the use # of SR_API to explicitly mark all public API functions. SR_EXTRA_CFLAGS= @@ -123,7 +138,7 @@ AC_CHECK_HEADERS([sys/ioctl.h], [SR_APPEND([sr_deps_avail], [sys_ioctl_h])]) AC_CHECK_HEADERS([sys/timerfd.h], [SR_APPEND([sr_deps_avail], [sys_timerfd_h])]) # We need to link against the Winsock2 library for SCPI over TCP. -AS_CASE([$host], [*-mingw*], [SR_EXTRA_LIBS='-lws2_32'], [SR_EXTRA_LIBS=]) +AS_CASE([$host_os], [mingw*], [SR_PREPEND([SR_EXTRA_LIBS], [-lws2_32])]) # libm (the standard math library) is always needed. SR_SEARCH_LIBS([SR_EXTRA_LIBS], [pow], [m]) @@ -433,8 +448,12 @@ libsigrok configuration summary: - Prefix.......................... $prefix - Building on..................... $build - Building for.................... $host + - C compiler...................... $CC + - C compiler flags................ $CFLAGS - Additional C compiler flags..... $SR_EXTRA_CFLAGS - C compiler warnings............. $SR_WFLAGS + - C++ compiler.................... $CXX + - C++ compiler flags.............. $CXXFLAGS - C++ compiler warnings........... $SR_WXXFLAGS Detected libraries (required):