1 # This file is part of GNUnet.
2 # (C) 2001--2019 GNUnet e.V.
4 # GNUnet is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU Affero General Public License as published
6 # by the Free Software Foundation, either version 3 of the License,
7 # or (at your option) any later version.
9 # GNUnet is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # SPDX-License-Identifier: AGPL3.0-or-later
19 # Process this file with autoconf to produce a configure script.
23 # Checks for programs.
24 AC_INIT([gnunet], [0.11.2], [bug-gnunet@gnu.org])
25 AC_CONFIG_AUX_DIR([build-aux])
31 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
32 AC_CONFIG_HEADERS([gnunet_config.h])
33 AH_TOP([#define _GNU_SOURCE 1])
34 AC_CONFIG_MACRO_DIR([m4])
44 LT_INIT([disable-static dlopen win32-dll])
52 CFLAGS="-Wall $CFLAGS"
53 # use '-fno-strict-aliasing', but only if the compiler can take it
54 if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
56 CFLAGS="-fno-strict-aliasing $CFLAGS"
59 # Use Linux interface name unless the OS has a different preference
60 DEFAULT_INTERFACE="\"eth0\""
62 funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo getaddrinfo_a"
64 # Srcdir in a form that native compiler understands (i.e. DOS path on W32)
67 OLD_LDFLAGS="$LDFLAGS"
68 LDFLAGS="$LDFLAGS -Wl,--unresolved-symbols=report-all"
72 *darwin* | *rhapsody* | *macosx*)
73 AC_DEFINE_UNQUOTED(DARWIN,1,[This is an Apple Darwin system])
74 CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS"
75 CFLAGS="-fno-common $CFLAGS"
76 LDFLAGS="$OLD_LDFLAGS"
77 AC_MSG_WARN([WARNING: The VPN application cannot be compiled on your OS])
78 AC_CHECK_LIB(intl, gettext)
80 DEFAULT_INTERFACE="\"en0\""
86 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
94 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
95 AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
96 CFLAGS="-D_THREAD_SAFE $CFLAGS"
97 build_target="freebsd"
103 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
104 AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
105 LIBS=`echo $LIBS | sed -e "s/-ldl//"`
106 build_target="openbsd"
112 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
113 AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
119 AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
120 AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
121 AC_CHECK_LIB(resolv, res_init)
122 AC_CHECK_LIB(rt, nanosleep)
123 build_target="solaris"
129 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
130 CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
137 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
138 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
139 AC_CHECK_LIB(intl, gettext)
140 CFLAGS="-mms-bitfields $CFLAGS"
141 build_target="cygwin"
148 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
149 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
150 AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
151 AC_CHECK_LIB(intl, gettext)
152 LDFLAGS="$LDFLAGS -Wl,--export-all-symbols"
153 LIBS="$LIBS -lws2_32 -lplibc -lgnurx -lole32"
154 CFLAGS="-mms-bitfields $CFLAGS"
155 CPPFLAGS="-D_WIN32_WINNT=0x0501 -DHAVE_STAT64=1 -D__USE_MINGW_ANSI_STDIO=1 $CPPFLAGS"
162 native_srcdir=$(cd $srcdir; pwd -W)
165 AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system])
170 AC_MSG_RESULT(Unrecognised OS $host_os)
171 AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
175 AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface])
176 AC_SUBST(DEFAULT_INTERFACE)
178 # Disable TCP-based IPC on systems that support UNIX domain
179 # sockets in default configuratin:
183 AC_MSG_CHECKING([for build target])
184 AM_CONDITIONAL(DARWIN, test "$build_target" = "darwin")
185 AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin")
186 AM_CONDITIONAL(MINGW, test "$build_target" = "mingw")
187 AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
188 AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
189 AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
190 AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
191 AM_CONDITIONAL(GNU, test "$build_target" = "gnu")
193 AC_MSG_RESULT([$build_target])
194 AC_SUBST(build_target)
195 AM_CONDITIONAL([am__fastdepOBJC], false)
196 AC_UNALIGNED_64_ACCESS
198 # some other checks for standard libs
199 AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
200 AC_SEARCH_LIBS([memrchr], [],
201 AC_DEFINE(HAVE_MEMRCHR,1,[memrchr supported]), [])
202 AC_CHECK_LIB(socket, socket)
204 AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
206 AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false)
207 AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY)
209 AC_CHECK_PROG(VAR_SSH_BINARY, ssh, true, false)
210 AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY)
211 AM_CONDITIONAL(HAVE_SSH_KEY, ssh -D 12345 -o "BatchMode yes" -o "UserKnownHostsFile /tmp/gnunet_test_cosks_ssh_garbage" -o "StrictHostKeyChecking no" 127.0.0.1 echo -n)
212 rm -f /tmp/gnunet_test_cosks_ssh_garbage
214 # autotools' m4 for python has no maximum version!
215 # python3.4 - python3.7 for tests
216 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.4 python3.5 python3.6 python3.7 python])
217 AM_PATH_PYTHON([3.4],, [:])
219 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
222 AC_PATH_PROG( PERL, perl, ,
223 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
226 # iptables is a soft requirement to run tests
227 AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false)
229 if test x"$VAR_IPTABLES_BINARY" = x"false"
231 if test -x "/sbin/iptables"
233 VAR_IPTABLES_BINARY="/sbin/iptables"
234 elif test -x "/usr/sbin/iptables"
236 VAR_IPTABLES_BINARY="/usr/sbin/iptables"
240 if test x"$VAR_IPTABLES_BINARY" != x"false"
242 AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables])
244 AC_MSG_WARN([warning: 'iptables' not found.])
247 # ip6tables is a soft requirement for some features
248 AC_PATH_TARGET_TOOL(VAR_IP6TABLES_BINARY, ip6tables, false)
250 if test x"$VAR_IP6TABLES_BINARY" = x"false"
252 if test -x "/sbin/ip6tables"
254 VAR_IP6TABLES_BINARY="/sbin/ip6tables"
255 elif test -x "/usr/sbin/ip6tables"
257 VAR_IP6TABLES_BINARY="/usr/sbin/ip6tables"
261 if test x"$VAR_IP6TABLES_BINARY" != x"false"
263 AC_DEFINE_UNQUOTED([IP6TABLES], "$VAR_IP6TABLES_BINARY", [Path to ip6tables])
265 AC_MSG_WARN([warning: 'ip6tables' not found.])
268 # ip is a soft requirement for some features
269 AC_PATH_TARGET_TOOL(VAR_IP_BINARY, ip, false)
271 if test x"$VAR_IP_BINARY" = x"false"
273 if test -x "/sbin/ip"
275 VAR_IP_BINARY="/sbin/ip"
276 elif test -x "/usr/sbin/ip"
278 VAR_IP_BINARY="/usr/sbin/ip"
282 if test x"$VAR_IP_BINARY" != x"false"
284 AC_DEFINE_UNQUOTED([PATH_TO_IP], "$VAR_IP_BINARY", [Path to ip])
286 AC_MSG_WARN([warning: 'ip' not found.])
290 AC_PATH_TARGET_TOOL(VAR_IFCONFIG_BINARY, ifconfig, false)
292 AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false)
293 if test x"$VAR_IFCONFIG_BINARY" = x"false"
295 if test -x "/sbin/ifconfig"
297 VAR_IFCONFIG_BINARY="/sbin/ifconfig"
298 elif test -x "/usr/sbin/ifconfig"
300 VAR_IFCONFIG_BINARY="/usr/sbin/ifconfig"
303 if test x"$VAR_IFCONFIG_BINARY" != x"false"
305 AC_DEFINE_UNQUOTED([IFCONFIG], "$VAR_IFCONFIG_BINARY", [Path to ifconfig])
307 AC_MSG_WARN(['ifconfig' not found.])
311 AC_PATH_TARGET_TOOL(VAR_SYSCTL_BINARY, sysctl, false)
313 AC_CHECK_PROG(VAR_SYSCTL_BINARY, sysctl, true, false)
314 AS_IF([test x"$VAR_SYSCTL_BINARY" = x"false"],
315 [AS_IF([test -x "/sbin/sysctl"],
316 [VAR_SYSCTL_BINARY="/sbin/sysctl"],
317 [AS_IF([test -x "/usr/sbin/sysctl"],
318 [VAR_SYSCTL_BINARY="/usr/sbin/sysctl"])])])
319 AS_IF([test x"$VAR_SYSCTL_BINARY" != x"false"],
320 [AC_DEFINE_UNQUOTED([SYSCTL], "$VAR_SYSCTL_BINARY", [Path to sysctl])],
321 [AC_MSG_WARN(['sysctl' not found.])])
323 # miniupnpc / upnpc binary is a soft runtime requirement
324 AC_PATH_TARGET_TOOL(VAR_UPNPC_BINARY, upnpc, false)
326 if test x"$VAR_UPNPC_BINARY" != x"false"
328 AC_DEFINE_UNQUOTED([UPNPC], "$VAR_UPNPC_BINARY", [Path to upnpc binary])
330 AC_MSG_WARN([warning: 'upnpc' binary not found.])
333 AC_CHECK_MEMBER(struct tm.tm_gmtoff,
334 [AC_DEFINE(HAVE_TM_GMTOFF, 1,
335 [Define if struct tm has the tm_gmtoff member.])],
339 AC_CHECK_DECLS([_stati64])
341 # 'save' libs; only those libs found so far will be
342 # linked against _everywhere_. For the others, we
343 # will be more selective!
347 AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])])
348 AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1])
351 # tests only run on Windows
352 if test "x$build_target" = "xmingw"
354 AC_CHECK_LIB(plibc, plibc_init, [], [AC_MSG_ERROR([GNUnet requires PlibC on Windows])])
355 AC_CHECK_LIB(gnurx, regexec, [], [AC_MSG_ERROR([GNUnet requires libgnurx on Windows])])
361 NEED_LIBGCRYPT_VERSION=1.6.0
364 AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", gcrypt=1)
365 AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include <gcrypt.h>]])
371 *** You need libgcrypt to build this program.
372 ** This library is for example available at
373 *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
374 *** (at least version $NEED_LIBGCRYPT_VERSION (API $NEED_LIBGCRYPT_API)
378 AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version])
380 AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]])
384 # should the build process be building the documentation?
385 AC_MSG_CHECKING(whether to build documentation)
386 AC_ARG_ENABLE([documentation],
387 [AS_HELP_STRING([--disable-documentation], [do not build the documentation])],
388 [documentation=${enableval}],
390 AC_MSG_RESULT($documentation)
391 if test "x$documentation" = "xyes"
393 AM_CONDITIONAL([DOCUMENTATION],true)
394 AC_DEFINE([DOCUMENTATION],[1],[Building the documentation])
396 AM_CONDITIONAL([DOCUMENTATION],false)
397 AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation])
400 # FIXME: Something is wrong about this in the output of ./configure runs
401 AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation)
402 AC_ARG_ENABLE([texi2mdoc-generation],
403 [AS_HELP_STRING([--enable-texi2mdoc-generation], [include generated texi2mdoc output in installation])],
404 [texi2mdoc_generation=${enableval}],
405 [texi2mdoc_generation=no])
406 AC_MSG_RESULT($texi2mdoc_generation)
407 if test "x$texi2mdoc_generation" = "xyes"
409 if test "$texi2mdoc" = 0
411 AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.])
412 AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System])
413 AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/])
415 AM_CONDITIONAL([TEXI2MDOC_GENERATION],true)
416 AC_DEFINE([TEXI2MDOC_GENERATION],[1],[Building section 7 mdoc output])
419 AM_CONDITIONAL([TEXI2MDOC_GENERATION],false)
420 AC_DEFINE([TEXI2MDOC_GENERATION],[0],[Not building section 7 mdoc output])
423 # should the build process be building only the documentation?
424 AC_MSG_CHECKING(whether to build only documentation)
425 AC_ARG_ENABLE([documentation-only],
426 [AS_HELP_STRING([--enable-documentation-only], [build only the documentation])],
427 [documentation_only=${enableval}],
428 [documentation_only=no])
429 AC_MSG_RESULT($documentation_only)
430 if test "x$documentation_only" = "xyes"
432 AM_CONDITIONAL([DOCUMENTATION_ONLY],true)
433 AC_DEFINE([DOCUMENTATION_ONLY],[1],[Building only the documentation])
435 AM_CONDITIONAL([DOCUMENTATION_ONLY],false)
436 AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation])
439 # should the build process be including the manpages? (default: yes)
440 AC_MSG_CHECKING(whether to include man pages)
441 AC_ARG_ENABLE([include-manpages],
442 [AS_HELP_STRING([--disable-include-manpages], [Do not include the man pages in build and installation])],
443 [include_manpages=${enableval}],
444 [include_manpages=yes])
445 AC_MSG_RESULT($include_manpages)
446 if test "x$include_manpages" = "xyes"
448 AM_CONDITIONAL([INCLUDE_MANPAGES],true)
449 AC_DEFINE([INCLUDE_MANPAGES],[1],[Including the man pages in the build and installation])
451 AM_CONDITIONAL([INCLUDE_MANPAGES],false)
452 AC_DEFINE([INCLUDE_MANPAGES],[0],[Not including the man pages in the build and installation])
455 # Adam shostack suggests the following for Windows:
456 # -D_FORTIFY_SOURCE=2 -fstack-protector-all
457 AC_ARG_ENABLE(gcc-hardening,
458 AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
459 [if test x$enableval = xyes; then
460 CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
461 CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
462 CFLAGS="$CFLAGS --param ssp-buffer-size=1"
463 LDFLAGS="$LDFLAGS -pie"
466 # Linker hardening options
467 # Currently these options are ELF specific - you can't use this with MacOSX
468 AC_ARG_ENABLE(linker-hardening,
469 AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
470 [if test x$enableval = xyes; then
471 LDFLAGS="$LDFLAGS -z relro -z now"
475 AC_ARG_ENABLE(sanitizer,
476 AS_HELP_STRING(--enable-sanitizer, enable Address Sanitizer and Undefined Behavior Sanitizer),
477 [if test x$enableval = xyes; then
478 LDFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer"
482 extra_logging=GNUNET_NO
483 AC_ARG_ENABLE([logging],
484 AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
485 [AS_IF([test "x$enableval" = "xyes"], [],
486 [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])],
487 [test "x$enableval" = "xverbose"], [extra_logging=GNUNET_YES]
488 [test "x$enableval" = "xveryverbose"], [extra_logging=\(GNUNET_YES+1\)])
490 AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
492 # should memory poisoning be enabled?
493 AC_MSG_CHECKING(whether to poison freed memory)
494 AC_ARG_ENABLE([poisoning],
495 [AS_HELP_STRING([--enable-poisoning], [enable poisoning of freed memory (good for debugging)])],
496 [enable_poisoning=${enableval}],
498 if test "x$extra_logging" != "xGNUNET_NO"; then
499 enable_poisoning="defaults to yes (extra logging is enabled)"
504 AC_MSG_RESULT($enable_poisoning)
505 if test ! "x$enable_poisoning" = "xno"; then
510 AC_DEFINE_UNQUOTED([ENABLE_POISONING],[$enable_poisoning],[1 if freed memory should be poisoned, 0 otherwise])
512 if test $build = $target
514 AC_MSG_CHECKING([for working HMAC])
516 LIBS="$LIBS $LIBGCRYPT_LIBS"
517 CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
519 [AC_LANG_PROGRAM([#include <gcrypt.h>
520 #include <stdio.h>], [[
523 unsigned char data[] = { 0xbf, 0x16, 0x6e, 0x46, 0x3a, 0x6c, 0xf3, 0x93, 0xa7, 0x72,
524 0x11, 0xa1, 0xdc, 0x0b, 0x07, 0xdb, 0x1a, 0x5e, 0xd9, 0xb9, 0x81, 0xbe,
525 0xea, 0xe4, 0x31, 0x5f, 0x24, 0xff, 0xfe, 0x50, 0x8a, 0xde };
526 unsigned char key[] = { 0xfc, 0x62, 0x76, 0x35 };
527 unsigned char result[] = {0xa2, 0xb, 0x1, 0xd9, 0xc0, 0x8b, 0x5a, 0x12, 0x80,
528 0xd5, 0x50, 0x12, 0x8e, 0xd0, 0x5b, 0xb6, 0x5c, 0x87, 0x24, 0xe2, 0xd0,
529 0xd2, 0xaf, 0x63, 0xae, 0xd1, 0xd6, 0x64, 0x14, 0xe3, 0x6e, 0x61, 0x5b,
530 0xd, 0xba, 0x17, 0x7d, 0xd3, 0x10, 0xb1, 0x37, 0x41, 0x91, 0x7d, 0xeb,
531 0x1, 0x4d, 0x71, 0xe8, 0x59, 0x71, 0x42, 0x8e, 0xd6, 0xf3, 0x29, 0x3b,
532 0x90, 0xf2, 0xd1, 0xaf, 0x65, 0x1e, 0xb3};
534 if (!gcry_check_version (GCRYPT_VERSION))
536 fprintf (stderr, "Version mismatch %s <-> %s \n", gcry_check_version (NULL), GCRYPT_VERSION);
540 gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
541 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
543 if (gcry_md_open(&mac, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC) != GPG_ERR_NO_ERROR)
545 fprintf (stderr, "gcry_md_open error\n");
549 gcry_md_setkey (mac, key, sizeof (key));
550 gcry_md_write (mac, data, sizeof (data));
552 if (memcmp(gcry_md_read (mac, 0), result, gcry_md_get_algo_dlen (gcry_md_get_algo (mac))) != 0)
554 fprintf (stderr, "memcmp error\n");
562 [AC_MSG_RESULT([yes])],
567 AC_MSG_FAILURE([HMAC test vector does not match. This is a known problem with libgcrypt 1.2.2 on Windows and fixed in 1.4.6.])
571 AC_MSG_FAILURE([HMAC test failed])
575 AC_MSG_FAILURE([libgcrypt header version does not match library version])
578 [AC_MSG_RESULT([cross compiling, test skipped])])
580 fi # $build = $target
582 # check for bluetooth library
584 AC_CHECK_LIB(bluetooth, ba2str,[AC_CHECK_HEADER([bluetooth/bluetooth.h],bluetooth=1)])
585 if test "$build_target" = "mingw"
589 AM_CONDITIONAL(HAVE_LIBBLUETOOTH, [test "$bluetooth" = 1])
590 if test "$bluetooth" = 1
592 AC_DEFINE([HAVE_LIBBLUETOOTH],[1],[Have bluetooth library])
594 AC_DEFINE([HAVE_LIBBLUETOOTH],[0],[Lacking bluetooth library])
597 # check for zbar library
599 AC_MSG_CHECKING(for libzbar)
601 [ --with-zbar=PFX base of libzbar installation],
602 [AC_MSG_RESULT([$with_zbar])
607 AC_CHECK_HEADERS(zbar.h,
608 AC_CHECK_LIB([zbar], [zbar_processor_create],
612 LDFLAGS="-L$with_zbar/lib $LDFLAGS"
613 CPPFLAGS="-I$with_zbar/include $CPPFLAGS"
614 AC_CHECK_HEADERS(zbar.h,
615 AC_CHECK_LIB([zbar], [zbar_processor_create],
616 EXT_LIB_PATH="-L$with_zbar/lib $EXT_LIB_PATH"
621 [AC_MSG_RESULT([--with-zbar not specified])
622 AC_CHECK_HEADERS(zbar.h,
623 AC_CHECK_LIB([zbar], [zbar_processor_create],
625 AM_CONDITIONAL(HAVE_ZBAR, [test "$zbar" = 1])
626 AS_IF([test "x$zbar" = x1],
627 [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])],
628 [AC_DEFINE([HAVE_ZBAR],[0],[Lacking zbar library])])
630 # check for jansson library
632 AC_MSG_CHECKING(for libjansson)
634 [ --with-jansson=PFX base of libjansson installation],
635 [AC_MSG_RESULT([$with_jansson])
636 case $with_jansson in
640 AC_CHECK_HEADERS(jansson.h,
641 AC_CHECK_LIB([jansson], [json_loads],
645 LDFLAGS="-L$with_jansson/lib $LDFLAGS"
646 CPPFLAGS="-I$with_jansson/include $CPPFLAGS"
647 AC_CHECK_HEADERS(jansson.h,
648 AC_CHECK_LIB([jansson], [json_loads],
649 EXT_LIB_PATH="-L$with_jansson/lib $EXT_LIB_PATH"
654 [AC_MSG_RESULT([--with-jansson not specified])
655 AC_CHECK_HEADERS(jansson.h,
656 AC_CHECK_LIB([jansson], [json_loads],
658 AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1])
659 AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1])
660 AS_IF([test "x$jansson" = x1],
661 [AC_DEFINE([HAVE_JANSSON],[1],[Have jansson library])],
662 [AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library])])
665 # check for libpulse(audio) library
667 AC_CHECK_LIB(pulse,pa_stream_peek,
668 [AC_CHECK_HEADER([pulse/simple.h],pulse=1)])
669 AS_IF([test "$build_target" = "mingw"],
671 AS_IF([test "$pulse" = 1],
672 [AC_DEFINE([HAVE_PULSE],[1],[Have libpulse(audio) library])])
674 # check for libopus(audio) library
676 AC_CHECK_LIB(opus,opus_decode_float,
677 [AC_CHECK_HEADER([opus/opus.h],
678 [AC_CHECK_DECL([OPUS_SET_GAIN],[opus=1],[],[[#include <opus/opus.h>]]
682 AS_IF([test "x$opus" = x1],
683 [AC_DEFINE([HAVE_OPUS],[1],[Have libopus library])])
686 AC_CHECK_LIB(ogg, ogg_stream_flush_fill,
687 [AC_CHECK_HEADERS([ogg/ogg.h],
688 AM_CONDITIONAL(HAVE_OGG, true)
690 AC_DEFINE(HAVE_OGG,1,[Have ogg]),
691 AM_CONDITIONAL(HAVE_OGG, false)
693 AC_DEFINE(HAVE_OGG,0,[lacking ogg]))],
694 AM_CONDITIONAL(HAVE_OGG, false)
698 PKG_CHECK_MODULES([GLIB],
700 [# check for pbc library
702 AC_CHECK_HEADER([pbc/pbc.h],pbc=1)
703 AC_CHECK_HEADER([gabe.h],abe=1)
704 AM_CONDITIONAL(HAVE_PBC, [test "x$pbc" = x1])
705 AM_CONDITIONAL(HAVE_ABE, [test "x$abe" = x1])
706 AS_IF([test "x$pbc" = x1],
707 [AC_DEFINE([HAVE_PBC],[1],[Have pbc library])],
708 [AC_DEFINE([HAVE_PBC],[0],[Lacking pbc library])])
709 AS_IF([test "x$abe" = x1],
710 [AC_DEFINE([HAVE_ABE],[1],[Have ABE library])],
711 [AC_DEFINE([HAVE_ABE],[0],[Lacking ABE library])])],
713 AM_CONDITIONAL(HAVE_PBC, [false])
714 AM_CONDITIONAL(HAVE_ABE, [false])
715 AC_DEFINE([HAVE_PBC],[0],[Lacking glib library])])
720 [glib-2.0 gobject-2.0 gstreamer-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
725 if test "x$pulse" != "x1" -o "x$opus" != "x1" -o "x$ogg" != "x1"
727 if test "x$gst" != "x1"
729 conversation_backend=none
730 AM_CONDITIONAL(BUILD_PULSE_HELPERS, false)
731 AM_CONDITIONAL(BUILD_GST_HELPERS, false)
732 AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false)
734 conversation_backend=gst
735 AM_CONDITIONAL(BUILD_PULSE_HELPERS, false)
736 AM_CONDITIONAL(BUILD_GST_HELPERS, true)
737 AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false)
741 conversation_backend=pulse
742 AM_CONDITIONAL(BUILD_PULSE_HELPERS, true)
743 AM_CONDITIONAL(BUILD_GST_HELPERS, false)
744 AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false)
748 LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
751 AM_CONDITIONAL(HAVE_LIBGNURL, true)
752 AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl])
754 AM_CONDITIONAL(HAVE_LIBGNURL, false)
755 AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl])
758 SAVE_CPPFLAGS=$CPPFLAGS
759 CPPFLAGS="$LIBGNURL_CPPFLAGS $LIBCURL_CPPFLAGS $CPPFLAGS"
760 LIBS="$LIBGNURL $LIBCURL $LIBS"
763 LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false])
764 if test "x$curl" = xtrue
767 AC_CHECK_HEADERS([curl/curl.h],
768 AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]),
770 AC_CHECK_HEADERS([gnurl/curl.h],
771 AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],,[[#include <gnurl/curl.h>]]))
772 # need libcurl-gnutls.so, everything else is not acceptable
773 AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false])
774 # cURL must support CURLINFO_TLS_SESSION, version >= 7.34
777 # Check for curl/curl.h and gnurl/curl.h so we can use #ifdef
778 # HAVE_CURL_CURL_H later (the above LIBCURL_CHECK_CONFIG accepted
779 # *either* header set).
780 AC_CHECK_HEADERS([curl/curl.h],,
782 AC_CHECK_HEADERS([gnurl/curl.h],,
787 if test x$curl = xfalse
789 AM_CONDITIONAL(HAVE_LIBCURL, false)
792 AC_MSG_WARN([ERROR: GNUnet requires libcurl-gnutls or gnurl >= 7.34])
795 AM_CONDITIONAL(HAVE_LIBCURL, true)
796 AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL])
799 AC_SEARCH_LIBS(__atomic_load_8, atomic, [have_libatomic=1 AC_DEFINE(HAVE_LIBATOMIC,1,[external libatomic])])
800 AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1])
802 # restore LIBS & CPPFLAGS
804 CPPFLAGS=$SAVE_CPPFLAGS
806 AC_CHECK_HEADERS([glpk.h],[glpk=true],[glpk=false])
807 # GLPK must support glpk_init_env, version >= 4.43
808 AC_CHECK_LIB([glpk],[glp_init_env],,[glpk=false])
809 # GLPK must support atm MLP presolving, version >= 4.32
810 AC_CHECK_MEMBERS(glp_iocp.presolve,,[glpk=false],[[#include <glpk.h>]])
811 if test "x$glpk" = xfalse
813 AM_CONDITIONAL(HAVE_LIBGLPK, false)
814 AC_MSG_WARN([ERROR: GNUnet requires GLPK >= 4.32])
816 AM_CONDITIONAL(HAVE_LIBGLPK, true)
817 AC_DEFINE([HAVE_LIBGLPK],[1],[Have GLPK])
821 AC_CHECK_HEADERS([nss.h],[nss=true],[nss=false])
822 if test x$nss = xfalse
824 AM_CONDITIONAL(HAVE_GLIBCNSS, false)
825 AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin])
830 AC_CHECK_DECL([NSS_STATUS_UNAVAIL],
831 [AM_CONDITIONAL(HAVE_GLIBCNSS, true)],
832 [AM_CONDITIONAL(HAVE_GLIBCNSS, false)
833 AC_MSG_WARN([No nss header fails to define NSS_STATUS_UNAVAIl, will not build NSS plugin])],
839 # test for kvm and kstat (for CPU stats under BSD/Solaris)
840 AC_CHECK_LIB([kvm],[kvm_open])
841 AC_CHECK_LIB([kstat],[kstat_open])
844 # should the build process be restricted to the code required
845 # for GNU Taler wallets?
846 AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY)
847 AC_ARG_ENABLE([taler-wallet],
848 [AS_HELP_STRING([--enable-taler-wallet], [only compile for Taler wallet])],
849 [taler_only=${enableval}],
851 AC_MSG_RESULT($taler_only)
852 if test "x$taler_only" = "xyes"
854 AM_CONDITIONAL([TALER_ONLY],true)
855 AC_DEFINE([TALER_WALLET_ONLY],[1],[Compiling for Taler wallet])
857 AM_CONDITIONAL([TALER_ONLY],false)
858 AC_DEFINE([TALER_WALLET_ONLY],[0],[Canonical compilation])
861 # test for libextractor
863 AC_MSG_CHECKING(for libextractor)
864 AC_ARG_WITH(extractor,
865 [ --with-extractor=PFX base of libextractor installation],
866 [AC_MSG_RESULT([$with_extractor])
867 case $with_extractor in
871 AC_CHECK_HEADERS([extractor.h],
872 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
876 LDFLAGS="-L$with_extractor/lib $LDFLAGS"
877 CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
878 AC_CHECK_HEADERS([extractor.h],
879 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
880 EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
885 [AC_MSG_RESULT([--with-extractor not specified])
886 AC_CHECK_HEADERS([extractor.h],
887 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
892 if test "$extractor" != 1
894 AM_CONDITIONAL(HAVE_LIBEXTRACTOR, false)
895 AC_DEFINE([HAVE_LIBEXTRACTOR],[0],[Lacking libextractor])
897 AM_CONDITIONAL(HAVE_LIBEXTRACTOR, true)
898 AC_DEFINE([HAVE_LIBEXTRACTOR],[1],[Have libextractor])
902 if test "$taler_only" != yes
905 # Check for libltdl header (#2999)
907 AC_MSG_CHECKING(for libltdl)
909 [ --with-ltdl=PFX base of libltdl installation],
910 [AC_MSG_RESULT([$with_ltdl])
915 AC_CHECK_HEADERS(ltdl.h,
916 AC_CHECK_LIB([ltdl], [lt_dlopenext],
920 LDFLAGS="-L$with_ltdl/lib $LDFLAGS"
921 CPPFLAGS="-I$with_ltdl/include $CPPFLAGS"
922 AC_CHECK_HEADERS(ltdl.h,
923 AC_CHECK_LIB([ltdl], [lt_dlopenext],
924 EXT_LIB_PATH="-L$with_ltdl/lib $EXT_LIB_PATH"
929 [AC_MSG_RESULT([--with-ltdl not specified])
930 AC_CHECK_HEADERS(ltdl.h,
931 AC_CHECK_LIB([ltdl], [lt_dlopenext],
935 AC_MSG_RESULT([libltdl found])
937 AC_MSG_ERROR([GNUnet requires libltdl (from GNU libtool), try installing libltdl-dev])
942 # libidn and libidn2. The ideal goal is this:
943 # check for libidn2, if it doesn't exist check for libidn
944 # if both exist, prefer libidn2
945 # if none exist, fail and message that libidn or libidn2
946 # is required with a preference for libidn2.
947 # TODO: What we have right here can probably be improved.
950 AS_HELP_STRING([--with-libidn=pathname],
951 [Support IDN (needs libidn)]),
954 AS_IF([test x_$withval = x_yes],
955 [AC_CHECK_HEADERS([idna.h],
956 AC_MSG_NOTICE([Found idna.h]),
957 AC_CHECK_HEADERS([idn/idna.h],
958 AC_MSG_NOTICE([Found idn/idna.h]),
960 [AS_IF([test x_$withval != x_no],
961 [CFLAGS="$CFLAGS -I$withval/include"
962 LDFLAGS="$LDFLAGS -L$withval/lib"
963 AC_CHECK_HEADERS([idna.h],
964 AC_MSG_NOTICE([Found idna.h]),
965 [AC_MSG_NOTICE([Failed to find idna.h])
967 [my_with_libidn=0])])
971 AS_HELP_STRING([--with-libidn2=pathname],
972 [Support IDN (needs libidn2)]),
975 AS_IF([test x_$withval = x_yes],
976 [AC_CHECK_HEADERS([idn2.h],
977 AC_MSG_NOTICE([Found idn2.h]),
978 AC_CHECK_HEADERS([idn2/idn2.h],
979 AC_MSG_NOTICE([Found idn2/idn2.h]),
980 [AC_MSG_NOTICE([Failed to find idn2.h])
981 my_with_libidn2=0]))],
982 [AS_IF([test x_$withval != x_no],
983 [CFLAGS="$CFLAGS -I$withval/include"
984 LDFLAGS="$LDFLAGS -L$withval/lib"],
985 [my_with_libidn2=0])])
987 AC_MSG_CHECKING([if libidn can be used])
989 there_can_only_be_one=1
993 AS_IF([test x$my_with_libidn2 = x1],
994 [AC_MSG_NOTICE([Checking for libidn2])
996 [idn2_to_unicode_8z8z],
999 AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
1001 [Define to 1 if you have 'libidn2' (-lidn2).])],
1002 [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2"
1003 MISSING_SEP=", "])])
1004 AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1)
1005 AS_IF([test x$working_libidn2 = x0],
1006 [AS_IF([test x$my_with_libidn = x1],
1007 [AC_MSG_NOTICE([Checking for libidn])
1012 AC_DEFINE_UNQUOTED([HAVE_LIBIDN],
1014 [Define to 1 if you have 'libidn' (-lidn).])],
1015 [there_can_only_be_one=0])],
1016 [AS_IF([test x$my_with_libidn2 = x1],
1017 [there_can_only_be_one=0
1018 AC_MSG_FAILURE([* There can only be one libidn.
1019 * Provide either libidn >= 1.13
1021 * libidn2 to the configure
1024 * --with-libidn])])])])
1025 AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1)
1027 AS_IF([test "$working_libidn1" = 0 -a "$working_libidn2" = 0],
1028 [AC_MSG_ERROR([GNUnet requires libidn (or libidn2)])])
1030 AS_IF([test x$there_can_only_be_one = x0],
1031 [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])])
1034 SAVE_LDFLAGS=$LDFLAGS
1035 SAVE_CPPFLAGS=$CPPFLAGS
1037 [ --with-zlib[[=DIR]] use libz in DIR],
1038 [AS_IF([test "$withval" = "no"],
1039 [AC_MSG_ERROR([GNUnet requires zlib])],
1040 [test "$withval" != "yes"],
1043 CPPFLAGS="${CPPFLAGS} -I$withval/include"
1044 LDFLAGS="${LDFLAGS} -L$withval/lib"
1047 AC_CHECK_HEADER(zlib.h,
1049 [AC_MSG_ERROR([GNUnet requires zlib])])
1050 AC_CHECK_LIB(z, compress2,
1052 AC_DEFINE([HAVE_ZLIB], [], [Have compression library])
1053 if test "x${Z_DIR}" != "x"; then
1054 Z_CFLAGS="-I${Z_DIR}/include"
1055 Z_LIBS="-L${Z_DIR}/lib -lz"
1059 [AC_MSG_ERROR([GNUnet requires zlib])])
1063 if test "$enable_shared" = "no"
1065 AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
1079 # test for libunistring
1081 if test $HAVE_LIBUNISTRING != yes; then
1082 AC_MSG_ERROR([GNUnet requires libunistring])
1084 # under emscripten, $gl_libunistring_hexversion is undefined
1085 if test "$taler_only" != yes; then
1086 if test "x$gl_libunistring_hexversion" = "x" || test "$gl_libunistring_hexversion" -le 2305; then
1087 AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])
1090 AC_CHECK_HEADERS([unistr.h],,AC_MSG_ERROR([Compiling GNUnet requires unistr.h (from libunistring) to be installed]))
1097 # Checks for standard header files.
1101 # Check for headers that are ALWAYS required
1102 AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h],,AC_MSG_ERROR([Compiling GNUnet requires standard UNIX headers files: fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h]))
1106 # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
1107 AC_CHECK_HEADERS([stdatomic.h malloc.h malloc/malloc.h malloc/malloc_np.h langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h unistd.h kstat.h sys/sysinfo.h kvm.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h byteswap.h])
1109 # FreeBSD requires something more funky for netinet/in_systm.h and netinet/ip.h...
1110 AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,,
1111 [#ifdef HAVE_SYS_TYPES_H
1112 #include <sys/types.h>
1114 #ifdef HAVE_NETINET_IN_SYSTM_H
1115 #include <netinet/in_systm.h>
1117 #ifdef HAVE_NETINET_IN_H
1118 #include <netinet/in.h>
1122 SAVE_LDFLAGS=$LDFLAGS
1123 SAVE_CPPFLAGS=$CPPFLAGS
1127 AC_MSG_CHECKING(for SQLite)
1129 [ --with-sqlite=PFX base of SQLite installation],
1130 [AC_MSG_RESULT("$with_sqlite")
1131 case $with_sqlite in
1135 AC_CHECK_HEADERS(sqlite3.h,
1139 LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
1140 CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
1141 AC_CHECK_HEADERS(sqlite3.h,
1142 EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH"
1143 SQLITE_LDFLAGS="-L$with_sqlite/lib"
1144 SQLITE_CPPFLAGS="-I$with_sqlite/include"
1146 LDFLAGS=$SAVE_LDFLAGS
1147 CPPFLAGS=$SAVE_CPPFLAGS
1151 [AC_MSG_RESULT([--with-sqlite not specified])
1152 AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
1153 AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue)
1154 AC_SUBST(SQLITE_CPPFLAGS)
1155 AC_SUBST(SQLITE_LDFLAGS)
1157 LDFLAGS=$SAVE_LDFLAGS
1158 CPPFLAGS=$SAVE_CPPFLAGS
1162 # even running the check for postgres breaks emscripten ...
1163 AS_IF([test "$taler_only" != yes],
1164 [AX_LIB_POSTGRESQL([9.5],
1165 [CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
1166 AC_CHECK_HEADERS([libpq-fe.h],
1169 [AC_MSG_RESULT([no postgres])])])
1170 AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
1173 LDFLAGS=$SAVE_LDFLAGS
1174 CPPFLAGS=$SAVE_CPPFLAGS
1177 AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
1178 AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
1180 if test "$build_target" = "mingw"
1182 CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
1188 SAVE_LDFLAGS=$LDFLAGS
1189 SAVE_CPPFLAGS=$CPPFLAGS
1190 AC_MSG_CHECKING(for mysql)
1192 [ --with-mysql=PFX base of MySQL installation],
1193 [AC_MSG_RESULT([$with_mysql])
1198 AC_CHECK_HEADERS(mysql/mysql.h,
1199 AC_CHECK_LIB(mysqlclient, mysql_init,
1201 mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
1204 LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
1205 CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
1206 AC_CHECK_HEADERS(mysql/mysql.h,
1207 AC_CHECK_LIB(mysqlclient, mysql_init,
1208 MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql"
1209 MYSQL_CPPFLAGS="-I$with_mysql/include"
1211 mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
1215 [AC_MSG_RESULT([--with-mysql not specified])
1216 if test -d "/usr/lib64/mysql"; then
1217 MYSQL_LIBDIR="/usr/lib64/mysql"
1218 elif test -d "/usr/lib/mysql"; then
1219 MYSQL_LIBDIR="/usr/lib/mysql"
1221 MYSQL_LIBDIR="/usr/lib"
1223 LDFLAGS="-L$MYSQL_LIBDIR $LDFLAGS $ZLIBS"
1224 AC_CHECK_LIB(mysqlclient, mysql_init,
1225 [AC_CHECK_HEADERS(mysql/mysql.h,
1226 MYSQL_LDFLAGS="-L$MYSQL_LIBDIR"
1229 , [], [$CYGWIN_MYSQL_MAGIC])])
1232 AC_SUBST(MYSQL_LDFLAGS)
1233 AC_SUBST(MYSQL_CPPFLAGS)
1235 # additional version check for mysql
1236 AC_ARG_ENABLE(mysql-version-check, [ --disable-mysql-version-check do not check MySQL version],, enable_mysql_version_check=yes)
1237 if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
1239 AC_MSG_CHECKING(mysql version)
1240 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1241 [[$CYGWIN_MYSQL_MAGIC
1242 #include <mysql/mysql.h>]],
1244 #if (MYSQL_VERSION_ID < 40100)
1245 #error needs at least version >= 4.1
1247 int main () { return 0; }
1249 ],mysql=true,mysql=false)
1250 if test "$mysql" = "false"
1253 AC_MSG_RESULT([fail, >= 4.1 required])
1258 AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
1259 AM_CONDITIONAL(HAVE_MYSQLE, false)
1262 LDFLAGS=$SAVE_LDFLAGS
1263 CPPFLAGS=$SAVE_CPPFLAGS
1265 if test "$sqlite" = 0 -a "$mysql" = 0
1267 AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
1272 AC_MSG_CHECKING([for libmicrohttpd])
1273 AC_ARG_WITH(microhttpd,
1274 [ --with-microhttpd=PFX base of libmicrohttpd installation],
1275 [AC_MSG_RESULT([$with_microhttpd])
1276 case $with_microhttpd in
1280 AC_CHECK_HEADERS([microhttpd.h],
1281 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
1282 AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
1283 [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52])
1284 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
1285 #include "$native_srcdir/src/include/platform.h"
1286 #include <microhttpd.h>
1287 #if (MHD_VERSION < 0x0094200)
1288 #error needs at least version 0.9.42
1290 int main () { return 0; }
1294 [AC_MSG_RESULT(failed)])]),
1295 [],[#include "$native_srcdir/src/include/platform.h"
1296 #include <microhttpd.h>]),,
1297 [#include "$native_srcdir/src/include/platform.h"])
1300 LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
1301 CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
1302 AC_CHECK_HEADERS(microhttpd.h,
1303 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
1304 AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
1305 EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
1306 [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52])
1307 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
1308 #include "$native_srcdir/src/include/platform.h"
1309 #include <microhttpd.h>
1310 #if (MHD_VERSION < 0x0094200)
1311 #error needs at least version 0.9.42
1313 int main () { return 0; }
1317 [AC_MSG_RESULT(failed)])]),
1318 [],[#include "$native_srcdir/src/include/platform.h"
1319 #include <microhttpd.h>]),,
1320 [#include "$native_srcdir/src/include/platform.h"])
1324 [AC_MSG_RESULT([--with-microhttpd not specified])
1325 AC_CHECK_HEADERS([microhttpd.h],
1326 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
1327 AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
1328 [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52])
1329 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
1330 #include "$native_srcdir/src/include/platform.h"
1331 #include <microhttpd.h>
1332 #if (MHD_VERSION < 0x0094200)
1333 #error needs at least version 0.9.52
1338 [AC_MSG_RESULT(failed)])]),
1339 [],[#include "$native_srcdir/src/include/platform.h"
1340 #include <microhttpd.h>]),,
1341 [#include "$native_srcdir/src/include/platform.h"])])
1342 AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
1343 AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
1345 AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1])
1351 AM_GNU_GETTEXT([external])
1352 AM_GNU_GETTEXT_VERSION([0.18.1])
1354 # Checks for standard typedefs, structures, and compiler characteristics.
1363 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
1364 [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?])
1368 #include <sys/types.h>
1369 #include <sys/socket.h>
1370 #include <netinet/in.h>
1373 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1374 [ AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN, 1, [Do we have sockaddr_un.sun_len?])
1378 #include <sys/types.h>
1379 #include <sys/socket.h>
1385 # Checks for library functions.
1386 AC_FUNC_CLOSEDIR_VOID
1388 AC_PROG_GCC_TRADITIONAL
1390 AC_FUNC_SELECT_ARGTYPES
1400 AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid $funcstocheck getifaddrs freeifaddrs getresgid mallinfo malloc_size malloc_usable_size getrusage random srandom stat statfs statvfs wait4])
1406 GN_LIBINTL="$LTLIBINTL"
1407 AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval)
1408 AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
1409 if test x$enable_framework_build = xyes
1411 AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
1412 GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
1413 GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
1414 AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL])
1417 GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
1418 GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
1420 AC_SUBST(GN_LIB_LDFLAGS)
1421 AC_SUBST(GN_PLUGIN_LDFLAGS)
1422 AC_SUBST(GN_INTLINCL)
1423 AC_SUBST(GN_LIBINTL)
1428 AC_SUBST(EXT_LIB_PATH)
1433 AC_SUBST(EXT_LIB_PATH)
1435 DATAROOTDIR=$datarootdir
1436 AC_SUBST(DATAROOTDIR)
1439 # TODO: do we need to change anything for "doas" on openbsd?
1440 AC_MSG_CHECKING(for sudo)
1442 [ --with-sudo=PATH path to sudo binary (or just yes)],
1443 [AC_MSG_RESULT("$with_sudo")
1452 SUDO_BINARY=$with_sudo
1456 [AC_MSG_RESULT([no])])
1457 AC_SUBST(SUDO_BINARY)
1458 AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /])
1461 # test for gnunetdns group name
1462 GNUNETDNS_GROUP=gnunetdns
1463 AC_MSG_CHECKING(for gnunetdns group name)
1464 AC_ARG_WITH(gnunetdns,
1465 [ --with-gnunetdns=GRPNAME name for gnunetdns group],
1466 [AC_MSG_RESULT("$with_gnunetdns")
1467 case $with_gnunetdns in
1469 GNUNETDNS_GROUP=gnunet
1472 GNUNETDNS_GROUP=gnunetdns
1475 GNUNETDNS_GROUP=$with_gnunetdns
1479 [AC_MSG_RESULT([gnunetdns])])
1480 AC_SUBST(GNUNETDNS_GROUP)
1487 AC_MSG_CHECKING(for gnutls)
1489 [ --with-gnutls=PFX base of gnutls installation],
1490 [AC_MSG_RESULT([$with_gnutls])
1491 case $with_gnutls in
1495 AC_CHECK_HEADERS([gnutls/abstract.h],
1496 AC_CHECK_LIB([gnutls], [gnutls_priority_set],
1498 AC_CHECK_HEADERS([gnutls/dane.h],
1499 AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
1503 LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
1504 CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
1505 AC_CHECK_HEADERS([gnutls/abstract.h],
1506 AC_CHECK_LIB([gnutls], [gnutls_priority_set],
1507 EXT_LIB_PATH="-L$with_gnutls/lib $EXT_LIB_PATH"
1509 AC_CHECK_HEADERS([gnutls/dane.h],
1510 AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
1515 [AC_MSG_RESULT([--with-gnutls not specified])
1516 AC_CHECK_HEADERS([gnutls/abstract.h],
1517 AC_CHECK_LIB([gnutls], [gnutls_priority_set],
1519 AC_CHECK_HEADERS([gnutls/dane.h],
1520 AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
1523 AM_CONDITIONAL(HAVE_GNUTLS, test x$gnutls = xtrue)
1524 AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have GnuTLS])
1525 AM_CONDITIONAL(HAVE_GNUTLS_DANE, test x$gnutls_dane = x1)
1526 AC_DEFINE_UNQUOTED([HAVE_GNUTLS_DANE], $gnutls_dane, [We have GnuTLS with DANE support])
1530 # Test if we are building for superMUC
1531 AC_MSG_CHECKING(if GNUnet is being configured to run on the SuperMUC)
1532 AC_ARG_ENABLE([supermuc],
1533 [AS_HELP_STRING([--enable-supermuc],
1534 [build GNUnet with support to run on the SuperMUC (default is NO)])],
1535 [if test "x$enable_supermuc" = "xno"
1542 enable_supermuc=no])
1543 AC_MSG_RESULT($enable_SUPERMUC)
1544 AM_CONDITIONAL([ENABLE_SUPERMUC], [test "x$supermuc" = "x1"])
1545 AC_DEFINE_UNQUOTED([ENABLE_SUPERMUC], [$supermuc], [Build with support for SuperMUC])
1547 # Check if NSE has to send timestamp information to testbed logger for
1548 # generating histogram of messages received
1549 AC_MSG_CHECKING(if NSE has to send timestamp information to testbed logger)
1550 AC_ARG_ENABLE([nse-histogram],
1551 [AS_HELP_STRING([--enable-nse-histogram],
1552 [have NSE send timestamp information to testbed logger for generating
1553 histogram of received messages. NOT useful for production (default is
1555 [if test "x$enableval" = "xno"
1562 enable_nse_histogram=no])
1563 AC_MSG_RESULT($enable_nse_histogram)
1564 AM_CONDITIONAL([ENABLE_NSE_HISTOGRAM], [test "x$nse_histogram" = "x1"])
1565 AC_DEFINE_UNQUOTED([ENABLE_NSE_HISTOGRAM], [$nse_histogram],
1566 [have NSE send timestamp information to testbed logger])
1568 # should 'make check' run tests?
1569 AC_MSG_CHECKING(whether to run tests)
1570 AC_ARG_ENABLE([testruns],
1571 [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
1572 [enable_tests_run=${enableval}],
1573 [enable_tests_run=yes])
1574 AC_MSG_RESULT($enable_test_run)
1575 AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
1578 AC_MSG_CHECKING([whether to compile in benchmarks (currently for http and crypto)])
1579 AC_ARG_ENABLE([benchmark],
1580 [AS_HELP_STRING([--enable-benchmark], [enable benchmarking])],
1581 [enable_benchmark=${enableval}],
1582 [enable_benchmark=no])
1583 AC_MSG_RESULT($enable_benchmark)
1584 AS_IF([test "x$enable_benchmark" = "xyes"],
1585 [AC_DEFINE_UNQUOTED(ENABLE_BENCHMARK,1,[Benchmarks are enabled])])
1586 AM_CONDITIONAL([ENABLE_BENCHMARK], [test "x$enable_benchmark" = "xyes"])
1589 # should expensive tests be run?
1590 AC_MSG_CHECKING(whether to run expensive tests)
1591 AC_ARG_ENABLE([expensivetests],
1592 [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])],
1593 [enable_expensive=${enableval}],
1594 [enable_expensive=no])
1595 AC_MSG_RESULT($enable_expensive)
1596 AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"])
1598 # should ports be open for Java services?
1599 AC_MSG_CHECKING(whether to enable ports for gnunet-java)
1600 AC_ARG_ENABLE([javaports],
1601 [AS_HELP_STRING([--enable-javaports], [use non-zero ports for services with Java bindings (default is NO)])],
1602 [enable_java_ports=${enableval}],
1603 [enable_java_ports=no])
1604 AC_MSG_RESULT($enable_java_ports)
1605 if test "x$enable_java_ports" = "xyes"
1609 JAVAPORT="$UNIXONLY"
1613 # should benchmarks be run?
1614 AC_MSG_CHECKING(whether to run benchmarks during make check)
1615 AC_ARG_ENABLE([benchmarks],
1616 [AS_HELP_STRING([--enable-benchmarks], [enable running benchmarks during make check])],
1617 [enable_benchmarks=${enableval}],
1618 [enable_benchmarks=no])
1619 AC_MSG_RESULT($enable_benchmarks)
1620 AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"])
1622 # should gnunet-testing be compiled
1623 AC_MSG_CHECKING(wether to compile gnunet-testing)
1624 AC_ARG_ENABLE([testing],
1625 [AS_HELP_STRING([--disable-testing], [do not build gnunet-testing])],
1626 [enable_testing=${enableval}],
1627 [enable_testing=yes])
1628 AC_MSG_RESULT($enable_testing)
1629 AM_CONDITIONAL([HAVE_TESTING], [test "x$enable_testing" = "xyes"])
1631 # should experimental code be compiled (code that may not yet compile)?
1632 AC_MSG_CHECKING(whether to compile experimental code)
1633 AC_ARG_ENABLE([experimental],
1634 [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])],
1635 [enable_experimental=${enableval}],
1636 [enable_experimental=no])
1637 AC_MSG_RESULT($enable_experimental)
1638 AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
1640 # should malicious code be compiled (should only be used for testing)?
1641 AC_MSG_CHECKING(whether to compile malicious code)
1642 AC_ARG_ENABLE([malicious],
1643 [AS_HELP_STRING([--enable-malicious], [enable compiling malicious code])],
1644 [if test "x$enableval" = "xno"
1651 enable_malicious=no])
1652 AC_MSG_RESULT($enable_malicious)
1653 AM_CONDITIONAL([ENABLE_MALICIOUS], [test 1=$malicious])
1654 AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious],
1655 [enable compilation of malicious code])
1657 # should services be started on demand when needed? Some services may choose to
1658 # never start by default and it is up to the service/module developer to decide
1659 # by having "START_ON_DEMAND = NO" instead of "START_ON_DEMAND = @START_ON_DEMAND@"
1660 # in the service/module's conf.in file.
1661 # See also IMMEDIATE_START for an unconditional immediate start.
1662 START_ON_DEMAND="YES"
1663 AC_MSG_CHECKING(whether to start peer's services on demand by default)
1664 AC_ARG_ENABLE([autostart],
1665 [AS_HELP_STRING([--disable-autostart], [do not start peer's services by default])],
1666 [enable_autostart=${enableval}
1667 if test "x$enable_autostart" = "xno"
1669 START_ON_DEMAND="NO"
1672 [enable_autostart=yes])
1673 AC_MSG_RESULT($enable_autostart)
1674 #AM_CONDITIONAL([HAVE_START_ON_DEMAND], [test "x$enable_autostart" = "xyes"])
1675 AC_SUBST(START_ON_DEMAND)
1677 # should memory statistics be kept (very expensive CPU-wise!)
1678 AC_MSG_CHECKING(whether to create expensive statistics on memory use)
1679 AC_ARG_ENABLE([heapstats],
1680 [AS_HELP_STRING([--enable-heapstats], [enable expensive heap statistics])],
1681 [enable_heapstats=1],
1682 [enable_heapstats=0])
1683 AC_MSG_RESULT($enable_heapstats)
1684 AC_DEFINE_UNQUOTED([ENABLE_HEAP_STATISTICS],$enable_heapstats,[enable expensive heap statistics])
1686 # should code be enabled that works around missing OS functionality on Windows?
1687 # used for test cases
1688 if test $build_target = "mingw"
1694 [#include <ws2tcpip.h>
1696 int s = socket (0, 0, 0);])
1698 AC_DEFINE_UNQUOTED([HAVE_SOCKET],1,[Define this if socket() is available])
1700 AC_DEFINE_UNQUOTED([HAVE_SOCKET],0,[Define this if socket() is available])
1705 [#include <ws2tcpip.h>
1707 int s = select (0, NULL, NULL, NULL, NULL);])
1709 AC_DEFINE_UNQUOTED([HAVE_SELECT],1,[Define this if select() is available])
1711 AC_DEFINE_UNQUOTED([HAVE_SELECT],0,[Define this if select() is available])
1716 [#include <ws2tcpip.h>
1719 char *s = inet_ntoa (i);])
1721 AC_DEFINE_UNQUOTED([HAVE_INET_NTOA],1,[Define this if inet_ntoa() is available])
1723 AC_DEFINE_UNQUOTED([HAVE_INET_NTOA],0,[Define this if inet_ntoa() is available])
1728 [#include <ws2tcpip.h>
1730 int s = getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0);])
1732 AC_DEFINE_UNQUOTED([HAVE_GETNAMEINFO],1,[Define this if getnameinfo() is available])
1734 AC_DEFINE_UNQUOTED([HAVE_GETNAMEINFO],0,[Define this if getnameinfo() is available])
1739 [#include <ws2tcpip.h>
1741 int s = gethostname (NULL, 0);])
1743 AC_DEFINE_UNQUOTED([HAVE_GETHOSTNAME],1,[Define this if gethostname() is available])
1745 AC_DEFINE_UNQUOTED([HAVE_GETHOSTNAME],0,[Define this if gethostname() is available])
1750 [#include <ws2tcpip.h>
1752 void *s = gethostbyname (NULL);])
1754 AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME],1,[Define this if gethostbyname() is available])
1756 AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME],0,[Define this if gethostbyname() is available])
1761 [#include <ws2tcpip.h>
1763 void *s = gethostbyaddr (NULL, 0, 0);])
1765 AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYADDR],1,[Define this if gethostbyaddr() is available])
1767 AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYADDR],0,[Define this if gethostbyaddr() is available])
1772 [#include <ws2tcpip.h>
1774 int s = getaddrinfo (NULL, NULL, NULL, NULL);])
1776 AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available])
1778 AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],0,[Define this if getaddrinfo() is available])
1782 AC_MSG_CHECKING(whether to enable windows workarounds)
1783 AC_ARG_ENABLE([windows_workarounds],
1784 [AS_HELP_STRING([--enable-windows_workarounds], [enable workarounds used on Windows (only useful for test cases)])],
1785 [enable_workarounds=${enableval}],
1786 [enable_workarounds=no])
1787 AC_MSG_RESULT($enable_workarounds)
1788 if test x$enable_windows_workarounds = "xyes"
1795 AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)])
1798 AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
1799 AC_ARG_ENABLE([coverage],
1800 AS_HELP_STRING([--enable-coverage],
1801 [compile the library with code coverage support]),
1802 [use_gcov=${enableval}],
1804 AC_MSG_RESULT($use_gcov)
1805 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
1809 # TODO: git blame says this predates our switch to git. git-svn should be adjusted to simply git, or
1810 # an external script that does the job.
1811 AC_PATH_PROG(svnversioncommand, svnversion)
1812 AC_PATH_PROG(gitcommand, git)
1813 AC_MSG_CHECKING(for source being under a VCS)
1817 AC_PATH_PROG(gitcommand, git)
1818 AC_MSG_CHECKING(for source being under a VCS)
1820 AS_IF([test ! "X$gitcommand" = "X"],
1822 git_version=$(cd $srcdir ; git rev-list --full-history --all --abbrev-commit | head -n 1 2>/dev/null)
1824 AS_IF([test "X$git_version" = "X"],
1827 vcs_version="\"release\""
1830 vcs_name="yes, git-svn"
1831 vcs_version="\"git-$git_version\""
1833 AC_MSG_RESULT($vcs_name)
1835 AC_MSG_CHECKING(VCS version)
1836 AC_MSG_RESULT($vcs_version)
1837 AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version])
1842 contrib/scripts/Makefile
1843 contrib/scripts/gnunet-logread/Makefile
1846 doc/doxygen/Makefile
1847 doc/handbook/Makefile
1848 doc/tutorial/Makefile
1857 src/ats-tool/Makefile
1858 src/ats-tests/Makefile
1859 src/auction/Makefile
1862 src/cadet/cadet.conf
1865 src/consensus/Makefile
1866 src/consensus/consensus.conf
1867 src/conversation/Makefile
1868 src/conversation/conversation.conf
1870 src/datacache/Makefile
1871 src/datastore/Makefile
1872 src/datastore/datastore.conf
1878 src/fragmentation/Makefile
1883 src/gns/nss/Makefile
1884 src/gnsrecord/Makefile
1886 src/identity/Makefile
1887 src/identity/identity.conf
1888 src/credential/Makefile
1889 src/credential/credential.conf
1890 src/include/Makefile
1891 src/integration-tests/Makefile
1893 src/hostlist/Makefile
1896 src/namecache/Makefile
1897 src/namecache/namecache.conf
1898 src/namestore/Makefile
1899 src/namestore/namestore.conf
1902 src/nat-auto/Makefile
1903 src/nat-auto/nat-auto.conf
1907 src/peerinfo/Makefile
1908 src/peerinfo/peerinfo.conf
1909 src/peerinfo-tool/Makefile
1910 src/peerstore/Makefile
1911 src/peerstore/peerstore.conf
1915 src/regex/regex.conf
1916 src/revocation/Makefile
1917 src/revocation/revocation.conf
1920 src/secretsharing/Makefile
1921 src/secretsharing/secretsharing.conf
1922 src/scalarproduct/Makefile
1923 src/scalarproduct/scalarproduct.conf
1927 src/statistics/Makefile
1928 src/statistics/statistics.conf
1929 src/template/Makefile
1930 src/testbed/Makefile
1931 src/testbed/testbed.conf
1932 src/testbed-logger/Makefile
1933 src/testbed-logger/testbed-logger.conf
1934 src/testing/Makefile
1935 src/topology/Makefile
1936 src/transport/Makefile
1937 src/transport/transport.conf
1939 src/util/resolver.conf
1942 src/zonemaster/Makefile
1943 src/zonemaster/zonemaster.conf
1946 src/reclaim-attribute/Makefile
1947 src/reclaim/Makefile
1949 pkgconfig/gnunetarm.pc
1950 pkgconfig/gnunetats.pc
1951 pkgconfig/gnunetblock.pc
1952 pkgconfig/gnunetcadet.pc
1953 pkgconfig/gnunetconsensus.pc
1954 pkgconfig/gnunetconversation.pc
1955 pkgconfig/gnunetcore.pc
1956 pkgconfig/gnunetdatacache.pc
1957 pkgconfig/gnunetdatastore.pc
1958 pkgconfig/gnunetdht.pc
1959 pkgconfig/gnunetdns.pc
1960 pkgconfig/gnunetenv.pc
1961 pkgconfig/gnunetfragmentation.pc
1962 pkgconfig/gnunetfs.pc
1963 pkgconfig/gnunetgns.pc
1964 pkgconfig/gnunethello.pc
1965 pkgconfig/gnunetidentity.pc
1966 pkgconfig/gnunetmicrophone.pc
1967 pkgconfig/gnunetmysql.pc
1968 pkgconfig/gnunetnamestore.pc
1969 pkgconfig/gnunetnat.pc
1970 pkgconfig/gnunetnse.pc
1971 pkgconfig/gnunetpeerinfo.pc
1972 pkgconfig/gnunetpq.pc
1973 pkgconfig/gnunetregex.pc
1974 pkgconfig/gnunetrevocation.pc
1975 pkgconfig/gnunetrps.pc
1976 pkgconfig/gnunetscalarproduct.pc
1977 pkgconfig/gnunetset.pc
1978 pkgconfig/gnunetspeaker.pc
1979 pkgconfig/gnunetstatistics.pc
1980 pkgconfig/gnunettestbed.pc
1981 pkgconfig/gnunettesting.pc
1982 pkgconfig/gnunettransport.pc
1983 pkgconfig/gnunetutil.pc
1984 pkgconfig/gnunetvpn.pc
1990 # warn user if mysql found but not used due to version
1991 AS_IF([test "$mysqlfail" = "true"]
1992 [AC_MSG_NOTICE([WARNING: optional MySQL not found (or too old)])])
1995 AS_IF([test "x$sqlite" = "x0"],
1996 [AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])])
1999 AS_IF([test "$gnurl" = "0"],
2000 [AS_IF([test "x$curl" = "xfalse"],
2001 [AC_MSG_NOTICE([WARNING: libgnurl not found. http client support will not be compiled.])
2002 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])],
2003 [AC_MSG_NOTICE([WARNING: libgnurl not found, trying to use libcurl-gnutls instead.])])])
2006 AS_IF([test "x$bluetooth" = "x0"],
2007 [AC_MSG_NOTICE([WARNING: optional bluetooth library not found.])])
2011 AS_IF([test "x$jansson" = "x0"],
2012 [AC_MSG_NOTICE([WARNING: optional jansson library not found.])])
2015 # FIXME: `some modules' -> be more specific which exact modules.
2018 # warn user if iptables is not found
2019 AS_IF([test "$VAR_IPTABLES_BINARY" = "false"],
2020 [AC_MSG_NOTICE([WARNING: optional iptables not found])])
2022 # warn user if ifconfig is not found
2023 AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"],
2024 [AC_MSG_NOTICE([WARNING: optional ifconfig not found])])
2026 # warn user if upnpc binary is not found
2027 AS_IF([test "$VAR_UPNPC_BINARY" = "false"],
2028 [AC_MSG_NOTICE([WARNING: optional upnpc binary not found])])
2031 AS_IF([test x$gnutls != xtrue],
2032 [AC_MSG_NOTICE([WARNING: GnuTLS not found, gnunet-gns-proxy will not be built])],
2033 [AS_IF([test "x$gnutls_dane" != "x1"],
2034 [AC_MSG_NOTICE([WARNING: GnuTLS has no DANE support, DANE validation will not be possible])])])
2036 # warn user if libzbar is not found
2037 AS_IF([test "$have_zbar" = 0],
2038 [AC_MSG_NOTICE([WARNING: zbar not found, gnunet-qr will not be built.])])
2041 AS_IF([test "x$enable_java_ports" = "xyes"],
2042 [AC_MSG_NOTICE([NOTICE: Opening ports for gnunet-java bindings by default.])])
2045 AS_IF([test "x$lmhd" != "x1"],
2046 [AC_MSG_NOTICE([WARNING: optional libmicrohttpd not found])])
2049 AS_IF([test "x$conversation_backend" = "xnone"],
2050 [AS_IF([test "x$pulse" != "x1"],
2051 [AC_MSG_NOTICE([WARNING: libpulse(audio) not found, conversation will not be built.])])
2052 AS_IF([test "x$opus" != "x1"],
2053 [AC_MSG_NOTICE([WARNING: libopus not found, conversation will not be built.])])
2054 AS_IF([test "x$gst" != "x1"],
2055 [AC_MSG_NOTICE([WARNING: GStreamer not found, conversation will not be built.])])])
2057 AS_IF([test "$extractor" != 1],
2058 [AC_MSG_WARN([ERROR: libextractor not found, but various file-sharing functions require it])])
2060 AS_IF([test "x$working_libidn2" = x1],
2061 [AC_MSG_NOTICE([INFO: Using libidn2])])
2062 AS_IF([test "x$working_libidn1" = x1],
2063 [AC_MSG_NOTICE([INFO: Using libidn1])])
2065 AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
2067 AS_IF([test "$enable_framework_build" = "yes"],
2068 [AC_MSG_NOTICE([Mac OS X framework build enabled.])])
2070 AC_MSG_NOTICE([********************************************
2071 Please make sure NOW that you have created a user and group 'gnunet'
2072 and additionally a group 'gnunetdns'. On Debian and Ubuntu GNU/Linux, type:
2074 adduser --system --group --disabled-login --home /var/lib/gnunet gnunet
2076 Make sure that '/var/lib/gnunet' is owned (and writable) by user
2077 'gnunet'. Then, you can compile GNUnet with
2080 After that, run (if necessary as 'root')
2082 to install everything.
2084 Each GNUnet user should be added to the 'gnunet' group (may
2085 require fresh login to come into effect):
2086 adduser USERNAME gnunet
2087 (run the above command as root once for each of your users, replacing
2088 "USERNAME" with the respective login names). If you have a global IP
2089 address, no further configuration is required.
2091 For more detailed setup instructions, see https://docs.gnunet.org/
2093 Optionally, download and compile gnunet-gtk to get a GUI for
2094 file-sharing and configuration. This is particularly recommended
2095 if your network setup is non-trivial, as gnunet-setup can be
2096 used to test in the GUI if your network configuration is working.
2097 gnunet-setup should be run as the "gnunet" user under X. As it
2098 does very little with the network, running it as "root" is likely
2099 also harmless. You can also run it as a normal user, but then
2100 you have to copy ~/.gnunet/gnunet.conf" over to the "gnunet" user's
2101 home directory in the end.
2103 Once you have configured your peer, run (as the 'gnunet' user)
2105 to start the peer. You can then run the various GNUnet-tools as
2106 your "normal" user (who should only be in the group 'gnunet').
2107 ********************************************])