summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-04-02 11:31:09 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-04-02 11:31:09 +0200
commit0f87c631e7eac2ccbd36cd875d64de29dd7c714c (patch)
treed4584bb5bb66fa167415fc9a6536ded112ed1536
parentf6da383e1c9d3ccfc5742d972c23dc3c718a0b88 (diff)
downloadrsyslog-0f87c631e7eac2ccbd36cd875d64de29dd7c714c.tar.gz
rsyslog-0f87c631e7eac2ccbd36cd875d64de29dd7c714c.tar.bz2
rsyslog-0f87c631e7eac2ccbd36cd875d64de29dd7c714c.zip
add configure check for libgcrypt
-rw-r--r--configure.ac33
1 files changed, 33 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0c877eea..d6d4c203 100644
--- a/configure.ac
+++ b/configure.ac
@@ -755,6 +755,38 @@ if test "x$enable_gnutls" = "xyes"; then
fi
AM_CONDITIONAL(ENABLE_GNUTLS, test x$enable_gnutls = xyes)
+# libgcrypt support
+AC_ARG_ENABLE(libgcrypt,
+ [AS_HELP_STRING([--enable-libgcrypt],[Enable libgcrypt support @<:@default=yes@:>@])],
+ [case "${enableval}" in
+ yes) enable_libgcrypt="yes" ;;
+ no) enable_libgcrypt="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-libgcrypt) ;;
+ esac],
+ [enable_libgcrypt=yes]
+)
+if test "x$enable_libgcrypt" = "xyes"; then
+ AC_CHECK_PROG(
+ [HAVE_LIBGCRYPT_CONFIG],
+ [libgcrypt-config],
+ [yes],,,
+ )
+ if test "x${HAVE_LIBGCRYPT_CONFIG}" != "xyes"; then
+ AC_MSG_FAILURE([libgcrypt-config not found in PATH])
+ fi
+ AC_CHECK_LIB(
+ [gcrypt],
+ [gcry_cipher_open],
+ [LIBGCRYPT_CFLAGS="`libgcrypt-config --cflags`"
+ LIBGCRYPT_LIBS="`libgcrypt-config --libs`"
+ ],
+ [AC_MSG_FAILURE([libgrypt is missing])],
+ [`libgcrypt-config --libs --cflags`]
+ )
+ AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present])
+fi
+AM_CONDITIONAL(ENABLE_GNUTLS, test x$enable_gnutls = xyes)
+
# support for building the rsyslogd runtime
AC_ARG_ENABLE(rsyslogrt,
@@ -1406,6 +1438,7 @@ echo " GUI components will be built: $enable_gui"
echo " Unlimited select() support enabled: $enable_unlimited_select"
echo " uuid support enabled: $enable_uuid"
echo " GuardTime signature support enabled: $enable_guardtime"
+echo " libgcrypt support enabled: $enable_libgcrypt"
echo " anonymization support enabled: $enable_mmanon"
echo
echo "---{ input plugins }---"