X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=c35bf4245ab8c02b0d6ee5bbebe0cd8cb97ba3de;hb=82b01e42f8c1bace29fb273417571543548618ad;hp=01163cde0ebd6864e19c5f1de7ff9ca5bd1c32d4;hpb=65489c1ada6a362a492b7929c1a567a80266f202;p=libsigrok.git diff --git a/configure.ac b/configure.ac index 01163cde..c35bf424 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ AC_CONFIG_HEADERS([config.h include/libsigrok/version.h]) # We require at least automake 1.11 (needed for 'silent rules'). AM_INIT_AUTOMAKE([1.11 -Wall -Werror no-define nostdinc subdir-objects check-news color-tests]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AM_SILENT_RULES([yes]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AH_TOP([#ifndef SR_CONFIG_H @@ -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= @@ -115,6 +130,7 @@ SR_CHECK_COMPILE_FLAGS([SR_EXTRA_CFLAGS], [visibility], [-fvisibility=hidden]) SR_ARG_ENABLE_WARNINGS([SR_WFLAGS], [-Wall], [-Wall -Wextra -Wmissing-prototypes]) # Check host characteristics. +AC_SYS_LARGEFILE AC_C_BIGENDIAN AC_CHECK_HEADERS([sys/mman.h], [SR_APPEND([sr_deps_avail], [sys_mman_h])]) @@ -122,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]) @@ -205,6 +221,7 @@ SR_DRIVER([Hantek DSO], [hantek-dso], [libusb]) SR_DRIVER([Ikalogic Scanalogic-2], [ikalogic-scanalogic2], [libusb]) SR_DRIVER([Ikalogic Scanaplus], [ikalogic-scanaplus], [libftdi]) SR_DRIVER([Kecheng KC-330B], [kecheng-kc-330b], [libusb]) +SR_DRIVER([KERN scale], [kern-scale], [libserialport]) SR_DRIVER([Lascar EL-USB], [lascar-el-usb], [libusb]) SR_DRIVER([Manson HCS-3xxx], [manson-hcs-3xxx], [libserialport]) SR_DRIVER([maynuo-m97], [maynuo-m97]) @@ -431,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):