build/autoconf/hotfixes.m4

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial