aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Burdges <burdges@gnunet.org>2016-04-29 14:51:43 +0200
committerJeff Burdges <burdges@gnunet.org>2016-04-29 14:51:43 +0200
commit872d9056b53f0f3258d6bd4055466b494db9aba3 (patch)
tree78dcfc2d6bd4f9678b36693269089723433f1369
parenta9f5958d16a6467c763f7b4d1b4872a8006572cb (diff)
parent2c3dc44a20c2b736182a07c8b50cae340b5a8dbd (diff)
Merge branch 'master' of git.taler.net:/var/git/exchange
-rw-r--r--configure.ac54
-rw-r--r--src/exchange/taler-exchange-httpd_db.c2
-rw-r--r--src/exchangedb/Makefile.am8
3 files changed, 58 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 52af3e4c5..aaf6c204d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,6 +98,60 @@ AS_IF([test $libgnunetutil != 1],
*** ]])])
+# Check for GNUnet's libgnunetjson.
+libgnunetjson=0
+AC_MSG_CHECKING([for libgnunetjson])
+AC_ARG_WITH(gnunet,
+ [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
+ [AC_MSG_RESULT([given as $with_gnunet])],
+ [AC_MSG_RESULT(not given)
+ with_gnunet=yes])
+AS_CASE([$with_gnunet],
+ [yes], [],
+ [no], [AC_MSG_ERROR([--with-gnunet is required])],
+ [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
+ CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
+AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_json_lib.h],
+ [AC_CHECK_LIB([gnunetjson], [GNUNET_JSON_parse], libgnunetjson=1)],
+ [], [#ifdef HAVE_GNUNET_PLATFORM_H
+ #include <gnunet/platform.h>
+ #endif])
+AS_IF([test $libgnunetjson != 1],
+ [AC_MSG_ERROR([[
+***
+*** You need libgnunetjson to build this program.
+*** Make sure you have libjansson installed while
+*** building GNUnet.
+*** ]])])
+
+
+# Check for GNUnet's libgnunetcurl.
+libgnunetcurl=0
+AC_MSG_CHECKING([for libgnunetcurl])
+AC_ARG_WITH(gnunet,
+ [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
+ [AC_MSG_RESULT([given as $with_gnunet])],
+ [AC_MSG_RESULT(not given)
+ with_gnunet=yes])
+AS_CASE([$with_gnunet],
+ [yes], [],
+ [no], [AC_MSG_ERROR([--with-gnunet is required])],
+ [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
+ CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
+AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_curl_lib.h],
+ [AC_CHECK_LIB([gnunetcurl], [GNUNET_CURL_get_select_info], libgnunetcurl=1)],
+ [], [#ifdef HAVE_GNUNET_PLATFORM_H
+ #include <gnunet/platform.h>
+ #endif])
+AS_IF([test $libgnunetcurl != 1],
+ [AC_MSG_ERROR([[
+***
+*** You need libgnunetcurl to build this program.
+*** Make sure you have libcurl or libgnurl installed while
+*** building GNUnet.
+*** ]])])
+
+
# check for libmicrohttpd
microhttpd=0
AC_MSG_CHECKING([for microhttpd])
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c
index 1e392c584..4b6b458ce 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -246,7 +246,7 @@ TMH_DB_execute_deposit (struct MHD_Connection *connection,
}
COMMIT_TRANSACTION(session, connection);
- GNUNET_assert (GNUNET_OK ==
+ GNUNET_assert (GNUNET_SYSERR !=
TALER_amount_subtract (&amount_without_fee,
&deposit->amount_with_fee,
&deposit->deposit_fee));
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am
index 0c6a73138..83be82a23 100644
--- a/src/exchangedb/Makefile.am
+++ b/src/exchangedb/Makefile.am
@@ -14,7 +14,9 @@ pkgcfg_DATA = \
EXTRA_DIST = \
exchangedb.conf \
- exchangedb-postgres.conf
+ exchangedb-postgres.conf \
+ plugin_exchangedb_common.c \
+ test-exchange-db-postgres.conf
plugindir = $(libdir)/taler
@@ -24,10 +26,6 @@ plugin_LTLIBRARIES = \
libtaler_plugin_exchangedb_postgres.la
endif
-EXTRA_DIST = \
- plugin_exchangedb_common.c \
- test-exchange-db-postgres.conf
-
libtaler_plugin_exchangedb_postgres_la_SOURCES = \
plugin_exchangedb_postgres.c
libtaler_plugin_exchangedb_postgres_la_LIBADD = \