diff options
-rw-r--r-- | configure.ac | 50 | ||||
-rw-r--r-- | src/curl/curl.c | 5 | ||||
-rw-r--r-- | src/gns/gnunet-gns-proxy.c | 7 | ||||
-rw-r--r-- | src/gns/test_gns_proxy.c | 7 | ||||
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist_client.c | 7 | ||||
-rw-r--r-- | src/include/gnunet_curl_lib.h | 4 | ||||
-rw-r--r-- | src/pt/test_gns_vpn.c | 7 | ||||
-rw-r--r-- | src/pt/test_gnunet_vpn.c | 7 | ||||
-rw-r--r-- | src/transport/plugin_transport_http.h | 7 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 7 |
10 files changed, 33 insertions, 75 deletions
diff --git a/configure.ac b/configure.ac index a9845d202..e00b8ae1b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -763,14 +763,6 @@ fi | |||
763 | 763 | ||
764 | # libgnurl | 764 | # libgnurl |
765 | LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0) | 765 | LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0) |
766 | if test "$gnurl" = 1 | ||
767 | then | ||
768 | AM_CONDITIONAL(HAVE_LIBGNURL, true) | ||
769 | AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl]) | ||
770 | else | ||
771 | AM_CONDITIONAL(HAVE_LIBGNURL, false) | ||
772 | AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) | ||
773 | fi | ||
774 | 766 | ||
775 | SAVE_CPPFLAGS=$CPPFLAGS | 767 | SAVE_CPPFLAGS=$CPPFLAGS |
776 | CPPFLAGS="$LIBGNURL_CPPFLAGS $LIBCURL_CPPFLAGS $CPPFLAGS" | 768 | CPPFLAGS="$LIBGNURL_CPPFLAGS $LIBCURL_CPPFLAGS $CPPFLAGS" |
@@ -780,38 +772,30 @@ LIBS="$LIBGNURL $LIBCURL $LIBS" | |||
780 | LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false]) | 772 | LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false]) |
781 | if test "x$curl" = xtrue | 773 | if test "x$curl" = xtrue |
782 | then | 774 | then |
783 | 775 | AC_CHECK_HEADER([curl/curl.h], | |
784 | AC_CHECK_HEADERS([curl/curl.h], | ||
785 | AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]), | 776 | AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]), |
786 | [curl=false]) | 777 | [curl=false]) |
787 | AC_CHECK_HEADERS([gnurl/curl.h], | ||
788 | AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],,[[#include <gnurl/curl.h>]])) | ||
789 | # need libcurl-gnutls.so, everything else is not acceptable | 778 | # need libcurl-gnutls.so, everything else is not acceptable |
790 | AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false]) | 779 | AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false]) |
791 | # cURL must support CURLINFO_TLS_SESSION, version >= 7.34 | 780 | # cURL must support CURLINFO_TLS_SESSION, version >= 7.34 |
792 | fi | 781 | fi |
793 | 782 | ||
794 | # Check for curl/curl.h and gnurl/curl.h so we can use #ifdef | 783 | # libcurl and libgnurl should be mutually exclusive |
795 | # HAVE_CURL_CURL_H later (the above LIBCURL_CHECK_CONFIG accepted | 784 | AS_IF([test "$gnurl" = 1], |
796 | # *either* header set). | 785 | [AM_CONDITIONAL(HAVE_LIBGNURL, true) |
797 | AC_CHECK_HEADERS([curl/curl.h],, | 786 | AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl]) |
798 | curl=false | 787 | AM_CONDITIONAL(HAVE_LIBCURL, false) |
799 | AC_CHECK_HEADERS([gnurl/curl.h],, | 788 | AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])], |
800 | gnurl=false)) | 789 | [AS_IF([test "$curl" = true], |
801 | 790 | [AM_CONDITIONAL(HAVE_LIBGNURL, false) | |
802 | 791 | AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) | |
803 | 792 | AM_CONDITIONAL(HAVE_LIBCURL, true) | |
804 | if test x$curl = xfalse | 793 | AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])], |
805 | then | 794 | [AC_MSG_WARN([ERROR: GNUnet requires libcurl-gnutls or gnurl >= 7.34]) |
806 | AM_CONDITIONAL(HAVE_LIBCURL, false) | 795 | AM_CONDITIONAL(HAVE_LIBGNURL, false) |
807 | if test "$gnurl" = 0 | 796 | AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) |
808 | then | 797 | AM_CONDITIONAL(HAVE_LIBCURL, false) |
809 | AC_MSG_WARN([ERROR: GNUnet requires libcurl-gnutls or gnurl >= 7.34]) | 798 | AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])])]) |
810 | fi | ||
811 | else | ||
812 | AM_CONDITIONAL(HAVE_LIBCURL, true) | ||
813 | AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL]) | ||
814 | fi | ||
815 | 799 | ||
816 | AC_SEARCH_LIBS(__atomic_load_8, atomic, [have_libatomic=1 AC_DEFINE(HAVE_LIBATOMIC,1,[external libatomic])]) | 800 | AC_SEARCH_LIBS(__atomic_load_8, atomic, [have_libatomic=1 AC_DEFINE(HAVE_LIBATOMIC,1,[external libatomic])]) |
817 | AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1]) | 801 | AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1]) |
diff --git a/src/curl/curl.c b/src/curl/curl.c index 10475fe2e..5e1c216ab 100644 --- a/src/curl/curl.c +++ b/src/curl/curl.c | |||
@@ -24,11 +24,6 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #if HAVE_CURL_CURL_H | ||
28 | #include <curl/curl.h> | ||
29 | #elif HAVE_GNURL_CURL_H | ||
30 | #include <gnurl/curl.h> | ||
31 | #endif | ||
32 | #include <jansson.h> | 27 | #include <jansson.h> |
33 | #include "gnunet_curl_lib.h" | 28 | #include "gnunet_curl_lib.h" |
34 | 29 | ||
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index bae222499..eb8115026 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -29,11 +29,8 @@ | |||
29 | */ | 29 | */ |
30 | #include "platform.h" | 30 | #include "platform.h" |
31 | #include <microhttpd.h> | 31 | #include <microhttpd.h> |
32 | #if HAVE_CURL_CURL_H | 32 | /* Just included for the right curl.h */ |
33 | #include <curl/curl.h> | 33 | #include "gnunet_curl_lib.h" |
34 | #elif HAVE_GNURL_CURL_H | ||
35 | #include <gnurl/curl.h> | ||
36 | #endif | ||
37 | #include <gnutls/gnutls.h> | 34 | #include <gnutls/gnutls.h> |
38 | #include <gnutls/x509.h> | 35 | #include <gnutls/x509.h> |
39 | #include <gnutls/abstract.h> | 36 | #include <gnutls/abstract.h> |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 2a7f8104b..053f5f898 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -24,11 +24,8 @@ | |||
24 | * @author Martin Schanzenbach | 24 | * @author Martin Schanzenbach |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #if HAVE_CURL_CURL_H | 27 | /* Just included for the right curl.h */ |
28 | #include <curl/curl.h> | 28 | #include "gnunet_curl_lib.h" |
29 | #elif HAVE_GNURL_CURL_H | ||
30 | #include <gnurl/curl.h> | ||
31 | #endif | ||
32 | #include <microhttpd.h> | 29 | #include <microhttpd.h> |
33 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
34 | #include "gnutls/x509.h" | 31 | #include "gnutls/x509.h" |
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c index f15cda2f3..539760966 100644 --- a/src/hostlist/gnunet-daemon-hostlist_client.c +++ b/src/hostlist/gnunet-daemon-hostlist_client.c | |||
@@ -30,11 +30,8 @@ | |||
30 | #include "gnunet_transport_service.h" | 30 | #include "gnunet_transport_service.h" |
31 | #include "gnunet_peerinfo_service.h" | 31 | #include "gnunet_peerinfo_service.h" |
32 | #include "gnunet-daemon-hostlist.h" | 32 | #include "gnunet-daemon-hostlist.h" |
33 | #if HAVE_CURL_CURL_H | 33 | /* Just included for the right curl.h */ |
34 | #include <curl/curl.h> | 34 | #include "gnunet_curl_lib.h" |
35 | #elif HAVE_GNURL_CURL_H | ||
36 | #include <gnurl/curl.h> | ||
37 | #endif | ||
38 | 35 | ||
39 | 36 | ||
40 | 37 | ||
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 0cbef9c73..86cb54f6b 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h | |||
@@ -29,9 +29,9 @@ | |||
29 | */ | 29 | */ |
30 | #ifndef GNUNET_CURL_LIB_H | 30 | #ifndef GNUNET_CURL_LIB_H |
31 | #define GNUNET_CURL_LIB_H | 31 | #define GNUNET_CURL_LIB_H |
32 | #if HAVE_CURL_CURL_H | 32 | #if HAVE_LIBCURL |
33 | #include <curl/curl.h> | 33 | #include <curl/curl.h> |
34 | #elif HAVE_GNURL_CURL_H | 34 | #elif HAVE_LIBGNURL |
35 | #include <gnurl/curl.h> | 35 | #include <gnurl/curl.h> |
36 | #else | 36 | #else |
37 | #error "needs curl or gnurl" | 37 | #error "needs curl or gnurl" |
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 069277a00..90405fe37 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -37,11 +37,8 @@ | |||
37 | * you should get a warning that gnunet-dns2gns failed to 'bind'. | 37 | * you should get a warning that gnunet-dns2gns failed to 'bind'. |
38 | */ | 38 | */ |
39 | #include "platform.h" | 39 | #include "platform.h" |
40 | #if HAVE_CURL_CURL_H | 40 | /* Just included for the right curl.h */ |
41 | #include <curl/curl.h> | 41 | #include "gnunet_curl_lib.h" |
42 | #elif HAVE_GNURL_CURL_H | ||
43 | #include <gnurl/curl.h> | ||
44 | #endif | ||
45 | #include <microhttpd.h> | 42 | #include <microhttpd.h> |
46 | #include "gnunet_identity_service.h" | 43 | #include "gnunet_identity_service.h" |
47 | #include "gnunet_namestore_service.h" | 44 | #include "gnunet_namestore_service.h" |
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index 0afd0f94b..7cc77fe24 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c | |||
@@ -24,11 +24,8 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #if HAVE_CURL_CURL_H | 27 | /* Just included for the right curl.h */ |
28 | #include <curl/curl.h> | 28 | #include "gnunet_curl_lib.h" |
29 | #elif HAVE_GNURL_CURL_H | ||
30 | #include <gnurl/curl.h> | ||
31 | #endif | ||
32 | #include <microhttpd.h> | 29 | #include <microhttpd.h> |
33 | #include "gnunet_vpn_service.h" | 30 | #include "gnunet_vpn_service.h" |
34 | #include "gnunet_testing_lib.h" | 31 | #include "gnunet_testing_lib.h" |
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h index 6867d3b9d..b6ada8f86 100644 --- a/src/transport/plugin_transport_http.h +++ b/src/transport/plugin_transport_http.h | |||
@@ -41,11 +41,8 @@ | |||
41 | #include "gnunet_os_lib.h" | 41 | #include "gnunet_os_lib.h" |
42 | #include "gnunet_nat_lib.h" | 42 | #include "gnunet_nat_lib.h" |
43 | #include "microhttpd.h" | 43 | #include "microhttpd.h" |
44 | #if HAVE_CURL_CURL_H | 44 | /* Just included for the right curl.h */ |
45 | #include <curl/curl.h> | 45 | #include "gnunet_curl_lib.h" |
46 | #elif HAVE_GNURL_CURL_H | ||
47 | #include <gnurl/curl.h> | ||
48 | #endif | ||
49 | 46 | ||
50 | 47 | ||
51 | #define DEBUG_HTTP GNUNET_EXTRA_LOGGING | 48 | #define DEBUG_HTTP GNUNET_EXTRA_LOGGING |
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 3c8dc21e5..c4d70d4c3 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -49,11 +49,8 @@ | |||
49 | #include "gnunet_protocols.h" | 49 | #include "gnunet_protocols.h" |
50 | #include "gnunet_transport_plugin.h" | 50 | #include "gnunet_transport_plugin.h" |
51 | #include "plugin_transport_http_common.h" | 51 | #include "plugin_transport_http_common.h" |
52 | #if HAVE_CURL_CURL_H | 52 | /* Just included for the right curl.h */ |
53 | #include <curl/curl.h> | 53 | #include "gnunet_curl_lib.h" |
54 | #elif HAVE_GNURL_CURL_H | ||
55 | #include <gnurl/curl.h> | ||
56 | #endif | ||
57 | 54 | ||
58 | 55 | ||
59 | #define LOG(kind,...) GNUNET_log_from(kind, PLUGIN_NAME, __VA_ARGS__) | 56 | #define LOG(kind,...) GNUNET_log_from(kind, PLUGIN_NAME, __VA_ARGS__) |