X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=configure.ac;h=1c732a15242dfeea478aaab8948c7142e97d7802;hb=e54d6f691dc71cd428e33f770a68a3224ba5c31f;hp=c57a56f9ffe8203c93c1d51f969010123bf9a42d;hpb=5f9f9cae1714eb33e0ee9c824f3d88e6aab8cf63;p=oweals%2Fgnunet.git diff --git a/configure.ac b/configure.ac index c57a56f9f..1c732a152 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\"" @@ -691,6 +694,14 @@ AC_RUN_IFELSE( AC_LANG_POP(C) ]) # $build = $target +AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[int main() { + _Static_assert(sizeof(int) >= 4, "not big enough"); + return 0; + };]])], + [AC_DEFINE([HAVE_STATIC_ASSERT],[1],[Static assertions supported])], + [AC_DEFINE([HAVE_STATIC_ASSERT],[0],[Static assertions not supported])]) + # check for bluetooth library bluetooth=0 AC_MSG_CHECKING(for libbluetooth) @@ -775,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 @@ -973,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 ]) @@ -989,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) @@ -1025,6 +1033,24 @@ 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], [sodium_init], + [libsodium=1])]) + +AS_IF([test x$libsodium = x0], + [AC_MSG_ERROR([GNUnet requires libsodium.])]) # test for libextractor extractor=0 @@ -1442,6 +1468,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 @@ -1504,20 +1534,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" @@ -1985,14 +2001,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="experimental features enabled"]) -# -- OSX Framework -AS_IF([test "$enable_framework_build" = "yes"], - [macosx_framework_msg="yes"], - [macosx_framework_msg="no"]) + [experimental_msg="yes"]) # -- libidn 2 AS_IF([test "x$working_libidn2" = x1], [libidn2_msg="libidn2"]) @@ -2018,75 +2033,67 @@ AS_IF([test "x$makeinfo" != "x1"], [texinfo_msg="no"], [texinfo_msg="yes"]) # -- conversation +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], - [features_msg="$features_msg conversation"], + [conversation_msg="yes (x$conversation_backend)"], [AC_MSG_WARN([libopus not found (required to build conversation)])])]) + # -- interface interface_msg=`echo $DEFAULT_INTERFACE | tr -d \"` -# -- libmicrohttpd -AS_IF([test "x$lmhd" != "x1"], - [libmicrohttpd_msg="no (optional)"], - [libmicrohttpd_msg="yes"]) # -- jansson -AS_IF([test "x$jansson" = "x0"], - [jansson_msg="no (optional)"], - [jansson_msg="yes"]) # -- libextractor AS_IF([test "$extractor" != 1], [AC_MSG_WARN([libextractor not found, but various file-sharing functions require it])], [libextractor_msg="yes"]) # -- libzbar AS_IF([test "x$zbar" = "x1"], - [libzbar_msg="yes" - features_msg="$features_msg gnunet-qr"], - [AC_MSG_NOTICE([zbar not found, gnunet-qr will not be built.]) - libzbar_msg="no"]) + [libzbar_msg="yes"], + [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)"], @@ -2122,8 +2129,8 @@ AC_SUBST(features_msg) # TODO: reduce the length of the last message block, following "IMPORTANT". AC_MSG_NOTICE([ -GNUnet Configuration -==================== +Detected system +=============== GNUnet version: ${VERSION} @@ -2135,24 +2142,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} @@ -2161,11 +2164,15 @@ libextractor: ${libextractor_msg} texi2mdoc: ${texi2mdoc_msg} mandoc: ${mandoc_msg} +GNUnet configuration: +===================== +transports: ${transport_msg} +conversation: ${conversation_msg} +database backends: ${features_msg} +experimental: ${experimental_msg} + texinfo manual: ${texinfo_msg} transpiled mdocml manual: ${mdocml_msg} - -features: ${features_msg} -experimental: ${experimental_msg} ]) AS_IF([test x$MSG_USER_SETUP != xfalse],