X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.in;h=234ebf7c7a69ca8cec46bb4de953e8fc32ecbef6;hp=b00df81a4d171dade926d72d45f571f939da6aa2;hb=4e7e515ba12198efe3df4d16451488de551fd529;hpb=51a4e62d7d0e73d8d5822efaef1e3218b5ad0373 diff --git a/configure.in b/configure.in index b00df81a..234ebf7c 100644 --- a/configure.in +++ b/configure.in @@ -1161,6 +1161,7 @@ FILE *fh; struct mntent *me; fh = setmntent ("/etc/mtab", "r"); me = getmntent (fh); +return(me->mnt_passno); ]]] )], [c_cv_have_one_getmntent="yes"], @@ -1180,6 +1181,7 @@ me = getmntent (fh); int status; fh = fopen ("/etc/mnttab", "r"); status = getmntent (fh, &mt); + return(status); ]]] )], [c_cv_have_two_getmntent="yes"], @@ -1214,10 +1216,9 @@ if test "x$have_getmntent" = "xgen"; then fi # Check for htonll -AC_MSG_CHECKING([if have htonll defined]) - - have_htonll="no" - AC_LINK_IFELSE([AC_LANG_PROGRAM( +AC_CACHE_CHECK([if have htonll defined], + [c_cv_have_htonll], + AC_LINK_IFELSE([AC_LANG_PROGRAM( [[[ #include #include @@ -1229,12 +1230,14 @@ AC_MSG_CHECKING([if have htonll defined]) return htonll(0); ]]] )], - [ - have_htonll="yes" - AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.]) - ]) - -AC_MSG_RESULT([$have_htonll]) + [c_cv_have_htonll="yes"], + [c_cv_have_htonll="no"] + ) +) +if test "x$c_cv_have_htonll" = "xyes" +then + AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.]) +fi # Check for structures AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors], @@ -1861,7 +1864,7 @@ then [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"]) if test "$with_libgcrypt" != "no"; then - AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)") + m4_ifdef([AM_PATH_LIBGCRYPT],[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 @@ -2003,6 +2006,10 @@ fi # --with-java {{{ with_java_home="$JAVA_HOME" +if test "x$with_java_home" = "x" +then + with_java_home="/usr/lib/jvm" +fi with_java_vmtype="client" with_java_cflags="" with_java_libs="" @@ -2027,7 +2034,7 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPVAR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$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 $TMPVAR]) @@ -2037,7 +2044,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPVAR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$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 $TMPVAR]) @@ -2047,7 +2054,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$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 $TMPVAR]) @@ -2059,7 +2066,7 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPVAR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` if test "x$TMPVAR" != "x" then JAVAC="$TMPVAR" @@ -2071,7 +2078,7 @@ then if test "x$JAR" = "x" then AC_MSG_CHECKING([for jar]) - TMPVAR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` if test "x$TMPVAR" != "x" then JAR="$TMPVAR" @@ -3041,6 +3048,7 @@ then ]]], [[[ int val = PCAP_ERROR_IFACE_NOT_UP; + return(val); ]]] )], [c_cv_libpcap_have_pcap_error_iface_not_up="yes"], @@ -3091,12 +3099,12 @@ if test "x$with_libperl" = "xyes" \ && test -n "$perl_interpreter" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string) PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts` - PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` + PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for libperl], [c_cv_have_libperl], @@ -3123,13 +3131,13 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string then AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.]) AC_SUBST(PERL_CFLAGS) - AC_SUBST(PERL_LDFLAGS) + AC_SUBST(PERL_LIBS) else with_libperl="no" fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" else if test -z "$perl_interpreter"; then with_libperl="no (no perl interpreter found)" c_cv_have_libperl="no" @@ -3139,9 +3147,9 @@ AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes") if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([if perl supports ithreads], [c_cv_have_perl_ithreads], @@ -3168,17 +3176,17 @@ then fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3) # (see issues #41 and #42) CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for broken Perl_load_module()], [c_cv_have_broken_perl_load_module], @@ -3202,7 +3210,7 @@ then ) CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE, test "x$c_cv_have_broken_perl_load_module" = "xyes") @@ -3210,9 +3218,9 @@ AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE, if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CHECK_MEMBER( [struct mgvtbl.svt_local], @@ -3231,7 +3239,7 @@ then fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi # }}} @@ -5243,12 +5251,13 @@ cat <