X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=configure.ac;h=96d7cbbc0785caf312864bb3d47ae747430054c9;hb=2a302e5716711e4bae796ac3c272972859a3a122;hp=b43aa84bededd55e4e238636ee3b076f077014f1;hpb=a567f15a1d1c9c8bd17135a120df44da2b85cd8a;p=oweals%2Fgnunet.git diff --git a/configure.ac b/configure.ac index b43aa84be..96d7cbbc0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # This file is part of GNUnet. -# (C) 2001--2018 GNUnet e.V. +# (C) 2001--2019 GNUnet e.V. # # GNUnet is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published @@ -14,13 +14,14 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # +# SPDX-License-Identifier: AGPL3.0-or-later # # Process this file with autoconf to produce a configure script. # # AC_PREREQ(2.61) # Checks for programs. -AC_INIT([gnunet], [0.11.0pre66], [bug-gnunet@gnu.org]) +AC_INIT([gnunet], [0.11.0], [bug-gnunet@gnu.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_TARGET @@ -70,6 +71,7 @@ case "$host_os" in CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS" CFLAGS="-fno-common $CFLAGS" AC_MSG_WARN([WARNING: The VPN application cannot be compiled on your OS]) + AC_CHECK_LIB(intl, gettext) build_target="darwin" DEFAULT_INTERFACE="\"en0\"" LIBPREFIX= @@ -191,6 +193,8 @@ AC_UNALIGNED_64_ACCESS # some other checks for standard libs AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32]) +AC_SEARCH_LIBS([memrchr], [], + AC_DEFINE(HAVE_MEMRCHR,1,[memrchr supported]), []) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(m, log) AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported])) @@ -203,6 +207,18 @@ AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) 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) rm -f /tmp/gnunet_test_cosks_ssh_garbage +# autotools' m4 for python has no maximum version! +# python3.4 - python3.7 for tests +m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.4 python3.5 python3.6 python3.7 python]) +AM_PATH_PYTHON([3.4],, [:]) +AC_SUBST([PYTHON]) +AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) + +# perl +AC_PATH_PROG( PERL, perl, , + $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) +AC_SUBST([PERL]) + # iptables is a soft requirement to run tests AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) @@ -241,7 +257,7 @@ if test x"$VAR_IFCONFIG_BINARY" != x"false" then AC_DEFINE_UNQUOTED([IFCONFIG], "$VAR_IFCONFIG_BINARY", [Path to ifconfig]) else -AC_MSG_WARN([warning: 'ifconfig' not found.]) +AC_MSG_WARN(['ifconfig' not found.]) fi # miniupnpc / upnpc binary is a soft runtime requirement @@ -271,6 +287,7 @@ have_addrinfo_a=0 AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1 AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])]) AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1]) + # tests only run on Windows if test "x$build_target" = "xmingw" then @@ -300,6 +317,10 @@ then fi AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) +AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include ]]) + + + # should the build process be building the documentation? AC_MSG_CHECKING(whether to build documentation) AC_ARG_ENABLE([documentation], @@ -316,16 +337,14 @@ else AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) fi -# TODO: Include check for mandoc + texi2mdoc. -# TODO: Rename the switch? Just 'section7' is too vague. -# mdoc section 7 output. -AC_MSG_CHECKING(wether to build section 7 mdoc output) -AC_ARG_ENABLE([section7], -[AS_HELP_STRING([--disable-section7], [do not build section 7 mdoc output])], -[section7=${enableval}], -[section7=yes]) -AC_MSG_RESULT($section7) -if test "x$section7" = "xyes" +# FIXME: Something is wrong about this in the output of ./configure runs +AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation) +AC_ARG_ENABLE([texi2mdoc-generation], + [AS_HELP_STRING([--enable-texi2mdoc-generation], [include generated texi2mdoc output in installation])], + [texi2mdoc_generation=${enableval}], + [texi2mdoc_generation=no]) +AC_MSG_RESULT($texi2mdoc_generation) +if test "x$texi2mdoc_generation" = "xyes" then if test "$texi2mdoc" = 0 then @@ -333,12 +352,12 @@ then AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System]) AC_MSG_WARN([ERROR: package manager or from https://mandoc.bsd.lv/texi2mdoc/]) else - AM_CONDITIONAL([SECTION7],true) - AC_DEFINE([SECTION7],[1],[Building section 7 mdoc output]) + AM_CONDITIONAL([TEXI2MDOC_GENERATION],true) + AC_DEFINE([TEXI2MDOC_GENERATION],[1],[Building section 7 mdoc output]) fi else - AM_CONDITIONAL([SECTION7],false) - AC_DEFINE([SECTION7],[0],[Not building section 7 mdoc output]) + AM_CONDITIONAL([TEXI2MDOC_GENERATION],false) + AC_DEFINE([TEXI2MDOC_GENERATION],[0],[Not building section 7 mdoc output]) fi # should the build process be building only the documentation? @@ -357,33 +376,21 @@ else AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation]) fi - -# Check for makeinfo version >= 5, required for building documentation. -# TODO: add check for alternatives -have_makeinfo_5=false -if test x"$documentation" = xyes || test x"$documentation_only" = xyes +# should the build process be including the manpages? (default: yes) +AC_MSG_CHECKING(whether to include man pages) +AC_ARG_ENABLE([include-manpages], + [AS_HELP_STRING([--disable-include-manpages], [Do not include the man pages in build and installation])], + [include_manpages=${enableval}], + [include_manpages=yes]) +AC_MSG_RESULT($include_manpages) +if test "x$include_manpages" = "xyes" then - AC_PROG_SED - AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes]) - if test x"${MAKEINFO_FOUND}" = xyes - then - MAKEINFO_VERSION_REQ=5 - AC_MSG_CHECKING([for makeinfo version >= $MAKEINFO_VERSION_REQ]) - # XXX: is this sed invocation portable? - MAKEINFO_VERSION=`makeinfo --version | sed -ne 's/^\(makeinfo\|texi2any\) .* \([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*.*$/\2/p'` - if test x$MAKEINFO_VERSION = x -o 0$MAKEINFO_VERSION -lt $MAKEINFO_VERSION_REQ - then - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([Program 'makeinfo' version >= $MAKEINFO_VERSION_REQ is required.]) - else - AC_MSG_RESULT([yes]) - have_makeinfo_5=true - fi - else - AC_MSG_FAILURE([Missing program 'makeinfo', Documentation will not be built. Please install it if you want 'info' documentation or refer to online resources at 'https://docs.gnunet.org'.]) - fi + AM_CONDITIONAL([INCLUDE_MANPAGES],true) + AC_DEFINE([INCLUDE_MANPAGES],[1],[Including the man pages in the build and installation]) +else + AM_CONDITIONAL([INCLUDE_MANPAGES],false) + AC_DEFINE([INCLUDE_MANPAGES],[0],[Not including the man pages in the build and installation]) fi -AM_CONDITIONAL([HAVE_MAKEINFO_5], [test x$have_makeinfo_5 = xtrue]) # Adam shostack suggests the following for Windows: # -D_FORTIFY_SOURCE=2 -fstack-protector-all @@ -396,7 +403,6 @@ AC_ARG_ENABLE(gcc-hardening, 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, @@ -598,7 +604,7 @@ AC_CHECK_LIB(ogg, ogg_stream_flush_fill, PKG_CHECK_MODULES([GLIB], [glib-2.0], [# check for pbc library - pbc=0 + pbc=0 AC_CHECK_HEADER([pbc/pbc.h],pbc=1) AC_CHECK_HEADER([gabe.h],abe=1) AM_CONDITIONAL(HAVE_PBC, [test "x$pbc" = x1]) @@ -696,17 +702,19 @@ else AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL]) fi +AC_SEARCH_LIBS(__atomic_load_8, atomic, [have_libatomic=1 AC_DEFINE(HAVE_LIBATOMIC,1,[external libatomic])]) +AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1]) # restore LIBS & CPPFLAGS LIBS=$SAVE_LIBS CPPFLAGS=$SAVE_CPPFLAGS -AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false]) +AC_CHECK_HEADERS([glpk.h],[glpk=true],[glpk=false]) # GLPK must support glpk_init_env, version >= 4.43 -AC_CHECK_LIB([glpk],[glp_init_env],,[gplk=false]) +AC_CHECK_LIB([glpk],[glp_init_env],,[glpk=false]) # GLPK must support atm MLP presolving, version >= 4.32 -AC_CHECK_MEMBERS(glp_iocp.presolve,,[gplk=false],[[#include ]]) -if test x$gplk = xfalse +AC_CHECK_MEMBERS(glp_iocp.presolve,,[glpk=false],[[#include ]]) +if test "x$glpk" = xfalse then AM_CONDITIONAL(HAVE_LIBGLPK, false) AC_MSG_WARN([ERROR: GNUnet requires GLPK >= 4.32]) @@ -722,7 +730,14 @@ then AM_CONDITIONAL(HAVE_GLIBCNSS, false) AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin]) else - AM_CONDITIONAL(HAVE_GLIBCNSS, true) + NSS_INCLUDES=" + #include + " + AC_CHECK_DECL([NSS_STATUS_UNAVAIL], + [AM_CONDITIONAL(HAVE_GLIBCNSS, true)], + [AM_CONDITIONAL(HAVE_GLIBCNSS, false) + AC_MSG_WARN([No nss header fails to define NSS_STATUS_UNAVAIl, will not build NSS plugin])], + [$NSS_INCLUDES]) fi @@ -889,7 +904,7 @@ AS_IF([test x$my_with_libidn2 = x1], LIBS="-lidn2 $LIBS" AC_DEFINE_UNQUOTED([HAVE_LIBIDN2], [1], - [Define to 1 if you have 'libidn2' (-lidn).])], + [Define to 1 if you have 'libidn2' (-lidn2).])], [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2" MISSING_SEP=", "])]) AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1) @@ -915,6 +930,9 @@ AS_IF([test x$working_libidn2 = x0], * --with-libidn])])])]) AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1) +AS_IF([test "$working_libidn1" = 0 -a "$working_libidn2" = 0], + [AC_MSG_ERROR([GNUnet requires libidn (or libidn2)])]) + AS_IF([test x$there_can_only_be_one = x0], [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])]) @@ -987,12 +1005,12 @@ AC_HEADER_DIRENT AC_HEADER_STDC # Check for headers that are ALWAYS required -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])) +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])) # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there) -AC_CHECK_HEADERS([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]) +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]) # FreeBSD requires something more funky for netinet/in_systm.h and netinet/ip.h... AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,, @@ -1168,7 +1186,7 @@ AC_ARG_WITH(microhttpd, AC_CHECK_HEADERS([microhttpd.h], AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], - [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42]) + [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include "$native_srcdir/src/include/platform.h" #include @@ -1191,7 +1209,7 @@ AC_ARG_WITH(microhttpd, AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH" - [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42]) + [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include "$native_srcdir/src/include/platform.h" #include @@ -1213,12 +1231,12 @@ AC_ARG_WITH(microhttpd, AC_CHECK_HEADERS([microhttpd.h], AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], - [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42]) + [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include "$native_srcdir/src/include/platform.h" #include #if (MHD_VERSION < 0x0094200) - #error needs at least version 0.9.42 + #error needs at least version 0.9.52 #endif ])], [AC_MSG_RESULT(ok) @@ -1235,10 +1253,6 @@ AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) # restore LIBS LIBS=$SAVE_LIBS -# check for python & pexpect (used for some testcases only) -AM_PATH_PYTHON([2.6],, [:]) -AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) - # check for gettext AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.18.1]) @@ -1324,8 +1338,11 @@ AC_SUBST(LIBPREFIX) AC_SUBST(DLLDIR) AC_SUBST(EXT_LIB_PATH) +DATAROOTDIR=$datarootdir +AC_SUBST(DATAROOTDIR) # test for sudo +# TODO: do we need to change anything for "doas" on openbsd? AC_MSG_CHECKING(for sudo) AC_ARG_WITH(sudo, [ --with-sudo=PATH path to sudo binary (or just yes)], @@ -1463,23 +1480,6 @@ AC_MSG_RESULT($enable_test_run) AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) -# should monkey be used when running (certain) services? -AC_MSG_CHECKING(whether to run with monkey) -AC_ARG_ENABLE([monkey], - [AS_HELP_STRING([--enable-monkey], [enable running with monkey])], - [enable_monkey=${enableval}], - [enable_monkey=no]) -AC_MSG_RESULT($enable_monkey) -AM_CONDITIONAL([ENABLE_MONKEY], [test "x$enable_monkey" = "xyes"]) -if test "x$enable_monkey" = "xyes" -then - MONKEYPREFIX="pathologist -d $(eval echo ${datarootdir}/gnunet/gnunet.sqlite) -p 30 --" -else - MONKEYPREFIX="" -fi -AC_SUBST(MONKEYPREFIX) - - AC_MSG_CHECKING([whether to compile in benchmarks (currently for http and crypto)]) AC_ARG_ENABLE([benchmark], [AS_HELP_STRING([--enable-benchmark], [enable benchmarking])], @@ -1569,7 +1569,7 @@ AC_MSG_CHECKING(whether to start peer's services on demand by default) AC_ARG_ENABLE([autostart], [AS_HELP_STRING([--disable-autostart], [do not start peer's services by default])], [enable_autostart=${enableval} - if test "x$enable_autostart" == "xno" + if test "x$enable_autostart" = "xno" then START_ON_DEMAND="NO" fi @@ -1744,11 +1744,14 @@ AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball ve AC_CONFIG_FILES([ Makefile contrib/Makefile +contrib/scripts/Makefile +contrib/scripts/gnunet-logread/Makefile doc/Makefile doc/man/Makefile doc/doxygen/Makefile doc/handbook/Makefile doc/tutorial/Makefile +lint/Makefile m4/Makefile po/Makefile.in src/Makefile @@ -1793,8 +1796,6 @@ src/include/Makefile src/integration-tests/Makefile src/json/Makefile src/hostlist/Makefile -src/multicast/Makefile -src/multicast/multicast.conf src/my/Makefile src/mysql/Makefile src/namecache/Makefile @@ -1807,17 +1808,13 @@ src/nat-auto/Makefile src/nat-auto/nat-auto.conf src/nse/Makefile src/nse/nse.conf +src/nt/Makefile src/peerinfo/Makefile src/peerinfo/peerinfo.conf src/peerinfo-tool/Makefile src/peerstore/Makefile src/peerstore/peerstore.conf src/pq/Makefile -src/psycutil/Makefile -src/psyc/Makefile -src/psyc/psyc.conf -src/psycstore/Makefile -src/psycstore/psycstore.conf src/pt/Makefile src/regex/Makefile src/regex/regex.conf @@ -1831,8 +1828,6 @@ src/scalarproduct/Makefile src/scalarproduct/scalarproduct.conf src/set/Makefile src/set/set.conf -src/social/Makefile -src/social/social.conf src/sq/Makefile src/statistics/Makefile src/statistics/statistics.conf @@ -1852,7 +1847,6 @@ src/vpn/vpn.conf src/zonemaster/Makefile src/zonemaster/zonemaster.conf src/rest/Makefile -src/rest-plugins/Makefile src/abe/Makefile src/reclaim-attribute/Makefile src/reclaim/Makefile @@ -1868,7 +1862,6 @@ pkgconfig/gnunetdatacache.pc pkgconfig/gnunetdatastore.pc pkgconfig/gnunetdht.pc pkgconfig/gnunetdns.pc -pkgconfig/gnunetdv.pc pkgconfig/gnunetenv.pc pkgconfig/gnunetfragmentation.pc pkgconfig/gnunetfs.pc @@ -1876,21 +1869,17 @@ pkgconfig/gnunetgns.pc pkgconfig/gnunethello.pc pkgconfig/gnunetidentity.pc pkgconfig/gnunetmicrophone.pc -pkgconfig/gnunetmulticast.pc pkgconfig/gnunetmysql.pc pkgconfig/gnunetnamestore.pc pkgconfig/gnunetnat.pc pkgconfig/gnunetnse.pc pkgconfig/gnunetpeerinfo.pc pkgconfig/gnunetpq.pc -pkgconfig/gnunetpsyc.pc -pkgconfig/gnunetpsycstore.pc pkgconfig/gnunetregex.pc pkgconfig/gnunetrevocation.pc pkgconfig/gnunetrps.pc pkgconfig/gnunetscalarproduct.pc pkgconfig/gnunetset.pc -pkgconfig/gnunetsocial.pc pkgconfig/gnunetspeaker.pc pkgconfig/gnunetstatistics.pc pkgconfig/gnunettestbed.pc @@ -2000,7 +1989,7 @@ require fresh login to come into effect): "USERNAME" with the respective login names). If you have a global IP address, no further configuration is required. -For more detailed setup instructions, see https://gnunet.org/installation +For more detailed setup instructions, see https://docs.gnunet.org/ Optionally, download and compile gnunet-gtk to get a GUI for file-sharing and configuration. This is particularly recommended