exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

configure.ac (18856B)


      1 #                                               -*- Autoconf -*-
      2 # Process this file with autoconf to produce a configure script.
      3 #
      4 #  This file is part of TALER
      5 #  Copyright (C) 2014-2025 Taler Systems SA
      6 #
      7 #  TALER is free software; you can redistribute it and/or modify it under the
      8 #  terms of the GNU General Public License as published by the Free Software
      9 #  Foundation; either version 3, or (at your option) any later version.
     10 #
     11 #  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     12 #  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     13 #  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     14 #
     15 #  You should have received a copy of the GNU General Public License along with
     16 #  TALER; see the file COPYING.  If not, If not, see <http://www.gnu.org/license>
     17 #
     18 #
     19 AC_PREREQ([2.69])
     20 AC_INIT([taler-exchange],[1.2.3],[taler-bug@gnunet.org])
     21 AC_CONFIG_AUX_DIR([build-aux])
     22 AC_CONFIG_SRCDIR([src/util/util.c])
     23 AC_CONFIG_HEADERS([taler_config.h])
     24 AC_CANONICAL_TARGET
     25 AC_CANONICAL_HOST
     26 AC_CANONICAL_BUILD
     27 # support for non-recursive builds
     28 AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax])
     29 
     30 # pretty build rules
     31 AM_SILENT_RULES([yes])
     32 
     33 AC_CONFIG_MACRO_DIR([m4])
     34 AC_PROG_AWK
     35 AC_PROG_CC
     36 AC_PROG_OBJC
     37 AC_PROG_INSTALL
     38 AC_PROG_LN_S
     39 AC_PROG_MAKE_SET
     40 AM_PROG_CC_C_O
     41 
     42 LT_INIT([disable-static dlopen])
     43 
     44 DX_INIT_DOXYGEN([taler-exchange],,,
     45  DX_PS_FEATURE(OFF),
     46  DX_PDF_FEATURE(OFF),
     47  DX_RTF_FEATURE(OFF),
     48  DX_CHI_FEATURE(OFF),
     49  DX_XML_FEATURE(OFF))
     50 
     51 AC_MSG_CHECKING([whether to compile documentation ONLY])
     52 AC_ARG_ENABLE([only-doc],
     53   [AS_HELP_STRING([--enable-only-doc], [only compile Taler documentation])],
     54   [doc_only=${enableval}],
     55   [doc_only=no])
     56 AC_MSG_RESULT($doc_only)
     57 AM_CONDITIONAL([DOC_ONLY], [test "x$doc_only" = "xyes"])
     58 
     59 AC_CHECK_PROG([DPKG_ARCH], [dpkg-architecture], [yes], [no])
     60 if test "x$DPKG_ARCH" = "xyes"; then
     61   MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`
     62 else
     63   MULTIARCH=""
     64 fi
     65 
     66 # Not indented, as most of the file falls under this one...
     67 AS_IF([test "x$doc_only" != xyes],[
     68 
     69 # Force some CFLAGS
     70 CFLAGS="-Wall -Wno-address-of-packed-member $CFLAGS"
     71 
     72 TALER_LIB_LDFLAGS="-export-dynamic -no-undefined"
     73 TALER_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
     74 
     75 AC_SUBST(TALER_LIB_LDFLAGS)
     76 AC_SUBST(TALER_PLUGIN_LDFLAGS)
     77 
     78 
     79 # Checks for header files.
     80 AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h sys/socket.h sys/un.h netinet/in.h netinet/ip.h])
     81 
     82 AX_PYTHON_MODULE([jinja2],true)
     83 
     84 
     85 # Require minimum libgcrypt version
     86 need_libgcrypt_version=1.6.1
     87 AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"],
     88                                              [minimum version of libgcrypt required])
     89 AM_PATH_LIBGCRYPT([$need_libgcrypt_version])
     90 
     91 
     92 
     93 # should expensive tests be run?
     94 AC_MSG_CHECKING(whether to run expensive tests)
     95 AC_ARG_ENABLE([expensivetests],
     96    [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])],
     97    [enable_expensive=${enableval}],
     98    [enable_expensive=no])
     99 AC_MSG_RESULT($enable_expensive)
    100 AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"])
    101 
    102 
    103 AC_MSG_CHECKING(whether to enable epoll)
    104 AC_ARG_ENABLE([[epoll]],
    105   [AS_HELP_STRING([[--enable-epoll[=ARG]]], [enable epoll support (yes, no, auto) [auto]])],
    106     [enable_epoll=${enableval}],
    107     [enable_epoll='auto']
    108   )
    109 AC_MSG_RESULT($enable_epoll)
    110 AM_CONDITIONAL([MHD_HAVE_EPOLL], [test "x$enable_epoll" = "xyes"])
    111 
    112 AS_IF([test "$enable_epoll" != "no"],
    113       [AX_HAVE_EPOLL
    114        AS_IF([test "${ax_cv_have_epoll}" = "yes"],
    115           [AC_DEFINE([[EPOLL_SUPPORT]],[[1]],[Define to 1 to enable epoll support])
    116            enable_epoll='yes'],
    117        [AS_IF([test "$enable_epoll" = "yes"],
    118               AC_MSG_ERROR([[Support for epoll was explicitly requested but cannot be enabled on this platform.]]))
    119         enable_epoll='no'])])
    120 
    121 
    122 AS_IF([test "x$enable_epoll" = "xyes"],
    123   AC_CACHE_CHECK([for epoll_create1()],
    124                  [mhd_cv_have_epoll_create1], [
    125     AC_LINK_IFELSE([
    126       AC_LANG_PROGRAM([[
    127 #include <sys/epoll.h>
    128         ]], [[
    129 int fd;
    130 fd = epoll_create1(EPOLL_CLOEXEC);]])],
    131       [mhd_cv_have_epoll_create1=yes],
    132       [mhd_cv_have_epoll_create1=no])])
    133   AS_IF([test "x$mhd_cv_have_epoll_create1" = "xyes"],[
    134     AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 function.])]))
    135 
    136 
    137 # check for libmicrohttpd
    138 AC_MSG_CHECKING([for microhttpd])
    139 AC_ARG_WITH([microhttpd],
    140             [AS_HELP_STRING([--with-microhttpd=PFX], [base of microhttpd installation])],
    141             [AC_MSG_RESULT([given as $with_microhttpd])],
    142             [AC_MSG_RESULT([not given])
    143              with_microhttpd=yes])
    144 AS_CASE([$with_microhttpd],
    145         [yes], [],
    146         [no], [AC_MSG_ERROR([--with-microhttpd is required])],
    147         [LDFLAGS="-L$with_microhttpd/lib/$MULTIARCH -L$with_microhttpd/lib/ $LDFLAGS"
    148          CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"])
    149 MHD_VERSION_AT_LEAST([0.9.71])
    150 
    151 
    152 # check for libmicrohttpd2
    153 AC_MSG_CHECKING([for microhttpd2])
    154 AC_ARG_WITH([microhttpd2],
    155             [AS_HELP_STRING([--with-microhttpd2=PFX], [base of libmicrohttpd2 installation])],
    156             [AC_MSG_RESULT([given as $with_microhttpd2])],
    157             [AC_MSG_RESULT([not given])
    158              with_microhttpd2=yes])
    159 AS_CASE([$with_microhttpd2],
    160         [yes],[],
    161         [no],[],
    162         [LDFLAGS="-L$with_microhttpd2/lib/$MULTIARCH -L$with_microhttpd2/lib/ $LDFLAGS"
    163          CPPFLAGS="-I$with_microhttpd2/include $CPPFLAGS"])
    164 MHD2_VERSION_AT_LEAST([1.99.0])
    165 
    166 
    167 # check for libjansson (Jansson JSON library)
    168 jansson=0
    169 AC_MSG_CHECKING([for jansson])
    170 AC_ARG_WITH([jansson],
    171             [AS_HELP_STRING([--with-jansson=PFX], [base of jansson installation])],
    172             [AC_MSG_RESULT([given as $with_jansson])],
    173             [AC_MSG_RESULT([not given])
    174              with_jansson=yes])
    175 AS_CASE([$with_jansson],
    176         [yes], [],
    177         [no], [AC_MSG_ERROR([--with-jansson is required])],
    178         [LDFLAGS="-L$with_jansson/lib/$MULTIARCH -L$with_jansson/lib/ $LDFLAGS"
    179          CPPFLAGS="-I$with_jansson/include $CPPFLAGS"])
    180 AC_CHECK_LIB(jansson,json_dumpb,
    181   [AC_CHECK_HEADER([jansson.h],[jansson=1])])
    182 AS_IF([test $jansson = 0],
    183   [AC_MSG_ERROR([[
    184 ***
    185 *** You need libjansson >= 2.10 to build this program.
    186 *** ]])])
    187 
    188 
    189 # Check for GNUnet's libgnunetutil.
    190 libgnunetutil=0
    191 AC_MSG_CHECKING([for libgnunetutil])
    192 AC_ARG_WITH(gnunet,
    193             [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
    194             [AC_MSG_RESULT([given as $with_gnunet])],
    195             [AC_MSG_RESULT(not given)
    196              with_gnunet=yes])
    197 AS_CASE([$with_gnunet],
    198         [yes], [],
    199         [no], [AC_MSG_ERROR([--with-gnunet is required])],
    200         [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
    201          CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
    202 AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
    203  [AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)])
    204 AS_IF([test $libgnunetutil != 1],
    205   [AC_MSG_ERROR([[
    206 ***
    207 *** You need libgnunetutil >= 0.23.3 to build this program.
    208 *** This library is part of GNUnet, available at
    209 ***   https://gnunet.org
    210 *** ]])])
    211 
    212 
    213 # Check for GNUnet's libgnunetmhd.
    214 libgnunetmhd=0
    215 AC_MSG_CHECKING([for libgnunetmhd])
    216 AC_ARG_WITH(gnunet,
    217             [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
    218             [AC_MSG_RESULT([given as $with_gnunet])],
    219             [AC_MSG_RESULT(not given)
    220              with_gnunet=yes])
    221 AS_CASE([$with_gnunet],
    222         [yes], [],
    223         [no], [AC_MSG_ERROR([--with-gnunet is required])],
    224         [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
    225          CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
    226 AC_CHECK_HEADERS([gnunet/gnunet_mhd_lib.h],
    227  [AC_CHECK_LIB([gnunetmhd], [GNUNET_MHD_post_parser], [libgnunetmhd=1])])
    228 AS_IF([test $libgnunetmhd != 1],
    229   [AC_MSG_ERROR([[
    230 ***
    231 *** You need GNUnet >= 0.23.3 to build this program.
    232 *** You need libgnunetmhd to build this program.
    233 *** Make sure you have libmicrohttpd and libjansson
    234 *** installed while building GNUnet.
    235 *** ]])])
    236 
    237 # check for gettext
    238 AM_GNU_GETTEXT([external])
    239 AM_GNU_GETTEXT_VERSION([0.19.8])
    240 
    241 
    242 # Save before checking libcurl
    243 CFLAGS_SAVE=$CFLAGS
    244 LDFLAGS_SAVE=$LDFLAGS
    245 LIBS_SAVE=$LIBS
    246 
    247 # check for libcurl
    248 LIBCURL_CHECK_CONFIG(,7.34.0,[curl=1],[curl=0])
    249 
    250 # cURL must support CURLINFO_TLS_SESSION, version >= 7.34
    251 AS_IF([test "x$curl" = x1],[
    252  AC_CHECK_HEADER([curl/curl.h],
    253   [AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=1],[curl=0],[[#include <curl/curl.h>]])],
    254   [curl=0])
    255 ])
    256 
    257 # libcurl should be mutually exclusive
    258 AS_IF([test "$curl" = 1],
    259       AM_CONDITIONAL(HAVE_LIBCURL, true)
    260       AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])
    261       [LIBCURL_LIBS="-lcurl"],
    262       [AC_MSG_ERROR([FATAL: No libcurl])])
    263 
    264 AC_SUBST([LIBCURL_LIBS])
    265 
    266 # Check for GNUnet's libgnunetcurl.
    267 libgnunetcurl=0
    268 AC_MSG_CHECKING([for libgnunetcurl])
    269 AC_ARG_WITH(gnunet,
    270             [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
    271             [AC_MSG_RESULT([given as $with_gnunet])],
    272             [AC_MSG_RESULT(not given)
    273              with_gnunet=yes])
    274 AS_CASE([$with_gnunet],
    275         [yes], [],
    276         [no], [AC_MSG_ERROR([--with-gnunet is required])],
    277         [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
    278          CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
    279 AC_CHECK_HEADERS([gnunet/gnunet_curl_lib.h],
    280  [AC_CHECK_LIB([gnunetcurl], [GNUNET_CURL_get_select_info], libgnunetcurl=1)])
    281 AS_IF([test $libgnunetcurl != 1],
    282   [AC_MSG_ERROR([[
    283 ***
    284 *** You need libgnunetcurl to build this program.
    285 *** Make sure you have libcurl installed while
    286 *** building GNUnet.
    287 *** ]])])
    288 
    289 
    290 # Restore after curl checks messed up these values
    291 CFLAGS=$CFLAGS_SAVE
    292 LDFLAGS=$LDFLAGS_SAVE
    293 LIBS=$LIBS_SAVE
    294 
    295 # test for postgres
    296 AX_LIB_POSTGRESQL([15.0])
    297 AS_IF([test "x$found_postgresql" = "xyes"],
    298   [SAVE_CPPFLAGS="$CPPFLAGS"
    299    CPPFLAGS="$POSTGRES_CPPFLAGS $CPPFLAGS"
    300    AC_CHECK_HEADERS([libpq-fe.h], [postgres=1], [postgres=0])])
    301 AS_IF([test "x$postgres" != "x1"],
    302   [AC_MSG_ERROR([[
    303 ***
    304 *** You need libpq(-dev) >= 15.0 to build this program.
    305 *** ]])])
    306 AM_CONDITIONAL([HAVE_POSTGRESQL], [test "x$postgres" = "x1"])
    307 AC_DEFINE_UNQUOTED([HAVE_POSTGRESQL], [$postgres],
    308                    [Define to 1 if Postgres is available])
    309 
    310 # Check for GNUnet's libgnunetpq.
    311 libgnunetpq=0
    312 AC_MSG_CHECKING([for libgnunetpq])
    313 AC_ARG_WITH(gnunet,
    314             [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
    315             [AC_MSG_RESULT([given as $with_gnunet])],
    316             [AC_MSG_RESULT(not given)
    317              with_gnunet=yes])
    318 AS_CASE([$with_gnunet],
    319         [yes], [],
    320         [no], [AC_MSG_ERROR([--with-gnunet is required])],
    321         [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS"
    322          CPPFLAGS="-I$with_gnunet/include ${CPPFLAGS}"])
    323 CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_CPPFLAGS}"
    324 AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h],
    325  [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_result_spec_blinded_sig], libgnunetpq=1)])
    326 AS_IF([test $libgnunetpq != 1],
    327   [AC_MSG_ERROR([[
    328 ***
    329 *** You need libgnunetpq version >= 8:0:3 to build this program.
    330 *** Make sure you have Postgres installed while
    331 *** building GNUnet (and that your GNUnet version is recent!)
    332 *** ]])])
    333 
    334 CFLAGS_SAVE=$CFLAGS
    335 LDFLAGS_SAVE=$LDFLAGS
    336 LIBS_SAVE="$LIBS"
    337 
    338 # Check for GNUnet's libgnunetsq
    339 libgnunetsq=0
    340 AC_MSG_CHECKING([for libgnunetsq])
    341 AC_CHECK_HEADERS([gnunet/gnunet_sq_lib.h],
    342  [AC_CHECK_LIB([gnunetsq], [GNUNET_SQ_result_spec_string], libgnunetsq=1)])
    343 
    344 
    345 
    346 CFLAGS=$CFLAGS_SAVE
    347 LDFLAGS=$LDFLAGS_SAVE
    348 LIBS=$LIBS_SAVE
    349 
    350 # test for sqlite
    351 sqlite=false
    352 AC_MSG_CHECKING(for SQLite)
    353 AC_ARG_WITH(sqlite,
    354   [  --with-sqlite=PFX       base of SQLite installation],
    355   [AC_MSG_RESULT("$with_sqlite")
    356    AS_CASE([$with_sqlite],
    357      [no],[],
    358      [yes],[
    359       AC_CHECK_HEADERS(sqlite3.h,
    360       sqlite=true)],
    361      [
    362     LDFLAGS="-L$with_sqlite/lib/$MULTIARCH -L$with_sqlite/lib/ $LDFLAGS"
    363     CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
    364     AC_CHECK_HEADERS(sqlite3.h,
    365      EXT_LIB_PATH="-L$with_sqlite/lib/$MULTIARCH -L$with_sqlite/lib/ $EXT_LIB_PATH"
    366      SQLITE_LDFLAGS="-L$with_sqlite/lib/$MULTIARCH -L$with_sqlite/lib/"
    367      SQLITE_CPPFLAGS="-I$with_sqlite/include"
    368      sqlite=true)
    369     LDFLAGS=$SAVE_LDFLAGS
    370     CPPFLAGS=$SAVE_CPPFLAGS
    371     ])
    372   ],
    373   [AC_MSG_RESULT([--with-sqlite not specified])
    374     AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
    375 AM_CONDITIONAL(HAVE_SQLITE, [test x$sqlite = xtrue] && [test $libgnunetsq = 1])
    376 AC_SUBST(SQLITE_CPPFLAGS)
    377 AC_SUBST(SQLITE_LDFLAGS)
    378 
    379 # check for libtalertwistertesting
    380 talertwister=0
    381 AC_MSG_CHECKING([for talertwister])
    382 AC_ARG_WITH([twister],
    383             [AS_HELP_STRING([--with-twister=PFX], [base of libtalertwister])],
    384             [AC_MSG_RESULT([given as $with_twister])],
    385             [AC_MSG_RESULT([not given])
    386              with_twister=yes])
    387 AS_CASE([$with_twister],
    388         [yes], [],
    389         [no], [AC_MSG_WARN([no twister-testing will be compiled])],
    390         [LDFLAGS="-L$with_twister/lib/$MULTIARCH -L$with_twister/lib/ $LDFLAGS"
    391          CPPFLAGS="-I$with_twister/include $CPPFLAGS"])
    392 
    393 AC_CHECK_HEADERS([taler/taler_twister_service.h],
    394  [AC_CHECK_LIB([talertwister], [TALER_TWISTER_connect], talertwister=1)])
    395 AM_CONDITIONAL(HAVE_TWISTER, test x$talertwister = x1)
    396 
    397 # should developer logic be compiled (not-for-production code)?
    398 AC_MSG_CHECKING(whether to compile developer logic)
    399 AC_ARG_ENABLE([developer-mode],
    400    [AS_HELP_STRING([--enable-developer-mode], [enable compiling developer code])],
    401    [enable_developer=${enableval}],
    402    [enable_developer=yes])
    403 AC_MSG_RESULT($enable_developer)
    404 AM_CONDITIONAL([HAVE_DEVELOPER], [test "x$enable_developer" = "xyes"])
    405 enable_dev=1
    406 AS_IF([test "x$enableval" = "xno"], [enable_dev=0])
    407 # developer-logic requires a more recent MHD than usual.
    408 AC_CHECK_DECL([MHD_OPTION_NOTIFY_CONNECTION],,[enable_dev=0],[[#include <microhttpd.h>]])
    409 AC_DEFINE_UNQUOTED([HAVE_DEVELOPER],[$enable_dev],[1 if developer logic is enabled, 0 otherwise])
    410 
    411 AC_PATH_PROG([JQ], [jq], [no])
    412 if test "$JQ" = "no"; then
    413   AC_MSG_ERROR([jq is required but not found. Please install jq.])
    414 fi
    415 
    416 
    417 
    418 # Adam shostack suggests the following for Windows:
    419 # -D_FORTIFY_SOURCE=2 -fstack-protector-all
    420 AC_ARG_ENABLE(gcc-hardening,
    421    AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
    422 [AS_IF([test x$enableval = xyes],[
    423     CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
    424     CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
    425     CFLAGS="$CFLAGS --param ssp-buffer-size=1"
    426     LDFLAGS="$LDFLAGS -pie"])])
    427 
    428 
    429 # Linker hardening options
    430 # Currently these options are ELF specific - you can't use this with MacOSX
    431 AC_ARG_ENABLE(linker-hardening,
    432   AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
    433   [AS_IF([test x$enableval = xyes],[LDFLAGS="$LDFLAGS -z relro -z now"])])
    434 
    435 
    436 AC_ARG_ENABLE(sanitizer,
    437   AS_HELP_STRING(--enable-sanitizer, enable Address Sanitizer and Undefined Behavior Sanitizer),
    438 [AS_IF([test x$enableval = xyes],[
    439    LDFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer"
    440  ])])
    441 
    442 # logging
    443 extra_logging=0
    444 AC_ARG_ENABLE([logging],
    445    AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose ('yes' is the default)]),
    446    [AS_IF([test "x$enableval" = "xyes"], [],
    447           [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])],
    448           [test "x$enableval" = "xverbose"], [extra_logging=1]
    449           [test "x$enableval" = "xveryverbose"], [extra_logging=2])
    450    ], [])
    451 AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
    452 
    453 # gcov compilation
    454 AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
    455 AC_ARG_ENABLE([coverage],
    456               AS_HELP_STRING([--enable-coverage],
    457                              [compile the library with code coverage support]),
    458               [use_gcov=${enableval}],
    459               [use_gcov=no])
    460 AC_MSG_RESULT($use_gcov)
    461 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
    462 
    463 # version info
    464 AC_PATH_PROG(gitcommand, git)
    465 AC_MSG_CHECKING(for source being under a VCS)
    466 git_version=
    467 AS_IF([test ! "X$gitcommand" = "X"],
    468 [
    469   git_version=$(cd $srcdir ; git rev-list -n 1 --abbrev-commit HEAD 2>/dev/null)
    470 ])
    471 AS_IF([test "X$git_version" = "X"],
    472   [
    473     vcs_name="no"
    474     vcs_version="\"release\""
    475   ],
    476   [
    477     vcs_name="yes, git-svn"
    478     vcs_version="\"git-$git_version\""
    479   ])
    480 AC_MSG_RESULT($vcs_name)
    481 
    482 AC_MSG_CHECKING(VCS version)
    483 AC_MSG_RESULT($vcs_version)
    484 AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version])
    485 
    486 
    487 # Checks for typedefs, structures, and compiler characteristics.
    488 AC_TYPE_PID_T
    489 AC_TYPE_SIZE_T
    490 AC_TYPE_UINT16_T
    491 AC_TYPE_UINT32_T
    492 AC_TYPE_UINT64_T
    493 AC_TYPE_INTMAX_T
    494 AC_TYPE_UINTMAX_T
    495 
    496 # Checks for library functions.
    497 AC_CHECK_FUNCS([strdup])
    498 
    499 
    500 AC_ARG_ENABLE([[doc]],
    501   [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
    502     [enable_doc=yes])
    503 test "x$enable_doc" = "xno" || enable_doc=yes
    504 AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
    505 
    506 ],[  # This is the big test "$doc_only" on top of the file!
    507 
    508 AM_CONDITIONAL([HAVE_MHD2], [false])
    509 # logic if doc_only is set, make sure conditionals are still defined
    510 AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [false])
    511 AM_CONDITIONAL([MHD_HAVE_EPOLL], [false])
    512 AM_CONDITIONAL([HAVE_POSTGRESQL], [false])
    513 AM_CONDITIONAL([HAVE_SQLITE], [false])
    514 AM_CONDITIONAL([HAVE_LIBCURL], [false])
    515 AM_CONDITIONAL([HAVE_DEVELOPER], [false])
    516 AM_CONDITIONAL([USE_COVERAGE], [false])
    517 AM_CONDITIONAL([ENABLE_DOC], [true])
    518 AM_CONDITIONAL([HAVE_TWISTER], [false])
    519 
    520 # end of 'doc_only'
    521 ])
    522 
    523 AC_CONFIG_FILES([Makefile
    524                  contrib/Makefile
    525                  contrib/typst/Makefile
    526                  doc/Makefile
    527                  doc/doxygen/Makefile
    528                  po/Makefile.in
    529                  src/Makefile
    530                  src/auditor/Makefile
    531                  src/auditordb/Makefile
    532                  src/bank-lib/Makefile
    533                  src/curl/Makefile
    534                  src/exchange/Makefile
    535                  src/exchangedb/Makefile
    536                  src/exchange-tools/Makefile
    537                  src/extensions/Makefile
    538                  src/extensions/age_restriction/Makefile
    539                  src/lib/Makefile
    540                  src/kyclogic/Makefile
    541                  src/testing/Makefile
    542                  src/benchmark/Makefile
    543                  src/include/Makefile
    544                  src/include/taler/Makefile
    545                  src/include/taler/taler-exchange/Makefile
    546                  src/json/Makefile
    547                  src/mhd/Makefile
    548                  src/pq/Makefile
    549                  src/sq/Makefile
    550                  src/templating/Makefile
    551                  src/util/Makefile
    552                  ])
    553 AC_OUTPUT