tags 529906 patch
thanks

On 2009-05-22 Andreas Metzler <ametz...@downhill.at.eu.org> wrote:
> Package: lftp
> Version: 3.7.13-1
> Severity: important

> The package's ./configure script is trying to invoke libgnutls-config
> and/or libgnutls-extra-config to search for the gnutls library. Newer
> versions of gnutls do not ship these scripts anymore.

> The second release candidata of gnutls 2.8 (2.7.12) is available for
> testing in Debian/experimental.

> Please use another way to search for the gnutls library, e.g.
> pkg-config
[...]

Hello,
Attached a patch for using pkg-config instead.

lftp currently contains workarounds for ancient (pre 1.2.1) gnutls
versions (see LFTP_LIBGNUTLS_VERSION_CODE). pkg-config is the only way
to find this version number both in current and ancient versions of
gnutls. If upstream does not want to use pkg-config they can do two
things:

1. Use libgnutls-config if available, otherwise use a standard
autoconf test to find the library and pull the definition of
LIBGNUTLS_VERSION_NUMBER from gnutls.h to get the version. Please note
that newer gnutls upstream does not include the m4 code for invocation
of libgnutls-config (AM_PATH_LIBGNUTLS), therefore you'll need to ship
a private copy.

2. Simplify the whole situation by dropping the workarounds for ancient
gnutls, therefore making LFTP_LIBGNUTLS_VERSION_CODE unnecessary, and
use a standard autoconf test.

2 is probably a good idea even if they switch to pkg-config. ;-)
cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
--- lftp-3.7.14/configure.ac	2009-05-15 08:22:34.000000000 +0200
+++ lftp.configure.ac	2009-06-13 12:58:39.000000000 +0200
@@ -266,9 +266,10 @@
 			with_gnutls=no;;
 esac
 if test x$with_gnutls = xyes; then
-   AM_PATH_LIBGNUTLS([1.0.0], [
+   PKG_PROG_PKG_CONFIG
+   PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0], [
       AC_DEFINE([USE_GNUTLS], 1, [Define to 1 when using GNU TLS library])
-      gnutls_version_code=`echo $libgnutls_config_version | $AWK -F. '{ printf "0x%02X%02X%02X\n",$1,$2,$3 }'`
+      gnutls_version_code=`$PKG_CONFIG --modversion gnutls | $AWK -F. '{ printf "0x%02X%02X%02X\n",$1,$2,$3 }'`
       AC_DEFINE_UNQUOTED([LFTP_LIBGNUTLS_VERSION_CODE], $gnutls_version_code, [Define to libgnutls version, e.g. 0x010203 for 1.2.3])
    ])
 fi

Reply via email to