summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac225
1 files changed, 100 insertions, 125 deletions
diff --git a/configure.ac b/configure.ac
index 6995b9b3e..d69676b8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
#
# This file is part of TALER
-# Copyright (C) 2014-2021 Taler Systems SA
+# Copyright (C) 2014-2024 Taler Systems SA
#
# TALER is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
@@ -17,7 +17,7 @@
#
#
AC_PREREQ([2.69])
-AC_INIT([taler-exchange], [0.8.5], [taler-bug@gnunet.org])
+AC_INIT([taler-exchange],[0.10.0],[taler-bug@gnunet.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/util/util.c])
AC_CONFIG_HEADERS([taler_config.h])
@@ -33,8 +33,6 @@ AM_SILENT_RULES([yes])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_AWK
AC_PROG_CC
-# FIXME: AC_PROG_CC_C99 is obsolete, remove for autoconf 2.70
-AC_PROG_CC_C99
AC_PROG_OBJC
AC_PROG_INSTALL
AC_PROG_LN_S
@@ -65,6 +63,13 @@ AS_IF([test "x$doc_only" != xyes],[
# Force some CFLAGS
CFLAGS="-Wall -Wno-address-of-packed-member $CFLAGS"
+TALER_LIB_LDFLAGS="-export-dynamic -no-undefined"
+TALER_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
+
+AC_SUBST(TALER_LIB_LDFLAGS)
+AC_SUBST(TALER_PLUGIN_LDFLAGS)
+
+
# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h sys/socket.h sys/un.h netinet/in.h netinet/ip.h])
@@ -78,6 +83,7 @@ AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"],
AM_PATH_LIBGCRYPT([$need_libgcrypt_version])
+
# should expensive tests be run?
AC_MSG_CHECKING(whether to run expensive tests)
AC_ARG_ENABLE([expensivetests],
@@ -122,6 +128,42 @@ fd = epoll_create1(EPOLL_CLOEXEC);]])],
AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 function.])]))
+# check for libmicrohttpd
+AC_MSG_CHECKING([for microhttpd])
+AC_ARG_WITH([microhttpd],
+ [AS_HELP_STRING([--with-microhttpd=PFX], [base of microhttpd installation])],
+ [AC_MSG_RESULT([given as $with_microhttpd])],
+ [AC_MSG_RESULT([not given])
+ with_microhttpd=yes])
+AS_CASE([$with_microhttpd],
+ [yes], [],
+ [no], [AC_MSG_ERROR([--with-microhttpd is required])],
+ [LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
+ CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"])
+MHD_VERSION_AT_LEAST([0.9.71])
+
+# check for libjansson (Jansson JSON library)
+jansson=0
+AC_MSG_CHECKING([for jansson])
+AC_ARG_WITH([jansson],
+ [AS_HELP_STRING([--with-jansson=PFX], [base of jansson installation])],
+ [AC_MSG_RESULT([given as $with_jansson])],
+ [AC_MSG_RESULT([not given])
+ with_jansson=yes])
+AS_CASE([$with_jansson],
+ [yes], [],
+ [no], [AC_MSG_ERROR([--with-jansson is required])],
+ [LDFLAGS="-L$with_jansson/lib $LDFLAGS"
+ CPPFLAGS="-I$with_jansson/include $CPPFLAGS"])
+AC_CHECK_LIB(jansson,json_dumpb,
+ [AC_CHECK_HEADER([jansson.h],[jansson=1])])
+AS_IF([test $jansson = 0],
+ [AC_MSG_ERROR([[
+***
+*** You need libjansson >= 2.10 to build this program.
+*** ]])])
+
+
# Check for GNUnet's libgnunetutil.
libgnunetutil=0
AC_MSG_CHECKING([for libgnunetutil])
@@ -135,20 +177,12 @@ AS_CASE([$with_gnunet],
[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
- #include <gnunet/gnunet_common.h>
- #if GNUNET_UTIL_VERSION < 0x00A0104
- #fail libgnunetutil is too old
- #endif])
+AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
+ [AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)])
AS_IF([test $libgnunetutil != 1],
[AC_MSG_ERROR([[
***
-*** You need libgnunetutil > 0.14.0 to build this program.
-*** (Yes, ">", libgnunetutil 0.14.0 is NOT enough.)
+*** You need libgnunetutil >= 0.21.1 to build this program.
*** This library is part of GNUnet, available at
*** https://gnunet.org
*** ]])])
@@ -167,11 +201,8 @@ AS_CASE([$with_gnunet],
[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])
+AC_CHECK_HEADERS([gnunet/gnunet_json_lib.h],
+ [AC_CHECK_LIB([gnunetjson], [GNUNET_JSON_parse], libgnunetjson=1)])
AS_IF([test $libgnunetjson != 1],
[AC_MSG_ERROR([[
***
@@ -185,14 +216,12 @@ AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
-# Save before checking libgnurl/libcurl
+# Save before checking libcurl
CFLAGS_SAVE=$CFLAGS
LDFLAGS_SAVE=$LDFLAGS
LIBS_SAVE=$LIBS
-# check for libgnurl
-# libgnurl
-LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
+# check for libcurl
LIBCURL_CHECK_CONFIG(,7.34.0,[curl=1],[curl=0])
# cURL must support CURLINFO_TLS_SESSION, version >= 7.34
@@ -203,22 +232,14 @@ AS_IF([test "x$curl" = x1],[
])
-# libcurl and libgnurl should be mutually exclusive
-AS_IF([test "$gnurl" = 1],
- [AM_CONDITIONAL(HAVE_LIBGNURL, true)
- AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl])
- AM_CONDITIONAL(HAVE_LIBCURL, false)
- AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])
- [LIBGNURLCURL_LIBS="-lgnurl"]],
- [AS_IF([test "$curl" = 1],
- [AM_CONDITIONAL(HAVE_LIBGNURL, false)
- AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl])
- AM_CONDITIONAL(HAVE_LIBCURL, true)
- AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])
- [LIBGNURLCURL_LIBS="-lcurl"]],
- [AC_MSG_ERROR([FATAL: No libgnurl/libcurl])])])
+# libcurl should be mutually exclusive
+AS_IF([test "$curl" = 1],
+ AM_CONDITIONAL(HAVE_LIBCURL, true)
+ AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])
+ [LIBCURL_LIBS="-lcurl"],
+ [AC_MSG_ERROR([FATAL: No libcurl])])
-AC_SUBST([LIBGNURLCURL_LIBS])
+AC_SUBST([LIBCURL_LIBS])
# Check for GNUnet's libgnunetcurl.
libgnunetcurl=0
@@ -233,25 +254,37 @@ AS_CASE([$with_gnunet],
[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])
+AC_CHECK_HEADERS([gnunet/gnunet_curl_lib.h],
+ [AC_CHECK_LIB([gnunetcurl], [GNUNET_CURL_get_select_info], libgnunetcurl=1)])
AS_IF([test $libgnunetcurl != 1],
[AC_MSG_ERROR([[
***
*** You need libgnunetcurl to build this program.
-*** Make sure you have libcurl or libgnurl installed while
+*** Make sure you have libcurl installed while
*** building GNUnet.
*** ]])])
-# Restore after gnurl/curl checks messed up these values
+# Restore after curl checks messed up these values
CFLAGS=$CFLAGS_SAVE
LDFLAGS=$LDFLAGS_SAVE
LIBS=$LIBS_SAVE
+# test for postgres
+AX_LIB_POSTGRESQL([15.0])
+AS_IF([test "x$found_postgresql" = "xyes"],
+ [SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$POSTGRES_CPPFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([libpq-fe.h], [postgres=1], [postgres=0])])
+AS_IF([test "x$postgres" != "x1"],
+ [AC_MSG_ERROR([[
+***
+*** You need libpq(-dev) >= 15.0 to build this program.
+*** ]])])
+AM_CONDITIONAL([HAVE_POSTGRESQL], [test "x$postgres" = "x1"])
+AC_DEFINE_UNQUOTED([HAVE_POSTGRESQL], [$postgres],
+ [Define to 1 if Postgres is available])
+
# Check for GNUnet's libgnunetpq.
libgnunetpq=0
AC_MSG_CHECKING([for libgnunetpq])
@@ -264,92 +297,29 @@ 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_pq_lib.h],
- [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_result_spec_string], libgnunetpq=1)],
- [], [#ifdef HAVE_GNUNET_PLATFORM_H
- #include <gnunet/platform.h>
- #endif])
+ CPPFLAGS="-I$with_gnunet/include ${CPPFLAGS}"])
+CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_CPPFLAGS}"
+AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h],
+ [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_query_param_int64], libgnunetpq=1)])
AS_IF([test $libgnunetpq != 1],
[AC_MSG_ERROR([[
***
-*** You need libgnunetpq to build this program.
+*** You need libgnunetpq version >= 6:0:1 to build this program.
*** Make sure you have Postgres installed while
-*** building GNUnet (and that your GNUnet version
-*** is recent!)
+*** building GNUnet (and that your GNUnet version is recent!)
*** ]])])
+CFLAGS_SAVE=$CFLAGS
+LDFLAGS_SAVE=$LDFLAGS
+LIBS_SAVE="$LIBS"
# Check for GNUnet's libgnunetsq
libgnunetsq=0
AC_MSG_CHECKING([for libgnunetsq])
AC_CHECK_HEADERS([gnunet/gnunet_sq_lib.h],
- [AC_CHECK_LIB([gnunetsq], [GNUNET_SQ_result_spec_string], libgnunetsq=1)],
- [], [#ifdef HAVE_GNUNET_PLATFORM_H
- #include <gnunet/platform.h>
- #endif])
+ [AC_CHECK_LIB([gnunetsq], [GNUNET_SQ_result_spec_string], libgnunetsq=1)])
-# check for libmicrohttpd
-microhttpd=0
-AC_MSG_CHECKING([for microhttpd])
-AC_ARG_WITH([microhttpd],
- [AS_HELP_STRING([--with-microhttpd=PFX], [base of microhttpd installation])],
- [AC_MSG_RESULT([given as $with_microhttpd])],
- [AC_MSG_RESULT([not given])
- with_microhttpd=yes])
-AS_CASE([$with_microhttpd],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-microhttpd is required])],
- [LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
- CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"])
-AC_CHECK_LIB(microhttpd,MHD_start_daemon,
- [AC_CHECK_HEADER([microhttpd.h],[microhttpd=1])])
-AC_CHECK_DECL([MHD_DAEMON_INFO_CURRENT_CONNECTIONS],,[microhttpd=0],[[#include <microhttpd.h>]])
-AS_IF([test $microhttpd = 0],
- [AC_MSG_ERROR([[
-***
-*** You need libmicrohttpd >= 0.9.39 to build this program.
-*** ]])])
-
-# check for libjansson (Jansson JSON library)
-jansson=0
-AC_MSG_CHECKING([for jansson])
-AC_ARG_WITH([jansson],
- [AS_HELP_STRING([--with-jansson=PFX], [base of jansson installation])],
- [AC_MSG_RESULT([given as $with_jansson])],
- [AC_MSG_RESULT([not given])
- with_jansson=yes])
-AS_CASE([$with_jansson],
- [yes], [],
- [no], [AC_MSG_ERROR([--with-jansson is required])],
- [LDFLAGS="-L$with_jansson/lib $LDFLAGS"
- CPPFLAGS="-I$with_jansson/include $CPPFLAGS"])
-AC_CHECK_LIB(jansson,json_dumpb,
- [AC_CHECK_HEADER([jansson.h],[jansson=1])])
-AS_IF([test $jansson = 0],
- [AC_MSG_ERROR([[
-***
-*** You need libjansson >= 2.10 to build this program.
-*** ]])])
-
-
-# test for postgres
-AX_LIB_POSTGRESQL([9.3])
-AS_IF([test "x$found_postgresql" = "xyes"],[postgres=true])
-
-TALER_LIB_LDFLAGS="-export-dynamic -no-undefined"
-TALER_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
-
-AC_SUBST(TALER_LIB_LDFLAGS)
-AC_SUBST(TALER_PLUGIN_LDFLAGS)
-
-CFLAGS_SAVE=$CFLAGS
-LDFLAGS_SAVE=$LDFLAGS
-LIBS_SAVE="$LIBS"
-
-
-AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
CFLAGS=$CFLAGS_SAVE
LDFLAGS=$LDFLAGS_SAVE
@@ -399,10 +369,7 @@ AS_CASE([$with_twister],
CPPFLAGS="-I$with_twister/include $CPPFLAGS"])
AC_CHECK_HEADERS([taler/taler_twister_service.h],
- [AC_CHECK_LIB([talertwister], [TALER_TWISTER_connect], talertwister=1)],
- [], [#ifdef HAVE_GNUNET_PLATFORM_H
- #include <gnunet/platform.h>
- #endif])
+ [AC_CHECK_LIB([talertwister], [TALER_TWISTER_connect], talertwister=1)])
AM_CONDITIONAL(HAVE_TWISTER, test x$talertwister = x1)
# should developer logic be compiled (not-for-production code)?
@@ -419,6 +386,11 @@ AS_IF([test "x$enableval" = "xno"], [enable_dev=0])
AC_CHECK_DECL([MHD_OPTION_NOTIFY_CONNECTION],,[enable_dev=0],[[#include <microhttpd.h>]])
AC_DEFINE_UNQUOTED([HAVE_DEVELOPER],[$enable_dev],[1 if developer logic is enabled, 0 otherwise])
+AC_PATH_PROG([JQ], [jq], [no])
+if test "$JQ" = "no"; then
+ AC_MSG_ERROR([jq is required but not found. Please install jq.])
+fi
+
# Adam shostack suggests the following for Windows:
@@ -472,7 +444,7 @@ AC_MSG_CHECKING(for source being under a VCS)
git_version=
AS_IF([test ! "X$gitcommand" = "X"],
[
- git_version=$(cd $srcdir ; git rev-list --full-history --all --abbrev-commit | head -n 1 2>/dev/null)
+ git_version=$(cd $srcdir ; git rev-list -n 1 --abbrev-commit HEAD 2>/dev/null)
])
AS_IF([test "X$git_version" = "X"],
[
@@ -519,7 +491,6 @@ AM_CONDITIONAL([MHD_HAVE_EPOLL], [false])
AM_CONDITIONAL([HAVE_POSTGRESQL], [false])
AM_CONDITIONAL([HAVE_SQLITE], [false])
AM_CONDITIONAL([HAVE_LIBCURL], [false])
-AM_CONDITIONAL([HAVE_LIBGNURL], [false])
AM_CONDITIONAL([HAVE_DEVELOPER], [false])
AM_CONDITIONAL([USE_COVERAGE], [false])
AM_CONDITIONAL([ENABLE_DOC], [true])
@@ -541,7 +512,10 @@ AC_CONFIG_FILES([Makefile
src/exchange/Makefile
src/exchangedb/Makefile
src/exchange-tools/Makefile
+ src/extensions/Makefile
+ src/extensions/age_restriction/Makefile
src/lib/Makefile
+ src/kyclogic/Makefile
src/testing/Makefile
src/benchmark/Makefile
src/include/Makefile
@@ -549,6 +523,7 @@ AC_CONFIG_FILES([Makefile
src/mhd/Makefile
src/pq/Makefile
src/sq/Makefile
+ src/templating/Makefile
src/util/Makefile
])
AC_OUTPUT