# 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
## 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])
SR_PKGLIBS_TESTS=
SR_PKGLIBS_CXX=
SR_PKGLIBS_PYTHON=
+SR_EXTRA_LIBS=
SR_ARG_OPT_PKG([libserialport], [LIBSERIALPORT], [NEED_SERIAL],
[libserialport >= 0.1.1])
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 <ieee1284.h>]],
+ [[(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 ##
######################
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=
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])
- 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):