| 1 |
AC_DEFUN([AX_ARG_GNUTLS], [ |
| 2 |
AC_ARG_ENABLE(gnutls, |
| 3 |
[ --enable-gnutls Enable GnuTLS support. |
| 4 |
--disable-gnutls Disable GnuTLS support. ], |
| 5 |
[ cf_enable_gnutls=$enableval ], |
| 6 |
[ cf_enable_gnutls="auto" ]) |
| 7 |
|
| 8 |
if test "$cf_enable_openssl" != "auto" && |
| 9 |
test "$cf_enable_openssl" != "yes"; then |
| 10 |
if test "$cf_enable_gnutls" != "no"; then |
| 11 |
|
| 12 |
AC_CHECK_HEADER(gnutls/gnutls.h, [ |
| 13 |
AC_RUN_IFELSE([ |
| 14 |
AC_LANG_PROGRAM([ |
| 15 |
#include <gnutls/gnutls.h> |
| 16 |
#include <stdlib.h>], [ |
| 17 |
exit(!(GNUTLS_VERSION_NUMBER >= 0x030605)); ])], [ AC_CHECK_LIB(gnutls, gnutls_init, [], [])], [], [])]) |
| 18 |
|
| 19 |
AC_MSG_CHECKING(for GnuTLS 3.6.5 and above) |
| 20 |
AS_IF([test "$ac_cv_lib_gnutls_gnutls_init" = "yes"], |
| 21 |
[AC_MSG_RESULT(found)], [AC_MSG_RESULT(no - GnuTLS support disabled)]) |
| 22 |
|
| 23 |
fi |
| 24 |
fi |
| 25 |
]) |