dnl Process this file with autoconf to produce a configure script.
AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
-AC_CONFIG_SRCDIR(src/)
+AC_CONFIG_SRCDIR(src/target_set.c)
AC_CONFIG_HEADERS(src/config.h)
AC_CONFIG_AUX_DIR([libltdl/config])
AM_CONDITIONAL([BUILD_INCLUDED_LTDL], [test "x$LTDLDEPS" != "x"])
-AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign])
+AM_INIT_AUTOMAKE([subdir-objects tar-pax dist-bzip2 foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_LANG(C)
AC_DEFINE(HAVE_CURLOPT_TIMEOUT_MS, 1, [Define if libcurl supports CURLOPT_TIMEOUT_MS option.])
fi
fi
-AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
# }}}
# --with-libdbi {{{
fi
if test "x$with_oracle" = "xyes"
then
- BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
+ BUILD_WITH_ORACLE_CPPFLAGS="$with_oracle_cppflags"
BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
- AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
+ AC_SUBST(BUILD_WITH_ORACLE_CPPFLAGS)
AC_SUBST(BUILD_WITH_ORACLE_LIBS)
fi
# }}}
# }}}
# --with-librrd {{{
-# AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
librrd_cflags=""
librrd_ldflags=""
-librrd_threadsafe="yes"
+librrd_threadsafe="no"
librrd_rrdc_update="no"
-AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
-[ if test "x$withval" != "xno" && test "x$withval" != "xyes"
- then
- librrd_cflags="-I$withval/include"
- librrd_ldflags="-L$withval/lib"
- with_librrd="yes"
- else
- with_librrd="$withval"
- fi
-], [with_librrd="yes"])
+AC_ARG_WITH(librrd,
+ [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
+ [
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ librrd_cflags="-I$withval/include"
+ librrd_ldflags="-L$withval/lib"
+ with_librrd="yes"
+ else
+ with_librrd="$withval"
+ fi
+ ],
+ [with_librrd="yes"]
+)
+
if test "x$with_librrd" = "xyes"
then
- SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $librrd_ldflags"
+ PKG_CHECK_MODULES([RRD], [librrd >= 1.6.0],
+ [
+ AC_CHECK_LIB([rrd], [rrd_update_r],
+ [librrd_threadsafe="yes"],
+ [:]
+ )
+ AC_CHECK_LIB([rrd], [rrdc_update],
+ [librrd_rrdc_update="yes"],
+ [:]
+ )
+ ],[:]
+ )
+ LDFLAGS="$SAVE_LDFLAGS"
- CPPFLAGS="$CPPFLAGS $librrd_cflags"
- LDFLAGS="$LDFLAGS $librrd_ldflags"
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $RRD_CFLAGS $librrd_cflags"
- AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
+ AC_CHECK_HEADERS([rrd.h],, [with_librrd="no (rrd.h not found)"])
- CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
-if test "x$with_librrd" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS $librrd_cflags"
- LDFLAGS="$LDFLAGS $librrd_ldflags"
+if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" = "xno"
+then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $librrd_ldflags"
- AC_CHECK_LIB(rrd_th, rrd_update_r,
- [with_librrd="yes"
- librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
- ],
- [librrd_threadsafe="no"
- AC_CHECK_LIB(rrd, rrd_update,
- [with_librrd="yes"
- librrd_ldflags="$librrd_ldflags -lrrd -lm"
- ],
- [with_librrd="no (symbol 'rrd_update' not found)"],
- [-lm])
- ],
- [-lm])
+ AC_CHECK_LIB([rrd_th], [rrd_update_r],
+ [
+ librrd_ldflags="$librrd_ldflags -lrrd_th"
+ librrd_threadsafe="yes"
+ AC_CHECK_LIB([rrd_th], [rrdc_update],
+ [librrd_rrdc_update="yes"],
+ [:],
+ )
+ ],
+ [:]
+ )
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
- if test "x$librrd_threadsafe" = "xyes"
- then
- AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
- else
- AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
- fi
+if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" = "xno"
+then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $librrd_ldflags"
- CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ AC_CHECK_LIB([rrd], [rrd_update],
+ [
+ librrd_ldflags="$librrd_ldflags -lrrd"
+ AC_CHECK_LIB([rrd], [rrdc_update],
+ [librrd_rrdc_update="yes"],
+ [:]
+ )
+ ],
+ [with_librrd="no (symbol 'rrd_update' not found)"]
+ )
+ LDFLAGS="$SAVE_LDFLAGS"
fi
+
if test "x$with_librrd" = "xyes"
then
- BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
- BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
- AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
- AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
+ BUILD_WITH_LIBRRD_CFLAGS="$RRD_CFLAGS $librrd_cflags"
+ BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
+ BUILD_WITH_LIBRRD_LIBS="$RRD_LIBS"
+ AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
+ AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBRRD_LIBS)
fi
if test "x$librrd_threadsafe" = "xyes"
then
- AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
+ AC_DEFINE([HAVE_THREADSAFE_LIBRRD], [1],
+ [Define to 1 if the rrd library is thread-safe]
+ )
fi
# }}}
then
BUILD_WITH_LIBUDEV_CFLAGS="$with_libudev_cflags"
BUILD_WITH_LIBUDEV_LDFLAGS="$with_libudev_ldflags"
+ BUILD_WITH_LIBUDEV_LIBS="-ludev"
AC_SUBST(BUILD_WITH_LIBUDEV_CFLAGS)
AC_SUBST(BUILD_WITH_LIBUDEV_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBUDEV_LIBS)
fi
AM_CONDITIONAL(BUILD_WITH_LIBUDEV, test "x$with_libudev" = "xyes")
# }}}
fi
# }}}
+# --with-libxenctrl {{{
+with_libxenctrl_cppflags=""
+with_libxenctrl_ldflags=""
+AC_ARG_WITH(libxenctrl, [AS_HELP_STRING([--with-libxenctrl@<:@=PREFIX@:>@], [Path to libxenctrl.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_libxenctrl_cppflags="-I$withval/include"
+ with_libxenctrl_ldflags="-L$withval/lib"
+ with_libxenctrl="yes"
+ else
+ with_libxenctrl="$withval"
+ fi
+],
+[
+ with_libxenctrl="yes"
+])
+if test "x$with_libxenctrl" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libxenctrl_cppflags"
+
+ AC_CHECK_HEADERS(xenctrl.h, [with_libxenctrl="yes"], [with_libxenctrl="no (xenctrl.h not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+if test "x$with_libxenctrl" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libxenctrl_cppflags"
+ LDFLAGS="$LDFLAGS $with_libxenctrl_ldflags"
+
+ #Xen versions older than 3.4 has no xc_getcpuinfo()
+ AC_CHECK_LIB(xenctrl, xc_getcpuinfo, [with_libxenctrl="yes"], [with_libxenctrl="no (symbol 'xc_getcpuinfo' not found)"], [])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+ LIBXENCTL_CPPFLAGS="$with_libxenctl_cppflags"
+ LIBXENCTL_LDFLAGS="$with_libxenctl_ldflags"
+ AC_SUBST(LIBXENCTL_CPPFLAGS)
+ AC_SUBST(LIBXENCTL_LDFLAGS)
+fi
+
# --with-libxmms {{{
with_xmms_config="xmms-config"
with_xmms_cflags=""
[with_libnotify="no (pkg-config doesn't know libnotify)"]
)
-PKG_CHECK_MODULES([RIEMANN_C], [riemann-client >= 1.8.0],
- [with_riemann_c="yes"],
- [with_riemann_c="no (pbg-config doesn't know riemann-c-client)"])
+PKG_CHECK_MODULES([LIBRIEMANN_CLIENT], [riemann-client >= 1.8.0],
+ [with_libriemann_client="yes"],
+ [with_libriemann_client="no (pkg-config doesn't know libriemann-client)"])
# Check for enabled/disabled features
#
plugin_processes="no"
plugin_protocols="no"
plugin_serial="no"
+plugin_smart="no"
plugin_swap="no"
plugin_tape="no"
plugin_tcpconns="no"
plugin_vmem="no"
plugin_vserver="no"
plugin_wireless="no"
+plugin_xencpu="no"
plugin_zfs_arc="no"
plugin_zone="no"
plugin_zookeeper="no"
plugin_processes="yes"
fi
+if test "x$with_libatasmart" = "xyes" && test "x$with_libudev" = "xyes"
+then
+ plugin_smart="yes"
+fi
+
if test "x$with_kvm_getswapinfo" = "xyes"
then
plugin_swap="yes"
plugin_virt="yes"
fi
+if test "x$with_libxenctrl" = "xyes"
+then
+ plugin_xencpu="yes"
+fi
m4_divert_once([HELP_ENABLE], [
collectd plugins:])
AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
AC_PLUGIN([ceph], [$plugin_ceph], [Ceph daemon statistics])
AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting])
+AC_PLUGIN([chrony], [yes], [Chrony statistics])
AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
AC_PLUGIN([sigrok], [$with_libsigrok], [sigrok acquisition sources])
-AC_PLUGIN([smart], [$with_libatasmart], [SMART statistics])
+AC_PLUGIN([smart], [$plugin_smart], [SMART statistics])
AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
AC_PLUGIN([statsd], [yes], [StatsD plugin])
AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
AC_PLUGIN([write_log], [yes], [Log output plugin])
AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin])
AC_PLUGIN([write_redis], [$with_libhiredis], [Redis output plugin])
-AC_PLUGIN([write_riemann], [$with_riemann_c], [Riemann output plugin])
+AC_PLUGIN([write_riemann], [$with_libriemann_client], [Riemann output plugin])
AC_PLUGIN([write_sensu], [yes], [Sensu 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])
AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
AC_PLUGIN([zone], [$plugin_zone], [Solaris container statistics])
libpq . . . . . . . . $with_libpq
libpthread . . . . . $with_libpthread
librabbitmq . . . . . $with_librabbitmq
+ libriemann-client . . $with_libriemann_client
librdkafka . . . . . $with_librdkafka
librouteros . . . . . $with_librouteros
librrd . . . . . . . $with_librrd
libupsclient . . . . $with_libupsclient
libvarnish . . . . . $with_libvarnish
libvirt . . . . . . . $with_libvirt
+ libxenctrl . . . . . $with_libxenctrl
libxml2 . . . . . . . $with_libxml2
libxmms . . . . . . . $with_libxmms
libyajl . . . . . . . $with_libyajl
oracle . . . . . . . $with_oracle
protobuf-c . . . . . $have_protoc_c
python . . . . . . . $with_python
- riemann-c-client . . $with_riemann_c
Features:
daemon mode . . . . . $enable_daemon
bind . . . . . . . . $enable_bind
ceph . . . . . . . . $enable_ceph
cgroups . . . . . . . $enable_cgroups
+ chrony. . . . . . . . $enable_chrony
conntrack . . . . . . $enable_conntrack
contextswitch . . . . $enable_contextswitch
cpu . . . . . . . . . $enable_cpu
write_riemann . . . . $enable_write_riemann
write_sensu . . . . . $enable_write_sensu
write_tsdb . . . . . $enable_write_tsdb
+ xencpu . . . . . . . $enable_xencpu
xmms . . . . . . . . $enable_xmms
zfs_arc . . . . . . . $enable_zfs_arc
zone . . . . . . . . $enable_zone