[Csync2] [PATCH] Fix TLS configure and build
Angus Salkeld
asalkeld at redhat.com
Mon Feb 14 13:00:39 CET 2011
1) USE_GNUTLS was been defined but HAVE_LIBGNUTLS was been
looked for.
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
More information about the Csync2
mailing list