+dnl ------ GNU TLS
+gnutls=default
+AC_ARG_WITH([gnutls], [ --with-gnutls[=PREFIX] GNU TLS library in PREFIX], [gnutls=$withval])
+if test "$gnutls" != "no" -a "$sslver" = "no"; then
+ gnutlsver=no
+ if test "$gnutls" != "yes" -a "$gnutls" != "default"; then
+ if test -x $gnutls/bin/pkg-config; then
+ if $gnutls/bin/pkg-config --exists gnutls; then
+ SSL_CFLAGS=`$gnutls/bin/pkg-config --cflags gnutls`
+ SSL_LIBS="`$gnutls/bin/pkg-config --libs gnutls`"
+ gnutlsver=`$gnutls/bin/pkg-config --modversion gnutls`
+ fi
+ fi
+ else
+ if test "$pkgconfigpath" != "NONE"; then
+ if $pkgconfigpath --exists gnutls; then
+ SSL_CFLAGS=`$pkgconfigpath --cflags gnutls`
+ SSL_LIBS="`$pkgconfigpath --libs gnutls`"
+ gnutlsver=`$pkgconfigpath --modversion gnutls`
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([for GNU TLS])
+ if test "$gnutlsver" != "no"; then
+ AC_DEFINE([HAVE_GNUTLS_H],[1],[Define to 1 if GNUTLS is present])
+ AC_MSG_RESULT([$gnutlsver])
+ else
+ SSL_CFLAGS=""
+ AC_MSG_RESULT([None])
+ if test "$gnutls" != "default"; then
+ AC_MSG_ERROR([GNU TLS development libraries missing])
+ fi
+ fi
+fi