X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=f623263f00463014638773702f3925ad77af6cf7;hb=10e6e69a60f1722bb0a8a3b25bd5812471f33cfc;hp=7b3bc997942abbc029d9361f592086a5152eaf0b;hpb=22f79bfb91033789ac305f261475f527fe3d8c19;p=collectd.git diff --git a/configure.ac b/configure.ac index 7b3bc997..f623263f 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,10 @@ AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_LEX AC_PROG_YACC + +# Warn when pkg.m4 is missing +m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) + PKG_PROG_PKG_CONFIG AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no]) @@ -64,13 +68,13 @@ fi if test "x$have_protoc_c" = "xyes" then - AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h], - [have_protoc_c="yes"], + AC_CHECK_HEADERS([protobuf-c/protobuf-c.h google/protobuf-c/protobuf-c.h], + [have_protoc_c="yes"; break], [have_protoc_c="no ( not found)"]) fi if test "x$have_protoc_c" = "xyes" then - AC_CHECK_LIB([protobuf-c], [protobuf_c_version], + AC_CHECK_LIB([protobuf-c], [protobuf_c_message_pack], [have_protoc_c="yes"], [have_protoc_c="no (libprotobuf-c not found)"]) @@ -1963,12 +1967,6 @@ then GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null` fi - if test "x$GCRYPT_LDFLAGS" = "x" - then - gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null` - GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib" - fi - if test "x$GCRYPT_LIBS" = "x" then GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null` @@ -1977,8 +1975,10 @@ fi SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" +SAVE_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS" LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS" +LIBS="$LIBS $GCRYPT_LIBS" if test "x$with_libgcrypt" = "xyes" then @@ -1993,10 +1993,6 @@ fi if test "x$with_libgcrypt" = "xyes" then - if test "x$GCRYPT_LDFLAGS" != "x" - then - AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS]) - fi AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer, [with_libgcrypt="yes"], [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"]) @@ -2010,6 +2006,7 @@ fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" +LIBS="$SAVE_LIBS" if test "x$with_libgcrypt" = "xyes" then @@ -2192,7 +2189,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPVAR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -type f \( -name libjvm.so -o -name libjvm.dylib \) -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR])