summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in36
1 files changed, 35 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 86cb99fa..7ae486ce 100644
--- a/configure.in
+++ b/configure.in
@@ -103,6 +103,7 @@ dnl Checks for programs.
103AC_PATH_PROG(PYTHON,python) 103AC_PATH_PROG(PYTHON,python)
104AC_PATH_PROG(SH,sh) 104AC_PATH_PROG(SH,sh)
105AC_PATH_PROG(PERL,perl) 105AC_PATH_PROG(PERL,perl)
106AC_PATH_PROG(LIBGNUTLS_CONFIG,libgnutls-config)
106 107
107dnl allow them to override the path of perl 108dnl allow them to override the path of perl
108AC_ARG_WITH(perl, 109AC_ARG_WITH(perl,
@@ -111,6 +112,12 @@ AC_ARG_WITH(perl,
111 with_perl=$withval,with_perl=$PERL) 112 with_perl=$withval,with_perl=$PERL)
112AC_SUBST(PERL, $with_perl) 113AC_SUBST(PERL, $with_perl)
113 114
115dnl allow for gnutls, if it exists, instead of openssl
116AC_ARG_WITH(gnutls,
117 ACX_HELP_STRING([--with-gnutls=PATH],
118 [path to gnutls installation root]),
119 GNUTLS=$withval)
120
114AC_PATH_PROG(HOSTNAME,hostname) 121AC_PATH_PROG(HOSTNAME,hostname)
115AC_PATH_PROG(BASENAME,basename) 122AC_PATH_PROG(BASENAME,basename)
116 123
@@ -409,6 +416,7 @@ if test "$FOUNDINCLUDE" = "no"; then
409 CPPFLAGS="$_SAVEDCPPFLAGS" 416 CPPFLAGS="$_SAVEDCPPFLAGS"
410fi 417fi
411 418
419
412dnl Check for OpenSSL location 420dnl Check for OpenSSL location
413AC_PATH_PROG(OPENSSL,openssl) 421AC_PATH_PROG(OPENSSL,openssl)
414if test "$OPENSSL" = "/usr/bin/openssl"; then 422if test "$OPENSSL" = "/usr/bin/openssl"; then
@@ -478,18 +486,43 @@ else
478 fi 486 fi
479fi 487fi
480 488
489dnl check for gnutls if openssl isn't found (or is disabled)
490FOUNDGNUTLS="no"
491if ! test "$FOUNDSSL" = "yes"; then
492 if test "$GNUTLS" = ""; then
493 CPPFLAGS="$CPPFLAGS -I$GNUTLS"
494 elif ! test "$LIBGNUTLS_CONFIG" = ""; then
495 CPPFLAGS="$CPPFLAGS -I`$LIBGNUTLS_CONFIG --prefix`"
496 fi
497 AC_CHECK_HEADERS([gnutls/openssl.h],FOUNDGNUTLS="yes",)
498 if test "$FOUNDGNUTLS" = "yes"; then
499 AC_CHECK_LIB(gnutls-openssl,main,SSLLIBS="-lgnutls-openssl")
500 FOUNDSSL="yes"
501 fi
502fi
503dnl end check for gnutls
504
481if test "$FOUNDSSL" = "yes"; then 505if test "$FOUNDSSL" = "yes"; then
482 check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp" 506 check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp"
483 AC_SUBST(check_tcp_ssl) 507 AC_SUBST(check_tcp_ssl)
484 AC_SUBST(SSLLIBS) 508 AC_SUBST(SSLLIBS)
485 AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found]) 509 AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found])
486 with_openssl="yes" 510 if test "$FOUNDGNUTLS" = "no"; then
511 AC_DEFINE(USE_OPENSSL,1,[Define if using OpenSSL libraries])
512 with_openssl="yes"
513 with_gnutls="no"
514 else
515 AC_DEFINE(USE_GNUTLS,1,[Define if using gnutls libraries])
516 with_gnutls="yes"
517 with_openssl="no"
518 fi
487else 519else
488 if test "$FOUNDSSL" = "no"; then 520 if test "$FOUNDSSL" = "no"; then
489 AC_MSG_WARN([OpenSSL libs could not be found]) 521 AC_MSG_WARN([OpenSSL libs could not be found])
490 dnl else deliberately disabled 522 dnl else deliberately disabled
491 fi 523 fi
492 with_openssl="no" 524 with_openssl="no"
525 with_gnutls="no"
493 CPPFLAGS="$_SAVEDCPPFLAGS" 526 CPPFLAGS="$_SAVEDCPPFLAGS"
494 LDFLAGS="$_SAVEDLDFLAGS" 527 LDFLAGS="$_SAVEDLDFLAGS"
495fi 528fi
@@ -1597,4 +1630,5 @@ ACX_FEATURE([with],[ping6-command])
1597ACX_FEATURE([with],[lwres]) 1630ACX_FEATURE([with],[lwres])
1598ACX_FEATURE([with],[ipv6]) 1631ACX_FEATURE([with],[ipv6])
1599ACX_FEATURE([with],[openssl]) 1632ACX_FEATURE([with],[openssl])
1633ACX_FEATURE([with],[gnutls])
1600ACX_FEATURE([enable],[emulate-getaddrinfo]) 1634ACX_FEATURE([enable],[emulate-getaddrinfo])