summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-10-02 12:51:49 +0200
committerWerner Koch <wk@gnupg.org>2014-10-02 13:20:46 +0200
commit1e8b86494cf8fa045696bd447b16267ffd1797f0 (patch)
treee97afae2dd5ab3fe5bd3bfc00a897df2aabda6a6 /m4
parent51dae8c8c4b63bb5e1685cbd8722e35342524737 (diff)
downloadlibgcrypt-1e8b86494cf8fa045696bd447b16267ffd1797f0.tar.gz
build: Support SYSROOT based config script finding.
* src/libgcrypt.m4: Add support for SYSROOT and set gpg_config_script_warn. Use AC_PATH_PROG instead of AC_PATH_TOOL because the config script is not expected to be installed with a prefix for its name * configure.ac: Print a library mismatch warning. * m4/gpg-error.m4: Update from git master. -- Also fixed the false copyright notice in libgcrypt.m4.
Diffstat (limited to 'm4')
-rw-r--r--m4/gpg-error.m433
1 files changed, 26 insertions, 7 deletions
diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4
index 053eceb8..1661204c 100644
--- a/m4/gpg-error.m4
+++ b/m4/gpg-error.m4
@@ -9,7 +9,7 @@
# 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-01-24
+# Last-changed: 2014-10-02
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@@ -17,7 +17,12 @@ dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
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 requireding real multi thread support.
+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])
@@ -36,13 +41,26 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
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
+ 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
@@ -83,8 +101,9 @@ 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