[Csync2] csync2 without gnutls-openssl?

Giampaolo Tomassoni Giampaolo at Tomassoni.biz
Thu Jul 29 01:06:44 CEST 2010


> Isn't it easier to rely on whatever libgnutls-dev ships
> for integration with autofoo.
> 
> I don't like to include compatibility cruft just because we can,
> or adding new files to version control if a one-line diff would be
> sufficient.
> 
> Anyways, if you insist, how about:
> 
> diff --git a/configure.ac b/configure.ac
> index a3ef7ee..3aa600c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -78,7 +78,14 @@ AC_ARG_ENABLE([gnutls],
>  if test "$enable_gnutls" != no
>  then
>  	# Check for gnuTLS.
> -	AM_PATH_LIBGNUTLS(1.0.0, , [ AC_MSG_ERROR([[gnutls not found;
> install gnutls, gnutls-openssl and libtasn1 packages for your system or
> run configure with --disable-gnutls]]) ])
> +	PKG_CHECK_MODULES(LIBGNUTLS, gnutls >= 1.0.0,, [
> +		ifdef([AM_PATH_LIBGNUTLS],
> +			[AM_PATH_LIBGNUTLS(1.0.0, , AC_MSG_ERROR([[gnutls
not
> found; install gnutls and libtasn1 packages for your system or run
> configure with --disable-gnutls]]))],
> +			[AC_MSG_ERROR([
> +***  Neither pkg-config nor older .m4 macros found for libgnutls.
> +***  Install libgnutls development packages and rerun autogen.sh,
> +***  or --disable-gnutls])])
> +	])

This is fine to me: most of the stuff in the libgnutls.m4 I dropped to this
list was from the gnutls project. Nevertheless, I too believe it was a bit
pedantic in checking libgnutls usability...

Your solution seems clever to me.

I don't agree with you to not have a copy of m4/pkg.m4 and/or
m4/libgnutls.m4. But I don't even agree with the gnutls project shipping
macros named AM_PATH_LIBGNUTLS (the AM_ prefix is misleading: it is not a
macro supplied by automake...). So, after all this is not important as long
as csync2 comes out with a working "configure" script: it is a matter of
taste at best...

+1 for me

Giampaolo


>  	## This is a bloody hack for fedora core
>  	CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"



More information about the Csync2 mailing list