X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=b79617b3851be24f8f37dd89a8248ebf0bde7ff5;hb=4b05cf4141a735bcbc734ec8e68b905f16deef6c;hp=1c8d4db9f8f24275754143e46982e33e5f7e79ee;hpb=b9f877bc827ea4c0097682fc87cc5bcfd0000807;p=collectd.git diff --git a/configure.ac b/configure.ac index 1c8d4db9..b79617b3 100644 --- a/configure.ac +++ b/configure.ac @@ -357,8 +357,7 @@ AC_CHECK_HEADERS([netinet/udp.h], [], [], # For cpu modules AC_CHECK_HEADERS([sys/dkstat.h]) -if test "x$ac_system" = "xDarwin" -then +if test "x$ac_system" = "xDarwin"; then AC_CHECK_HEADERS( [[ \ mach/mach_init.h \ @@ -424,8 +423,7 @@ AC_CHECK_HEADERS([net/if.h], [], [], ]] ) -if test "x$ac_system" = "xLinux" -then +if test "x$ac_system" = "xLinux"; then # For hddtemp module AC_CHECK_HEADERS([linux/major.h]) @@ -911,8 +909,7 @@ AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime="no"] ) -if test "x$have_clock_gettime" = "xno" -then +if test "x$have_clock_gettime" = "xno"; then AC_CHECK_LIB([rt], [clock_gettime], [ clock_gettime_needs_rt="yes" @@ -921,8 +918,7 @@ then ) fi -if test "x$have_clock_gettime" = "xno" -then +if test "x$have_clock_gettime" = "xno"; then AC_CHECK_LIB([posix4], [clock_gettime], [ clock_gettime_needs_posix4="yes" @@ -931,8 +927,7 @@ then ) fi -if test "x$have_clock_gettime" = "xyes" -then +if test "x$have_clock_gettime" = "xyes"; then AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if the clock_gettime(2) function is available.]) fi @@ -965,15 +960,13 @@ AC_CHECK_FUNCS([syslog], [have_syslog="yes"], [have_syslog="no"]) AC_CHECK_FUNCS([thread_info], [have_thread_info="yes"], [have_thread_info="no"]) # Check for strptime {{{ -if test "x$GCC" = "xyes" -then +if test "x$GCC" = "xyes"; then SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wextra -Werror" fi AC_CHECK_FUNCS([strptime], [have_strptime="yes"], [have_strptime="no"]) -if test "x$have_strptime" = "xyes" -then +if test "x$have_strptime" = "xyes"; then AC_CACHE_CHECK([whether strptime is exported by default], [c_cv_have_strptime_default], [ @@ -993,8 +986,7 @@ then ) fi -if test "x$have_strptime" = "xyes" && test "x$c_cv_have_strptime_default" = "xno" -then +if test "x$have_strptime" = "xyes" && test "x$c_cv_have_strptime_default" = "xno"; then AC_CACHE_CHECK([whether strptime needs standards mode], [c_cv_have_strptime_standards], [ @@ -1034,15 +1026,13 @@ then fi fi -if test "x$GCC" = "xyes" -then +if test "x$GCC" = "xyes"; then CFLAGS="$SAVE_CFLAGS" fi # }}} Check for strptime AC_MSG_CHECKING([for sysctl kern.cp_times]) -if test -x /sbin/sysctl -then +if test -x /sbin/sysctl; then /sbin/sysctl kern.cp_times >/dev/null 2>&1 if test $? -eq 0; then AC_MSG_RESULT([yes]) @@ -1055,8 +1045,7 @@ else fi AC_MSG_CHECKING([for sysctl kern.cp_time]) -if test -x /sbin/sysctl -then +if test -x /sbin/sysctl; then /sbin/sysctl kern.cp_time >/dev/null 2>&1 if test $? -eq 0 then @@ -1286,46 +1275,46 @@ AC_ARG_WITH([fp-layout], ) if test "x$fp_layout_type" = "xunknown"; then -AC_CACHE_CHECK([if doubles are stored in x86 representation], - [c_cv_fp_layout_need_nothing], - [ - AC_RUN_IFELSE( - [ - AC_LANG_PROGRAM( - [[ - #include - #include - #include - #include - #include - #include - ]], - [[ - uint64_t i0; - uint64_t i1; - uint8_t c[8]; - double d; - - d = 8.642135e130; - memcpy ((void *) &i0, (void *) &d, 8); - - i1 = 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) - && (c[6] == 0x1f) && (c[7] == 0x5b)) - return (0); - return (1); - ]] - ) - ], - [c_cv_fp_layout_need_nothing="yes"], - [c_cv_fp_layout_need_nothing="no"] - ) - ] -) + AC_CACHE_CHECK([if doubles are stored in x86 representation], + [c_cv_fp_layout_need_nothing], + [ + AC_RUN_IFELSE( + [ + AC_LANG_PROGRAM( + [[ + #include + #include + #include + #include + #include + #include + ]], + [[ + uint64_t i0; + uint64_t i1; + uint8_t c[8]; + double d; + + d = 8.642135e130; + memcpy ((void *) &i0, (void *) &d, 8); + + i1 = 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) + && (c[6] == 0x1f) && (c[7] == 0x5b)) + return (0); + return (1); + ]] + ) + ], + [c_cv_fp_layout_need_nothing="yes"], + [c_cv_fp_layout_need_nothing="no"] + ) + ] + ) fi if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then @@ -1762,36 +1751,40 @@ SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -lpthread" AC_MSG_CHECKING([for pthread_setname_np]) - have_pthread_setname_np="no" - AC_LINK_IFELSE([AC_LANG_PROGRAM( -[[ -#define _GNU_SOURCE -#include -]], -[[ - pthread_setname_np((pthread_t) {0}, "conftest"); -]] - )], [ - have_pthread_setname_np="yes" - AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [pthread_setname_np() is available.]) - ]) +have_pthread_setname_np="no" +AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[ + #define _GNU_SOURCE + #include + ]], + [[pthread_setname_np((pthread_t) {0}, "conftest");]] + ) + ], + [ + have_pthread_setname_np="yes" + AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [pthread_setname_np() is available.]) + ] +) AC_MSG_RESULT([$have_pthread_setname_np]) # check for pthread_set_name_np(3) (FreeBSD) AC_MSG_CHECKING([for pthread_set_name_np]) - have_pthread_set_name_np="no" - AC_LINK_IFELSE([AC_LANG_PROGRAM( -[[ -#include -]], -[[ - pthread_set_name_np((pthread_t) {0}, "conftest"); -]] - )], [ - have_pthread_set_name_np="yes" - AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [pthread_set_name_np() is available.]) - ]) +have_pthread_set_name_np="no" +AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[#include ]], + [[pthread_set_name_np((pthread_t) {0}, "conftest");]] + ) + ], + [ + have_pthread_set_name_np="yes" + AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [pthread_set_name_np() is available.]) + ] +) AC_MSG_RESULT([$have_pthread_set_name_np]) LDFLAGS="$SAVE_LDFLAGS" @@ -1861,33 +1854,6 @@ fi # Checks for libraries begin here # -# Check for HAL (hardware abstraction library) -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" - ], - [with_libhal="no"] - ) - LIBS="$SAVE_LIBS" - ], - [with_libhal="no"] -) -AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS) -AC_SUBST(BUILD_WITH_LIBHAL_LIBS) - - # Check for libpthread SAVE_LIBS="$LIBS" AC_CHECK_LIB([pthread], @@ -1984,7 +1950,7 @@ AM_CONDITIONAL([BUILD_WITH_LIBIOKIT], [test "x$with_libiokit" = "xyes"]) with_libkvm="no" AC_CHECK_LIB([kvm], [kvm_getprocs], [with_kvm_getprocs="yes"], - [] + [with_kvm_getprocs="no"] ) if test "x$with_kvm_getprocs" = "xyes"; then @@ -1998,7 +1964,7 @@ AM_CONDITIONAL([BUILD_WITH_LIBKVM_GETPROCS], [test "x$with_kvm_getprocs" = "xyes AC_CHECK_LIB([kvm], [kvm_getswapinfo], [with_kvm_getswapinfo="yes"], - [] + [with_kvm_getswapinfo="no"] ) if test "x$with_kvm_getswapinfo" = "xyes"; then @@ -2012,7 +1978,7 @@ AM_CONDITIONAL([BUILD_WITH_LIBKVM_GETSWAPINFO], [test "x$with_kvm_getswapinfo" = AC_CHECK_LIB([kvm], [kvm_nlist], [with_kvm_nlist="yes"], - [] + [with_kvm_nlist="no"] ) if test "x$with_kvm_nlist" = "xyes"; then @@ -2027,7 +1993,7 @@ AM_CONDITIONAL([BUILD_WITH_LIBKVM_NLIST], [test "x$with_kvm_nlist" = "xyes"]) AC_CHECK_LIB([kvm], [kvm_openfiles], [with_kvm_openfiles="yes"], - [] + [with_kvm_openfiles="no"] ) if test "x$with_kvm_openfiles" = "xyes"; then @@ -2996,7 +2962,7 @@ else PKG_CHECK_MODULES([LUA], [lua-5.3], [with_liblua="yes"], [ - PKG_CHECK_MODULES([LUA], [lua5.3], + PKG_CHECK_MODULES([LUA], [lua5.3], [with_liblua="yes"], [ PKG_CHECK_MODULES([LUA], [lua-5.2], @@ -3180,29 +3146,25 @@ with_libmicrohttpd_cppflags="" with_libmicrohttpd_ldflags="" AC_ARG_WITH([libmicrohttpd], [AS_HELP_STRING([--with-libmicrohttpd@<:@=PREFIX@:>@], [Path to libmicrohttpd.])], [ - if test "x$withval" != "xno" && test "x$withval" != "xyes" - then + if test "x$withval" != "xno" && test "x$withval" != "xyes"; then with_libmicrohttpd_cppflags="-I$withval/include" with_libmicrohttpd_ldflags="-L$withval/lib" with_libmicrohttpd="yes" fi - if test "x$withval" = "xno" - then + if test "x$withval" = "xno"; then with_libmicrohttpd="no (disabled on command line)" fi ], [withval="yes"] ) -if test "x$withval" = "xyes" -then -PKG_CHECK_MODULES([MICROHTTPD], [libmicrohttpd], - [with_libmicrohttpd="yes"], - [with_libmicrohttpd="no (pkg-config could not find libmicrohttpd)"] -) +if test "x$withval" = "xyes"; then + PKG_CHECK_MODULES([MICROHTTPD], [libmicrohttpd], + [with_libmicrohttpd="yes"], + [with_libmicrohttpd="no (pkg-config could not find libmicrohttpd)"] + ) fi -if test "x$MICROHTTPD_LIBS" = "x" -then +if test "x$MICROHTTPD_LIBS" = "x"; then MICROHTTPD_LIBS="-lmicrohttpd" fi @@ -3213,18 +3175,18 @@ CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS" LDFLAGS="$with_libmicrohttpd_ldflags $LDFLAGS" LIBS="$LIBS $MICROHTTPD_LIBS" -if test "x$with_libmicrohttpd" = "xyes" -then +if test "x$with_libmicrohttpd" = "xyes"; then AC_CHECK_HEADERS([microhttpd.h], - [with_libmicrohttpd="yes"], - [with_libmicrohttpd="no ( not found)"]) + [with_libmicrohttpd="yes"], + [with_libmicrohttpd="no ( not found)"] + ) fi -if test "x$with_libmicrohttpd" = "xyes" -then +if test "x$with_libmicrohttpd" = "xyes"; then AC_CHECK_LIB([microhttpd], [MHD_start_daemon], - [with_libmicrohttpd="yes"], - [with_libmicrohttpd="no (libmicrohttpd not found)"]) + [with_libmicrohttpd="yes"], + [with_libmicrohttpd="no (libmicrohttpd not found)"] + ) fi CPPFLAGS="$SAVE_CPPFLAGS" @@ -3273,8 +3235,7 @@ if test "x$with_libmodbus" = "xuse_pkgconfig"; then fi with_libmodbus_libs="`$PKG_CONFIG --libs 'libmodbus'`" - if test $? -ne 0 - then + if test $? -ne 0; then with_libmodbus="no ($PKG_CONFIG failed)" fi fi @@ -3455,7 +3416,7 @@ if test "x$with_libmysql" = "xyes"; then AC_CHECK_HEADERS([mysql.h], [have_mysql_h="yes"], - [] + [have_mysql_h="no"] ) if test "x$have_mysql_h" != "xyes"; then @@ -4560,8 +4521,7 @@ if test "x$with_librabbitmq" = "xyes"; then [ AC_DEFINE([HAVE_AMQP_TCP_SOCKET], [1], [Define if librabbitmq provides the new TCP socket interface.]) - ], - [] + ] ) AC_CHECK_DECLS([amqp_socket_close], @@ -5984,7 +5944,7 @@ if test "x$ac_system" = "xLinux"; then plugin_ipvs="yes" fi - if test "x$c_cv_have_usable_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes" && test "x$have_capability" = "xyes"; then + if test "x$c_cv_have_usable_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes"; then plugin_turbostat="yes" fi @@ -6576,15 +6536,8 @@ AC_SUBST([AM_CXXFLAGS]) AC_CONFIG_FILES([ \ Makefile \ - bindings/Makefile \ - bindings/java/Makefile \ - proto/Makefile \ - src/Makefile \ src/collectd.conf \ - src/daemon/Makefile \ - src/libcollectdclient/Makefile \ src/libcollectdclient/libcollectdclient.pc \ - src/liboconfig/Makefile \ ]) AC_OUTPUT @@ -6635,7 +6588,6 @@ AC_MSG_RESULT([ libganglia . . . . . $with_libganglia]) AC_MSG_RESULT([ libgcrypt . . . . . . $with_libgcrypt]) AC_MSG_RESULT([ libgps . . . . . . . $with_libgps]) AC_MSG_RESULT([ libgrpc++ . . . . . . $with_libgrpcpp]) -AC_MSG_RESULT([ libhal . . . . . . . $with_libhal]) AC_MSG_RESULT([ libhiredis . . . . . $with_libhiredis]) AC_MSG_RESULT([ libi2c-dev . . . . . $with_libi2c]) AC_MSG_RESULT([ libiokit . . . . . . $with_libiokit]) @@ -6736,7 +6688,7 @@ AC_MSG_RESULT([ gps . . . . . . . . . $enable_gps]) AC_MSG_RESULT([ grpc . . . . . . . . $enable_grpc]) AC_MSG_RESULT([ hddtemp . . . . . . . $enable_hddtemp]) AC_MSG_RESULT([ hugepages . . . . . . $enable_hugepages]) -AC_MSG_RESULT([ intel_rdt. . . . . . $enable_intel_rdt]) +AC_MSG_RESULT([ intel_rdt . . . . . . $enable_intel_rdt]) AC_MSG_RESULT([ interface . . . . . . $enable_interface]) AC_MSG_RESULT([ ipc . . . . . . . . . $enable_ipc]) AC_MSG_RESULT([ ipmi . . . . . . . . $enable_ipmi])