AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
# }}}
+# --with-libldap {{{
+AC_ARG_WITH(libldap, [AS_HELP_STRING([--with-libldap@<:@=PREFIX@:>@], [Path to libldap.])],
+[
+ if test "x$withval" = "xyes"
+ then
+ with_libldap="yes"
+ else if test "x$withval" = "xno"
+ then
+ with_libldap="no"
+ else
+ with_libldap="yes"
+ LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS -I$withval/include"
+ LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS -L$withval/lib"
+ fi; fi
+],
+[with_libldap="yes"])
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+SAVE_LDFLAGS="$LDFLAGS"
+
+CPPFLAGS="$CPPFLAGS $LIBLDAP_CPPFLAGS"
+LDFLAGS="$LDFLAGS $LIBLDAP_LDFLAGS"
+
+if test "x$with_libldap" = "xyes"
+then
+ if test "x$LIBLDAP_CPPFLAGS" != "x"
+ then
+ AC_MSG_NOTICE([libldap CPPFLAGS: $LIBLDAP_CPPFLAGS])
+ fi
+ AC_CHECK_HEADERS(ldap.h,
+ [with_libldap="yes"],
+ [with_libldap="no ('ldap.h' not found)"])
+fi
+if test "x$with_libldap" = "xyes"
+then
+ if test "x$LIBLDAP_LDFLAGS" != "x"
+ then
+ AC_MSG_NOTICE([libldap LDFLAGS: $LIBLDAP_LDFLAGS])
+ fi
+ AC_CHECK_LIB(ldap, ldap_initialize,
+ [with_libldap="yes"],
+ [with_libldap="no (symbol 'ldap_initialize' not found)"])
+
+fi
+
+CPPFLAGS="$SAVE_CPPFLAGS"
+LDFLAGS="$SAVE_LDFLAGS"
+
+if test "x$with_libldap" = "xyes"
+then
+ BUILD_WITH_LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS"
+ BUILD_WITH_LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS"
+ AC_SUBST(BUILD_WITH_LIBLDAP_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBLDAP_LDFLAGS)
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBLDAP, test "x$with_libldap" = "xyes")
+# }}}
+
# --with-liblvm2app {{{
with_liblvm2app_cppflags=""
with_liblvm2app_ldflags=""
LDFLAGS="$SAVE_LDFLAGS"
fi
+if test "x$with_libstatgrab" = "xyes"
+then
+ SAVE_CFLAGS="$CFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+
+ CFLAGS="$CFLAGS $with_libstatgrab_cflags"
+ LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
+
+ AC_CACHE_CHECK([if sg_init() requires an argument],
+ [c_cv_have_libstatgrab_init_arg],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <stdio.h>
+#include <statgrab.h>
+]]],
+[[[
+ if (sg_init()) return 0;
+]]]
+ )],
+ [c_cv_have_libstatgrab_init_arg="no"],
+ [c_cv_have_libstatgrab_init_arg="yes"]
+ )
+ )
+
+ AC_CACHE_CHECK([if sg_get_user_stats() requires an argument],
+ [c_cv_have_libstatgrab_get_user_stats_arg],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <stdio.h>
+#include <statgrab.h>
+]]],
+[[[
+ if (sg_get_user_stats()) return 0;
+]]]
+ )],
+ [c_cv_have_libstatgrab_get_user_stats_arg="no"],
+ [c_cv_have_libstatgrab_get_user_stats_arg="yes"]
+ )
+ )
+
+ AC_CACHE_CHECK([if sg_disk_io_stats() uses size_t],
+ [c_cv_have_libstatgrab_get_disk_io_stats_sizet],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <stdio.h>
+#include <statgrab.h>
+]]],
+[[[
+ sg_disk_io_stats *(*ptr) (size_t *);
+ ptr = sg_get_disk_io_stats;
+ if (ptr != NULL) return 0;
+]]]
+ )],
+ [c_cv_have_libstatgrab_get_disk_io_stats_sizet="yes"],
+ [c_cv_have_libstatgrab_get_disk_io_stats_sizet="no"]
+ )
+ )
+
+ CFLAGS="$SAVE_CFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
if test "x$with_libstatgrab" = "xyes"
then
BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
+ if test "x$c_cv_have_libstatgrab_init_arg" = "xyes"
+ then
+ AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument])
+ fi
+ if test "x$c_cv_have_libstatgrab_get_user_stats_arg" = "xyes"
+ then
+ AC_DEFINE(HAVE_LIBSTATGRAB_GET_USER_STATS_ARG, 1, [Define to 1 if sg_get_user_stats does require an argument])
+ fi
+ if test "x$c_cv_have_libstatgrab_get_disk_io_stats_sizet" = "xyes"
+ then
+ AC_DEFINE(HAVE_LIBSTATGRAB_GET_DISK_IO_STATS_SIZET, 1, [Define to 1 if sg_get_disk_io_stats does require pointer to size_t as an argument])
+ fi
fi
# }}}
fi
# }}}
+# --with-libatasmart {{{
+with_libatasmart_cppflags=""
+with_libatasmart_ldflags=""
+AC_ARG_WITH(libatasmart, [AS_HELP_STRING([--with-libatasmart@<:@=PREFIX@:>@], [Path to libatasmart.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_libatasmart_cppflags="-I$withval/include"
+ with_libatasmart_ldflags="-L$withval/lib"
+ with_libatasmart="yes"
+ else
+ with_libatasmart="$withval"
+ fi
+],
+[
+ if test "x$ac_system" = "xLinux"
+ then
+ with_libatasmart="yes"
+ else
+ with_libatasmart="no (Linux only library)"
+ fi
+])
+if test "x$with_libatasmart" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags"
+
+ AC_CHECK_HEADERS(atasmart.h, [with_libatasmart="yes"], [with_libatasmart="no (atasmart.h not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+if test "x$with_libatasmart" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags"
+ LDFLAGS="$LDFLAGS $with_libatasmart_ldflags"
+
+ AC_CHECK_LIB(atasmart, sk_disk_open, [with_libatasmart="yes"], [with_libatasmart="no (Symbol 'sk_disk_open' not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+if test "x$with_libatasmart" = "xyes"
+then
+ BUILD_WITH_LIBATASMART_CPPFLAGS="$with_libatasmart_cppflags"
+ BUILD_WITH_LIBATASMART_LDFLAGS="$with_libatasmart_ldflags"
+ BUILD_WITH_LIBATASMART_LIBS="-latasmart"
+ AC_SUBST(BUILD_WITH_LIBATASMART_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBATASMART_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBATASMART_LIBS)
+ AC_DEFINE(HAVE_LIBATASMART, 1, [Define if libatasmart is present and usable.])
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBATASMART, test "x$with_libatasmart" = "xyes")
+# }}}
+
PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
[with_libnotify="yes"],
[if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then
AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
AC_PLUGIN([olsrd], [yes], [olsrd statistics])
AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
+AC_PLUGIN([openldap], [$with_libldap], [OpenLDAP statistics])
AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
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([snmp], [$with_libnetsnmp], [SNMP querying plugin])
AC_PLUGIN([statsd], [yes], [StatsD plugin])
AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
Libraries:
intel mic . . . . . . $with_mic
libaquaero5 . . . . . $with_libaquaero5
+ libatasmart . . . . . $with_libatasmart
libcurl . . . . . . . $with_libcurl
libdbi . . . . . . . $with_libdbi
libcredis . . . . . . $with_libcredis
libjvm . . . . . . . $with_java
libkstat . . . . . . $with_kstat
libkvm . . . . . . . $with_libkvm
+ libldap . . . . . . . $with_libldap
liblvm2app . . . . . $with_liblvm2app
libmemcached . . . . $with_libmemcached
libmnl . . . . . . . $with_libmnl
nut . . . . . . . . . $enable_nut
olsrd . . . . . . . . $enable_olsrd
onewire . . . . . . . $enable_onewire
+ openldap . . . . . . $enable_openldap
openvpn . . . . . . . $enable_openvpn
oracle . . . . . . . $enable_oracle
perl . . . . . . . . $enable_perl
sensors . . . . . . . $enable_sensors
serial . . . . . . . $enable_serial
sigrok . . . . . . . $enable_sigrok
+ smart . . . . . . . . $enable_smart
snmp . . . . . . . . $enable_snmp
statsd . . . . . . . $enable_statsd
swap . . . . . . . . $enable_swap