aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-21 11:06:11 +0000
committerChristian Grothoff <christian@grothoff.org>2015-06-21 11:06:11 +0000
commit511156f37bbd1f0a8ae9deb98d2b3eea7586dfa1 (patch)
treef63412717bad83d51332ebcb241ba532cce847a2 /configure.ac
parent5d82ad8f9164461be16f62436542e098934340d4 (diff)
downloadgnunet-511156f37bbd1f0a8ae9deb98d2b3eea7586dfa1.tar.gz
gnunet-511156f37bbd1f0a8ae9deb98d2b3eea7586dfa1.zip
support gnurl's curl.h being in include/gnurl/ OR include/curl/
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 24 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 8473f8830..37c03f720 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,18 +461,35 @@ else
461 AM_CONDITIONAL(HAVE_LIBGNURL, false) 461 AM_CONDITIONAL(HAVE_LIBGNURL, false)
462fi 462fi
463 463
464SAVE_CPPFLAGS=$CPPFLAGS
465CPPFLAGS="$LIBGNURL_CPPFLAGS $LIBCURL_CPPFLAGS $CPPFLAGS"
466LIBS="$LIBGNURL $LIBCURL $LIBS"
467
464# libcurl-gnutls 468# libcurl-gnutls
465LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false]) 469LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false])
466if test "x$curl" = xtrue 470if test "x$curl" = xtrue
467then 471then
472
468 AC_CHECK_HEADERS([curl/curl.h], 473 AC_CHECK_HEADERS([curl/curl.h],
469 AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]), 474 AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]),
470 [curl=false]) 475 [curl=false])
476 AC_CHECK_HEADERS([gnurl/curl.h],
477 AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],,[[#include <gnurl/curl.h>]]))
471 # need libcurl-gnutls.so, everything else is not acceptable 478 # need libcurl-gnutls.so, everything else is not acceptable
472 AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false]) 479 AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false])
473 # cURL must support CURLINFO_TLS_SESSION, version >= 7.34 480 # cURL must support CURLINFO_TLS_SESSION, version >= 7.34
474
475fi 481fi
482
483# Check for curl/curl.h and gnurl/curl.h so we can use #ifdef
484# HAVE_CURL_CURL_H later (the above LIBCURL_CHECK_CONFIG accepted
485# *either* header set).
486AC_CHECK_HEADERS([curl/curl.h],,
487 curl=false
488 AC_CHECK_HEADERS([gnurl/curl.h],,
489 gnurl=false))
490
491
492
476if test x$curl = xfalse 493if test x$curl = xfalse
477then 494then
478 AM_CONDITIONAL(HAVE_LIBCURL, false) 495 AM_CONDITIONAL(HAVE_LIBCURL, false)
@@ -486,10 +503,9 @@ else
486fi 503fi
487 504
488 505
489 506# restore LIBS & CPPFLAGS
490# restore LIBS
491LIBS=$SAVE_LIBS 507LIBS=$SAVE_LIBS
492 508CPPFLAGS=$SAVE_CPPFLAGS
493 509
494AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false]) 510AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false])
495# GLPK must support glpk_init_env, version >= 4.43 511# GLPK must support glpk_init_env, version >= 4.43
@@ -1641,9 +1657,9 @@ then
1641fi 1657fi
1642 1658
1643# libgnurl 1659# libgnurl
1644if test "x$gnurl" = "x0" 1660if test "x$gnurl" = "xfalse"
1645then 1661then
1646 if test "x$curl" = "x0" 1662 if test "x$curl" = "xfalse"
1647 then 1663 then
1648 AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.]) 1664 AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.])
1649 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon]) 1665 AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])