X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=66a4348799c3dcd53ce33f1cf3258a56d19a6b4e;hb=bbf0d6f3a94fa01c34022bd1c522f93904d18870;hp=68ff2e44e6b910385b3eabc6afe814c39a993f01;hpb=9f77813bb720f68b6530f552fd1820cda7fa8465;p=collectd.git diff --git a/configure.ac b/configure.ac index 68ff2e44..66a43487 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,9 @@ AC_SYS_LARGEFILE AC_PROG_CC_C99([], [AC_MSG_ERROR([No compiler found that supports C99])] ) + +AX_COMPILER_VENDOR + AC_PROG_CXX AC_PROG_CPP AC_PROG_EGREP @@ -34,7 +37,6 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AM_PROG_CC_C_O -AM_CONDITIONAL([COMPILER_IS_GCC], [test "x$GCC" = "xyes"]) AC_PROG_LEX AC_PROG_YACC @@ -60,9 +62,9 @@ if test "x$collectd_cv_prog_bison" = "xno" && test ! -f "${srcdir}/src/liboconfi AC_MSG_ERROR([bison is missing and you do not have ${srcdir}/src/liboconfig/parser.c. Please install bison]) fi -AS_IF([test "x$lt_cv_dlopen" = "xno"], - [AC_MSG_ERROR([Your system does not support dlopen])] -) +if test "x$lt_cv_dlopen" = "xno"; then + AC_MSG_ERROR([Your system does not support dlopen]) +fi AC_SUBST([DLOPEN_LIBS], [$lt_cv_dlopen_libs]) @@ -459,7 +461,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + AC_CHECK_HEADERS([linux/inet_diag.h], [], [], [[ #if HAVE_SYS_TYPES_H @@ -470,7 +472,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + AC_CHECK_HEADERS([linux/netdevice.h], [], [], [[ #if HAVE_SYS_TYPES_H @@ -484,7 +486,7 @@ if test "x$ac_system" = "xLinux"; then #endif ]] ) - + # For ethstat module AC_CHECK_HEADERS([linux/sockios.h], [have_linux_sockios_h="yes"], @@ -498,7 +500,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"], @@ -521,21 +523,21 @@ if test "x$ac_system" = "xLinux"; then 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 @@ -552,7 +554,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], @@ -573,12 +575,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)"] @@ -1443,13 +1445,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) @@ -1492,13 +1494,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) @@ -2376,6 +2378,57 @@ AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS) AC_SUBST(BUILD_WITH_LIBDBI_LIBS) # }}} +# --with-libdpdk {{{ +AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk]) +AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk]) + +AC_ARG_WITH([libdpdk], + [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])], + [with_libdpdk="$withval"], + [with_libdpdk="yes"] +) + +if test "x$with_libdpdk" != "xno"; then + if test "x$LIBDPDK_CPPFLAGS" = "x"; then + LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" + fi + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS" + AC_CHECK_HEADERS([rte_config.h], + [ + with_libdpdk="yes" + AC_PREPROC_IFELSE( + [ + AC_LANG_SOURCE( + [[ + #include + #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0) + #error "required DPDK >= 16.07" + #endif + ]] + ) + ], + [dpdk_keepalive="yes"], + [dpdk_keepalive="no (DPDK version < 16.07)"] + ) + ], + [with_libdpdk="no (rte_config.h not found)"] + ) + CPPFLAGS="$SAVE_CPPFLAGS" +fi + +if test "x$with_libdpdk" = "xyes"; then + SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS" + AC_CHECK_LIB([dpdk], [rte_eal_init], + [with_libdpdk="yes"], + [with_libdpdk="no (symbol 'rte_eal_init' not found)"] + ) + LDFLAGS="$SAVE_LDFLAGS" +fi + +# }}} + # --with-libesmtp {{{ AC_ARG_WITH([libesmtp], [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])], @@ -2788,56 +2841,6 @@ AC_SUBST([BUILD_WITH_LIBIPTC_CPPFLAGS]) AC_SUBST([BUILD_WITH_LIBIPTC_LDFLAGS]) # }}} -# --with-libdpdk {{{ -AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk]) -AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk]) - -AC_ARG_WITH([libdpdk], [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])]) - -if test "x$with_libdpdk" != "xno"; then - if test "x$LIBDPDK_CPPFLAGS" = "x"; then - LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" - fi - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS" - AC_CHECK_HEADERS([rte_config.h], - [ - with_libdpdk="yes" - AC_COMPILE_IFELSE( - [ - AC_LANG_PROGRAM( - [[ - #include - #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0) - #error "required DPDK >= 16.07" - #endif - ]], - [[ - return 0; - ]] - ) - ], - [dpdk_keepalive="yes"], - [dpdk_keepalive="no (DPDK version < 16.07)"] - ) - ], - [with_libdpdk="no (rte_config.h not found)"] - ) - CPPFLAGS="$SAVE_CPPFLAGS" -fi - -if test "x$with_libdpdk" = "xyes"; then - SAVE_LDFLAGS="$LDFLAGS" - LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS" - AC_CHECK_LIB([dpdk], [rte_eal_init], - [with_libdpdk="yes"], - [with_libdpdk="no (symbol 'rte_eal_init' not found)"] - ) - LDFLAGS="$SAVE_LDFLAGS" -fi - -# }}} - # --with-java {{{ with_java_home="$JAVA_HOME" if test "x$with_java_home" = "x"; then @@ -4428,14 +4431,14 @@ fi if test "x$with_libpqos" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" - AC_RUN_IFELSE( + AC_PREPROC_IFELSE( [ - AC_LANG_PROGRAM( + AC_LANG_SOURCE( [[ #include - ]], - [[ - return !(PQOS_VERSION >= 106) + #if PQOS_VERSION < 106 + #error "required PQOS version >= 1.06" + #endif ]] ) ], @@ -6189,7 +6192,7 @@ if test "x$ac_system" = "xLinux"; then 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 @@ -6740,15 +6743,14 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@ fi ]) -if test "x$with_perl_bindings" = "xyes" -then - AC_MSG_CHECKING([for the ExtUtils::MakeMaker module]) - if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - with_perl_bindings="no (ExtUtils::MakeMaker not found)" - fi +if test "x$with_perl_bindings" = "xyes"; then + AC_MSG_CHECKING([for the ExtUtils::MakeMaker module]) + if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + with_perl_bindings="no (ExtUtils::MakeMaker not found)" + fi fi if test "x$with_perl_bindings" = "xyes" @@ -6818,6 +6820,7 @@ AC_MSG_RESULT() AC_MSG_RESULT([Configuration:]) AC_MSG_RESULT([ Build:]) AC_MSG_RESULT([ Platform . . . . . . $ac_system]) +AC_MSG_RESULT([ Compiler vendor . . . $ax_cv_c_compiler_vendor]) AC_MSG_RESULT([ CC . . . . . . . . . $CC]) AC_MSG_RESULT([ CFLAGS . . . . . . . $AM_CFLAGS $CFLAGS]) AC_MSG_RESULT([ CXXFLAGS . . . . . . $AM_CXXFLAGS $CXXFLAGS])