X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=3357375ead98e8bd27269d756a455d6f360e458b;hb=0ad56ec30dc14accfde4cd3794e940d00ca6e641;hp=5f56385f6909773f6f7bbf3eb6e7c521b3d7f003;hpb=5ff74d56067ac64db801df5184eb8b97f4b2b645;p=collectd.git diff --git a/configure.ac b/configure.ac index 5f56385f..3357375e 100644 --- a/configure.ac +++ b/configure.ac @@ -112,15 +112,6 @@ AM_CONDITIONAL([BUILD_LINUX], [test "x$ac_system" = "xLinux"]) AM_CONDITIONAL([BUILD_OPENBSD], [test "x$ac_system" = "xOpenBSD"]) AM_CONDITIONAL([BUILD_SOLARIS], [test "x$ac_system" = "xSolaris"]) -if test "x$ac_system" = "xLinux"; then - AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources]) - if test "x$KERNEL_DIR" = "x"; then - KERNEL_DIR="/lib/modules/`uname -r`/source" - fi - KERNEL_CFLAGS="-I$KERNEL_DIR/include" - AC_SUBST([KERNEL_CFLAGS]) -fi - if test "x$ac_system" = "xSolaris"; then AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], [1], [Define to enforce POSIX thread semantics under Solaris.]) AC_DEFINE([_REENTRANT], [1], [Define to enable reentrancy interfaces.]) @@ -461,7 +452,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + AC_CHECK_HEADERS([linux/inet_diag.h], [], [], [[ #if HAVE_SYS_TYPES_H @@ -472,7 +463,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + AC_CHECK_HEADERS([linux/netdevice.h], [], [], [[ #if HAVE_SYS_TYPES_H @@ -486,7 +477,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + # For ethstat module AC_CHECK_HEADERS([linux/sockios.h], [have_linux_sockios_h="yes"], @@ -500,7 +491,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + AC_CHECK_HEADERS([linux/ethtool.h], [have_linux_ethtool_h="yes"], [have_linux_ethtool_h="no"], @@ -518,28 +509,7 @@ if test "x$ac_system" = "xLinux"; then ) # For ipvs module - AC_CHECK_HEADERS([linux/ip_vs.h], [have_linux_ip_vs_h="yes"], [have_linux_ip_vs="no"]) - AC_CHECK_HEADERS([net/ip_vs.h], [have_net_ip_vs_h="yes"], [have_net_ip_vs_h="no"]) - AC_CHECK_HEADERS([ip_vs.h], [have_ip_vs_h="yes"], [have_ip_vs_h="no"]) - - ip_vs_h_needs_kernel_cflags="no" - - if test "x$have_linux_ip_vs_h$have_net_ip_vs_h$have_ip_vs_h" = "xnonono" && test -d "$KERNEL_DIR"; then - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $KERNEL_CFLAGS" - - AC_MSG_NOTICE([Did not find ip_vs.h. Trying again using headers from $KERNEL_DIR.]) - - AC_CHECK_HEADERS([linux/ip_vs.h], [have_linux_ip_vs_h="yes"]) - AC_CHECK_HEADERS([net/ip_vs.h], [have_net_ip_vs_h="yes"]) - AC_CHECK_HEADERS([ip_vs.h], [have_ip_vs_h="yes"]) - - if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"; then - ip_vs_h_needs_kernel_cflags="yes" - fi - - CFLAGS="$SAVE_CFLAGS" - fi + AC_CHECK_HEADERS_ONCE([linux/ip_vs.h]) # For the email plugin AC_CHECK_HEADERS([linux/un.h], [], [], @@ -554,7 +524,7 @@ if test "x$ac_system" = "xLinux"; then [have_asm_msrindex_h="yes"], [have_asm_msrindex_h="no"] ) - + if test "x$have_asm_msrindex_h" = "xyes"; then AC_CACHE_CHECK([whether asm/msr-index.h has MSR_PKG_C10_RESIDENCY], [c_cv_have_usable_asm_msrindex_h], @@ -575,12 +545,12 @@ if test "x$ac_system" = "xLinux"; then ] ) fi - + AC_CHECK_HEADERS([cpuid.h], [have_cpuid_h="yes"], [have_cpuid_h="no (cpuid.h not found)"] ) - + AC_CHECK_HEADERS([sys/capability.h], [have_capability="yes"], [have_capability="no ( not found)"] @@ -610,7 +580,6 @@ else have_linux_wireless_h="no" fi -AM_CONDITIONAL([IP_VS_H_NEEDS_KERNEL_CFLAGS], [test "x$ip_vs_h_needs_kernel_cflags" = "xyes"]) AM_CONDITIONAL([BUILD_WITH_CAPABILITY], [test "x$have_capability" = "xyes"]) # For the swap module @@ -1445,13 +1414,13 @@ if test "x$fp_layout_type" = "xunknown"; then uint64_t i1; uint8_t c[8]; double d; - + d = 8.642135e130; memcpy ((void *) &i0, (void *) &d, 8); - + i1 = endianflip (i0); memcpy ((void *) c, (void *) &i1, 8); - + if ((c[0] == 0x2f) && (c[1] == 0x25) && (c[2] == 0xc0) && (c[3] == 0xc7) && (c[4] == 0x43) && (c[5] == 0x2b) @@ -1494,13 +1463,13 @@ if test "x$fp_layout_type" = "xunknown"; then uint64_t i1; uint8_t c[8]; double d; - + d = 8.642135e130; memcpy ((void *) &i0, (void *) &d, 8); - + i1 = intswap (i0); memcpy ((void *) c, (void *) &i1, 8); - + if ((c[0] == 0x2f) && (c[1] == 0x25) && (c[2] == 0xc0) && (c[3] == 0xc7) && (c[4] == 0x43) && (c[5] == 0x2b) @@ -6185,14 +6154,14 @@ if test "x$ac_system" = "xLinux"; then plugin_wireless="yes" plugin_zfs_arc="yes" - if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"; then + if test "x$ac_cv_header_linux_ip_vs_h" = "xyes"; then plugin_ipvs="yes" fi if test "x$c_cv_have_usable_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes"; then plugin_turbostat="yes" fi - + if test "x$c_cv_have_clock_boottime_monotonic" = "xyes"; then plugin_cpusleep="yes" fi @@ -6667,8 +6636,7 @@ AC_SUBST([LOAD_PLUGIN_SYSLOG]) AC_SUBST([LOAD_PLUGIN_LOGFILE]) AC_SUBST([LOAD_PLUGIN_LOG_LOGSTASH]) -if test "x$enable_debug" = "xyes" -then +if test "x$enable_debug" = "xyes"; then DEFAULT_LOG_LEVEL="debug" else DEFAULT_LOG_LEVEL="info" @@ -6713,21 +6681,11 @@ AC_SUBST([LOAD_PLUGIN_RRDTOOL]) AC_SUBST([LOAD_PLUGIN_NETWORK]) AC_SUBST([LOAD_PLUGIN_CSV]) -dnl ip_vs.h -if test "x$ac_system" = "xLinux" && test "x$have_linux_ip_vs_h" = "xno" && "x$have_net_ip_vs_h" = "xno" && "x$have_ip_vs_h" = "xno"; then - enable_ipvs="$enable_ipvs (ip_vs.h not found)" -fi - -if test "x$ip_vs_h_needs_kernel_cflags" = "xyes"; then - enable_ipvs="$enable_ipvs (needs $KERNEL_CFLAGS)" -fi - dnl Perl bindings PERL_BINDINGS_OPTIONS="PREFIX=${prefix}" AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])], [ - if test "x$withval" != "xno" && test "x$withval" != "xyes" - then + if test "x$withval" != "xno" && test "x$withval" != "xyes"; then PERL_BINDINGS_OPTIONS="$withval" with_perl_bindings="yes" else @@ -6735,8 +6693,7 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@ fi ], [ - if test "x$PERL" != "x" - then + if test "x$PERL" != "x"; then with_perl_bindings="yes" else with_perl_bindings="no (no perl interpreter found)" @@ -6753,8 +6710,7 @@ if test "x$with_perl_bindings" = "xyes"; then fi fi -if test "x$with_perl_bindings" = "xyes" -then +if test "x$with_perl_bindings" = "xyes"; then PERL_BINDINGS="perl" else PERL_BINDINGS=""