X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=f1c7b8aba1169f3a01f7bdf7993c52d192d4871f;hb=204cf4f8f68cadeac474a75584f27b7339aca4c4;hp=831cfc986be7b13b69f537f4825410478edcd83b;hpb=d4fcceb7794eed59bd14ff7ebea545efcc1457d0;p=collectd.git diff --git a/configure.ac b/configure.ac index 831cfc98..f1c7b8ab 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,8 @@ m4_ifdef([LT_PACKAGE_VERSION], ] ) -AM_INIT_AUTOMAKE([tar-pax dist-bzip2]) +AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_LANG(C) AC_PREFIX_DEFAULT("/opt/collectd") @@ -1121,6 +1122,17 @@ else AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.]) fi; fi; fi +# --with-useragent {{{ +AC_ARG_WITH(useragent, [AS_HELP_STRING([--with-useragent@<:@=AGENT@:>@], [User agent to use on http requests])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + AC_DEFINE_UNQUOTED(COLLECTD_USERAGENT, ["$withval"], [User agent for http requests]) + fi +]) + +# }}} + have_getfsstat="no" AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"]) have_getvfsstat="no" @@ -1433,13 +1445,12 @@ AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes") AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes") with_libiokit="no" -AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices, -[ +if test "x$ac_system" = "xDarwin" +then with_libiokit="yes" -], -[ +else with_libiokit="no" -]) +fi AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes") with_libkvm="no" @@ -2651,6 +2662,15 @@ return (retval); fi if test "x$with_libmnl" = "xyes" then + AC_CHECK_MEMBERS([struct rtnl_link_stats64.tx_window_errors], + [AC_DEFINE(HAVE_RTNL_LINK_STATS64, 1, [Define if struct rtnl_link_stats64 exists and is usable.])], + [], + [ + #include + ]) +fi +if test "x$with_libmnl" = "xyes" +then AC_CHECK_LIB(mnl, mnl_nlmsg_get_payload, [with_libmnl="yes"], [with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"], @@ -3059,6 +3079,25 @@ then AC_CHECK_HEADERS(pcap-bpf.h,, [with_libpcap="no (pcap-bpf.h not found)"]) fi +if test "x$with_libpcap" = "xyes" +then + AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP], + [c_cv_libpcap_have_pcap_error_iface_not_up], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +]]], +[[[ + int val = PCAP_ERROR_IFACE_NOT_UP; +]]] + )], + [c_cv_libpcap_have_pcap_error_iface_not_up="yes"], + [c_cv_libpcap_have_pcap_error_iface_not_up="no"])) +fi +if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes" +then + with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)" +fi AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes") # }}}