dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.11.1)
+AC_INIT(collectd, 3.11.2)
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE(dist-bzip2)
AC_SUBST(LIBLTDL)
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
-#AC_PROG_RANLIB
+AC_PROG_LEX
+AC_PROG_YACC
AC_CONFIG_SUBDIRS(libltdl)
#
AC_CHECK_HEADERS(termios.h)
AC_CHECK_HEADERS(sys/ioctl.h)
-dnl Checking for libraries
+#
+# Checking for libraries
+#
AC_CHECK_LIB(m, ext)
#
# For traffic module
AC_CHECK_FUNCS(getifaddrs)
+# Check for NAN
+nan_type="none"
+if test "x$nan_type" = "xnone"; then
+ AC_CACHE_CHECK([whether NAN is defined by default],
+ [have_nan_default],
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <math.h>
+static float foo = NAN;
+ ]],
+ [[
+ if (isnan (foo))
+ return 0;
+ else
+ return 1;
+ ]]),
+ [have_nan_default="yes"],
+ [have_nan_default="no"]
+ )
+ )
+ if test "x$have_nan_default" = "xyes"
+ then
+ nan_type="default"
+ AC_DEFINE(NAN_STATIC_DEFAULT, 1,
+ [Define if NAN is defined by default and can initialize static variables.])
+ fi
+fi
+if test "x$nan_type" = "xnone"; then
+ AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
+ [have_nan_isoc],
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#define __USE_ISOC99 1
+#include <math.h>
+static float foo = NAN;
+ ]],
+ [[
+ if (isnan (foo))
+ return 0;
+ else
+ return 1;
+ ]]),
+ [have_nan_isoc="yes"],
+ [have_nan_isoc="no"]
+ )
+ )
+ if test "x$have_nan_isoc" = "xyes"
+ then
+ nan_type="isoc99"
+ AC_DEFINE(NAN_STATIC_ISOC, 1,
+ [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
+ fi
+fi
+if test "x$nan_type" = "xnone"; then
+ AC_CACHE_CHECK([whether NAN can be defined by 0/0],
+ [have_nan_zero],
+ AC_RUN_IFELSE(
+ AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <math.h>
+#define NAN (0.0 / 0.0)
+#ifndef isnan
+# define isnan(f) ((f) != (f))
+#endif
+static float foo = NAN;
+ ]],
+ [[
+ if (isnan (foo))
+ return 0;
+ else
+ return 1;
+ ]]),
+ [have_nan_zero="yes"],
+ [have_nan_zero="no"]
+ )
+ )
+ if test "x$have_nan_zero" = "xyes"
+ then
+ nan_type="zero"
+ AC_DEFINE(NAN_ZERO_ZERO, 1,
+ [Define if NAN can be defined as (0.0 / 0.0)])
+ fi
+fi
+if test "x$nan_type" = "xnone"; then
+ AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
+fi
+
# For mount interface
#AC_CHECK_FUNCS(getfsent getvfsent)
[Wether or not to use the pcap library])
AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
+AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ with_libiptc="yes"
+ fi
+],
+[
+ if test "x$ac_system" = "xLinux"
+ then
+ with_libiptc="yes"
+ else
+ with_libiptc="no (Linux only)"
+ fi
+])
+if test "x$with_libiptc" = "xyes"
+then
+ AC_CHECK_LIB(iptc, iptc_init,
+ [
+ AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
+ ], [with_libiptc="no (libiptc not found)"])
+fi
+if test "x$with_libiptc" = "xyes"
+then
+ AC_CHECK_HEADERS(libiptc/libiptc.h,
+ [
+ AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
+ ], [with_libiptc="no (libiptc/libiptc.h not found)"])
+fi
+if test "x$with_libiptc" = "xyes"
+then
+ collect_libiptc=1
+else
+ collect_libiptc=0
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
+
# Define `step' and `hearbeat' values..
declare -i collectd_step=10
declare -i collectd_heartbeat=25
AC_COLLECTD([dns], [disable], [module], [dns statistics])
AC_COLLECTD([email], [disable], [module], [email statistics])
AC_COLLECTD([entropy], [disable], [module], [entropy statistics])
+AC_COLLECTD([exec], [disable], [module], [exec of external programs])
AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics])
+AC_COLLECTD([iptables], [disable], [module], [IPtables statistics])
+AC_COLLECTD([irq], [disable], [module], [irq statistics])
AC_COLLECTD([load], [disable], [module], [system load statistics])
AC_COLLECTD([mbmon], [disable], [module], [motherboard monitor statistics])
AC_COLLECTD([memory], [disable], [module], [memory statistics])
AC_COLLECTD([mysql], [disable], [module], [mysql statistics])
AC_COLLECTD([network], [disable], [module], [network functionality])
AC_COLLECTD([nfs], [disable], [module], [nfs statistics])
-AC_COLLECTD([ntpd], [disable], [module], [nfs statistics])
+AC_COLLECTD([ntpd], [disable], [module], [ntpd statistics])
AC_COLLECTD([ping], [disable], [module], [ping statistics])
AC_COLLECTD([processes], [disable], [module], [processes statistics])
AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics])
AC_COLLECTD([serial], [disable], [module], [serial statistics])
AC_COLLECTD([swap], [disable], [module], [swap statistics])
+AC_COLLECTD([syslog], [disable], [module], [syslog log facility])
AC_COLLECTD([tape], [disable], [module], [tape statistics])
AC_COLLECTD([traffic], [disable], [module], [system traffic statistics])
AC_COLLECTD([unixsock], [disable], [module], [UNIX socket plugin])
AC_COLLECTD([vserver], [disable], [module], [vserver statistics])
AC_COLLECTD([wireless], [disable], [module], [wireless link statistics])
-AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libconfig/Makefile src/liboping/Makefile)
+AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile)
cat <<EOF;
libkstat . . . . . $with_kstat
libmysql . . . . . $with_libmysql
libpcap . . . . . . $with_libpcap
+ libiptc . . . . . . $with_libiptc
libpthread . . . . $with_libpthread
Features:
dns . . . . . . . . $enable_dns
email . . . . . . . $enable_email
entropy . . . . . . $enable_entropy
+ exec . . . . . . . $enable_exec
hddtemp . . . . . . $enable_hddtemp
+ irq . . . . . . . . $enable_irq
+ iptables . . . . . $enable_iptables
load . . . . . . . $enable_load
mbmon . . . . . . . $enable_mbmon
memory . . . . . . $enable_memory
sensors . . . . . . $enable_sensors
serial . . . . . . $enable_serial
swap . . . . . . . $enable_swap
+ syslog . . . . . . $enable_syslog
tape . . . . . . . $enable_tape
traffic . . . . . . $enable_traffic
unixsock . . . . . $enable_unixsock