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