summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b022eb)
raw | patch | inline | side by side (parent: 9b022eb)
author | Alex Deymo <deymo@chromium.org> | |
Thu, 18 Jul 2013 06:54:46 +0000 (23:54 -0700) | ||
committer | Alex Deymo <deymo@chromium.org> | |
Tue, 30 Jul 2013 03:44:05 +0000 (20:44 -0700) |
Adds the aquaero plugin into the build system.
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/collectd.conf.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index 27c6cd316b916a0047cfe389face9b5b40d0af9b..7c2de0f28ff2e79b8d3bdcbfd9c85be6a37ef3d0 100644 (file)
--- a/configure.in
+++ b/configure.in
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.])],
[
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])
Configuration:
Libraries:
intel mic . . . . . . $with_mic
+ libaquaero5 . . . . . $with_libaquaero5
libcurl . . . . . . . $with_libcurl
libdbi . . . . . . . $with_libdbi
libcredis . . . . . . $with_libcredis
amqp . . . . . . . $enable_amqp
apache . . . . . . . $enable_apache
apcups . . . . . . . $enable_apcups
+ aquaero . . . . . . . $enable_aquaero
apple_sensors . . . . $enable_apple_sensors
ascent . . . . . . . $enable_ascent
battery . . . . . . . $enable_battery
diff --git a/src/Makefile.am b/src/Makefile.am
index c3e596d4a5fea92d6853521fb9ee19458c5a94d4..6da9d53df62d48094b2fe634aedb6c4dc92894c8 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
collectd_DEPENDENCIES += apple_sensors.la
endif
+if BUILD_PLUGIN_AQUAERO
+pkglib_LTLIBRARIES += aquaero.la
+aquaero_la_SOURCES = aquaero.c
+aquaero_la_LDFLAGS = -module -avoid-version
+aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
+aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
+collectd_LDADD += "-dlopen" aquaero.la
+collectd_DEPENDENCIES += aquaero.la
+endif
+
if BUILD_PLUGIN_ASCENT
pkglib_LTLIBRARIES += ascent.la
ascent_la_SOURCES = ascent.c
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index 80aba6a46fbc2e84cc341d3ef33234015de6fa40..a96f6752d9f9b5dd80410aa6db6d75d5a3ada251 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
#@BUILD_PLUGIN_APACHE_TRUE@LoadPlugin apache
#@BUILD_PLUGIN_APCUPS_TRUE@LoadPlugin apcups
#@BUILD_PLUGIN_APPLE_SENSORS_TRUE@LoadPlugin apple_sensors
+#@BUILD_PLUGIN_AQUAERO_TRUE@LoadPlugin aquaero
#@BUILD_PLUGIN_ASCENT_TRUE@LoadPlugin ascent
#@BUILD_PLUGIN_BATTERY_TRUE@LoadPlugin battery
#@BUILD_PLUGIN_BIND_TRUE@LoadPlugin bind
# ReportSeconds true
#</Plugin>
+#<Plugin aquaero>
+# # 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"
+#</Plugin>
+
#<Plugin ascent>
# URL "http://localhost/ascent/status/"
# User "www-user"