X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=107dbe39e872434de81ade84b481531cfece1de9;hb=c983405b9f18cce28d6301124a5426e53adc63b2;hp=a58002a0e8615a88a9a5c19cda0a96f9b818d201;hpb=0384380080a39adb252a4d5dd3a6bf5c27f8faf8;p=collectd.git diff --git a/configure.in b/configure.in index a58002a0..107dbe39 100644 --- a/configure.in +++ b/configure.in @@ -1467,29 +1467,32 @@ SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS" LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS" -if test "x$with_libiptc" = "xyes" +# check whether the header file for libiptc is available. +if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then - AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [], + AC_CHECK_HEADERS(libiptc/libiptc.h, [ - with_libiptc="no (Linux iptables headers not found)" - with_own_libiptc="no" + AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the header file.]) ], [ -#include "$srcdir/src/owniptc/ipt_kernel_headers.h" + with_libiptc="yes" + with_own_libiptc="yes" ]) - fi if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then - AC_CHECK_HEADERS(libiptc/libiptc.h, + AC_CHECK_HEADERS(libiptc/libip6tc.h, [ - AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the header file.]) + AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the header file.]) ], [ with_libiptc="yes" with_own_libiptc="yes" ]) fi +# If the header file is available, check for the required type declaractions. +# They may be missing in old versions of libiptc. In that case, they will be +# declared in the iptables plugin. if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [], @@ -1503,6 +1506,7 @@ then #endif ]) fi +# Check for the iptc_init symbol in the library. if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno" then AC_CHECK_LIB(iptc, iptc_init, @@ -1514,6 +1518,19 @@ then with_own_libiptc="yes" ]) fi +# The system wide version failed for some reason. Check if we have the required +# headers to build the shipped version. +if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes" +then + AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [], + [ + with_libiptc="no (Linux iptables headers not found)" + with_own_libiptc="no" + ], + [ +#include "$srcdir/src/owniptc/ipt_kernel_headers.h" + ]) +fi AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes") AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes") if test "x$with_libiptc" = "xyes" @@ -1537,6 +1554,7 @@ with_java_vmtype="client" with_java_cflags="" with_java_libs="" JAVAC="$JAVAC" +JAR="$JAR" AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])], [ if test "x$withval" = "xno" @@ -1556,7 +1574,7 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPDIR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1566,7 +1584,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPDIR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1576,7 +1594,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPDIR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1588,7 +1606,7 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPDIR=`find -L "$with_java_home" -name javac -type f | head -n 1` + TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1` if test "x$TMPDIR" != "x" then JAVAC="$TMPDIR" @@ -1597,6 +1615,18 @@ then AC_MSG_RESULT([not found]) fi fi + if test "x$JAR" = "x" + then + AC_MSG_CHECKING([for jar]) + TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1` + if test "x$TMPDIR" != "x" + then + JAR="$TMPDIR" + AC_MSG_RESULT([$JAR]) + else + AC_MSG_RESULT([not found]) + fi + fi else if test "x$with_java_home" != "x" then AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home]) @@ -1633,6 +1663,24 @@ if test "x$JAVAC" = "x" then with_java="no (javac not found)" fi +if test "x$JAR" = "x" +then + with_jar_path="$PATH" + if test "x$with_java_home" != "x" + then + with_jar_path="$with_java_home:with_jar_path" + if test -d "$with_java_home/bin" + then + with_jar_path="$with_jar_home/bin:with_jar_path" + fi + fi + + AC_PATH_PROG(JAR, jar, [], "$with_jar_path") +fi +if test "x$JAR" = "x" +then + with_java="no (jar not found)" +fi SAVE_CPPFLAGS="$CPPFLAGS" SAVE_CFLAGS="$CFLAGS" @@ -2895,7 +2943,7 @@ AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], with_libupsclient="use_libupsclient_config" else if test -x "$withval/bin/libupsclient-config" then - with_libupsclient_config="$withval/bin/net-snmp-config" + with_libupsclient_config="$withval/bin/libupsclient-config" with_libupsclient="use_libupsclient_config" else AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])