mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Require libgcrypt 1.5
Without Libgcrypt 1.5 is was not possible to use ECC keys. ECC is major new feature and thus it does not make sense to allow building with an older Libgcrypt without supporting ECC. Also fixed a few missing prototypes.
This commit is contained in:
parent
3582e2efa4
commit
327af90594
11 changed files with 33 additions and 74 deletions
40
configure.ac
40
configure.ac
|
@ -43,7 +43,7 @@ development_version=no
|
|||
NEED_GPG_ERROR_VERSION=1.8
|
||||
|
||||
NEED_LIBGCRYPT_API=1
|
||||
NEED_LIBGCRYPT_VERSION=1.4.6
|
||||
NEED_LIBGCRYPT_VERSION=1.5.0
|
||||
|
||||
NEED_LIBASSUAN_API=2
|
||||
NEED_LIBASSUAN_VERSION=2.0.0
|
||||
|
@ -742,40 +742,6 @@ AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
|
|||
AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
|
||||
have_libgcrypt=yes,have_libgcrypt=no)
|
||||
|
||||
# fixme: We can remove the next two checks if we require libgcrypt 1.5.
|
||||
AC_CACHE_CHECK([whether Libgcrypt support ECDH], gnupg_cv_gcry_pk_ecdh,
|
||||
[ _gnupg_gcry_save_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
|
||||
AC_TRY_COMPILE(
|
||||
[#include <gcrypt.h>],
|
||||
[ return GCRY_PK_ECDH; ],
|
||||
gnupg_cv_gcry_pk_ecdh=yes,
|
||||
gnupg_cv_gcry_pk_ecdh=no)
|
||||
CFLAGS=$_gnupg_gcry_save_cflags])
|
||||
if test "$gnupg_cv_gcry_pk_ecdh" = yes; then
|
||||
AC_DEFINE([HAVE_GCRY_PK_ECDH], 1,
|
||||
[Define if gcrypt.h has the enum value for ECDH.])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether Libgcrypt has gcry_pk_get_curve],
|
||||
gnupg_cv_gcry_pk_get_curve,
|
||||
[ _gnupg_gcry_save_cflags=$CFLAGS
|
||||
_gnupg_gcry_save_libs=$LIBS
|
||||
CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
|
||||
LIBS="$LIBS $LIBGCRYPT_LIBS"
|
||||
AC_TRY_LINK(
|
||||
[#include <gcrypt.h>],
|
||||
[ return gcry_pk_get_curve (NULL, 0, NULL); ],
|
||||
gnupg_cv_gcry_pk_get_curve=yes,
|
||||
gnupg_cv_gcry_pk_get_curve=no)
|
||||
LIBS=$_gnupg_gcry_save_libs
|
||||
CFLAGS=$_gnupg_gcry_save_cflags])
|
||||
if test "$gnupg_cv_gcry_pk_get_curve" = yes; then
|
||||
AC_DEFINE([HAVE_GCRY_PK_GET_CURVE], 1,
|
||||
[Define if gcrypt.h has gcry_pk_get_curve.])
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# libassuan is used for IPC
|
||||
#
|
||||
|
@ -1172,7 +1138,7 @@ fi
|
|||
AC_MSG_NOTICE([checking for header files])
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h \
|
||||
pty.h pwd.h inttypes.h signal.h])
|
||||
pty.h utmp.h pwd.h inttypes.h signal.h])
|
||||
AC_HEADER_TIME
|
||||
|
||||
|
||||
|
@ -1636,7 +1602,7 @@ if test "$have_libgcrypt" = "no"; then
|
|||
***
|
||||
*** You need libgcrypt to build this program.
|
||||
** This library is for example available at
|
||||
*** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
|
||||
*** ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/
|
||||
*** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
|
||||
***]])
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue