GnuTLS recently switched back to a compatible license (LGPLv2.1+).
authorGerald Combs <gerald@wireshark.org>
Sat, 6 Apr 2013 15:39:39 +0000 (15:39 -0000)
committerGerald Combs <gerald@wireshark.org>
Sat, 6 Apr 2013 15:39:39 +0000 (15:39 -0000)
Update our checks accordingly.

svn path=/trunk/; revision=48758

configure.ac

index c5cd70f47d3a00dedf6e0676b1e6eab0f7212898..5a4dd389b121fb048de62aea5996efed049e8bf6 100644 (file)
@@ -191,24 +191,39 @@ AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
 AC_SYS_LARGEFILE
 
 # GnuTLS
-# Version 3.0 switched from LGPLv2.1+ to LGPLv3+.
+# Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to
+# LGPLv2.1+ in versions 3.0.29 and 3.1.10
 tls_message="no"
 AC_ARG_WITH([gnutls],
   AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@],
                  [use GnuTLS library @<:@default=yes@:>@]),
   with_gnutls="$withval", with_gnutls="yes")
 if test "x$with_gnutls" = "xyes"; then
-  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0 gnutls < 3],
-        [
-                echo "GnuTLS found, enabling SSL decryption"
-                AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use GnuTLS library])
-                tls_message="yes"
-        ]
-        , [
-                echo "GnuTLS not found, disabling SSL decryption"
-                tls_message="no"
-        ]
+  have_license_compatible_gnutls="no"
+  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.10 ],
+    [ have_license_compatible_gnutls="yes" ], [ echo "GnuTLS >= 3.1.10 not found " ]
   )
+
+  if test "x$have_license_compatible_gnutls" != "xyes"; then
+    PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.0.29 gnutls < 3.1 ],
+      [ have_license_compatible_gnutls="yes" ], [ echo "GnuTLS >= 3.0.29 not found " ]
+    )
+  fi
+
+  if test "x$have_license_compatible_gnutls" != "xyes"; then
+    PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0 gnutls < 3],
+      [ have_license_compatible_gnutls="yes" ] , [ echo "GnuTLS >= 1.2.0, < 3.0 not found " ]
+    )
+  fi
+
+  if test "x$have_license_compatible_gnutls" = "xyes"; then
+    echo "GnuTLS found, enabling SSL decryption"
+    AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use GnuTLS library])
+    tls_message="yes"
+  else
+    echo "GnuTLS with compatible license not found, disabling SSL decryption"
+    tls_message="no"
+  fi
 fi
 
 # libgrypt