wordexp.h \
])
-AC_CHECK_HEADERS([xfs/xqm.h], [], [],
-[
-#define _GNU_SOURCE
-])
+# --enable-xfs {{{
+AC_ARG_ENABLE([xfs],
+ [AS_HELP_STRING([--enable-xfs], [xfs support in df plugin @<:@default=yes@:>@])],
+ [],
+ [enable_xfs="auto"]
+)
+
+if test "x$enable_xfs" != "xno"; then
+ AC_CHECK_HEADERS([xfs/xqm.h],
+ [],
+ [
+ if test "x$enable_xfs" = "xyes"; then
+ AC_MSG_ERROR([xfs/xqm.h not found])
+ fi
+ ],
+ [[#define _GNU_SOURCE]]
+ )
+fi
+
+# }}}
# For the dns plugin
AC_CHECK_HEADERS(arpa/nameser.h)
AM_CONDITIONAL(BUILD_WITH_LIBLDAP, test "x$with_libldap" = "xyes")
# }}}
+# --with-liblua {{{
+AC_ARG_VAR([LIBLUA_PKG_CONFIG_NAME], [Name of liblua used by pkg-config])
+if test "x$LIBLUA_PKG_CONFIG_NAME" != "x"
+then
+ PKG_CHECK_MODULES([LUA], [$LIBLUA_PKG_CONFIG_NAME],
+ [with_liblua="yes"],
+ [with_liblua="no"]
+ )
+else
+ PKG_CHECK_MODULES([LUA], [lua],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua-5.3],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua5.3],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua-5.2],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua5.2],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua-5.1],
+ [with_liblua="yes"],
+ [
+ PKG_CHECK_MODULES([LUA], [lua5.1],
+ [with_liblua="yes"],
+ [with_liblua="no (pkg-config cannot find liblua)"]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+fi
+
+if test "x$with_liblua" = "xyes"
+then
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $LUA_CFLAGS"
+
+ AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
+ [with_liblua="yes"],
+ [with_liblua="no (header not found)"]
+ )
+
+ CFLAGS="$SAVE_CFLAGS"
+fi
+
+if test "x$with_liblua" = "xyes"
+then
+ SAVE_LIBS="$LIBS"
+ LIBS="$LIBS $LUA_LIBS"
+
+ AC_CHECK_FUNC([lua_settop],
+ [with_liblua="yes"],
+ [with_liblua="no (symbol 'lua_settop' not found)"]
+ )
+
+ LIBS="$SAVE_LIBS"
+fi
+
+if test "x$with_liblua" = "xyes"
+then
+ BUILD_WITH_LIBLUA_CFLAGS="$LUA_CFLAGS"
+ BUILD_WITH_LIBLUA_LIBS="$LUA_LIBS"
+fi
+AC_SUBST(BUILD_WITH_LIBLUA_CFLAGS)
+AC_SUBST(BUILD_WITH_LIBLUA_LIBS)
+# }}}
+
# --with-liblvm2app {{{
with_liblvm2app_cppflags=""
with_liblvm2app_ldflags=""
[with_libnotify="no (pkg-config doesn't know libnotify)"]
)
-PKG_CHECK_MODULES([LIBRIEMANN_CLIENT], [riemann-client >= 1.8.0],
+PKG_CHECK_MODULES([LIBRIEMANN_CLIENT], [riemann-client >= 1.6.0],
[with_libriemann_client="yes"],
[with_libriemann_client="no (pkg-config doesn't know libriemann-client)"])
AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
AC_PLUGIN([logfile], [yes], [File logging plugin])
AC_PLUGIN([lpar], [$with_perfstat], [AIX logical partitions statistics])
+AC_PLUGIN([lua], [$with_liblua], [Lua plugin])
AC_PLUGIN([lvm], [$with_liblvm2app], [LVM statistics])
AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
AC_MSG_RESULT([ libkstat . . . . . . $with_kstat])
AC_MSG_RESULT([ libkvm . . . . . . . $with_libkvm])
AC_MSG_RESULT([ libldap . . . . . . . $with_libldap])
+AC_MSG_RESULT([ liblua . . . . . . . $with_liblua])
AC_MSG_RESULT([ liblvm2app . . . . . $with_liblvm2app])
AC_MSG_RESULT([ libmemcached . . . . $with_libmemcached])
AC_MSG_RESULT([ libmnl . . . . . . . $with_libmnl])
AC_MSG_RESULT([ logfile . . . . . . . $enable_logfile])
AC_MSG_RESULT([ log_logstash . . . . $enable_log_logstash])
AC_MSG_RESULT([ lpar . . . . . . . . $enable_lpar])
+AC_MSG_RESULT([ lua . . . . . . . . . $enable_lua])
AC_MSG_RESULT([ lvm . . . . . . . . . $enable_lvm])
AC_MSG_RESULT([ madwifi . . . . . . . $enable_madwifi])
AC_MSG_RESULT([ match_empty_counter . $enable_match_empty_counter])