X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=configure.in;h=99c3865c866f387eb0beb9d9ce677fc866d16014;hb=5085a1f1a84b40944e81a8fe313b33e59bbc9ea5;hp=2e274a242905c479d8421e5ce6b68690be99be50;hpb=0328ac04990bf22e635930aa37abb8c2128a17f1;p=ashd.git diff --git a/configure.in b/configure.in index 2e274a2..99c3865 100644 --- a/configure.in +++ b/configure.in @@ -32,8 +32,32 @@ if test "$HAS_XATTR" = yes; then fi AC_SUBST(XATTR_LIBS) +AH_TEMPLATE(HAVE_GNUTLS, [define to use the GnuTLS library for SSL support]) +AC_ARG_WITH(gnutls, [ --with-gnutls Enable SSL support with the GnuTLS library]) +HAS_GNUTLS="" +if test "$with_gnutls" = no; then HAS_GNUTLS=no; fi +if test -z "$HAS_GNUTLS"; then + AC_CHECK_LIB(gnutls, gnutls_global_init, [:], [HAS_GNUTLS=no]) +fi +if test -z "$HAS_GNUTLS"; then + AC_CHECK_HEADER(gnutls/gnutls.h, [], [HAS_GNUTLS=no]) +fi +if test "$HAS_GNUTLS" != no; then HAS_GNUTLS=yes; fi +if test "$with_gnutls" = yes -a "$HAS_GNUTLS" = no; then + AC_MSG_ERROR([*** cannot find GnuTLS on this system]) +fi +if test "$HAS_GNUTLS" = yes; then + GNUTLS_LIBS=-lgnutls + GNUTLS_CPPFLAGS=-D_GNU_SOURCE + AC_DEFINE(HAVE_GNUTLS) +fi +AC_SUBST(GNUTLS_CPPFLAGS) +AC_SUBST(GNUTLS_LIBS) + AC_OUTPUT([ Makefile src/Makefile +src/dirplex/Makefile lib/Makefile +doc/Makefile ])