X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.ac;h=1e31e21876c18f3502e134415864e4c6a514781e;hp=b9ef96113cb98166fd4fe6a0dc37705d3308babb;hb=d486225f89ea52d8ed2b4242eba2ad94c409f837;hpb=d4cc32c4dddb01081c49a67d13ab4a737cda0ed0 diff --git a/configure.ac b/configure.ac index b9ef9611..1e31e218 100644 --- a/configure.ac +++ b/configure.ac @@ -766,10 +766,7 @@ AC_CHECK_FUNCS_ONCE([ \ AC_FUNC_STRERROR_R SAVE_CFLAGS="$CFLAGS" -# Emulate behavior of src/Makefile.am -if test "x$GCC" = "xyes"; then - CFLAGS="$CFLAGS -Wall -Werror" -fi +CFLAGS="-Wall -Werror" AC_CACHE_CHECK([for strtok_r], [c_cv_have_strtok_r_default], @@ -1567,7 +1564,7 @@ if test "x$have_getmntent" = "xlibc"; then struct mntent *me; fh = setmntent ("/etc/mtab", "r"); me = getmntent (fh); - return(me->mnt_passno); + return me->mnt_passno; ]] ) ], @@ -1590,7 +1587,7 @@ if test "x$have_getmntent" = "xlibc"; then int status; fh = fopen ("/etc/mnttab", "r"); status = getmntent (fh, &mt); - return(status); + return status; ]] ) ], @@ -1878,14 +1875,23 @@ fi # libi2c-dev if test "x$ac_system" = "xLinux"; then + with_libi2c_libs="" + AC_CHECK_HEADERS([i2c/smbus.h], + [with_libi2c_libs="-li2c"] + ) AC_CHECK_DECL([i2c_smbus_read_i2c_block_data], [with_libi2c="yes"], [with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"], [[ #include #include + #if HAVE_I2C_SMBUS_H + # include + #endif ]] ) + BUILD_WITH_LIBI2C_LIBS="$with_libi2c_libs" + AC_SUBST([BUILD_WITH_LIBI2C_LIBS]) else with_libi2c="no (Linux only)" fi @@ -3049,18 +3055,33 @@ else PKG_CHECK_MODULES([LUA], [lua5.3], [with_liblua="yes"], [ - PKG_CHECK_MODULES([LUA], [lua-5.2], + PKG_CHECK_MODULES([LUA], [lua53], [with_liblua="yes"], [ - PKG_CHECK_MODULES([LUA], [lua5.2], + PKG_CHECK_MODULES([LUA], [lua-5.2], [with_liblua="yes"], [ - PKG_CHECK_MODULES([LUA], [lua-5.1], + PKG_CHECK_MODULES([LUA], [lua5.2], [with_liblua="yes"], [ - PKG_CHECK_MODULES([LUA], [lua5.1], + PKG_CHECK_MODULES([LUA], [lua52], [with_liblua="yes"], - [with_liblua="no (pkg-config cannot find liblua)"] + [ + PKG_CHECK_MODULES([LUA], [lua-5.1], + [with_liblua="yes"], + [ + PKG_CHECK_MODULES([LUA], [lua5.1], + [with_liblua="yes"], + [ + PKG_CHECK_MODULES([LUA], [lua51], + [with_liblua="yes"], + [with_liblua="no (pkg-config cannot find liblua)"] + ) + ] + ) + ] + ) + ] ) ] ) @@ -3660,6 +3681,18 @@ if test "x$with_libmnl" = "xyes"; then [[#include ]] ) + AC_CHECK_MEMBERS([struct rtnl_link_stats.rx_nohandler], + [], + [], + [[#include ]] + ) + + AC_CHECK_MEMBERS([struct rtnl_link_stats64.rx_nohandler], + [], + [], + [[#include ]] + ) + AC_CHECK_LIB([mnl], [mnl_nlmsg_get_payload], [with_libmnl="yes"], [with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"], @@ -4081,7 +4114,7 @@ if test "x$with_libpcap" = "xyes"; then [[#include ]], [[ int val = PCAP_ERROR_IFACE_NOT_UP; - return(val); + return val; ]] ) ],