X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=56a5b263047b2365a80f640ff2a0debfdd507d78;hb=3ed2b5f9523aafaad1be4cbc3f0561750f91878e;hp=a58002a0e8615a88a9a5c19cda0a96f9b818d201;hpb=0384380080a39adb252a4d5dd3a6bf5c27f8faf8;p=collectd.git diff --git a/configure.in b/configure.in index a58002a0..56a5b263 100644 --- a/configure.in +++ b/configure.in @@ -262,6 +262,22 @@ AC_CHECK_HEADERS(sys/sysctl.h, [], [], #endif ]) +AC_MSG_CHECKING([for sysctl kern.cp_times]) +if test -x /sbin/sysctl +then + /sbin/sysctl kern.cp_times 2>/dev/null + if test $? -eq 0 + then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1, + [Define if sysctl supports kern.cp_times]) + else + AC_MSG_RESULT([no]) + fi +else + AC_MSG_RESULT([no]) +fi + # For hddtemp module AC_CHECK_HEADERS(linux/major.h libgen.h) @@ -1467,29 +1483,32 @@ SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS" LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS" -if test "x$with_libiptc" = "xyes" +# check whether the header file for libiptc is available. +if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then - AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [], + AC_CHECK_HEADERS(libiptc/libiptc.h, [ - with_libiptc="no (Linux iptables headers not found)" - with_own_libiptc="no" + AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the header file.]) ], [ -#include "$srcdir/src/owniptc/ipt_kernel_headers.h" + with_libiptc="yes" + with_own_libiptc="yes" ]) - fi if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then - AC_CHECK_HEADERS(libiptc/libiptc.h, + AC_CHECK_HEADERS(libiptc/libip6tc.h, [ - AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the header file.]) + AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the header file.]) ], [ with_libiptc="yes" with_own_libiptc="yes" ]) fi +# If the header file is available, check for the required type declaractions. +# They may be missing in old versions of libiptc. In that case, they will be +# declared in the iptables plugin. if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [], @@ -1503,6 +1522,7 @@ then #endif ]) fi +# Check for the iptc_init symbol in the library. if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then AC_CHECK_LIB(iptc, iptc_init, @@ -1514,6 +1534,19 @@ then with_own_libiptc="yes" ]) fi +# The system wide version failed for some reason. Check if we have the required +# headers to build the shipped version. +if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes" +then + AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [], + [ + with_libiptc="no (Linux iptables headers not found)" + with_own_libiptc="no" + ], + [ +#include "$srcdir/src/owniptc/ipt_kernel_headers.h" + ]) +fi AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes") AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes") if test "x$with_libiptc" = "xyes" @@ -3800,6 +3833,7 @@ AC_PLUGIN([tail], [yes], [Parsing of logfiles]) AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics]) AC_PLUGIN([target_notification], [yes], [The notification target]) AC_PLUGIN([target_replace], [yes], [The replace target]) +AC_PLUGIN([target_scale],[yes], [The scale target]) AC_PLUGIN([target_set], [yes], [The set target]) AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics]) AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics]) @@ -4100,6 +4134,7 @@ Configuration: tape . . . . . . . . $enable_tape target_notification . $enable_target_notification target_replace . . . $enable_target_replace + target_scale . . . . $enable_target_scale target_set . . . . . $enable_target_set tcpconns . . . . . . $enable_tcpconns teamspeak2 . . . . . $enable_teamspeak2