1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-16 00:29:50 +02:00

Update gpg-error, libgcrypt, and ksba m4 scripts.

* m4/gpg-error.m4: Update from libgpg-error repo.
* m4/ksba.m4: Likewise.
* m4/libgcrypt.m4: Likewise.
--

GnuPG-bug-id: 1496.
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2013-04-25 12:00:16 +01:00
parent 0a9a4a38df
commit 3f79a0b4b4
3 changed files with 70 additions and 17 deletions

View File

@ -1,5 +1,5 @@
# gpg-error.m4 - autoconf macro to detect libgpg-error.
# Copyright (C) 2002, 2003, 2004 g10 Code GmbH
# Copyright (C) 2002, 2003, 2004, 2011 g10 Code GmbH
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@ -14,21 +14,34 @@ dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS
dnl
AC_DEFUN([AM_PATH_GPG_ERROR],
[ AC_ARG_WITH(gpg-error-prefix,
AC_HELP_STRING([--with-gpg-error-prefix=PFX],
[ AC_REQUIRE([AC_CANONICAL_HOST])
gpg_error_config_prefix=""
dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
dnl since that is consistent with how our three siblings use the directory/
dnl package name in --with-$dir_name-prefix=PFX.
AC_ARG_WITH(libgpg-error-prefix,
AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
[prefix where GPG Error is installed (optional)]),
gpg_error_config_prefix="$withval", gpg_error_config_prefix="")
[gpg_error_config_prefix="$withval"])
dnl Accept --with-gpg-error-prefix and make it work the same as
dnl --with-libgpg-error-prefix above, for backwards compatibility,
dnl but do not document this old, inconsistently-named option.
AC_ARG_WITH(gpg-error-prefix,,
[gpg_error_config_prefix="$withval"])
if test x$gpg_error_config_prefix != x ; then
if test x${GPG_ERROR_CONFIG+set} != xset ; then
GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
fi
fi
AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no)
min_gpg_error_version=ifelse([$1], ,0.0,$1)
AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
ok=no
if test "$GPG_ERROR_CONFIG" != "no" ; then
if test "$GPG_ERROR_CONFIG" != "no" \
&& test -f "$GPG_ERROR_CONFIG" ; then
req_major=`echo $min_gpg_error_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $min_gpg_error_version | \
@ -53,6 +66,19 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
AC_MSG_RESULT([yes ($gpg_error_config_version)])
ifelse([$2], , :, [$2])
gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
if test x"$gpg_error_config_host" != xnone ; then
if test x"$gpg_error_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
*** The config script $GPG_ERROR_CONFIG was
*** built for $gpg_error_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-gpg-error-prefix
*** to specify a matching config script.
***]])
fi
fi
else
GPG_ERROR_CFLAGS=""
GPG_ERROR_LIBS=""
@ -62,4 +88,3 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
AC_SUBST(GPG_ERROR_CFLAGS)
AC_SUBST(GPG_ERROR_LIBS)
])

View File

@ -21,7 +21,8 @@ dnl this features allows to prevent build against newer versions of libksba
dnl with a changed API.
dnl
AC_DEFUN([AM_PATH_KSBA],
[ AC_ARG_WITH(ksba-prefix,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(ksba-prefix,
AC_HELP_STRING([--with-ksba-prefix=PFX],
[prefix where KSBA is installed (optional)]),
ksba_config_prefix="$withval", ksba_config_prefix="")
@ -99,6 +100,19 @@ AC_DEFUN([AM_PATH_KSBA],
KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags`
KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs`
ifelse([$2], , :, [$2])
libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none`
if test x"$libksba_config_host" != xnone ; then
if test x"$libksba_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
*** The config script $LIBKSBA_CONFIG was
*** built for $libksba_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-libksba-prefix
*** to specify a matching config script.
***]])
fi
fi
else
KSBA_CFLAGS=""
KSBA_LIBS=""

View File

@ -1,5 +1,5 @@
dnl Autoconf macros for libgcrypt
dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
dnl Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
dnl
dnl This file is free software; as a special exception the author gives
dnl unlimited permission to copy and/or distribute it, with or without
@ -21,7 +21,8 @@ dnl this features allows to prevent build against newer versions of libgcrypt
dnl with a changed API.
dnl
AC_DEFUN([AM_PATH_LIBGCRYPT],
[ AC_ARG_WITH(libgcrypt-prefix,
[ AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(libgcrypt-prefix,
AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
[prefix where LIBGCRYPT is installed (optional)]),
libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
@ -31,7 +32,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
fi
fi
AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
tmp=ifelse([$1], ,1:1.2.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
@ -98,6 +99,19 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
ifelse([$2], , :, [$2])
libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
if test x"$libgcrypt_config_host" != xnone ; then
if test x"$libgcrypt_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
*** The config script $LIBGCRYPT_CONFIG was
*** built for $libgcrypt_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-libgcrypt-prefix
*** to specify a matching config script.
***]])
fi
fi
else
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""