[Xfce4-commits] <xfce4-mailwatch-plugin:master> Fix compilation and linking with libgcrypt
Ján SuÄan
noreply at xfce.org
Tue Aug 27 01:24:01 CEST 2013
Updating branch refs/heads/master
to ea3109ef1e1ed9736cd8d441d6474ef6c82bec1e (commit)
from aaac9b08a5fa8a67876f24a6e017422a72b5db5f (commit)
commit ea3109ef1e1ed9736cd8d441d6474ef6c82bec1e
Author: Ján Sučan <sucan at runbox.com>
Date: Tue Aug 27 01:08:00 2013 +0200
Fix compilation and linking with libgcrypt
Presence of gnutls does not imply the presence of
libgcrypt. Therefore, enable SSL support only if both are present.
configure.ac.in | 13 +++++++++----
libmailwatch-core/Makefile.am | 1 +
panel-plugin/Makefile.am | 3 ++-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 22f2a7f..f2946f1 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -67,13 +67,18 @@ AC_CHECK_FUNCS([xfce_posix_signal_handler_init])
CFLAGS="$saved_CFLAGS"
LIBS="$saved_LIBS"
-dnl check for gnutls support
+dnl check for gnutls and libgcrypt support
XDT_CHECK_OPTIONAL_PACKAGE([GNUTLS], [gnutls], [1.2.0], [ssl],
- [gnutls support for secure IMAP/POP3 connections], [yes])
+ [gnutls and libgcrypt support for secure IMAP/POP3 connections], [yes])
if test "x$GNUTLS_FOUND" = "xyes"; then
- AC_DEFINE([HAVE_SSL_SUPPORT], [1], [Define if SSL support is enabled])
+ dnl libgcrypt does not provide a pkg-config file
+ AM_PATH_LIBGCRYPT([1.2.0], LIBGCRYPT_FOUND=yes, LIBGCRYPT_FOUND=no)
+ if test "x$LIBGCRYPT_FOUND" = "xyes"; then
+ AC_DEFINE([HAVE_SSL_SUPPORT], [1], [Define if SSL support is enabled])
+ fi
fi
-AM_CONDITIONAL([HAVE_SSL_SUPPORT], [test "x$GNUTLS_FOUND" = "xyes"])
+AM_CONDITIONAL([HAVE_SSL_SUPPORT],
+ [test "x$GNUTLS_FOUND" = "xyes" -a "x$LIBGCRYPT_FOUND" = "xyes"])
dnl to ipv6, or to not ipv6
AC_MSG_CHECKING([whether to support IPv6])
diff --git a/libmailwatch-core/Makefile.am b/libmailwatch-core/Makefile.am
index 181992e..59cfb19 100644
--- a/libmailwatch-core/Makefile.am
+++ b/libmailwatch-core/Makefile.am
@@ -29,5 +29,6 @@ libmailwatch_core_la_CFLAGS = \
@GTK_CFLAGS@ \
@LIBXFCEGUI4_CFLAGS@ \
@GNUTLS_CFLAGS@ \
+ @LIBGCRYPT_CFLAGS@ \
-DDATADIR=\"$(datadir)\" \
-DLOCALEDIR=\"$(localedir)\"
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index e62ac8d..0d89440 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -20,7 +20,8 @@ xfce4_mailwatch_plugin_LDADD = \
@GTHREAD_LIBS@ \
@LIBXFCE4PANEL_LIBS@ \
@LIBXFCEGUI4_LIBS@ \
- @GNUTLS_LIBS@
+ @GNUTLS_LIBS@ \
+ @LIBGCRYPT_LIBS@
if HAVE_CYGWIN
xfce4_mailwatch_plugin_LDFLAGS = \
More information about the Xfce4-commits
mailing list