dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 4.0.0-rc5)
+AC_INIT(collectd, 4.0.2)
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE(dist-bzip2)
AC_PREFIX_DEFAULT("/opt/collectd")
+AC_SYS_LARGEFILE
+
#
# Checks for programs.
#
# For hddtemp module
AC_CHECK_HEADERS(linux/major.h)
+AC_CHECK_HEADERS(libgen.h)
# For the apple_sensors module
AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h)
AC_CHECK_HEADERS(curl/curl.h)
# For quota module
-AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
+AC_CHECK_HEADERS(pwd.h sys/ucred.h)
AC_CHECK_HEADERS(ctype.h)
AC_CHECK_HEADERS(limits.h)
AC_CHECK_HEADERS(sys/quota.h)
fi
AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
+AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ with_libnetsnmp="yes"
+ fi
+],
+[with_libnetsnmp="yes"])
+if test "x$with_libnetsnmp" = "xyes"
+then
+ AC_CHECK_LIB(netsnmp, init_snmp,
+ [
+ AC_DEFINE(HAVE_LIBSNMP, 1, [Define to 1 if you have the Net-SNMP library (-lnetsnmp).])
+ ], [with_libnetsnmp="no (libnetsnmp not found)"])
+fi
+if test "x$with_libnetsnmp" = "xyes"
+then
+ AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,
+ [
+ AC_DEFINE(HAVE_NET_SNMP_NET_SNMP_CONFIG_H, 1, [Define to 1 if you have the <net-snmp/net-snmp-config.h> header file.])
+ ], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
+
AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
[
if test "x$withval" != "xno" && test "x$withval" != "xyes"
fi
AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
+### BEGIN of check for libxmms ###
+with_xmms_config="xmms-config"
+with_xmms_prefix=0
+with_xmms_cflags=""
+with_xmms_libs=""
+AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
+[
+ if test "x$withval" != "xno" -a "x$withval" != "xyes"
+ then
+ if test -x "$withval/bin/xmms-config"
+ then
+ with_xmms_config="$withval/bin/xmms-config"
+ with_xmms_prefix=1
+ fi
+ fi
+ if test "x$withval" = "xno"
+ then
+ with_libxmms="no"
+ else
+ with_libxmms="yes"
+ fi
+],
+[
+ with_libxmms="yes"
+])
+if test "x$with_libxmms" = "xyes"
+then
+ with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
+ xmms_config_status=$?
+
+ if test $xmms_config_status -ne 0
+ then
+ with_libxmms="no"
+ fi
+fi
+if test "x$with_libxmms" = "xyes"
+then
+ with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
+ xmms_config_status=$?
+
+ if test $xmms_config_status -ne 0
+ then
+ with_libxmms="no"
+ fi
+fi
+if test "x$with_libxmms" = "xyes"
+then
+ AC_CHECK_LIB(xmms, xmms_remote_get_info,
+ [
+ BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
+ BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
+ AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
+ AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
+ ],
+ [
+ with_libxmms="no"
+ ],
+ [$with_xmms_libs])
+fi
+with_libxmms_numeric=0
+if test "x$with_libxmms" = "xyes"
+then
+ with_libxmms_numeric=1
+fi
+AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
+AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
+### END of check for libxmms ###
+
# Check for enabled/disabled features
#
AC_COLLECTD([processes], [disable], [module], [processes statistics])
AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics])
AC_COLLECTD([serial], [disable], [module], [serial statistics])
+AC_COLLECTD([snmp], [disable], [module], [serial statistics])
AC_COLLECTD([logfile], [disable], [module], [logfile log facility])
AC_COLLECTD([swap], [disable], [module], [swap statistics])
AC_COLLECTD([syslog], [disable], [module], [syslog log facility])
AC_COLLECTD([users], [disable], [module], [user count statistics])
AC_COLLECTD([vserver], [disable], [module], [vserver statistics])
AC_COLLECTD([wireless], [disable], [module], [wireless link statistics])
+AC_COLLECTD([xmms], [disable], [module], [wireless link statistics])
AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile)
libiptc . . . . . . $with_libiptc
libkstat . . . . . $with_kstat
libmysql . . . . . $with_libmysql
+ libnetsnmp . . . . $with_libnetsnmp
liboconfig . . . . $with_liboconfig
liboping . . . . . $with_liboping
libpcap . . . . . . $with_libpcap
libsensors . . . . $with_lm_sensors
libstatgrab . . . . $with_libstatgrab
libupsclient . . . $with_libupsclient
+ libxmms . . . . . . $with_libxmms
Features:
daemon mode . . . . $enable_daemon
processes . . . . . $enable_processes
sensors . . . . . . $enable_sensors
serial . . . . . . $enable_serial
+ snmp . . . . . . . $enable_snmp
swap . . . . . . . $enable_swap
syslog . . . . . . $enable_syslog
tape . . . . . . . $enable_tape
users . . . . . . . $enable_users
vserver . . . . . . $enable_vserver
wireless . . . . . $enable_wireless
+ xmms . . . . . . . $enable_xmms
EOF