From d5cd30db4c7c932d0b0a42f7ab78dc4a12a1ac9e Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Wed, 17 Jul 2013 23:54:46 -0700 Subject: [PATCH] aquaero: Include aquaero plugin in config files. Adds the aquaero plugin into the build system. --- configure.in | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 10 +++++++++ src/collectd.conf.in | 10 +++++++++ 3 files changed, 80 insertions(+) diff --git a/configure.in b/configure.in index 27c6cd31..7c2de0f2 100644 --- a/configure.in +++ b/configure.in @@ -1480,6 +1480,63 @@ then fi AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes") +# --with-libaquaero5 {{{ +AC_ARG_WITH(libaquaero5, [AS_HELP_STRING([--with-libaquaero5@<:@=PREFIX@:>@], [Path to aquatools-ng source code.])], +[ + if test "x$withval" = "xyes" + then + with_libaquaero5="yes" + else if test "x$withval" = "xno" + then + with_libaquaero5="no" + else + with_libaquaero5="yes" + LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS -I$withval/src" + LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS -L$withval/lib" + fi; fi +], +[with_libaquaero5="yes"]) + +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" + +CPPFLAGS="$CPPFLAGS $LIBAQUAERO5_CFLAGS" +LDFLAGS="$LDFLAGS $LIBAQUAERO5_LDFLAGS" + +if test "x$with_libaquaero5" = "xyes" +then + if test "x$LIBAQUAERO5_CFLAGS" != "x" + then + AC_MSG_NOTICE([libaquaero5 CPPFLAGS: $LIBAQUAERO5_CFLAGS]) + fi + AC_CHECK_HEADERS(libaquaero5.h, + [with_libaquaero5="yes"], + [with_libaquaero5="no (libaquaero5.h not found)"]) +fi +if test "x$with_libaquaero5" = "xyes" +then + if test "x$LIBAQUAERO5_LDFLAGS" != "x" + then + AC_MSG_NOTICE([libaquaero5 LDFLAGS: $LIBAQUAERO5_LDFLAGS]) + fi + AC_CHECK_LIB(aquaero, libaquaero5_poll, + [with_libaquaero5="yes"], + [with_libaquaero5="no (symbol 'libaquaero5_poll' not found)"]) +fi + +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" + +if test "x$with_libaquaero5" = "xyes" +then + BUILD_WITH_LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS" + BUILD_WITH_LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS" + AC_SUBST(BUILD_WITH_LIBAQUAERO5_CFLAGS) + AC_SUBST(BUILD_WITH_LIBAQUAERO5_LDFLAGS) +fi +AM_CONDITIONAL(BUILD_WITH_LIBAQUAERO5, test "x$with_libaquaero5" = "xyes") +# }}} + # --with-libcredis {{{ AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])], [ @@ -5018,6 +5075,7 @@ AC_PLUGIN([amqp], [$with_librabbitmq], [AMQP output plugin]) AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics]) AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC]) AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors]) +AC_PLUGIN([aquaero], [$with_libaquaero5], [Aquaero's hardware sensors]) AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics]) AC_PLUGIN([battery], [$plugin_battery], [Battery statistics]) AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics]) @@ -5301,6 +5359,7 @@ cat < +# +# # If you specify an empty string for the device (the default) it +# # will autodetect the first Aquaero 5 installed. +# Device "" +# # Optionally, you can specify the device path, make sure the Aquaero +# # device is readable by collectd. +# #Device "/dev/usb/hiddev0" +# + # # URL "http://localhost/ascent/status/" # User "www-user" -- 2.11.0