summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac53
1 files changed, 36 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index ec30ff12ae..f4b188aaab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,7 +708,7 @@ AC_ARG_ENABLE([gcrypt],
if test "x${have_gcrypt}" != xno ; then
m4_define([AM_PATH_LIBGCRYPT_FAIL],
- [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT headers not found.]); }]
+ [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT/GPG-ERROR headers not found.]); }]
)
m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
[1.4.5],
@@ -723,12 +723,22 @@ if test "x${have_gcrypt}" != xno ; then
[AM_PATH_LIBGCRYPT_FAIL]
)
- if test "x$have_gcrypt" = xyes ; then
- GCRYPT_LIBS="$LIBGCRYPT_LIBS"
- GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
+ have_gpg_error=no
+ m4_ifdef([AM_PATH_GPG_ERROR], [AM_PATH_GPG_ERROR(
+ [1.12],
+ [have_gpg_error=yes],
+ [AM_PATH_LIBGCRYPT_FAIL]
+ )],
+ [AM_PATH_LIBGCRYPT_FAIL]
+ )
+
+ if test "x$have_gcrypt" = xyes -a "x$have_gpg_error" = xyes ; then
+ GCRYPT_LIBS="$LIBGCRYPT_LIBS $GPG_ERROR_LIBS"
+ GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS $GPG_ERROR_CFLAGS"
AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
else
have_gcrypt=no
+ have_gpg_error=no
fi
else
GCRYPT_LIBS=
@@ -839,18 +849,6 @@ fi
AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
# ------------------------------------------------------------------------------
-have_microhttpd=no
-AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
-if test "x$enable_microhttpd" != "xno"; then
- PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
- [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
- if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
- AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
- fi
-fi
-AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
-
-# ------------------------------------------------------------------------------
have_gnutls=no
AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
if test "x$enable_gnutls" != "xno"; then
@@ -863,11 +861,29 @@ fi
AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
# ------------------------------------------------------------------------------
+have_microhttpd=no
+AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
+if test "x$enable_microhttpd" != "xno"; then
+ PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
+ [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available])
+ have_microhttpd=yes
+ M4_DEFINES="$M4_DEFINES -DHAVE_MICROHTTPD"],
+ [have_microhttpd=no])
+ if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
+ AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
+ fi
+fi
+AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
+
+# ------------------------------------------------------------------------------
have_libcurl=no
AC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
if test "x$enable_libcurl" != "xno"; then
PKG_CHECK_MODULES(LIBCURL, [libcurl],
- [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
+ [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available])
+ have_libcurl=yes
+ M4_DEFINES="$M4_DEFINES -DHAVE_LIBCURL"],
+ [have_libcurl=no])
if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
AC_MSG_ERROR([*** libcurl support requested but libraries not found])
fi
@@ -875,6 +891,9 @@ fi
AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
# ------------------------------------------------------------------------------
+AM_CONDITIONAL(HAVE_REMOTE, [test "$have_microhttpd" = "yes" -o "$have_libcurl" = "yes"])
+
+# ------------------------------------------------------------------------------
have_libidn=no
AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
if test "x$enable_libidn" != "xno"; then