commit eb8c63d5251265582b75ed04aabca61f15146dc1
parent 1545c60c9a920e88cd31624c067d72e7ca16ac86
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Fri, 10 Apr 2026 17:07:32 +0200
build: change build system to meson
Diffstat:
28 files changed, 1570 insertions(+), 1113 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,9 +1,7 @@
-**/Makefile
-Makefile.in
+Makefile
autom4te.cache/
build-aux/
config.log
-configure
configure~
taler_config.h.in~
*.md5~
diff --git a/Makefile.am b/Makefile.am
@@ -1,26 +0,0 @@
-# This Makefile.am is in the public domain
-AM_CPPFLAGS = -I$(top_srcdir)/src/include
-
-if DOC_ONLY
-if ENABLE_DOC
- SUBDIRS = . contrib doc po
-else
- SUBDIRS = . contrib po
-endif
-else
-if ENABLE_DOC
- SUBDIRS = . contrib src doc po
-else
- SUBDIRS = . contrib src po
-endif
-endif
-
-@DX_RULES@
-
-ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = build-aux/config.rpath \
- AUTHORS \
- README.1st
-
-gana-generate:
- ./contrib/gana-generate.sh master
diff --git a/Makefile.in b/Makefile.in
@@ -0,0 +1,49 @@
+# Build the program in the local tree
+.PHONY: all
+all:
+ $(NINJA) -C $(mesonbuilddir)
+
+# Install the program
+.PHONY: install
+install: all
+ $(MESON) install -C $(mesonbuilddir)
+
+# Remove files created during 'all'
+.PHONY: clean
+clean:
+ $(NINJA) -C $(mesonbuilddir) -t clean
+
+# Remove files created during 'install'
+.PHONY: uninstall
+uninstall:
+ $(NINJA) uninstall -C $(mesonbuilddir)
+
+# Make tarball
+.PHONY: dist
+dist:
+ $(MESON) dist -C $(mesonbuilddir) --no-tests --formats gztar
+
+# Make doxygen
+.PHONY: doxygen
+doxygen:
+ $(NINJA) -C $(mesonbuilddir) doxygen
+
+# Run tests
+.PHONY: check
+check:
+ $(MESON) test -C $(mesonbuilddir)
+
+.PHONY: installcheck
+installcheck:
+ $(MESON) test -C $(mesonbuilddir) --suite=installcheck
+
+.PHONY: integrationtests
+integrationtests:
+ $(MESON) test -C $(mesonbuilddir) --suite=integrationtests
+
+format:
+ $(MESON) fmt -i -r .
+ #find ./src -name "*.[h,c]" | uncrustify -l c -c contrib/conf/uncrustify.cfg -F - --replace --no-backup
+
+Makefile: Makefile.in
+ ./config.status
diff --git a/configure b/configure
@@ -0,0 +1,255 @@
+#!/bin/sh
+
+pkg_name="donau"
+pkg_default_features=""
+pkg_optional_features="coverage logging only-doc install-rpath"
+pkg_optional_dependencies=""
+
+# DO NOT EDIT BELOW THIS LINE
+standard_dirs="prefix exec_prefix bindir sbindir libexecdir sysconfdir sharedstatedir localstatedir runstatedir libdir includedir oldincludedir datarootdir datadir infodir localedir mandir docdir htmldir dvidir pdfdir psdir srcdir mesonbuilddir"
+standard_utils="AR AS BISON CC CXX CPP FLEX INSTALL LD LDCONFIG LEX MAKE MAKEINFO RANLIB TEXI2DVI YACC CHGRP CHMOD CHOWN MKNOD RM NINJA MESON"
+standard_flags="ARFLAGS BISONFLAGS CFLAGS CXXFLAGS CPPFLAGS FLEXFLAGS INSTALLFLAGS LDFLAGS LDCONFIGFLAGS LFLAGS MAKEFLAGS MAKEINFOFLAGS RANLIBFLAGS TEXI2DVIFLAGS YACCFLAGS CHGRPFLAGS CHMODFLAGS CHOWNFLAGS MKNODFLAGS"
+standard_vars="INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT"
+generated_comment="# This file was generated by configure. DO NOT edit it directly."
+
+# Save arguments
+cat > config.status <<EOF
+#!/bin/sh
+$generated_comment
+$0 $*
+EOF
+chmod 755 config.status
+
+# Parse arguments
+oldifs="$IFS"
+while [ "$#" -gt "0" ]; do
+ arg="$1"
+ shift
+ argsave="$@"
+
+ IFS="="
+ set -- $arg
+ IFS="$oldifs"
+ arg="$1"
+ shift
+ argparam="$@"
+
+ case "$arg" in
+ --help|-h)
+ cat <<-EOF
+ Usage: $0 [options...]
+ General options:
+
+ <variable>=<value> Overrides default utils and flags, e.g. CC=gcc
+ EOF
+ echo ""
+ echo "Directory variables:"
+ for sdir in $standard_dirs; do
+ echo "--$sdir=<directory>"
+ done
+ echo ""
+ echo "Options specific to $pkg_name:"
+ for feat in $pkg_optional_features; do
+ echo "--enable-$feat[=arg]"
+ done
+ for feat in $pkg_default_features; do
+ echo "--disable-$feat"
+ done
+ for dep in $pkg_optional_dependencies; do
+ echo "--with-$dep"
+ done
+
+ echo
+ echo Other options will be ignored. Please see the README for additional information.
+ exit 0
+ ;;
+ --enable-*)
+ for feat in $pkg_optional_features $pkg_default_features; do
+ ft=$(echo $feat | tr - _)
+ if [ "--enable-$feat" = "$arg" ] && [ -z "$argparam" ]; then
+ eval "enable_$ft=true"
+ elif [ "--enable-$feat" = "$arg" ]; then
+ if [ "$argparam" = "yes" ]; then
+ eval "enable_$ft=\"true\""
+ else
+ eval "enable_$ft=\"$argparam\""
+ fi
+ fi
+ done
+ ;;
+ --disable-*)
+ argsave="--enable-${arg#--disable-}=false $argsave"
+ ;;
+ --with-*)
+ for dep in $pkg_optional_dependencies; do
+ if [ "--with-$dep" = "$arg" ] && [ -z "$argparam" ]; then
+ eval "with_$dep=yes"
+ elif [ "--with-$dep" = "$arg" ]; then
+ eval "with_$dep=\"$argparam\""
+ fi
+ done
+ ;;
+ --without-*)
+ argsave="--with-${arg#--without-}=no $argsave"
+ ;;
+ --*)
+ for dir in $standard_dirs; do
+ [ "--$dir" = "$arg" ] && eval "var_$dir=\"$argparam\""
+ done
+ ;;
+ *)
+ for flag in $standard_utils $standard_flags standard_vars; do
+ [ "$flag" = "$arg" ] && eval "$flag=\"$argparam\""
+ done
+ ;;
+ esac
+
+ set -- $argsave
+done
+
+# Set default values
+for util in $standard_utils; do
+ case "$util" in
+ CPP) eval "$util=\"\${${util}:-\\\$(CC) -E}\"" ;;
+ CXX) eval "$util=\"\${${util}:-g++}\"" ;;
+ RM) eval "$util=\"\${${util}:-rm -f}\"" ;;
+ MESON) eval "$util=\"\${${util}:-meson}\"" ;;
+ NINJA) eval "$util=\"\${${util}:-ninja}\"" ;;
+ *) eval "$util=\"\${${util}:-${util}}\"" ;;
+ esac
+done
+for feat in $pkg_optional_features; do
+ ft=$(echo $feat | tr - _)
+ eval "enable_$ft=\${enable_$ft:-false}"
+done
+for feat in $pkg_default_features; do
+ eval "enable_$feat=\${enable_$feat:-true}"
+done
+for feat in $pkg_optional_dependencies; do
+ eval "with_$feat=\${with_$feat:-no}"
+done
+
+# Find source files
+if [ -z "$var_srcdir" ]; then
+ [ -f ../Makefile.in ] && var_srcdir=..
+ [ -f ./Makefile.in ] && var_srcdir=.
+fi
+if [ -z "$var_srcdir" ]; then
+ echo "Source files not found. Please specify a directory using --srcdir=..." >&2
+ exit 1
+fi
+
+# Write Makefile
+cat > Makefile <<EOF
+$generated_comment
+SHELL = /bin/sh
+VPATH = ${var_srcdir}
+
+mesonbuilddir = ${var_mesonbuilddir:-build}
+srcdir = ${var_srcdir}
+prefix = ${var_prefix:-/usr/local}
+exec_prefix = ${var_exec_prefix:-\$(prefix)}
+bindir = ${var_bindir:-\$(exec_prefix)/bin}
+sbindir = ${var_sbindir:-\$(exec_prefix)/sbin}
+libexecdir = ${var_libexecdir:-\$(exec_prefix)/libexec}
+datarootdir = ${var_datarootdir:-\$(prefix)/share}
+datadir = ${var_datadir:-\$(datarootdir)}
+sysconfdir = ${var_sysconfdir:-\$(prefix)/etc}
+sharedstatedir = ${var_sharedstatedir:-\$(prefix)/com}
+localstatedir = ${var_localstatedir:-\$(prefix)/var}
+runstatedir = ${var_runstatedir:-\$(localstatedir)/run}
+includedir = ${var_includedir:-\$(prefix)/include}
+oldincludedir = ${var_oldincludedir:-/usr/include}
+docdir = ${var_docdir:-\$(datarootdir)/doc/"$pkg_name"}
+infodir = ${var_infodir:-\$(datarootdir)/info}
+htmldir = ${var_htmldir:-\$(docdir)}
+dvidir = ${var_dvidir:-\$(docdir)}
+pdfdir = ${var_pdfdir:-\$(docdir)}
+psdir = ${var_psdir:-\$(docdir)}
+libdir = ${var_libdir:-\$(exec_prefix)/lib}
+lispdir = ${var_lispdir:-\$(datarootdir)/emacs/site-lisp}
+localedir = ${var_localedir:-\$(datarootdir)/locale}
+mandir = ${var_mandir:-\$(datarootdir)/man}
+manext = .1
+EOF
+
+if [ -d ${var_mesonbuilddir:-build} ]; then
+ echo "${var_mesonbuilddir:-build} already exists, deleting with"
+ $RM -r ${var_mesonbuilddir:-build} || exit 1
+fi
+
+for var in $standard_utils $standard_flags $standard_vars; do
+ eval "echo \"${var} = \$${var}\" >> Makefile"
+done
+echo >> Makefile
+
+mesonfeatopts=""
+for feat in $pkg_optional_features $pkg_default_features; do
+ ft=$(echo $feat | tr - _)
+ eval "echo \"enable_$ft=\${enable_$ft}\" >> Makefile"
+ if [ "coverage" = $feat ]; then
+ mfeat="b_$feat"
+ else
+ mfeat=$feat
+ fi
+ eval "mesonfeatopts=\"$mesonfeatopts -D$mfeat=\${enable_$ft}\""
+done
+for dep in $pkg_optional_dependencies; do
+ eval "echo \"with_$dep=\${with_$dep}\" >> Makefile"
+done
+echo >> Makefile
+
+cat "${var_srcdir}/Makefile.in" >> Makefile
+
+# Create default targets, if not already present
+default_target() {
+ grep "^$1:" Makefile >/dev/null && return
+ echo ".PHONY: $1" >> Makefile
+ echo "$1: $2" >> Makefile
+ cat >> Makefile
+ echo >> Makefile
+}
+
+#default_target Makefile <<EOF
+# ./config.status
+#EOF
+for format in html dvi pdf ps; do
+ default_target "$format" </dev/null
+ default_target "install-$format" "$format" </dev/null
+done
+default_target check </dev/null
+default_target mostlyclean clean </dev/null
+default_target distclean clean <<EOF
+ \$(RM) Makefile config.status
+EOF
+default_target maintainer-clean distclean </dev/null
+default_target install-strip <<EOF
+ \$(MAKE) INSTALL_PROGRAM='\$(INSTALL_PROGRAM) -s' \\
+ INSTALL_SCRIPT='\$(INSTALL_SCRIPT)' install
+EOF
+
+mesondiropts=""
+for dr in $standard_dirs; do
+ if [ $dr = "srcdir" ]; then
+ continue
+ fi
+ if [ $dr = "mesonbuilddir" ]; then
+ continue
+ fi
+ eval "vn=\${var_$dr}"
+ if [ ! -z $vn ]; then
+ eval "mesondiropts=\"$mesondiropts -D$dr=\${var_$dr}\""
+ fi
+done
+
+${MESON} setup \
+ -Ddefault_library=shared \
+ $mesondiropts \
+ $mesonfeatopts \
+ ${var_mesonbuilddir:-build} \
+ ${var_srcdir} || exit 1
+
+# Done
+echo "Package $pkg_name configured successfully."
+echo "Run 'make' to build and 'make install' to install the package"
+
diff --git a/configure.ac b/configure.ac
@@ -1,502 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-#
-# This file is part of TALER
-# Copyright (C) 2014-2023 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
-# Foundation; either version 3, or (at your option) any later version.
-#
-# TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/license>
-#
-#
-AC_PREREQ([2.69])
-AC_INIT([donau],[1.5.1],[taler-bug@gnunet.org])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_SRCDIR([src/util/charity_signatures.c])
-AC_CONFIG_HEADERS([donau_config.h])
-AC_CANONICAL_TARGET
-AC_CANONICAL_HOST
-AC_CANONICAL_BUILD
-# support for non-recursive builds
-AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax])
-
-# pretty build rules
-AM_SILENT_RULES([yes])
-
-AC_CONFIG_MACRO_DIR([m4])
-AC_PROG_AWK
-AC_PROG_CC
-AC_PROG_OBJC
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-AM_PROG_CC_C_O
-
-LT_INIT([disable-static dlopen])
-
-
-AC_CHECK_PROG([DPKG_ARCH], [dpkg-architecture], [yes], [no])
-if test "x$DPKG_ARCH" = "xyes"; then
- MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`
-else
- MULTIARCH=""
-fi
-
-DX_INIT_DOXYGEN([donau],,,
- DX_PS_FEATURE(OFF),
- DX_PDF_FEATURE(OFF),
- DX_RTF_FEATURE(OFF),
- DX_CHI_FEATURE(OFF),
- DX_XML_FEATURE(OFF))
-
-AC_MSG_CHECKING([whether to compile documentation ONLY])
-AC_ARG_ENABLE([only-doc],
- [AS_HELP_STRING([--enable-only-doc], [only compile Taler documentation])],
- [doc_only=${enableval}],
- [doc_only=no])
-AC_MSG_RESULT($doc_only)
-AM_CONDITIONAL([DOC_ONLY], [test "x$doc_only" = "xyes"])
-
-
-# Not indented, as most of the file falls under this one...
-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])
-
-
-# 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])
-
-
-
-# should expensive tests be run?
-AC_MSG_CHECKING(whether to run expensive tests)
-AC_ARG_ENABLE([expensivetests],
- [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])],
- [enable_expensive=${enableval}],
- [enable_expensive=no])
-AC_MSG_RESULT($enable_expensive)
-AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"])
-
-
-AC_MSG_CHECKING(whether to enable epoll)
-AC_ARG_ENABLE([[epoll]],
- [AS_HELP_STRING([[--enable-epoll[=ARG]]], [enable epoll support (yes, no, auto) [auto]])],
- [enable_epoll=${enableval}],
- [enable_epoll='auto']
- )
-AC_MSG_RESULT($enable_epoll)
-AM_CONDITIONAL([MHD_HAVE_EPOLL], [test "x$enable_epoll" = "xyes"])
-
-AS_IF([test "$enable_epoll" != "no"],
- [AX_HAVE_EPOLL
- AS_IF([test "${ax_cv_have_epoll}" = "yes"],
- [AC_DEFINE([[EPOLL_SUPPORT]],[[1]],[Define to 1 to enable epoll support])
- enable_epoll='yes'],
- [AS_IF([test "$enable_epoll" = "yes"],
- AC_MSG_ERROR([[Support for epoll was explicitly requested but cannot be enabled on this platform.]]))
- enable_epoll='no'])])
-
-
-AS_IF([test "x$enable_epoll" = "xyes"],
- AC_CACHE_CHECK([for epoll_create1()],
- [mhd_cv_have_epoll_create1], [
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-#include <sys/epoll.h>
- ]], [[
-int fd;
-fd = epoll_create1(EPOLL_CLOEXEC);]])],
- [mhd_cv_have_epoll_create1=yes],
- [mhd_cv_have_epoll_create1=no])])
- AS_IF([test "x$mhd_cv_have_epoll_create1" = "xyes"],[
- 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/$MULTIARCH -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/$MULTIARCH -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])
-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/$MULTIARCH -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.19.0 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/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
- CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
-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([[
-***
-*** You need libgnunetjson to build this program.
-*** Make sure you have libjansson installed while
-*** building GNUnet.
-*** ]])])
-
-# check for gettext
-AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.19.8])
-
-
-# Save before checking libgnurl/libcurl
-CFLAGS_SAVE=$CFLAGS
-LDFLAGS_SAVE=$LDFLAGS
-LIBS_SAVE=$LIBS
-
-# check for libgnurl
-# libgnurl
-LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
-LIBCURL_CHECK_CONFIG(,7.34.0,[curl=1],[curl=0])
-
-# cURL must support CURLINFO_TLS_SESSION, version >= 7.34
-AS_IF([test "x$curl" = x1],[
- AC_CHECK_HEADER([curl/curl.h],
- [AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=1],[curl=0],[[#include <curl/curl.h>]])],
- [curl=0])
-])
-
-
-# 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])])])
-
-AC_SUBST([LIBGNURLCURL_LIBS])
-
-
-# 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/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
- CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
-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
-*** building GNUnet.
-*** ]])])
-
-# 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/$MULTIARCH -L$with_exchange/lib/ $LDFLAGS"
- CPPFLAGS="-I$with_exchange/include $CPPFLAGS"])
-
-
-# Restore after gnurl/curl checks messed up these values
-CFLAGS=$CFLAGS_SAVE
-LDFLAGS=$LDFLAGS_SAVE
-LIBS=$LIBS_SAVE
-
-# test for postgres
-AX_LIB_POSTGRESQL([13.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) >= 13.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])
-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/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
- CPPFLAGS="-I$with_gnunet/include ${CPPFLAGS}"])
-CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_CPPFLAGS}"
-AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h],
- [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_result_spec_array_string], libgnunetpq=1)])
-AS_IF([test $libgnunetpq != 1],
- [AC_MSG_ERROR([[
-***
-*** You need libgnunetpq version >= 4.0.0 to build this program.
-*** Make sure you have Postgres installed while
-*** 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)])
-
-
-
-CFLAGS=$CFLAGS_SAVE
-LDFLAGS=$LDFLAGS_SAVE
-LIBS=$LIBS_SAVE
-
-# should developer logic be compiled (not-for-production code)?
-AC_MSG_CHECKING(whether to compile developer logic)
-AC_ARG_ENABLE([developer-mode],
- [AS_HELP_STRING([--enable-developer-mode], [enable compiling developer code])],
- [enable_developer=${enableval}],
- [enable_developer=yes])
-AC_MSG_RESULT($enable_developer)
-AM_CONDITIONAL([HAVE_DEVELOPER], [test "x$enable_developer" = "xyes"])
-enable_dev=1
-AS_IF([test "x$enableval" = "xno"], [enable_dev=0])
-# developer-logic requires a more recent MHD than usual.
-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:
-# -D_FORTIFY_SOURCE=2 -fstack-protector-all
-AC_ARG_ENABLE(gcc-hardening,
- AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
-[AS_IF([test x$enableval = xyes],[
- CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
- CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
- CFLAGS="$CFLAGS --param ssp-buffer-size=1"
- LDFLAGS="$LDFLAGS -pie"])])
-
-
-# Linker hardening options
-# Currently these options are ELF specific - you can't use this with MacOSX
-AC_ARG_ENABLE(linker-hardening,
- AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
- [AS_IF([test x$enableval = xyes],[LDFLAGS="$LDFLAGS -z relro -z now"])])
-
-
-AC_ARG_ENABLE(sanitizer,
- AS_HELP_STRING(--enable-sanitizer, enable Address Sanitizer and Undefined Behavior Sanitizer),
-[AS_IF([test x$enableval = xyes],[
- LDFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer"
- ])])
-
-# logging
-extra_logging=0
-AC_ARG_ENABLE([logging],
- AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose ('yes' is the default)]),
- [AS_IF([test "x$enableval" = "xyes"], [],
- [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])],
- [test "x$enableval" = "xverbose"], [extra_logging=1]
- [test "x$enableval" = "xveryverbose"], [extra_logging=2])
- ], [])
-AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
-
-# 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"])
-
-# version info
-AC_PATH_PROG(gitcommand, git)
-AC_MSG_CHECKING(for source being under a VCS)
-git_version=
-AS_IF([test ! "X$gitcommand" = "X"],
-[
- git_version=$(cd $srcdir ; git rev-list -n 1 --abbrev-commit HEAD 2>/dev/null)
-])
-AS_IF([test "X$git_version" = "X"],
- [
- vcs_name="no"
- vcs_version="\"release\""
- ],
- [
- vcs_name="yes, git-svn"
- vcs_version="\"git-$git_version\""
- ])
-AC_MSG_RESULT($vcs_name)
-
-AC_MSG_CHECKING(VCS version)
-AC_MSG_RESULT($vcs_version)
-AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version])
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-AC_TYPE_INTMAX_T
-AC_TYPE_UINTMAX_T
-
-# Checks for library functions.
-AC_CHECK_FUNCS([strdup])
-
-
-AC_ARG_ENABLE([[doc]],
- [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
- [enable_doc=yes])
-test "x$enable_doc" = "xno" || enable_doc=yes
-AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
-
-
-],[ # This is the big test "$doc_only" on top of the file!
-
-
-# logic if doc_only is set, make sure conditionals are still defined
-AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [false])
-AM_CONDITIONAL([MHD_HAVE_EPOLL], [false])
-AM_CONDITIONAL([HAVE_POSTGRESQL], [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])
-
-# end of 'doc_only'
-])
-
-AC_CONFIG_FILES([Makefile
- contrib/Makefile
- doc/Makefile
- doc/doxygen/Makefile
- po/Makefile.in
- src/Makefile
- src/donau/Makefile
- src/donaudb/Makefile
- src/donau-tools/Makefile
- src/lib/Makefile
- src/json/Makefile
- src/pq/Makefile
- src/testing/Makefile
- src/include/Makefile
- src/util/Makefile
- ])
-AC_OUTPUT
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
@@ -1,6 +0,0 @@
-# This file is in the public domain.
-
-SUBDIRS = .
-
-bin_SCRIPTS = \
- donau-dbconfig
diff --git a/contrib/meson.build b/contrib/meson.build
@@ -0,0 +1,6 @@
+# This file is in the public domain.
+
+install_data(
+ sources: 'donau-dbconfig',
+ install_dir: get_option('bindir'),
+)
diff --git a/doc/Makefile.am b/doc/Makefile.am
@@ -1,18 +0,0 @@
-# This Makefile.am is in the public domain
-
-SUBDIRS = . doxygen
-
-AM_MAKEINFOHTMLFLAGS = $(TEXINFO_HTMLFLAGS)
-
-man_MANS = \
- prebuilt/man/donau.conf.5 \
- prebuilt/man/donau-config.1 \
- prebuilt/man/donau-dbconfig.1 \
- prebuilt/man/donau-dbinit.1 \
- prebuilt/man/donau-httpd.1 \
- prebuilt/man/donau-secmod-cs.1 \
- prebuilt/man/donau-secmod-eddsa.1 \
- prebuilt/man/donau-secmod-rsa.1
-
-EXTRA_DIST = \
- $(man_MANS)
diff --git a/doc/doxygen/Makefile b/doc/doxygen/Makefile
@@ -0,0 +1,15 @@
+# This Makefile.am is in the public domain
+all:
+ echo -e \
+"Generate documentation:\n" \
+"\tmake full - full documentation with dependency graphs (slow)\n" \
+"\tmake fast - fast mode without dependency graphs"
+
+full: taler.doxy
+ doxygen $<
+
+fast: taler.doxy
+ sed 's/\(HAVE_DOT.*=\).*/\1 NO/' $< | doxygen -
+
+clean:
+ rm -rf html
diff --git a/doc/doxygen/Makefile.in b/doc/doxygen/Makefile.in
@@ -1,558 +0,0 @@
-# Makefile.in generated by automake 1.17 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2024 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-VPATH = @srcdir@
-am__is_gnu_make = { \
- if test -z '$(MAKELEVEL)'; then \
- false; \
- elif test -n '$(MAKE_HOST)'; then \
- true; \
- elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
- true; \
- else \
- false; \
- fi; \
-}
-am__make_running_with_option = \
- case $${target_option-} in \
- ?) ;; \
- *) echo "am__make_running_with_option: internal error: invalid" \
- "target option '$${target_option-}' specified" >&2; \
- exit 1;; \
- esac; \
- has_opt=no; \
- sane_makeflags=$$MAKEFLAGS; \
- if $(am__is_gnu_make); then \
- sane_makeflags=$$MFLAGS; \
- else \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- bs=\\; \
- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
- esac; \
- fi; \
- skip_next=no; \
- strip_trailopt () \
- { \
- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
- }; \
- for flg in $$sane_makeflags; do \
- test $$skip_next = yes && { skip_next=no; continue; }; \
- case $$flg in \
- *=*|--*) continue;; \
- -*I) strip_trailopt 'I'; skip_next=yes;; \
- -*I?*) strip_trailopt 'I';; \
- -*O) strip_trailopt 'O'; skip_next=yes;; \
- -*O?*) strip_trailopt 'O';; \
- -*l) strip_trailopt 'l'; skip_next=yes;; \
- -*l?*) strip_trailopt 'l';; \
- -[dEDm]) skip_next=yes;; \
- -[JT]) skip_next=yes;; \
- esac; \
- case $$flg in \
- *$$target_option*) has_opt=yes; break;; \
- esac; \
- done; \
- test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-am__rm_f = rm -f $(am__rm_f_notfound)
-am__rm_rf = rm -rf $(am__rm_f_notfound)
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = doc/doxygen
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
- $(top_srcdir)/m4/ax_have_epoll.m4 \
- $(top_srcdir)/m4/ax_lib_postgresql.m4 \
- $(top_srcdir)/m4/ax_prog_doxygen.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/libcurl.m4 $(top_srcdir)/m4/libgcrypt.m4 \
- $(top_srcdir)/m4/libgnurl.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mhd.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/donau_config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CSCOPE = @CSCOPE@
-CTAGS = @CTAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
-DPKG_ARCH = @DPKG_ARCH@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-DX_CONFIG = @DX_CONFIG@
-DX_CONFIG2 = @DX_CONFIG2@
-DX_CONFIG3 = @DX_CONFIG3@
-DX_CONFIG4 = @DX_CONFIG4@
-DX_DOCDIR = @DX_DOCDIR@
-DX_DOCDIR2 = @DX_DOCDIR2@
-DX_DOCDIR3 = @DX_DOCDIR3@
-DX_DOCDIR4 = @DX_DOCDIR4@
-DX_DOT = @DX_DOT@
-DX_DOXYGEN = @DX_DOXYGEN@
-DX_DVIPS = @DX_DVIPS@
-DX_EGREP = @DX_EGREP@
-DX_ENV = @DX_ENV@
-DX_FLAG_chi = @DX_FLAG_chi@
-DX_FLAG_chm = @DX_FLAG_chm@
-DX_FLAG_doc = @DX_FLAG_doc@
-DX_FLAG_dot = @DX_FLAG_dot@
-DX_FLAG_html = @DX_FLAG_html@
-DX_FLAG_man = @DX_FLAG_man@
-DX_FLAG_pdf = @DX_FLAG_pdf@
-DX_FLAG_ps = @DX_FLAG_ps@
-DX_FLAG_rtf = @DX_FLAG_rtf@
-DX_FLAG_xml = @DX_FLAG_xml@
-DX_HHC = @DX_HHC@
-DX_LATEX = @DX_LATEX@
-DX_MAKEINDEX = @DX_MAKEINDEX@
-DX_PDFLATEX = @DX_PDFLATEX@
-DX_PERL = @DX_PERL@
-DX_PROJECT = @DX_PROJECT@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ETAGS = @ETAGS@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILECMD = @FILECMD@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-JQ = @JQ@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL = @LIBCURL@
-LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
-LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
-LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
-LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
-LIBGNURL = @LIBGNURL@
-LIBGNURLCURL_LIBS = @LIBGNURLCURL_LIBS@
-LIBGNURL_CPPFLAGS = @LIBGNURL_CPPFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POSTGRESQL_CPPFLAGS = @POSTGRESQL_CPPFLAGS@
-POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@
-POSTGRESQL_LIBFLAGS = @POSTGRESQL_LIBFLAGS@
-POSTGRESQL_LIBS = @POSTGRESQL_LIBS@
-POSTGRESQL_VERSION = @POSTGRESQL_VERSION@
-POSUB = @POSUB@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TALER_LIB_LDFLAGS = @TALER_LIB_LDFLAGS@
-TALER_PLUGIN_LDFLAGS = @TALER_PLUGIN_LDFLAGS@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-_libcurl_config = @_libcurl_config@
-_libgnurl_config = @_libgnurl_config@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_OBJC = @ac_ct_OBJC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__rm_f_notfound = @am__rm_f_notfound@
-am__tar = @am__tar@
-am__untar = @am__untar@
-am__xargs_n = @am__xargs_n@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gitcommand = @gitcommand@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-EXTRA_DIST = \
- donau.doxy
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/doxygen/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu doc/doxygen/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-distdir: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -$(am__rm_f) $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- cscopelist-am ctags-am distclean distclean-generic \
- distclean-libtool distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags-am uninstall uninstall-am
-
-.PRECIOUS: Makefile
-
-
-# This Makefile.am is in the public domain
-all:
- @echo -e \
-"Generate documentation:\n" \
-"\tmake full - full documentation with dependency graphs (slow)\n" \
-"\tmake fast - fast mode without dependency graphs"
-
-full: donau.doxy
- doxygen $<
-
-fast: donau.doxy
- sed 's/\(HAVE_DOT.*=\).*/\1 NO/' $< | doxygen -
-
-clean:
- rm -rf html
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
-
-# Tell GNU make to disable its built-in pattern rules.
-%:: %,v
-%:: RCS/%,v
-%:: RCS/%
-%:: s.%
-%:: SCCS/s.%
diff --git a/doc/meson.build b/doc/meson.build
@@ -0,0 +1,14 @@
+# This build file is in the public domain
+
+install_man(
+ [
+ 'prebuilt' / 'man' / 'donau.conf.5',
+ 'prebuilt' / 'man' / 'donau-config.1',
+ 'prebuilt' / 'man' / 'donau-dbconfig.1',
+ 'prebuilt' / 'man' / 'donau-dbinit.1',
+ 'prebuilt' / 'man' / 'donau-httpd.1',
+ 'prebuilt' / 'man' / 'donau-secmod-cs.1',
+ 'prebuilt' / 'man' / 'donau-secmod-eddsa.1',
+ 'prebuilt' / 'man' / 'donau-secmod-rsa.1',
+ ],
+)
diff --git a/flake.lock b/flake.lock
@@ -0,0 +1,94 @@
+{
+ "nodes": {
+ "gnunet": {
+ "inputs": {
+ "nixpkgs": "nixpkgs",
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1774899416,
+ "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=",
+ "ref": "refs/heads/master",
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "revCount": 33194,
+ "submodules": true,
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ },
+ "original": {
+ "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75",
+ "type": "git",
+ "url": "https://git.gnunet.org/gnunet"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1774799055,
+ "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1775825553,
+ "narHash": "sha256-LH0FGBWngFpvqXYfN1eks+L5n3aXy1ALTTRRhxP0HGA=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "ca62ee54d15571e3122309abb6740578906bcdf7",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "release-25.11",
+ "type": "indirect"
+ }
+ },
+ "root": {
+ "inputs": {
+ "gnunet": "gnunet",
+ "nixpkgs": "nixpkgs_2",
+ "systems": "systems_2"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_2": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
@@ -0,0 +1,119 @@
+{
+ inputs = {
+ nixpkgs.url = "nixpkgs/release-25.11";
+ systems.url = "github:nix-systems/default";
+ gnunet.url = "git+https://git.gnunet.org/gnunet?rev=7c6b613e37e301b0e81fb94af5878d00c98e5b75";
+ self.submodules = true;
+ };
+
+ outputs = { self, nixpkgs, gnunet, systems, ... } @ inputs:
+ let
+ supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
+ forEachSystem = nixpkgs.lib.genAttrs supportedSystems;
+ nixpkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
+ in
+ {
+ # This defines (installable) package derivations
+ # For use in flakes that use this flake as input in order
+ # to specify/use this package from git as a dependency
+ packages = forEachSystem (system:
+ let
+ pkgs = nixpkgsFor.${system};
+ gnunetpkgs = gnunet.packages.${system};
+ in {
+ gnunet = pkgs.stdenv.mkDerivation {
+ name = "donau";
+ src = ./.;
+ nativeBuildInputs = [
+ pkgs.gnumake
+ pkgs.automake
+ pkgs.autoconf
+ pkgs.pkg-config
+ pkgs.python3
+ pkgs.texinfo
+ ];
+ buildInputs = [
+ pkgs.libtool
+ pkgs.jansson
+ pkgs.git
+ pkgs.gettext
+ pkgs.postgresql
+ (pkgs.python3.withPackages (python-pkgs: [
+ python-pkgs.jinja2
+ ]))
+ pkgs.libmicrohttpd
+ pkgs.libsodium
+ pkgs.libgcrypt
+ pkgs.libunistring
+ pkgs.curlWithGnuTls
+ pkgs.jq
+ gnunetpkgs.gnunet
+ ];
+ preConfigure = ''
+ patchShebangs --build contrib/check-prebuilt
+ ./bootstrap
+ '';
+ };
+ }
+ );
+ defaultPackage = forEachSystem (system: self.packages.${system}.gnunet);
+ # This defines a development shell in which you can compile
+ # (and use) exchange
+ devShells = forEachSystem
+ (system:
+ let
+ pkgs = nixpkgsFor.${system};
+ gnunetpkgs = gnunet.packages.${system};
+ in
+ {
+ default = pkgs.mkShell {
+ packages = [
+ pkgs.gcc
+ pkgs.meson
+ pkgs.ninja
+ pkgs.gnumake
+ pkgs.automake
+ pkgs.autoconf
+ pkgs.texinfo
+ pkgs.pkg-config
+ pkgs.libtool
+ pkgs.jansson
+ pkgs.git
+ pkgs.gettext
+ pkgs.postgresql
+ pkgs.libmicrohttpd
+ pkgs.libsodium
+ pkgs.libgcrypt
+ pkgs.libunistring
+ pkgs.curlWithGnuTls
+ pkgs.jq
+ gnunetpkgs.gnunet
+ pkgs.codespell
+ pkgs.clang-tools
+ pkgs.uncrustify
+ pkgs.typst # optional
+ pkgs.pdftk # optional
+ pkgs.doxygen
+ ];
+
+ shellHook = ''
+ echo "donau environment loaded."
+ export CC=gcc
+ export CFLAGS="-O"
+ mkdir -p default
+ export PGHOST=localhost
+ export PGPORT=5432
+ export PGUSER=$USER
+ export PGDATABASE=talercheck
+ export PGDATA="$PWD/default/.pg"
+ echo $PWD
+ [ ! -d $PGDATA ] && PGHOST="$PGDATA" pg_ctl initdb -o "-U $PGUSER"
+
+ pg_ctl -o "-p $PGPORT -k $PGDATA" start && createdb talercheck && {
+ trap 'pg_ctl stop && rm -r $PGDATA' EXIT
+ }
+ '';
+ };
+ });
+ };
+}
diff --git a/meson.build b/meson.build
@@ -0,0 +1,370 @@
+project(
+ 'donau',
+ 'c',
+ license: 'AGPLv3',
+ meson_version: '>=1.1.0',
+ version: '1.5.1',
+)
+
+cc = meson.get_compiler('c')
+incdir = include_directories('src/include', 'src/include/donau-database')
+
+# Used to populate gnunet_private_config.h
+private_config = configuration_data()
+
+pkgcfgdir = get_option('datadir') / 'donau' / 'config.d'
+docdir = get_option('datadir') / 'doc' / 'donau'
+
+if get_option('install-rpath')
+ rpath_option = get_option('prefix') / get_option('libdir')
+else
+ rpath_option = ''
+endif
+
+install_emptydir(docdir)
+install_data('README', 'COPYING', install_dir: docdir)
+
+gnunet_user = false
+dpkg_architecture_bin = find_program(
+ 'dpkg-architecture',
+ '/usr/bin/getent',
+ required: false,
+)
+if dpkg_architecture_bin.found()
+ private_config.set(
+ 'MULTIARCH',
+ dpkg_architecture_bin.full_path() + ' -qDEB_HOST_MULTIARCH',
+ )
+endif
+
+TALER_PLUGIN_LDFLAGS = [
+ '-export-dynamic',
+ '-avoid-version',
+ '-module',
+ '--no-undefined',
+]
+
+if not get_option('only-doc')
+ add_project_arguments(
+ '-Wall',
+ '-Wno-address-of-packed-member',
+ language: 'c',
+ )
+ taler_lib_ldflags = '-export-dynamic -no-undefined'
+
+ check_headers = [
+ 'stdint.h',
+ 'stdlib.h',
+ 'string.h',
+ 'unistd.h',
+ 'sys/socket.h',
+ 'sys/un.h',
+ 'netinet/in.h',
+ 'netinet/ip.h',
+ ]
+
+ foreach h : check_headers
+ if cc.check_header(h)
+ define = 'HAVE_' + h.underscorify().to_upper()
+ message(define)
+ private_config.set(define, 1)
+ endif
+ endforeach
+
+
+ private_config.set10('HAVE_EXPENSIVE_TESTS', get_option('expensivetests'))
+
+ have_epoll = false
+ if get_option('enable-epoll') != 'no'
+ have_epoll = cc.has_header('sys/epoll.h')
+ endif
+ private_config.set10('EPOLL_SUPPORT', have_epoll)
+ if have_epoll
+ private_config.set10(
+ 'HAVE_EPOLL_CREATE1',
+ cc.has_header_symbol('sys/epoll.h', 'epoll_create1'),
+ )
+ elif get_option('enable-epoll') == 'yes'
+ error(
+ 'Support for epoll was explicitly requested but cannot be enabled on this platform.',
+ )
+ endif
+
+ mhd_dep = dependency('libmicrohttpd', required: false)
+ if not mhd_dep.found()
+ mhd_dep = cc.find_library('microhttpd', required: true)
+ endif
+
+ mhd2_dep = dependency('libmicrohttpd2', required: false)
+ if not mhd2_dep.found()
+ mhd_dep2 = cc.find_library('microhttpd2', required: false)
+ endif
+
+ json_dep = dependency('jansson', required: false)
+ if not json_dep.found()
+ json_dep = cc.find_library('jansson', required: true)
+ endif
+
+ gcrypt_dep = dependency('libgcrypt', required: false)
+ if not gcrypt_dep.found()
+ gcrypt_dep = cc.find_library('gcrypt', required: true)
+ endif
+
+ private_config.set_quoted('NEED_LIBGCRYPT_VERSION', '1.6.0')
+ #add_project_arguments('-DNEED_LIBGCRYPT_VERSION="1.6.0"', language: 'c')
+
+ gnunetutil_dep = dependency('gnunetutil', required: false)
+ if not gnunetutil_dep.found()
+ gnunetutil_dep = cc.find_library('gnunetutil', required: true)
+ endif
+
+ gnunetjson_dep = dependency('gnunetjson', required: false)
+ if not gnunetjson_dep.found()
+ gnunetjson_dep = cc.find_library('gnunetjson', required: true)
+ endif
+ cc.has_header_symbol(
+ 'gnunet/gnunet_json_lib.h',
+ 'GNUNET_JSON_spec_string',
+ dependencies: [gnunetjson_dep],
+ required: true,
+ )
+
+ zlib_dep = dependency('zlib', required: false)
+ if not zlib_dep.found()
+ zlib_dep = cc.find_library('zlib', required: true)
+ endif
+ m_dep = cc.find_library('m', required: false)
+ if m_dep.found()
+ private_config.set('HAVE_LIBM', 1)
+ endif
+
+
+ # Gettext
+ i18n = import('i18n')
+
+ gettext_package = 'donau'
+ add_project_arguments('-DGETTEXT_PACKAGE=' + gettext_package, language: 'c')
+ #todo subdir('po')
+
+ curl_dep = dependency('libcurl', version: '>=7.34.0', required: false)
+ if not curl_dep.found()
+ curl_dep = cc.find_library('curl', required: true)
+ curl_version_check = '''#include <curl/curl.h>
+ int main(int argc, char **argv) {
+ #if LIBCURL_VERSION_NUM < 0x073400
+ #error "cURL version >= 7.34.0 required"
+ #endif
+ return 0;
+ }
+ '''
+ if not cc.compiles(
+ curl_version_check,
+ name: 'cURL version check',
+ dependencies: curl_dep,
+ )
+ error('cURL version >=7.34.0 required')
+ endif
+ endif
+
+ gnunetcurl_dep = dependency('gnunetcurl', required: false)
+ if not gnunetcurl_dep.found()
+ gnunetcurl_dep = cc.find_library('gnunetcurl', required: true)
+ endif
+ cc.has_header_symbol(
+ 'gnunet/gnunet_curl_lib.h',
+ 'GNUNET_CURL_get_select_info',
+ dependencies: [gnunetcurl_dep],
+ required: true,
+ )
+
+ pq_dep = dependency('libpq', required: false)
+ if not pq_dep.found()
+ pq_dep = cc.find_library('pq', required: true)
+ endif
+
+ gnunetpq_dep = dependency('gnunetpq', required: false)
+ if not gnunetpq_dep.found()
+ gnunetpq_dep = cc.find_library('gnunetpq', required: true)
+ endif
+ cc.has_header_symbol(
+ 'gnunet/gnunet_pq_lib.h',
+ 'GNUNET_PQ_result_spec_blinded_sig',
+ required: true,
+ dependencies: [pq_dep, gnunetpq_dep],
+ )
+
+ talerutil_dep = dependency('talerutil', required: false)
+ if not talerutil_dep.found()
+ talerutil_dep = cc.find_library('talerutil', required: true)
+ endif
+ talerjson_dep = dependency('talerjson', required: false)
+ if not talerjson_dep.found()
+ talerjson_dep = cc.find_library('talerjson', required: true)
+ endif
+ talermhd_dep = dependency('talermhd', required: false)
+ if not talermhd_dep.found()
+ talermhd_dep = cc.find_library('talermhd', required: true)
+ endif
+ talerpq_dep = dependency('talerpq', required: false)
+ if not talerpq_dep.found()
+ talerpq_dep = cc.find_library('talerpq', required: true)
+ endif
+ talercurl_dep = dependency('talercurl', required: false)
+ if not talercurl_dep.found()
+ talercurl_dep = cc.find_library('talercurl', required: true)
+ endif
+ talertesting_dep = dependency('talertesting', required: false)
+ if not talertesting_dep.found()
+ talertesting_dep = cc.find_library('talertesting', required: true)
+ endif
+
+ gnunetsq_dep = dependency('gnunetsq', required: false)
+ if not gnunetsq_dep.found()
+ gnunetsq_dep = cc.find_library('gnunetsq', required: true)
+ endif
+ have_gnunetsq = cc.has_header_symbol(
+ 'gnunet/gnunet_sq_lib.h',
+ 'GNUNET_PQ_result_spec_string',
+ dependencies: [gnunetsq_dep],
+ required: false,
+ )
+ sodium_dep = dependency('libsodium', required: false, version: '>=1.0.18')
+ if not sodium_dep.found()
+ sodium_dep = cc.find_library('sodium', required: true)
+ sodium_version_check = '''#include <sodium.h>
+ int main(int argc, char **argv) {
+ #if !((SODIUM_LIBRARY_VERSION_MAJOR > 10) || \
+ ((SODIUM_LIBRARY_VERSION_MAJOR == 10) && \
+ (SODIUM_LIBRARY_VERSION_MINOR >= 3)))
+ #error "libsodium version >= 1.0.18 required"
+ #endif
+ return 0
+ }
+ '''
+ if not cc.compiles(
+ sodium_version_check,
+ name: 'sodium version check',
+ dependencies: sodium_dep,
+ )
+ error('libsodium version >=1.0.18 required')
+ endif
+ endif
+
+ sqlite_dep = dependency('sqlite3', version: '>=3.35.0', required: false)
+ # FIXME for fallbacks, we need to manually check version
+ if not sqlite_dep.found()
+ sqlite_dep = cc.find_library('sqlite3', required: false)
+ sqlite_version_check = '''#include <sqlite3.h>
+ int main(int argc, char **argv) {
+ #if SQLITE_VERSION_NUMBER < 3035000
+ #error "SQLite version >= 3.35.0 required"
+ #endif
+ return 0;
+ }
+ '''
+ if not cc.compiles(
+ sqlite_version_check,
+ name: 'sqlite version check',
+ dependencies: sqlite_dep,
+ )
+ error('Sqlite version >= 3.35.0 requried')
+ endif
+ endif
+
+ private_config.set10('HAVE_SQLITE', have_gnunetsq and sqlite_dep.found())
+ unistr_dep = dependency('libunistring', required: false)
+ if not unistr_dep.found()
+ unistr_dep = cc.find_library('unistring', required: true)
+ endif
+
+ logging_opt = get_option('logging')
+ logging_verbosity = 0
+
+ if logging_opt == 'yes'
+ logging_verbosity = 1
+ endif
+ if logging_opt == 'no'
+ add_project_arguments('-DGNUNET_CULL_LOGGING=1', language: 'c')
+ endif
+ if logging_opt == 'verbose'
+ logging_verbosity = 2
+ endif
+ if logging_opt == 'veryverbose'
+ logging_verbosity = 3
+ endif
+
+ #add_project_arguments('-DGNUNET_EXTRA_LOGGING=@0@'.format(logging_verbosity), language: 'c')
+
+
+ # todo gcov has meson builtin
+
+ # Used to populate configuration file and script templates
+
+
+ libltversions = [
+ ['libdonau', '5:0:0'],
+ ['libdonauutil', '0:0:0'],
+ ['libdonaujson', '1:0:1'],
+ ['libdonaupq', '0:0:0'],
+ ['libdonautesting', '0:0:0'],
+ ['libdonaudb', '1:0:0'],
+ ]
+
+ solibversions = {}
+
+ foreach libversion : libltversions
+ ltversion = libversion[1].split(':')
+ current = ltversion[0].to_int()
+ revision = ltversion[1].to_int()
+ age = ltversion[2].to_int()
+ soversion_str = '@0@'.format(current - age)
+ ltversion_str = '@0@.@1@.@2@'.format(current - age, age, revision)
+ solibversions = solibversions + {
+ libversion[0]: {
+ 'soversion': soversion_str,
+ 'version': ltversion_str,
+ },
+ }
+ endforeach
+
+ private_config.set_quoted('PACKAGE_VERSION', meson.project_version())
+ # Compatibility. Used in source.
+ private_config.set_quoted('VERSION', meson.project_version())
+ private_config.set_quoted('VCS_VERSION', 'mesonbuild')
+ private_config.set_quoted('PACKAGE_BUGREPORT', 'taler@gnu.org')
+ configure_file(output: 'donau_config.h', configuration: private_config)
+ configuration_inc = include_directories('.')
+
+ cdata = configuration_data()
+ cdata.merge_from(private_config)
+ add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
+
+ pkg = import('pkgconfig')
+ subdir('contrib')
+ subdir('src')
+ if not get_option('disable-doc')
+ subdir('doc')
+ endif
+
+ taler_prefix = get_option('prefix') / get_option('libdir')
+
+ add_test_setup(
+ 'default',
+ env: ['TALER_EXCHANGE_PREFIX=' + taler_prefix],
+ exclude_suites: ['perf', 'installcheck', 'integrationtests'],
+ is_default: true,
+ )
+else
+ subdir('contrib')
+ if not get_option('disable-doc')
+ subdir('doc')
+ endif
+endif
+
+run_target(
+ 'doxygen',
+ command: 'scripts/doxygen.meson.sh',
+ env: {'PACKAGE_VERSION': meson.project_version()},
+)
+#meson.add_dist_script('meson-dist-script')
+
diff --git a/meson.options b/meson.options
@@ -0,0 +1,7 @@
+# Build options
+option('enable-epoll', type : 'string', value : 'auto', description: 'enable epoll support (yes, no, auto) [auto]')
+option('expensivetests', type : 'boolean', value : false, description: 'whether to run expensive tests')
+option('only-doc', type : 'boolean', value : false, description: 'whether to compile documentation ONLY')
+option('disable-doc', type : 'boolean', value : false, description: 'whether to disable documentation')
+option('install-rpath', type : 'boolean', value : false, description: 'Add rpath to installed binaries if set')
+option('logging', type : 'string', value: 'yes', description: 'Log setting. Can be set to "yes" (logging, default), "no" (no logging), "verbose" (extra logging"), "veryverbose" (even more logging)')
diff --git a/scripts/doxygen.meson.sh b/scripts/doxygen.meson.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# This is more portable than `which' but comes with
+# the caveat of not(?) properly working on busybox's ash:
+existence()
+{
+ type "$1" >/dev/null 2>&1
+}
+
+if ! existence doxygen; then
+ echo "Doxygen not found"
+ exit 1
+fi
+cd "${MESON_SOURCE_ROOT}/doc/doxygen"
+echo "PROJECT_NUMBER = ${PACKAGE_VERSION}" > version.doxy
+make all
+
+echo "Doxygen files generated into ${MESON_SOURCE_ROOT}/doc/doxygen!"
diff --git a/src/donau-tools/meson.build b/src/donau-tools/meson.build
@@ -0,0 +1,20 @@
+# This build file is in the public domain
+
+pkgcfg_DATA = \
+ install_data('coins.conf'
+ , install_dir: pkgcfgdir)
+
+executable(
+ 'donau-dbinit',
+ ['donau-dbinit.c'],
+ dependencies: [
+ libdonauutil_dep,
+ gcrypt_dep,
+ libdonaudb_dep,
+ gnunetutil_dep,
+ talerutil_dep,
+ talerpq_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
diff --git a/src/donau/meson.build b/src/donau/meson.build
@@ -0,0 +1,69 @@
+# This build file is in the public domain
+install_data('donau.conf', install_dir: pkgcfgdir)
+
+# Programs
+
+donau_httpd_SOURCES = [
+ 'donau-httpd.c',
+ 'donau-httpd_db.c',
+ 'donau-httpd_get-keys.c',
+ 'donau-httpd_get-config.c',
+ 'donau-httpd_get-charities.c',
+ 'donau-httpd_delete-charities-CHARITY_ID.c',
+ 'donau-httpd_get-charity-CHARITY_ID.c',
+ 'donau-httpd_post-charities.c',
+ 'donau-httpd_patch-charities-CHARITY_ID.c',
+ 'donau-httpd_get-history.c',
+ 'donau-httpd_get-donation-statement-YEAR-HASH_DONOR_ID.c',
+ 'donau-httpd_post-batch-submit.c',
+ 'donau-httpd_terms.c',
+ 'donau-httpd_post-csr-issue.c',
+ 'donau-httpd_post-batch-issue-CHARITY_ID.c',
+]
+
+executable(
+ 'taler-donau-httpd',
+ donau_httpd_SOURCES,
+ dependencies: [
+ libdonaudb_dep,
+ libdonauutil_dep,
+ libdonaujson_dep,
+ talermhd_dep,
+ talerutil_dep,
+ talerjson_dep,
+ talerpq_dep,
+ gnunetutil_dep,
+ gnunetcurl_dep,
+ gnunetjson_dep,
+ gcrypt_dep,
+ json_dep,
+ mhd_dep,
+ zlib_dep,
+ curl_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
+
+
+# Testcases
+
+foreach f : [
+ 'test_donau_httpd.conf',
+ 'test_donau_unix.conf',
+ 'test_donau_httpd.get',
+ 'setup.sh',
+]
+ configure_file(input: f, output: f, copy: true)
+endforeach
+test_donau_httpd = configure_file(
+ input: 'test_donau_httpd.sh',
+ output: 'test_donau_httpd',
+ copy: true,
+)
+test(
+ 'test_donau_httpd',
+ test_donau_httpd,
+ workdir: meson.current_build_dir(),
+ suite: ['donau', 'installcheck'],
+)
diff --git a/src/donaudb/Makefile.sql b/src/donaudb/Makefile.sql
@@ -0,0 +1,22 @@
+procedures.sql: procedures.sql.in donau_do_*.sql
+ gcc -E -P -undef - < procedures.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
+
+donau-0002.sql: donau-0002.sql.in 0002-*.sql
+ gcc -E -P -undef - < donau-0002.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
+
+
+CLEANFILES = \
+ exchange-0002.sql \
+ exchange-0003.sql \
+ exchange-0004.sql \
+ exchange-0009.sql \
+ exchange-0010.sql \
+ procedures.sql
+
+CLEANFILES = \
+ donau-0002.sql
+
+all: ${CLEANFILES}
+
+clean:
+ rm ${CLEANFILES}
diff --git a/src/donaudb/meson.build b/src/donaudb/meson.build
@@ -0,0 +1,124 @@
+# This build file is in the public domain
+
+install_data('donaudb.conf', 'donaudb-postgres.conf', install_dir: pkgcfgdir)
+
+
+sqldir = get_option('datadir') / 'donau' / 'sql'
+
+# FIXME possibly provide this output in the tgz through dist script
+run_command('make', '-f', 'Makefile.sql', 'all', check: true)
+
+sqlfiles = [
+ 'versioning.sql',
+ 'donau-0001.sql',
+ 'drop.sql',
+ 'donau-0002.sql',
+ 'procedures.sql',
+]
+
+install_data(sources: sqlfiles, install_dir: sqldir)
+
+# This makes meson copy the files into the build directory for testing
+foreach f : sqlfiles
+ configure_file(input: f, output: f, copy: true)
+endforeach
+
+test_idem = configure_file(
+ input: 'test_idempotency.sh',
+ output: 'test_idempotency.sh',
+ copy: true,
+)
+
+test(
+ 'test_idempotency.sh',
+ test_idem,
+ workdir: meson.current_build_dir(),
+ suite: ['donaudb', 'installcheck'],
+)
+
+
+libdonaudb = library(
+ 'donaudb',
+ [
+ 'plugin_donaudb_postgres.c',
+ 'preflight.c',
+ 'commit.c',
+ 'drop_tables.c',
+ 'create_tables.c',
+ 'event_listen.c',
+ 'event_listen_cancel.c',
+ 'event_notify.c',
+ 'start.c',
+ 'rollback.c',
+ 'start_read_committed.c',
+ 'start_read_only.c',
+ 'insert_signing_key.c',
+ 'lookup_signing_key.c',
+ 'iterate_active_signing_keys.c',
+ 'insert_donation_unit.c',
+ 'iterate_donation_units.c',
+ 'iterate_submitted_receipts.c',
+ 'get_history.c',
+ 'get_charities.c',
+ 'insert_charity.c',
+ 'update_charity.c',
+ 'do_charity_delete.c',
+ 'insert_history_entry.c',
+ 'lookup_charity.c',
+ 'lookup_issued_receipts.c',
+ 'lookup_donation_unit_amount.c',
+ 'insert_issued_receipt.c',
+ 'insert_submitted_receipts.c',
+ ],
+ soversion: solibversions['libdonaudb']['soversion'],
+ version: solibversions['libdonaudb']['soversion'],
+ install_rpath: rpath_option,
+ dependencies: [
+ libdonaupq_dep,
+ libdonauutil_dep,
+ talerpq_dep,
+ talerutil_dep,
+ gnunetpq_dep,
+ gnunetutil_dep,
+ pq_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'),
+)
+
+libdonaudb_dep = declare_dependency(link_with: libdonaudb)
+pkg.generate(
+ libdonaudb,
+ url: 'https://taler.net',
+ description: 'GNU Taler donau DB library',
+)
+
+
+test_donaudb = executable(
+ 'test_donaudb',
+ ['test_donaudb.c'],
+ install_rpath: rpath_option,
+ dependencies: [
+ libdonauutil_dep,
+ libdonaudb_dep,
+ talerutil_dep,
+ talerjson_dep,
+ talerpq_dep,
+ gnunetutil_dep,
+ gnunetjson_dep,
+ pq_dep,
+ json_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: false,
+)
+
+test(
+ 'test_donaudb',
+ test_donaudb,
+ workdir: meson.current_build_dir(),
+ suite: ['donaudb'],
+)
+
+
diff --git a/src/include/donau-database/meson.build b/src/include/donau-database/meson.build
@@ -0,0 +1,33 @@
+install_headers(
+ [
+ 'commit.h',
+ 'create_tables.h',
+ 'do_charity_delete.h',
+ 'drop_tables.h',
+ 'event_listen.h',
+ 'event_listen_cancel.h',
+ 'event_notify.h',
+ 'get_charities.h',
+ 'get_history.h',
+ 'insert_charity.h',
+ 'insert_donation_unit.h',
+ 'insert_history_entry.h',
+ 'insert_issued_receipt.h',
+ 'insert_signing_key.h',
+ 'insert_submitted_receipts.h',
+ 'iterate_active_signing_keys.h',
+ 'iterate_donation_units.h',
+ 'iterate_submitted_receipts.h',
+ 'lookup_charity.h',
+ 'lookup_donation_unit_amount.h',
+ 'lookup_issued_receipts.h',
+ 'lookup_signing_key.h',
+ 'preflight.h',
+ 'rollback.h',
+ 'start.h',
+ 'start_read_committed.h',
+ 'start_read_only.h',
+ 'update_charity.h',
+ ],
+ install_dir: get_option('includedir') / 'donau',
+)
diff --git a/src/include/meson.build b/src/include/meson.build
@@ -0,0 +1,18 @@
+install_headers(
+ [
+ 'donau_crypto_lib.h',
+ 'donaudb_lib.h',
+ 'donau_json_lib.h',
+ 'donau_pq_lib.h',
+ 'donau_service.h',
+ 'donau_signatures.h',
+ 'donau_testing_lib.h',
+ 'donau_util.h',
+ ],
+ install_dir: get_option('includedir') / 'donau',
+)
+
+subdir('donau-database')
+
+
+
diff --git a/src/json/meson.build b/src/json/meson.build
@@ -0,0 +1,31 @@
+# This build file is in the public domain
+libdonaujson_src = ['json.c', 'json_helper.c', 'json_pack.c', 'donau_json.c']
+
+libdonaujson = library(
+ 'donaujson',
+ libdonaujson_src,
+ soversion: solibversions['libdonaujson']['soversion'],
+ version: solibversions['libdonaujson']['soversion'],
+ install_rpath: rpath_option,
+ dependencies: [
+ libdonauutil_dep,
+ talerutil_dep,
+ gnunetutil_dep,
+ gnunetjson_dep,
+ unistr_dep,
+ json_dep,
+ m_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'),
+)
+
+libdonaujson_dep = declare_dependency(link_with: libdonaujson)
+pkg.generate(
+ libdonaujson,
+ url: 'https://taler.net',
+ description: 'GNU Taler donau utilities JSON library',
+)
+
+
diff --git a/src/lib/meson.build b/src/lib/meson.build
@@ -0,0 +1,53 @@
+# This build file is in the public domain
+
+# Libraries
+
+libdonau_SOURCES = [
+ 'donau_api_handle.c',
+ 'donau_api_charity_get.c',
+ 'donau_api_charity_post.c',
+ 'donau_api_charity_patch.c',
+ 'donau_api_charity_delete.c',
+ 'donau_api_charities_get.c',
+ 'donau_api_curl_defaults.c',
+ 'donau_api_batch_issue_receipts.c',
+ 'donau_api_batch_submit_receipts.c',
+ 'donau_api_csr_post.c',
+ 'donau_api_donation_statement_get.c',
+]
+
+libdonau = library(
+ 'donau',
+ libdonau_SOURCES,
+ soversion: solibversions['libdonau']['soversion'],
+ version: solibversions['libdonau']['soversion'],
+ install_rpath: rpath_option,
+ dependencies: [
+ libdonaujson_dep,
+ libdonauutil_dep,
+ talerpq_dep,
+ talerutil_dep,
+ talercurl_dep,
+ talerjson_dep,
+ gnunetpq_dep,
+ gnunetcurl_dep,
+ gnunetutil_dep,
+ gnunetjson_dep,
+ curl_dep,
+ pq_dep,
+ json_dep,
+ sodium_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'),
+)
+
+libdonau_dep = declare_dependency(link_with: libdonau)
+pkg.generate(
+ libdonau,
+ url: 'https://taler.net',
+ description: 'GNU Taler donau library',
+)
+
+
diff --git a/src/meson.build b/src/meson.build
@@ -0,0 +1,10 @@
+# This build file is in the public domain
+subdir('include')
+subdir('util')
+subdir('json')
+subdir('pq')
+subdir('donaudb')
+subdir('donau')
+subdir('lib')
+subdir('donau-tools')
+subdir('testing')
diff --git a/src/pq/meson.build b/src/pq/meson.build
@@ -0,0 +1,48 @@
+# This build file is in the public domain
+
+libdonaupq = library(
+ 'donaupq',
+ ['pq_query_helper.c', 'pq_result_helper.c'],
+ soversion: solibversions['libdonaupq']['soversion'],
+ version: solibversions['libdonaupq']['soversion'],
+ install_rpath: rpath_option,
+ dependencies: [
+ libdonauutil_dep,
+ talerutil_dep,
+ gnunetutil_dep,
+ gnunetpq_dep,
+ json_dep,
+ pq_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'),
+)
+
+libdonaupq_dep = declare_dependency(link_with: libdonaupq)
+pkg.generate(
+ libdonaupq,
+ url: 'https://taler.net',
+ description: 'GNU Taler donau PQ utilities library',
+)
+
+
+test_pq = executable(
+ 'test_pq',
+ ['test_pq.c'],
+ dependencies: [
+ libdonauutil_dep,
+ gnunetutil_dep,
+ gnunetpq_dep,
+ talerutil_dep,
+ talerpq_dep,
+ pq_dep,
+ json_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ build_by_default: false,
+ install: false,
+)
+
+test('test_pq', test_pq, workdir: meson.current_build_dir(), suite: ['pq'])
+
diff --git a/src/testing/meson.build b/src/testing/meson.build
@@ -0,0 +1,106 @@
+# This build file is in the public domain
+
+libdonautesting_SOURCES = [
+ 'testing_api_cmd_get_donau.c',
+ 'testing_api_cmd_charities_get.c',
+ 'testing_api_cmd_charity_get.c',
+ 'testing_api_cmd_charity_post.c',
+ 'testing_api_cmd_charity_patch.c',
+ 'testing_api_cmd_charity_delete.c',
+ 'testing_api_cmd_issue_receipts.c',
+ 'testing_api_cmd_submit_receipts.c',
+ 'testing_api_cmd_donation_statement_get.c',
+ 'testing_api_traits.c',
+ 'testing_api_loop.c',
+]
+
+libdonautesting = library(
+ 'donautesting',
+ libdonautesting_SOURCES,
+ soversion: solibversions['libdonautesting']['soversion'],
+ version: solibversions['libdonautesting']['soversion'],
+ install_rpath: rpath_option,
+ dependencies: [
+ talerutil_dep,
+ talertesting_dep,
+ libdonauutil_dep,
+ libdonau_dep,
+ gnunetutil_dep,
+ gnunetcurl_dep,
+ gnunetjson_dep,
+ json_dep,
+ curl_dep,
+ mhd_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'),
+)
+
+libdonautesting_dep = declare_dependency(link_with: libdonautesting)
+pkg.generate(
+ libdonautesting,
+ url: 'https://taler.net',
+ description: 'GNU Taler donau testing library',
+)
+
+
+test_donau_api_cs = executable(
+ 'test_donau_api_cs',
+ ['test_donau_api.c'],
+ dependencies: [
+ talertesting_dep,
+ talerjson_dep,
+ libdonautesting_dep,
+ libdonau_dep,
+ libdonauutil_dep,
+ gnunetutil_dep,
+ gnunetcurl_dep,
+ json_dep,
+ gcrypt_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ build_by_default: false,
+ install: false,
+)
+# $(check_PROGRAMS) # CS is known to fail...
+#test(
+# 'test_donau_api_cs',
+# test_donau_api_cs,
+# workdir: meson.current_build_dir(),
+# suite: ['testing', 'integrationtests'],
+#)
+
+
+test_donau_api_rsa = executable(
+ 'test_donau_api_rsa',
+ ['test_donau_api.c'],
+ dependencies: [
+ talertesting_dep,
+ talerjson_dep,
+ libdonautesting_dep,
+ libdonau_dep,
+ libdonauutil_dep,
+ gnunetutil_dep,
+ gnunetcurl_dep,
+ json_dep,
+ gcrypt_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ build_by_default: false,
+ install: false,
+)
+test(
+ 'test_donau_api_rsa',
+ test_donau_api_rsa,
+ workdir: meson.current_build_dir(),
+ suite: ['testing', 'integrationtests'],
+ is_parallel: false,
+)
+
+EXTRA_DIST = ['coins-cs.conf', 'coins-rsa.conf', 'test_donau_api.conf']
+foreach f : EXTRA_DIST
+ configure_file(input: f, output: f, copy: true)
+endforeach
+
+
diff --git a/src/util/meson.build b/src/util/meson.build
@@ -0,0 +1,88 @@
+# This build file is in the public domain
+
+install_data(
+ 'currencies.conf',
+ 'paths.conf',
+ 'donau-secmod-eddsa.conf',
+ 'donau-secmod-rsa.conf',
+ 'donau-secmod-cs.conf',
+ install_dir: pkgcfgdir,
+)
+
+
+libdonauutil_src = [
+ 'charity_signatures.c',
+ 'donau_signatures.c',
+ 'donau_os_installation.c',
+ 'donau_crypto.c',
+ 'qr.c',
+]
+
+libdonauutil = library(
+ 'donauutil',
+ libdonauutil_src,
+ soversion: solibversions['libdonauutil']['soversion'],
+ version: solibversions['libdonauutil']['soversion'],
+ install_rpath: rpath_option,
+ dependencies: [
+ talerutil_dep,
+ talerjson_dep,
+ gnunetutil_dep,
+ gnunetjson_dep,
+ gnunetcurl_dep,
+ sodium_dep,
+ json_dep,
+ gcrypt_dep,
+ mhd_dep,
+ zlib_dep,
+ m_dep,
+ ],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'),
+)
+
+libdonauutil_dep = declare_dependency(link_with: libdonauutil)
+pkg.generate(
+ libdonauutil,
+ url: 'https://taler.net',
+ description: 'GNU Taler utilities library',
+)
+
+
+executable(
+ 'donau-secmod-rsa',
+ ['donau-secmod-rsa.c'],
+ dependencies: [libdonauutil_dep, gcrypt_dep, gnunetutil_dep, talerutil_dep],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
+
+
+executable(
+ 'donau-secmod-cs',
+ ['donau-secmod-cs.c'],
+ dependencies: [libdonauutil_dep, gcrypt_dep, gnunetutil_dep, talerutil_dep],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
+
+
+executable(
+ 'donau-secmod-eddsa',
+ ['donau-secmod-eddsa.c'],
+ dependencies: [libdonauutil_dep, gcrypt_dep, gnunetutil_dep, talerutil_dep],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
+
+
+executable(
+ 'donau-config',
+ ['donau-config.c'],
+ dependencies: [libdonauutil_dep, gnunetutil_dep, talerutil_dep],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+)
+
+