Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From 5c3ba79177f7d1763db33c4358af2af60ff214b7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Roy Li <rongqing.li@windriver.com> |
| 3 | Date: Wed, 18 Jun 2014 13:46:52 +0800 |
| 4 | Subject: [PATCH] use pkgconfig to check libgcrypt |
| 5 | |
| 6 | Upstream-status: Inappropriate [configuration] |
| 7 | |
| 8 | libgcrypt does no longer provide libgcrypt-config, and provide |
| 9 | *.pc, so we should use pkgconfig to check |
| 10 | |
| 11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 12 | --- |
| 13 | configure.ac | 19 +------------------ |
| 14 | 1 file changed, 1 insertion(+), 18 deletions(-) |
| 15 | |
| 16 | diff --git a/configure.ac b/configure.ac |
| 17 | index 017116e..1b880f8 100644 |
| 18 | --- a/configure.ac |
| 19 | +++ b/configure.ac |
| 20 | @@ -784,24 +784,7 @@ AC_ARG_ENABLE(libgcrypt, |
| 21 | [enable_libgcrypt=yes] |
| 22 | ) |
| 23 | if test "x$enable_libgcrypt" = "xyes"; then |
| 24 | - AC_CHECK_PROG( |
| 25 | - [HAVE_LIBGCRYPT_CONFIG], |
| 26 | - [libgcrypt-config], |
| 27 | - [yes],,, |
| 28 | - ) |
| 29 | - if test "x${HAVE_LIBGCRYPT_CONFIG}" != "xyes"; then |
| 30 | - AC_MSG_FAILURE([libgcrypt-config not found in PATH]) |
| 31 | - fi |
| 32 | - AC_CHECK_LIB( |
| 33 | - [gcrypt], |
| 34 | - [gcry_cipher_open], |
| 35 | - [LIBGCRYPT_CFLAGS="`libgcrypt-config --cflags`" |
| 36 | - LIBGCRYPT_LIBS="`libgcrypt-config --libs`" |
| 37 | - ], |
| 38 | - [AC_MSG_FAILURE([libgcrypt is missing])], |
| 39 | - [`libgcrypt-config --libs --cflags`] |
| 40 | - ) |
| 41 | - AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present]) |
| 42 | + PKG_CHECK_MODULES(LIBGCRYPT, libgcrypt) |
| 43 | fi |
| 44 | AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes) |
| 45 | AC_SUBST(LIBGCRYPT_CFLAGS) |
| 46 | -- |
| 47 | 1.7.9.5 |
| 48 | |