1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Index: git/configure.ac
===================================================================
--- git.orig/configure.ac
+++ git/configure.ac
@@ -360,25 +360,13 @@ case "${with_crypto}" in
AC_DEFINE([HAVE_NSS3], [1], [Define to 1 if you have 'NSS' library.])
;;
gcrypt)
- SAVE_LIBS=$LIBS
- AC_CHECK_LIB([gcrypt], [gcry_check_version],
- [crapi_CFLAGS=`libgcrypt-config --cflags`;
- crapi_LIBS=`libgcrypt-config --libs`;
- crapi_libname="GCrypt";],
- [AC_MSG_ERROR([library 'gcrypt' is required for GCrypt.])],
- [])
- AC_DEFINE([HAVE_GCRYPT], [1], [Define to 1 if you have 'gcrypt' library.])
- AC_CACHE_CHECK([for GCRYCTL_SET_ENFORCED_FIPS_FLAG],
- [ac_cv_gcryctl_set_enforced_fips_flag],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include<gcrypt.h>],
- [return GCRYCTL_SET_ENFORCED_FIPS_FLAG;])],
- [ac_cv_gcryctl_set_enforced_fips_flag=yes],
- [ac_cv_gcryctl_set_enforced_fips_flag=no])])
+ PKG_CHECK_MODULES([libgcrypt], [libgcrypt >= 1.7.9],[],
+ AC_MSG_FAILURE([libgcrypt devel support is missing]))
- if test "${ac_cv_gcryctl_set_enforced_fips_flag}" == "yes"; then
- AC_DEFINE([HAVE_GCRYCTL_SET_ENFORCED_FIPS_FLAG], [1], [Define to 1 if you have 'gcrypt' library with GCRYCTL_SET_ENFORCED_FIPS_FLAG.])
- fi
- LIBS=$SAVE_LIBS
+ crapi_libname="libgcrypt"
+ crapi_CFLAGS=$libgcrypt_CFLAGS
+ crapi_LIBS=$libgcrypt_LIBS
+ AC_DEFINE([HAVE_GCRYPT], [1], [Define to 1 if you have 'libgcrypt' library.])
;;
*)
AC_MSG_ERROR([unknown crypto backend])
|