aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac57
-rw-r--r--src/include/Makefile.am3
-rw-r--r--src/include/taler_merchant_service.h44
3 files changed, 74 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac
index fd7c9981..67d5450c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,7 +126,8 @@ AS_IF([test $jansson = 0],
*** ]])])
# check for libgnurl
-LIBGNURL_CHECK_CONFIG([], [7.34.0], [gnurl=1], [gnurl=0])
+# libgnurl
+LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
if test "$gnurl" = 1
then
AM_CONDITIONAL(HAVE_LIBGNURL, true)
@@ -134,11 +135,52 @@ then
else
AM_CONDITIONAL(HAVE_LIBGNURL, false)
fi
-AS_IF([test $gnurl = 0],
- [AC_MSG_ERROR([[
-***
-*** You need libgnurl to build this program.
-*** ]])])
+
+# libcurl-gnutls
+LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false])
+if test "x$curl" = xtrue
+then
+ AC_CHECK_HEADERS([curl/curl.h],
+ AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]),
+ [curl=false])
+ # need libcurl-gnutls.so, everything else is not acceptable
+ AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false])
+ # cURL must support CURLINFO_TLS_SESSION, version >= 7.34
+
+fi
+if test x$curl = xfalse
+then
+ AM_CONDITIONAL(HAVE_LIBCURL, false)
+if test "$gnurl" = 0
+then
+ AC_MSG_WARN([GNUnet requires libcurl-gnutls >= 7.34])
+fi
+else
+ AM_CONDITIONAL(HAVE_LIBCURL, true)
+ AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL])
+fi
+
+# libgnurl
+if test "x$gnurl" = "x0"
+then
+ if test "x$curl" = "x0"
+ then
+ AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.])
+ AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])
+ else
+ AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])
+ fi
+fi
+
+# gcov compilation
+AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
+AC_ARG_ENABLE([coverage],
+ AS_HELP_STRING([--enable-coverage],
+ [compile the library with code coverage support]),
+ [use_gcov=${enableval}],
+ [use_gcov=no])
+AC_MSG_RESULT($use_gcov)
+AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
# Require minimum libgcrypt version
need_libgcrypt_version=1.6.1
@@ -173,5 +215,6 @@ AC_CONFIG_FILES([Makefile
src/Makefile
src/include/Makefile
src/backenddb/Makefile
-src/backend/Makefile])
+src/backend/Makefile
+src/lib/Makefile])
AC_OUTPUT
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 77977b5f..f62655b3 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -5,4 +5,5 @@ EXTRA_DIST = \
talerincludedir = $(includedir)/taler
talerinclude_HEADERS = \
- taler_merchantdb_lib.h
+ taler_merchantdb_lib.h \
+ taler_merchant_service.h
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index a9decdc2..5b612f73 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -185,17 +185,17 @@ struct TALER_MERCHANT_PayCoin
* @return a handle for this request
*/
struct TALER_MERCHANT_Pay *
-TALER_MERCHANT_pay (struct TALER_MERCHANT_Context *merchant,
- const struct GNUNET_HashCode *h_wire,
- const struct GNUNET_HashCode *h_contract,
- struct GNUNET_TIME_Absolute timestamp,
- uint64_t transaction_id,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- struct GNUNET_TIME_Absolute refund_deadline,
- unsigned int num_coins,
- const struct TLAER_MERCHANT_PayCoin *coins,
- TALER_MERCHANT_PayCallback pay_cb,
- void *pay_cb_cls);
+TALER_MERCHANT_pay_wallet (struct TALER_MERCHANT_Context *merchant,
+ const struct GNUNET_HashCode *h_wire,
+ const struct GNUNET_HashCode *h_contract,
+ struct GNUNET_TIME_Absolute timestamp,
+ uint64_t transaction_id,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ struct GNUNET_TIME_Absolute refund_deadline,
+ unsigned int num_coins,
+ const struct TLAER_MERCHANT_PayCoin *coins,
+ TALER_MERCHANT_PayCallback pay_cb,
+ void *pay_cb_cls);
/**
@@ -258,17 +258,17 @@ struct TALER_MERCHANT_PaidCoin
* @return a handle for this request
*/
struct TALER_MERCHANT_Pay *
-TALER_MERCHANT_pay2 (struct TALER_MERCHANT_Context *merchant,
- const struct GNUNET_HashCode *h_wire,
- const struct GNUNET_HashCode *h_contract,
- struct GNUNET_TIME_Absolute timestamp,
- uint64_t transaction_id,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- struct GNUNET_TIME_Absolute refund_deadline,
- unsigned int num_coins,
- const struct TALER_MERCHANT_PaidCoin *coins,
- TALER_MERCHANT_PayCallback pay_cb,
- void *pay_cb_cls);
+TALER_MERCHANT_pay_frontend (struct TALER_MERCHANT_Context *merchant,
+ const struct GNUNET_HashCode *h_wire,
+ const struct GNUNET_HashCode *h_contract,
+ struct GNUNET_TIME_Absolute timestamp,
+ uint64_t transaction_id,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ struct GNUNET_TIME_Absolute refund_deadline,
+ unsigned int num_coins,
+ const struct TALER_MERCHANT_PaidCoin *coins,
+ TALER_MERCHANT_PayCallback pay_cb,
+ void *pay_cb_cls);
/**