X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=4aa3af7d5b7eac90318746c262faee717e5d9acd;hb=439a2277918a60c04e9606dd3e9ef3d7e8dcd856;hp=4437aeef7a9c6db152928f144dfac3629fb35acf;hpb=d76b962d383e2944fe390594ced38521ac04c846;p=collectd.git diff --git a/configure.ac b/configure.ac index 4437aeef..4aa3af7d 100644 --- a/configure.ac +++ b/configure.ac @@ -1621,18 +1621,32 @@ AC_CHECK_LIB(resolv, res_search, AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes") dnl Check for HAL (hardware abstraction library) -with_libhal="yes" -AC_CHECK_LIB(hal,libhal_device_property_exists, - [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])], - [with_libhal="no"]) -if test "x$with_libhal" = "xyes"; then - if test "x$PKG_CONFIG" != "x"; then - BUILD_WITH_LIBHAL_CFLAGS="`$PKG_CONFIG --cflags hal`" - BUILD_WITH_LIBHAL_LIBS="`$PKG_CONFIG --libs hal`" - AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS) - AC_SUBST(BUILD_WITH_LIBHAL_LIBS) - fi -fi +with_libhal="no" +PKG_CHECK_MODULES([HAL], [hal], + [ + SAVE_LIBS="$LIBS" + LIBS="$HAL_LIBS $LIBS" + AC_CHECK_LIB([hal], [libhal_device_property_exists], + [ + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$HAL_CFLAGS $CPPFLAGS" + AC_CHECK_HEADERS([libhal.h], + [ + with_libhal="yes" + BUILD_WITH_LIBHAL_CFLAGS="$HAL_CFLAGS" + BUILD_WITH_LIBHAL_LIBS="$HAL_LIBS" + ]) + CPPFLAGS="$SAVE_CPPFLAGS" + ], + [ : ] + ) + LIBS="$SAVE_LIBS" + ], + [ : ] +) +AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS) +AC_SUBST(BUILD_WITH_LIBHAL_LIBS) + SAVE_LIBS="$LIBS" AC_CHECK_LIB([pthread], @@ -1951,17 +1965,17 @@ then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $with_curl_cflags" - LDFLAGS="$LDFLAGS $curl_curl_libs" + LDFLAGS="$LDFLAGS $with_curl_libs" AC_CACHE_CHECK([for CURLINFO_APPCONNECT_TIME], [c_cv_have_curlinfo_appconnect_time], AC_LINK_IFELSE([AC_LANG_PROGRAM( -[[[ +[[ #include -]]], -[[[ +]], +[[ int val = CURLINFO_APPCONNECT_TIME; return val; -]]] +]] )], [c_cv_have_curlinfo_appconnect_time="yes"], [c_cv_have_curlinfo_appconnect_time="no"] @@ -4872,6 +4886,7 @@ then AC_SUBST(LIBXENCTL_CPPFLAGS) AC_SUBST(LIBXENCTL_LDFLAGS) fi +# }}} # --with-libxmms {{{ with_xmms_config="xmms-config" @@ -6262,232 +6277,230 @@ then with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)" fi -cat <