summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2015-07-16 15:47:07 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2015-07-16 15:47:07 +0200
commite76db08d994484c6de92f0757a579ba12fbea99e (patch)
tree53701b7fde66350aab6d0000b79d821adca14ef1 /configure.ac
parent747d0832796cfd525321090f59d70c4d975779dc (diff)
downloadexchange-e76db08d994484c6de92f0757a579ba12fbea99e.tar.gz
exchange-e76db08d994484c6de92f0757a579ba12fbea99e.tar.bz2
exchange-e76db08d994484c6de92f0757a579ba12fbea99e.zip
fixing configure.ac to prepare compilation of libtalerutil_wallet under emscripten
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 24 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index f48835df..4b0a8351 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 <gnunet/platform.h>
#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],