X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=0f2db0788ddb4cdcb3464d0f57c17b6f2a68fbc3;hb=1c04bafe27990a337df6b9a8582669fe110eb2ae;hp=f0ced82e7ce2a593911f3c8cbfc6eba4b007122a;hpb=88ed4433eaa37f5859420cc41487ec5ee080d477;p=collectd.git diff --git a/configure.in b/configure.in index f0ced82e..0f2db078 100644 --- a/configure.in +++ b/configure.in @@ -49,6 +49,13 @@ AC_PROG_YACC PKG_PROG_PKG_CONFIG AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no]) +AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h], + [have_protobuf_c_h="yes"], + [have_protobuf_c_h="no"]) +if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes" +then + have_protoc_c="no (unable to find )" +fi AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes") AC_MSG_CHECKING([for kernel type ($host_os)]) @@ -583,13 +590,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; @@ -599,10 +606,11 @@ 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"] ) @@ -615,13 +623,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; @@ -631,10 +639,11 @@ 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!])] ) @@ -712,16 +721,15 @@ if test "x$have_strptime" = "xyes" 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_COMPILE_IFELSE([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 @@ -729,9 +737,8 @@ if test "x$have_strptime" = "xyes" && test "x$c_cv_have_strptime_default" = "xno then AC_CACHE_CHECK([whether strptime needs standards mode], [c_cv_have_strptime_standards], - AC_COMPILE_IFELSE( -AC_LANG_PROGRAM( -[[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[[ #ifndef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 #endif @@ -741,13 +748,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"])) @@ -763,25 +770,25 @@ if test "x$GCC" = "xyes" then CFLAGS="$SAVE_CFLAGS" fi - # }}} Check for strptime 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"] ) @@ -789,17 +796,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"] ) @@ -832,19 +841,19 @@ AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated 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_COMPILE_IFELSE([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"] ) @@ -857,20 +866,20 @@ fi 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_COMPILE_IFELSE([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"] ) @@ -885,9 +894,8 @@ if test "x$nan_type" = "xnone"; then LDFLAGS="$LDFLAGS -lm" AC_CACHE_CHECK([whether NAN can be defined by 0/0], [c_cv_have_nan_zero], - AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[ + AC_RUN_IFELSE([AC_LANG_PROGRAM( +[[[ #include #include #ifdef NAN @@ -898,13 +906,14 @@ 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"] ) @@ -946,9 +955,8 @@ fi; fi; fi 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_RUN_IFELSE([AC_LANG_PROGRAM( +[[[ #include #include #include @@ -961,8 +969,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]; @@ -981,7 +989,8 @@ 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"] ) @@ -993,9 +1002,8 @@ fi 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_RUN_IFELSE([AC_LANG_PROGRAM( +[[[ #include #include #include @@ -1016,8 +1024,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]; @@ -1036,7 +1044,8 @@ 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"] ) @@ -1048,9 +1057,8 @@ fi 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_RUN_IFELSE([AC_LANG_PROGRAM( +[[[ #include #include #include @@ -1065,8 +1073,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]; @@ -1085,7 +1093,8 @@ 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"] ) @@ -1131,15 +1140,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"] ) @@ -1147,16 +1158,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"] ) @@ -1192,17 +1205,19 @@ fi AC_MSG_CHECKING([if have htonll defined]) have_htonll="no" - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([ + AC_LINK_IFELSE([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.]) ]) @@ -1245,7 +1260,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 @@ -1262,7 +1276,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 @@ -1414,13 +1427,12 @@ AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes") AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes") with_libiokit="no" -AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices, -[ +if test "x$ac_system" = "xDarwin" +then with_libiokit="yes" -], -[ +else with_libiokit="no" -]) +fi AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes") with_libkvm="no" @@ -1831,6 +1843,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 $LIBGCRYPT_CFLAGS" + GCRYPT_LIBS="$LIBGCRYPT_LIBS" fi fi @@ -1994,31 +2008,31 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - AC_MSG_RESULT([found in $TMPDIR]) - JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR" + AC_MSG_RESULT([found in $TMPVAR]) + JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR" else AC_MSG_RESULT([not found]) fi AC_MSG_CHECKING([for jni_md.h]) - TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - AC_MSG_RESULT([found in $TMPDIR]) - JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR" + AC_MSG_RESULT([found in $TMPVAR]) + JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR" else AC_MSG_RESULT([not found]) fi AC_MSG_CHECKING([for libjvm.so]) - TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - AC_MSG_RESULT([found in $TMPDIR]) - JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR" + AC_MSG_RESULT([found in $TMPVAR]) + JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPVAR -Wl,-rpath -Wl,$TMPVAR" else AC_MSG_RESULT([not found]) fi @@ -2026,10 +2040,10 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPDIR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - JAVAC="$TMPDIR" + JAVAC="$TMPVAR" AC_MSG_RESULT([$JAVAC]) else AC_MSG_RESULT([not found]) @@ -2038,10 +2052,10 @@ then if test "x$JAR" = "x" then AC_MSG_CHECKING([for jar]) - TMPDIR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` - if test "x$TMPDIR" != "x" + TMPVAR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` + if test "x$TMPVAR" != "x" then - JAR="$TMPDIR" + JAR="$TMPVAR" AC_MSG_RESULT([$JAR]) else AC_MSG_RESULT([not found]) @@ -2484,35 +2498,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 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_STATS2; +return (retval); +]]] + )], + [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 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 @@ -2532,8 +2547,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 @@ -2543,24 +2559,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 @@ -2570,17 +2587,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" @@ -2995,6 +3012,25 @@ then AC_CHECK_HEADERS(pcap-bpf.h,, [with_libpcap="no (pcap-bpf.h not found)"]) fi +if test "x$with_libpcap" = "xyes" +then + AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP], + [c_cv_libpcap_have_pcap_error_iface_not_up], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +]]], +[[[ + int val = PCAP_ERROR_IFACE_NOT_UP; +]]] + )], + [c_cv_libpcap_have_pcap_error_iface_not_up="yes"], + [c_cv_libpcap_have_pcap_error_iface_not_up="no"])) +fi +if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes" +then + with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)" +fi AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes") # }}} @@ -3045,20 +3081,20 @@ 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_LINK_IFELSE([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"] ) @@ -3090,9 +3126,8 @@ then AC_CACHE_CHECK([if perl supports ithreads], [c_cv_have_perl_ithreads], - AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[ + AC_LINK_IFELSE([AC_LANG_PROGRAM( +[[[ #include #include #include @@ -3100,8 +3135,9 @@ 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"] ) @@ -3127,20 +3163,20 @@ then AC_CACHE_CHECK([for broken Perl_load_module()], [c_cv_have_broken_perl_load_module], - AC_LINK_IFELSE( - AC_LANG_PROGRAM( - [[ + AC_LINK_IFELSE([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"] ) @@ -3492,6 +3528,41 @@ fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes") + +with_amqp_tcp_socket="no" +if test "x$with_librabbitmq" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" + LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags" + LIBS="-lrabbitmq" + + AC_CHECK_HEADERS(amqp_tcp_socket.h amqp_socket.h) + AC_CHECK_FUNC(amqp_tcp_socket_new, [with_amqp_tcp_socket="yes"], [with_amqp_tcp_socket="no"]) + if test "x$with_amqp_tcp_socket" = "xyes" + then + AC_DEFINE(HAVE_AMQP_TCP_SOCKET, 1, + [Define if librabbitmq provides the new TCP socket interface.]) + fi + + AC_CHECK_DECLS(amqp_socket_close, + [amqp_socket_close_decl="yes"], [amqp_socket_close_decl="no"], + [[ +#include +#ifdef HAVE_AMQP_TCP_SOCKET_H +# include +#endif +#ifdef HAVE_AMQP_SOCKET_H +# include +#endif + ]]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" +fi # }}} # --with-librouteros {{{ @@ -5078,6 +5149,7 @@ then fi dnl Perl bindings +PERL_BINDINGS_OPTIONS="PREFIX=${prefix}" AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])], [ if test "x$withval" != "xno" && test "x$withval" != "xyes" @@ -5085,12 +5157,10 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@ PERL_BINDINGS_OPTIONS="$withval" with_perl_bindings="yes" else - PERL_BINDINGS_OPTIONS="" with_perl_bindings="$withval" fi ], [ - PERL_BINDINGS_OPTIONS="" if test -n "$perl_interpreter" then with_perl_bindings="yes" @@ -5242,7 +5312,7 @@ Configuration: libvirt . . . . . . . $enable_libvirt load . . . . . . . . $enable_load logfile . . . . . . . $enable_logfile - lpar... . . . . . . . $enable_lpar + lpar . . . . . . . . $enable_lpar madwifi . . . . . . . $enable_madwifi match_empty_counter . $enable_match_empty_counter match_hashed . . . . $enable_match_hashed