# This file is part of GNUnet.
-# (C) 2001--2016 GNUnet e.V.
+# (C) 2001--2017 GNUnet e.V.
#
# GNUnet is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
fi])
+AC_ARG_ENABLE(sanitizer,
+ AS_HELP_STRING(--enable-sanitizer, enable Address Sanitizer and Undefined Behavior Sanitizer),
+[if test x$enableval = xyes; then
+ LDFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer"
+fi])
+
+
extra_logging=GNUNET_NO
AC_ARG_ENABLE([logging],
AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
[taler_only=${enableval}],
[taler_only=no])
AC_MSG_RESULT($taler_only)
-AM_CONDITIONAL([TALER_ONLY], [test "x$taler_only" = "xyes"])
+if test "x$taler_only" = "xyes"
+then
+ AM_CONDITIONAL([TALER_ONLY],true)
+ AC_DEFINE([TALER_WALLET_ONLY],[1],[Compiling for Taler wallet])
+else
+ AM_CONDITIONAL([TALER_ONLY],false)
+ AC_DEFINE([TALER_WALLET_ONLY],[0],[Canonical compilation])
+fi
# test for libextractor
extractor=0
if test $HAVE_LIBUNISTRING != yes; then
AC_MSG_ERROR([GNUnet requires libunistring])
fi
-if test $gl_libunistring_hexversion -le 2305; then
+# under emscripten, $gl_libunistring_hexversion is undefined
+if test "$taler_only" != yes; then
+if test "x$gl_libunistring_hexversion" = "x" || test "$gl_libunistring_hexversion" -le 2305; then
AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])
fi
+fi
AC_CHECK_HEADERS([unistr.h],,AC_MSG_ERROR([Compiling GNUnet requires unistr.h (from libunistring) to be installed]))
# restore LIBS
AC_SUBST(SQLITE_CPPFLAGS)
AC_SUBST(SQLITE_LDFLAGS)
+LDFLAGS=$SAVE_LDFLAGS
+CPPFLAGS=$SAVE_CPPFLAGS
+
# test for postgres
postgres=false
-AX_LIB_POSTGRESQL([])
-if test "$found_postgresql" = "yes"; then
- CFLAGS="$CFLAGS $POSTGRESQL_CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
- AC_CHECK_HEADERS([libpq-fe.h],
- postgres=true)
+# even running the check for postgres breaks emscripten ...
+if test "$taler_only" != yes; then
+ AX_LIB_POSTGRESQL([])
+ if test "$found_postgresql" = "yes"; then
+ CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
+ AC_CHECK_HEADERS([libpq-fe.h],
+ postgres=true)
+ fi
fi
-
AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
#include <netinet/in.h>
])
+AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
+ [ AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN, 1, [Do we have sockaddr_un.sun_len?])
+ ],
+ [],
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ ])
+
# Checks for library functions.
AC_MSG_RESULT($enable_experimental)
AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
-# FTBFS right now...
-AC_MSG_CHECKING(whether to compile ATS test code)
-AC_ARG_ENABLE([wachs],
- [AS_HELP_STRING([--enable-wachs], [enable compiling ATS test code])],
- [enable_wachs=${enableval}],
- [enable_wachs=no])
-AC_MSG_RESULT($enable_wachs)
-AM_CONDITIONAL([HAVE_WACHS], [test "x$enable_wachs" = "xyes"])
-
# should malicious code be compiled (should only be used for testing)?
AC_MSG_CHECKING(whether to compile malicious code)
AC_ARG_ENABLE([malicious],
src/ats/ats.conf
src/ats-tool/Makefile
src/ats-tests/Makefile
+src/auction/Makefile
src/block/Makefile
src/cadet/Makefile
src/cadet/cadet.conf
src/namestore/Makefile
src/namestore/namestore.conf
src/nat/Makefile
+src/nat/nat.conf
+src/nat-auto/Makefile
+src/nat-auto/nat-auto.conf
src/nse/Makefile
src/nse/nse.conf
src/peerinfo/Makefile
src/set/set.conf
src/social/Makefile
src/social/social.conf
+src/sq/Makefile
src/statistics/Makefile
src/statistics/statistics.conf
src/template/Makefile
src/util/resolver.conf
src/vpn/Makefile
src/vpn/vpn.conf
+src/zonemaster/Makefile
+src/zonemaster/zonemaster.conf
src/rest/Makefile
src/identity-provider/Makefile
pkgconfig/Makefile
AC_MSG_NOTICE([NOTICE: bluetooth library not found. bluetooth support will not be compiled.])
fi
+# jansson
+if test "x$jansson" = "x0"
+then
+ AC_MSG_NOTICE([NOTICE: jansson library not found. json support will not be compiled.])
+fi
+
#gnutls
if test x$gnutls != xtrue
then
AC_MSG_NOTICE([NOTICE: Mac OS X framework build enabled.])
fi
-if test "x$SUDO_BINARY" = "x" -a ! -w /
+if test "x$install_nss" = "x0"
then
AC_MSG_NOTICE([NOTICE: --with-sudo not specified and not running as 'root', will not install GNS NSS library])
+else
+ AC_MSG_NOTICE([NOTICE: Will to install GNS NSS library to $NSS_DIR])
fi