aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-24 16:31:49 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-24 16:31:49 +0200
commitae4566a67ff38dcf497ecd7ff280aab331542ec3 (patch)
tree484b00b9529acded389446f0175cbd37c7cc7494 /configure.ac
parentMerge pull request #1370 from systemd-mailing-devs/1443091642-5853-1-git-send... (diff)
parentbuild-sys: only use AM_PATH_LIBGCRYPT macro if it exists (diff)
downloadsystemd-ae4566a67ff38dcf497ecd7ff280aab331542ec3.tar.gz
systemd-ae4566a67ff38dcf497ecd7ff280aab331542ec3.tar.bz2
systemd-ae4566a67ff38dcf497ecd7ff280aab331542ec3.zip
Merge pull request #1374 from olof/autoconf_gcrypt_dep
build-sys: only use AM_PATH_LIBGCRYPT macro if it exists
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 15 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index ef03fb082..d75a02623 100644
--- a/configure.ac
+++ b/configure.ac
@@ -701,12 +701,21 @@ AC_ARG_ENABLE([gcrypt],
[have_gcrypt=auto])
if test "x${have_gcrypt}" != xno ; then
- AM_PATH_LIBGCRYPT(
- [1.4.5],
- [have_gcrypt=yes],
- [if test "x$have_gcrypt" = xyes ; then
- AC_MSG_ERROR([*** GCRYPT headers not found.])
- fi])
+ m4_define([AM_PATH_LIBGCRYPT_FAIL],
+ [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT headers not found.]); }]
+ )
+ m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT(
+ [1.4.5],
+ [have_gcrypt=yes],
+ dnl If we have the gcrypt m4 macros, but don't have
+ dnl gcrypt, throw an error if gcrypt is explicitly
+ dnl requested.
+ [AM_PATH_LIBGCRYPT_FAIL]
+ )],
+ dnl If we don't have the gcrypt m4 macros, but build with
+ dnl gcrypt explicitly requested, throw an error.
+ [AM_PATH_LIBGCRYPT_FAIL]
+ )
if test "x$have_gcrypt" = xyes ; then
GCRYPT_LIBS="$LIBGCRYPT_LIBS"