Bug 1302909 - Set STDC_HEADERS everywhere instead of relying on AC_HEADER_STDC. r=glandium
MozReview-Commit-ID: DXvcX1i9vuo
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -1,19 +1,21 @@
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 Several autoconf functions AC_REQUIRE AC_PROG_CPP/AC_PROG_CXXCPP,
-dnl meaning they are called even when we don't call them explicitly.
+dnl Several autoconf functions AC_REQUIRE AC_PROG_CPP/AC_PROG_CXXCPP
+dnl or AC_HEADER_STDC, meaning they are called even when we don't call
+dnl them explicitly.
dnl However, theses checks are not necessary and python configure sets
dnl the corresponding variables already, so just skip those tests
dnl entirely.
define([AC_PROG_CPP],[])
define([AC_PROG_CXXCPP],[])
+define([AC_HEADER_STDC], [])
AC_DEFUN([MOZ_TOOL_VARIABLES],
[
GNU_AS=
GNU_LD=
GNU_CC=
GNU_CXX=
--- a/build/moz.configure/headers.configure
+++ b/build/moz.configure/headers.configure
@@ -3,16 +3,19 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check for headers defining standard int types.
check_header('stdint.h')
have_inttypes = check_header('inttypes.h')
+# Assume we have ansi C header files available.
+set_define('STDC_HEADERS', True)
+
set_config('HAVE_INTTYPES_H', have_inttypes)
building_linux = depends(target)(lambda target: target.kernel == 'Linux')
have_malloc = check_header('malloc.h')
check_header('alloca.h')
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -849,17 +849,16 @@ case "$target" in
PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
dnl Probably also a compiler bug, but what can you do?
PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
LDFLAGS="$LDFLAGS -DYNAMICBASE"
RCFLAGS="-nologo"
fi
AC_DEFINE(HAVE__MSIZE)
- AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
BIN_SUFFIX='.exe'
MOZ_USER_DIR="Mozilla"
case "$host_os" in
cygwin*|msvc*|mks*)
AC_MSG_ERROR([Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
;;
@@ -972,17 +971,16 @@ AC_SUBST(ENABLE_ION)
if test -n "$COMPILE_ENVIRONMENT"; then
MOZ_COMPILER_OPTS
fi
if test -z "$SKIP_COMPILER_CHECKS"; then
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ========================================================
-AC_HEADER_STDC
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_LANG_CPLUSPLUS
AC_LANG_C
AC_MSG_CHECKING(for ssize_t)
--- a/old-configure.in
+++ b/old-configure.in
@@ -1213,17 +1213,16 @@ case "$target" in
fi
dnl Minimum reqiurement of Gecko is VS2010 or later which supports
dnl both SSSE3 and SSE4.1.
HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1
HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1
dnl allow AVX2 code from VS2012
HAVE_X86_AVX2=1
fi
- AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
dnl See http://support.microsoft.com/kb/143208 to use STL
AC_DEFINE(NOMINMAX)
BIN_SUFFIX='.exe'
MOZ_USER_DIR="Mozilla"
case "$host_os" in
cygwin*|msvc*|mks*)
@@ -1336,17 +1335,16 @@ if test -z "$COMPILE_ENVIRONMENT"; then
PKG_SKIP_STRIP=1
else
MOZ_COMPILER_OPTS
fi # COMPILE_ENVIRONMENT
if test -z "$SKIP_COMPILER_CHECKS"; then
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ========================================================
-AC_HEADER_STDC
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_LANG_CPLUSPLUS
AC_LANG_C