X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=configure.ac;h=83e6dc17c88f344df557e48425de0ff3ec7f4232;hb=d0b5df47bb6fc6ae8a5ff9ed5a43349ec84721e2;hp=3d4727986f011d0909e4d4670e800fb7e79306d2;hpb=1e1612fc52d593e122787e56991f2e28cd257e6a;p=collectd.git diff --git a/configure.ac b/configure.ac index 3d472798..83e6dc17 100644 --- a/configure.ac +++ b/configure.ac @@ -5270,6 +5270,27 @@ if test "x$with_libsensors" = "xyes"; then fi if test "x$with_libsensors" = "xyes"; then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_sensors_cppflags" + AC_PREPROC_IFELSE( + [ + AC_LANG_SOURCE( + [[ + #include + #if SENSORS_API_VERSION < 0x400 + #error "required libsensors version >= 3.0" + #endif + ]] + ) + ], + [with_libsensors="yes"], + [with_libsensors="no (sensors library version 3.0.0 or higher is required)"] + ) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi + +if test "x$with_libsensors" = "xyes"; then BUILD_WITH_LIBSENSORS_CPPFLAGS="$with_sensors_cppflags" BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags" BUILD_WITH_LIBSENSORS_LIBS="-lsensors"