AC_FUNC_FSEEKO
-if test "$enable_shared" = "no"
-then
- AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
-fi
-
CFLAGS="-Wall $CFLAGS"
# use '-fno-strict-aliasing', but only if the compiler can take it
if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
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_SUBST(Z_CFLAGS)
AC_SUBST(Z_LIBS)
+if test "$enable_shared" = "no"
+then
+ AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
+fi
+
# restore LIBS
# Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
-AC_CHECK_HEADERS([malloc.h malloc/malloc.h malloc/malloc_np.h langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h unistd.h kstat.h sys/sysinfo.h kvm.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h])
+AC_CHECK_HEADERS([malloc.h malloc/malloc.h malloc/malloc_np.h langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h unistd.h kstat.h sys/sysinfo.h kvm.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h byteswap.h])
# FreeBSD requires something more funky for netinet/in_systm.h and netinet/ip.h...
AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,,
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])