bluetooth=1
fi
+
# check for libpulse(audio) library
pulse=0
AC_CHECK_LIB(pulse,pa_stream_peek,
AM_CONDITIONAL(HAVE_LIBGNURL, false)
fi
+SAVE_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$LIBGNURL_CPPFLAGS $LIBCURL_CPPFLAGS $CPPFLAGS"
+LIBS="$LIBGNURL $LIBCURL $LIBS"
+
# libcurl-gnutls
LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false])
if test "x$curl" = xtrue
then
+
AC_CHECK_HEADERS([curl/curl.h],
- AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]),
- [curl=false])
+ AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include <curl/curl.h>]]),
+ [curl=false])
+ AC_CHECK_HEADERS([gnurl/curl.h],
+ AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],,[[#include <gnurl/curl.h>]]))
# need libcurl-gnutls.so, everything else is not acceptable
AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false])
# cURL must support CURLINFO_TLS_SESSION, version >= 7.34
-
fi
+
+# Check for curl/curl.h and gnurl/curl.h so we can use #ifdef
+# HAVE_CURL_CURL_H later (the above LIBCURL_CHECK_CONFIG accepted
+# *either* header set).
+AC_CHECK_HEADERS([curl/curl.h],,
+ curl=false
+ AC_CHECK_HEADERS([gnurl/curl.h],,
+ gnurl=false))
+
+
+
if test x$curl = xfalse
then
AM_CONDITIONAL(HAVE_LIBCURL, false)
fi
-
-# restore LIBS
+# restore LIBS & CPPFLAGS
LIBS=$SAVE_LIBS
-
+CPPFLAGS=$SAVE_CPPFLAGS
AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false])
# GLPK must support glpk_init_env, version >= 4.43
AC_CHECK_HEADERS([microhttpd.h],
AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
- [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.32])
+ [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include "$native_srcdir/src/include/platform.h"
#include <microhttpd.h>
- #if (MHD_VERSION < 0x0093200)
- #error needs at least version 0.9.32
+ #if (MHD_VERSION < 0x0094200)
+ #error needs at least version 0.9.42
#endif
int main () { return 0; }
])],
AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
- [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.32])
+ [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include "$native_srcdir/src/include/platform.h"
#include <microhttpd.h>
- #if (MHD_VERSION < 0x0093200)
- #error needs at least version 0.9.32
+ #if (MHD_VERSION < 0x0094200)
+ #error needs at least version 0.9.42
#endif
int main () { return 0; }
])],
AC_CHECK_HEADERS([microhttpd.h],
AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
- [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.32])
+ [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include "$native_srcdir/src/include/platform.h"
#include <microhttpd.h>
- #if (MHD_VERSION < 0x0093200)
- #error needs at least version 0.9.32
+ #if (MHD_VERSION < 0x0094200)
+ #error needs at least version 0.9.42
#endif
])],
[AC_MSG_RESULT(ok)
fi
# libgnurl
-if test "x$gnurl" = "x0"
+if test "x$gnurl" = "xfalse"
then
- if test "x$curl" = "x0"
+ if test "x$curl" = "xfalse"
then
AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.])
AC_MSG_WARN([ERROR: libgnurl not found. hostlist daemon will not be compiled, and you probably WANT the hostlist daemon])