X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=144f2897267a788700a4c67100afba6699e4c3e9;hb=9505171377a7b0e67a5db69f59a48505a235a2f8;hp=fb71e6f24ee943ded36ae4edc2bc431e45e6c371;hpb=4922870de509750a6c74d06371c5ddeed5bdec89;p=collectd.git diff --git a/configure.in b/configure.in index fb71e6f2..144f2897 100644 --- a/configure.in +++ b/configure.in @@ -49,15 +49,12 @@ AC_PROG_YACC 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 +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 protobuf-c.h)" + have_protoc_c="no (unable to find )" fi AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes") @@ -594,12 +591,12 @@ AC_CACHE_CHECK([for strtok_r], [c_cv_have_strtok_r_default], AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [[[ +[[[ #include #include #include - ]]], - [[[ +]]], +[[[ char buffer[] = "foo,bar,baz"; char *token; char *dummy; @@ -612,7 +609,8 @@ AC_CACHE_CHECK([for strtok_r], dummy = NULL; printf ("token = %s;\n", token); } - ]]])], +]]] + )], [c_cv_have_strtok_r_default="yes"], [c_cv_have_strtok_r_default="no"] ) @@ -626,12 +624,12 @@ then [c_cv_have_strtok_r_reentrant], AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [[[ +[[[ #include #include #include - ]]], - [[[ +]]], +[[[ char buffer[] = "foo,bar,baz"; char *token; char *dummy; @@ -644,7 +642,8 @@ then 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!])] ) @@ -722,15 +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_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 @@ -738,8 +737,7 @@ 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 @@ -750,13 +748,13 @@ then #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE 500 #endif - #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"])) @@ -772,7 +770,6 @@ if test "x$GCC" = "xyes" then CFLAGS="$SAVE_CFLAGS" fi - # }}} Check for strptime AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"]) @@ -780,17 +777,17 @@ 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( -[[ +[[[ #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); -]] +]]] )], [c_cv_have_swapctl_two_args="yes"], [c_cv_have_swapctl_two_args="no"] @@ -800,17 +797,17 @@ int num = swapctl(0, NULL); [c_cv_have_swapctl_three_args], 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, 0); -]] +]]] )], [c_cv_have_swapctl_three_args="yes"], [c_cv_have_swapctl_three_args="no"] @@ -844,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"] ) @@ -869,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"] ) @@ -897,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 @@ -910,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"] ) @@ -958,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 @@ -973,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]; @@ -993,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"] ) @@ -1005,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 @@ -1028,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]; @@ -1048,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"] ) @@ -1060,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 @@ -1077,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]; @@ -1097,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"] ) @@ -1144,15 +1141,15 @@ if test "x$have_getmntent" = "xc"; then [c_cv_have_one_getmntent], AC_COMPILE_IFELSE( [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"] @@ -1162,16 +1159,16 @@ me = getmntent (fh); [c_cv_have_two_getmntent], AC_COMPILE_IFELSE( [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"] @@ -1208,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.]) ]) @@ -1845,7 +1844,7 @@ 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_CPPFLAGS="$LIBGCRYPT_CPPFLAGS $LIBGCRYPT_CFLAGS" GCRYPT_LIBS="$LIBGCRYPT_LIBS" fi fi @@ -2010,31 +2009,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 @@ -2042,10 +2041,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]) @@ -2054,10 +2053,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]) @@ -2552,34 +2551,34 @@ 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([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])]) @@ -2601,7 +2600,7 @@ then [if function 'rtnl_dump_filter' expects five arguments], [c_cv_rtnl_dump_filter_five_args], AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[ +[[[ #include #include #include @@ -2613,12 +2612,12 @@ then #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"] @@ -2629,7 +2628,7 @@ return 0; [if function 'rtnl_dump_filter' expects three arguments], [c_cv_rtnl_dump_filter_three_args], AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[ +[[[ #include #include #include @@ -2641,12 +2640,12 @@ return 0; #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"] @@ -3116,20 +3115,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"] ) @@ -3161,9 +3160,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 @@ -3171,8 +3169,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"] ) @@ -3198,20 +3197,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"] ) @@ -5151,6 +5150,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" @@ -5158,12 +5158,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"