aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-09-06 12:34:39 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-09-06 12:34:39 +0200
commitafea0eea1ecfa41150fdf9ee052acac75eee6534 (patch)
tree1bb24bac4340262b15640fadbdb7beb8a32f695c /configure.ac
parent1d4e7a0eec5ee96d878cdd0e4e3c62c0676bf2d0 (diff)
downloadgnunet-afea0eea1ecfa41150fdf9ee052acac75eee6534.tar.gz
gnunet-afea0eea1ecfa41150fdf9ee052acac75eee6534.zip
BUILD: Remove gnurl. Improve curl-gnutls detection
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac52
1 files changed, 18 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 6e6161434..217b54210 100644
--- a/configure.ac
+++ b/configure.ac
@@ -719,35 +719,21 @@ AS_IF([test "x$pulse" != "x1" || test "x$opus" != "x1" || test "x$ogg" != "x1"],
719AM_CONDITIONAL([BUILD_CONVERSATION], [test "x$conversation_backend" != "xnone"]) 719AM_CONDITIONAL([BUILD_CONVERSATION], [test "x$conversation_backend" != "xnone"])
720AC_MSG_RESULT([$conversation_backend]) 720AC_MSG_RESULT([$conversation_backend])
721 721
722# check for libgnurl 722AC_CHECK_LIB([curl-gnutls],
723LIBGNURL_CHECK_CONFIG([], [7.34.0], 723 [curl_easy_getinfo],
724 [gnurl=1 724 [curl_gnutls=1
725 curl=0], 725 LIBCURL="-lcurl-gnutls"
726 [gnurl=0 726 ],
727 curl=0]) 727 [curl_gnutls=0])
728AS_IF([test "x$gnurl" = "x0"], 728
729 [LIBCURL_CHECK_CONFIG([], [7.34.0], [curl=1], [curl=0]) 729LIBCURL_CHECK_CONFIG([], [7.34.0], [],
730 AS_IF([test "x$curl" = "x0"], 730 [AC_MSG_ERROR([cURL must have a version >= 7.34.0])])
731 [AC_CHECK_HEADER([curl/curl.h], 731
732 [AC_CHECK_DECLS([CURLINFO_TLS_SSL_PTR], 732AC_CHECK_HEADER([curl/curl.h],
733 [curl=1], 733 [AC_CHECK_DECLS([CURLINFO_TLS_SSL_PTR],
734 [curl=0], 734 [],
735 [[#include <curl/curl.h>]])]) 735 [AC_MSG_ERROR([cURL must support CURLINFO_TLS_SSL_PTR])],
736 AC_CHECK_LIB([curl-gnutls], 736 [[#include <curl/curl.h>]])])
737 [curl_easy_getinfo],
738 [curl_gnutls=1],
739 [curl_gnutls=0])])
740 AS_IF([test "x$curl" = "x0" || test "x$curl_gnutls" = "x0"],
741 [AC_MSG_ERROR([cURL must have a version >= 7.34.0 and must support CURLINFO_TLS_SESSION])])])
742
743AS_IF([test "x$gnurl" = "x0" && test "x$curl" = "x0"],
744 [AC_MSG_ERROR([either gnurl or cURL must be available])])
745
746AM_CONDITIONAL([HAVE_LIBGNURL], [test "x$gnurl" = "x1"])
747AC_DEFINE_UNQUOTED([HAVE_LIBGNURL], [$gnurl], [Define to 1 if libgnurl is used])
748AM_CONDITIONAL([HAVE_LIBCURL], [test "x$curl" = "x1"])
749AC_DEFINE_UNQUOTED([HAVE_LIBCURL], [$curl], [Define to 0 if libcurl is used])
750
751# libatomic 737# libatomic
752AC_SEARCH_LIBS([__atomic_load_8], [atomic], 738AC_SEARCH_LIBS([__atomic_load_8], [atomic],
753 [have_libatomic=1 739 [have_libatomic=1
@@ -1506,11 +1492,9 @@ AS_IF([test "x$png" = "x1"],
1506 [libpng_msg="no"]) 1492 [libpng_msg="no"])
1507 1493
1508# curl or gnurl 1494# curl or gnurl
1509AS_IF([test "x$gnurl" = "x1"], 1495AS_IF([test "x$curl_gnutls" = "x1"],
1510 [http_client="gnurl"], 1496 [http_client="curl-gnutls"],
1511 [AS_IF([test "x$curl_gnutls" = "x1"], 1497 [http_client="curl-openssl"])
1512 [http_client="curl-gnutls"],
1513 [http_client="curl-openssl"])])
1514 1498
1515# ifconfig 1499# ifconfig
1516AS_IF([test "x$IFCONFIG_BINARY" = "xfalse"], 1500AS_IF([test "x$IFCONFIG_BINARY" = "xfalse"],