X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=configure.ac;h=6dc914c12cfc042eb094826994e48937341c2a95;hb=refs%2Fheads%2Fmaster;hp=2437df31ec0c38c78ecc82d62c1b52e4deb61831;hpb=28697114af2b963651acb03de6685c831e8d2993;p=oweals%2Fgnunet.git diff --git a/configure.ac b/configure.ac index 2437df31e..6dc914c12 100644 --- a/configure.ac +++ b/configure.ac @@ -97,6 +97,9 @@ AC_DEFUN([CC_CHECK_CFLAG_APPEND], [ # We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable. CC_CHECK_CFLAG_APPEND([address-of-packed-member]) +# We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable. +CC_CHECK_CFLAG_APPEND([tautological-constant-out-of-range-compare]) + # Use Linux interface name unless the OS has a different preference DEFAULT_INTERFACE="\"eth0\"" @@ -783,12 +786,9 @@ AC_ARG_WITH(jansson, ], [AC_MSG_RESULT([--with-jansson not specified]) CHECK_LIBHEADER(JANSSON, jansson, json_loads, jansson.h,jansson=1,)]) -AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1]) -AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) -AS_IF([test "x$jansson" = x1], - [AC_DEFINE([HAVE_JANSSON],[1],[Have jansson library])], - [AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library])]) +AS_IF([test "x$jansson" != x1], + [AC_MSG_ERROR([GNUnet requires libjansson])]) # check for libpulse(audio) library pulse=0 @@ -981,8 +981,8 @@ AS_IF([test "x$curl" = xtrue],[ AC_CHECK_HEADER([curl/curl.h], AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include ]]), [curl=false]) - # need libcurl-gnutls.so, everything else is not acceptable - AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false]) + # need libcurl-gnutls.so for proxy, warn later if not found. + AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],[curl_gnutls=true],[curl_gnutls=false]) # cURL must support CURLINFO_TLS_SESSION, version >= 7.34 ]) @@ -997,7 +997,7 @@ AS_IF([test "$gnurl" = 1], AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) AM_CONDITIONAL(HAVE_LIBCURL, true) AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])], - [AC_MSG_WARN([ERROR: GNUnet requires libcurl-gnutls or gnurl >= 7.34]) + [AC_MSG_ERROR([GNUnet requires libcurl or gnurl >= 7.34]) AM_CONDITIONAL(HAVE_LIBGNURL, false) AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) AM_CONDITIONAL(HAVE_LIBCURL, false) @@ -1033,15 +1033,14 @@ AS_IF([test x$nss = xfalse], AC_CHECK_LIB([kvm],[kvm_open]) AC_CHECK_LIB([kstat],[kstat_open]) -argon=0 -# test for argon2 (for POW) -AC_CHECK_LIB([argon2],[argon2d_hash_raw], argon=1, argon=0) -AS_IF([test x$argon = x1], -[ - AC_MSG_RESULT([argon2 found]) -],[ - AC_MSG_ERROR([GNUnet requires argon2.]) -]) +libsodium=0 +# test for libsodium +AC_CHECK_HEADER([sodium.h], + [AC_CHECK_LIB([sodium], [crypto_pwhash_argon2id], + [libsodium=1])]) + +AS_IF([test x$libsodium = x0], + [AC_MSG_ERROR([GNUnet requires libsodium.])]) # test for libextractor extractor=0 @@ -1459,6 +1458,10 @@ AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1) AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd]) AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) +AM_CONDITIONAL(HAVE_REST, [test x$jansson = x1 -a x$lmhd = x1]) +AS_IF([test "x$lmhd" != "x1"], + [AC_MSG_ERROR([GNUnet requires libmicrohttpd >= 0.9.63.])]) + # restore LIBS LIBS=$SAVE_LIBS @@ -1521,20 +1524,6 @@ LIBS=$SAVE_LIBS GN_INTLINCL="" GN_LIBINTL="$LTLIBINTL" -AC_ARG_ENABLE(framework, - [AS_HELP_STRING([--enable-framework],[enable Mac OS X framework build helpers])], - enable_framework_build=$enableval) -AM_CONDITIONAL(WANT_FRAMEWORK, - test x$enable_framework_build = xyes) -AS_IF([test x$enable_framework_build = xyes], - [AC_DEFINE([FRAMEWORK_BUILD], - 1, - [Build a Mac OS X Framework]) - GN_INTLINCL='-I$(top_srcdir)/src/intlemu' - GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation' - AC_LIB_APPENDTOVAR([CPPFLAGS], - [$GN_INTLINCL])]) - GN_LIB_LDFLAGS="-export-dynamic -no-undefined" GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined" @@ -2002,15 +1991,13 @@ AS_IF([test "x$enable_java_ports" = "xyes"], #### This could be moved to the checks above, #### but for now let's keep it here. #### - +transport_msg="tcp udp unix http" +AS_IF([test "x$build_target" = "xlinux" -a "x$enable_experimental" = "xyes"], + [transport_msg="$transport_msg wlan"]) # -- print message regarding enabled experimental features experimental_msg="no" AS_IF([test "x$enable_experimental" = "xyes"], [experimental_msg="yes"]) -# -- OSX Framework -AS_IF([test "$enable_framework_build" = "yes"], - [macosx_framework_msg="yes"], - [macosx_framework_msg="no"]) # -- libidn 2 AS_IF([test "x$working_libidn2" = x1], [libidn2_msg="libidn2"]) @@ -2039,45 +2026,21 @@ AS_IF([test "x$makeinfo" != "x1"], conversation_msg="no" AS_IF([test "x$conversation_backend" = "xnone"], [AS_IF([test "x$pulse" != "x1"], - [AC_MSG_WARN([libpulse(audio) not found (required to build conversation).]) - libpulse_msg="no (required for conversation)"], + [libpulse_msg="no (required for conversation)"], [libpulse_msg="yes"]) AS_IF([test "x$opus" != "x1"], - [AC_MSG_WARN([libopus not found (required to build conversation)]) - libopus_msg="no (required for conversation)"], + [libopus_msg="no (required for conversation)"], [libopus_msg="yes"]) AS_IF([test "x$gst" != "x1"], - [AC_MSG_WARN([GStreamer not found (required to build conversation).]) - gstreamer_msg="no (required for conversation)"], + [gstreamer_msg="no (required for conversation)"], [gstreamer_msg="yes"])], [AS_IF([test "x$opus" = x1], [conversation_msg="yes (x$conversation_backend)"], [AC_MSG_WARN([libopus not found (required to build conversation)])])]) -# -- rest -rest_msg="no" -AS_IF([test "x$lmhd" = "x1"], - [AS_IF([test "x$jansson" = "x1"], - [rest_msg="yes"], - [AC_MSG_WARN([libjansson not found (required for REST service)])])], - [AC_MSG_WARN([libmicrohttpd not found (required for REST service)])]) -# -- reclaim -AS_IF([test "x$lmhd" = "x1"], - [AS_IF([test "x$jansson" = "x1"], - [reclaim_msg="yes (with OpenID Connect)"], - [reclaim_msg="yes (without OpenID Connect, missing libjansson)"], - [reclaim_msg="yes (without OpenID Connect, missing libmicrohttpd)"])]) - # -- interface interface_msg=`echo $DEFAULT_INTERFACE | tr -d \"` -# -- libmicrohttpd -AS_IF([test "x$lmhd" = "x0"], - [libmicrohttpd_msg="no (REST service and HTTP transport will not be built)"], - [libmicrohttpd_msg="yes"]) # -- jansson -AS_IF([test "x$jansson" = "x0"], - [jansson_msg="no (REST service will not be built)"], - [jansson_msg="yes"]) # -- libextractor AS_IF([test "$extractor" != 1], [AC_MSG_WARN([libextractor not found, but various file-sharing functions require it])], @@ -2085,41 +2048,42 @@ AS_IF([test "$extractor" != 1], # -- libzbar AS_IF([test "x$zbar" = "x1"], [libzbar_msg="yes"], - [AC_MSG_NOTICE([zbar not found, gnunet-qr will not be built.]) - libzbar_msg="no (gnunet-qr will not be built)"]) + [libzbar_msg="no (gnunet-qr will not be built)"]) # -- libgnurl AS_IF([test "$gnurl" = "0"], [AS_IF([test "x$curl" = "xfalse"], [AC_MSG_WARN([libgnurl not found. http client support will not be compiled.]) AC_MSG_WARN([IMPORTANT: No HTTP client library found. HTTP transports and hostlist daemon will not be compiled, and you probably WANT the hostlist daemon]) - curl_msg="no"], - [AC_MSG_NOTICE([libgnurl not found, trying to use libcurl-gnutls instead.]) - curl_msg="yes"])], - [gnurl_msg="yes"]) + http_client="none"], + [AC_MSG_NOTICE([Using libcurl as HTTP client library.]) + http_client="curl"])], + [AC_MSG_NOTICE([Using libgnurl as HTTP client library.]) + http_client="gnurl"]) +AS_IF([test "x$curl" = "xtrue" -a "x$curl_gnutls" != "xtrue"], + [AC_MSG_WARN([libcurl TLS backend is not gnutls. The GNS Proxy will likely not function properly.]) + http_client="curl-openssl"], + [http_client="curl-gnutls"]) # -- ifconfig AS_IF([test "$VAR_IFCONFIG_BINARY" = "false"], - [AC_MSG_WARN([ifconfig not found, some features will not work]) - ifconfig_msg="no (optional)"], + [ifconfig_msg="no (optional, some features will not work)"], [ifconfig_msg="yes"]) # -- upnpc AS_IF([test "$VAR_UPNPC_BINARY" = "false"], - [AC_MSG_WARN([upnpc binary not found, NAT traversal using UPnPc will not work]) - upnpc_msg="no (optional)"], + [upnpc_msg="no (optional, NAT traversal using UPnPc will not work)"], [upnpc_msg="yes"]) # -- iptables AS_IF([test "$VAR_IPTABLES_BINARY" = "false"], - [AC_MSG_WARN([iptables not found, DNS query interception will not work]) - iptables_msg="no (optional)"], + [iptables_msg="no (optional, DNS query interception will not work)"], [iptables_msg="yes"]) # -- bluetooth AS_IF([test "x$bluetooth" = "x0"], - [AC_MSG_NOTICE([bluetooth library not found, will not be able to use Bluetooth]) - bluetooth_msg="no (optional)"], - [bluetooth_msg="yes"]) + [bluetooth_msg="no (optional)"], + [bluetooth_msg="yes" + transport_msg="$transport_msg bluetooth"]) # -- gnutls AS_IF([test x$gnutls != xtrue], [AC_MSG_WARN([GnuTLS not found, gnunet-gns-proxy will not be built]) - gnutls_msg="no"], + gnutls_msg="no (gnunet-gns-proxy will not be built)"], [AS_IF([test "x$gnutls_dane" != "x1"], [AC_MSG_WARN([GnuTLS lacks DANE support, DANE validation will not be possible]) gnutls_msg="yes (without DANE support)"], @@ -2168,24 +2132,20 @@ CPPFLAGS: ${CPPFLAGS} LDFLAGS: ${LDFLAGS} LIBS: ${LIBS} Build Target: $build_target -Mac OSX framework build: ${macosx_framework_msg} Default Interface: ${interface_msg} MySQL: ${mysql_msg} PostgreSQL: ${postgres_msg} sqlite3: ${sqlite_msg} -gnurl: ${gnurl_msg} -curl: ${curl_msg} +http client: ${http_client} bluetooth: ${bluetooth_msg} -jansson: ${jansson_msg} iptables: ${iptables_msg} ifconfig: ${ifconfig_msg} upnpc: ${upnpc_msg} gnutls: ${gnutls_msg} libzbar: ${libzbar_msg} java: ${java_msg} -libmicrohttpd: ${libmicrohttpd_msg} libidn: ${libidn1_msg}${libidn2_msg} libopus: ${libopus_msg} gstreamer: ${gstreamer_msg} @@ -2196,9 +2156,8 @@ mandoc: ${mandoc_msg} GNUnet configuration: ===================== -reclaimID: ${reclaim_msg} +transports: ${transport_msg} conversation: ${conversation_msg} -rest: ${rest_msg} database backends: ${features_msg} experimental: ${experimental_msg}