summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-07 13:04:17 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-07 13:04:17 +0100
commitc232406660abc851c790246b085bc5ae181df926 (patch)
treefa689a3e471484e8f88a88485cbd3848f010b451 /configure.ac
parent0531b848525e566c9fd6934e92390d960778d478 (diff)
downloadtaler-mdb-c232406660abc851c790246b085bc5ae181df926.tar.gz
taler-mdb-c232406660abc851c790246b085bc5ae181df926.tar.bz2
taler-mdb-c232406660abc851c790246b085bc5ae181df926.zip
chaos monkey
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac109
1 files changed, 108 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0551c7c..36a65c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,10 +68,117 @@ AC_CHECK_FUNCS([strstr])
+# Save before checking for libraries
+LIBS_SAVE=$LIBS
+
+
+# Check for Taler's libtalermerchant
+libtalermerchant=0
+AC_MSG_CHECKING([for libtalermerchant])
+AC_ARG_WITH(merchant,
+ [AS_HELP_STRING([--with-merchant=PFX], [base of Taler MERCHANT installation])],
+ [AC_MSG_RESULT([given as $with_merchant])],
+ [AC_MSG_RESULT(not given)
+ with_merchant=yes])
+AS_CASE([$with_merchant],
+ [yes], [],
+ [no], [AC_MSG_ERROR([--with-merchant is required])],
+ [LDFLAGS="-L$with_merchant/lib $LDFLAGS"
+ CPPFLAGS="-I$with_merchant/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"])
+
+AC_CHECK_HEADERS([taler/taler_merchant_service.h],
+ [AC_CHECK_LIB([talermerchant], [TALER_MERCHANT_poll_payment], libtalermerchant=1)],
+ [], [#ifdef HAVE_TALER_PLATFORM_H
+ #include <taler/platform.h>
+ #endif])
+
+
+
+# Check for GNUnet's libgnunetutil.
+libgnunetutil=0
+AC_MSG_CHECKING([for libgnunetutil])
+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_util_lib.h],
+ [AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)],
+ [], [#ifdef HAVE_GNUNET_PLATFORM_H
+ #include <gnunet/platform.h>
+ #endif])
+AS_IF([test $libgnunetutil != 1],
+ [AC_MSG_ERROR([[
+***
+*** You need libgnunetutil to build this program.
+*** This library is part of GNUnet, available at
+*** https://gnunet.org
+*** ]])])
+
+
+
+# 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.
+*** ]])])
+
+
# Save before checking libgnurl/libcurl
CFLAGS_SAVE=$CFLAGS
LDFLAGS_SAVE=$LDFLAGS
-LIBS_SAVE=$LIBS
+
# check for libgnurl
# libgnurl