diff --git a/configure.in b/configure.in
index 9d302909146f609b5ca5bba2be139214056d621a..a97670a580b17cdfbc656699c30a65325e801c4e 100644 (file)
--- a/configure.in
+++ b/configure.in
PKG_PROG_PKG_CONFIG
AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
+if test "x$have_protoc_c" = "xyes"
+then
+ AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h],
+ [have_protobuf_c_h="yes"],
+ [have_protobuf_c_h="no"])
+fi
+if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes"
+then
+ have_protoc_c="no (unable to find protobuf-c.h)"
+fi
AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes")
AC_MSG_CHECKING([for kernel type ($host_os)])
AC_CACHE_CHECK([whether swapctl takes two arguments],
[c_cv_have_swapctl_two_args],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[
-AC_INCLUDES_DEFAULT
+[[
#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
# undef _FILE_OFFSET_BITS
# undef _LARGEFILE64_SOURCE
#endif
#include <sys/stat.h>
-#include <sys/swap.h>]],
- [[[
- int num = swapctl(0, NULL);
- ]]]
+#include <sys/swap.h>
+]],
+[[
+int num = swapctl(0, NULL);
+]]
)],
[c_cv_have_swapctl_two_args="yes"],
[c_cv_have_swapctl_two_args="no"]
AC_CACHE_CHECK([whether swapctl takes three arguments],
[c_cv_have_swapctl_three_args],
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[[AC_INCLUDES_DEFAULT
+ [AC_LANG_PROGRAM(
+[[
#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
# undef _FILE_OFFSET_BITS
# undef _LARGEFILE64_SOURCE
#endif
#include <sys/stat.h>
-#include <sys/swap.h>]]],
- [[[
- int num = swapctl(0, NULL,0);
- ]]]
+#include <sys/swap.h>
+]],
+[[
+int num = swapctl(0, NULL, 0);
+]]
)],
[c_cv_have_swapctl_three_args="yes"],
[c_cv_have_swapctl_three_args="no"]
AC_CACHE_CHECK([whether getmntent takes one argument],
[c_cv_have_one_getmntent],
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[[AC_INCLUDES_DEFAULT
-#include "$srcdir/src/utils_mount.h"]]],
- [[[
- FILE *fh;
- struct mntent *me;
- fh = setmntent ("/etc/mtab", "r");
- me = getmntent (fh);
- ]]]
+ [AC_LANG_PROGRAM(
+[[
+#include "$srcdir/src/utils_mount.h"
+]],
+[[
+FILE *fh;
+struct mntent *me;
+fh = setmntent ("/etc/mtab", "r");
+me = getmntent (fh);
+]]
)],
[c_cv_have_one_getmntent="yes"],
[c_cv_have_one_getmntent="no"]
AC_CACHE_CHECK([whether getmntent takes two arguments],
[c_cv_have_two_getmntent],
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[[AC_INCLUDES_DEFAULT
-#include "$srcdir/src/utils_mount.h"]]],
- [[[
+ [AC_LANG_PROGRAM(
+[[
+#include "$srcdir/src/utils_mount.h"
+]],
+[[
FILE *fh;
struct mnttab mt;
int status;
fh = fopen ("/etc/mnttab", "r");
status = getmntent (fh, &mt);
- ]]]
+]]
)],
[c_cv_have_two_getmntent="yes"],
[c_cv_have_two_getmntent="no"]
@@ -1245,7 +1261,6 @@ AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct
have_struct_kinfo_proc_freebsd="no"
],
[
-AC_INCLUDES_DEFAULT
#include <kvm.h>
#include <sys/param.h>
#include <sys/sysctl.h>
have_struct_kinfo_proc_openbsd="no"
],
[
-AC_INCLUDES_DEFAULT
#include <sys/param.h>
#include <sys/sysctl.h>
#include <kvm.h>
AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
# }}}
+# --with-liblvm2app {{{
+with_liblvm2app_cppflags=""
+with_liblvm2app_ldflags=""
+AC_ARG_WITH(liblvm2app, [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_liblvm2app_cppflags="-I$withval/include"
+ with_liblvm2app_ldflags="-L$withval/lib"
+ with_liblvm2app="yes"
+ else
+ with_liblvm2app="$withval"
+ fi
+],
+[
+ with_liblvm2app="yes"
+])
+if test "x$with_liblvm2app" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
+
+ AC_CHECK_HEADERS(lvm2app.h, [with_liblvm2app="yes"], [with_liblvm2app="no (lvm2app.h not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
+if test "x$with_liblvm2app" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
+ LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags"
+
+ AC_CHECK_LIB(liblvm2app, lvm_init[with_liblvm2app="yes"], [with_liblvm2app="no (Symbol 'lvm_init' not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+if test "x$with_liblvm2app" = "xyes"
+then
+ BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags"
+ BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags"
+ BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app"
+ AC_SUBST(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBLVM2APP_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBLVM2APP_LIBS)
+ AC_DEFINE(HAVE_LIBLVM2APP, 1, [Define if liblvm2app is present and usable.])
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBLVM2APP, test "x$with_liblvm2app" = "xyes")
+# }}}
+
# --with-libmemcached {{{
with_libmemcached_cppflags=""
with_libmemcached_ldflags=""
#include <sys/socket.h>])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[[
- #include <stdio.h>
- #include <sys/types.h>
- #include <asm/types.h>
- #include <sys/socket.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
- ]]], [[[
- int retval = TCA_STATS2;
- return (retval);
- ]]]
- )],
- [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
+[[
+#include <stdio.h>
+#include <sys/types.h>
+#include <asm/types.h>
+#include <sys/socket.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+]],
+[[
+int retval = TCA_STATS2;
+return (retval);
+]]
+ )],
+ [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[[#include <stdio.h>
+[[
+#include <stdio.h>
#include <sys/types.h>
#include <asm/types.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-]]], [[[
-int main (void)
-{
- int retval = TCA_STATS;
- return (retval);
-}]]])],
- [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
- []);
+]],
+[[
+int retval = TCA_STATS;
+return (retval);
+]]
+ )],
+ [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
CFLAGS="$SAVE_CFLAGS"
fi
[if function 'rtnl_dump_filter' expects five arguments],
[c_cv_rtnl_dump_filter_five_args],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[[
-AC_INCLUDES_DEFAULT
+[[
+#include <stdio.h>
+#include <sys/types.h>
#include <asm/types.h>
#include <sys/socket.h>
#if HAVE_LIBNETLINK_H
#elif HAVE_LINUX_LIBNETLINK_H
# include <linux/libnetlink.h>
#endif
- ]]], [[[
+]],
+[[
if (rtnl_dump_filter(NULL, NULL, NULL, NULL, NULL))
return 1;
return 0;
- ]]]
- )],
- [c_cv_rtnl_dump_filter_five_args="yes"],
- [c_cv_rtnl_dump_filter_five_args="no"]
- )
+]]
+ )],
+ [c_cv_rtnl_dump_filter_five_args="yes"],
+ [c_cv_rtnl_dump_filter_five_args="no"]
)
+)
AC_CACHE_CHECK(
[if function 'rtnl_dump_filter' expects three arguments],
[c_cv_rtnl_dump_filter_three_args],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[[
-AC_INCLUDES_DEFAULT
+[[
+#include <stdio.h>
+#include <sys/types.h>
#include <asm/types.h>
#include <sys/socket.h>
#if HAVE_LIBNETLINK_H
#elif HAVE_LINUX_LIBNETLINK_H
# include <linux/libnetlink.h>
#endif
- ]]], [[[
+]],
+[[
if (rtnl_dump_filter(NULL, NULL, NULL))
return 1;
return 0;
- ]]]
- )],
- [c_cv_rtnl_dump_filter_three_args="yes"],
- [c_cv_rtnl_dump_filter_three_args="no"]
- )
+]]
+ )],
+ [c_cv_rtnl_dump_filter_three_args="yes"],
+ [c_cv_rtnl_dump_filter_three_args="no"]
)
+)
CFLAGS="$SAVE_CFLAGS"
plugin_thermal="yes"
plugin_uptime="yes"
plugin_vmem="yes"
+ plugin_volume="yes"
plugin_vserver="yes"
plugin_wireless="yes"
AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
AC_PLUGIN([table], [yes], [Parsing of tabular data])
AC_PLUGIN([tail], [yes], [Parsing of logfiles])
+AC_PLUGIN([tail_csv], [yes], [Parsing of CSV files])
AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
AC_PLUGIN([target_notification], [yes], [The notification target])
AC_PLUGIN([target_replace], [yes], [The replace target])
AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
+AC_PLUGIN([volume], [$with_liblvm2app], [Volume statistics])
AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin])
syslog . . . . . . . $enable_syslog
table . . . . . . . . $enable_table
tail . . . . . . . . $enable_tail
+ tail_csv . . . . . . $enable_tail_csv
tape . . . . . . . . $enable_tape
target_notification . $enable_target_notification
target_replace . . . $enable_target_replace
uuid . . . . . . . . $enable_uuid
varnish . . . . . . . $enable_varnish
vmem . . . . . . . . $enable_vmem
+ volume . . . . . . . $enable_volume
vserver . . . . . . . $enable_vserver
wireless . . . . . . $enable_wireless
write_graphite . . . $enable_write_graphite