X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=aa5cdad554acff0437e98997b2741208bf5a5375;hb=28d86fa9a5d24bbcafeddbe2330f18a3e91501b1;hp=f283ca00560960cb20389fcfff24f715c0fa8f24;hpb=e662d9e8e5c6a5d677194fc217da3a88040387a3;p=libsigrok.git diff --git a/configure.ac b/configure.ac index f283ca00..aa5cdad5 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 @@ -73,7 +73,7 @@ SR_PKG_CHECK_SUMMARY([sr_pkglibs_summary]) # These are used to derive the compiler flags and for the "Requires.private" # field in the generated libsigrok.pc file. SR_VAR_OPT_PKG([SR_PKGLIBS], [sr_deps_avail]) -SR_PKGLIBS_CHECK= +SR_PKGLIBS_TESTS= SR_PKGLIBS_CXX= SR_PKGLIBS_PYTHON= @@ -101,7 +101,7 @@ SR_ARG_OPT_PKG([libgpib], [LIBGPIB], [NEED_GPIB], ###################### # The Check unit testing framework is optional. Disable if not found. -SR_PKG_CHECK([check], [SR_PKGLIBS_CHECK], [check >= 0.9.4]) +SR_PKG_CHECK([check], [SR_PKGLIBS_TESTS], [check >= 0.9.4]) AM_CONDITIONAL([HAVE_CHECK], [test "x$sr_have_check" = xyes]) AC_LANG([C]) @@ -115,6 +115,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])]) @@ -127,6 +128,25 @@ AS_CASE([$host], [*-mingw*], [SR_EXTRA_LIBS='-lws2_32'], [SR_EXTRA_LIBS=]) # libm (the standard math library) is always needed. SR_SEARCH_LIBS([SR_EXTRA_LIBS], [pow], [m]) +AC_ARG_WITH([libieee1284], [AS_HELP_STRING([--without-libieee1284], + [disable libieee1284 support [default=detect]])]) +sr_have_libieee1284=no +AS_IF([test "x$with_libieee1284" != xno], [ + AC_CHECK_HEADER([ieee1284.h], [ + SR_SEARCH_LIBS([SR_EXTRA_LIBS], [ieee1284_open], [ieee1284], [ + sr_have_libieee1284=yes + SR_APPEND([sr_deps_avail], [libieee1284]) + sr_pkg_check_summary_append "libieee1284" yes + ]) + ]) + AS_IF([test "$sr_have_libieee1284" = no], [ + AS_IF([test "x$with_libieee1284" = xyes], [ + AC_MSG_ERROR([libieee1284 support requested, but it was not found.]) + ]) + sr_pkg_check_summary_append "libieee1284" no + ]) +]) + # RPC is only needed for VXI support. AC_CACHE_CHECK([for RPC support], [sr_cv_have_rpc], [AC_LINK_IFELSE([AC_LANG_PROGRAM( @@ -205,6 +225,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]) @@ -395,7 +416,7 @@ AC_SUBST([SR_PKGLIBS]) # Retrieve the compile and link flags for all modules combined. # Also, bail out at this point if any module dependency is not met. PKG_CHECK_MODULES([LIBSIGROK], [glib-2.0 >= 2.32.0 $SR_PKGLIBS]) -PKG_CHECK_MODULES([CHECK], [$SR_PKGLIBS_CHECK glib-2.0 $SR_PKGLIBS]) +PKG_CHECK_MODULES([TESTS], [$SR_PKGLIBS_TESTS glib-2.0 $SR_PKGLIBS]) # SR_PKGLIBS_CXX may be empty, so only invoke these checks when # the C++ bindings are enabled.