1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

Make it possible to disable gnutls at configure time,

until someone will finally decide to fix it.
(This used to be commit 0671dce355)
This commit is contained in:
Simo Sorce
2008-06-08 19:16:26 -04:00
parent cad533c68e
commit 4a0582438f

View File

@ -1,11 +1,21 @@
###############################
# start SMB_EXT_LIB_GNUTLS
# check for gnutls/gnutls.h and -lgnutls
SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls,
use_gnutls=yes
AC_ARG_ENABLE(gnutls,
[ --enable-gnutls Turn on gnutls support (default=yes)],
[if test x$enable_gnutls = xno; then
use_gnutls=no
fi])
if test x$use_gnutls = xyes; then
SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls,
[SMB_ENABLE_GNUTLS=YES],
[SMB_ENABLE_GNUTLS=NO])
if test x$SMB_ENABLE_GNUTLS = xNO; then
if test x$SMB_ENABLE_GNUTLS = xNO; then
AC_CHECK_HEADERS(gnutls/gnutls.h)
AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init)
AC_CHECK_DECL(gnutls_x509_crt_set_version,
@ -22,12 +32,13 @@ if test x$SMB_ENABLE_GNUTLS = xNO; then
])
fi
SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS)
fi
if test x$SMB_ENABLE_GNUTLS = xYES; then
fi
if test x$SMB_ENABLE_GNUTLS = xYES; then
#Some older versions have a different type name
AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"])
AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"])
AC_DEFINE(ENABLE_GNUTLS,1,[Whether we have gnutls support (SSL)])
fi
fi
# end SMB_EXT_LIB_GNUTLS
###############################