X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.ac;h=a2fb6be87d3c38168b9235abdb31dce1091724ef;hp=5fccc66bdd920a58c2bad4050b180bdcef66f174;hb=e91e6e68e46419e84c234561ceaed36972f69946;hpb=9d3804cb80b39a3b22579c746c08400c97c09843 diff --git a/configure.ac b/configure.ac index 5fccc66b..a2fb6be8 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,7 @@ AC_CHECK_HEADERS_ONCE([ \ kstat.h \ kvm.h \ libgen.h \ + locale.h \ mntent.h \ mnttab.h \ netdb.h \ @@ -635,16 +636,6 @@ fi # }}} -# For the dns plugin -AC_CHECK_HEADERS([arpa/nameser.h]) -AC_CHECK_HEADERS([arpa/nameser_compat.h], [], [], - [[ - #if HAVE_ARPA_NAMESER_H - # include - #endif - ]] -) - AC_CHECK_HEADERS([net/if_arp.h], [], [], [[ #if HAVE_SYS_SOCKET_H @@ -752,33 +743,21 @@ test_cxx_flags() { # AC_CHECK_FUNCS_ONCE([ \ asprintf \ - closelog \ - getaddrinfo \ - getgrnam_r \ - getnameinfo \ getpwnam \ getpwnam_r \ - gettimeofday \ if_indextoname \ - openlog \ - regcomp \ - regerror \ - regexec \ - regfree \ - select \ setenv \ setgroups \ - strcasecmp \ - strdup \ - strncasecmp \ - sysconf + setlocale ] ) AC_FUNC_STRERROR_R -SAVE_CFLAGS="$CFLAGS" -CFLAGS="-Wall -Werror" +if test "x$GCC" = "xyes"; then + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wall -Werror" +fi SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="" if test "x$ac_system" = "xWindows"; then @@ -1583,7 +1562,7 @@ if test "x$have_getmntent" = "xlibc"; then AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( - [[#include "$srcdir/src/utils_mount.h"]], + [[#include "$srcdir/src/utils/mount/mount.h"]], [[ FILE *fh; struct mntent *me; @@ -1605,7 +1584,7 @@ if test "x$have_getmntent" = "xlibc"; then AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( - [[#include "$srcdir/src/utils_mount.h"]], + [[#include "$srcdir/src/utils/mount/mount.h"]], [[ FILE *fh; struct mnttab mt; @@ -3868,7 +3847,10 @@ if test "x$with_libnetsnmp" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" SAVE_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags -Wall -Werror" + CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags" + if test "x$GCC" = "xyes"; then + CPPFLAGS="$CPPFLAGS -Wall -Werror" + fi LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags" LIBS="$LIBS -lnetsnmp" @@ -3977,6 +3959,8 @@ if test "x$with_libnetsnmpagent" = "xyes"; then fi if test "x$with_libnetsnmpagent" = "xyes"; then + BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS="$with_libnetsnmpagent_cppflags" + BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS="$with_libnetsnmpagent_ldflags" BUILD_WITH_LIBNETSNMPAGENT_LIBS="-lnetsnmpagent $libnetsnmphelpers" fi @@ -4331,7 +4315,10 @@ if test "x$with_libperl" = "xyes"; then # (see issues #41 and #42) SAVE_CFLAGS="$CFLAGS" SAVE_LIBS="$LIBS" - CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror" + CFLAGS="$CFLAGS $PERL_CFLAGS" + if test "x$GCC" = "xyes"; then + CFLAGS="$CFLAGS -Wall -Werror" + fi LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for broken Perl_load_module()], @@ -4771,7 +4758,7 @@ if test "$PYTHON_CONFIG" != ""; then if test $? -ne 0; then with_libpython="no" fi - LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`" + LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs --embed`" || LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`" if test $? -ne 0; then with_libpython="no" fi @@ -6518,6 +6505,7 @@ fi # FreeBSD if test "x$ac_system" = "xFreeBSD"; then + plugin_cpufreq="yes" plugin_disk="yes" plugin_zfs_arc="yes" fi @@ -6630,7 +6618,7 @@ if test "x$c_cv_have_one_getmntent" = "xyes"; then plugin_df="yes" fi -if test "x$c_cv_have_getmntent_r" = "xyes"; then +if test "x$have_getmntent_r" = "xyes"; then plugin_df="yes" fi @@ -6923,7 +6911,6 @@ AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer sta AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics]) AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin]) AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin]) -AC_PLUGIN([write_stackdriver], [$plugin_write_stackdriver], [Google Stackdriver Monitoring output plugin]) AC_PLUGIN([write_kafka], [$with_librdkafka], [Kafka output plugin]) AC_PLUGIN([write_log], [yes], [Log output plugin]) AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin]) @@ -6931,6 +6918,8 @@ AC_PLUGIN([write_prometheus], [$plugin_write_prometheus], [Prometheus write AC_PLUGIN([write_redis], [$with_libhiredis], [Redis output plugin]) AC_PLUGIN([write_riemann], [$with_libriemann_client], [Riemann output plugin]) AC_PLUGIN([write_sensu], [yes], [Sensu output plugin]) +AC_PLUGIN([write_stackdriver], [$plugin_write_stackdriver], [Google Stackdriver Monitoring output plugin]) +AC_PLUGIN([write_syslog], [yes], [Syslog output plugin]) AC_PLUGIN([write_tsdb], [yes], [TSDB output plugin]) AC_PLUGIN([xencpu], [$plugin_xencpu], [Xen Host CPU usage]) AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) @@ -7074,11 +7063,13 @@ AC_SUBST([LCC_VERSION_STRING]) AC_CONFIG_FILES([src/libcollectdclient/collectd/lcc_features.h]) -AM_CFLAGS="-Wall" -AM_CXXFLAGS="-Wall" -if test "x$enable_werror" != "xno"; then - AM_CFLAGS="$AM_CFLAGS -Werror" - AM_CXXFLAGS="$AM_CXXFLAGS -Werror" +if test "x$GCC" = "xyes"; then + AM_CFLAGS="-Wall" + AM_CXXFLAGS="-Wall" + if test "x$enable_werror" != "xno"; then + AM_CFLAGS="$AM_CFLAGS -Werror" + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" + fi fi AC_SUBST([AM_CFLAGS]) @@ -7356,6 +7347,7 @@ AC_MSG_RESULT([ write_redis . . . . . $enable_write_redis]) AC_MSG_RESULT([ write_riemann . . . . $enable_write_riemann]) AC_MSG_RESULT([ write_sensu . . . . . $enable_write_sensu]) AC_MSG_RESULT([ write_stackdriver . . $enable_write_stackdriver]) +AC_MSG_RESULT([ write_syslog . . . . $enable_write_syslog]) AC_MSG_RESULT([ write_tsdb . . . . . $enable_write_tsdb]) AC_MSG_RESULT([ xencpu . . . . . . . $enable_xencpu]) AC_MSG_RESULT([ xmms . . . . . . . . $enable_xmms])