From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- build/autoconf/hooks.m4 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 build/autoconf/hooks.m4 (limited to 'build/autoconf/hooks.m4') diff --git a/build/autoconf/hooks.m4 b/build/autoconf/hooks.m4 new file mode 100644 index 0000000000..84d58205c1 --- /dev/null +++ b/build/autoconf/hooks.m4 @@ -0,0 +1,31 @@ +dnl This Source Code Form is subject to the terms of the Mozilla Public +dnl License, v. 2.0. If a copy of the MPL was not distributed with this +dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. + +dnl Wrap AC_INIT_PREPARE to add the above trap. +define([_MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE])) +define([AC_INIT_PREPARE], +[_MOZ_AC_INIT_PREPARE($1) + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +]) + +dnl Print error messages in config.log as well as stderr +define([AC_MSG_ERROR], +[{ echo "configure: error: $1" 1>&2; echo "configure: error: $1" 1>&5; exit 1; }]) + +dnl Divert AC_TRY_COMPILER to make ac_cv_prog_*_works actually cached. +dnl This will allow to just skip the test when python configure has set +dnl the value for us. But since ac_cv_prog_*_cross is calculated at the same +dnl time, and has a different meaning as in python configure, we only want to +dnl use its value to display whether a cross-compile is happening. We forbid +dnl configure tests that would rely on ac_cv_prog_*_cross autoconf meaning +dnl (being able to execute the product of compilation), which are already bad +dnl for cross compiles anyways, so it's a win to get rid of them. +define([_MOZ_AC_TRY_COMPILER], defn([AC_TRY_COMPILER])) +define([AC_TRY_COMPILER], [AC_CACHE_VAL($2, _MOZ_AC_TRY_COMPILER($1, $2, $3))]) + +define([AC_TRY_RUN], [m4_fatal([AC_TRY_RUN is forbidden])]) +define([AC_CHECK_FILE], [m4_fatal([AC_CHECK_FILE is forbidden])]) -- cgit v1.2.3