From 9c57c788237e66e4f40cf9919b583bb8ecf30523 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 22 Aug 2012 08:13:47 +0000 Subject: libcurl check --- configure.ac | 15 ++++++++++++++- src/transport/Makefile.am | 7 ++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 714610a01..78f7be9ab 100644 --- a/configure.ac +++ b/configure.ac @@ -326,7 +326,14 @@ AC_LANG_POP(C) fi # $build = $target # libcurl -LIBCURL_CHECK_CONFIG(,7.21.3,,AC_MSG_ERROR([GNUnet requires libcurl >= 7.21.3])) +LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0) +if test "$curl" = 1 +then + AM_CONDITIONAL(HAVE_LIBCURL, true) + AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl]) +else + AM_CONDITIONAL(HAVE_LIBCURL, false) +fi # restore LIBS LIBS=$SAVE_LIBS @@ -1123,6 +1130,12 @@ then AC_MSG_NOTICE([NOTICE: sqlite not found. sqLite support will not be compiled.]) fi +# libcurl +if test "x$curl" = "x0" +then + AC_MSG_NOTICE([NOTICE: libcurl not found. http client support will not be compiled.]) +fi + #gnutls if test x$gnutls != xtrue then diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 6447b1152..83428a20a 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -14,9 +14,10 @@ if HAVE_MHD HTTPS_SERVER_PLUGIN_LA = libgnunet_plugin_transport_https_server.la endif -HTTP_CLIENT_PLUGIN_LA = libgnunet_plugin_transport_http_client.la -HTTPS_CLIENT_PLUGIN_LA = libgnunet_plugin_transport_https_client.la - +if HAVE_LIBCURL + HTTP_CLIENT_PLUGIN_LA = libgnunet_plugin_transport_http_client.la + HTTPS_CLIENT_PLUGIN_LA = libgnunet_plugin_transport_https_client.la +endif if FALSE HTTP_API_TEST = test_transport_api_http -- cgit v1.2.3