X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=75ac706a85c354928b65b6851418bcceaa91fc08;hb=f6d2b3c2f83808f9f3913bf0220b3e6ad84fe23c;hp=804cdfc36ec9259e02d7f7d1ba5a35337a61d7ab;hpb=b34e15480992d9433a0e3fda47b5f6d387bfda5e;p=collectd.git diff --git a/configure.in b/configure.in index 804cdfc3..75ac706a 100644 --- a/configure.in +++ b/configure.in @@ -484,6 +484,13 @@ AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr AC_FUNC_STRERROR_R +SAVE_CFLAGS="$CFLAGS" +# Emulate behavior of src/Makefile.am +if test "x$GCC" = "xyes" +then + CFLAGS="$CFLAGS -Wall -Werror" +fi + AC_CACHE_CHECK([for strtok_r], [c_cv_have_strtok_r_default], AC_LINK_IFELSE( @@ -514,7 +521,6 @@ AC_CACHE_CHECK([for strtok_r], if test "x$c_cv_have_strtok_r_default" = "xno" then - SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -D_REENTRANT=1" AC_CACHE_CHECK([if strtok_r needs _REENTRANT], @@ -546,6 +552,12 @@ then ) fi +CFLAGS="$SAVE_CFLAGS" +if test "x$c_cv_have_strtok_r_reentrant" = "xyes" +then + CFLAGS="$CFLAGS -D_REENTRANT=1" +fi + AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree) socket_needs_socket="no" @@ -955,7 +967,7 @@ fi AC_MSG_CHECKING([if have htonll defined]) have_htonll="no" - AC_RUN_IFELSE([ + AC_LINK_IFELSE([ AC_LANG_PROGRAM([ #include #include @@ -4018,7 +4030,7 @@ then plugin_vserver="yes" plugin_wireless="yes" - if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes" + if test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes" then plugin_ipvs="yes" fi @@ -4488,7 +4500,7 @@ then with_librrd="yes (warning: librrd is not thread-safe)" fi -if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes" +if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes" then with_libiptc="yes (shipped version)" fi