X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=configure.ac;h=84bfe8c51e29ab462b4c30217fb506e3cba9c042;hb=4825cf6e51535f5c1550bc753bbc2f5161905543;hp=e185115b34a7886045388d79bf24808748a0b6a4;hpb=d0f9d8cb8786b82775176fc14a04025cd16e1b42;p=collectd.git diff --git a/configure.ac b/configure.ac index e185115b..84bfe8c5 100644 --- a/configure.ac +++ b/configure.ac @@ -396,7 +396,7 @@ AC_CHECK_HEADERS(sys/sysctl.h, [], [], AC_MSG_CHECKING([for sysctl kern.cp_times]) if test -x /sbin/sysctl then - /sbin/sysctl kern.cp_times 2>/dev/null + /sbin/sysctl kern.cp_times >/dev/null 2>&1 if test $? -eq 0 then AC_MSG_RESULT([yes]) @@ -3235,13 +3235,13 @@ fi # --with-libowcapi {{{ with_libowcapi_cppflags="" -with_libowcapi_libs="-lowcapi" +with_libowcapi_ldflags="" AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])], [ if test "x$withval" != "xno" && test "x$withval" != "xyes" then with_libowcapi_cppflags="-I$withval/include" - with_libowcapi_libs="-L$withval/lib -lowcapi" + with_libowcapi_ldflags="-L$withval/lib" with_libowcapi="yes" else with_libowcapi="$withval" @@ -3253,7 +3253,7 @@ AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path if test "x$with_libowcapi" = "xyes" then SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$with_libowcapi_cppflags" + CPPFLAGS="$CPPFLAGS $with_libowcapi_cppflags" AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"]) @@ -3263,7 +3263,7 @@ if test "x$with_libowcapi" = "xyes" then SAVE_LDFLAGS="$LDFLAGS" SAVE_CPPFLAGS="$CPPFLAGS" - LDFLAGS="$with_libowcapi_libs" + LDFLAGS="$LDFLAGS $with_libowcapi_ldflags" CPPFLAGS="$with_libowcapi_cppflags" AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"]) @@ -3274,8 +3274,10 @@ fi if test "x$with_libowcapi" = "xyes" then BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags" - BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs" + BUILD_WITH_LIBOWCAPI_LDFLAGS="$with_libowcapi_ldflags" + BUILD_WITH_LIBOWCAPI_LIBS="-lowcapi" AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBOWCAPI_LDFLAGS) AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS) fi # }}} @@ -4085,11 +4087,6 @@ then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_sensors_cflags" -# AC_CHECK_HEADERS(sensors/sensors.h, -# [ -# AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the header file.]) -# ], -# [with_libsensors="no (sensors/sensors.h not found)"]) AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"]) CPPFLAGS="$SAVE_CPPFLAGS" @@ -5414,7 +5411,6 @@ then fi # libi2c-dev -with_libi2c="no" if test "x$ac_system" = "xLinux" then AC_CHECK_DECL(i2c_smbus_read_i2c_block_data, @@ -5422,6 +5418,8 @@ AC_CHECK_DECL(i2c_smbus_read_i2c_block_data, [with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"], [[#include #include ]]) +else + with_libi2c="no (Linux only)" fi if test "x$with_libi2c" = "xyes"