mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
build: Update m4 scripts
* m4/gpg-error.m4: Update from Libgpg-error git master. * m4/libgcrypt.m4: Update from Libgcrypt git master. * configure.ac: Declare SYSROOT a precious variable. Add extra error message for library configuration mismatches.
This commit is contained in:
parent
edd191e5b0
commit
6bc0cd6202
10
configure.ac
10
configure.ac
@ -528,6 +528,7 @@ AH_BOTTOM([
|
||||
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
|
||||
|
||||
# Checks for programs.
|
||||
AC_MSG_NOTICE([checking for programs])
|
||||
@ -1796,3 +1797,12 @@ echo "
|
||||
gpg-check-pattern will not be build.
|
||||
"
|
||||
fi
|
||||
if test "x${gpg_config_script_warn}" != x; then
|
||||
cat <<G10EOF
|
||||
Warning: Mismatches between the target platform and the
|
||||
to be used libraries have been detected for:
|
||||
${gpg_config_script_warn}
|
||||
Please check above for more warning messages.
|
||||
|
||||
G10EOF
|
||||
fi
|
||||
|
@ -1,5 +1,5 @@
|
||||
# gpg-error.m4 - autoconf macro to detect libgpg-error.
|
||||
# Copyright (C) 2002, 2003, 2004, 2011 g10 Code GmbH
|
||||
# Copyright (C) 2002, 2003, 2004, 2011, 2014 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
|
||||
@ -8,10 +8,21 @@
|
||||
# This file is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Last-changed: 2014-10-02
|
||||
|
||||
|
||||
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS
|
||||
dnl
|
||||
dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS,
|
||||
dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are
|
||||
dnl used for programs requireing real multi thread support.
|
||||
dnl
|
||||
dnl If a prefix option is not used, the config script is first
|
||||
dnl searched in $SYSROOT/bin and then along $PATH. If the used
|
||||
dnl config script does not match the host specification the script
|
||||
dnl is added to the gpg_config_script_warn variable.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPG_ERROR],
|
||||
[ AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
@ -29,13 +40,26 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
|
||||
AC_ARG_WITH(gpg-error-prefix,,
|
||||
gpg_error_config_prefix="$withval", gpg_error_config_prefix="")
|
||||
|
||||
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
|
||||
if test x"${GPG_ERROR_CONFIG}" = x ; then
|
||||
if test x"${gpg_error_config_prefix}" != x ; then
|
||||
GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
|
||||
else
|
||||
case "${SYSROOT}" in
|
||||
/*)
|
||||
if test -x "${SYSROOT}/bin/gpg-error-config" ; then
|
||||
GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
|
||||
fi
|
||||
;;
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no)
|
||||
AC_PATH_PROG(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
|
||||
@ -62,6 +86,8 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
|
||||
if test $ok = yes; then
|
||||
GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
|
||||
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
|
||||
GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
|
||||
GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
|
||||
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`
|
||||
@ -73,16 +99,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
|
||||
*** 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.
|
||||
*** to specify a matching config script or use \$SYSROOT.
|
||||
***]])
|
||||
gpg_config_script_warn="$gpg_config_script_warn libgpg-error"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
GPG_ERROR_CFLAGS=""
|
||||
GPG_ERROR_LIBS=""
|
||||
GPG_ERROR_MT_CFLAGS=""
|
||||
GPG_ERROR_MT_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPG_ERROR_CFLAGS)
|
||||
AC_SUBST(GPG_ERROR_LIBS)
|
||||
AC_SUBST(GPG_ERROR_MT_CFLAGS)
|
||||
AC_SUBST(GPG_ERROR_MT_LIBS)
|
||||
])
|
||||
|
@ -1,13 +1,15 @@
|
||||
dnl Autoconf macros for libgcrypt
|
||||
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
|
||||
dnl modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# libgcrypt.m4 - Autoconf macros to detect libgcrypt
|
||||
# Copyright (C) 2002, 2003, 2004, 2011, 2014 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
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This file is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Last-changed: 2014-10-02
|
||||
|
||||
|
||||
dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
|
||||
@ -20,19 +22,37 @@ dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
|
||||
dnl this features allows to prevent build against newer versions of libgcrypt
|
||||
dnl with a changed API.
|
||||
dnl
|
||||
dnl If a prefix option is not used, the config script is first
|
||||
dnl searched in $SYSROOT/bin and then along $PATH. If the used
|
||||
dnl config script does not match the host specification the script
|
||||
dnl is added to the gpg_config_script_warn variable.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_LIBGCRYPT],
|
||||
[ 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="")
|
||||
if test x$libgcrypt_config_prefix != x ; then
|
||||
if test x${LIBGCRYPT_CONFIG+set} != xset ; then
|
||||
LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
|
||||
if test x"${LIBGCRYPT_CONFIG}" = x ; then
|
||||
if test x"${libgcrypt_config_prefix}" != x ; then
|
||||
LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
|
||||
else
|
||||
case "${SYSROOT}" in
|
||||
/*)
|
||||
if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
|
||||
LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
|
||||
fi
|
||||
;;
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
|
||||
AC_PATH_PROG(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/'`
|
||||
@ -108,8 +128,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
|
||||
*** 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.
|
||||
*** to specify a matching config script or use \$SYSROOT.
|
||||
***]])
|
||||
gpg_config_script_warn="$gpg_config_script_warn libgcrypt"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user