Check for GnuTLS >= 2.11 only if we have GnuTLS >= 2.2
authorColin Leroy <colin@colino.net>
Mon, 2 Jun 2014 14:06:37 +0000 (16:06 +0200)
committerColin Leroy <colin@colino.net>
Mon, 2 Jun 2014 14:06:37 +0000 (16:06 +0200)
configure.ac

index 19bae06..0740ec1 100644 (file)
@@ -474,18 +474,18 @@ if test "x$enable_gnutls" != "xno"; then
         [
                 AC_DEFINE(USE_GNUTLS, 1, gnutls)
                 echo "Building with GnuTLS"
+               PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
+               [
+                       dnl No linking against libgcrypt needed
+               ],
+               [
+                       dnl linking against libgcrypt *is* needed
+                       GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
+               ])
         ],
         [
                 echo "Building without gnutls"
         ])
-        PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
-        [
-                dnl No linking against libgcrypt needed
-        ],
-        [
-                dnl linking against libgcrypt *is* needed
-                GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
-        ])
         AC_SUBST(GNUTLS_LIBS)
         AC_SUBST(GNUTLS_CFLAGS)
 fi