X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=b4b21a45d057cbab7968bbe6613163e119840d0a;hb=632e1074beb71748f866087bcdf9b0ba1b1d2405;hp=98395ed14228a484c886a3659031a30b6c333c85;hpb=defd9a4014a34640b1228bbcb96e6aa99e8bbb37;p=collectd.git diff --git a/configure.in b/configure.in index 98395ed1..b4b21a45 100644 --- a/configure.in +++ b/configure.in @@ -24,7 +24,7 @@ m4_ifdef([LT_PACKAGE_VERSION], ] ) -AM_INIT_AUTOMAKE(dist-bzip2) +AM_INIT_AUTOMAKE([tar-pax dist-bzip2]) AC_LANG(C) AC_PREFIX_DEFAULT("/opt/collectd") @@ -128,7 +128,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_DIRENT AC_HEADER_STDBOOL -AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h) +AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h fnmatch.h libgen.h) # For ping library AC_CHECK_HEADERS(netinet/in_systm.h, [], [], @@ -270,7 +270,19 @@ if test "x$ac_system" = "xDarwin" then AC_CHECK_HEADERS(mach/mach_init.h mach/host_priv.h mach/mach_error.h mach/mach_host.h mach/mach_port.h mach/mach_types.h mach/message.h mach/processor_set.h mach/processor.h mach/processor_info.h mach/task.h mach/thread_act.h mach/vm_region.h mach/vm_map.h mach/vm_prot.h mach/vm_statistics.h mach/kern_return.h) AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h) + # For the battery plugin + AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], +[ +#if HAVE_IOKIT_IOKITLIB_H +# include +#endif +#if HAVE_IOKIT_IOTYPES_H +# include +#endif +]) + fi + AC_CHECK_HEADERS(sys/sysctl.h, [], [], [ #if HAVE_SYS_TYPES_H @@ -298,7 +310,7 @@ else fi # For hddtemp module -AC_CHECK_HEADERS(linux/major.h libgen.h) +AC_CHECK_HEADERS(linux/major.h) # For md module (Linux only) if test "x$ac_system" = "xLinux" @@ -315,17 +327,6 @@ else have_linux_raid_md_u_h="no" fi -# For the battery plugin -AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], -[ -#if HAVE_IOKIT_IOKITLIB_H -# include -#endif -#if HAVE_IOKIT_IOTYPES_H -# include -#endif -]) - # For the swap module have_linux_wireless_h="no" if test "x$ac_system" = "xLinux" @@ -536,7 +537,20 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [], [], AC_CHECK_HEADERS(netinet/ip_compat.h) have_net_pfvar_h="no" -AC_CHECK_HEADERS(net/pfvar.h, [have_net_pfvar_h="yes"]) +AC_CHECK_HEADERS(net/pfvar.h, + [have_net_pfvar_h="yes"], + [have_net_pfvar_h="no"], +[ +#if HAVE_SYS_IOCTL_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NET_IF_H +# include +#endif +]) # For the multimeter plugin have_termios_h="no" @@ -569,13 +583,13 @@ fi AC_CACHE_CHECK([for strtok_r], [c_cv_have_strtok_r_default], AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[[[ + [AC_LANG_PROGRAM( + [[[ #include #include #include - ]]]], - [[[[ + ]]], + [[[ char buffer[] = "foo,bar,baz"; char *token; char *dummy; @@ -585,10 +599,10 @@ AC_CACHE_CHECK([for strtok_r], saveptr = NULL; while ((token = strtok_r (dummy, ",", &saveptr)) != NULL) { - dummy = NULL; + dummy = NULL; printf ("token = %s;\n", token); } - ]]]]), + ]]])], [c_cv_have_strtok_r_default="yes"], [c_cv_have_strtok_r_default="no"] ) @@ -601,13 +615,13 @@ then AC_CACHE_CHECK([if strtok_r needs _REENTRANT], [c_cv_have_strtok_r_reentrant], AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[[[ + [AC_LANG_PROGRAM( + [[[ #include #include #include - ]]]], - [[[[ + ]]], + [[[ char buffer[] = "foo,bar,baz"; char *token; char *dummy; @@ -617,10 +631,10 @@ then saveptr = NULL; while ((token = strtok_r (dummy, ",", &saveptr)) != NULL) { - dummy = NULL; + dummy = NULL; printf ("token = %s;\n", token); } - ]]]]), + ]]])], [c_cv_have_strtok_r_reentrant="yes"], [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])] ) @@ -699,15 +713,14 @@ then AC_CACHE_CHECK([whether strptime is exported by default], [c_cv_have_strptime_default], AC_COMPILE_IFELSE( -AC_LANG_PROGRAM( -[[ -AC_INCLUDES_DEFAULT +[AC_LANG_PROGRAM( +[[[ #include -]], -[[ +]]], +[[[ struct tm stm; (void) strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm); -]]), +]]])], [c_cv_have_strptime_default="yes"], [c_cv_have_strptime_default="no"])) fi @@ -716,8 +729,8 @@ then AC_CACHE_CHECK([whether strptime needs standards mode], [c_cv_have_strptime_standards], AC_COMPILE_IFELSE( -AC_LANG_PROGRAM( -[[ +[AC_LANG_PROGRAM( +[[[ #ifndef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 #endif @@ -727,13 +740,13 @@ AC_LANG_PROGRAM( #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 #endif -AC_INCLUDES_DEFAULT + #include -]], -[[ +]]], +[[[ struct tm stm; (void) strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm); -]]), +]]])], [c_cv_have_strptime_standards="yes"], [c_cv_have_strptime_standards="no"])) @@ -756,18 +769,19 @@ AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"]) if test "x$have_swapctl" = "xyes"; then AC_CACHE_CHECK([whether swapctl takes two arguments], [c_cv_have_swapctl_two_args], - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[ #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64 # undef _FILE_OFFSET_BITS # undef _LARGEFILE64_SOURCE #endif #include -#include ]], - [[ - int num = swapctl(0, NULL); - ]] - ), +#include +]], +[[ +int num = swapctl(0, NULL); +]] + )], [c_cv_have_swapctl_two_args="yes"], [c_cv_have_swapctl_two_args="no"] ) @@ -775,17 +789,19 @@ if test "x$have_swapctl" = "xyes"; then 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 -#include ]], - [[ - int num = swapctl(0, NULL,0); - ]] - ), +#include +]], +[[ +int num = swapctl(0, NULL, 0); +]] + )], [c_cv_have_swapctl_three_args="yes"], [c_cv_have_swapctl_three_args="no"] ) @@ -819,18 +835,18 @@ if test "x$nan_type" = "xnone"; then AC_CACHE_CHECK([whether NAN is defined by default], [c_cv_have_nan_default], AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - [[ + [AC_LANG_PROGRAM( + [[[ #include #include static double foo = NAN; - ]], - [[ + ]]], + [[[ if (isnan (foo)) return 0; else return 1; - ]]), + ]]])], [c_cv_have_nan_default="yes"], [c_cv_have_nan_default="no"] ) @@ -844,19 +860,19 @@ if test "x$nan_type" = "xnone"; then AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99], [c_cv_have_nan_isoc], AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - [[ + [AC_LANG_PROGRAM( + [[[ #include #define __USE_ISOC99 1 #include static double foo = NAN; - ]], - [[ + ]]], + [[[ if (isnan (foo)) return 0; else return 1; - ]]), + ]]])], [c_cv_have_nan_isoc="yes"], [c_cv_have_nan_isoc="no"] ) @@ -872,8 +888,8 @@ if test "x$nan_type" = "xnone"; then AC_CACHE_CHECK([whether NAN can be defined by 0/0], [c_cv_have_nan_zero], AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[ + [AC_LANG_PROGRAM( + [[[ #include #include #ifdef NAN @@ -884,13 +900,13 @@ if test "x$nan_type" = "xnone"; then # define isnan(f) ((f) != (f)) #endif static double foo = NAN; - ]], - [[ + ]]], + [[[ if (isnan (foo)) return 0; else return 1; - ]]), + ]]])], [c_cv_have_nan_zero="yes"], [c_cv_have_nan_zero="no"] ) @@ -933,8 +949,8 @@ if test "x$fp_layout_type" = "xunknown"; then AC_CACHE_CHECK([if doubles are stored in x86 representation], [c_cv_fp_layout_need_nothing], AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[[[ + [AC_LANG_PROGRAM( + [[[ #include #include #include @@ -947,8 +963,8 @@ if test "x$fp_layout_type" = "xunknown"; then #if HAVE_STDBOOL_H # include #endif - ]]]], - [[[[ + ]]], + [[[ uint64_t i0; uint64_t i1; uint8_t c[8]; @@ -967,7 +983,7 @@ if test "x$fp_layout_type" = "xunknown"; then return (0); else return (1); - ]]]]), + ]]])], [c_cv_fp_layout_need_nothing="yes"], [c_cv_fp_layout_need_nothing="no"] ) @@ -980,8 +996,8 @@ if test "x$fp_layout_type" = "xunknown"; then AC_CACHE_CHECK([if endianflip converts to x86 representation], [c_cv_fp_layout_need_endianflip], AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[[[ + [AC_LANG_PROGRAM( + [[[ #include #include #include @@ -1002,8 +1018,8 @@ if test "x$fp_layout_type" = "xunknown"; then (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \ (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \ (((uint64_t)(A) & 0x00000000000000ffLL) << 56)) - ]]]], - [[[[ + ]]], + [[[ uint64_t i0; uint64_t i1; uint8_t c[8]; @@ -1022,7 +1038,7 @@ if test "x$fp_layout_type" = "xunknown"; then return (0); else return (1); - ]]]]), + ]]])], [c_cv_fp_layout_need_endianflip="yes"], [c_cv_fp_layout_need_endianflip="no"] ) @@ -1035,8 +1051,8 @@ if test "x$fp_layout_type" = "xunknown"; then AC_CACHE_CHECK([if intswap converts to x86 representation], [c_cv_fp_layout_need_intswap], AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[[[ + [AC_LANG_PROGRAM( + [[[ #include #include #include @@ -1051,8 +1067,8 @@ if test "x$fp_layout_type" = "xunknown"; then #endif #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \ (((uint64_t)(A) & 0x00000000ffffffffLL) << 32)) - ]]]], - [[[[ + ]]], + [[[ uint64_t i0; uint64_t i1; uint8_t c[8]; @@ -1071,7 +1087,7 @@ if test "x$fp_layout_type" = "xunknown"; then return (0); else return (1); - ]]]]), + ]]])], [c_cv_fp_layout_need_intswap="yes"], [c_cv_fp_layout_need_intswap="no"] ) @@ -1117,15 +1133,17 @@ if test "x$have_getmntent" = "xc"; then 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"] ) @@ -1133,16 +1151,18 @@ if test "x$have_getmntent" = "xc"; then 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"] ) @@ -1179,15 +1199,15 @@ AC_MSG_CHECKING([if have htonll defined]) have_htonll="no" AC_LINK_IFELSE([ - AC_LANG_PROGRAM([ + AC_LANG_PROGRAM([[[ #include #include #if HAVE_INTTYPES_H # include #endif - ], [ + ]]], [[[ return htonll(0); - ]) + ]]]) ], [ have_htonll="yes" AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.]) @@ -1231,7 +1251,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 #include #include @@ -1248,7 +1267,6 @@ AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc], have_struct_kinfo_proc_openbsd="no" ], [ -AC_INCLUDES_DEFAULT #include #include #include @@ -1817,6 +1835,8 @@ then if test "$with_libgcrypt" != "no"; then AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)") + GCRYPT_CPPFLAGS="$LIBGCRYPT_CPPFLAGS" + GCRYPT_LIBS="$LIBGCRYPT_LIBS" fi fi @@ -2470,35 +2490,36 @@ then #include ]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [ - #include - #include - #include - #include - #include - #include - ], [ - int retval = TCA_STATS2; - return (retval); - ] - )], - [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])]) - - AC_COMPILE_IFELSE( -[#include +[[ +#include #include #include #include #include #include +]], +[[ +int retval = TCA_STATS2; +return (retval); +]] + )], + [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])]) -int main (void) -{ - int retval = TCA_STATS; - return (retval); -}], - [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])] - []); + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[ +#include +#include +#include +#include +#include +#include +]], +[[ +int retval = TCA_STATS; +return (retval); +]] + )], + [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]) CFLAGS="$SAVE_CFLAGS" fi @@ -2518,8 +2539,9 @@ then [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 +#include #include #include #if HAVE_LIBNETLINK_H @@ -2529,24 +2551,25 @@ AC_INCLUDES_DEFAULT #elif HAVE_LINUX_LIBNETLINK_H # include #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 +#include #include #include #if HAVE_LIBNETLINK_H @@ -2556,17 +2579,17 @@ AC_INCLUDES_DEFAULT #elif HAVE_LINUX_LIBNETLINK_H # include #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" @@ -3032,19 +3055,19 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string AC_CACHE_CHECK([for libperl], [c_cv_have_libperl], AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[ + [AC_LANG_PROGRAM( + [[[ #define PERL_NO_GET_CONTEXT #include #include #include - ]], - [[ + ]]], + [[[ dTHX; load_module (PERL_LOADMOD_NOIMPORT, newSVpv ("Collectd::Plugin::FooBar", 24), Nullsv); - ]]), + ]]])], [c_cv_have_libperl="yes"], [c_cv_have_libperl="no"] ) @@ -3077,8 +3100,8 @@ then AC_CACHE_CHECK([if perl supports ithreads], [c_cv_have_perl_ithreads], AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[ + [AC_LANG_PROGRAM( + [[[ #include #include #include @@ -3086,8 +3109,8 @@ then #if !defined(USE_ITHREADS) # error "Perl does not support ithreads!" #endif /* !defined(USE_ITHREADS) */ - ]], - [[ ]]), + ]]], + [[[ ]]])], [c_cv_have_perl_ithreads="yes"], [c_cv_have_perl_ithreads="no"] ) @@ -3114,19 +3137,19 @@ then AC_CACHE_CHECK([for broken Perl_load_module()], [c_cv_have_broken_perl_load_module], AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[ + [AC_LANG_PROGRAM( + [[[ #define PERL_NO_GET_CONTEXT #include #include #include - ]], - [[ + ]]], + [[[ dTHX; load_module (PERL_LOADMOD_NOIMPORT, newSVpv ("Collectd::Plugin::FooBar", 24), Nullsv); - ]]), + ]]])], [c_cv_have_broken_perl_load_module="no"], [c_cv_have_broken_perl_load_module="yes"] ) @@ -4942,6 +4965,7 @@ AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) 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]) @@ -4964,8 +4988,9 @@ AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics]) AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics]) AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin]) AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin]) -AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin]) AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin]) +AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin]) +AC_PLUGIN([write_riemann], [$have_protoc_c], [Riemann output plugin]) AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics]) @@ -5275,6 +5300,7 @@ Configuration: 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 @@ -5297,8 +5323,9 @@ Configuration: wireless . . . . . . $enable_wireless write_graphite . . . $enable_write_graphite write_http . . . . . $enable_write_http - write_redis . . . . . $enable_write_redis write_mongodb . . . . $enable_write_mongodb + write_redis . . . . . $enable_write_redis + write_riemann . . . . $enable_write_riemann xmms . . . . . . . . $enable_xmms zfs_arc . . . . . . . $enable_zfs_arc