X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=2ffa717974959a6fe2b303f54d0540aa07c85277;hb=adc145315053e6d86bcdaf3738a7ee763c233e02;hp=3b6d10e8c4f93a8ee5529fd2ec6ec909fa47249f;hpb=10d9557ebfa292caf3df64f7ae830532446047f8;p=collectd.git diff --git a/configure.ac b/configure.ac index 3b6d10e8..2ffa7179 100644 --- a/configure.ac +++ b/configure.ac @@ -2465,13 +2465,30 @@ if test "x$with_libdpdk" != "xno"; then fi if test "x$with_libdpdk" = "xyes"; then + SAVE_LIBS="$LIBS" + LIBS="$LIBDPDK_LIBS $LIBS" SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS" - AC_CHECK_LIB([dpdk], [rte_eal_init], + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS" + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$LIBDPDK_CFLAGS $CFLAGS" + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[ + #include + ]], + [[return rte_eal_init(0, NULL);]] + ) + ], [with_libdpdk="yes"], [with_libdpdk="no (symbol 'rte_eal_init' not found)"] ) + LIBS="$SAVE_LIBS" LDFLAGS="$SAVE_LDFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" + CFLAGS="$SAVE_CFLAGS" fi # }}} @@ -3523,10 +3540,12 @@ fi if test "x$with_libmongoc" = "xyes"; then BUILD_WITH_LIBMONGOC_CFLAGS="$LIBMONGOC_CFLAGS" BUILD_WITH_LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS" + BUILD_WITH_LIBMONGOC_LIBS="$LIBMONGOC_LIBS" fi AC_SUBST([BUILD_WITH_LIBMONGOC_CFLAGS]) AC_SUBST([BUILD_WITH_LIBMONGOC_LDFLAGS]) +AC_SUBST([BUILD_WITH_LIBMONGOC_LIBS]) # }}} # --with-libmosquitto {{{ @@ -5268,6 +5287,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"