diff --git a/configure.in b/configure.in
index 402c4d48bbddd76efb02ebc4b7db132d6bbf8fd9..42028b7d9f1478130b11e1c3d5e25f7083e2418d 100644 (file)
--- a/configure.in
+++ b/configure.in
]
)
-AM_INIT_AUTOMAKE(dist-bzip2)
+AM_INIT_AUTOMAKE([tar-pax dist-bzip2])
AC_LANG(C)
AC_PREFIX_DEFAULT("/opt/collectd")
PKG_PROG_PKG_CONFIG
AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
+AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h],
+ [have_protobuf_c_h="yes"],
+ [have_protobuf_c_h="no"])
+if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes"
+then
+ have_protoc_c="no (unable to find <google/protobuf-c/protobuf-c.h>)"
+fi
AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes")
AC_MSG_CHECKING([for kernel type ($host_os)])
# include <sys/socket.h>
#endif
])
+AC_CHECK_HEADERS(linux/inet_diag.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_LINUX_INET_DIAG_H
+# include <linux/inet_diag.h>
+#endif
+])
AC_CHECK_HEADERS(linux/netdevice.h, [], [],
[
#if HAVE_SYS_TYPES_H
AC_CHECK_HEADERS(netinet/ip_compat.h)
have_net_pfvar_h="no"
-AC_CHECK_HEADERS(net/pfvar.h, [have_net_pfvar_h="yes"])
+AC_CHECK_HEADERS(net/pfvar.h,
+ [have_net_pfvar_h="yes"],
+ [have_net_pfvar_h="no"],
+[
+#if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_NET_IF_H
+# include <net/if.h>
+#endif
+])
# For the multimeter plugin
have_termios_h="no"
AC_CACHE_CHECK([for strtok_r],
[c_cv_have_strtok_r_default],
AC_LINK_IFELSE(
- AC_LANG_PROGRAM(
- [[[[
+ [AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
- ]]]],
- [[[[
+]]],
+[[[
char buffer[] = "foo,bar,baz";
char *token;
char *dummy;
saveptr = NULL;
while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
{
- dummy = NULL;
+ dummy = NULL;
printf ("token = %s;\n", token);
}
- ]]]]),
+]]]
+ )],
[c_cv_have_strtok_r_default="yes"],
[c_cv_have_strtok_r_default="no"]
)
AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
[c_cv_have_strtok_r_reentrant],
AC_LINK_IFELSE(
- AC_LANG_PROGRAM(
- [[[[
+ [AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
- ]]]],
- [[[[
+]]],
+[[[
char buffer[] = "foo,bar,baz";
char *token;
char *dummy;
saveptr = NULL;
while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
{
- dummy = NULL;
+ dummy = NULL;
printf ("token = %s;\n", token);
}
- ]]]]),
+]]]
+ )],
[c_cv_have_strtok_r_reentrant="yes"],
[AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
)
then
AC_CACHE_CHECK([whether strptime is exported by default],
[c_cv_have_strptime_default],
- AC_COMPILE_IFELSE(
-AC_LANG_PROGRAM(
-[[
-AC_INCLUDES_DEFAULT
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <time.h>
-]],
-[[
+]]],
+[[[
struct tm stm;
(void) strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm);
-]]),
+]]]
+ )],
[c_cv_have_strptime_default="yes"],
[c_cv_have_strptime_default="no"]))
fi
@@ -716,9 +749,8 @@ 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],
- AC_COMPILE_IFELSE(
-AC_LANG_PROGRAM(
-[[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
#ifndef _ISOC99_SOURCE
# define _ISOC99_SOURCE 1
#endif
#ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 500
#endif
-AC_INCLUDES_DEFAULT
#include <time.h>
-]],
-[[
+]]],
+[[[
struct tm stm;
(void) strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm);
-]]),
+]]]
+ )],
[c_cv_have_strptime_standards="yes"],
[c_cv_have_strptime_standards="no"]))
then
CFLAGS="$SAVE_CFLAGS"
fi
-
# }}} Check for strptime
AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
if test "x$have_swapctl" = "xyes"; then
AC_CACHE_CHECK([whether swapctl takes two arguments],
[c_cv_have_swapctl_two_args],
- AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
# undef _FILE_OFFSET_BITS
# undef _LARGEFILE64_SOURCE
#endif
#include <sys/stat.h>
-#include <sys/swap.h>]],
- [[
- int num = swapctl(0, NULL);
- ]]
- ),
+#include <sys/swap.h>
+]]],
+[[[
+int num = swapctl(0, NULL);
+]]]
+ )],
[c_cv_have_swapctl_two_args="yes"],
[c_cv_have_swapctl_two_args="no"]
)
AC_CACHE_CHECK([whether swapctl takes three arguments],
[c_cv_have_swapctl_three_args],
AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
+ [AC_LANG_PROGRAM(
+[[[
#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
# undef _FILE_OFFSET_BITS
# undef _LARGEFILE64_SOURCE
#endif
#include <sys/stat.h>
-#include <sys/swap.h>]],
- [[
- int num = swapctl(0, NULL,0);
- ]]
- ),
+#include <sys/swap.h>
+]]],
+[[[
+int num = swapctl(0, NULL, 0);
+]]]
+ )],
[c_cv_have_swapctl_three_args="yes"],
[c_cv_have_swapctl_three_args="no"]
)
@@ -819,19 +853,19 @@ AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated
if test "x$nan_type" = "xnone"; then
AC_CACHE_CHECK([whether NAN is defined by default],
[c_cv_have_nan_default],
- AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM(
- [[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <math.h>
static double foo = NAN;
- ]],
- [[
+]]],
+[[[
if (isnan (foo))
return 0;
else
return 1;
- ]]),
+]]]
+ )],
[c_cv_have_nan_default="yes"],
[c_cv_have_nan_default="no"]
)
if test "x$nan_type" = "xnone"; then
AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
[c_cv_have_nan_isoc],
- AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM(
- [[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#define __USE_ISOC99 1
#include <math.h>
static double foo = NAN;
- ]],
- [[
+]]],
+[[[
if (isnan (foo))
return 0;
else
return 1;
- ]]),
+]]]
+ )],
[c_cv_have_nan_isoc="yes"],
[c_cv_have_nan_isoc="no"]
)
LDFLAGS="$LDFLAGS -lm"
AC_CACHE_CHECK([whether NAN can be defined by 0/0],
[c_cv_have_nan_zero],
- AC_RUN_IFELSE(
- AC_LANG_PROGRAM(
- [[
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <math.h>
#ifdef NAN
# define isnan(f) ((f) != (f))
#endif
static double foo = NAN;
- ]],
- [[
+]]],
+[[[
if (isnan (foo))
return 0;
else
return 1;
- ]]),
+]]]
+ )],
[c_cv_have_nan_zero="yes"],
[c_cv_have_nan_zero="no"]
)
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(
- [[[[
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if HAVE_STDBOOL_H
# include <stdbool.h>
#endif
- ]]]],
- [[[[
+]]],
+[[[
uint64_t i0;
uint64_t i1;
uint8_t c[8];
return (0);
else
return (1);
- ]]]]),
+]]]
+ )],
[c_cv_fp_layout_need_nothing="yes"],
[c_cv_fp_layout_need_nothing="no"]
)
if test "x$fp_layout_type" = "xunknown"; then
AC_CACHE_CHECK([if endianflip converts to x86 representation],
[c_cv_fp_layout_need_endianflip],
- AC_RUN_IFELSE(
- AC_LANG_PROGRAM(
- [[[[
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
(((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
(((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
(((uint64_t)(A) & 0x00000000000000ffLL) << 56))
- ]]]],
- [[[[
+]]],
+[[[
uint64_t i0;
uint64_t i1;
uint8_t c[8];
return (0);
else
return (1);
- ]]]]),
+]]]
+ )],
[c_cv_fp_layout_need_endianflip="yes"],
[c_cv_fp_layout_need_endianflip="no"]
)
if test "x$fp_layout_type" = "xunknown"; then
AC_CACHE_CHECK([if intswap converts to x86 representation],
[c_cv_fp_layout_need_intswap],
- AC_RUN_IFELSE(
- AC_LANG_PROGRAM(
- [[[[
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#endif
#define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
(((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
- ]]]],
- [[[[
+]]],
+[[[
uint64_t i0;
uint64_t i1;
uint8_t c[8];
return (0);
else
return (1);
- ]]]]),
+]]]
+ )],
[c_cv_fp_layout_need_intswap="yes"],
[c_cv_fp_layout_need_intswap="no"]
)
AC_CACHE_CHECK([whether getmntent takes one argument],
[c_cv_have_one_getmntent],
AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
-#include "$srcdir/src/utils_mount.h"]],
- [[
- FILE *fh;
- struct mntent *me;
- fh = setmntent ("/etc/mtab", "r");
- me = getmntent (fh);
- ]]
- ),
+ [AC_LANG_PROGRAM(
+[[[
+#include "$srcdir/src/utils_mount.h"
+]]],
+[[[
+FILE *fh;
+struct mntent *me;
+fh = setmntent ("/etc/mtab", "r");
+me = getmntent (fh);
+]]]
+ )],
[c_cv_have_one_getmntent="yes"],
[c_cv_have_one_getmntent="no"]
)
AC_CACHE_CHECK([whether getmntent takes two arguments],
[c_cv_have_two_getmntent],
AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
-#include "$srcdir/src/utils_mount.h"]],
- [[
+ [AC_LANG_PROGRAM(
+[[[
+#include "$srcdir/src/utils_mount.h"
+]]],
+[[[
FILE *fh;
struct mnttab mt;
int status;
fh = fopen ("/etc/mnttab", "r");
status = getmntent (fh, &mt);
- ]]
- ),
+]]]
+ )],
[c_cv_have_two_getmntent="yes"],
[c_cv_have_two_getmntent="no"]
)
fi
# Check for htonll
-AC_MSG_CHECKING([if have htonll defined])
-
- have_htonll="no"
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([
+AC_CACHE_CHECK([if have htonll defined],
+ [c_cv_have_htonll],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <sys/types.h>
#include <netinet/in.h>
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
- ], [
+]]],
+[[[
return htonll(0);
- ])
- ], [
- have_htonll="yes"
- AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
- ])
-
-AC_MSG_RESULT([$have_htonll])
+]]]
+ )],
+ [c_cv_have_htonll="yes"],
+ [c_cv_have_htonll="no"]
+ )
+)
+if test "x$c_cv_have_htonll" = "xyes"
+then
+ AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
+fi
# Check for structures
AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
@@ -1214,6 +1255,13 @@ AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_p
#include <linux/if.h>
#include <linux/netdevice.h>
])
+AC_CHECK_MEMBERS([struct inet_diag_req.id, struct inet_diag_req.idiag_states],
+ [AC_DEFINE(HAVE_STRUCT_LINUX_INET_DIAG_REQ, 1, [Define if struct inet_diag_req exists and is usable.])],
+ [],
+ [
+ #include <linux/inet_diag.h>
+ ])
+
AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [],
[],
@@ -1232,7 +1280,6 @@ AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct
have_struct_kinfo_proc_freebsd="no"
],
[
-AC_INCLUDES_DEFAULT
#include <kvm.h>
#include <sys/param.h>
#include <sys/sysctl.h>
have_struct_kinfo_proc_openbsd="no"
],
[
-AC_INCLUDES_DEFAULT
#include <sys/param.h>
#include <sys/sysctl.h>
#include <kvm.h>
[with_libhal="no"])
if test "x$with_libhal" = "xyes"; then
if test "x$PKG_CONFIG" != "x"; then
- BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
- BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
+ BUILD_WITH_LIBHAL_CFLAGS="`$PKG_CONFIG --cflags hal`"
+ BUILD_WITH_LIBHAL_LIBS="`$PKG_CONFIG --libs hal`"
AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
fi
AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
with_libiokit="no"
-AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
-[
+if test "x$ac_system" = "xDarwin"
+then
with_libiokit="yes"
-],
-[
+else
with_libiokit="no"
-])
+fi
AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
with_libkvm="no"
[with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
if test "$with_libgcrypt" != "no"; then
- AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
+ m4_ifdef([AM_PATH_LIBGCRYPT],[AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")])
+ GCRYPT_CPPFLAGS="$LIBGCRYPT_CPPFLAGS $LIBGCRYPT_CFLAGS"
+ GCRYPT_LIBS="$LIBGCRYPT_LIBS"
fi
fi
if test -d "$with_java_home"
then
AC_MSG_CHECKING([for jni.h])
- TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
- if test "x$TMPDIR" != "x"
+ TMPVAR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
+ if test "x$TMPVAR" != "x"
then
- AC_MSG_RESULT([found in $TMPDIR])
- JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
+ AC_MSG_RESULT([found in $TMPVAR])
+ JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR"
else
AC_MSG_RESULT([not found])
fi
AC_MSG_CHECKING([for jni_md.h])
- TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
- if test "x$TMPDIR" != "x"
+ TMPVAR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
+ if test "x$TMPVAR" != "x"
then
- AC_MSG_RESULT([found in $TMPDIR])
- JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
+ AC_MSG_RESULT([found in $TMPVAR])
+ JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR"
else
AC_MSG_RESULT([not found])
fi
AC_MSG_CHECKING([for libjvm.so])
- TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
- if test "x$TMPDIR" != "x"
+ TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
+ if test "x$TMPVAR" != "x"
then
- AC_MSG_RESULT([found in $TMPDIR])
- JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
+ AC_MSG_RESULT([found in $TMPVAR])
+ JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPVAR -Wl,-rpath -Wl,$TMPVAR"
else
AC_MSG_RESULT([not found])
fi
if test "x$JAVAC" = "x"
then
AC_MSG_CHECKING([for javac])
- TMPDIR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1`
- if test "x$TMPDIR" != "x"
+ TMPVAR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1`
+ if test "x$TMPVAR" != "x"
then
- JAVAC="$TMPDIR"
+ JAVAC="$TMPVAR"
AC_MSG_RESULT([$JAVAC])
else
AC_MSG_RESULT([not found])
if test "x$JAR" = "x"
then
AC_MSG_CHECKING([for jar])
- TMPDIR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1`
- if test "x$TMPDIR" != "x"
+ TMPVAR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1`
+ if test "x$TMPVAR" != "x"
then
- JAR="$TMPDIR"
+ JAR="$TMPVAR"
AC_MSG_RESULT([$JAR])
else
AC_MSG_RESULT([not found])
#include <sys/socket.h>])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [
- #include <stdio.h>
- #include <sys/types.h>
- #include <asm/types.h>
- #include <sys/socket.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
- ], [
- int retval = TCA_STATS2;
- return (retval);
- ]
- )],
- [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
-
- AC_COMPILE_IFELSE(
-[#include <stdio.h>
+[[[
+#include <stdio.h>
#include <sys/types.h>
#include <asm/types.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-
-int main (void)
-{
- int retval = TCA_STATS;
- return (retval);
-}],
- [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
- []);
+]]],
+[[[
+int retval = TCA_STATS2;
+return (retval);
+]]]
+ )],
+ [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <stdio.h>
+#include <sys/types.h>
+#include <asm/types.h>
+#include <sys/socket.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+]]],
+[[[
+int retval = TCA_STATS;
+return (retval);
+]]]
+ )],
+ [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
CFLAGS="$SAVE_CFLAGS"
fi
[if function 'rtnl_dump_filter' expects five arguments],
[c_cv_rtnl_dump_filter_five_args],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [
-AC_INCLUDES_DEFAULT
+[[[
+#include <stdio.h>
+#include <sys/types.h>
#include <asm/types.h>
#include <sys/socket.h>
#if HAVE_LIBNETLINK_H
#elif HAVE_LINUX_LIBNETLINK_H
# include <linux/libnetlink.h>
#endif
- ],
- [
+]]],
+[[[
if (rtnl_dump_filter(NULL, NULL, NULL, NULL, NULL))
return 1;
return 0;
- ]
- )],
- [c_cv_rtnl_dump_filter_five_args="yes"],
- [c_cv_rtnl_dump_filter_five_args="no"]
- )
+]]]
+ )],
+ [c_cv_rtnl_dump_filter_five_args="yes"],
+ [c_cv_rtnl_dump_filter_five_args="no"]
)
+)
AC_CACHE_CHECK(
[if function 'rtnl_dump_filter' expects three arguments],
[c_cv_rtnl_dump_filter_three_args],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [
-AC_INCLUDES_DEFAULT
+[[[
+#include <stdio.h>
+#include <sys/types.h>
#include <asm/types.h>
#include <sys/socket.h>
#if HAVE_LIBNETLINK_H
#elif HAVE_LINUX_LIBNETLINK_H
# include <linux/libnetlink.h>
#endif
- ],
- [
+]]],
+[[[
if (rtnl_dump_filter(NULL, NULL, NULL))
return 1;
return 0;
- ]
- )],
- [c_cv_rtnl_dump_filter_three_args="yes"],
- [c_cv_rtnl_dump_filter_three_args="no"]
- )
+]]]
+ )],
+ [c_cv_rtnl_dump_filter_three_args="yes"],
+ [c_cv_rtnl_dump_filter_three_args="no"]
)
+)
CFLAGS="$SAVE_CFLAGS"
if test "x$with_oracle" = "xyes"
then
SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
- LDFLAGS="$LDFLAGS $with_oracle_libs"
+ LIBS="$LIBS $with_oracle_libs"
AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
if test "x$with_oracle" = "xyes"
then
AC_CHECK_HEADERS(pcap-bpf.h,,
[with_libpcap="no (pcap-bpf.h not found)"])
fi
+if test "x$with_libpcap" = "xyes"
+then
+ AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP],
+ [c_cv_libpcap_have_pcap_error_iface_not_up],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <pcap.h>
+]]],
+[[[
+ int val = PCAP_ERROR_IFACE_NOT_UP;
+]]]
+ )],
+ [c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
+ [c_cv_libpcap_have_pcap_error_iface_not_up="no"]))
+fi
+if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes"
+then
+ with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)"
+fi
AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
# }}}
&& test -n "$perl_interpreter"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
- PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
+ PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
CFLAGS="$CFLAGS $PERL_CFLAGS"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([for libperl],
[c_cv_have_libperl],
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM(
- [[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
#define PERL_NO_GET_CONTEXT
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
- ]],
- [[
+]]],
+[[[
dTHX;
load_module (PERL_LOADMOD_NOIMPORT,
newSVpv ("Collectd::Plugin::FooBar", 24),
Nullsv);
- ]]),
+]]]
+ )],
[c_cv_have_libperl="yes"],
[c_cv_have_libperl="no"]
)
@@ -3055,13 +3124,13 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string
then
AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
AC_SUBST(PERL_CFLAGS)
- AC_SUBST(PERL_LDFLAGS)
+ AC_SUBST(PERL_LIBS)
else
with_libperl="no"
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
else if test -z "$perl_interpreter"; then
with_libperl="no (no perl interpreter found)"
c_cv_have_libperl="no"
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$CFLAGS $PERL_CFLAGS"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([if perl supports ithreads],
[c_cv_have_perl_ithreads],
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM(
- [[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
#if !defined(USE_ITHREADS)
# error "Perl does not support ithreads!"
#endif /* !defined(USE_ITHREADS) */
- ]],
- [[ ]]),
+]]],
+[[[ ]]]
+ )],
[c_cv_have_perl_ithreads="yes"],
[c_cv_have_perl_ithreads="no"]
)
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
# trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
# (see issues #41 and #42)
CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([for broken Perl_load_module()],
[c_cv_have_broken_perl_load_module],
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM(
- [[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
#define PERL_NO_GET_CONTEXT
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
- ]],
- [[
+]]],
+[[[
dTHX;
load_module (PERL_LOADMOD_NOIMPORT,
newSVpv ("Collectd::Plugin::FooBar", 24),
Nullsv);
- ]]),
+]]]
+ )],
[c_cv_have_broken_perl_load_module="no"],
[c_cv_have_broken_perl_load_module="yes"]
)
)
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
test "x$c_cv_have_broken_perl_load_module" = "xyes")
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$CFLAGS $PERL_CFLAGS"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CHECK_MEMBER(
[struct mgvtbl.svt_local],
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
# }}}
CPPFLAGS="$SAVE_CPPFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes")
+
+with_amqp_tcp_socket="no"
+if test "x$with_librabbitmq" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
+ LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
+ LIBS="-lrabbitmq"
+
+ AC_CHECK_HEADERS(amqp_tcp_socket.h amqp_socket.h)
+ AC_CHECK_FUNC(amqp_tcp_socket_new, [with_amqp_tcp_socket="yes"], [with_amqp_tcp_socket="no"])
+ if test "x$with_amqp_tcp_socket" = "xyes"
+ then
+ AC_DEFINE(HAVE_AMQP_TCP_SOCKET, 1,
+ [Define if librabbitmq provides the new TCP socket interface.])
+ fi
+
+ AC_CHECK_DECLS(amqp_socket_close,
+ [amqp_socket_close_decl="yes"], [amqp_socket_close_decl="no"],
+ [[
+#include <amqp.h>
+#ifdef HAVE_AMQP_TCP_SOCKET_H
+# include <amqp_tcp_socket.h>
+#endif
+#ifdef HAVE_AMQP_SOCKET_H
+# include <amqp_socket.h>
+#endif
+ ]])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
+fi
# }}}
# --with-librouteros {{{
if $PKG_CONFIG --exists tokyotyrant
then
with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
- with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
- with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
+ with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `$PKG_CONFIG --libs-only-L tokyotyrant`"
+ with_libtokyotyrant_libs="$with_libtokyotyrant_libs `$PKG_CONFIG --libs-only-l tokyotyrant`"
fi
fi
with_libvirt_ldflags=""
if test "x$PKG_CONFIG" != "x"
then
- pkg-config --exists 'libxml-2.0' 2>/dev/null
+ $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
if test "$?" = "0"
then
with_libxml2="yes"
with_libxml2="no (pkg-config doesn't know libxml-2.0)"
fi
- pkg-config --exists libvirt 2>/dev/null
+ $PKG_CONFIG --exists libvirt 2>/dev/null
if test "$?" = "0"
then
with_libvirt="yes"
fi
if test "x$with_libxml2" = "xyes"
then
- with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
+ with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
if test $? -ne 0
then
with_libxml2="no"
fi
- with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
+ with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
if test $? -ne 0
then
with_libxml2="no"
fi
if test "x$with_libvirt" = "xyes"
then
- with_libvirt_cflags="`pkg-config --cflags libvirt`"
+ with_libvirt_cflags="`$PKG_CONFIG --cflags libvirt`"
if test $? -ne 0
then
with_libvirt="no"
fi
- with_libvirt_ldflags="`pkg-config --libs libvirt`"
+ with_libvirt_ldflags="`$PKG_CONFIG --libs libvirt`"
if test $? -ne 0
then
with_libvirt="no"
AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
AC_PLUGIN([table], [yes], [Parsing of tabular data])
AC_PLUGIN([tail], [yes], [Parsing of logfiles])
+AC_PLUGIN([tail_csv], [yes], [Parsing of CSV files])
AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
AC_PLUGIN([target_notification], [yes], [The notification target])
AC_PLUGIN([target_replace], [yes], [The replace target])
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_redis], [$with_libcredis], [Redis output plugin])
AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin])
+AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin])
+AC_PLUGIN([write_riemann], [$have_protoc_c], [Riemann output plugin])
AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
fi
dnl Perl bindings
+PERL_BINDINGS_OPTIONS="PREFIX=${prefix}"
AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
[
if test "x$withval" != "xno" && test "x$withval" != "xyes"
@@ -5070,12 +5177,10 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@
PERL_BINDINGS_OPTIONS="$withval"
with_perl_bindings="yes"
else
- PERL_BINDINGS_OPTIONS=""
with_perl_bindings="$withval"
fi
],
[
- PERL_BINDINGS_OPTIONS=""
if test -n "$perl_interpreter"
then
with_perl_bindings="yes"
libvirt . . . . . . . $enable_libvirt
load . . . . . . . . $enable_load
logfile . . . . . . . $enable_logfile
- lpar... . . . . . . . $enable_lpar
+ lpar . . . . . . . . $enable_lpar
madwifi . . . . . . . $enable_madwifi
match_empty_counter . $enable_match_empty_counter
match_hashed . . . . $enable_match_hashed
syslog . . . . . . . $enable_syslog
table . . . . . . . . $enable_table
tail . . . . . . . . $enable_tail
+ tail_csv . . . . . . $enable_tail_csv
tape . . . . . . . . $enable_tape
target_notification . $enable_target_notification
target_replace . . . $enable_target_replace
wireless . . . . . . $enable_wireless
write_graphite . . . $enable_write_graphite
write_http . . . . . $enable_write_http
- write_redis . . . . . $enable_write_redis
write_mongodb . . . . $enable_write_mongodb
+ write_redis . . . . . $enable_write_redis
+ write_riemann . . . . $enable_write_riemann
xmms . . . . . . . . $enable_xmms
zfs_arc . . . . . . . $enable_zfs_arc