Bug 1667008 [wpt PR 25754] - [css-flex] Change some test expectations for image flex...
[gecko.git] / build / autoconf / hotfixes.m4
blob9c8362041fecc8c901010df4c1517573c7213deb
1 dnl This Source Code Form is subject to the terms of the Mozilla Public
2 dnl dnl License, v. 2.0. If a copy of the MPL was not distributed with this
3 dnl dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 dnl Set of hotfixes to address issues in autoconf 2.13
7 dnl Divert AC_CHECK_FUNC so that the #includes it uses can't interfere
8 dnl with the function it tests.
9 dnl So, when testing e.g. posix_memalign, any #include that AC_CHECK_FUNC
10 dnl prints is replaced with:
11 dnl   #define posix_memalign innocuous_posix_memalign
12 dnl   #include "theinclude"
13 dnl   #undef posix_memalign
14 dnl This avoids double declaration of that function when the header normally
15 dnl declares it, while the test itself is just expecting the function not to be
16 dnl declared at all, and declares it differently (which doesn't matter for the
17 dnl test itself).
18 dnl More recent versions of autoconf are essentially doing this.
19 define([_AC_CHECK_FUNC],defn([AC_CHECK_FUNC]))dnl
20 define([AC_CHECK_FUNC], [dnl
21 patsubst(_AC_CHECK_FUNC($@), [#include.*$], [#define $1 innocuous_$1
23 #undef $1])])dnl