fixing configure.ac to prepare compilation of libtalerutil_wallet under emscripten

This commit is contained in:
Marcello Stanisci 2015-07-16 15:47:07 +02:00
parent 747d083279
commit e76db08d99

View File

@ -49,6 +49,14 @@ AC_ARG_ENABLE([wallet],
AC_MSG_RESULT($wallet_only) AC_MSG_RESULT($wallet_only)
AM_CONDITIONAL([WALLET_ONLY], [test "x$wallet_only" = "xyes"]) 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 if test "$wallet_only" != yes
then then
@ -79,6 +87,7 @@ AS_IF([test $libgnunetutil != 1],
*** https://gnunet.org *** https://gnunet.org
*** ]])]) *** ]])])
# check for libmicrohttpd # check for libmicrohttpd
microhttpd=0 microhttpd=0
AC_MSG_CHECKING([for microhttpd]) AC_MSG_CHECKING([for microhttpd])
@ -127,6 +136,15 @@ AS_IF([test $jansson = 0],
else else
# Check for GNUnet's libgnunetutil_taler_wallet. # 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 libgnunetutil_taler_wallet=0
AC_MSG_CHECKING([for libgnunetutil_taler_wallet]) AC_MSG_CHECKING([for libgnunetutil_taler_wallet])
AC_ARG_WITH(gnunet, AC_ARG_WITH(gnunet,
@ -140,7 +158,7 @@ AS_CASE([$with_gnunet],
[LDFLAGS="-L$with_gnunet/lib $LDFLAGS" [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"]) CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_util_taler_wallet_lib.h], 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 [], [#ifdef HAVE_GNUNET_PLATFORM_H
#include <gnunet/platform.h> #include <gnunet/platform.h>
#endif]) #endif])
@ -153,6 +171,11 @@ AS_IF([test $libgnunetutil_taler_wallet != 1],
*** Run GNUnet's configure with --enable-taler-wallet as well! *** Run GNUnet's configure with --enable-taler-wallet as well!
*** ]])]) *** ]])])
CFLAGS=$CFLAGS_SAVE
LDFLAGS=$LDFLAGS_SAVE
LIBS=$LIBS_SAVE
fi fi
TALER_LIB_LDFLAGS="-export-dynamic -no-undefined" TALER_LIB_LDFLAGS="-export-dynamic -no-undefined"
@ -217,12 +240,6 @@ then
fi 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)? # should developer logic be compiled (not-for-production code)?
AC_MSG_CHECKING(whether to compile developer logic) AC_MSG_CHECKING(whether to compile developer logic)
AC_ARG_ENABLE([developer-mode], AC_ARG_ENABLE([developer-mode],