diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-01-16 14:45:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-01-16 14:45:49 +0100 |
commit | 537bb34b4bc086ad879f192e2605b0218d30138b (patch) | |
tree | 35e0e8717af0c478ad2434c42e571ad71ff74b5e /configure.ac | |
parent | 4c1ed87d9cfbe939252b6ba791c9bc2b06526255 (diff) |
fix #8071
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 216 |
1 files changed, 113 insertions, 103 deletions
diff --git a/configure.ac b/configure.ac index bea4a1ab..af7dc820 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-2023 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 @@ -18,7 +18,7 @@ # This configure file is in the public domain AC_PREREQ([2.69]) -AC_INIT([taler-merchant],[0.9.3a],[taler-bug@gnunet.org]) +AC_INIT([taler-merchant],[0.9.4],[taler-bug@gnunet.org]) AC_CONFIG_SRCDIR([src/backend/taler-merchant-httpd.c]) AC_CONFIG_HEADERS([taler_merchant_config.h]) # support for non-recursive builds @@ -66,72 +66,6 @@ CFLAGS="-Wall -Wno-address-of-packed-member $CFLAGS" # Checks for header files. AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h]) -# 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/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.20.0 to build this program. -*** This library is part of GNUnet, available at -*** https://gnunet.org -*** ]])]) - - -# 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]) - -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) - - -# Check for Taler's libtalerpq -libtalerpq=0 -AC_MSG_CHECKING([for libtalerpq]) -AC_ARG_WITH(exchange, - [AS_HELP_STRING([--with-exchange=PFX], [base of Taler EXCHANGE installation])], - [AC_MSG_RESULT([given as $with_exchange])], - [AC_MSG_RESULT(not given) - with_exchange=yes]) -AS_CASE([$with_exchange], - [yes], [], - [no], [AC_MSG_ERROR([--with-exchange is required])], - [LDFLAGS="-L$with_exchange/lib $LDFLAGS" - CPPFLAGS="-I$with_exchange/include $CPPFLAGS"]) - -CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" - -AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h], - [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_connect_with_cfg], libgnunetpq=1)]) -AM_CONDITIONAL(HAVE_GNUNETPQ, test x$libgnunetpq = x1) - # check for libmicrohttpd AC_MSG_CHECKING([for microhttpd]) AC_ARG_WITH([microhttpd], @@ -146,6 +80,7 @@ AS_CASE([$with_microhttpd], CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"]) MHD_VERSION_AT_LEAST([0.9.71]) + jansson=0 PKG_CHECK_MODULES([JANSSON], [jansson >= 2.3], [LDFLAGS="$JANSSON_LIBS $LDFLAGS" @@ -156,6 +91,33 @@ PKG_CHECK_MODULES([JANSSON], [jansson >= 2.3], ***]])]) +# 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]) + + +# NOTE: If we find libcurl here we set LIBCURL to -lcurl +# This affects the LIBCURL_CHECK_CONFIG call below as it takes LIBCURL into +# account when checking for curl. +AC_CHECK_LIB([curl], + [curl_easy_getinfo], + [LIBCURL="-lcurl" + curl_gnutls=1], + [curl_gnutls=0]) + +LIBCURL_CHECK_CONFIG([], [7.34.0], [], + [AC_MSG_ERROR([cURL must have a version >= 7.34.0])]) + +# Even if curl is found, we check for this constant in order to determine +# if we can use this feature. +AC_CHECK_HEADER([curl/curl.h], + [AC_CHECK_DECLS([CURLINFO_TLS_SSL_PTR], + [], + [AC_MSG_ERROR([cURL must support CURLINFO_TLS_SSL_PTR])], + [[#include <curl/curl.h>]])]) + # test for libqrencode qrencode=0 QR_LIBS="-lqrencode" @@ -184,33 +146,65 @@ AS_IF([test "$qrencode" != 1], *** You need libqrencode to build this program. *** ]])]) - AC_SUBST(QR_CFLAGS) AC_SUBST(QR_LIBS) -# NOTE: If we find libcurl here we set LIBCURL to -lcurl -# This affects the LIBCURL_CHECK_CONFIG call below as it takes LIBCURL into -# account when checking for curl. -AC_CHECK_LIB([curl], - [curl_easy_getinfo], - [LIBCURL="-lcurl" - curl_gnutls=1], - [curl_gnutls=0]) -LIBCURL_CHECK_CONFIG([], [7.34.0], [], - [AC_MSG_ERROR([cURL must have a version >= 7.34.0])]) +# 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]) -# Even if curl is found, we check for this constant in order to determine -# if we can use this feature. -AC_CHECK_HEADER([curl/curl.h], - [AC_CHECK_DECLS([CURLINFO_TLS_SSL_PTR], - [], - [AC_MSG_ERROR([cURL must support CURLINFO_TLS_SSL_PTR])], - [[#include <curl/curl.h>]])]) -# Check for Taler's libtalerfakebank -libtalerfakebank=0 -AC_MSG_CHECKING([for libtalerfakebank]) +CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" + +# 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/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.20.0 to build this program. +*** This library is part of GNUnet, available at +*** https://gnunet.org +*** ]])]) + +AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h], + [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_connect_with_cfg], libgnunetpq=1)]) +AM_CONDITIONAL(HAVE_GNUNETPQ, test x$libgnunetpq = x1) + +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) + + +libtalerutil=0 +AC_MSG_CHECKING([for libtalerutil]) AC_ARG_WITH(exchange, [AS_HELP_STRING([--with-exchange=PFX], [base of Taler EXCHANGE installation])], [AC_MSG_RESULT([given as $with_exchange])], @@ -221,14 +215,43 @@ AS_CASE([$with_exchange], [no], [AC_MSG_ERROR([--with-exchange is required])], [LDFLAGS="-L$with_exchange/lib $LDFLAGS" CPPFLAGS="-I$with_exchange/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"]) +AC_CHECK_HEADERS([taler/taler_util.h], + [AC_CHECK_LIB([talerutil], [TALER_denom_ewv_copy], libtalerutil=1)]) +AM_CONDITIONAL(HAVE_TALERUTIL, test x$libtalerutil = x1) +AS_IF([test $libtalerutil != 1], + [AC_MSG_ERROR([[ +*** +*** You need libtalerutil >= 0.9.4 to build this program. +*** This library is part of the GNU Taler exchange, available at +*** https://taler.net +*** ]])]) -CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" +# Check for Taler's libtalerpq + +libtalerpq=0 +AC_MSG_CHECKING([for libtalerpq]) +AC_CHECK_HEADERS([taler/taler_pq_lib.h], + [AC_CHECK_LIB([talerpq], [TALER_PQ_query_param_array_blinded_denom_sig], libtalerpq=1)]) +AM_CONDITIONAL(HAVE_TALERPQ, test x$libtalerpq = x1) +AS_IF([test $libtalerpq != 1], + [AC_MSG_ERROR([[ +*** +*** You need libtalerpq >= 0.9.4 to build this program. +*** This library is part of the GNU Taler exchange, available at +*** https://taler.net +*** ]])]) + + +# Check for Taler's libtalerfakebank +libtalerfakebank=0 +AC_MSG_CHECKING([for libtalerfakebank]) AC_CHECK_HEADERS([taler/taler_fakebank_lib.h], [AC_CHECK_LIB([talerfakebank], [TALER_FAKEBANK_start], libtalerfakebank=1)]) AM_CONDITIONAL(HAVE_TALERFAKEBANK, test x$libtalerfakebank = x1) + # check for libtalertwister twistertesting=0 AC_MSG_CHECKING([for talerwtistertesting]) @@ -257,11 +280,6 @@ AC_ARG_ENABLE([coverage], AC_MSG_RESULT($use_gcov) AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "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]) # logging extra_logging=0 @@ -310,13 +328,6 @@ AC_TYPE_UINTMAX_T AC_CHECK_FUNCS([strdup]) -# -# Check for tsc -# -AC_CHECK_PROG([tsc],[tsc],[yes],[no]) -AM_CONDITIONAL([HAVE_TSC], [test "x$tsc" = xyes]) - - AC_ARG_ENABLE([[doc]], [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], , [enable_doc=yes]) @@ -330,7 +341,6 @@ AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"]) AM_CONDITIONAL([HAVE_GNUNETPQ], [false]) AM_CONDITIONAL([HAVE_POSTGRESQL], [false]) AM_CONDITIONAL([HAVE_TALERFAKEBANK], [false]) -AM_CONDITIONAL([HAVE_TSC], [false]) AM_CONDITIONAL([USE_COVERAGE], [false]) AM_CONDITIONAL([ENABLE_DOC], [true]) AM_CONDITIONAL([HAVE_TWISTER], [true]) |