diff --git a/configure.ac b/configure.ac index f48835dff..4b0a83516 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,14 @@ AC_ARG_ENABLE([wallet], AC_MSG_RESULT($wallet_only) AM_CONDITIONAL([WALLET_ONLY], [test "x$wallet_only" = "xyes"]) + +# Require minimum libgcrypt version +need_libgcrypt_version=1.6.1 +AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"], + [minimum version of libgcrypt required]) +AM_PATH_LIBGCRYPT([$need_libgcrypt_version]) + + if test "$wallet_only" != yes then @@ -79,6 +87,7 @@ AS_IF([test $libgnunetutil != 1], *** https://gnunet.org *** ]])]) + # check for libmicrohttpd microhttpd=0 AC_MSG_CHECKING([for microhttpd]) @@ -127,6 +136,15 @@ AS_IF([test $jansson = 0], else # Check for GNUnet's libgnunetutil_taler_wallet. + +CFLAGS_SAVE=$CFLAGS +LDFLAGS_SAVE=$LDFLAGS +CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" +LDFLAGS="$LDFLAGS $LIBGCRYPT_LDFLAGS" +LIBS_SAVE="$LIBS" +LIBS="-lgcrypt -lgpg-error $LIBS" + + libgnunetutil_taler_wallet=0 AC_MSG_CHECKING([for libgnunetutil_taler_wallet]) AC_ARG_WITH(gnunet, @@ -140,7 +158,7 @@ AS_CASE([$with_gnunet], [LDFLAGS="-L$with_gnunet/lib $LDFLAGS" CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"]) AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_util_taler_wallet_lib.h], - [AC_CHECK_LIB([gnunetutil_taler_wallet], [GNUNET_CRYPTO_hash], libgnunetutil_taler_wallet=1)], + [AC_CHECK_LIB([gnunetutil_taler_wallet], [GNUNET_CRYPTO_hash_context_start], libgnunetutil_taler_wallet=1)], [], [#ifdef HAVE_GNUNET_PLATFORM_H #include #endif]) @@ -153,6 +171,11 @@ AS_IF([test $libgnunetutil_taler_wallet != 1], *** Run GNUnet's configure with --enable-taler-wallet as well! *** ]])]) +CFLAGS=$CFLAGS_SAVE +LDFLAGS=$LDFLAGS_SAVE +LIBS=$LIBS_SAVE + + fi TALER_LIB_LDFLAGS="-export-dynamic -no-undefined" @@ -217,12 +240,6 @@ then fi -# Require minimum libgcrypt version -need_libgcrypt_version=1.6.1 -AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"], - [minimum version of libgcrypt required]) -AM_PATH_LIBGCRYPT([$need_libgcrypt_version]) - # should developer logic be compiled (not-for-production code)? AC_MSG_CHECKING(whether to compile developer logic) AC_ARG_ENABLE([developer-mode],