From 053ecbd8f70676c76cd0cfc5648256ccae27a1e8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 8 Aug 2012 07:57:09 +0200 Subject: [PATCH] build: Fix build without libgcrypt * Needed to use m4_ifdef on the libgcrypt autoconf macro https://bugzilla.gnome.org/show_bug.cgi?id=681330 --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 70295b8..138149e 100644 --- a/configure.ac +++ b/configure.ac @@ -95,13 +95,19 @@ AC_ARG_ENABLE(gcrypt, ]) if test "$enable_gcrypt" != "no"; then - AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_VERSION,, - AC_MSG_ERROR([[ + + have_gcrypt="no" + m4_ifdef([AM_PATH_LIBGCRYPT], + [AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_VERSION, have_gcrypt=yes)]) + + if test $have_gcrypt != "yes"; then + AC_MSG_ERROR([[ *** *** libgcrypt was not found. You may want to get it from *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ *** - ]])) + ]]) + fi AC_DEFINE(WITH_GCRYPT, 1, [Build with libgcypt and transport encryption]) AC_DEFINE_UNQUOTED(LIBGCRYPT_VERSION, "$GCRYPT_VERSION", -- 2.7.4