X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=cf423edcd6b4fd64658852c0d1260b1ee6d6ee46;hb=dd13e59199e95dfa5421ca33907c0cccc75e550c;hp=0c26355cad4b5d9b289a19b4c52ead702291930c;hpb=7ef8c0d615dfd6162c2b4d7738ac476edb0fdb18;p=collectd.git diff --git a/configure.in b/configure.in index 0c26355c..cf423edc 100644 --- a/configure.in +++ b/configure.in @@ -1238,6 +1238,32 @@ else 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 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" @@ -1266,6 +1292,74 @@ then 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 # @@ -1368,6 +1462,7 @@ 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([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]) @@ -1376,6 +1471,7 @@ AC_COLLECTD([unixsock], [disable], [module], [UNIX socket plugin]) 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) @@ -1395,6 +1491,7 @@ Configuration: libiptc . . . . . . $with_libiptc libkstat . . . . . $with_kstat libmysql . . . . . $with_libmysql + libnetsnmp . . . . $with_libnetsnmp liboconfig . . . . $with_liboconfig liboping . . . . . $with_liboping libpcap . . . . . . $with_libpcap @@ -1404,6 +1501,7 @@ Configuration: libsensors . . . . $with_lm_sensors libstatgrab . . . . $with_libstatgrab libupsclient . . . $with_libupsclient + libxmms . . . . . . $with_libxmms Features: daemon mode . . . . $enable_daemon @@ -1442,6 +1540,7 @@ Configuration: processes . . . . . $enable_processes sensors . . . . . . $enable_sensors serial . . . . . . $enable_serial + snmp . . . . . . . $enable_snmp swap . . . . . . . $enable_swap syslog . . . . . . $enable_syslog tape . . . . . . . $enable_tape @@ -1449,5 +1548,6 @@ Configuration: users . . . . . . . $enable_users vserver . . . . . . $enable_vserver wireless . . . . . $enable_wireless + xmms . . . . . . . $enable_xmms EOF