2015-01-08 18:37:20 +01:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
2015-02-08 00:20:48 +01:00
|
|
|
#
|
|
|
|
# This file is part of TALER
|
2016-03-17 16:14:28 +01:00
|
|
|
# Copyright (C) 2014, 2015, 2016 GNUnet e.V. and Inria
|
2015-02-08 00:20:48 +01:00
|
|
|
#
|
|
|
|
# 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 MERCHANTABILITY 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>
|
|
|
|
#
|
|
|
|
#
|
2015-01-08 18:37:20 +01:00
|
|
|
AC_PREREQ([2.69])
|
2016-06-07 19:27:51 +02:00
|
|
|
AC_INIT([taler-exchange], [0.0.1], [taler-bug@gnunet.org])
|
2016-03-19 15:23:11 +01:00
|
|
|
AC_CONFIG_SRCDIR([src/util/util.c])
|
2015-01-08 18:37:20 +01:00
|
|
|
AC_CONFIG_HEADERS([taler_config.h])
|
|
|
|
# support for non-recursive builds
|
2016-05-04 10:09:17 +02:00
|
|
|
AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax])
|
2015-01-08 18:37:20 +01:00
|
|
|
|
|
|
|
# pretty build rules
|
|
|
|
AM_SILENT_RULES([yes])
|
|
|
|
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
CFLAGS="-Wall $CFLAGS"
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h])
|
|
|
|
|
2015-05-28 11:34:06 +02:00
|
|
|
|
|
|
|
# should the build process be restricted to the code required
|
|
|
|
# for GNU Taler wallets?
|
|
|
|
AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY)
|
|
|
|
AC_ARG_ENABLE([wallet],
|
2015-05-28 11:47:12 +02:00
|
|
|
[AS_HELP_STRING([--enable-wallet], [only compile for Taler wallet])],
|
2015-05-28 11:34:06 +02:00
|
|
|
[wallet_only=${enableval}],
|
|
|
|
[wallet_only=no])
|
|
|
|
AC_MSG_RESULT($wallet_only)
|
|
|
|
AM_CONDITIONAL([WALLET_ONLY], [test "x$wallet_only" = "xyes"])
|
|
|
|
|
2015-07-16 15:47:07 +02:00
|
|
|
|
|
|
|
# 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])
|
|
|
|
|
|
|
|
|
2015-09-28 22:28:09 +02:00
|
|
|
# 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"])
|
|
|
|
|
|
|
|
|
2015-05-28 11:34:06 +02:00
|
|
|
if test "$wallet_only" != yes
|
|
|
|
then
|
|
|
|
|
|
|
|
|
2015-01-08 18:37:20 +01:00
|
|
|
# Check for GNUnet's libgnunetutil.
|
|
|
|
libgnunetutil=0
|
|
|
|
AC_MSG_CHECKING([for libgnunetutil])
|
|
|
|
AC_ARG_WITH(gnunet,
|
|
|
|
[AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
|
|
|
|
[AC_MSG_RESULT([given as $with_gnunet])],
|
|
|
|
[AC_MSG_RESULT(not given)
|
|
|
|
with_gnunet=yes])
|
|
|
|
AS_CASE([$with_gnunet],
|
|
|
|
[yes], [],
|
|
|
|
[no], [AC_MSG_ERROR([--with-gnunet is required])],
|
|
|
|
[LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_util_lib.h],
|
|
|
|
[AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)],
|
|
|
|
[], [#ifdef HAVE_GNUNET_PLATFORM_H
|
|
|
|
#include <gnunet/platform.h>
|
|
|
|
#endif])
|
|
|
|
AS_IF([test $libgnunetutil != 1],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libgnunetutil to build this program.
|
|
|
|
*** This library is part of GNUnet, available at
|
|
|
|
*** https://gnunet.org
|
|
|
|
*** ]])])
|
|
|
|
|
2015-07-16 15:47:07 +02:00
|
|
|
|
2016-04-25 00:26:34 +02:00
|
|
|
# Check for GNUnet's libgnunetjson.
|
|
|
|
libgnunetjson=0
|
|
|
|
AC_MSG_CHECKING([for libgnunetjson])
|
|
|
|
AC_ARG_WITH(gnunet,
|
|
|
|
[AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
|
|
|
|
[AC_MSG_RESULT([given as $with_gnunet])],
|
|
|
|
[AC_MSG_RESULT(not given)
|
|
|
|
with_gnunet=yes])
|
|
|
|
AS_CASE([$with_gnunet],
|
|
|
|
[yes], [],
|
|
|
|
[no], [AC_MSG_ERROR([--with-gnunet is required])],
|
|
|
|
[LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_json_lib.h],
|
|
|
|
[AC_CHECK_LIB([gnunetjson], [GNUNET_JSON_parse], libgnunetjson=1)],
|
|
|
|
[], [#ifdef HAVE_GNUNET_PLATFORM_H
|
|
|
|
#include <gnunet/platform.h>
|
|
|
|
#endif])
|
|
|
|
AS_IF([test $libgnunetjson != 1],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libgnunetjson to build this program.
|
|
|
|
*** Make sure you have libjansson installed while
|
|
|
|
*** building GNUnet.
|
|
|
|
*** ]])])
|
|
|
|
|
|
|
|
|
|
|
|
# Check for GNUnet's libgnunetcurl.
|
|
|
|
libgnunetcurl=0
|
|
|
|
AC_MSG_CHECKING([for libgnunetcurl])
|
|
|
|
AC_ARG_WITH(gnunet,
|
|
|
|
[AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
|
|
|
|
[AC_MSG_RESULT([given as $with_gnunet])],
|
|
|
|
[AC_MSG_RESULT(not given)
|
|
|
|
with_gnunet=yes])
|
|
|
|
AS_CASE([$with_gnunet],
|
|
|
|
[yes], [],
|
|
|
|
[no], [AC_MSG_ERROR([--with-gnunet is required])],
|
|
|
|
[LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_curl_lib.h],
|
|
|
|
[AC_CHECK_LIB([gnunetcurl], [GNUNET_CURL_get_select_info], libgnunetcurl=1)],
|
|
|
|
[], [#ifdef HAVE_GNUNET_PLATFORM_H
|
|
|
|
#include <gnunet/platform.h>
|
|
|
|
#endif])
|
|
|
|
AS_IF([test $libgnunetcurl != 1],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libgnunetcurl to build this program.
|
|
|
|
*** Make sure you have libcurl or libgnurl installed while
|
|
|
|
*** building GNUnet.
|
|
|
|
*** ]])])
|
|
|
|
|
|
|
|
|
2016-05-04 10:21:35 +02:00
|
|
|
|
|
|
|
# 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 $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_pq_lib.h],
|
|
|
|
[AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_result_spec_string], libgnunetpq=1)],
|
|
|
|
[], [#ifdef HAVE_GNUNET_PLATFORM_H
|
|
|
|
#include <gnunet/platform.h>
|
|
|
|
#endif])
|
|
|
|
AS_IF([test $libgnunetpq != 1],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libgnunetpq to build this program.
|
|
|
|
*** Make sure you have Postgres installed while
|
|
|
|
*** building GNUnet (and that your GNUnet version
|
|
|
|
*** is recent!)
|
|
|
|
*** ]])])
|
|
|
|
|
|
|
|
|
2015-01-08 18:37:20 +01:00
|
|
|
# check for libmicrohttpd
|
|
|
|
microhttpd=0
|
|
|
|
AC_MSG_CHECKING([for microhttpd])
|
|
|
|
AC_ARG_WITH([microhttpd],
|
|
|
|
[AS_HELP_STRING([--with-microhttpd=PFX], [base of microhttpd installation])],
|
|
|
|
[AC_MSG_RESULT([given as $with_microhttpd])],
|
|
|
|
[AC_MSG_RESULT([not given])
|
|
|
|
with_microhttpd=yes])
|
|
|
|
AS_CASE([$with_microhttpd],
|
|
|
|
[yes], [],
|
|
|
|
[no], [AC_MSG_ERROR([--with-microhttpd is required])],
|
|
|
|
[LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_LIB(microhttpd,MHD_start_daemon,
|
|
|
|
[AC_CHECK_HEADER([microhttpd.h],[microhttpd=1])])
|
|
|
|
AS_IF([test $microhttpd = 0],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libmicrohttpd to build this program.
|
|
|
|
*** ]])])
|
|
|
|
|
|
|
|
|
|
|
|
# check for libjansson (Jansson JSON library)
|
|
|
|
jansson=0
|
|
|
|
AC_MSG_CHECKING([for jansson])
|
|
|
|
AC_ARG_WITH([jansson],
|
|
|
|
[AS_HELP_STRING([--with-jansson=PFX], [base of jansson installation])],
|
|
|
|
[AC_MSG_RESULT([given as $with_jansson])],
|
|
|
|
[AC_MSG_RESULT([not given])
|
|
|
|
with_jansson=yes])
|
|
|
|
AS_CASE([$with_jansson],
|
|
|
|
[yes], [],
|
|
|
|
[no], [AC_MSG_ERROR([--with-jansson is required])],
|
|
|
|
[LDFLAGS="-L$with_jansson/lib $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_jansson/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_LIB(jansson,json_pack,
|
|
|
|
[AC_CHECK_HEADER([jansson.h],[jansson=1])])
|
|
|
|
AS_IF([test $jansson = 0],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libjansson to build this program.
|
|
|
|
*** ]])])
|
|
|
|
|
2015-05-28 11:34:06 +02:00
|
|
|
|
2015-12-13 17:03:32 +01:00
|
|
|
# test for postgres
|
|
|
|
AX_LIB_POSTGRESQL([9.3])
|
|
|
|
if test "$found_postgresql" = "yes"; then
|
|
|
|
postgres=true
|
|
|
|
fi
|
2015-05-28 11:34:06 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
# Check for GNUnet's libgnunetutil_taler_wallet.
|
2015-07-16 15:47:07 +02:00
|
|
|
|
|
|
|
CFLAGS_SAVE=$CFLAGS
|
|
|
|
LDFLAGS_SAVE=$LDFLAGS
|
|
|
|
CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS $LIBGCRYPT_LDFLAGS"
|
|
|
|
LIBS_SAVE="$LIBS"
|
|
|
|
LIBS="-lgcrypt -lgpg-error $LIBS"
|
|
|
|
|
|
|
|
|
2015-05-28 11:34:06 +02:00
|
|
|
libgnunetutil_taler_wallet=0
|
|
|
|
AC_MSG_CHECKING([for libgnunetutil_taler_wallet])
|
|
|
|
AC_ARG_WITH(gnunet,
|
|
|
|
[AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
|
|
|
|
[AC_MSG_RESULT([given as $with_gnunet])],
|
|
|
|
[AC_MSG_RESULT(not given)
|
|
|
|
with_gnunet=yes])
|
|
|
|
AS_CASE([$with_gnunet],
|
|
|
|
[yes], [],
|
|
|
|
[no], [AC_MSG_ERROR([--with-gnunet is required])],
|
|
|
|
[LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
|
|
|
|
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
|
|
|
|
AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_util_taler_wallet_lib.h],
|
2015-07-16 15:47:07 +02:00
|
|
|
[AC_CHECK_LIB([gnunetutil_taler_wallet], [GNUNET_CRYPTO_hash_context_start], libgnunetutil_taler_wallet=1)],
|
2015-05-28 11:34:06 +02:00
|
|
|
[], [#ifdef HAVE_GNUNET_PLATFORM_H
|
|
|
|
#include <gnunet/platform.h>
|
|
|
|
#endif])
|
|
|
|
AS_IF([test $libgnunetutil_taler_wallet != 1],
|
|
|
|
[AC_MSG_ERROR([[
|
|
|
|
***
|
|
|
|
*** You need libgnunetutil_taler_wallet to build this program.
|
|
|
|
*** This library is part of GNUnet, available at
|
|
|
|
*** https://gnunet.org/
|
|
|
|
*** Run GNUnet's configure with --enable-taler-wallet as well!
|
|
|
|
*** ]])])
|
|
|
|
|
2015-07-16 15:47:07 +02:00
|
|
|
CFLAGS=$CFLAGS_SAVE
|
|
|
|
LDFLAGS=$LDFLAGS_SAVE
|
|
|
|
LIBS=$LIBS_SAVE
|
|
|
|
|
|
|
|
|
2015-05-28 11:34:06 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
2016-01-24 15:17:31 +01:00
|
|
|
CFLAGS_SAVE=$CFLAGS
|
|
|
|
LDFLAGS_SAVE=$LDFLAGS
|
|
|
|
LIBS_SAVE="$LIBS"
|
|
|
|
|
2015-05-28 11:34:06 +02:00
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
|
|
|
|
|
2015-01-08 18:37:20 +01:00
|
|
|
# check for libgnurl
|
2015-04-13 12:57:05 +02:00
|
|
|
# libgnurl
|
|
|
|
LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
|
2015-01-08 18:37:20 +01:00
|
|
|
if test "$gnurl" = 1
|
|
|
|
then
|
|
|
|
AM_CONDITIONAL(HAVE_LIBGNURL, true)
|
|
|
|
AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl])
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(HAVE_LIBGNURL, false)
|
|
|
|
fi
|
2015-04-13 12:57:05 +02:00
|
|
|
|
|
|
|
# libcurl-gnutls
|
|
|
|
LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false])
|
|
|
|
if test "x$curl" = xtrue
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS([curl/curl.h],
|
|
|
|
AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]),
|
|
|
|
[curl=false])
|
|
|
|
# need libcurl-gnutls.so, everything else is not acceptable
|
|
|
|
AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false])
|
|
|
|
# cURL must support CURLINFO_TLS_SESSION, version >= 7.34
|
|
|
|
|
|
|
|
fi
|
|
|
|
if test x$curl = xfalse
|
|
|
|
then
|
|
|
|
AM_CONDITIONAL(HAVE_LIBCURL, false)
|
|
|
|
if test "$gnurl" = 0
|
|
|
|
then
|
|
|
|
AC_MSG_WARN([GNUnet requires libcurl-gnutls >= 7.34])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(HAVE_LIBCURL, true)
|
|
|
|
AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL])
|
|
|
|
fi
|
|
|
|
|
2016-04-19 15:11:10 +02:00
|
|
|
|
|
|
|
# Check for curl/curl.h and gnurl/curl.h so we can use #ifdef
|
|
|
|
# HAVE_CURL_CURL_H later (the above LIBCURL_CHECK_CONFIG accepted
|
|
|
|
# *either* header set).
|
|
|
|
AC_CHECK_HEADERS([curl/curl.h],,
|
|
|
|
curl=false
|
|
|
|
AC_CHECK_HEADERS([gnurl/curl.h],,
|
|
|
|
gnurl=false))
|
|
|
|
|
|
|
|
|
2015-04-13 12:57:05 +02:00
|
|
|
# libgnurl
|
|
|
|
if test "x$gnurl" = "x0"
|
|
|
|
then
|
|
|
|
if test "x$curl" = "x0"
|
|
|
|
then
|
|
|
|
AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.])
|
|
|
|
AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-01-24 15:17:31 +01:00
|
|
|
CFLAGS=$CFLAGS_SAVE
|
|
|
|
LDFLAGS=$LDFLAGS_SAVE
|
|
|
|
LIBS=$LIBS_SAVE
|
|
|
|
|
2015-01-08 18:37:20 +01:00
|
|
|
|
2015-04-15 22:33:25 +02:00
|
|
|
# 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])
|
|
|
|
AC_DEFINE_UNQUOTED([HAVE_DEVELOPER],[$enable_dev],[1 if developer logic is enabled, 0 otherwise])
|
|
|
|
|
|
|
|
|
2015-07-14 17:43:50 +02:00
|
|
|
|
|
|
|
# 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),
|
|
|
|
[if test x$enableval = xyes; then
|
|
|
|
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"
|
|
|
|
fi])
|
|
|
|
|
|
|
|
|
|
|
|
# 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),
|
|
|
|
[if test x$enableval = xyes; then
|
|
|
|
LDFLAGS="$LDFLAGS -z relro -z now"
|
|
|
|
fi])
|
|
|
|
|
|
|
|
|
2015-01-08 18:37:20 +01:00
|
|
|
# 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])
|
|
|
|
|
2015-04-13 13:49:42 +02:00
|
|
|
# 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)
|
2015-04-15 16:01:25 +02:00
|
|
|
git_version=
|
2015-04-13 13:49:42 +02:00
|
|
|
AS_IF([test ! "X$gitcommand" = "X"],
|
|
|
|
[
|
2015-04-15 16:01:25 +02:00
|
|
|
git_version=$(cd $srcdir ; git rev-list --full-history --all --abbrev-commit | head -n 1 2>/dev/null)
|
2015-04-13 13:49:42 +02:00
|
|
|
])
|
2015-04-15 16:01:25 +02:00
|
|
|
AS_IF([test "X$git_version" = "X"],
|
2015-04-13 13:49:42 +02:00
|
|
|
[
|
|
|
|
vcs_name="no"
|
|
|
|
vcs_version="\"release\""
|
|
|
|
],
|
|
|
|
[
|
|
|
|
vcs_name="yes, git-svn"
|
2015-04-15 16:01:25 +02:00
|
|
|
vcs_version="\"git-$git_version\""
|
2015-04-13 13:49:42 +02:00
|
|
|
])
|
|
|
|
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])
|
|
|
|
|
|
|
|
|
2015-01-08 18:37:20 +01:00
|
|
|
# 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_CONFIG_FILES([Makefile
|
|
|
|
doc/Makefile
|
2015-03-28 15:42:07 +01:00
|
|
|
doc/doxygen/Makefile
|
2015-01-08 18:37:20 +01:00
|
|
|
src/Makefile
|
2016-01-25 11:08:19 +01:00
|
|
|
src/bank-lib/Makefile
|
2016-03-01 15:35:04 +01:00
|
|
|
src/exchangedb/Makefile
|
|
|
|
src/exchange/Makefile
|
|
|
|
src/exchange-tools/Makefile
|
|
|
|
src/exchange-lib/Makefile
|
2016-05-30 15:08:12 +02:00
|
|
|
src/benchmark/Makefile
|
2016-03-19 15:23:11 +01:00
|
|
|
src/include/Makefile
|
|
|
|
src/json/Makefile
|
|
|
|
src/pq/Makefile
|
|
|
|
src/util/Makefile
|
|
|
|
src/wire/Makefile
|
2015-01-08 18:37:20 +01:00
|
|
|
])
|
|
|
|
AC_OUTPUT
|