From david at davidfavor.com  Fri Apr 22 17:27:30 2011
From: david at davidfavor.com (David Favor)
Date: Fri, 22 Apr 2011 10:27:30 -0500
Subject: [Csync2] csync svn 422 gnutls sensing + disable both broken
Message-ID: <4DB19E62.5090807@davidfavor.com>

svn checkout http://svn.linbit.com/csync2/trunk csync2
cd csync2
./configure --disable-gnutls
... ... ...
./configure: line 3957: syntax error near unexpected token `1.0.0,'
./configure: line 3957: `    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]]) )'

uname -a
Linux net1.insidetrackparty.com 2.6.35-28-server #50-Ubuntu SMP Fri Mar 18 18:59:25 UTC 2011 x86_64 GNU/Linux

Docs say openssl has been replaced by gnutls support
and currently autoconf macros appear broken for gnutls,
so... what can I do to build a copy of csync2?

-- 
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!

From lars.ellenberg at linbit.com  Sat Apr 23 09:36:00 2011
From: lars.ellenberg at linbit.com (Lars Ellenberg)
Date: Sat, 23 Apr 2011 09:36:00 +0200
Subject: [Csync2] csync svn 422 gnutls sensing + disable both broken
In-Reply-To: <4DB19E62.5090807@davidfavor.com>
References: <4DB19E62.5090807@davidfavor.com>
Message-ID: <20110423073600.GD10976@barkeeper1-xen.linbit>

On Fri, Apr 22, 2011 at 10:27:30AM -0500, David Favor wrote:
> svn checkout http://svn.linbit.com/csync2/trunk csync2
> cd csync2
> ./configure --disable-gnutls
> ... ... ...
> ./configure: line 3957: syntax error near unexpected token `1.0.0,'
> ./configure: line 3957: `    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]]) )'
> 
> uname -a
> Linux net1.insidetrackparty.com 2.6.35-28-server #50-Ubuntu SMP Fri Mar 18 18:59:25 UTC 2011 x86_64 GNU/Linux
> 
> Docs say openssl has been replaced by gnutls support
> and currently autoconf macros appear broken for gnutls,
> so... what can I do to build a copy of csync2?

a) Run autogen.sh first.
b) Try http://git.linbit.com/csync2.git/
	which obsoletes the svn repo.
	We need to disable that svn repo somehow...
c) Install necessary -devel (or -dev) packages.
	debian based: librsync-dev, libsqlite3-dev, libgnutls-dev
	rpm based: sqlite-devel gnutls-devel librsync-devel

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

From asalkeld at redhat.com  Wed Apr 27 00:20:59 2011
From: asalkeld at redhat.com (Angus Salkeld)
Date: Wed, 27 Apr 2011 08:20:59 +1000
Subject: [Csync2] [PATCH] Fix TLS configure and build
In-Reply-To: <20110423073600.GD10976@barkeeper1-xen.linbit>
References: <20110423073600.GD10976@barkeeper1-xen.linbit>
Message-ID: <1303856459-3307-1-git-send-email-asalkeld@redhat.com>

I needed this patch to work correctly.

1) USE_GNUTLS was been defined but HAVE_LIBGNUTLS was been
   looked for in the code.
2) use the LIBGNUTLS_* variables in the makefile

Signed-off-by: Angus Salkeld <asalkeld at redhat.com>
---
 Makefile.am  |    3 ++-
 configure.ac |    6 +-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 5229f95..06b9c2d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,7 +38,7 @@ dist-clean-local:
 	rm -rf autom4te.cache
 
 AM_CFLAGS=
-AM_LDFLAGS=
+AM_LDFLAGS=$(LIBGNUTLS_LIBS)
 
 if PRIVATE_LIBRSYNC
   BUILT_SOURCES += private_librsync
@@ -49,6 +49,7 @@ endif
 
 AM_CPPFLAGS  = -D'DBDIR="$(localstatedir)/lib/csync2"'
 AM_CPPFLAGS += -D'ETCDIR="$(sysconfdir)"'
+AM_CPPFLAGS += $(LIBGNUTLS_CFLAGS)
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
diff --git a/configure.ac b/configure.ac
index 3708321..bf82322 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,14 +79,10 @@ then
 	##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_PROG_PKG_CONFIG
    PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0], [
-      AC_DEFINE([USE_GNUTLS], 1, [Define to 1 when using GNU TLS library])
+      AC_DEFINE([HAVE_LIBGNUTLS], 1, [Define to 1 when using GNU TLS library])
       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])
    ])
-
-	## This is a bloody hack for fedora core
-	#CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
-	#LIBS="$LIBS $LIBGNUTLS_LIBS -ltasn1"
 fi
 AM_CONDITIONAL([HAVE_LIBGNUTLS], [test "$enable_gnutls" != no ])
 
-- 
1.7.4.4


