Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
[gecko.git] / build / autoconf / hooks.m4
blob84d58205c1010c7c1e4c4b39eccceee5f68e138a
1 dnl This Source Code Form is subject to the terms of the Mozilla Public
2 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
3 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 dnl Wrap AC_INIT_PREPARE to add the above trap.
6 define([_MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE]))
7 define([AC_INIT_PREPARE],
8 [_MOZ_AC_INIT_PREPARE($1)
10 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11 # Let make expand exec_prefix.
12 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15 dnl Print error messages in config.log as well as stderr
16 define([AC_MSG_ERROR],
17 [{ echo "configure: error: $1" 1>&2; echo "configure: error: $1" 1>&5; exit 1; }])
19 dnl Divert AC_TRY_COMPILER to make ac_cv_prog_*_works actually cached.
20 dnl This will allow to just skip the test when python configure has set
21 dnl the value for us. But since ac_cv_prog_*_cross is calculated at the same
22 dnl time, and has a different meaning as in python configure, we only want to
23 dnl use its value to display whether a cross-compile is happening. We forbid
24 dnl configure tests that would rely on ac_cv_prog_*_cross autoconf meaning
25 dnl (being able to execute the product of compilation), which are already bad
26 dnl for cross compiles anyways, so it's a win to get rid of them.
27 define([_MOZ_AC_TRY_COMPILER], defn([AC_TRY_COMPILER]))
28 define([AC_TRY_COMPILER], [AC_CACHE_VAL($2, _MOZ_AC_TRY_COMPILER($1, $2, $3))])
30 define([AC_TRY_RUN], [m4_fatal([AC_TRY_RUN is forbidden])])
31 define([AC_CHECK_FILE], [m4_fatal([AC_CHECK_FILE is forbidden])])