summaryrefslogtreecommitdiff
blob: 48d19cf9ccfbd2ffba79fd27787d5d44d6209ca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,12 @@
 AC_CHECK_FUNCS(getopt_long)
 AC_CHECK_FUNCS(getaddrinfo)
 
-AM_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
+AC_ARG_WITH([gnutls],
+            [AS_HELP_STRING([--with-gnutls],
+                            [Enable use of GnuTLS])])
+if test "$with_gnutls" != "no"; then
+  PKG_CHECK_MODULES(LIBGNUTLS, gnutls, AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
+fi
 
 dnl Check -Wall flag of GCC
 if test "x$GCC" = "xyes"; then