blob: 6f9bd9298eac8f468e8c52586c282e639f1604f2 [file] [log] [blame]
#! /bin/sh
if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then
msyshost=1
fi
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-dist-dir=DIR Use DIR as 'dist' staging area. DIR may be
relative to the top of SpiderMonkey build tree,
or absolute."
ac_help="$ac_help
--disable-compile-environment
Disable compiler/library checks."
ac_help="$ac_help
--disable-shared-js
Do not create a shared library."
ac_help="$ac_help
--with-gonk=DIR
location of gonk dir"
ac_help="$ac_help
--with-gonk-toolchain-prefix=DIR
prefix to gonk toolchain commands"
ac_help="$ac_help
--with-android-ndk=DIR
location where the Android NDK can be found"
ac_help="$ac_help
--with-android-toolchain=DIR
location of the android toolchain"
ac_help="$ac_help
--with-android-gnu-compiler-version=VER
gnu compiler version to use"
ac_help="$ac_help
--enable-android-libstdcxx
use GNU libstdc++ instead of STLPort"
ac_help="$ac_help
--with-android-version=VER
android platform version, default 9"
ac_help="$ac_help
--with-android-platform=DIR
location of platform dir"
ac_help="$ac_help
--enable-metro Enable Windows Metro build targets"
ac_help="$ac_help
--with-windows-version=WINSDK_TARGETVER
Windows SDK version to target. Lowest version
currently allowed is 601, highest is 602"
ac_help="$ac_help
--enable-macos-target=VER (default=10.6)
Set the minimum MacOS version needed at runtime"
ac_help="$ac_help
--with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
ac_help="$ac_help
--with-x use the X Window System"
ac_help="$ac_help
--with-arch=[[type|toolchain-default]]
Use specific CPU features (-march=type). Resets
thumb, fpu, float-abi, etc. defaults when set"
ac_help="$ac_help
--with-thumb[[=yes|no|toolchain-default]]
Use Thumb instruction set (-mthumb)"
ac_help="$ac_help
--with-thumb-interwork[[=yes|no|toolchain-default]]
Use Thumb/ARM instuctions interwork (-mthumb-interwork)"
ac_help="$ac_help
--with-fpu=[[type|toolchain-default]]
Use specific FPU type (-mfpu=type)"
ac_help="$ac_help
--with-float-abi=[[type|toolchain-default]]
Use specific arm float ABI (-mfloat-abi=type)"
ac_help="$ac_help
--with-soft-float[[=yes|no|toolchain-default]]
Use soft float library (-msoft-float)"
ac_help="$ac_help
--enable-address-sanitizer Enable Address Sanitizer (default=no)"
ac_help="$ac_help
--enable-llvm-hacks Enable workarounds required for several LLVM instrumentations (default=no)"
ac_help="$ac_help
--disable-os2-high-mem Disable high-memory support on OS/2"
ac_help="$ac_help
--enable-profiling Set compile flags necessary for using sampling profilers (e.g. shark, perf)"
ac_help="$ac_help
--disable-ion Disable use of the IonMonkey JIT"
ac_help="$ac_help
--disable-yarr-jit Disable YARR JIT support"
ac_help="$ac_help
--enable-cpp-rtti Enable C++ RTTI "
ac_help="$ac_help
--disable-icf Disable Identical Code Folding"
ac_help="$ac_help
--enable-dtrace build with dtrace support if available (default=no)"
ac_help="$ac_help
--with-linux-headers=DIR
location where the Linux kernel headers can be found"
ac_help="$ac_help
--with-pthreads Force use of system pthread library with NSPR "
ac_help="$ac_help
--enable-update-channel=CHANNEL
Select application update channel (default=default)"
ac_help="$ac_help
--with-system-nspr Use an NSPR that is already built and installed.
Use the 'nspr-config' script in the current path,
or look for the script in the directories given with
--with-nspr-exec-prefix or --with-nspr-prefix.
(Those flags are only checked if you specify
--with-system-nspr.)"
ac_help="$ac_help
--with-nspr-cflags=FLAGS
Pass FLAGS to CC when building code that uses NSPR.
Use this when there's no accurate nspr-config
script available. This is the case when building
SpiderMonkey as part of the Mozilla tree: the
top-level configure script computes NSPR flags
that accomodate the quirks of that environment."
ac_help="$ac_help
--with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR.
See --with-nspr-cflags for more details."
ac_help="$ac_help
--with-nspr-prefix=PFX Prefix where NSPR is installed"
ac_help="$ac_help
--with-nspr-exec-prefix=PFX
Exec prefix where NSPR is installed"
ac_help="$ac_help
--with-system-zlib[=PFX]
Use system libz [installed at prefix PFX]"
ac_help="$ac_help
--enable-system-ffi Use system libffi (located with pkgconfig)"
ac_help="$ac_help
--with-arm-kuser Use kuser helpers (Linux/ARM only -- requires kernel 2.6.13 or later)"
ac_help="$ac_help
--enable-ui-locale=ab-CD
Select the user interface locale (default: en-US)"
ac_help="$ac_help
--disable-tests Do not build test libraries & programs"
ac_help="$ac_help
--enable-debug[=DBG] Enable building with developer debug info
(using compiler flags DBG)"
ac_help="$ac_help
--with-debug-label=LABELS
Define DEBUG_<value> for each comma-separated
value given."
ac_help="$ac_help
--disable-optimize Disable compiler optimization
--enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]"
ac_help="$ac_help
--enable-debug-symbols[=DBG]
Enable debugging symbols (using compiler flags DBG)"
ac_help="$ac_help
--enable-trace-logging Enable trace logging"
ac_help="$ac_help
--enable-warnings-as-errors
Enable treating of warnings as errors"
ac_help="$ac_help
--enable-sm-fail-on-warnings
Enable warnings as errors"
ac_help="$ac_help
--enable-trace-malloc Enable malloc tracing"
ac_help="$ac_help
--enable-dmd Enable DMD; also enables jemalloc and replace-malloc"
ac_help="$ac_help
--enable-jemalloc Replace memory allocator with jemalloc"
ac_help="$ac_help
--enable-wrap-malloc Wrap malloc calls (gnu linker only)"
ac_help="$ac_help
--with-wrap-malloc=DIR Location of malloc wrapper library"
ac_help="$ac_help
--enable-trace-jscalls Enable JS call enter/exit callback (default=no)"
ac_help="$ac_help
--disable-gcincremental Disable incremental GC"
ac_help="$ac_help
--enable-gcgenerational Enable generational GC"
ac_help="$ac_help
--enable-root-analysis Enable moving GC stack root analysis"
ac_help="$ac_help
--enable-exact-rooting Enable use of exact stack roots for GC"
ac_help="$ac_help
--enable-valgrind Enable Valgrind integration hooks (default=no)"
ac_help="$ac_help
--enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling."
ac_help="$ac_help
--enable-shark Enable shark remote profiling. Implies --enable-profiling."
ac_help="$ac_help
--enable-instruments Enable instruments remote profiling. Implies --enable-profiling."
ac_help="$ac_help
--enable-callgrind Enable callgrind profiling. Implies --enable-profiling."
ac_help="$ac_help
--enable-vtune Enable vtune profiling. Implies --enable-profiling."
ac_help="$ac_help
--enable-gczeal Enable zealous GCing"
ac_help="$ac_help
--enable-perf Enable Linux perf integration"
ac_help="$ac_help
--enable-js-diagnostics
Enable JS diagnostic assertions and breakpad data"
ac_help="$ac_help
--enable-more-deterministic
Enable changes that make the shell more deterministic"
ac_help="$ac_help
--enable-oom-backtrace
Enable output of backtraces on artificial OOMs (-A)"
ac_help="$ac_help
--with-ccache[=path/to/ccache]
Enable compiling with ccache"
ac_help="$ac_help
--with-compiler-wrapper[=path/to/wrapper]
Enable compiling with wrappers such as distcc and ccache"
ac_help="$ac_help
--with-static-checking=path/to/gcc_dehydra.so
Enable static checking of code using GCC-dehydra"
ac_help="$ac_help
--enable-clang-plugin Enable building with the mozilla clang plugin "
ac_help="$ac_help
--with-sixgill=path/to/sixgill
Enable static checking of code using sixgill"
ac_help="$ac_help
--enable-strip Enable stripping of libs & executables "
ac_help="$ac_help
--enable-install-strip Enable stripping of libs & executables when packaging "
ac_help="$ac_help
--jitreport-granularity=N
Default granularity at which to report JIT code
to external tools
0 - no info
1 - code ranges for whole functions only
2 - per-line information
3 - per-op information"
ac_help="$ac_help
--enable-xterm-updates Update XTERM titles with current command."
ac_help="$ac_help
--enable-readline Link js shell to system readline library"
ac_help="$ac_help
--enable-ctypes Enable js-ctypes (default=no)"
ac_help="$ac_help
--with-qemu-exe=path Use path as an arm emulator on host platforms"
ac_help="$ac_help
--with-cross-lib=dir Use dir as the location for arm libraries"
ac_help="$ac_help
--enable-threadsafe Enable support for multiple threads."
ac_help="$ac_help
--enable-intl-api Enable ECMAScript Internationalization API (default=yes for standalone JS)"
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=jsapi.h
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
trap '[ "$?" != 0 ] && echo "------ config.log ------" && tail -n 25 config.log' EXIT
ac_aux_dir=
for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Do some error checking and defaulting for the host and target type.
# The inputs are:
# configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
# same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
# as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:861: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:882: checking target system type" >&5
target_alias=$target
case "$target_alias" in
NONE)
case $nonopt in
NONE) target_alias=$host_alias ;;
*) target_alias=$nonopt ;;
esac ;;
esac
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:900: checking build system type" >&5
build_alias=$build
case "$build_alias" in
NONE)
case $nonopt in
NONE) build_alias=$host_alias ;;
*) build_alias=$nonopt ;;
esac ;;
esac
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
test "$host_alias" != "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
TARGET_CPU="${target_cpu}"
TARGET_VENDOR="${target_vendor}"
TARGET_OS="${target_os}"
CFLAGS="${CFLAGS=}"
CPPFLAGS="${CPPFLAGS=}"
CXXFLAGS="${CXXFLAGS=}"
LDFLAGS="${LDFLAGS=}"
HOST_CFLAGS="${HOST_CFLAGS=}"
HOST_CXXFLAGS="${HOST_CXXFLAGS=}"
HOST_LDFLAGS="${HOST_LDFLAGS=}"
_SUBDIR_CC="$CC"
_SUBDIR_CXX="$CXX"
_SUBDIR_CFLAGS="$CFLAGS"
_SUBDIR_CPPFLAGS="$CPPFLAGS"
_SUBDIR_CXXFLAGS="$CXXFLAGS"
_SUBDIR_LDFLAGS="$LDFLAGS"
_SUBDIR_HOST_CC="$HOST_CC"
_SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
_SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
_SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
_SUBDIR_CONFIG_ARGS="$ac_configure_args"
NSPR_VERSION=4
NSPR_MINVER=4.9.2
PERL_VERSION=5.006
WINDRES_VERSION=2.14.90
W32API_VERSION=3.14
MSMANIFEST_TOOL=
MISSING_X=
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:961: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AWK="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
echo "$ac_t""$AWK" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AWK" && break
done
USE_PTHREADS=
_PTHREAD_LDFLAGS=""
_topsrcdir=`cd \`dirname $0\`; pwd`
_objdir=`pwd`
if test "$_topsrcdir" != "$_objdir"
then
# Check for a couple representative files in the source tree
_conflict_files=
for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
if test -f $file; then
_conflict_files="$_conflict_files $file"
fi
done
if test "$_conflict_files"; then
echo "***"
echo "* Your source tree contains these files:"
for file in $_conflict_files; do
echo "* $file"
done
cat 1>&2 <<-EOF
* This indicates that you previously built in the source tree.
* A source tree build can confuse the separate objdir build.
*
* To clean up the source tree:
* 1. cd $_topsrcdir
* 2. gmake distclean
***
EOF
exit 1
break
fi
fi
MOZ_BUILD_ROOT=`pwd`
# Check whether --with-dist-dir or --without-dist-dir was given.
if test "${with_dist_dir+set}" = set; then
withval="$with_dist_dir"
TOP_DIST=$withval
else
TOP_DIST=dist
fi
if test -z "$CROSS_COMPILE"; then
case "$target" in
*-mingw*)
if test -z "$CC"; then CC=cl; fi
if test -z "$CXX"; then CXX=cl; fi
if test -z "$CPP"; then CPP="cl -E -nologo"; fi
if test -z "$CXXCPP"; then CXXCPP="cl -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
if test -z "$LD"; then LD=link; fi
if test -z "$AS"; then
case "${target_cpu}" in
i*86)
AS=ml;
;;
x86_64)
AS=ml64;
;;
esac
fi
if test -z "$MIDL"; then MIDL=midl; fi
# need override this flag since we don't use $(LDFLAGS) for this.
if test -z "$HOST_LDFLAGS" ; then
HOST_LDFLAGS=" "
fi
;;
*-darwin*)
# GCC on darwin is based on gcc 4.2 and we don't support it anymore.
if test -z "$CC"; then
for ac_prog in clang
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1072: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$CC" in
/*)
ac_cv_path_CC="$CC" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_CC="$CC" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_CC="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
CC="$ac_cv_path_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CC" && break
done
if test "$msyshost"; then
case "$CC" in
/*)
tmp_DIRNAME=`dirname "$CC"`
tmp_BASENAME=`basename "$CC"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
CC="$tmp_PWD/$tmp_BASENAME"
if test -e "$CC.exe"; then
CC="$CC.exe"
fi
esac
fi
fi
if test -z "$CXX"; then
for ac_prog in clang++
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1127: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$CXX" in
/*)
ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_CXX="$CXX" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_CXX="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
CXX="$ac_cv_path_CXX"
if test -n "$CXX"; then
echo "$ac_t""$CXX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CXX" && break
done
if test "$msyshost"; then
case "$CXX" in
/*)
tmp_DIRNAME=`dirname "$CXX"`
tmp_BASENAME=`basename "$CXX"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
CXX="$tmp_PWD/$tmp_BASENAME"
if test -e "$CXX.exe"; then
CXX="$CXX.exe"
fi
esac
fi
fi
IS_GCC=$($CC -v 2>&1 | grep gcc)
if test -n "$IS_GCC"
then
echo gcc is known to be broken on OS X, please use clang.
echo see http://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites
echo for more information.
exit 1
fi
;;
esac
fi
COMPILE_ENVIRONMENT=1
# Check whether --enable-compile-environment or --disable-compile-environment was given.
if test "${enable_compile_environment+set}" = set; then
enableval="$enable_compile_environment"
if test "$enableval" = "no"; then
COMPILE_ENVIRONMENT=
elif test "$enableval" = "yes"; then
:
else
{ echo "configure: error: Option, compile-environment, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
for ac_prog in $PERL perl5 perl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1208: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PERL" in
/*)
ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_PERL="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
echo "$ac_t""$PERL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$PERL" && break
done
if test "$msyshost"; then
case "$PERL" in
/*)
tmp_DIRNAME=`dirname "$PERL"`
tmp_BASENAME=`basename "$PERL"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
PERL="$tmp_PWD/$tmp_BASENAME"
if test -e "$PERL.exe"; then
PERL="$PERL.exe"
fi
esac
fi
if test -z "$PERL" -o "$PERL" = ":"; then
{ echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
fi
# Check whether --enable-shared-js or --disable-shared-js was given.
if test "${enable_shared_js+set}" = set; then
enableval="$enable_shared_js"
if test "$enableval" = "yes"; then
DISABLE_SHARED_JS=0
elif test "$enableval" = "no"; then
DISABLE_SHARED_JS=1
else
{ echo "configure: error: Option, shared-js, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$DISABLE_SHARED_JS" = "1" ; then
cat >> confdefs.pytmp <<\EOF
(''' STATIC_EXPORTABLE_JS_API ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define STATIC_EXPORTABLE_JS_API 1
EOF
else
JS_SHARED_LIBRARY=1
fi
if test "$JS_STANDALONE" = no; then
JS_STANDALONE=
else
JS_STANDALONE=1
fi
# Check whether --with-gonk or --without-gonk was given.
if test "${with_gonk+set}" = set; then
withval="$with_gonk"
gonkdir=$withval
fi
# Check whether --with-gonk-toolchain-prefix or --without-gonk-toolchain-prefix was given.
if test "${with_gonk_toolchain_prefix+set}" = set; then
withval="$with_gonk_toolchain_prefix"
gonk_toolchain_prefix=$withval
fi
if test -n "$gonkdir" ; then
kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
AS="$gonk_toolchain_prefix"as
CC="$gonk_toolchain_prefix"gcc
CXX="$gonk_toolchain_prefix"g++
CPP="$gonk_toolchain_prefix"cpp
LD="$gonk_toolchain_prefix"ld
AR="$gonk_toolchain_prefix"ar
RANLIB="$gonk_toolchain_prefix"ranlib
STRIP="$gonk_toolchain_prefix"strip
OBJCOPY="$gonk_toolchain_prefix"objcopy
STLPORT_CPPFLAGS="-I$gonkdir/external/stlport/stlport"
STLPORT_LIBS="-lstlport"
case "$target_cpu" in
arm)
ARCH_DIR=arch-arm
;;
i?86)
ARCH_DIR=arch-x86
;;
esac
CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic $CPPFLAGS -I$gonkdir/external/valgrind/fxos-include"
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions -Wno-psabi $CXXFLAGS $STLPORT_CPPFLAGS"
LIBS="$LIBS $STLPORT_LIBS"
LDFLAGS="-mandroid -L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ -llog $LDFLAGS"
if test -z "$HOST_CPPFLAGS" ; then
HOST_CPPFLAGS=" "
fi
if test -z "$HOST_CFLAGS" ; then
HOST_CFLAGS=" "
fi
if test -z "$HOST_CXXFLAGS" ; then
HOST_CXXFLAGS=" "
fi
if test -z "$HOST_LDFLAGS" ; then
HOST_LDFLAGS=" "
fi
cat >> confdefs.pytmp <<\EOF
(''' ANDROID ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ANDROID 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' GONK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define GONK 1
EOF
CROSS_COMPILE=1
else
# Check whether --with-android-ndk or --without-android-ndk was given.
if test "${with_android_ndk+set}" = set; then
withval="$with_android_ndk"
android_ndk=$withval
fi
# Check whether --with-android-toolchain or --without-android-toolchain was given.
if test "${with_android_toolchain+set}" = set; then
withval="$with_android_toolchain"
android_toolchain=$withval
fi
# Check whether --with-android-gnu-compiler-version or --without-android-gnu-compiler-version was given.
if test "${with_android_gnu_compiler_version+set}" = set; then
withval="$with_android_gnu_compiler_version"
android_gnu_compiler_version=$withval
fi
# Check whether --enable-android-libstdcxx or --disable-android-libstdcxx was given.
if test "${enable_android_libstdcxx+set}" = set; then
enableval="$enable_android_libstdcxx"
if test "$enableval" = "yes"; then
MOZ_ANDROID_LIBSTDCXX=1
elif test "$enableval" = "no"; then
MOZ_ANDROID_LIBSTDCXX=
else
{ echo "configure: error: Option, android-libstdcxx, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
android_version=9
# Check whether --with-android-version or --without-android-version was given.
if test "${with_android_version+set}" = set; then
withval="$with_android_version"
android_version=$withval
fi
if test $android_version -lt 9 ; then
{ echo "configure: error: --with-android-version must be at least 9." 1>&2; exit 1; }
fi
# Check whether --with-android-platform or --without-android-platform was given.
if test "${with_android_platform+set}" = set; then
withval="$with_android_platform"
android_platform=$withval
fi
case "$target" in
arm-linux*-android*|*-linuxandroid*)
android_tool_prefix="arm-linux-androideabi"
;;
i?86-*android*)
android_tool_prefix="i686-linux-android"
;;
mipsel-*android*)
android_tool_prefix="mipsel-linux-android"
;;
*)
android_tool_prefix="$target_os"
;;
esac
case "$target" in
*-android*|*-linuxandroid*)
if test -z "$android_ndk" ; then
{ echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
fi
if test -z "$android_toolchain" ; then
echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
echo "configure:1448: checking for android toolchain directory" >&5
kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
for version in $android_gnu_compiler_version 4.6 4.4.3 ; do
case "$target_cpu" in
arm)
target_name=arm-linux-androideabi-$version
;;
i?86)
target_name=x86-$version
;;
mipsel)
target_name=mipsel-linux-android-$version
;;
*)
{ echo "configure: error: target cpu is not supported" 1>&2; exit 1; }
;;
esac
case "$host_cpu" in
i*86)
android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
;;
x86_64)
android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86_64
if ! test -d "$android_toolchain" ; then
android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
fi
;;
*)
{ echo "configure: error: No known toolchain for your host cpu" 1>&2; exit 1; }
;;
esac
if test -d "$android_toolchain" ; then
android_gnu_compiler_version=$version
break
elif test -n "$android_gnu_compiler_version" ; then
{ echo "configure: error: not found. Your --with-android-gnu-compiler-version may be wrong." 1>&2; exit 1; }
fi
done
if test -z "$android_gnu_compiler_version" ; then
{ echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
else
echo "$ac_t""$android_toolchain" 1>&6
fi
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-android-toolchain=$android_toolchain"
fi
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-android-version=$android_version"
if test -z "$android_platform" ; then
echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
echo "configure:1501: checking for android platform directory" >&5
case "$target_cpu" in
arm)
target_name=arm
;;
i?86)
target_name=x86
;;
mipsel)
target_name=mips
;;
esac
android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
if test -d "$android_platform" ; then
echo "$ac_t""$android_platform" 1>&6
else
{ echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
fi
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-android-platform=$android_platform"
fi
case "$target_cpu" in
i?86)
if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
android_tool_prefix="i686-android-linux"
fi
;;
esac
TOOLCHAIN_PREFIX="$android_toolchain/bin/$android_tool_prefix-"
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
OBJCOPY="$android_toolchain"/bin/"$android_tool_prefix"-objcopy
CPPFLAGS="-isystem $android_platform/usr/include $CPPFLAGS"
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions -Wno-psabi $CXXFLAGS"
ASFLAGS="-isystem $android_platform/usr/include -DANDROID $ASFLAGS"
LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -llog -Wl,--allow-shlib-undefined $LDFLAGS"
if test -z "$HOST_CPPFLAGS" ; then
HOST_CPPFLAGS=" "
fi
if test -z "$HOST_CFLAGS" ; then
HOST_CFLAGS=" "
fi
if test -z "$HOST_CXXFLAGS" ; then
HOST_CXXFLAGS=" "
fi
if test -z "$HOST_LDFLAGS" ; then
HOST_LDFLAGS=" "
fi
ANDROID_NDK="${android_ndk}"
ANDROID_TOOLCHAIN="${android_toolchain}"
ANDROID_PLATFORM="${android_platform}"
cat >> confdefs.pytmp <<\EOF
(''' ANDROID ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ANDROID 1
EOF
CROSS_COMPILE=1
;;
esac
fi
MOZILLA_VERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir`
MOZILLA_UAVERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir -uaversion`
MOZILLA_SYMBOLVERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir -symbolversion`
cat >> confdefs.pytmp <<EOF
(''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZILLA_VERSION "$MOZILLA_VERSION"
EOF
cat >> confdefs.pytmp <<EOF
(''' MOZILLA_VERSION_U ''', r''' $MOZILLA_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define MOZILLA_VERSION_U $MOZILLA_VERSION
EOF
cat >> confdefs.pytmp <<EOF
(''' MOZILLA_UAVERSION ''', r''' "$MOZILLA_UAVERSION" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZILLA_UAVERSION "$MOZILLA_UAVERSION"
EOF
# Separate version into components for use in shared object naming etc
MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"`
MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"`
MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
IS_ALPHA=`echo $MOZILLA_VERSION | grep [ab]`
if test -n "$JS_STANDALONE"; then
JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
else
JS_SHELL_NAME=js
JS_CONFIG_NAME=js-config
fi
if test -n "$IS_ALPHA"; then
MOZJS_ALPHA=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9\.]*\([^0-9]\).*|\1|"`
fi
cat >> confdefs.pytmp <<EOF
(''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define MOZJS_MAJOR_VERSION $MOZJS_MAJOR_VERSION
EOF
cat >> confdefs.pytmp <<EOF
(''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define MOZJS_MINOR_VERSION $MOZJS_MINOR_VERSION
EOF
AR_FLAGS='cr $@'
if test "$COMPILE_ENVIRONMENT"; then
# Note:
# In Mozilla, we use the names $target, $host and $build incorrectly, but are
# too far gone to back out now. See Bug 475488:
# - When we say $target, we mean $host, that is, the system on which
# Mozilla will be run.
# - When we say $host, we mean $build, that is, the system on which Mozilla
# is built.
# - $target (in its correct usage) is for compilers who generate code for a
# different platform than $host, so it would not be used by Mozilla.
if test "$target" != "$host"; then
echo "cross compiling from $host to $target"
_SAVE_CC="$CC"
_SAVE_CFLAGS="$CFLAGS"
_SAVE_LDFLAGS="$LDFLAGS"
echo $ac_n "checking for host c compiler""... $ac_c" 1>&6
echo "configure:1676: checking for host c compiler" >&5
for ac_prog in $HOST_CC gcc cc /usr/ucb/cc cl icc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1682: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$HOST_CC"; then
ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_HOST_CC="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
HOST_CC="$ac_cv_prog_HOST_CC"
if test -n "$HOST_CC"; then
echo "$ac_t""$HOST_CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$HOST_CC" && break
done
test -n "$HOST_CC" || HOST_CC=""""
if test -z "$HOST_CC"; then
{ echo "configure: error: no acceptable c compiler found in \$PATH" 1>&2; exit 1; }
fi
echo "$ac_t""$HOST_CC" 1>&6
echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6
echo "configure:1717: checking for host c++ compiler" >&5
for ac_prog in $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1723: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$HOST_CXX"; then
ac_cv_prog_HOST_CXX="$HOST_CXX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_HOST_CXX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
HOST_CXX="$ac_cv_prog_HOST_CXX"
if test -n "$HOST_CXX"; then
echo "$ac_t""$HOST_CXX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$HOST_CXX" && break
done
test -n "$HOST_CXX" || HOST_CXX=""""
if test -z "$HOST_CXX"; then
{ echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&2; exit 1; }
fi
echo "$ac_t""$HOST_CXX" 1>&6
if test -z "$HOST_CFLAGS"; then
HOST_CFLAGS="$CFLAGS"
fi
if test -z "$HOST_CXXFLAGS"; then
HOST_CXXFLAGS="$CXXFLAGS"
fi
if test -z "$HOST_LDFLAGS"; then
HOST_LDFLAGS="$LDFLAGS"
fi
if test -z "$HOST_AR_FLAGS"; then
HOST_AR_FLAGS="$AR_FLAGS"
fi
for ac_prog in $HOST_RANLIB ranlib
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1775: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$HOST_RANLIB"; then
ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy=":"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_HOST_RANLIB="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
HOST_RANLIB="$ac_cv_prog_HOST_RANLIB"
if test -n "$HOST_RANLIB"; then
echo "$ac_t""$HOST_RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$HOST_RANLIB" && break
done
test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib"
for ac_prog in $HOST_AR ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1810: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$HOST_AR"; then
ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy=":"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_HOST_AR="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
HOST_AR="$ac_cv_prog_HOST_AR"
if test -n "$HOST_AR"; then
echo "$ac_t""$HOST_AR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$HOST_AR" && break
done
test -n "$HOST_AR" || HOST_AR="ar"
CC="$HOST_CC"
CFLAGS="$HOST_CFLAGS"
LDFLAGS="$HOST_LDFLAGS"
echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1845: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
#line 1847 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
fi
rm -f conftest*
CC="$HOST_CXX"
CFLAGS="$HOST_CXXFLAGS"
echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1869: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
#line 1871 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&2; exit 1; }
fi
rm -f conftest*
CC=$_SAVE_CC
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1898: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CC" && break
done
test -n "$CC" || CC=":"
unset ac_cv_prog_CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1932: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1962: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2013: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2045: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 2056 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2087: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2092: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2120: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
ac_cv_prog_cc_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2156: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
echo "$ac_t""$CXX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CXX" && break
done
test -n "$CXX" || CXX=":"
unset ac_cv_prog_CXX
for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2192: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
echo "$ac_t""$CXX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2224: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
#line 2235 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cxx_cross=no
else
ac_cv_prog_cxx_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2266: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2271: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.C <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
fi
fi
echo "$ac_t""$ac_cv_prog_gxx" 1>&6
if test $ac_cv_prog_gxx = yes; then
GXX=yes
else
GXX=
fi
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2299: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
else
ac_cv_prog_cxx_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-g"
fi
else
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
for ac_declaration in \
''\
'#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat > conftest.$ac_ext <<EOF
#line 2340 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:2348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
continue
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 2358 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:2365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2387: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$RANLIB" && break
done
test -n "$RANLIB" || RANLIB=":"
for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2422: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AR="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
echo "$ac_t""$AR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AR" && break
done
test -n "$AR" || AR=":"
for ac_prog in $AS "${target_alias}-as" "${target}-as"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2457: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$AS" in
/*)
ac_cv_path_AS="$AS" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_AS="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
AS="$ac_cv_path_AS"
if test -n "$AS"; then
echo "$ac_t""$AS" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AS" && break
done
test -n "$AS" || AS=":"
if test "$msyshost"; then
case "$AS" in
/*)
tmp_DIRNAME=`dirname "$AS"`
tmp_BASENAME=`basename "$AS"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
AS="$tmp_PWD/$tmp_BASENAME"
if test -e "$AS.exe"; then
AS="$AS.exe"
fi
esac
fi
for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2511: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$LD"; then
ac_cv_prog_LD="$LD" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_LD="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
LD="$ac_cv_prog_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$LD" && break
done
test -n "$LD" || LD=":"
for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2546: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_STRIP="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP=":"
for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2581: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$WINDRES"; then
ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_WINDRES="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
echo "$ac_t""$WINDRES" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$WINDRES" && break
done
test -n "$WINDRES" || WINDRES=":"
cat >> confdefs.pytmp <<\EOF
(''' CROSS_COMPILE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define CROSS_COMPILE 1
EOF
cross_compiling=yes
else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2624: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2654: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2705: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2737: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 2748 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2779: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2784: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2812: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
ac_cv_prog_cc_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2848: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CXX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
echo "$ac_t""$CXX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2880: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
#line 2891 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cxx_cross=no
else
ac_cv_prog_cxx_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2922: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2927: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.C <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
fi
fi
echo "$ac_t""$ac_cv_prog_gxx" 1>&6
if test $ac_cv_prog_gxx = yes; then
GXX=yes
else
GXX=
fi
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2955: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
else
ac_cv_prog_cxx_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-g"
fi
else
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
for ac_declaration in \
''\
'#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat > conftest.$ac_ext <<EOF
#line 2996 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:3004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
continue
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 3014 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3040: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
for ac_prog in $AS as
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3072: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$AS" in
/*)
ac_cv_path_AS="$AS" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_AS="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
AS="$ac_cv_path_AS"
if test -n "$AS"; then
echo "$ac_t""$AS" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AS" && break
done
test -n "$AS" || AS="$CC"
if test "$msyshost"; then
case "$AS" in
/*)
tmp_DIRNAME=`dirname "$AS"`
tmp_BASENAME=`basename "$AS"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
AS="$tmp_PWD/$tmp_BASENAME"
if test -e "$AS.exe"; then
AS="$AS.exe"
fi
esac
fi
for ac_prog in ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3126: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AR="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
echo "$ac_t""$AR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AR" && break
done
test -n "$AR" || AR=":"
for ac_prog in ld
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3161: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$LD"; then
ac_cv_prog_LD="$LD" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_LD="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
LD="$ac_cv_prog_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$LD" && break
done
test -n "$LD" || LD=":"
for ac_prog in strip
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3196: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_STRIP="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP=":"
for ac_prog in windres
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3231: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$WINDRES"; then
ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_WINDRES="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
echo "$ac_t""$WINDRES" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$WINDRES" && break
done
test -n "$WINDRES" || WINDRES=":"
if test -z "$HOST_CC"; then
HOST_CC='$(CC)'
fi
if test -z "$HOST_CFLAGS"; then
HOST_CFLAGS='$(CFLAGS)'
fi
if test -z "$HOST_CXX"; then
HOST_CXX='$(CXX)'
fi
if test -z "$HOST_CXXFLAGS"; then
HOST_CXXFLAGS='$(CXXFLAGS)'
fi
if test -z "$HOST_LDFLAGS"; then
HOST_LDFLAGS='$(LDFLAGS)'
fi
if test -z "$HOST_RANLIB"; then
HOST_RANLIB='$(RANLIB)'
fi
if test -z "$HOST_AR"; then
HOST_AR='$(AR)'
fi
if test -z "$HOST_AR_FLAGS"; then
HOST_AR_FLAGS='$(AR_FLAGS)'
fi
fi
GNU_AS=
GNU_LD=
GNU_CC=
GNU_CXX=
CC_VERSION='N/A'
CXX_VERSION='N/A'
if test "$GCC" = "yes"; then
GNU_CC=1
CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
fi
if test "$GXX" = "yes"; then
GNU_CXX=1
CXX_VERSION=`$CXX -v 2>&1 | grep 'gcc version'`
GCC_VERSION_FULL=`echo "$CXX_VERSION" | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
GCC_VERSION=`echo "$GCC_VERSION_FULL" | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
GCC_MAJOR_VERSION=`echo ${GCC_VERSION} | $AWK -F\. '{ print $1 }'`
GCC_MINOR_VERSION=`echo ${GCC_VERSION} | $AWK -F\. '{ print $2 }'`
fi
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
GNU_AS=1
fi
rm -f conftest.out
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
GNU_LD=1
fi
if test "$GNU_CC"; then
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
GCC_USE_GNU_LD=1
fi
fi
INTEL_CC=
INTEL_CXX=
if test "$GCC" = yes; then
if test "`$CC -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
INTEL_CC=1
fi
fi
if test "$GXX" = yes; then
if test "`$CXX -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
INTEL_CXX=1
fi
fi
CLANG_CC=
CLANG_CXX=
if test "`$CC -v 2>&1 | egrep -c '(clang version|Apple.*clang)'`" != "0"; then
CLANG_CC=1
fi
if test "`$CXX -v 2>&1 | egrep -c '(clang version|Apple.*clang)'`" != "0"; then
CLANG_CXX=1
fi
if test -n "$GNU_CC" -a -z "$CLANG_CC" ; then
if test "$GCC_MAJOR_VERSION" -eq 4 -a "$GCC_MINOR_VERSION" -lt 4 ||
test "$GCC_MAJOR_VERSION" -lt 4; then
{ echo "configure: error: Only GCC 4.4 or newer supported" 1>&2; exit 1; }
fi
fi
# Check whether --enable-metro or --disable-metro was given.
if test "${enable_metro+set}" = set; then
enableval="$enable_metro"
if test "$enableval" = "yes"; then
MOZ_METRO=1
elif test "$enableval" = "no"; then
MOZ_METRO=
else
{ echo "configure: error: Option, metro, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_METRO"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_METRO ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_METRO 1
EOF
# Target the Windows 8 Kit
WINSDK_TARGETVER=602
WINVER=502
else
# Target the Windows 7 SDK by default
WINSDK_TARGETVER=601
WINVER=502
fi
# Check whether --with-windows-version or --without-windows-version was given.
if test "${with_windows_version+set}" = set; then
withval="$with_windows_version"
WINSDK_TARGETVER=$withval
fi
# Currently only two sdk versions allowed, 601 and 602
case "$WINSDK_TARGETVER" in
601|602)
MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000
;;
*)
{ echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER)" 1>&2; exit 1; };
;;
esac
case "$target" in
*-mingw*)
if test "$GCC" != "yes" -a -z "$CLANG_CC"; then
# Check to see if we are really running in a msvc environemnt
_WIN32_MSVC=1
# Make sure compilers are valid
CFLAGS="$CFLAGS -TC -nologo"
CXXFLAGS="$CXXFLAGS -TP -nologo"
# MSVC warning C4345 warns of newly conformant behavior as of VS2003.
# MSVC warning C4351 warns of newly conformant behavior as of VS2005.
# MSVC warning C4800 warns when a value is implicitly cast to bool,
# because this also forces narrowing to a single byte, which can be a
# perf hit. But this matters so little in practice (and often we want
# that behavior) that it's better to turn it off.
# _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific
# secure CRT functions.
CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -D_CRT_SECURE_NO_WARNINGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 3431 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; exit 1; }
fi
rm -f conftest*
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 3456 "configure"
#include "confdefs.h"
#include <new.h>
int main() {
unsigned *test = new unsigned(42);
; return 0; }
EOF
if { (eval echo configure:3463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; exit 1; }
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
# Determine compiler version
CC_VERSION=`"${CC}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
_CC_MAJOR_VERSION=`echo ${CC_VERSION} | $AWK -F\. '{ print $1 }'`
_CC_MINOR_VERSION=`echo ${CC_VERSION} | $AWK -F\. '{ print $2 }'`
_CC_RELEASE=`echo ${CC_VERSION} | $AWK -F\. '{ print $3 }'`
_CC_BUILD=`echo ${CC_VERSION} | $AWK -F\. '{ print $4 }'`
_MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
CXX_VERSION=`"${CXX}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
_CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | $AWK -F\. '{ print $1 }'`
if test "$_CC_MAJOR_VERSION" != "$_CXX_MAJOR_VERSION"; then
{ echo "configure: error: The major versions of \$CC and \$CXX do not match." 1>&2; exit 1; }
fi
if test "$_CC_MAJOR_VERSION" = "16"; then
_CC_SUITE=10
cat >> confdefs.pytmp <<\EOF
(''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CRT_SECURE_NO_WARNINGS 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CRT_NONSTDC_NO_WARNINGS 1
EOF
elif test "$_CC_MAJOR_VERSION" = "17"; then
_CC_SUITE=11
cat >> confdefs.pytmp <<\EOF
(''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CRT_SECURE_NO_WARNINGS 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CRT_NONSTDC_NO_WARNINGS 1
EOF
else
{ echo "configure: error: This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; exit 1; }
fi
MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
if test -z "$MSMT_TOOL"; then
{ echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
fi
_MSMT_VER_FILTER='s|.*[^!-~]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
if test -z "$MSMANIFEST_TOOL_VERSION"; then
echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
fi
MSMANIFEST_TOOL=1
unset MSMT_TOOL
# Check linker version
_LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
{ echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; exit 1; }
fi
INCREMENTAL_LINKER=1
unset _MSVC_VER_FILTER
elif test -z "$CLANG_CC"; then
# Check w32api version
_W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
_W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6
echo "configure:3566: checking for w32api version >= $W32API_VERSION" >&5
cat > conftest.$ac_ext <<EOF
#line 3568 "configure"
#include "confdefs.h"
#include <w32api.h>
int main() {
#if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \
(__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \
__W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
#error "test failed."
#endif
; return 0; }
EOF
if { (eval echo configure:3580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
res=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
res=no
fi
rm -f conftest*
echo "$ac_t""$res" 1>&6
if test "$res" != "yes"; then
{ echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; exit 1; }
fi
# Check windres version
echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6
echo "configure:3596: checking for windres version >= $WINDRES_VERSION" >&5
_WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'`
echo "$ac_t""$_WINDRES_VERSION" 1>&6
_WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
_WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
_WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \
"$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
"$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \
"$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
"$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \
"$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION"
then
{ echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; exit 1; }
fi
MOZ_WINSDK_MAXVER=0x06010000
fi # !GNU_CC
# If MSVC or clang
if test "$GCC" != "yes" -o -n "$CLANG_CC" ; then
for ac_hdr in winsdkver.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3625: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3630 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:3638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_header_winsdkver_h" = "yes"; then
echo $ac_n "checking for highest Windows version supported by this SDK""... $ac_c" 1>&6
echo "configure:3669: checking for highest Windows version supported by this SDK" >&5
if eval "test \"`echo '$''{'ac_cv_winsdk_maxver'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.h <<EOF
#include <winsdkver.h>
#include <sdkddkver.h>
#if (NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) > NTDDI_MAXVER)
#define WINSDK_MAXVER NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER)
#else
#define WINSDK_MAXVER NTDDI_MAXVER
#endif
WINSDK_MAXVER
EOF
ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1`
rm -f conftest.h
fi
echo "$ac_t""$ac_cv_winsdk_maxver" 1>&6
MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}
else
{ echo "configure: error: Your SDK does not have WinSDKVer.h. It is probably too old. Please upgrade to a newer SDK or try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this." 1>&2; exit 1; }
fi
fi
cat >> confdefs.pytmp <<EOF
(''' WINVER ''', r''' 0x$WINVER ''')
EOF
cat >> confdefs.h <<EOF
#define WINVER 0x$WINVER
EOF
cat >> confdefs.pytmp <<EOF
(''' _WIN32_WINNT ''', r''' 0x$WINVER ''')
EOF
cat >> confdefs.h <<EOF
#define _WIN32_WINNT 0x$WINVER
EOF
# Require OS features provided by IE 6.0 SP2 (XP SP2)
cat >> confdefs.pytmp <<EOF
(''' _WIN32_IE ''', r''' 0x0603 ''')
EOF
cat >> confdefs.h <<EOF
#define _WIN32_IE 0x0603
EOF
# If the maximum version supported by this SDK is lower than the target
# version, error out
echo $ac_n "checking for Windows SDK being recent enough""... $ac_c" 1>&6
echo "configure:3724: checking for Windows SDK being recent enough" >&5
if $PERL -e "exit(0x$MOZ_WINSDK_TARGETVER > $MOZ_WINSDK_MAXVER)"; then
echo "$ac_t"""yes"" 1>&6
else
echo "$ac_t"""no"" 1>&6
{ echo "configure: error: You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this." 1>&2; exit 1; }
fi
cat >> confdefs.pytmp <<EOF
(''' MOZ_WINSDK_TARGETVER ''', r''' 0x$MOZ_WINSDK_TARGETVER ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_WINSDK_TARGETVER 0x$MOZ_WINSDK_TARGETVER
EOF
# Definitions matching sdkddkver.h
cat >> confdefs.pytmp <<EOF
(''' MOZ_NTDDI_WIN7 ''', r''' 0x06010000 ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_NTDDI_WIN7 0x06010000
EOF
;;
esac
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:3751: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
CPP="${CC-cc} -E"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 3766 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 3783 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 3800 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:3831: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
#line 3844 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CXXCPP=/lib/cpp
fi
rm -f conftest*
ac_cv_prog_CXXCPP="$CXXCPP"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
fi
CXXCPP="$ac_cv_prog_CXXCPP"
echo "$ac_t""$CXXCPP" 1>&6
if test -n "$_WIN32_MSVC"; then
SKIP_PATH_CHECKS=1
SKIP_COMPILER_CHECKS=1
SKIP_LIBRARY_CHECKS=1
# Since we're skipping compiler and library checks, hard-code
# some facts here.
# Common to all MSVC environments:
cat >> confdefs.pytmp <<\EOF
(''' HAVE_LOCALECONV ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_LOCALECONV 1
EOF
fi
fi # COMPILE_ENVIRONMENT
if test "$cross_compiling" = "yes"; then
CROSS_COMPILE=1
else
CROSS_COMPILE=
fi
# Check to see if we are running in a broken QEMU scratchbox.
# We know that anything below 1.0.16 is broken.
for ac_prog in sb-conf ve
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3908: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$SBCONF"; then
ac_cv_prog_SBCONF="$SBCONF" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_SBCONF="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
SBCONF="$ac_cv_prog_SBCONF"
if test -n "$SBCONF"; then
echo "$ac_t""$SBCONF" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$SBCONF" && break
done
test -n "$SBCONF" || SBCONF=""""
if test -n "$SBCONF"; then
_sb_version=`$SBCONF ve`
_sb_version_major=`echo $_sb_version | cut -f1 -d.`
_sb_version_minor=`echo $_sb_version | cut -f2 -d.`
_sb_version_point=`echo $_sb_version | cut -f3 -d.`
if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then
QEMU_CANT_RUN_JS_SHELL=1
fi
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:3970: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:4023: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
rm -f conftestdata
ac_cv_prog_LN_S="ln -s"
else
ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for tar archiver""... $ac_c" 1>&6
echo "configure:4045: checking for tar archiver" >&5
for ac_prog in gnutar gtar tar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4051: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$TAR"; then
ac_cv_prog_TAR="$TAR" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_TAR="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
TAR="$ac_cv_prog_TAR"
if test -n "$TAR"; then
echo "$ac_t""$TAR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$TAR" && break
done
test -n "$TAR" || TAR=""""
if test -z "$TAR"; then
echo "configure: warning: no tar archiver found in \$PATH" 1>&2
fi
echo "$ac_t""$TAR" 1>&6
if test -z "$TINDERBOX_SKIP_PERL_VERSION_CHECK"; then
echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6
echo "configure:4089: checking for minimum required perl version >= $PERL_VERSION" >&5
_perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
_perl_res=$?
echo "$ac_t""$_perl_version" 1>&6
if test "$_perl_res" != 0; then
{ echo "configure: error: Perl $PERL_VERSION or higher is required." 1>&2; exit 1; }
fi
fi
echo $ac_n "checking for full perl installation""... $ac_c" 1>&6
echo "configure:4100: checking for full perl installation" >&5
_perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5`
_perl_res=$?
if test "$_perl_res" != 0; then
echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find Config.pm or \$Config{archlib}. A full perl installation is required." 1>&2; exit 1; }
else
echo "$ac_t""yes" 1>&6
fi
if test -z "$PYTHON"; then
for ac_prog in $PYTHON python2.7 python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4118: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PYTHON" in
/*)
ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_PYTHON="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
PYTHON="$ac_cv_path_PYTHON"
if test -n "$PYTHON"; then
echo "$ac_t""$PYTHON" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$PYTHON" && break
done
if test "$msyshost"; then
case "$PYTHON" in
/*)
tmp_DIRNAME=`dirname "$PYTHON"`
tmp_BASENAME=`basename "$PYTHON"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
PYTHON="$tmp_PWD/$tmp_BASENAME"
if test -e "$PYTHON.exe"; then
PYTHON="$PYTHON.exe"
fi
esac
fi
if test -z "$PYTHON"; then
{ echo "configure: error: python was not found in \$PATH" 1>&2; exit 1; }
fi
else
echo "$ac_t""Using Python from environment variable \$PYTHON" 1>&6
fi
_virtualenv_topsrcdir=
_virtualenv_populate_path=
for base in $MOZILLA_CENTRAL_PATH $_topsrcdir $_topsrcdir/../..; do
possible=$base/build/virtualenv/populate_virtualenv.py
if test -e $possible; then
_virtualenv_topsrcdir=$base
_virtualenv_populate_path=$possible
break
fi
done
if test -z $_virtualenv_populate_path; then
{ echo "configure: error: Unable to find Virtualenv population script. In order
to build, you will need mozilla-central's virtualenv.
If you are building from a mozilla-central checkout, you should never see this
message. If you are building from a source archive, the source archive was
likely not created properly (it is missing the virtualenv files).
If you have a copy of mozilla-central available, define the
MOZILLA_CENTRAL_PATH environment variable to the top source directory of
mozilla-central and relaunch configure." 1>&2; exit 1; }
fi
if test -z $DONT_POPULATE_VIRTUALENV; then
echo "$ac_t""Creating Python environment" 1>&6
$PYTHON $_virtualenv_populate_path \
$_virtualenv_topsrcdir $MOZ_BUILD_ROOT $MOZ_BUILD_ROOT/_virtualenv || exit 1
case "$host_os" in
mingw*)
PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe
;;
*)
PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python
;;
esac
fi
echo $ac_n "checking Python environment is Mozilla virtualenv""... $ac_c" 1>&6
echo "configure:4218: checking Python environment is Mozilla virtualenv" >&5
$PYTHON -c "import mozbuild.base"
if test "$?" != 0; then
{ echo "configure: error: Python environment does not appear to be sane." 1>&2; exit 1; }
fi
echo "$ac_t""yes" 1>&6
if test -z "$COMPILE_ENVIRONMENT"; then
NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py'
fi
# Extract the first word of "doxygen", so it can be a program name with args.
set dummy doxygen; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4234: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$DOXYGEN" in
/*)
ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_DOXYGEN="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=":"
;;
esac
fi
DOXYGEN="$ac_cv_path_DOXYGEN"
if test -n "$DOXYGEN"; then
echo "$ac_t""$DOXYGEN" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "$msyshost"; then
case "$DOXYGEN" in
/*)
tmp_DIRNAME=`dirname "$DOXYGEN"`
tmp_BASENAME=`basename "$DOXYGEN"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
DOXYGEN="$tmp_PWD/$tmp_BASENAME"
if test -e "$DOXYGEN.exe"; then
DOXYGEN="$DOXYGEN.exe"
fi
esac
fi
# Extract the first word of "autoconf", so it can be a program name with args.
set dummy autoconf; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4283: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$AUTOCONF" in
/*)
ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":"
;;
esac
fi
AUTOCONF="$ac_cv_path_AUTOCONF"
if test -n "$AUTOCONF"; then
echo "$ac_t""$AUTOCONF" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "$msyshost"; then
case "$AUTOCONF" in
/*)
tmp_DIRNAME=`dirname "$AUTOCONF"`
tmp_BASENAME=`basename "$AUTOCONF"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
AUTOCONF="$tmp_PWD/$tmp_BASENAME"
if test -e "$AUTOCONF.exe"; then
AUTOCONF="$AUTOCONF.exe"
fi
esac
fi
# Extract the first word of "xargs", so it can be a program name with args.
set dummy xargs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4332: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$XARGS" in
/*)
ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_XARGS="$XARGS" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_XARGS="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
XARGS="$ac_cv_path_XARGS"
if test -n "$XARGS"; then
echo "$ac_t""$XARGS" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "$msyshost"; then
case "$XARGS" in
/*)
tmp_DIRNAME=`dirname "$XARGS"`
tmp_BASENAME=`basename "$XARGS"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
XARGS="$tmp_PWD/$tmp_BASENAME"
if test -e "$XARGS.exe"; then
XARGS="$XARGS.exe"
fi
esac
fi
if test -z "$XARGS" -o "$XARGS" = ":"; then
{ echo "configure: error: xargs not found in \$PATH ." 1>&2; exit 1; }
fi
if test "$COMPILE_ENVIRONMENT"; then
# Check whether --enable-macos-target or --disable-macos-target was given.
if test "${enable_macos_target+set}" = set; then
enableval="$enable_macos_target"
_MACOSX_DEPLOYMENT_TARGET=$enableval
fi
if test "$target_cpu" != "arm"; then
case "$target" in
*-darwin*)
if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
else
export MACOSX_DEPLOYMENT_TARGET=10.6
fi
;;
esac
fi
MACOS_SDK_DIR=
NEXT_ROOT=
# Check whether --with-macos-sdk or --without-macos-sdk was given.
if test "${with_macos_sdk+set}" = set; then
withval="$with_macos_sdk"
MACOS_SDK_DIR=$withval
fi
if test "$MACOS_SDK_DIR"; then
if test ! -d "$MACOS_SDK_DIR"; then
{ echo "configure: error: SDK not found. When using --with-macos-sdk, you must
specify a valid SDK. SDKs are installed when the optional cross-development
tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
fi
CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}"
CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}"
echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6
echo "configure:4437: checking for valid compiler/Mac OS X SDK combination" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 4446 "configure"
#include "confdefs.h"
#include <new>
int main() { return 0; }
int main() {
result=yes
; return 0; }
EOF
if { (eval echo configure:4454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
result=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$result" 1>&6
if test "$result" = "no" ; then
{ echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; exit 1; }
fi
fi
fi # COMPILE_ENVIRONMENT
if test -n "$MAKE"; then
if test `echo $MAKE | grep -c make.py` != 1; then
NOT_PYMAKE=$MAKE
fi
fi
case "$host_os" in
mingw*)
for ac_prog in $GMAKE $NOT_PYMAKE make gmake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4491: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$GMAKE" in
/*)
ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_GMAKE="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
GMAKE="$ac_cv_path_GMAKE"
if test -n "$GMAKE"; then
echo "$ac_t""$GMAKE" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$GMAKE" && break
done
test -n "$GMAKE" || GMAKE=":"
if test "$msyshost"; then
case "$GMAKE" in
/*)
tmp_DIRNAME=`dirname "$GMAKE"`
tmp_BASENAME=`basename "$GMAKE"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
GMAKE="$tmp_PWD/$tmp_BASENAME"
if test -e "$GMAKE.exe"; then
GMAKE="$GMAKE.exe"
fi
esac
fi
;;
*)
for ac_prog in $GMAKE $NOT_PYMAKE gmake make
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4547: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$GMAKE" in
/*)
ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_GMAKE="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
GMAKE="$ac_cv_path_GMAKE"
if test -n "$GMAKE"; then
echo "$ac_t""$GMAKE" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$GMAKE" && break
done
test -n "$GMAKE" || GMAKE=":"
if test "$msyshost"; then
case "$GMAKE" in
/*)
tmp_DIRNAME=`dirname "$GMAKE"`
tmp_BASENAME=`basename "$GMAKE"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
GMAKE="$tmp_PWD/$tmp_BASENAME"
if test -e "$GMAKE.exe"; then
GMAKE="$GMAKE.exe"
fi
esac
fi
;;
esac
if test "$GMAKE" = ":"; then
{ echo "configure: error: GNU make not found" 1>&2; exit 1; }
fi
# MAKE will be set by client.mk, but still need this for standalone js builds
if test -z "$MAKE"; then
MAKE=$GMAKE
fi
if test "$COMPILE_ENVIRONMENT"; then
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:4614: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
withval="$with_x"
:
fi
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
# Both variables are already set.
have_x=yes
else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
cat > Imakefile <<'EOF'
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
for ac_extension in a so sl; do
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
test -f $ac_im_libdir/libX11.$ac_extension; then
ac_im_usrlibdir=$ac_im_libdir; break
fi
done
# Screen out bogus values from the imake configuration. They are
# bogus both because they are the default anyway, and because
# using them would break gcc on systems where it needs fixed includes.
case "$ac_im_incroot" in
/usr/include) ;;
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
esac
case "$ac_im_usrlibdir" in
/usr/lib | /lib) ;;
*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
esac
fi
cd ..
rm -fr conftestdir
fi
if test "$ac_x_includes" = NO; then
# Guess where to find include files, by looking for this one X11 .h file.
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 4676 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# We can compile using X headers with no special include directory.
ac_x_includes=
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
# Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
; \
do
if test -r "$ac_dir/$x_direct_test_include"; then
ac_x_includes=$ac_dir
break
fi
done
fi
rm -f conftest*
fi # $ac_x_includes = NO
if test "$ac_x_libraries" = NO; then
# Check for the libraries.
test -z "$x_direct_test_library" && x_direct_test_library=Xt
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4750 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:4757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
/usr/X11/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
; \
do
for ac_extension in a so sl; do
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi
done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO
if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
# Didn't find X anywhere. Cache the known absence of X.
ac_cv_have_x="have_x=no"
else
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes \
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
fi
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
echo "$ac_t""$have_x" 1>&6
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
cat >> confdefs.pytmp <<\EOF
(''' X_DISPLAY_MISSING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF
X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
if test -n "$x_includes"; then
X_CFLAGS="$X_CFLAGS -I$x_includes"
fi
# It would also be nice to do this for all -L options, not just this one.
if test -n "$x_libraries"; then
X_LIBS="$X_LIBS -L$x_libraries"
# For Solaris; some versions of Sun CC require a space after -R and
# others require no space. Words are not sufficient . . . .
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:4866: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
#line 4869 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_R_nospace=no
fi
rm -f conftest*
if test $ac_R_nospace = yes; then
echo "$ac_t""no" 1>&6
X_LIBS="$X_LIBS -R$x_libraries"
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
#line 4892 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_R_space=no
fi
rm -f conftest*
if test $ac_R_space = yes; then
echo "$ac_t""yes" 1>&6
X_LIBS="$X_LIBS -R $x_libraries"
else
echo "$ac_t""neither works" 1>&6
fi
fi
LIBS="$ac_xsave_LIBS"
esac
fi
# Check for system-dependent libraries X programs must link with.
# Do this before checking for the system-independent R6 libraries
# (-lICE), since we may need -lsocket or whatever for X linking.
if test "$ISC" = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
else
# Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:4931: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4939 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa();
int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
else
echo "$ac_t""no" 1>&6
fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:4972: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4980 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa();
int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
else
echo "$ac_t""no" 1>&6
fi
fi
# msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
# to get the SysV transport functions.
# chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
# needs -lnsl.
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:5020: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5025 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif
; return 0; }
EOF
if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
fi
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:5069: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5077 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
else
echo "$ac_t""no" 1>&6
fi
fi
# lieder@skyler.mavd.honeywell.com says without -lsocket,
# socket/setsockopt and other routines are undefined under SCO ODT
# 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
# on later versions), says simon@lia.di.epfl.ch: it contains
# gethostby* variants that don't use the nameserver (or something).
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:5118: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5123 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
connect();
#endif
; return 0; }
EOF
if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_connect=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
fi
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:5167: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5175 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect();
int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
else
echo "$ac_t""no" 1>&6
fi
fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:5210: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5215 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
remove();
#endif
; return 0; }
EOF
if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_remove=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
fi
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:5259: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5267 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove();
int main() {
remove()
; return 0; }
EOF
if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
else
echo "$ac_t""no" 1>&6
fi
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:5302: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5307 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
shmat();
#endif
; return 0; }
EOF
if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_shmat=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
fi
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:5351: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5359 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat();
int main() {
shmat()
; return 0; }
EOF
if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
else
echo "$ac_t""no" 1>&6
fi
fi
fi
# Check for libraries that X11R6 Xt/Xaw programs need.
ac_save_LDFLAGS="$LDFLAGS"
test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
# check for ICE first), but we must link in the order -lSM -lICE or
# we get undefined symbols. So assume we have SM if we have ICE.
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:5403: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5411 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char IceConnectionNumber();
int main() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
else
echo "$ac_t""no" 1>&6
fi
LDFLAGS="$ac_save_LDFLAGS"
fi
XCFLAGS="$X_CFLAGS"
fi # COMPILE_ENVIRONMENT
AS_BIN=$AS
AR_LIST='$(AR) t'
AR_EXTRACT='$(AR) x'
AR_DELETE='$(AR) d'
AS='$(CC)'
AS_DASH_C_FLAG='-c'
DLL_PREFIX=lib
LIB_PREFIX=lib
DLL_SUFFIX=.so
OBJ_SUFFIX=o
LIB_SUFFIX=a
ASM_SUFFIX=s
IMPORT_LIB_SUFFIX=
TARGET_MD_ARCH=unix
DIRENT_INO=d_ino
MOZ_USER_DIR=".mozilla"
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
USE_DEPENDENT_LIBS=1
_PLATFORM_DEFAULT_TOOLKIT=cairo-gtk2
if test -n "$CROSS_COMPILE"; then
OS_TARGET="${target_os}"
OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
OS_RELEASE=
case "${target_os}" in
linux*) OS_ARCH=Linux OS_TARGET=Linux ;;
kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD OS_TARGET=GNU_kFreeBSD ;;
gnu*) OS_ARCH=GNU ;;
solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
mingw*) OS_ARCH=WINNT OS_TARGET=WINNT ;;
darwin*) OS_ARCH=Darwin OS_TARGET=Darwin ;;
esac
case "${target}" in
*-android*|*-linuxandroid*) OS_ARCH=Linux OS_TARGET=Android ;;
esac
else
OS_TARGET=`uname -s`
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
OS_RELEASE=`uname -r`
fi
# Before this used `uname -m` when not cross compiling
# but that breaks when you have a 64 bit kernel with a 32 bit userland.
OS_TEST="${target_cpu}"
HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
#######################################################################
# Master "Core Components" macros for getting the OS target #
#######################################################################
#
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
# cross-compilation.
#
#
# Define and override various archtecture-specific variables, including
# HOST_OS_ARCH
# OS_ARCH
# OS_TEST
# OS_TARGET
# OS_RELEASE
# OS_MINOR_RELEASE
#
case "$HOST_OS_ARCH" in
mingw*)
HOST_OS_ARCH=WINNT
;;
darwin*)
HOST_OS_ARCH=Darwin
;;
linux*)
HOST_OS_ARCH=Linux
;;
solaris*)
HOST_OS_ARCH=SunOS
SOLARIS_SUNPRO_CC=
SOLARIS_SUNPRO_CXX=
if test -z "$GNU_CC"; then
if test "`$CC -V 2>&1 | egrep -c 'Sun.*C '`" != "0"; then
SOLARIS_SUNPRO_CC=1
fi
fi
if test -z "$GNU_CXX"; then
if test "`$CXX -V 2>&1 | egrep -c 'Sun.*C\+\+ '`" != "0"; then
SOLARIS_SUNPRO_CXX=1
fi
fi
;;
OS_2)
HOST_OS_ARCH=OS2
;;
esac
case "$OS_ARCH" in
WINNT)
if test -z "$CROSS_COMPILE" ; then
OS_TEST=`uname -p`
fi
;;
Windows_NT)
#
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
#
# The -r option of MKS uname only returns the major version number.
# So we need to use its -v option to get the minor version number.
# Moreover, it doesn't have the -p option, so we need to use uname -m.
#
OS_ARCH=WINNT
OS_TARGET=WINNT
OS_MINOR_RELEASE=`uname -v`
if test "$OS_MINOR_RELEASE" = "00"; then
OS_MINOR_RELEASE=0
fi
OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
;;
MINGW*_NT*)
#
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
OS_ARCH=WINNT
OS_TARGET=WINNT
;;
AIX)
OS_RELEASE=`uname -v`.`uname -r`
OS_TEST=${target_cpu}
if test -z "$GNU_CC"; then
if test "`$CC -qversion 2>&1 | egrep -c 'IBM XL'`" != "0"; then
AIX_IBM_XLC=1
fi
fi
;;
OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
OS_RELEASE=`uname -v`
;;
Darwin)
case "${target_cpu}" in
powerpc*)
OS_TEST=ppc
;;
i*86*)
OS_TEST=i386
;;
x86_64)
OS_TEST=x86_64
;;
*)
if test -z "$CROSS_COMPILE" ; then
OS_TEST=`uname -p`
fi
;;
esac
;;
esac
# Only set CPU_ARCH if we recognize the value of OS_TEST
case "$OS_TEST" in
*86 | i86pc)
CPU_ARCH=x86
;;
powerpc64 | ppc64)
CPU_ARCH=ppc64
;;
powerpc | ppc | rs6000)
CPU_ARCH=ppc
;;
Alpha | alpha | ALPHA)
CPU_ARCH=Alpha
;;
s390)
CPU_ARCH=s390
;;
s390x)
CPU_ARCH=s390x
;;
hppa* | parisc)
CPU_ARCH=hppa
;;
sun4u | sparc*)
CPU_ARCH=sparc
;;
x86_64 | ia64)
CPU_ARCH="$OS_TEST"
;;
arm*)
CPU_ARCH=arm
;;
mips|mipsel)
CPU_ARCH="mips"
;;
esac
if test -z "$OS_TARGET"; then
OS_TARGET=$OS_ARCH
fi
OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
INTEL_ARCHITECTURE=
case "$OS_TEST" in
x86_64|i?86)
INTEL_ARCHITECTURE=1
esac
MOZ_THUMB=toolchain-default
MOZ_THUMB_INTERWORK=toolchain-default
MOZ_FPU=toolchain-default
MOZ_FLOAT_ABI=toolchain-default
MOZ_SOFT_FLOAT=toolchain-default
# Check whether --with-arch or --without-arch was given.
if test "${with_arch+set}" = set; then
withval="$with_arch"
if test -z "$GNU_CC"; then
{ echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&2; exit 1; }
fi
MOZ_ARCH=$withval
fi
if test -z "$MOZ_ARCH"; then
case "${CPU_ARCH}-${OS_TARGET}" in
arm-Android)
MOZ_THUMB=yes
MOZ_ARCH=armv7-a
MOZ_FPU=vfp
MOZ_FLOAT_ABI=softfp
;;
arm-Darwin)
MOZ_ARCH=toolchain-default
MOZ_THUMB=yes
;;
arm-*)
if test -n "$MOZ_PLATFORM_MAEMO"; then
MOZ_THUMB=no
MOZ_ARCH=armv7-a
MOZ_FLOAT_ABI=softfp
fi
if test "$MOZ_PLATFORM_MAEMO" = 6; then
MOZ_THUMB=yes
fi
;;
esac
fi
if test "$MOZ_ARCH" = "armv6" -a "$OS_TARGET" = "Android"; then
MOZ_FPU=vfp
fi
# Check whether --with-thumb or --without-thumb was given.
if test "${with_thumb+set}" = set; then
withval="$with_thumb"
if test -z "$GNU_CC"; then
{ echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&2; exit 1; }
fi
MOZ_THUMB=$withval
fi
# Check whether --with-thumb-interwork or --without-thumb-interwork was given.
if test "${with_thumb_interwork+set}" = set; then
withval="$with_thumb_interwork"
if test -z "$GNU_CC"; then
{ echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&2; exit 1; }
fi
MOZ_THUMB_INTERWORK=$withval
fi
# Check whether --with-fpu or --without-fpu was given.
if test "${with_fpu+set}" = set; then
withval="$with_fpu"
if test -z "$GNU_CC"; then
{ echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&2; exit 1; }
fi
MOZ_FPU=$withval
fi
# Check whether --with-float-abi or --without-float-abi was given.
if test "${with_float_abi+set}" = set; then
withval="$with_float_abi"
if test -z "$GNU_CC"; then
{ echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&2; exit 1; }
fi
MOZ_FLOAT_ABI=$withval
fi
# Check whether --with-soft-float or --without-soft-float was given.
if test "${with_soft_float+set}" = set; then
withval="$with_soft_float"
if test -z "$GNU_CC"; then
{ echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&2; exit 1; }
fi
MOZ_SOFT_FLOAT=$withval
fi
case "$MOZ_ARCH" in
toolchain-default|"")
arch_flag=""
;;
*)
arch_flag="-march=$MOZ_ARCH"
;;
esac
case "$MOZ_THUMB" in
yes)
MOZ_THUMB2=1
thumb_flag="-mthumb"
;;
no)
MOZ_THUMB2=
thumb_flag="-marm"
;;
*)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$arch_flag"
cat > conftest.$ac_ext <<EOF
#line 5800 "configure"
#include "confdefs.h"
int main() {
return sizeof(__thumb2__);
; return 0; }
EOF
if { (eval echo configure:5807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
MOZ_THUMB2=1
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
MOZ_THUMB2=
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
thumb_flag=""
;;
esac
if test "$MOZ_THUMB2" = 1; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_THUMB2 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_THUMB2 1
EOF
fi
case "$MOZ_THUMB_INTERWORK" in
yes)
thumb_interwork_flag="-mthumb-interwork"
;;
no)
thumb_interwork_flag="-mno-thumb-interwork"
;;
*) # toolchain-default
thumb_interwork_flag=""
;;
esac
case "$MOZ_FPU" in
toolchain-default|"")
fpu_flag=""
;;
*)
fpu_flag="-mfpu=$MOZ_FPU"
;;
esac
case "$MOZ_FLOAT_ABI" in
toolchain-default|"")
float_abi_flag=""
;;
*)
float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
;;
esac
case "$MOZ_SOFT_FLOAT" in
yes)
soft_float_flag="-msoft-float"
;;
no)
soft_float_flag="-mno-soft-float"
;;
*) # toolchain-default
soft_float_flag=""
;;
esac
all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
if test -n "$all_flags"; then
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$all_flags"
echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
echo "configure:5879: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
cat > conftest.$ac_ext <<EOF
#line 5881 "configure"
#include "confdefs.h"
int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:5888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: no" 1>&2; exit 1; }
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS $all_flags"
CXXFLAGS="$CXXFLAGS $all_flags"
ASFLAGS="$ASFLAGS $all_flags"
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
fi
fi
if test "$CPU_ARCH" = "arm"; then
echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6
echo "configure:5911: checking for ARM SIMD support in compiler" >&5
# We try to link so that this also fails when
# building with LTO.
cat > conftest.$ac_ext <<EOF
#line 5915 "configure"
#include "confdefs.h"
int main() {
asm("uqadd8 r1, r1, r2");
; return 0; }
EOF
if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
result="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
result="no"
fi
rm -f conftest*
echo "$ac_t"""$result"" 1>&6
if test "$result" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_ARM_SIMD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ARM_SIMD 1
EOF
HAVE_ARM_SIMD=1
fi
echo $ac_n "checking ARM version support in compiler""... $ac_c" 1>&6
echo "configure:5945: checking ARM version support in compiler" >&5
ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([0-9]*\).*/\1/p'`
echo "$ac_t"""$ARM_ARCH"" 1>&6
echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6
echo "configure:5950: checking for ARM NEON support in compiler" >&5
# We try to link so that this also fails when
# building with LTO.
cat > conftest.$ac_ext <<EOF
#line 5954 "configure"
#include "confdefs.h"
int main() {
asm(".fpu neon\n vadd.i8 d0, d0, d0");
; return 0; }
EOF
if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
result="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
result="no"
fi
rm -f conftest*
echo "$ac_t"""$result"" 1>&6
if test "$result" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_ARM_NEON ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ARM_NEON 1
EOF
HAVE_ARM_NEON=1
if test -n "$ARM_ARCH"; then
if test "$ARM_ARCH" -lt 7; then
BUILD_ARM_NEON=0
else
BUILD_ARM_NEON=1
fi
fi
fi
fi # CPU_ARCH = arm
if test -n "$MOZ_ARCH"; then
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-arch=$MOZ_ARCH"
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-thumb=$MOZ_THUMB"
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-thumb-interwork=$MOZ_THUMB_INTERWORK"
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-fpu=$MOZ_FPU"
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-float-abi=$MOZ_FLOAT_ABI"
NSPR_CONFIGURE_ARGS="$NSPR_CONFIGURE_ARGS --with-soft-float=$MOZ_SOFT_FLOAT"
fi
if test "$COMPILE_ENVIRONMENT"; then
configure_static_assert_macros='
#define CONFIGURE_STATIC_ASSERT(condition) CONFIGURE_STATIC_ASSERT_IMPL(condition, __LINE__)
#define CONFIGURE_STATIC_ASSERT_IMPL(condition, line) CONFIGURE_STATIC_ASSERT_IMPL2(condition, line)
#define CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) typedef int static_assert_line_##line[(condition) ? 1 : -1]
'
echo $ac_n "checking that static assertion macros used in autoconf tests work""... $ac_c" 1>&6
echo "configure:6016: checking that static assertion macros used in autoconf tests work" >&5
if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_cv_static_assertion_macros_work="yes"
cat > conftest.$ac_ext <<EOF
#line 6030 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(1)
; return 0; }
EOF
if { (eval echo configure:6037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_static_assertion_macros_work="no"
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 6047 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(0)
; return 0; }
EOF
if { (eval echo configure:6054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_static_assertion_macros_work="no"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 6070 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(1)
; return 0; }
EOF
if { (eval echo configure:6077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_static_assertion_macros_work="no"
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 6087 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(0)
; return 0; }
EOF
if { (eval echo configure:6094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_static_assertion_macros_work="no"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t"""$ac_cv_static_assertion_macros_work"" 1>&6
if test "$ac_cv_static_assertion_macros_work" = "no"; then
{ echo "configure: error: Compiler cannot compile macros used in autoconf tests." 1>&2; exit 1; }
fi
fi # COMPILE_ENVIRONMENT
if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then
case "${CPU_ARCH}-${MOZ_ARCH}" in
arm-armv7*)
ANDROID_CPU_ARCH=armeabi-v7a
;;
arm-*)
ANDROID_CPU_ARCH=armeabi
;;
x86-*)
ANDROID_CPU_ARCH=x86
;;
mips-*) # When target_cpu is mipsel, CPU_ARCH is mips
ANDROID_CPU_ARCH=mips
;;
esac
if test -z "$STLPORT_CPPFLAGS$STLPORT_LDFLAGS$STLPORT_LIBS"; then
if test -n "$MOZ_ANDROID_LIBSTDCXX" ; then
if test -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/libgnustl_static.a"; then
# android-ndk-r8b
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/"
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/include"
STLPORT_LIBS="-lgnustl_static"
elif test -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libgnustl_static.a"; then
# android-ndk-r7, android-ndk-r7b, android-ndk-r8
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/"
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include"
STLPORT_LIBS="-lgnustl_static"
elif test -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libstdc++.a"; then
# android-ndk-r5c, android-ndk-r6, android-ndk-r6b
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include"
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/"
STLPORT_LIBS="-lstdc++"
else
{ echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&2; exit 1; }
fi
elif test -e "$android_ndk/sources/cxx-stl/stlport/src/iostream.cpp" ; then
if test -e "$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a"; then
STLPORT_LDFLAGS="-L$_objdir/build/stlport -L$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/"
elif test -e "$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a"; then
STLPORT_LDFLAGS="-L$_objdir/build/stlport -L$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/"
else
{ echo "configure: error: Couldn't find path to stlport in the android ndk" 1>&2; exit 1; }
fi
STLPORT_SOURCES="$android_ndk/sources/cxx-stl/stlport"
STLPORT_CPPFLAGS="-I$_objdir/build/stlport -I$android_ndk/sources/cxx-stl/stlport/stlport"
STLPORT_LIBS="-lstlport_static -static-libstdc++"
elif test "$target" != "arm-android-eabi"; then
{ echo "configure: error: Couldn't find path to stlport in the android ndk" 1>&2; exit 1; }
fi
fi
CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS"
LDFLAGS="$LDFLAGS $STLPORT_LDFLAGS"
LIBS="$LIBS $STLPORT_LIBS"
fi
if test -n "$CLANG_CC"; then
_WARNINGS_CFLAGS="-Qunused-arguments ${_WARNINGS_CFLAGS}"
CPPFLAGS="-Qunused-arguments ${CPPFLAGS}"
fi
if test -n "$CLANG_CXX"; then
_WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}"
fi
# Check whether --enable-address-sanitizer or --disable-address-sanitizer was given.
if test "${enable_address_sanitizer+set}" = set; then
enableval="$enable_address_sanitizer"
if test "$enableval" = "yes"; then
MOZ_ASAN=1
elif test "$enableval" = "no"; then
MOZ_ASAN=
else
{ echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_ASAN"; then
MOZ_LLVM_HACKS=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_ASAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ASAN 1
EOF
fi
# Check whether --enable-llvm-hacks or --disable-llvm-hacks was given.
if test "${enable_llvm_hacks+set}" = set; then
enableval="$enable_llvm_hacks"
if test "$enableval" = "yes"; then
MOZ_LLVM_HACKS=1
elif test "$enableval" = "no"; then
MOZ_LLVM_HACKS=
else
{ echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_LLVM_HACKS"; then
MOZ_NO_WLZDEFS=1
fi
if test "$GNU_CC"; then
# Per bug 719659 comment 2, some of the headers on ancient build machines
# may require gnu89 inline semantics. But otherwise, we use C99.
CFLAGS="$CFLAGS -std=gnu99 -fgnu89-inline"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(notdir $@) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(notdir $@) -o $@'
DSO_LDOPTS='-shared'
if test "$GCC_USE_GNU_LD"; then
# Some tools like ASan use a runtime library that is only
# linked against executables, so we must allow undefined
# symbols for shared objects in some cases.
if test -z "$MOZ_NO_WLZDEFS"; then
# Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
fi
fi
WARNINGS_AS_ERRORS='-Werror'
# Don't treat -Wuninitialized as error b/c it has lots of false positives.
WARNINGS_AS_ERRORS="$WARNINGS_AS_ERRORS -Wno-error=uninitialized"
# Don't treat -Wdeprecated-declarations as error b/c we don't want our
# builds held hostage when a platform-specific API is suddenly deprecated.
WARNINGS_AS_ERRORS="$WARNINGS_AS_ERRORS -Wno-error=deprecated-declarations"
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-fPIC'
ASFLAGS="$ASFLAGS -fPIC"
echo $ac_n "checking for --build-id option to ld""... $ac_c" 1>&6
echo "configure:6257: checking for --build-id option to ld" >&5
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"
cat > conftest.$ac_ext <<EOF
#line 6261 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
LDFLAGS=$_SAVE_LDFLAGS
fi
rm -f conftest*
# Turn on GNU-specific warnings:
# -Wall - turn on a lot of warnings
# -Wpointer-arith - good to have
# -Wdeclaration-after-statement - MSVC doesn't like these
# -Werror=return-type - catches missing returns, zero false positives
# -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wsign-compare - catches comparison of signed and unsigned types
#
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -Wpointer-arith -Wdeclaration-after-statement"
echo $ac_n "checking whether the C compiler supports -Werror=return-type""... $ac_c" 1>&6
echo "configure:6292: checking whether the C compiler supports -Werror=return-type" >&5
if eval "test \"`echo '$''{'ac_c_has_werror_return_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Werror=return-type"
cat > conftest.$ac_ext <<EOF
#line 6308 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_c_has_werror_return_type="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_c_has_werror_return_type="no"
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_c_has_werror_return_type" 1>&6
if test "${ac_c_has_werror_return_type}" = "yes"; then
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Werror=return-type"
fi
echo $ac_n "checking whether the C compiler supports -Wtype-limits""... $ac_c" 1>&6
echo "configure:6343: checking whether the C compiler supports -Wtype-limits" >&5
if eval "test \"`echo '$''{'ac_c_has_wtype_limits'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Wtype-limits"
cat > conftest.$ac_ext <<EOF
#line 6359 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_c_has_wtype_limits="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_c_has_wtype_limits="no"
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_c_has_wtype_limits" 1>&6
if test "${ac_c_has_wtype_limits}" = "yes"; then
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wtype-limits"
fi
echo $ac_n "checking whether the C compiler supports -Wempty-body""... $ac_c" 1>&6
echo "configure:6394: checking whether the C compiler supports -Wempty-body" >&5
if eval "test \"`echo '$''{'ac_c_has_wempty_body'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Wempty-body"
cat > conftest.$ac_ext <<EOF
#line 6410 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_c_has_wempty_body="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_c_has_wempty_body="no"
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_c_has_wempty_body" 1>&6
if test "${ac_c_has_wempty_body}" = "yes"; then
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wempty-body"
fi
echo $ac_n "checking whether the C compiler supports -Wsign-compare""... $ac_c" 1>&6
echo "configure:6445: checking whether the C compiler supports -Wsign-compare" >&5
if eval "test \"`echo '$''{'ac_c_has_sign_compare'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Wsign-compare"
cat > conftest.$ac_ext <<EOF
#line 6461 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_c_has_sign_compare="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_c_has_sign_compare="no"
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_c_has_sign_compare" 1>&6
if test "${ac_c_has_sign_compare}" = "yes"; then
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wsign-compare"
fi
# Turn off the following warnings that -Wall turns on:
# -Wno-unused - lots of violations in third-party code
#
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-unused"
if test -z "$INTEL_CC" -a -z "$CLANG_CC"; then
# Don't use -Wcast-align with ICC or clang
case "$CPU_ARCH" in
# And don't use it on hppa, ia64, sparc, arm, since it's noisy there
hppa | ia64 | sparc | arm)
;;
*)
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wcast-align"
;;
esac
fi
_DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
_USE_CPP_INCLUDE_FLAG=1
elif test "$SOLARIS_SUNPRO_CC"; then
DSO_CFLAGS=''
if test "$CPU_ARCH" = "sparc"; then
# for Sun Studio on Solaris/SPARC
DSO_PIC_CFLAGS='-xcode=pic32'
else
DSO_PIC_CFLAGS='-KPIC'
fi
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
else
MKSHLIB='$(LD) $(DSO_LDOPTS) -h $(notdir $@) -o $@'
MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $(notdir $@) -o $@'
DSO_LDOPTS='-shared'
if test "$GNU_LD"; then
# Don't allow undefined symbols in libraries
DSO_LDOPTS="$DSO_LDOPTS -z defs"
fi
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-KPIC'
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
fi
if test "$GNU_CXX"; then
# Turn on GNU-specific warnings:
# -Wall - turn on a lot of warnings
# -Wpointer-arith - good to have
# -Woverloaded-virtual - ???
# -Werror=return-type - catches missing returns, zero false positives
# -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Werror=conversion-null - catches conversions between NULL and non-pointer types
# -Wsign-compare - catches comparison of signed and unsigned types
#
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wpointer-arith -Woverloaded-virtual"
echo $ac_n "checking whether the C++ compiler supports -Werror=return-type""... $ac_c" 1>&6
echo "configure:6553: checking whether the C++ compiler supports -Werror=return-type" >&5
if eval "test \"`echo '$''{'ac_cxx_has_werror_return_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Werror=return-type"
cat > conftest.$ac_ext <<EOF
#line 6569 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_werror_return_type="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_werror_return_type="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_werror_return_type" 1>&6
if test "${ac_cxx_has_werror_return_type}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Werror=return-type"
fi
echo $ac_n "checking whether the C++ compiler supports -Wtype-limits""... $ac_c" 1>&6
echo "configure:6604: checking whether the C++ compiler supports -Wtype-limits" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wtype_limits'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Wtype-limits"
cat > conftest.$ac_ext <<EOF
#line 6620 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_wtype_limits="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_wtype_limits="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_wtype_limits" 1>&6
if test "${ac_cxx_has_wtype_limits}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wtype-limits"
fi
echo $ac_n "checking whether the C++ compiler supports -Wempty-body""... $ac_c" 1>&6
echo "configure:6655: checking whether the C++ compiler supports -Wempty-body" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wempty_body'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Wempty-body"
cat > conftest.$ac_ext <<EOF
#line 6671 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_wempty_body="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_wempty_body="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_wempty_body" 1>&6
if test "${ac_cxx_has_wempty_body}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wempty-body"
fi
echo $ac_n "checking whether the C++ compiler supports -Werror=conversion-null""... $ac_c" 1>&6
echo "configure:6706: checking whether the C++ compiler supports -Werror=conversion-null" >&5
if eval "test \"`echo '$''{'ac_cxx_has_werror_conversion_null'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Werror=conversion-null"
cat > conftest.$ac_ext <<EOF
#line 6722 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_werror_conversion_null="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_werror_conversion_null="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_werror_conversion_null" 1>&6
if test "${ac_cxx_has_werror_conversion_null}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Werror=conversion-null"
fi
echo $ac_n "checking whether the C++ compiler supports -Wsign-compare""... $ac_c" 1>&6
echo "configure:6757: checking whether the C++ compiler supports -Wsign-compare" >&5
if eval "test \"`echo '$''{'ac_cxx_has_sign_compare'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Wsign-compare"
cat > conftest.$ac_ext <<EOF
#line 6773 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_sign_compare="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_sign_compare="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_sign_compare" 1>&6
if test "${ac_cxx_has_sign_compare}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wsign-compare"
fi
# Turn off the following warnings that -Wall turns on:
# -Wno-invalid-offsetof - we use offsetof on non-POD types frequently
#
echo $ac_n "checking whether the C++ compiler supports -Wno-invalid-offsetof""... $ac_c" 1>&6
echo "configure:6812: checking whether the C++ compiler supports -Wno-invalid-offsetof" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wno_invalid_offsetof'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Winvalid-offsetof"
cat > conftest.$ac_ext <<EOF
#line 6828 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_wno_invalid_offsetof="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_wno_invalid_offsetof="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_wno_invalid_offsetof" 1>&6
if test "${ac_cxx_has_wno_invalid_offsetof}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-invalid-offsetof"
fi
if test -z "$INTEL_CXX" -a -z "$CLANG_CXX"; then
# Don't use -Wcast-align with ICC or clang
case "$CPU_ARCH" in
# And don't use it on hppa, ia64, sparc, arm, since it's noisy there
hppa | ia64 | sparc | arm)
;;
*)
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wcast-align"
;;
esac
fi
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/js-confdefs.h'
_USE_CPP_INCLUDE_FLAG=1
# Recent clang and gcc support C++11 deleted functions without warnings if
# compiling with -std=c++0x or -std=gnu++0x (or c++11 or gnu++11 in very new
# versions). We can't use -std=c++0x yet, so gcc's support must remain
# unused. But clang's warning can be disabled, so when compiling with clang
# we use it to opt out of the warning, enabling (macro-encapsulated) use of
# deleted function syntax.
if test "$CLANG_CXX"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-c++0x-extensions"
echo $ac_n "checking whether the C++ compiler supports -Wno-extended-offsetof""... $ac_c" 1>&6
echo "configure:6887: checking whether the C++ compiler supports -Wno-extended-offsetof" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wno_extended_offsetof'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Wextended-offsetof"
cat > conftest.$ac_ext <<EOF
#line 6903 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_wno_extended_offsetof="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_wno_extended_offsetof="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_wno_extended_offsetof" 1>&6
if test "${ac_cxx_has_wno_extended_offsetof}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-extended-offsetof"
fi
fi
else
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)'
fi
MKSHLIB_FORCE_ALL=
MKSHLIB_UNFORCE_ALL=
if test "$COMPILE_ENVIRONMENT"; then
if test "$GNU_CC"; then
echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6
echo "configure:6948: checking whether ld has archive extraction flags" >&5
if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
_SAVE_LDFLAGS=$LDFLAGS; _SAVE_LIBS=$LIBS
ac_cv_mkshlib_force_and_unforce="no"
exec 3<&0 <<LOOP_INPUT
force="-Wl,--whole-archive"; unforce="-Wl,--no-whole-archive"
force="-Wl,-z -Wl,allextract"; unforce="-Wl,-z -Wl,defaultextract"
force="-Wl,-all"; unforce="-Wl,-none"
LOOP_INPUT
while read line
do
eval $line
LDFLAGS=$force
LIBS=$unforce
cat > conftest.$ac_ext <<EOF
#line 6965 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_mkshlib_force_and_unforce=$line; break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
exec 0<&3 3<&-
LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS
fi
if test "$ac_cv_mkshlib_force_and_unforce" = "no"; then
echo "$ac_t""no" 1>&6
else
echo "$ac_t""yes" 1>&6
eval $ac_cv_mkshlib_force_and_unforce
MKSHLIB_FORCE_ALL=$force
MKSHLIB_UNFORCE_ALL=$unforce
fi
fi # GNU_CC
fi # COMPILE_ENVIRONMENT
if test "$COMPILE_ENVIRONMENT"; then
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6
echo "configure:7007: checking for 64-bit OS" >&5
cat > conftest.$ac_ext <<EOF
#line 7009 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)
; return 0; }
EOF
if { (eval echo configure:7016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
result="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
result="no"
fi
rm -f conftest*
echo "$ac_t"""$result"" 1>&6
if test "$result" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_64BIT_OS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_64BIT_OS 1
EOF
HAVE_64BIT_OS=1
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi # COMPILE_ENVIRONMENT
MOZ_OS2_HIGH_MEMORY=1
# Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
if test "${enable_os2_high_mem+set}" = set; then
enableval="$enable_os2_high_mem"
if test "$enableval" = "no"; then
MOZ_OS2_HIGH_MEMORY=
elif test "$enableval" = "yes"; then
MOZ_OS2_HIGH_MEMORY=1
else
{ echo "configure: error: Option, os2-high-mem, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
# Check whether --enable-profiling or --disable-profiling was given.
if test "${enable_profiling+set}" = set; then
enableval="$enable_profiling"
if test "$enableval" = "yes"; then
MOZ_PROFILING=1
elif test "$enableval" = "no"; then
MOZ_PROFILING=
else
{ echo "configure: error: Option, profiling, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
case "$host" in
*mingw*)
if test -n "$_WIN32_MSVC"; then
HOST_AR=lib
HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
HOST_CFLAGS="$HOST_CFLAGS -TC -nologo -Fd\$(HOST_PDBFILE)"
HOST_RANLIB='echo ranlib'
else
HOST_CFLAGS="$HOST_CFLAGS -mwindows"
fi
HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -D_CRT_SECURE_NO_WARNINGS"
HOST_NSPR_MDCPUCFG='\"md/_winnt.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
HOST_BIN_SUFFIX=.exe
case "$host" in
*mingw*)
PERL="/bin/sh ${_topsrcdir}/build/msys-perl-wrapper"
;;
esac
case "${host_cpu}" in
i*86)
if test -n "$_WIN32_MSVC"; then
HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86"
fi
;;
x86_64)
if test -n "$_WIN32_MSVC"; then
HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64"
fi
HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_"
;;
esac
;;
*-darwin*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
;;
*-linux*|*-kfreebsd*-gnu|*-gnu*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
;;
*os2*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_OS2 -DNO_X11 -Zomf"
HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"'
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
HOST_BIN_SUFFIX=.exe
MOZ_FIX_LINK_PATHS=
;;
*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
;;
esac
echo $ac_n "checking for custom <stdint.h> implementation""... $ac_c" 1>&6
echo "configure:7137: checking for custom <stdint.h> implementation" >&5
if test "$MOZ_CUSTOM_STDINT_H"; then
cat >> confdefs.pytmp <<EOF
(''' MOZ_CUSTOM_STDINT_H ''', r''' "$MOZ_CUSTOM_STDINT_H" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_CUSTOM_STDINT_H "$MOZ_CUSTOM_STDINT_H"
EOF
echo "$ac_t""using $MOZ_CUSTOM_STDINT_H" 1>&6
else
echo "$ac_t""none specified" 1>&6
fi
cat > conftest.c <<EOF
int foo = 1;
EOF
lto_is_enabled=no
if ${CC-cc} ${CFLAGS} -S conftest.c -o conftest.s >/dev/null 2>&1; then
if grep '^target triple =' conftest.s; then
lto_is_enabled=yes
fi
fi
rm -f conftest.cs
case "$target" in
*-aix*)
cat >> confdefs.pytmp <<\EOF
(''' AIX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define AIX 1
EOF
if test ! "$GNU_CC"; then
if test ! "$HAVE_64BIT_OS"; then
# Compiling with Visual Age C++ object model compat is the
# default. To compile with object model ibm, add
# AIX_OBJMODEL=ibm to .mozconfig.
if test "$AIX_OBJMODEL" = "ibm"; then
CXXFLAGS="$CXXFLAGS -qobjmodel=ibm"
else
AIX_OBJMODEL=compat
fi
else
AIX_OBJMODEL=compat
fi
DSO_LDOPTS='-qmkshrobj=1'
DSO_CFLAGS='-qflag=w:w'
DSO_PIC_CFLAGS=
LDFLAGS="$LDFLAGS -Wl,-brtl -blibpath:/usr/lib:/lib"
MOZ_FIX_LINK_PATHS=
MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
if test "$COMPILE_ENVIRONMENT"; then
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for IBM XLC/C++ compiler version >= 9.0.0.7""... $ac_c" 1>&6
echo "configure:7205: checking for IBM XLC/C++ compiler version >= 9.0.0.7" >&5
cat > conftest.$ac_ext <<EOF
#line 7207 "configure"
#include "confdefs.h"
int main() {
#if (__IBMCPP__ < 900)
#error "Bad compiler"
#endif
; return 0; }
EOF
if { (eval echo configure:7216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_BAD_COMPILER=
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
_BAD_COMPILER=1
fi
rm -f conftest*
if test -n "$_BAD_COMPILER"; then
echo "$ac_t""no" 1>&6
{ echo "configure: error: IBM XLC/C++ 9.0.0.7 or higher is required to build." 1>&2; exit 1; }
else
echo "$ac_t""yes" 1>&6
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
TARGET_COMPILER_ABI="ibmc"
CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
fi
fi
case "${target_os}" in
aix4.1*)
DLL_SUFFIX='_shr.a'
;;
esac
if test "$COMPILE_ENVIRONMENT"; then
for ac_hdr in sys/inttypes.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7254: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 7259 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:7267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
fi
cat >> confdefs.pytmp <<\EOF
(''' NSCAP_DISABLE_DEBUG_PTR_TYPES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF
;;
*-darwin*)
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector"
CFLAGS="$CFLAGS -fno-common"
CXXFLAGS="$CXXFLAGS -fno-common"
DLL_SUFFIX=".dylib"
DSO_LDOPTS=''
STRIP="$STRIP -x -S"
_PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
LDFLAGS="$LDFLAGS -lobjc"
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
# The ExceptionHandling framework is needed for Objective-C exception
# logging code in nsObjCExceptions.h. Currently we only use that in debug
# builds.
_SAVE_LDFLAGS=$LDFLAGS
echo $ac_n "checking for -framework ExceptionHandling""... $ac_c" 1>&6
echo "configure:7324: checking for -framework ExceptionHandling" >&5
LDFLAGS="$LDFLAGS -framework ExceptionHandling"
cat > conftest.$ac_ext <<EOF
#line 7327 "configure"
#include "confdefs.h"
int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_have_framework_exceptionhandling="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_have_framework_exceptionhandling="no"
fi
rm -f conftest*
echo "$ac_t""$ac_cv_have_framework_exceptionhandling" 1>&6
if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
fi
LDFLAGS=$_SAVE_LDFLAGS
if test "x$lto_is_enabled" = "xyes"; then
echo "Skipping -dead_strip because lto is enabled."
elif test "x$enable_dtrace" = "xyes"; then
echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
else
echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6
echo "configure:7356: checking for -dead_strip option to ld" >&5
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-dead_strip"
cat > conftest.$ac_ext <<EOF
#line 7360 "configure"
#include "confdefs.h"
int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:7367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
_HAVE_DEAD_STRIP=1
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
_HAVE_DEAD_STRIP=
fi
rm -f conftest*
if test -n "$_HAVE_DEAD_STRIP" ; then
echo "$ac_t""yes" 1>&6
MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip"
else
echo "$ac_t""no" 1>&6
fi
LDFLAGS=$_SAVE_LDFLAGS
fi
MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
;;
ia64*-hpux*)
DLL_SUFFIX=".so"
if test ! "$GNU_CC"; then
DSO_LDOPTS='-b'
DSO_CFLAGS=""
DSO_PIC_CFLAGS=
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
else
DSO_LDOPTS='-b -E'
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
fi
MOZ_FIX_LINK_PATHS=
cat >> confdefs.pytmp <<\EOF
(''' NSCAP_DISABLE_DEBUG_PTR_TYPES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' _LARGEFILE64_SOURCE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _LARGEFILE64_SOURCE 1
EOF
;;
*-hpux*)
DLL_SUFFIX=".sl"
if test ! "$GNU_CC"; then
DSO_LDOPTS='-b -Wl,+s'
DSO_CFLAGS=""
DSO_PIC_CFLAGS="+Z"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -o $@'
MKCSHLIB='$(LD) -b +s -L$(LIBXUL_DIST)/bin -o $@'
CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
else
DSO_LDOPTS='-b -E +s'
MKSHLIB='$(LD) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -L$(LIBXUL_DIST)/lib -o $@'
MKCSHLIB='$(LD) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -L$(LIBXUL_DIST)/lib -o $@'
fi
MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
cat >> confdefs.pytmp <<\EOF
(''' NSCAP_DISABLE_DEBUG_PTR_TYPES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF
;;
*-android*|*-linuxandroid*)
cat >> confdefs.pytmp <<\EOF
(''' NO_PW_GECOS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NO_PW_GECOS 1
EOF
no_x=yes
_PLATFORM_DEFAULT_TOOLKIT=cairo-android
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
MOZ_GFX_OPTIMIZE_MOBILE=1
MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions"
# The Maemo builders don't know about this flag
MOZ_ARM_VFP_FLAGS="-mfpu=vfp"
;;
*-*linux*)
# Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler.
# Similarly for GNU_CXX and INTEL_CXX.
if test "$INTEL_CC" -o "$INTEL_CXX"; then
# -Os has been broken on Intel's C/C++ compilers for quite a
# while; Intel recommends against using it.
MOZ_OPTIMIZE_FLAGS="-O2"
MOZ_DEBUG_FLAGS="-g"
elif test "$GNU_CC" -o "$GNU_CXX"; then
case $GCC_VERSION in
4.5.*)
# -Os is broken on gcc 4.5.x we need to tweak it to get good results.
MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50"
esac
MOZ_PGO_OPTIMIZE_FLAGS="-O3"
MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK"
MOZ_DEBUG_FLAGS="-g"
fi
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
case "${target_cpu}" in
alpha*)
CFLAGS="$CFLAGS -mieee"
CXXFLAGS="$CXXFLAGS -mieee"
;;
mips*)
MOZ_DEBUG_FLAGS="-g" # We want inlining
;;
esac
if test -z "$MC"; then
MC=mc.exe
fi
;;
*-mingw*)
DSO_CFLAGS=
DSO_PIC_CFLAGS=
DLL_SUFFIX=.dll
RC=rc.exe
MC=mc.exe
if test -n "$GNU_CC" -o -n "$CLANG_CC"; then
CC="$CC -mwindows"
CXX="$CXX -mwindows"
CPP="$CPP -mwindows"
CFLAGS="$CFLAGS -mms-bitfields"
CXXFLAGS="$CXXFLAGS -mms-bitfields"
DSO_LDOPTS='-shared'
MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
RC='$(WINDRES)'
# Use static libgcc and libstdc++
LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
# Use temp file for windres (bug 213281)
RCFLAGS='-O coff --use-temp-file'
# mingw doesn't require kernel32, user32, and advapi32 explicitly
LIBS="$LIBS -lgdi32 -lwinmm -lwsock32 -lpsapi"
MOZ_FIX_LINK_PATHS=
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core -lmozalloc'
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom -lmozalloc'
DLL_PREFIX=
IMPORT_LIB_SUFFIX=dll.a
# We use mix of both POSIX and Win32 printf format across the tree, so format
# warnings are useless on mingw.
echo $ac_n "checking whether the C compiler supports -Wno-format""... $ac_c" 1>&6
echo "configure:7530: checking whether the C compiler supports -Wno-format" >&5
if eval "test \"`echo '$''{'ac_c_has_wno_format'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -Wformat"
cat > conftest.$ac_ext <<EOF
#line 7546 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_c_has_wno_format="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_c_has_wno_format="no"
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_c_has_wno_format" 1>&6
if test "${ac_c_has_wno_format}" = "yes"; then
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-format"
fi
echo $ac_n "checking whether the C++ compiler supports -Wno-format""... $ac_c" 1>&6
echo "configure:7581: checking whether the C++ compiler supports -Wno-format" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wno_format'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror -Wformat"
cat > conftest.$ac_ext <<EOF
#line 7597 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cxx_has_wno_format="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cxx_has_wno_format="no"
fi
rm -f conftest*
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$ac_cxx_has_wno_format" 1>&6
if test "${ac_cxx_has_wno_format}" = "yes"; then
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-format"
fi
else
TARGET_COMPILER_ABI=msvc
HOST_CC='$(CC)'
HOST_CXX='$(CXX)'
HOST_LD='$(LD)'
if test "$AS_BIN"; then
AS="$(basename "$AS_BIN")"
fi
AR='lib'
AR_FLAGS='-NOLOGO -OUT:"$@"'
AR_EXTRACT=
RANLIB='echo not_ranlib'
STRIP='echo not_strip'
PKG_SKIP_STRIP=1
XARGS=xargs
DOXYGEN=:
ASM_SUFFIX=asm
OBJ_SUFFIX=obj
LIB_SUFFIX=lib
DLL_PREFIX=
LIB_PREFIX=
IMPORT_LIB_SUFFIX=lib
MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
MKSHLIB_FORCE_ALL=
MKSHLIB_UNFORCE_ALL=
DSO_LDOPTS=-SUBSYSTEM:WINDOWS
_USE_CPP_INCLUDE_FLAG=1
_DEFINES_CFLAGS='-FI $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
_DEFINES_CXXFLAGS='-FI $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
CFLAGS="$CFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
CXXFLAGS="$CXXFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
# khuey says we can safely ignore MSVC warning C4251
# MSVC warning C4244 (implicit type conversion may lose data) warns
# and requires workarounds for perfectly valid code. Also, GCC/clang
# don't warn about it by default. So for consistency/sanity, we turn
# it off on MSVC, too.
CFLAGS="$CFLAGS -wd4244"
CXXFLAGS="$CXXFLAGS -wd4244 -wd4251"
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"
CXXFLAGS="$CXXFLAGS -we4553"
LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib"
MOZ_DEBUG_FLAGS='-Zi'
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
WARNINGS_AS_ERRORS='-WX'
MOZ_OPTIMIZE_FLAGS="-O2"
MOZ_FIX_LINK_PATHS=
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT -RELEASE"
PROFILE_GEN_CFLAGS="-GL"
PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
LDFLAGS="$LDFLAGS -DYNAMICBASE"
fi
cat >> confdefs.pytmp <<\EOF
(''' HAVE_SNPRINTF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SNPRINTF 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' _WINDOWS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _WINDOWS 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' WIN32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define WIN32 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' XP_WIN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define XP_WIN 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' XP_WIN32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define XP_WIN32 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' HW_THREADS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HW_THREADS 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' STDC_HEADERS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' NEW_H ''', r''' <new> ''')
EOF
cat >> confdefs.h <<\EOF
#define NEW_H <new>
EOF
cat >> confdefs.pytmp <<\EOF
(''' WIN32_LEAN_AND_MEAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define WIN32_LEAN_AND_MEAN 1
EOF
TARGET_MD_ARCH=win32
_PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
BIN_SUFFIX='.exe'
MOZ_USER_DIR="Mozilla"
TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
no_x=yes
cat >> confdefs.pytmp <<\EOF
(''' NO_X11 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NO_X11 1
EOF
case "$host" in
*-mingw*)
MOZ_BUILD_ROOT=`cd $MOZ_BUILD_ROOT && pwd -W`
;;
esac
case "$host" in
*-mingw*)
if test -z "$MOZ_TOOLS"; then
{ echo "configure: error: MOZ_TOOLS is not set" 1>&2; exit 1; }
fi
MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd -W`
if test "$?" != "0" -o -z "$MOZ_TOOLS_DIR"; then
{ echo "configure: error: cd \$MOZ_TOOLS failed. MOZ_TOOLS ==? $MOZ_TOOLS" 1>&2; exit 1; }
fi
MOZ_TOOLS_BIN_DIR="$(cd "$MOZ_TOOLS_DIR/bin" && pwd)"
if test `echo ${PATH}: | grep -ic "$MOZ_TOOLS_BINDIR:"` = 0; then
{ echo "configure: error: \$MOZ_TOOLS\\bin must be in your path." 1>&2; exit 1; }
fi
;;
esac
case "$host_os" in
cygwin*|msvc*|mks*)
{ echo "configure: 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." 1>&2; exit 1; }
;;
esac
case "$target" in
i*86-*)
if test "$HAVE_64BIT_OS"; then
{ echo "configure: error: You are targeting i386 but using the 64-bit compiler." 1>&2; exit 1; }
fi
if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
else
DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
LDFLAGS="$LDFLAGS -SAFESEH"
fi
cat >> confdefs.pytmp <<\EOF
(''' _X86_ ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _X86_ 1
EOF
;;
x86_64-*)
if test -n "$_WIN32_MSVC"; then
DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64"
fi
cat >> confdefs.pytmp <<\EOF
(''' _AMD64_ ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _AMD64_ 1
EOF
;;
*)
cat >> confdefs.pytmp <<\EOF
(''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CPU_ARCH_NOT_DEFINED 1
EOF
;;
esac
;;
*-netbsd*)
DSO_CFLAGS=''
CFLAGS="$CFLAGS -Dunix"
CXXFLAGS="$CXXFLAGS -Dunix"
if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
DLL_SUFFIX=".so"
DSO_PIC_CFLAGS='-fPIC -DPIC'
DSO_LDOPTS='-shared'
BIN_FLAGS='-Wl,--export-dynamic'
else
DSO_PIC_CFLAGS='-fPIC -DPIC'
DLL_SUFFIX=".so.1.0"
DSO_LDOPTS='-shared'
fi
# This will fail on a.out systems prior to 1.5.1_ALPHA.
MKSHLIB_FORCE_ALL='-Wl,--whole-archive'
MKSHLIB_UNFORCE_ALL='-Wl,--no-whole-archive'
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
fi
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(notdir $@) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(notdir $@) -o $@'
;;
*-openbsd*)
DLL_SUFFIX=".so.1.0"
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-fPIC'
DSO_LDOPTS='-shared -fPIC'
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
fi
;;
*-os2*)
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
cat >> confdefs.pytmp <<\EOF
(''' OS2 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define OS2 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' XP_OS2 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define XP_OS2 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' OS2EMX_PLAIN_CHAR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define OS2EMX_PLAIN_CHAR 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' TCPV40HDRS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define TCPV40HDRS 1
EOF
DLL_PREFIX=
LIB_PREFIX=
LIB_SUFFIX=lib
BIN_SUFFIX=".exe"
DLL_SUFFIX=".dll"
IMPORT_LIB_SUFFIX=lib
DSO_PIC_CFLAGS=
AR=emxomfar
AR_FLAGS='r $@'
CFLAGS="$CFLAGS -Zomf"
CXXFLAGS="$CXXFLAGS -Zomf"
DSO_LDOPTS='-Zdll'
BIN_FLAGS='-Zlinker /ST:0x100000'
IMPLIB='emximp -o'
FILTER='true'
LDFLAGS='-Zmap'
WARNINGS_AS_ERRORS='-Werror'
MOZ_DEBUG_FLAGS="-g -fno-inline"
MOZ_OPTIMIZE_FLAGS="-O2"
MOZ_OPTIMIZE_LDFLAGS="-s -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
TARGET_MD_ARCH=os2
_PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
RC=rc.exe
MC=mc.exe
RCFLAGS='-n'
MOZ_USER_DIR="Mozilla"
if test "$MOZTOOLS"; then
MOZ_TOOLS_DIR=`echo $MOZTOOLS | sed -e 's|\\\\|/|g'`
else
{ echo "configure: error: MOZTOOLS is not set" 1>&2; exit 1; }
fi
if test -n "$MOZ_OS2_HIGH_MEMORY"; then
DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
LDFLAGS="$LDFLAGS -Zhigh-mem"
MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -Zhigh-mem"
cat >> confdefs.pytmp <<\EOF
(''' MOZ_OS2_HIGH_MEMORY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_OS2_HIGH_MEMORY 1
EOF
fi
# GCC for OS/2 currently predefines these, but we don't want them
_DEFINES_CFLAGS="$_DEFINES_CFLAGS -Uunix -U__unix -U__unix__"
_DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__"
echo $ac_n "checking for __declspec(dllexport)""... $ac_c" 1>&6
echo "configure:7960: checking for __declspec(dllexport)" >&5
if eval "test \"`echo '$''{'ac_os2_declspec'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 7965 "configure"
#include "confdefs.h"
__declspec(dllexport) void ac_os2_declspec(void) {}
int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:7972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_os2_declspec="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_os2_declspec="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_os2_declspec" 1>&6
if test "$ac_os2_declspec" != "yes"; then
{ echo "configure: error: Compiler does not support __declspec(dllexport), install GCC-4.3.2 or newer" 1>&2; exit 1; }
fi
;;
*-solaris*)
cat >> confdefs.pytmp <<\EOF
(''' SOLARIS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define SOLARIS 1
EOF
TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
if test -z "$CROSS_COMPILE" && pkginfo -q SUNWpr && pkginfo -q SUNWprd; then
NO_NSPR_CONFIG_SYSTEM_LDFLAGS="-L/usr/lib/mps -R/usr/lib/mps -lnspr4"
NO_NSPR_CONFIG_SYSTEM_CFLAGS="-I/usr/include/mps"
NO_NSPR_CONFIG_SYSTEM_VERSION="`pkgparam SUNWpr SUNW_PRODVERS | sed -e 's/^[1-9][0-9]*\.[0-9][0-9]*$/&.0/'`"
fi
MOZ_FIX_LINK_PATHS=
# $ORIGIN/.. is for shared libraries under components/ to locate shared
# libraries one level up (e.g. libnspr4.so)
if test "$SOLARIS_SUNPRO_CC"; then
LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..' -z lazyload -z combreloc -z muldefs"
LIBS="-lCrun -lCstd -lc $LIBS"
cat >> confdefs.pytmp <<\EOF
(''' NSCAP_DISABLE_DEBUG_PTR_TYPES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef"
LDFLAGS="-xildoff $LDFLAGS"
if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
cat > conftest.$ac_ext <<EOF
#line 8024 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
LDFLAGS=$_SAVE_LDFLAGS
fi
rm -f conftest*
fi
MOZ_OPTIMIZE_FLAGS="-xO4"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $(notdir $@) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $(notdir $@) -o $@'
MKSHLIB_FORCE_ALL='-z allextract'
MKSHLIB_UNFORCE_ALL='-z defaultextract'
DSO_LDOPTS='-G'
AR_LIST="$AR t"
AR_EXTRACT="$AR x"
AR_DELETE="$AR d"
AR='$(CXX) -xar'
AR_FLAGS='-o $@'
AS='/usr/ccs/bin/as'
ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0"
AS_DASH_C_FLAG=''
TARGET_COMPILER_ABI="sunc"
CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
echo $ac_n "checking for Sun C++ compiler version >= 5.9""... $ac_c" 1>&6
echo "configure:8059: checking for Sun C++ compiler version >= 5.9" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 8069 "configure"
#include "confdefs.h"
int main() {
#if (__SUNPRO_CC < 0x590)
#error "Denied"
#endif
; return 0; }
EOF
if { (eval echo configure:8078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_BAD_COMPILER=
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
_BAD_COMPILER=1
fi
rm -f conftest*
if test -n "$_BAD_COMPILER"; then
_res="no"
{ echo "configure: error: Sun C++ 5.9 (Sun Studio 12) or higher is required to build. Your compiler version is $CXX_VERSION ." 1>&2; exit 1; }
else
_res="yes"
fi
cat > conftest.$ac_ext <<EOF
#line 8095 "configure"
#include "confdefs.h"
int main() {
#if (__SUNPRO_CC >= 0x5100)
#error "Sun C++ 5.10 or above"
#endif
; return 0; }
EOF
if { (eval echo configure:8104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_ABOVE_SS12U1=
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
_ABOVE_SS12U1=1
fi
rm -f conftest*
if test "$_ABOVE_SS12U1"; then
# disable xannotate
CXXFLAGS="$CXXFLAGS -xannotate=no"
fi
echo "$ac_t""$_res" 1>&6
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
else
LDFLAGS="$LDFLAGS -Wl,-z,ignore -Wl,-R,'\$\$ORIGIN:\$\$ORIGIN/..' -Wl,-z,lazyload -Wl,-z,combreloc -Wl,-z,muldefs"
LIBS="-lc $LIBS"
MKSHLIB_FORCE_ALL='-Wl,-z -Wl,allextract'
MKSHLIB_UNFORCE_ALL='-Wl,-z -Wl,defaultextract'
ASFLAGS="$ASFLAGS -fPIC"
DSO_LDOPTS='-shared'
WARNINGS_AS_ERRORS='-Werror'
_WARNINGS_CFLAGS=''
_WARNINGS_CXXFLAGS=''
if test "$OS_RELEASE" = "5.3"; then
cat >> confdefs.pytmp <<\EOF
(''' MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES 1
EOF
fi
fi
if test "$OS_RELEASE" = "5.5.1"; then
cat >> confdefs.pytmp <<\EOF
(''' NEED_USLEEP_PROTOTYPE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NEED_USLEEP_PROTOTYPE 1
EOF
fi
;;
*-sunos*)
DSO_LDOPTS='-Bdynamic'
MKSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
MKCSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
cat >> confdefs.pytmp <<\EOF
(''' SUNOS4 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define SUNOS4 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' SPRINTF_RETURNS_STRING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define SPRINTF_RETURNS_STRING 1
EOF
case "$(target_os)" in
sunos4.1*)
DLL_SUFFIX='.so.1.0'
;;
esac
;;
*-os2*)
HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"'
;;
esac
cat >> confdefs.pytmp <<EOF
(''' D_INO ''', r''' $DIRENT_INO ''')
EOF
cat >> confdefs.h <<EOF
#define D_INO $DIRENT_INO
EOF
NO_LD_ARCHIVE_FLAGS=
if test -z "$MKSHLIB_FORCE_ALL" -o -z "$MKSHLIB_UNFORCE_ALL"; then
NO_LD_ARCHIVE_FLAGS=1
fi
case "$target" in
*-os2*)
NO_LD_ARCHIVE_FLAGS=
;;
*-aix4.3*|*-aix5*)
NO_LD_ARCHIVE_FLAGS=
;;
*-mingw*)
if test -z "$GNU_CC"; then
NO_LD_ARCHIVE_FLAGS=
fi
;;
esac
case "$target" in
*-linux*|*-kfreebsd*-gnu|*-gnu*)
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
;;
*-solaris*)
if test -z "$GNU_CC"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-M $(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
else
if test -z "$GCC_USE_GNU_LD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-M -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
else
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
fi
fi
;;
*-darwin*)
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list'
;;
*-mingw*)
if test -n "$GNU_CC"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
fi
;;
esac
if test -z "$COMPILE_ENVIRONMENT"; then
SKIP_COMPILER_CHECKS=1
SKIP_LIBRARY_CHECKS=1
fi
case "$target" in
i?86-*)
ENABLE_METHODJIT=1
ENABLE_ION=1
ENABLE_MONOIC=1
ENABLE_POLYIC=1
ENABLE_METHODJIT_TYPED_ARRAY=1
ENABLE_YARR_JIT=1
cat >> confdefs.pytmp <<\EOF
(''' JS_CPU_X86 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_CPU_X86 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' JS_NUNBOX32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_NUNBOX32 1
EOF
;;
x86_64*-*)
ENABLE_METHODJIT=1
ENABLE_ION=1
ENABLE_MONOIC=1
ENABLE_POLYIC=1
ENABLE_METHODJIT_TYPED_ARRAY=1
ENABLE_YARR_JIT=1
cat >> confdefs.pytmp <<\EOF
(''' JS_CPU_X64 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_CPU_X64 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' JS_PUNBOX64 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_PUNBOX64 1
EOF
;;
arm*-*)
ENABLE_METHODJIT=1
ENABLE_ION=1
ENABLE_MONOIC=1
ENABLE_POLYIC=1
ENABLE_METHODJIT_TYPED_ARRAY=1
ENABLE_YARR_JIT=1
cat >> confdefs.pytmp <<\EOF
(''' JS_CPU_ARM ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_CPU_ARM 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' JS_NUNBOX32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_NUNBOX32 1
EOF
;;
sparc*-*)
if test ! "$HAVE_64BIT_OS" ; then
ENABLE_METHODJIT=1
ENABLE_MONOIC=1
ENABLE_POLYIC=1
ENABLE_METHODJIT_TYPED_ARRAY=1
cat >> confdefs.pytmp <<\EOF
(''' JS_CPU_SPARC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_CPU_SPARC 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' JS_NUNBOX32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_NUNBOX32 1
EOF
fi
;;
mips*-*)
ENABLE_METHODJIT=1
ENABLE_MONOIC=1
ENABLE_POLYIC=1
ENABLE_METHODJIT_TYPED_ARRAY=1
cat >> confdefs.pytmp <<\EOF
(''' JS_CPU_MIPS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_CPU_MIPS 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' JS_NUNBOX32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_NUNBOX32 1
EOF
;;
esac
# Check whether --enable-ion or --disable-ion was given.
if test "${enable_ion+set}" = set; then
enableval="$enable_ion"
if test "$enableval" = "no"; then
ENABLE_ION=
elif test "$enableval" = "yes"; then
:
else
{ echo "configure: error: Option, ion, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
# Check whether --enable-yarr-jit or --disable-yarr-jit was given.
if test "${enable_yarr_jit+set}" = set; then
enableval="$enable_yarr_jit"
if test "$enableval" = "no"; then
ENABLE_YARR_JIT=
elif test "$enableval" = "yes"; then
:
else
{ echo "configure: error: Option, yarr-jit, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$ENABLE_METHODJIT"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_METHODJIT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_METHODJIT 1
EOF
else
ENABLE_ION=
fi
if test "$ENABLE_MONOIC"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_MONOIC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_MONOIC 1
EOF
fi
if test "$ENABLE_POLYIC"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_POLYIC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_POLYIC 1
EOF
fi
if test "$ENABLE_METHODJIT_TYPED_ARRAY"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_METHODJIT_TYPED_ARRAY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_METHODJIT_TYPED_ARRAY 1
EOF
fi
if test "$ENABLE_ION"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_ION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_ION 1
EOF
fi
if test "$ENABLE_YARR_JIT"; then
cat >> confdefs.pytmp <<\EOF
(''' ENABLE_YARR_JIT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ENABLE_YARR_JIT 1
EOF
fi
# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given.
if test "${enable_cpp_rtti+set}" = set; then
enableval="$enable_cpp_rtti"
if test "$enableval" = "yes"; then
_MOZ_USE_RTTI=1
elif test "$enableval" = "no"; then
_MOZ_USE_RTTI=
else
{ echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -z "$_MOZ_USE_RTTI"; then
if test "$GNU_CC"; then
CXXFLAGS="$CXXFLAGS -fno-rtti"
else
case "$target" in
*-mingw*)
CXXFLAGS="$CXXFLAGS -GR-"
esac
fi
fi
if test "$CLANG_CXX"; then
## We disable return-type-c-linkage because jsval is defined as a C++ type but is
## returned by C functions. This is possible because we use knowledge about the ABI
## to typedef it to a C type with the same layout when the headers are included
## from C.
##
## mismatched-tags is disabled (bug 780474) mostly because it's useless.
## Worse, it's not supported by gcc, so it will cause tryserver bustage
## without any easy way for non-Clang users to check for it.
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags"
fi
if test -z "$GNU_CC"; then
case "$target" in
*-mingw*)
## Warning 4099 (equivalent of mismatched-tags) is disabled (bug 780474)
## for the same reasons as above.
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -wd4099"
esac
fi
if test "$GNU_CC"; then
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-exceptions"
fi
# Check whether --enable-icf or --disable-icf was given.
if test "${enable_icf+set}" = set; then
enableval="$enable_icf"
if test "$enableval" = "no"; then
MOZ_DISABLE_ICF=1
elif test "$enableval" = "yes"; then
MOZ_DISABLE_ICF=
else
{ echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF"; then
echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6
echo "configure:8520: checking whether the linker supports Identical Code Folding" >&5
if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'int foo() {return 42;}' \
'int bar() {return 42;}' \
'int main() {return foo() - bar();}' > conftest.${ac_ext}
# If the linker supports ICF, foo and bar symbols will have
# the same address
if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:8529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
test -s conftest${ac_exeext} &&
objdump -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then
LD_SUPPORTS_ICF=yes
else
LD_SUPPORTS_ICF=no
fi
rm -rf conftest*
fi
echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6
if test "$LD_SUPPORTS_ICF" = yes; then
_SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe"
LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections"
cat > conftest.$ac_ext <<EOF
#line 8544 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
LD_PRINT_ICF_SECTIONS=
fi
rm -f conftest*
LDFLAGS="$_SAVE_LDFLAGS"
fi
fi
if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -n "$MOZ_DEBUG_FLAGS"; then
echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6
echo "configure:8569: checking whether removing dead symbols breaks debugging" >&5
if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'int foo() {return 42;}' \
'int bar() {return 1;}' \
'int main() {return foo();}' > conftest.${ac_ext}
if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:8576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
{ ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:8577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then
if test "`$PYTHON "$_topsrcdir"/build/autoconf/check_debug_ranges.py conftest.${ac_objext} conftest.${ac_ext}`" = \
"`$PYTHON "$_topsrcdir"/build/autoconf/check_debug_ranges.py conftest${ac_exeext} conftest.${ac_ext}`"; then
GC_SECTIONS_BREAKS_DEBUG_RANGES=no
else
GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
fi
else
GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way"
fi
rm -rf conftest*
fi
echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6
if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then
DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections"
fi
fi
if test -z "$SKIP_COMPILER_CHECKS"; then
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:8600: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8605 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 8630 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "memchr" >/dev/null 2>&1; then
:
else
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 8648 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "free" >/dev/null 2>&1; then
:
else
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 8669 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_header_stdc=no
fi
rm -fr conftest*
fi
fi
fi
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
cat >> confdefs.pytmp <<\EOF
(''' STDC_HEADERS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:8707: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8712 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in an arm
of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
; return 0; }
EOF
if { (eval echo configure:8761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_const=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
cat >> confdefs.pytmp <<\EOF
(''' const ''', r''' ''')
EOF
cat >> confdefs.h <<\EOF
#define const
EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:8785: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8790 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_mode_t=yes
else
rm -rf conftest*
ac_cv_type_mode_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_mode_t" 1>&6
if test $ac_cv_type_mode_t = no; then
cat >> confdefs.pytmp <<\EOF
(''' mode_t ''', r''' int ''')
EOF
cat >> confdefs.h <<\EOF
#define mode_t int
EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:8821: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8826 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_off_t=yes
else
rm -rf conftest*
ac_cv_type_off_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
cat >> confdefs.pytmp <<\EOF
(''' off_t ''', r''' long ''')
EOF
cat >> confdefs.h <<\EOF
#define off_t long
EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:8857: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8862 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_pid_t=yes
else
rm -rf conftest*
ac_cv_type_pid_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = no; then
cat >> confdefs.pytmp <<\EOF
(''' pid_t ''', r''' int ''')
EOF
cat >> confdefs.h <<\EOF
#define pid_t int
EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:8893: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8898 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_size_t=yes
else
rm -rf conftest*
ac_cv_type_size_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
cat >> confdefs.pytmp <<\EOF
(''' size_t ''', r''' unsigned ''')
EOF
cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF
fi
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for __stdcall""... $ac_c" 1>&6
echo "configure:8936: checking for __stdcall" >&5
if eval "test \"`echo '$''{'ac_cv___stdcall'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8941 "configure"
#include "confdefs.h"
template <typename Method> struct foo;
template <> struct foo<void (*)()> {};
template <> struct foo<void (__stdcall*)()> {};
int main() {
; return 0; }
EOF
if { (eval echo configure:8950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv___stdcall=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv___stdcall=false
fi
rm -f conftest*
fi
if test "$ac_cv___stdcall" = true ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_STDCALL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_STDCALL 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
echo "configure:8982: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 8987 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
int main() {
ssize_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:8995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_ssize_t=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_type_ssize_t=false
fi
rm -f conftest*
fi
if test "$ac_cv_type_ssize_t" = true ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_SSIZE_T ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SSIZE_T 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:9020: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9025 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
if { (eval echo configure:9033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_struct_st_blksize=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
if test $ac_cv_struct_st_blksize = yes; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_ST_BLKSIZE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ST_BLKSIZE 1
EOF
fi
echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6
echo "configure:9057: checking for siginfo_t" >&5
if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9062 "configure"
#include "confdefs.h"
#define _POSIX_C_SOURCE 199506L
#include <signal.h>
int main() {
siginfo_t* info;
; return 0; }
EOF
if { (eval echo configure:9070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_siginfo_t=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_siginfo_t=false
fi
rm -f conftest*
fi
if test "$ac_cv_siginfo_t" = true ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_SIGINFO_T ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SIGINFO_T 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for the size of void*""... $ac_c" 1>&6
echo "configure:9097: checking for the size of void*" >&5
if eval "test \"`echo '$''{'moz_cv_size_of_JS_BYTES_PER_WORD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
moz_cv_size_of_JS_BYTES_PER_WORD=
for size in 4 8; do
cat > conftest.$ac_ext <<EOF
#line 9105 "configure"
#include "confdefs.h"
int main() {
int a[sizeof (void*) == $size ? 1 : -1];
return 0;
; return 0; }
EOF
if { (eval echo configure:9115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
moz_cv_size_of_JS_BYTES_PER_WORD=$size; break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
if test ! "$moz_cv_size_of_JS_BYTES_PER_WORD"; then
{ echo "configure: error: No size found for void*" 1>&2; exit 1; }
fi
fi
echo "$ac_t""$moz_cv_size_of_JS_BYTES_PER_WORD" 1>&6
cat >> confdefs.pytmp <<EOF
(''' JS_BYTES_PER_WORD ''', r''' $moz_cv_size_of_JS_BYTES_PER_WORD ''')
EOF
cat >> confdefs.h <<EOF
#define JS_BYTES_PER_WORD $moz_cv_size_of_JS_BYTES_PER_WORD
EOF
if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_BITS_PER_WORD_LOG2 ''', r''' 5 ''')
EOF
cat >> confdefs.h <<\EOF
#define JS_BITS_PER_WORD_LOG2 5
EOF
elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_BITS_PER_WORD_LOG2 ''', r''' 6 ''')
EOF
cat >> confdefs.h <<\EOF
#define JS_BITS_PER_WORD_LOG2 6
EOF
else
{ echo "configure: error: Unexpected JS_BYTES_PER_WORD" 1>&2; exit 1; }
fi
for ac_hdr in endian.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9163: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9168 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:9176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_header_endian_h" = yes; then
cat >> confdefs.pytmp <<\EOF
(''' JS_HAVE_ENDIAN_H ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_HAVE_ENDIAN_H 1
EOF
fi
for ac_hdr in machine/endian.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9219: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9224 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:9232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_header_machine_endian_h" = yes; then
cat >> confdefs.pytmp <<\EOF
(''' JS_HAVE_MACHINE_ENDIAN_H ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_HAVE_MACHINE_ENDIAN_H 1
EOF
fi
for ac_hdr in sys/isa_defs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9275: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9280 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:9288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_header_sys_isa_defs_h" = yes; then
cat >> confdefs.pytmp <<\EOF
(''' JS_HAVE_SYS_ISA_DEFS_H ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_HAVE_SYS_ISA_DEFS_H 1
EOF
fi
echo $ac_n "checking for uint""... $ac_c" 1>&6
echo "configure:9328: checking for uint" >&5
if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9333 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
int main() {
uint foo = 0;
; return 0; }
EOF
if { (eval echo configure:9341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_uint=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_uint=false
fi
rm -f conftest*
fi
if test "$ac_cv_uint" = true ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_UINT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_UINT 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for uint_t""... $ac_c" 1>&6
echo "configure:9366: checking for uint_t" >&5
if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9371 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
int main() {
uint_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:9379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_uint_t=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_uint_t=false
fi
rm -f conftest*
fi
if test "$ac_cv_uint_t" = true ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_UINT_T ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_UINT_T 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6
echo "configure:9413: checking for uname.domainname" >&5
if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9418 "configure"
#include "confdefs.h"
#include <sys/utsname.h>
int main() {
struct utsname *res; char *domain;
(void)uname(res); if (res != 0) { domain = res->domainname; }
; return 0; }
EOF
if { (eval echo configure:9426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_uname_domainname_field=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_have_uname_domainname_field=false
fi
rm -f conftest*
fi
if test "$ac_cv_have_uname_domainname_field" = "true"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_UNAME_DOMAINNAME_FIELD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_UNAME_DOMAINNAME_FIELD 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6
echo "configure:9453: checking for uname.__domainname" >&5
if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9458 "configure"
#include "confdefs.h"
#include <sys/utsname.h>
int main() {
struct utsname *res; char *domain;
(void)uname(res); if (res != 0) { domain = res->__domainname; }
; return 0; }
EOF
if { (eval echo configure:9466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_uname_us_domainname_field=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_have_uname_us_domainname_field=false
fi
rm -f conftest*
fi
if test "$ac_cv_have_uname_us_domainname_field" = "true"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_UNAME_US_DOMAINNAME_FIELD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_UNAME_US_DOMAINNAME_FIELD 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
if test "$GNU_CXX"; then
_SAVE_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS"
USE_CXX11=
echo $ac_n "checking for gcc c++0x headers bug without rtti""... $ac_c" 1>&6
echo "configure:9506: checking for gcc c++0x headers bug without rtti" >&5
if eval "test \"`echo '$''{'ac_cv_cxx0x_headers_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9511 "configure"
#include "confdefs.h"
#include <memory>
int main() {
; return 0; }
EOF
if { (eval echo configure:9518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cxx0x_headers_bug="no"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cxx0x_headers_bug="yes"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cxx0x_headers_bug" 1>&6
if test "$CLANG_CXX" -a "$ac_cv_cxx0x_headers_bug" = "yes"; then
CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
echo $ac_n "checking whether workaround for gcc c++0x headers conflict with clang works""... $ac_c" 1>&6
echo "configure:9535: checking whether workaround for gcc c++0x headers conflict with clang works" >&5
if eval "test \"`echo '$''{'ac_cv_cxx0x_clang_workaround'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9540 "configure"
#include "confdefs.h"
#include <memory>
int main() {
; return 0; }
EOF
if { (eval echo configure:9547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cxx0x_clang_workaround="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cxx0x_clang_workaround="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cxx0x_clang_workaround" 1>&6
if test "ac_cv_cxx0x_clang_workaround" = "no"; then
CXXFLAGS="$_SAVE_CXXFLAGS"
USE_CXX11=
fi
elif test "$ac_cv_cxx0x_headers_bug" = "yes"; then
CXXFLAGS="$_SAVE_CXXFLAGS"
USE_CXX11=
fi
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if test "$GNU_CC"; then
echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
echo "configure:9581: checking for visibility(hidden) attribute" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
int foo __attribute__ ((visibility ("hidden"))) = 1;
EOF
ac_cv_visibility_hidden=no
if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
if egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
ac_cv_visibility_hidden=yes
fi
fi
rm -f conftest.cs
fi
echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
if test "$ac_cv_visibility_hidden" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_VISIBILITY_HIDDEN_ATTRIBUTE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
EOF
echo $ac_n "checking for visibility(default) attribute""... $ac_c" 1>&6
echo "configure:9609: checking for visibility(default) attribute" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_default'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
int foo __attribute__ ((visibility ("default"))) = 1;
EOF
ac_cv_visibility_default=no
if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
if ! egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
ac_cv_visibility_default=yes
fi
fi
rm -f conftest.cs
fi
echo "$ac_t""$ac_cv_visibility_default" 1>&6
if test "$ac_cv_visibility_default" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_VISIBILITY_ATTRIBUTE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VISIBILITY_ATTRIBUTE 1
EOF
echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
echo "configure:9637: checking for visibility pragma support" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#pragma GCC visibility push(hidden)
int foo_hidden = 1;
#pragma GCC visibility push(default)
int foo_default = 1;
EOF
ac_cv_visibility_pragma=no
if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then
if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then
ac_cv_visibility_pragma=yes
fi
fi
fi
rm -f conftest.cs
fi
echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
if test "$ac_cv_visibility_pragma" = "yes"; then
echo $ac_n "checking For gcc visibility bug with class-level attributes (GCC bug 26905)""... $ac_c" 1>&6
echo "configure:9662: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5
if eval "test \"`echo '$''{'ac_cv_have_visibility_class_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#pragma GCC visibility push(hidden)
struct __attribute__ ((visibility ("default"))) TestStruct {
static void Init();
};
__attribute__ ((visibility ("default"))) void TestFunc() {
TestStruct::Init();
}
EOF
ac_cv_have_visibility_class_bug=no
if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
ac_cv_have_visibility_class_bug=yes
else
if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then
ac_cv_have_visibility_class_bug=yes
fi
fi
rm -rf conftest.{c,S}
fi
echo "$ac_t""$ac_cv_have_visibility_class_bug" 1>&6
echo $ac_n "checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)""... $ac_c" 1>&6
echo "configure:9690: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5
if eval "test \"`echo '$''{'ac_cv_have_visibility_builtin_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#pragma GCC visibility push(hidden)
#pragma GCC visibility push(default)
#include <string.h>
#pragma GCC visibility pop
__attribute__ ((visibility ("default"))) void Func() {
char c[100];
memset(c, 0, sizeof(c));
}
EOF
ac_cv_have_visibility_builtin_bug=no
if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
ac_cv_have_visibility_builtin_bug=yes
else
if test `grep -c "@PLT" conftest.S` = 0; then
ac_cv_visibility_builtin_bug=yes
fi
fi
rm -f conftest.{c,S}
fi
echo "$ac_t""$ac_cv_have_visibility_builtin_bug" 1>&6
if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
"$ac_cv_have_visibility_class_bug" = "no"; then
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
WRAP_SYSTEM_INCLUDES=1
else
VISIBILITY_FLAGS='-fvisibility=hidden'
fi # have visibility pragma bug
fi # have visibility pragma
fi # have visibility(default) attribute
fi # have visibility(hidden) attribute
fi # GNU_CC
# visibility hidden flag for Sun Studio on Solaris
if test "$SOLARIS_SUNPRO_CC"; then
VISIBILITY_FLAGS='-xldscope=hidden'
fi # Sun Studio on Solaris
if test "$GNU_CC"; then
echo $ac_n "checking for gcc PR49911""... $ac_c" 1>&6
echo "configure:9742: checking for gcc PR49911" >&5
ac_have_gcc_pr49911="no"
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-O2"
if test "$cross_compiling" = yes; then
true
else
cat > conftest.$ac_ext <<EOF
#line 9759 "configure"
#include "confdefs.h"
extern "C" void abort(void);
typedef enum {
eax, ecx, edx, ebx, esp, ebp,
esi, edi }
RegisterID;
union StateRemat {
RegisterID reg_;
int offset_;
};
static StateRemat FromRegister(RegisterID reg) {
StateRemat sr;
sr.reg_ = reg;
return sr;
}
static StateRemat FromAddress3(int address) {
StateRemat sr;
sr.offset_ = address;
if (address < 46 && address >= 0) {
abort();
}
return sr;
}
struct FrameState {
StateRemat dataRematInfo2(bool y, int z) {
if (y) return FromRegister(RegisterID(1));
return FromAddress3(z);
}
};
FrameState frame;
StateRemat x;
__attribute__((noinline)) void jsop_setelem(bool y, int z) {
x = frame.dataRematInfo2(y, z);
}
int main(void) {
jsop_setelem(0, 47);
}
EOF
if { (eval echo configure:9800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_have_gcc_pr49911="yes"
fi
rm -fr conftest*
fi
CXXFLAGS="$_SAVE_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if test "$ac_have_gcc_pr49911" = "yes"; then
echo "$ac_t""yes" 1>&6
CFLAGS="$CFLAGS -fno-tree-vrp"
CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
else
echo "$ac_t""no" 1>&6
fi
fi
echo $ac_n "checking for gcc pr39608""... $ac_c" 1>&6
echo "configure:9833: checking for gcc pr39608" >&5
ac_have_gcc_pr39608="yes"
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 9845 "configure"
#include "confdefs.h"
typedef void (*FuncType)();
template<FuncType Impl>
void f();
template<typename T> class C {
typedef C<T> ThisC;
template<int g()>
static void h() {
f<ThisC::h<g> >();
}
};
int main() {
true
; return 0; }
EOF
if { (eval echo configure:9863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_have_gcc_pr39608="no"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
true
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_have_gcc_pr39608" 1>&6
if test "$ac_have_gcc_pr39608" = "yes"; then
echo This compiler would fail to build firefox, plase upgrade.
exit 1
fi
if test "$OS_TARGET" != WINNT; then
# Only run this test with clang on non-Windows platforms, because clang
# cannot do enough code gen for now to make this test work correctly.
echo $ac_n "checking for llvm pr8927""... $ac_c" 1>&6
echo "configure:9893: checking for llvm pr8927" >&5
ac_have_llvm_pr8927="no"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
_SAVE_CFLAGS=$CFLAGS
CFLAGS="-O2"
if test "$cross_compiling" = yes; then
true
else
cat > conftest.$ac_ext <<EOF
#line 9910 "configure"
#include "confdefs.h"
struct foobar {
int x;
};
static const struct foobar* foo() {
static const struct foobar d = { 0 };
return &d;
}
static const struct foobar* bar() {
static const struct foobar d = { 0 };
return &d;
}
__attribute__((noinline)) int zed(const struct foobar *a,
const struct foobar *b) {
return a == b;
}
int main() {
return zed(foo(), bar());
}
EOF
if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_have_llvm_pr8927="yes"
fi
rm -fr conftest*
fi
CFLAGS="$_SAVE_CFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if test "$ac_have_llvm_pr8927" = "yes"; then
echo "$ac_t""yes" 1>&6
echo This compiler would miscompile firefox, plase upgrade.
echo see http://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites
echo for more information.
exit 1
else
echo "$ac_t""no" 1>&6
fi
fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:9972: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 9977 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:9985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
ac_header_dirent=$ac_hdr; break
else
echo "$ac_t""no" 1>&6
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:10013: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10021 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char opendir();
int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -ldir"
else
echo "$ac_t""no" 1>&6
fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:10054: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10062 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char opendir();
int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:10073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -lx"
else
echo "$ac_t""no" 1>&6
fi
fi
case "$target_os" in
freebsd*)
# for stuff like -lXshm
CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
;;
esac
for ac_hdr in sys/byteorder.h compat.h getopt.h sys/bitypes.h \
memory.h unistd.h gnu/libc-version.h nl_types.h malloc.h \
X11/XKBlib.h io.h cpuid.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10107: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10112 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10155: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10160 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:10168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in sys/quota.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10202: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10207 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:10215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in linux/quota.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10248: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10253 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:10261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
NEW_H=new.h
ac_safe=`echo "new" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for new""... $ac_c" 1>&6
echo "configure:10301: checking for new" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10306 "configure"
#include "confdefs.h"
#include <new>
int main() {
; return 0; }
EOF
if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
NEW_H=new
else
echo "$ac_t""no" 1>&6
fi
cat >> confdefs.pytmp <<EOF
(''' NEW_H ''', r''' <$NEW_H> ''')
EOF
cat >> confdefs.h <<EOF
#define NEW_H <$NEW_H>
EOF
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
# Check whether --enable-dtrace or --disable-dtrace was given.
if test "${enable_dtrace+set}" = set; then
enableval="$enable_dtrace"
enable_dtrace="yes"
fi
if test "x$enable_dtrace" = "xyes"; then
ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6
echo "configure:10358: checking for sys/sdt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10363 "configure"
#include "confdefs.h"
#include <sys/sdt.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:10371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
HAVE_DTRACE=1
else
echo "$ac_t""no" 1>&6
fi
if test -n "$HAVE_DTRACE"; then
cat >> confdefs.pytmp <<\EOF
(''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define INCLUDE_MOZILLA_DTRACE 1
EOF
else
{ echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; exit 1; };
fi
fi
case $target in
*-aix4.3*|*-aix5*)
;;
*)
for ac_hdr in sys/cdefs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10413: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10418 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int main() {
; return 0; }
EOF
if { (eval echo configure:10426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
;;
esac
# Check whether --with-linux-headers or --without-linux-headers was given.
if test "${with_linux_headers+set}" = set; then
withval="$with_linux_headers"
linux_headers=$withval
fi
LINUX_HEADERS_INCLUDES=
if test "$linux_headers"; then
LINUX_HEADERS_INCLUDES="-I$linux_headers"
fi
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $LINUX_HEADERS_INCLUDES"
ac_safe=`echo "linux/perf_event.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/perf_event.h""... $ac_c" 1>&6
echo "configure:10478: checking for linux/perf_event.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10483 "configure"
#include "confdefs.h"
#include <linux/perf_event.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:10491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for perf_event_open system call""... $ac_c" 1>&6
echo "configure:10506: checking for perf_event_open system call" >&5
if eval "test \"`echo '$''{'ac_cv_perf_event_open'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10511 "configure"
#include "confdefs.h"
#include <asm/unistd.h>
int main() {
return sizeof(__NR_perf_event_open);
; return 0; }
EOF
if { (eval echo configure:10518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_perf_event_open=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_perf_event_open=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_perf_event_open" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "$ac_cv_perf_event_open" = "yes"; then
HAVE_LINUX_PERF_EVENT_H=1
else
HAVE_LINUX_PERF_EVENT_H=
LINUX_HEADERS_INCLUDES=
fi
CFLAGS="$_SAVE_CFLAGS"
case $target in
*-hpux11.*)
;;
*)
echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
echo "configure:10554: checking for gethostbyname_r in -lc_r" >&5
ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10562 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname_r();
int main() {
gethostbyname_r()
; return 0; }
EOF
if { (eval echo configure:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lc_r $LIBS"
else
echo "$ac_t""no" 1>&6
fi
;;
esac
case $target in
*-darwin*)
;;
*-os2*)
;;
*)
echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
echo "configure:10614: checking for library containing dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_dlopen="no"
cat > conftest.$ac_ext <<EOF
#line 10621 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen();
int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_dlopen="none required"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_dlopen" = "no" && for i in dl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 10643 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen();
int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:10654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_dlopen="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$ac_t""$ac_cv_search_dlopen" 1>&6
if test "$ac_cv_search_dlopen" != "no"; then
test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
echo "configure:10672: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10677 "configure"
#include "confdefs.h"
#include <dlfcn.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:10685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.pytmp <<\EOF
(''' HAVE_DLOPEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DLOPEN 1
EOF
else
echo "$ac_t""no" 1>&6
fi
else :
fi
;;
esac
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
for ac_func in dladdr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10722: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 10727 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:10750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
CFLAGS="$_SAVE_CFLAGS"
if test ! "$GNU_CXX"; then
case $target in
*-aix*)
echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6
echo "configure:10784: checking for demangle in -lC_r" >&5
ac_lib_var=`echo C_r'_'demangle | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lC_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10792 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char demangle();
int main() {
demangle()
; return 0; }
EOF
if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo C_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lC_r $LIBS"
else
echo "$ac_t""no" 1>&6
fi
;;
*)
echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
echo "configure:10836: checking for demangle in -lC" >&5
ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lC $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10844 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char demangle();
int main() {
demangle()
; return 0; }
EOF
if { (eval echo configure:10855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lC $LIBS"
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
case $target in
*-os2*)
;;
*)
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:10894: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10902 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lsocket $LIBS"
else
echo "$ac_t""no" 1>&6
fi
esac
case "$target_os" in
darwin*)
USE_PTHREADS=1
;;
*)
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:10952: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
#include <stdlib.h>
void *foo(void *v) { int a = 1; }
int main() {
pthread_t t;
if (!pthread_create(&t, 0, &foo, 0)) {
pthread_join(t, 0);
}
exit(0);
}" > dummy.c ;
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
_res=$? ;
rm -f dummy.c dummy${ac_exeext} ;
if test "$_res" = "0"; then
echo "$ac_t""yes" 1>&6
USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:10975: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
#include <stdlib.h>
void *foo(void *v) { int a = 1; }
int main() {
pthread_t t;
if (!pthread_create(&t, 0, &foo, 0)) {
pthread_join(t, 0);
}
exit(0);
}" > dummy.c ;
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
_res=$? ;
rm -f dummy.c dummy${ac_exeext} ;
if test "$_res" = "0"; then
echo "$ac_t""yes" 1>&6
USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:10998: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
#include <stdlib.h>
void *foo(void *v) { int a = 1; }
int main() {
pthread_t t;
if (!pthread_create(&t, 0, &foo, 0)) {
pthread_join(t, 0);
}
exit(0);
}" > dummy.c ;
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
_res=$? ;
rm -f dummy.c dummy${ac_exeext} ;
if test "$_res" = "0"; then
echo "$ac_t""yes" 1>&6
USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:11021: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
#include <stdlib.h>
void *foo(void *v) { int a = 1; }
int main() {
pthread_t t;
if (!pthread_create(&t, 0, &foo, 0)) {
pthread_join(t, 0);
}
exit(0);
}" > dummy.c ;
echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
_res=$? ;
rm -f dummy.c dummy${ac_exeext} ;
if test "$_res" = "0"; then
echo "$ac_t""yes" 1>&6
USE_PTHREADS=1
else
echo "$ac_t""no" 1>&6
fi
fi
fi
fi
;;
esac
# Check whether --with-pthreads or --without-pthreads was given.
if test "${with_pthreads+set}" = set; then
withval="$with_pthreads"
if test "$withval" = "yes"; then
if test "$USE_PTHREADS"x = x; then
{ echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
fi
elif test "$withval" = "no"; then
USE_PTHREADS=
_PTHREAD_LDFLAGS=
else
{ echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; exit 1; }
fi
fi
if test "$USE_PTHREADS"x != x
then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
echo "configure:11080: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthread=yes
case "$target_os" in
freebsd*)
# Freebsd doesn't use -pthread for compiles, it uses them for linking
;;
*)
CFLAGS="$CFLAGS -pthread"
CXXFLAGS="$CXXFLAGS -pthread"
;;
esac
fi
fi
rm -f conftest*
echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
echo "configure:11103: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthreads=yes
CFLAGS="$CFLAGS -pthreads"
CXXFLAGS="$CXXFLAGS -pthreads"
fi
fi
rm -f conftest*
echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
fi
case "$target" in
*-*-freebsd*)
cat >> confdefs.pytmp <<\EOF
(''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' _THREAD_SAFE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _THREAD_SAFE 1
EOF
if test "$ac_cv_have_dash_pthread" = "yes"; then
_PTHREAD_LDFLAGS="-pthread"
fi
;;
*-*-openbsd*|*-*-bsdi*)
cat >> confdefs.pytmp <<\EOF
(''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' _THREAD_SAFE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _THREAD_SAFE 1
EOF
if test "$ac_cv_have_dash_pthread" = "yes"; then
_PTHREAD_LDFLAGS="-pthread"
fi
;;
*-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*)
cat >> confdefs.pytmp <<\EOF
(''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
;;
*-aix4.3*|*-aix5*)
cat >> confdefs.pytmp <<\EOF
(''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
;;
*-hpux11.*)
cat >> confdefs.pytmp <<\EOF
(''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
;;
*-*-solaris*)
cat >> confdefs.pytmp <<\EOF
(''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
if test "$SOLARIS_SUNPRO_CC"; then
CFLAGS="$CFLAGS -mt"
CXXFLAGS="$CXXFLAGS -mt"
fi
;;
esac
LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:11208: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
#line 11214 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "$ac_pattern" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_prog_gcc_traditional=yes
else
rm -rf conftest*
ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 11232 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "$ac_pattern" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
fi
fi
echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
echo "configure:11254: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
#line 11262 "configure"
#include "confdefs.h"
main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
EOF
if { (eval echo configure:11272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_func_memcmp_clean=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
for ac_func in fchmod flockfile getc_unlocked _getc_nolock getpagesize \
lchown localtime_r lstat64 memmove random rint sbrk snprintf \
stat64 statvfs statvfs64 strerror strtok_r truncate64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11294: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11299 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:11322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6
echo "configure:11360: checking for wcrtomb" >&5
if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11365 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t ps={0};wcrtomb(0,'f',&ps);
; return 0; }
EOF
if { (eval echo configure:11372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_have_wcrtomb="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_have_wcrtomb="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6
if test "$ac_cv_have_wcrtomb" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_WCRTOMB ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_WCRTOMB 1
EOF
fi
echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6
echo "configure:11395: checking for mbrtowc" >&5
if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11400 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t ps={0};mbrtowc(0,0,0,&ps);
; return 0; }
EOF
if { (eval echo configure:11407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_have_mbrtowc="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_have_mbrtowc="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6
if test "$ac_cv_have_mbrtowc" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_MBRTOWC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_MBRTOWC 1
EOF
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6
echo "configure:11439: checking for res_ninit()" >&5
if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11444 "configure"
#include "confdefs.h"
#ifdef linux
#define _BSD_SOURCE 1
#endif
#include <resolv.h>
int main() {
int foo = res_ninit(&_res);
; return 0; }
EOF
if { (eval echo configure:11456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_res_ninit=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_func_res_ninit=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_func_res_ninit" 1>&6
if test "$ac_cv_func_res_ninit" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_RES_NINIT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_RES_NINIT 1
EOF
fi
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6
echo "configure:11489: checking for gnu_get_libc_version()" >&5
if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11494 "configure"
#include "confdefs.h"
#ifdef HAVE_GNU_LIBC_VERSION_H
#include <gnu/libc-version.h>
#endif
int main() {
const char *glibc_version = gnu_get_libc_version();
; return 0; }
EOF
if { (eval echo configure:11505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_gnu_get_libc_version=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_func_gnu_get_libc_version=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6
if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_GNU_GET_LIBC_VERSION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_GNU_GET_LIBC_VERSION 1
EOF
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6
echo "configure:11539: checking for an implementation of va_copy()" >&5
if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_va_copy=no
else
cat > conftest.$ac_ext <<EOF
#line 11549 "configure"
#include "confdefs.h"
#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
va_copy (args2, args1);
if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
exit (1);
va_end (args1); va_end (args2);
}
int main() { f (0, 42); return 0; }
EOF
if { (eval echo configure:11563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_va_copy=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_va_copy=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_va_copy" 1>&6
echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6
echo "configure:11580: checking for an implementation of __va_copy()" >&5
if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv___va_copy=no
else
cat > conftest.$ac_ext <<EOF
#line 11590 "configure"
#include "confdefs.h"
#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
__va_copy (args2, args1);
if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
exit (1);
va_end (args1); va_end (args2);
}
int main() { f (0, 42); return 0; }
EOF
if { (eval echo configure:11604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv___va_copy=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv___va_copy=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv___va_copy" 1>&6
echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6
echo "configure:11621: checking whether va_lists can be copied by value" >&5
if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_va_val_copy=yes
else
cat > conftest.$ac_ext <<EOF
#line 11631 "configure"
#include "confdefs.h"
#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
args2 = args1;
if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
exit (1);
va_end (args1); va_end (args2);
}
int main() { f (0, 42); return 0; }
EOF
if { (eval echo configure:11645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_va_val_copy=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_va_val_copy=no
fi
rm -fr conftest*
fi
fi
if test "x$ac_cv_va_copy" = "xyes"; then
cat >> confdefs.pytmp <<\EOF
(''' VA_COPY ''', r''' va_copy ''')
EOF
cat >> confdefs.h <<\EOF
#define VA_COPY va_copy
EOF
cat >> confdefs.pytmp <<\EOF
(''' HAVE_VA_COPY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VA_COPY 1
EOF
elif test "x$ac_cv___va_copy" = "xyes"; then
cat >> confdefs.pytmp <<\EOF
(''' VA_COPY ''', r''' __va_copy ''')
EOF
cat >> confdefs.h <<\EOF
#define VA_COPY __va_copy
EOF
cat >> confdefs.pytmp <<\EOF
(''' HAVE_VA_COPY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VA_COPY 1
EOF
fi
if test "x$ac_cv_va_val_copy" = "xno"; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VA_LIST_AS_ARRAY 1
EOF
fi
echo "$ac_t""$ac_cv_va_val_copy" 1>&6
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
ARM_ABI_PREFIX=
if test "$GNU_CC"; then
if test "$CPU_ARCH" = "arm" ; then
echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6
echo "configure:11715: checking for ARM EABI" >&5
if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11720 "configure"
#include "confdefs.h"
int main() {
#if defined(__ARM_EABI__)
return 0;
#else
#error Not ARM EABI.
#endif
; return 0; }
EOF
if { (eval echo configure:11733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_gcc_arm_eabi="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_gcc_arm_eabi="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6
if test "$ac_cv_gcc_arm_eabi" = "yes"; then
HAVE_ARM_EABI=1
ARM_ABI_PREFIX=eabi-
else
ARM_ABI_PREFIX=oabi-
fi
fi
TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
fi
echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
echo "configure:11758: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11763 "configure"
#include "confdefs.h"
class X {
public: int go(const X&) {return 3;}
int jo(const X&) {return 3;}
};
class Y : public X {
public: int go(int) {return 2;}
int jo(int) {return 2;}
using X::jo;
private: using X::go;
};
int main() {
X x; Y y; y.jo(x);
; return 0; }
EOF
if { (eval echo configure:11779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cpp_ambiguity_resolving_using=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cpp_ambiguity_resolving_using=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6
if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_CPP_AMBIGUITY_RESOLVING_USING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
EOF
fi
echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
echo "configure:11803: checking for C++ dynamic_cast to void*" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_cpp_dynamic_cast_void_ptr=no
else
cat > conftest.$ac_ext <<EOF
#line 11811 "configure"
#include "confdefs.h"
class X { int i; public: virtual ~X() { } };
class Y { int j; public: virtual ~Y() { } };
class Z : public X, public Y { int k; };
int main() {
Z mdo;
X *subx = (X*)&mdo;
Y *suby = (Y*)&mdo;
return !((((void*)&mdo != (void*)subx) &&
((void*)&mdo == dynamic_cast<void*>(subx))) ||
(((void*)&mdo != (void*)suby) &&
((void*)&mdo == dynamic_cast<void*>(suby))));
}
EOF
if { (eval echo configure:11827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_cpp_dynamic_cast_void_ptr=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_cpp_dynamic_cast_void_ptr=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6
if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
EOF
fi
echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
echo "configure:11854: checking whether C++ requires implementation of unused virtual methods" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11859 "configure"
#include "confdefs.h"
class X {private: virtual void never_called();};
int main() {
X x;
; return 0; }
EOF
if { (eval echo configure:11866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_cpp_unused_required=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cpp_unused_required=yes
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6
if test "$ac_cv_cpp_unused_required" = yes ; then
cat >> confdefs.pytmp <<\EOF
(''' NEED_CPP_UNUSED_IMPLEMENTATIONS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1
EOF
fi
echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
echo "configure:11892: checking for trouble comparing to zero near std::operator!=()" >&5
if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11897 "configure"
#include "confdefs.h"
#include <algorithm>
template <class T> class Foo {};
class T2;
template <class T> int operator==(const T2*, const T&) { return 0; }
template <class T> int operator!=(const T2*, const T&) { return 0; }
int main() {
Foo<int> f; return (0 != f);
; return 0; }
EOF
if { (eval echo configure:11908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_trouble_comparing_to_zero=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_trouble_comparing_to_zero=yes
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6
if test "$ac_cv_trouble_comparing_to_zero" = yes ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_CPP_TROUBLE_COMPARING_TO_ZERO ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 1
EOF
fi
# try harder, when checking for __thread support, see bug 521750 comment #33 and below
# We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is
# enabled, the linker in xcode 4.1 will crash. Without this it would crash when
# linking XUL.
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS"
echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6
echo "configure:11938: checking for __thread keyword for TLS variables" >&5
if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11943 "configure"
#include "confdefs.h"
__thread bool tlsIsMainThread = false;
int main() {
return tlsIsMainThread;
; return 0; }
EOF
if { (eval echo configure:11950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_thread_keyword=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_thread_keyword=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_thread_keyword" 1>&6
LDFLAGS=$_SAVE_LDFLAGS
if test "$ac_cv_thread_keyword" = yes; then
# mips builds fail with TLS variables because of a binutils bug.
# See bug 528687
case "${target}" in
mips*-*)
:
;;
*-android*|*-linuxandroid*)
:
;;
*)
cat >> confdefs.pytmp <<\EOF
(''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_THREAD_TLS_KEYWORD 1
EOF
;;
esac
fi
echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6
echo "configure:11988: checking for __attribute__((always_inline))" >&5
if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 11993 "configure"
#include "confdefs.h"
inline void f(void) __attribute__((always_inline));
int main() {
; return 0; }
EOF
if { (eval echo configure:12000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_attribute_always_inline=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_attribute_always_inline=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6
echo $ac_n "checking for __attribute__((malloc))""... $ac_c" 1>&6
echo "configure:12015: checking for __attribute__((malloc))" >&5
if eval "test \"`echo '$''{'ac_cv_attribute_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 12020 "configure"
#include "confdefs.h"
void* f(int) __attribute__((malloc));
int main() {
; return 0; }
EOF
if { (eval echo configure:12027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_attribute_malloc=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_attribute_malloc=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_attribute_malloc" 1>&6
echo $ac_n "checking for __attribute__((warn_unused_result))""... $ac_c" 1>&6
echo "configure:12042: checking for __attribute__((warn_unused_result))" >&5
if eval "test \"`echo '$''{'ac_cv_attribute_warn_unused'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 12047 "configure"
#include "confdefs.h"
int f(void) __attribute__((warn_unused_result));
int main() {
; return 0; }
EOF
if { (eval echo configure:12054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_attribute_warn_unused=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_attribute_warn_unused=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_attribute_warn_unused" 1>&6
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:12078: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 12083 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
int category = LC_MESSAGES;
; return 0; }
EOF
if { (eval echo configure:12090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_i18n_lc_messages=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_i18n_lc_messages=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6
if test "$ac_cv_i18n_lc_messages" = yes; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_I18N_LC_MESSAGES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_I18N_LC_MESSAGES 1
EOF
fi
for ac_func in localeconv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12116: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 12121 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:12144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
fi # ! SKIP_COMPILER_CHECKS
TARGET_XPCOM_ABI=
if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then
TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}"
fi
if test "$ac_cv_attribute_malloc" = yes ; then
cat >> confdefs.pytmp <<\EOF
(''' NS_ATTR_MALLOC ''', r''' __attribute__((malloc)) ''')
EOF
cat >> confdefs.h <<\EOF
#define NS_ATTR_MALLOC __attribute__((malloc))
EOF
else
cat >> confdefs.pytmp <<\EOF
(''' NS_ATTR_MALLOC ''', r''' ''')
EOF
cat >> confdefs.h <<\EOF
#define NS_ATTR_MALLOC
EOF
fi
if test "$ac_cv_attribute_warn_unused" = yes ; then
cat >> confdefs.pytmp <<\EOF
(''' NS_WARN_UNUSED_RESULT ''', r''' __attribute__((warn_unused_result)) ''')
EOF
cat >> confdefs.h <<\EOF
#define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
EOF
else
cat >> confdefs.pytmp <<\EOF
(''' NS_WARN_UNUSED_RESULT ''', r''' ''')
EOF
cat >> confdefs.h <<\EOF
#define NS_WARN_UNUSED_RESULT
EOF
fi
if test -n "$SKIP_COMPILER_CHECKS"; then
cat >> confdefs.pytmp <<\EOF
(''' MALLOC_H ''', r''' <malloc.h> ''')
EOF
cat >> confdefs.h <<\EOF
#define MALLOC_H <malloc.h>
EOF
cat >> confdefs.pytmp <<\EOF
(''' HAVE_FORCEINLINE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_FORCEINLINE 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' HAVE_LOCALECONV ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_LOCALECONV 1
EOF
fi # SKIP_COMPILER_CHECKS
# app update channel is 'default' when not supplied.
# Check whether --enable-update-channel or --disable-update-channel was given.
if test "${enable_update_channel+set}" = set; then
enableval="$enable_update_channel"
MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z`
fi
if test -z "$MOZ_UPDATE_CHANNEL"; then
MOZ_UPDATE_CHANNEL=default
fi
cat >> confdefs.pytmp <<EOF
(''' MOZ_UPDATE_CHANNEL ''', r''' $MOZ_UPDATE_CHANNEL ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_UPDATE_CHANNEL $MOZ_UPDATE_CHANNEL
EOF
GRE_MILESTONE=`tail -n 1 "$_topsrcdir"/config/milestone.txt 2>/dev/null || tail -1 "$_topsrcdir"/config/milestone.txt`
case "$GRE_MILESTONE" in
*a1*)
NIGHTLY_BUILD=1
cat >> confdefs.pytmp <<\EOF
(''' NIGHTLY_BUILD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NIGHTLY_BUILD 1
EOF
;;
*a*)
;;
*)
RELEASE_BUILD=1
cat >> confdefs.pytmp <<\EOF
(''' RELEASE_BUILD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define RELEASE_BUILD 1
EOF
;;
esac
# External Packages
# Check whether --with-system-nspr or --without-system-nspr was given.
if test "${with_system_nspr+set}" = set; then
withval="$with_system_nspr"
if test "$withval" = "yes"; then
_USE_SYSTEM_NSPR=1
elif test "$withval" = "no"; then
:
else
{ echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; exit 1; }
fi
fi
# Check whether --with-nspr-cflags or --without-nspr-cflags was given.
if test "${with_nspr_cflags+set}" = set; then
withval="$with_nspr_cflags"
NSPR_CFLAGS=$withval
fi
# Check whether --with-nspr-libs or --without-nspr-libs was given.
if test "${with_nspr_libs+set}" = set; then
withval="$with_nspr_libs"
NSPR_LIBS=$withval
fi
if test "$_USE_SYSTEM_NSPR" && (test "$NSPR_CFLAGS" -o "$NSPR_LIBS"); then
{ echo "configure: error: --with-system-nspr and --with-nspr-libs/cflags are mutually exclusive.
See 'configure --help'." 1>&2; exit 1; }
fi
if test -n "$_USE_SYSTEM_NSPR"; then
MOZ_NATIVE_NSPR=
# Check whether --with-nspr-prefix or --without-nspr-prefix was given.
if test "${with_nspr_prefix+set}" = set; then
withval="$with_nspr_prefix"
nspr_config_prefix="$withval"
else
nspr_config_prefix=""
fi
# Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given.
if test "${with_nspr_exec_prefix+set}" = set; then
withval="$with_nspr_exec_prefix"
nspr_config_exec_prefix="$withval"
else
nspr_config_exec_prefix=""
fi
if test -n "$nspr_config_exec_prefix"; then
nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
if test -z "$NSPR_CONFIG"; then
NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
fi
fi
if test -n "$nspr_config_prefix"; then
nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
if test -z "$NSPR_CONFIG"; then
NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
fi
fi
unset ac_cv_path_NSPR_CONFIG
# Extract the first word of "nspr-config", so it can be a program name with args.
set dummy nspr-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12365: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$NSPR_CONFIG" in
/*)
ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no"
;;
esac
fi
NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
if test -n "$NSPR_CONFIG"; then
echo "$ac_t""$NSPR_CONFIG" 1>&6
else
echo "$ac_t""no" 1>&6
fi
min_nspr_version=$NSPR_MINVER
echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6
echo "configure:12400: checking for NSPR - version >= $min_nspr_version" >&5
no_nspr=""
if test "$NSPR_CONFIG" != "no"; then
NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version`
elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then
NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}"
NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}"
NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION"
else
no_nspr="yes"
fi
if test -z "$no_nspr"; then
nspr_config_major_version=`echo $NSPR_VERSION_STRING | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
min_nspr_major_version=`echo $min_nspr_version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
min_nspr_minor_version=`echo $min_nspr_version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
min_nspr_micro_version=`echo $min_nspr_version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then
no_nspr="yes"
elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then
no_nspr="yes"
elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" &&
test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then
no_nspr="yes"
fi
fi
if test -z "$no_nspr"; then
echo "$ac_t""yes" 1>&6
MOZ_NATIVE_NSPR=1
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: your don't have NSPR installed or your version is too old" 1>&2; exit 1; }
fi
fi
NSPR_PKGCONF_CHECK="nspr"
if test -n "$MOZ_NATIVE_NSPR"; then
# piggy back on $MOZ_NATIVE_NSPR to set a variable for the nspr check for js.pc
NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER"
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $NSPR_CFLAGS"
cat > conftest.$ac_ext <<EOF
#line 12463 "configure"
#include "confdefs.h"
#include "prlog.h"
int main() {
#ifndef PR_STATIC_ASSERT
#error PR_STATIC_ASSERT not defined
#endif
; return 0; }
EOF
if { (eval echo configure:12472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
MOZ_NATIVE_NSPR=1
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; exit 1; }
fi
rm -f conftest*
CFLAGS=$_SAVE_CFLAGS
fi
ZLIB_DIR=yes
MOZZLIB=1.2.3
# Check whether --with-system-zlib or --without-system-zlib was given.
if test "${with_system_zlib+set}" = set; then
withval="$with_system_zlib"
ZLIB_DIR=$withval
fi
if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then
_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
_SAVE_LIBS=$LIBS
if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then
MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include"
MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib"
CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS"
LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS"
fi
if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then
MOZ_NATIVE_ZLIB=
else
echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6
echo "configure:12514: checking for gzread in -lz" >&5
ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
#line 12522 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gzread();
int main() {
gzread()
; return 0; }
EOF
if { (eval echo configure:12533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
MOZ_NATIVE_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz"
else
echo "$ac_t""no" 1>&6
MOZ_NATIVE_ZLIB=
fi
if test "$MOZ_NATIVE_ZLIB" = 1; then
MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'`
cat > conftest.$ac_ext <<EOF
#line 12557 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <string.h>
#include <zlib.h>
int main() {
#if ZLIB_VERNUM < $MOZZLIBNUM
#error "Insufficient zlib version ($MOZZLIBNUM required)."
#endif
; return 0; }
EOF
if { (eval echo configure:12568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
MOZ_NATIVE_ZLIB=1
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; exit 1; }
fi
rm -f conftest*
fi
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS
fi
# Check whether --enable-system-ffi or --disable-system-ffi was given.
if test "${enable_system_ffi+set}" = set; then
enableval="$enable_system_ffi"
if test "$enableval" = "yes"; then
MOZ_NATIVE_FFI=1
elif test "$enableval" = "no"; then
:
else
{ echo "configure: error: Option, system-ffi, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_NATIVE_FFI"; then
# Vanilla libffi 3.0.9 needs a few patches from upcoming version 3.0.10
# for non-GCC compilers.
if test -z "$GNU_CC"; then
succeeded=no
if test -z "$PKG_CONFIG"; then
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12614: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PKG_CONFIG" in
/*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
;;
esac
fi
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
if test -n "$PKG_CONFIG"; then
echo "$ac_t""$PKG_CONFIG" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
echo $ac_n "checking for libffi > 3.0.9""... $ac_c" 1>&6
echo "configure:12658: checking for libffi > 3.0.9" >&5
if $PKG_CONFIG --exists "libffi > 3.0.9" ; then
echo "$ac_t""yes" 1>&6
succeeded=yes
echo $ac_n "checking MOZ_FFI_CFLAGS""... $ac_c" 1>&6
echo "configure:12665: checking MOZ_FFI_CFLAGS" >&5
MOZ_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi > 3.0.9"`
echo "$ac_t""$MOZ_FFI_CFLAGS" 1>&6
echo $ac_n "checking MOZ_FFI_LIBS""... $ac_c" 1>&6
echo "configure:12670: checking MOZ_FFI_LIBS" >&5
## Remove evil flags like -Wl,--export-dynamic
MOZ_FFI_LIBS="`$PKG_CONFIG --libs \"libffi > 3.0.9\" |sed s/-Wl,--export-dynamic//g`"
echo "$ac_t""$MOZ_FFI_LIBS" 1>&6
else
MOZ_FFI_CFLAGS=""
MOZ_FFI_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
MOZ_FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi > 3.0.9"`
echo $MOZ_FFI_PKG_ERRORS
fi
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
:
else
if test "$COMPILE_ENVIRONMENT"; then
{ echo "configure: error: Library requirements (libffi > 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; }
fi
fi
else
succeeded=no
if test -z "$PKG_CONFIG"; then
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12706: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PKG_CONFIG" in
/*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
;;
esac
fi
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
if test -n "$PKG_CONFIG"; then
echo "$ac_t""$PKG_CONFIG" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
echo $ac_n "checking for libffi >= 3.0.9""... $ac_c" 1>&6
echo "configure:12750: checking for libffi >= 3.0.9" >&5
if $PKG_CONFIG --exists "libffi >= 3.0.9" ; then
echo "$ac_t""yes" 1>&6
succeeded=yes
echo $ac_n "checking MOZ_FFI_CFLAGS""... $ac_c" 1>&6
echo "configure:12757: checking MOZ_FFI_CFLAGS" >&5
MOZ_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0.9"`
echo "$ac_t""$MOZ_FFI_CFLAGS" 1>&6
echo $ac_n "checking MOZ_FFI_LIBS""... $ac_c" 1>&6
echo "configure:12762: checking MOZ_FFI_LIBS" >&5
## Remove evil flags like -Wl,--export-dynamic
MOZ_FFI_LIBS="`$PKG_CONFIG --libs \"libffi >= 3.0.9\" |sed s/-Wl,--export-dynamic//g`"
echo "$ac_t""$MOZ_FFI_LIBS" 1>&6
else
MOZ_FFI_CFLAGS=""
MOZ_FFI_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
MOZ_FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi >= 3.0.9"`
echo $MOZ_FFI_PKG_ERRORS
fi
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
:
else
if test "$COMPILE_ENVIRONMENT"; then
{ echo "configure: error: Library requirements (libffi >= 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; }
fi
fi
fi
fi
# Application
ENABLE_TESTS=1
USE_ARM_KUSER=
case "${target}" in
arm*-android*|arm*-linuxandroid*)
USE_ARM_KUSER=1
;;
esac
# Check whether --with-arm-kuser or --without-arm-kuser was given.
if test "${with_arm_kuser+set}" = set; then
withval="$with_arm_kuser"
if test "$withval" = "yes"; then
USE_ARM_KUSER=1
elif test "$withval" = "no"; then
:
else
{ echo "configure: error: Option, arm-kuser, does not take an argument ($withval)." 1>&2; exit 1; }
fi
fi
if test -n "$USE_ARM_KUSER"; then
cat >> confdefs.pytmp <<\EOF
(''' USE_ARM_KUSER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define USE_ARM_KUSER 1
EOF
fi
# Components and Features
# Check whether --enable-ui-locale or --disable-ui-locale was given.
if test "${enable_ui_locale+set}" = set; then
enableval="$enable_ui_locale"
MOZ_UI_LOCALE=$enableval
fi
# Check whether --enable-tests or --disable-tests was given.
if test "${enable_tests+set}" = set; then
enableval="$enable_tests"
if test "$enableval" = "no"; then
ENABLE_TESTS=
elif test "$enableval" = "yes"; then
ENABLE_TESTS=1
else
{ echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
# Individual module options
# Debugging and Optimizations
if test -z "$MOZ_DEBUG_FLAGS"; then
MOZ_DEBUG_FLAGS="-g"
fi
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
if test "$enableval" != "no"; then
MOZ_DEBUG=1
if test "$ENABLE_METHODJIT" -o "$ENABLE_YARR_JIT"; then
# needs MethodJIT or YarrJIT
ENABLE_METHODJIT_SPEW=1
fi
if test -n "$enableval" -a "$enableval" != "yes"; then
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
_MOZ_DEBUG_FLAGS_SET=1
fi
else
MOZ_DEBUG=
fi
else
MOZ_DEBUG=
fi
MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG -DTRACING"
# Check whether --with-debug-label or --without-debug-label was given.
if test "${with_debug_label+set}" = set; then
withval="$with_debug_label"
for option in `echo $withval | sed 's/,/ /g'`; do
MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${option}"
done
fi
MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
if test -n "$MOZ_DEBUG"; then
echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6
echo "configure:12897: checking for valid debug flags" >&5
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS"
cat > conftest.$ac_ext <<EOF
#line 12901 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:12908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_results=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
_results=no
fi
rm -f conftest*
echo "$ac_t""$_results" 1>&6
if test "$_results" = "no"; then
{ echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; exit 1; }
fi
CFLAGS=$_SAVE_CFLAGS
fi
if test "$ENABLE_METHODJIT_SPEW"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_METHODJIT_SPEW ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_METHODJIT_SPEW 1
EOF
fi
if test -z "$MOZ_OPTIMIZE_FLAGS"; then
MOZ_OPTIMIZE_FLAGS="-O"
fi
# Check whether --enable-optimize or --disable-optimize was given.
if test "${enable_optimize+set}" = set; then
enableval="$enable_optimize"
if test "$enableval" != "no"; then
MOZ_OPTIMIZE=1
if test -n "$enableval" -a "$enableval" != "yes"; then
MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'`
MOZ_OPTIMIZE=2
fi
else
MOZ_OPTIMIZE=
fi
else
MOZ_OPTIMIZE=1
fi
case "$target" in
*android*)
unwind_tables="-funwind-tables"
;;
esac
if test "$GNU_CC"; then
MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables"
MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer"
if test "$CPU_ARCH" = arm; then
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398
MOZ_ENABLE_FRAME_PTR="$unwind_tables"
fi
else
case "$target" in
*-mingw*)
MOZ_ENABLE_FRAME_PTR="-Oy-"
MOZ_DISABLE_FRAME_PTR="-Oy"
;;
esac
fi
# if we are debugging or profiling, we want a frame pointer.
if test -z "$MOZ_OPTIMIZE" -o \
-n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then
MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
else
MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
fi
if test "$COMPILE_ENVIRONMENT"; then
if test -n "$MOZ_OPTIMIZE"; then
echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6
echo "configure:12990: checking for valid optimization flags" >&5
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
cat > conftest.$ac_ext <<EOF
#line 12994 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:13001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_results=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
_results=no
fi
rm -f conftest*
echo "$ac_t""$_results" 1>&6
if test "$_results" = "no"; then
{ echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; exit 1; }
fi
CFLAGS=$_SAVE_CFLAGS
fi
fi # COMPILE_ENVIRONMENT
# Check whether --enable-debug-symbols or --disable-debug-symbols was given.
if test "${enable_debug_symbols+set}" = set; then
enableval="$enable_debug_symbols"
if test "$enableval" != "no"; then
MOZ_DEBUG_SYMBOLS=1
if test -n "$enableval" -a "$enableval" != "yes"; then
if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
else
{ echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
fi
fi
else
MOZ_DEBUG_SYMBOLS=
fi
else
MOZ_DEBUG_SYMBOLS=1
fi
if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_DEBUG_SYMBOLS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DEBUG_SYMBOLS 1
EOF
export MOZ_DEBUG_SYMBOLS
fi
# Check whether --enable-trace-logging or --disable-trace-logging was given.
if test "${enable_trace_logging+set}" = set; then
enableval="$enable_trace_logging"
if test "$enableval" = "yes"; then
ENABLE_TRACE_LOGGING=1
elif test "$enableval" = "no"; then
ENABLE_TRACE_LOGGING=
else
{ echo "configure: error: Option, trace-logging, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$ENABLE_TRACE_LOGGING"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_TRACE_LOGGING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_TRACE_LOGGING 1
EOF
fi
# Check whether --enable-warnings-as-errors or --disable-warnings-as-errors was given.
if test "${enable_warnings_as_errors+set}" = set; then
enableval="$enable_warnings_as_errors"
if test "$enableval" = "no"; then
MOZ_ENABLE_WARNINGS_AS_ERRORS=1
elif test "$enableval" = "yes"; then
MOZ_ENABLE_WARNINGS_AS_ERRORS=
else
{ echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
WARNINGS_AS_ERRORS=''
fi
# Check whether --enable-sm-fail-on-warnings or --disable-sm-fail-on-warnings was given.
if test "${enable_sm_fail_on_warnings+set}" = set; then
enableval="$enable_sm_fail_on_warnings"
if test "$enableval" = "yes"; then
FAIL_ON_WARNINGS=1
elif test "$enableval" = "no"; then
FAIL_ON_WARNINGS=
else
{ echo "configure: error: Option, sm-fail-on-warnings, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
# Check whether --enable-trace-malloc or --disable-trace-malloc was given.
if test "${enable_trace_malloc+set}" = set; then
enableval="$enable_trace_malloc"
if test "$enableval" = "yes"; then
NS_TRACE_MALLOC=1
elif test "$enableval" = "no"; then
NS_TRACE_MALLOC=
else
{ echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$NS_TRACE_MALLOC"; then
# Please, Mr. Linker Man, don't take away our symbol names
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
cat >> confdefs.pytmp <<\EOF
(''' NS_TRACE_MALLOC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NS_TRACE_MALLOC 1
EOF
fi
# Check whether --enable-dmd or --disable-dmd was given.
if test "${enable_dmd+set}" = set; then
enableval="$enable_dmd"
if test "$enableval" = "yes"; then
MOZ_DMD=1
elif test "$enableval" = "no"; then
MOZ_DMD=
else
{ echo "configure: error: Option, dmd, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$NS_TRACE_MALLOC"; then # trace-malloc disables DMD
MOZ_DMD=
fi
if test "$MOZ_DMD"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_DMD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DMD 1
EOF
if test "${CPU_ARCH}" = "arm"; then
CFLAGS="$CFLAGS -funwind-tables"
CXXFLAGS="$CXXFLAGS -funwind-tables"
fi
fi
# Check whether --enable-jemalloc or --disable-jemalloc was given.
if test "${enable_jemalloc+set}" = set; then
enableval="$enable_jemalloc"
if test "$enableval" = "yes"; then
MOZ_MEMORY=1
elif test "$enableval" = "no"; then
MOZ_MEMORY=
else
{ echo "configure: error: Option, jemalloc, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$NS_TRACE_MALLOC"; then
MOZ_MEMORY=
fi
if test "$MOZ_MEMORY"; then
if test "$OS_ARCH" = "WINNT"; then
if test -z "$HAVE_64BIT_OS"; then
cat >> confdefs.pytmp <<EOF
(''' MOZ_MEMORY_SIZEOF_PTR_2POW ''', r''' 2 ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_MEMORY_SIZEOF_PTR_2POW 2
EOF
else
cat >> confdefs.pytmp <<EOF
(''' MOZ_MEMORY_SIZEOF_PTR_2POW ''', r''' 3 ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_MEMORY_SIZEOF_PTR_2POW 3
EOF
fi
else
echo $ac_n "checking size of int *""... $ac_c" 1>&6
echo "configure:13210: checking size of int *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_int_p=4
else
cat > conftest.$ac_ext <<EOF
#line 13218 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) return(1);
fprintf(f, "%d\n", sizeof(int *));
return(0);
}
EOF
if { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int_p=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_sizeof_int_p=0
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
cat >> confdefs.pytmp <<EOF
(''' SIZEOF_INT_P ''', r''' $ac_cv_sizeof_int_p ''')
EOF
cat >> confdefs.h <<EOF
#define SIZEOF_INT_P $ac_cv_sizeof_int_p
EOF
case "${ac_cv_sizeof_int_p}" in
4)
cat >> confdefs.pytmp <<EOF
(''' MOZ_MEMORY_SIZEOF_PTR_2POW ''', r''' 2 ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_MEMORY_SIZEOF_PTR_2POW 2
EOF
;;
8)
cat >> confdefs.pytmp <<EOF
(''' MOZ_MEMORY_SIZEOF_PTR_2POW ''', r''' 3 ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_MEMORY_SIZEOF_PTR_2POW 3
EOF
;;
*)
{ echo "configure: error: Unexpected pointer size" 1>&2; exit 1; }
;;
esac
fi
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY 1
EOF
if test "x$MOZ_DEBUG" = "x1"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_DEBUG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_DEBUG 1
EOF
fi
case "${target}" in
*-darwin*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_DARWIN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_DARWIN 1
EOF
;;
*-*freebsd*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_BSD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_BSD 1
EOF
;;
*-android*|*-linuxandroid*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_LINUX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_LINUX 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_ANDROID ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_ANDROID 1
EOF
;;
*-*linux*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_LINUX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_LINUX 1
EOF
;;
*-netbsd*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_BSD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_BSD 1
EOF
;;
*-solaris*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_SOLARIS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_SOLARIS 1
EOF
;;
*-mingw*)
cat >> confdefs.pytmp <<\EOF
(''' MOZ_MEMORY_WINDOWS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_WINDOWS 1
EOF
# the interesting bits will get passed down in MOZ_GLUE_LDFLAGS
;;
*)
{ echo "configure: error: --enable-jemalloc not supported on ${target}" 1>&2; exit 1; }
;;
esac
fi
# Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
if test "${enable_wrap_malloc+set}" = set; then
enableval="$enable_wrap_malloc"
if test "$enableval" = "yes"; then
_WRAP_MALLOC=1
elif test "$enableval" = "no"; then
_WRAP_MALLOC=
else
{ echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$_WRAP_MALLOC"; then
if test "$GNU_CC"; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
if test "$OS_TARGET" = "Android"; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=_Znwj,--wrap=_Znaj,--wrap=_ZdlPv,--wrap=_ZdaPv"
fi
else
{ echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
fi
fi
# Check whether --with-wrap-malloc or --without-wrap-malloc was given.
if test "${with_wrap_malloc+set}" = set; then
withval="$with_wrap_malloc"
WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
fi
# Check whether --enable-trace-jscalls or --disable-trace-jscalls was given.
if test "${enable_trace_jscalls+set}" = set; then
enableval="$enable_trace_jscalls"
if test "$enableval" = "yes"; then
MOZ_TRACE_JSCALLS=1
elif test "$enableval" = "no"; then
MOZ_TRACE_JSCALLS=
else
{ echo "configure: error: Option, trace-jscalls, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_TRACE_JSCALLS"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_TRACE_JSCALLS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TRACE_JSCALLS 1
EOF
fi
JSGC_INCREMENTAL=1
# Check whether --enable-gcincremental or --disable-gcincremental was given.
if test "${enable_gcincremental+set}" = set; then
enableval="$enable_gcincremental"
if test "$enableval" = "no"; then
JSGC_INCREMENTAL=
elif test "$enableval" = "yes"; then
:
else
{ echo "configure: error: Option, gcincremental, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JSGC_INCREMENTAL"; then
cat >> confdefs.pytmp <<\EOF
(''' JSGC_INCREMENTAL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JSGC_INCREMENTAL 1
EOF
fi
# Check whether --enable-gcgenerational or --disable-gcgenerational was given.
if test "${enable_gcgenerational+set}" = set; then
enableval="$enable_gcgenerational"
if test "$enableval" = "yes"; then
JSGC_GENERATIONAL=1
elif test "$enableval" = "no"; then
JSGC_GENERATIONAL=
else
{ echo "configure: error: Option, gcgenerational, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JSGC_GENERATIONAL"; then
cat >> confdefs.pytmp <<\EOF
(''' JSGC_GENERATIONAL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JSGC_GENERATIONAL 1
EOF
fi
# Check whether --enable-root-analysis or --disable-root-analysis was given.
if test "${enable_root_analysis+set}" = set; then
enableval="$enable_root_analysis"
if test "$enableval" = "yes"; then
JSGC_ROOT_ANALYSIS=1
elif test "$enableval" = "no"; then
JSGC_ROOT_ANALYSIS=
else
{ echo "configure: error: Option, root-analysis, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JSGC_ROOT_ANALYSIS"; then
cat >> confdefs.pytmp <<\EOF
(''' JSGC_ROOT_ANALYSIS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JSGC_ROOT_ANALYSIS 1
EOF
fi
# Check whether --enable-exact-rooting or --disable-exact-rooting was given.
if test "${enable_exact_rooting+set}" = set; then
enableval="$enable_exact_rooting"
if test "$enableval" = "yes"; then
JSGC_USE_EXACT_ROOTING=1
elif test "$enableval" = "no"; then
JSGC_USE_EXACT_ROOTING=
else
{ echo "configure: error: Option, exact-rooting, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JSGC_USE_EXACT_ROOTING"; then
cat >> confdefs.pytmp <<\EOF
(''' JSGC_USE_EXACT_ROOTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JSGC_USE_EXACT_ROOTING 1
EOF
fi
# Check whether --enable-valgrind or --disable-valgrind was given.
if test "${enable_valgrind+set}" = set; then
enableval="$enable_valgrind"
if test "$enableval" = "yes"; then
MOZ_VALGRIND=1
elif test "$enableval" = "no"; then
MOZ_VALGRIND=
else
{ echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_VALGRIND"; then
ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6
echo "configure:13533: checking for valgrind/valgrind.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 13538 "configure"
#include "confdefs.h"
#include <valgrind/valgrind.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:13546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; exit 1; }
fi
cat >> confdefs.pytmp <<\EOF
(''' MOZ_VALGRIND ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VALGRIND 1
EOF
MOZ_VALGRIND=1
fi
# Check whether --enable-jprof or --disable-jprof was given.
if test "${enable_jprof+set}" = set; then
enableval="$enable_jprof"
if test "$enableval" = "yes"; then
MOZ_JPROF=1
elif test "$enableval" = "no"; then
MOZ_JPROF=
else
{ echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_JPROF"; then
MOZ_PROFILING=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_JPROF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_JPROF 1
EOF
fi
# Check whether --enable-shark or --disable-shark was given.
if test "${enable_shark+set}" = set; then
enableval="$enable_shark"
if test "$enableval" = "yes"; then
MOZ_SHARK=1
elif test "$enableval" = "no"; then
MOZ_SHARK=
else
{ echo "configure: error: Option, shark, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_SHARK"; then
MOZ_PROFILING=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_SHARK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SHARK 1
EOF
fi
# Check whether --enable-instruments or --disable-instruments was given.
if test "${enable_instruments+set}" = set; then
enableval="$enable_instruments"
if test "$enableval" = "yes"; then
MOZ_INSTRUMENTS=1
elif test "$enableval" = "no"; then
MOZ_INSTRUMENTS=
else
{ echo "configure: error: Option, instruments, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_INSTRUMENTS"; then
MOZ_PROFILING=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_INSTRUMENTS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_INSTRUMENTS 1
EOF
LIBS="$LIBS -framework CoreFoundation"
fi
# Check whether --enable-callgrind or --disable-callgrind was given.
if test "${enable_callgrind+set}" = set; then
enableval="$enable_callgrind"
if test "$enableval" = "yes"; then
MOZ_CALLGRIND=1
elif test "$enableval" = "no"; then
MOZ_CALLGRIND=
else
{ echo "configure: error: Option, callgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_CALLGRIND"; then
MOZ_PROFILING=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_CALLGRIND ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CALLGRIND 1
EOF
fi
# Check whether --enable-vtune or --disable-vtune was given.
if test "${enable_vtune+set}" = set; then
enableval="$enable_vtune"
if test "$enableval" = "yes"; then
MOZ_VTUNE=1
elif test "$enableval" = "no"; then
MOZ_VTUNE=
else
{ echo "configure: error: Option, vtune, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$MOZ_VTUNE"; then
if test -z "$VTUNE_AMPLIFIER_XE_2013_DIR"; then
echo "Error: VTUNE_AMPLIFIER_XE_2013_DIR undefined."
exit 1
fi
VTUNE_DIR=`echo "$VTUNE_AMPLIFIER_XE_2013_DIR" | sed 's,\\\,/,g'`
VTUNE_DIR=`echo "$VTUNE_DIR" | sed 's,(,\\\(,g'`
VTUNE_DIR=`echo "$VTUNE_DIR" | sed 's,),\\\),g'`
VTUNE_DIR=`echo "$VTUNE_DIR" | sed 's, ,\\\ ,g'`
VTUNE_LIB=lib32
if test "x86_64" = "$TARGET_CPU"; then
VTUNE_LIB=lib64
fi
VTUNE_LIBRARIES="${VTUNE_DIR}/${VTUNE_LIB}/${LIB_PREFIX}jitprofiling.${LIB_SUFFIX}"
CXXFLAGS="$CXXFLAGS -I${VTUNE_DIR}/include"
MOZ_PROFILING=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_VTUNE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VTUNE 1
EOF
fi
if test -n "$MOZ_DEBUG"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_DEBUG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_DEBUG 1
EOF
fi
if test -n "$MOZ_PROFILING"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_PROFILING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_PROFILING 1
EOF
fi
# Check whether --enable-gczeal or --disable-gczeal was given.
if test "${enable_gczeal+set}" = set; then
enableval="$enable_gczeal"
if test "$enableval" = "yes"; then
JS_GC_ZEAL=1
elif test "$enableval" = "no"; then
JS_GC_ZEAL=
else
{ echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JS_GC_ZEAL" -o -n "$MOZ_DEBUG"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_GC_ZEAL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_GC_ZEAL 1
EOF
fi
# Check whether --enable-perf or --disable-perf was given.
if test "${enable_perf+set}" = set; then
enableval="$enable_perf"
if test "$enableval" = "yes"; then
JS_ION_PERF=1
elif test "$enableval" = "no"; then
JS_ION_PERF=
else
{ echo "configure: error: Option, perf, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JS_ION_PERF"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_ION_PERF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_ION_PERF 1
EOF
fi
# Check whether --enable-js-diagnostics or --disable-js-diagnostics was given.
if test "${enable_js_diagnostics+set}" = set; then
enableval="$enable_js_diagnostics"
if test "$enableval" = "yes"; then
JS_CRASH_DIAGNOSTICS=1
elif test "$enableval" = "no"; then
JS_CRASH_DIAGNOSTICS=
else
{ echo "configure: error: Option, js-diagnostics, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JS_CRASH_DIAGNOSTICS"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_CRASH_DIAGNOSTICS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_CRASH_DIAGNOSTICS 1
EOF
fi
# Check whether --enable-more-deterministic or --disable-more-deterministic was given.
if test "${enable_more_deterministic+set}" = set; then
enableval="$enable_more_deterministic"
if test "$enableval" = "yes"; then
JS_MORE_DETERMINISTIC=1
elif test "$enableval" = "no"; then
JS_MORE_DETERMINISTIC=
else
{ echo "configure: error: Option, more-deterministic, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JS_MORE_DETERMINISTIC"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_MORE_DETERMINISTIC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_MORE_DETERMINISTIC 1
EOF
fi
# Check whether --enable-oom-backtrace or --disable-oom-backtrace was given.
if test "${enable_oom_backtrace+set}" = set; then
enableval="$enable_oom_backtrace"
if test "$enableval" = "yes"; then
JS_OOM_DO_BACKTRACES=1
elif test "$enableval" = "no"; then
JS_OOM_DO_BACKTRACES=
else
{ echo "configure: error: Option, oom-backtrace, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$JS_OOM_DO_BACKTRACES"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_OOM_DO_BACKTRACES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_OOM_DO_BACKTRACES 1
EOF
fi
# Check whether --with-ccache or --without-ccache was given.
if test "${with_ccache+set}" = set; then
withval="$with_ccache"
CCACHE=$withval
else
CCACHE="no"
fi
if test "$CCACHE" != "no"; then
if test -z "$CCACHE" -o "$CCACHE" = "yes"; then
CCACHE=
else
if test ! -e "$CCACHE"; then
{ echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
fi
fi
for ac_prog in $CCACHE ccache
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:13865: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$CCACHE" in
/*)
ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_CCACHE="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
CCACHE="$ac_cv_path_CCACHE"
if test -n "$CCACHE"; then
echo "$ac_t""$CCACHE" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$CCACHE" && break
done
if test "$msyshost"; then
case "$CCACHE" in
/*)
tmp_DIRNAME=`dirname "$CCACHE"`
tmp_BASENAME=`basename "$CCACHE"`
tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
CCACHE="$tmp_PWD/$tmp_BASENAME"
if test -e "$CCACHE.exe"; then
CCACHE="$CCACHE.exe"
fi
esac
fi
if test -z "$CCACHE" -o "$CCACHE" = ":"; then
{ echo "configure: error: ccache not found" 1>&2; exit 1; }
elif test -x "$CCACHE"; then
CC="$CCACHE $CC"
CXX="$CCACHE $CXX"
MOZ_USING_CCACHE=1
else
{ echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
fi
fi
# Check whether --with-compiler_wrapper or --without-compiler_wrapper was given.
if test "${with_compiler_wrapper+set}" = set; then
withval="$with_compiler_wrapper"
COMPILER_WRAPPER=$withval
else
COMPILER_WRAPPER="no"
fi
if test "$COMPILER_WRAPPER" != "no"; then
CC="$COMPILER_WRAPPER $CC"
CXX="$COMPILER_WRAPPER $CXX"
MOZ_USING_COMPILER_WRAPPER=1
fi
# Check whether --with-static-checking or --without-static-checking was given.
if test "${with_static_checking+set}" = set; then
withval="$with_static_checking"
DEHYDRA_PATH=$withval
else
DEHYDRA_PATH=
fi
if test -n "$DEHYDRA_PATH"; then
if test ! -f "$DEHYDRA_PATH"; then
{ echo "configure: error: The dehydra plugin is not at the specified path." 1>&2; exit 1; }
fi
cat >> confdefs.pytmp <<\EOF
(''' NS_STATIC_CHECKING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NS_STATIC_CHECKING 1
EOF
fi
# Check whether --enable-clang-plugin or --disable-clang-plugin was given.
if test "${enable_clang_plugin+set}" = set; then
enableval="$enable_clang_plugin"
if test "$enableval" = "yes"; then
ENABLE_CLANG_PLUGIN=1
elif test "$enableval" = "no"; then
ENABLE_CLANG_PLUGIN=
else
{ echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$ENABLE_CLANG_PLUGIN"; then
if test -z "$CLANG_CC"; then
{ echo "configure: error: Can't use clang plugin without clang." 1>&2; exit 1; }
fi
cat >> confdefs.pytmp <<\EOF
(''' MOZ_CLANG_PLUGIN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CLANG_PLUGIN 1
EOF
fi
# Check whether --with-sixgill or --without-sixgill was given.
if test "${with_sixgill+set}" = set; then
withval="$with_sixgill"
SIXGILL_PATH=$withval
else
SIXGILL_PATH=
fi
if test -n "$SIXGILL_PATH"; then
if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then
{ echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&2; exit 1; }
fi
fi
# Check whether --enable-strip or --disable-strip was given.
if test "${enable_strip+set}" = set; then
enableval="$enable_strip"
if test "$enableval" = "yes"; then
ENABLE_STRIP=1
elif test "$enableval" = "no"; then
ENABLE_STRIP=
else
{ echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
# Check whether --enable-install-strip or --disable-install-strip was given.
if test "${enable_install_strip+set}" = set; then
enableval="$enable_install_strip"
if test "$enableval" = "yes"; then
PKG_SKIP_STRIP=
elif test "$enableval" = "no"; then
PKG_SKIP_STRIP=1
else
{ echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
# Profiling and Instrumenting
if test -z "$SKIP_LIBRARY_CHECKS"; then
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
for ac_func in __cxa_demangle
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14054: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14059 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:14085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
HAVE_DEMANGLE=1
else
echo "$ac_t""no" 1>&6
HAVE_DEMANGLE=
fi
done
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
# Demangle only for debug or trace-malloc or DMD builds
MOZ_DEMANGLE_SYMBOLS=
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
MOZ_DEMANGLE_SYMBOLS=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_DEMANGLE_SYMBOLS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DEMANGLE_SYMBOLS 1
EOF
fi
if test -z "$SKIP_LIBRARY_CHECKS"; then
ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for unwind.h""... $ac_c" 1>&6
echo "configure:14139: checking for unwind.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14144 "configure"
#include "confdefs.h"
#include <unwind.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:14152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
for ac_func in _Unwind_Backtrace
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14169: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14174 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:14197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
else
echo "$ac_t""no" 1>&6
fi
fi
# Check whether --with-jitreport-granularity or --without-jitreport-granularity was given.
if test "${with_jitreport_granularity+set}" = set; then
withval="$with_jitreport_granularity"
JITREPORT_GRANULARITY=$withval
else
JITREPORT_GRANULARITY=3
fi
cat >> confdefs.pytmp <<EOF
(''' JS_DEFAULT_JITREPORT_GRANULARITY ''', r''' $JITREPORT_GRANULARITY ''')
EOF
cat >> confdefs.h <<EOF
#define JS_DEFAULT_JITREPORT_GRANULARITY $JITREPORT_GRANULARITY
EOF
# Misc. Options
# Check whether --enable-xterm-updates or --disable-xterm-updates was given.
if test "${enable_xterm_updates+set}" = set; then
enableval="$enable_xterm_updates"
if test "$enableval" = "yes"; then
MOZ_UPDATE_XTERM=1
elif test "$enableval" = "no"; then
MOZ_UPDATE_XTERM=
else
{ echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -z "$SKIP_COMPILER_CHECKS"; then
# Compiler Options
echo $ac_n "checking for -pipe support""... $ac_c" 1>&6
echo "configure:14268: checking for -pipe support" >&5
if test -n "$GNU_CC" -a -n "$GNU_CXX"; then
CFLAGS="$CFLAGS -pipe"
CXXFLAGS="$CXXFLAGS -pipe"
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
echo "configure:14282: checking whether C compiler supports -fprofile-generate" >&5
cat > conftest.$ac_ext <<EOF
#line 14284 "configure"
#include "confdefs.h"
int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:14291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
PROFILE_GEN_CFLAGS="-fprofile-generate"
result="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
result="no"
fi
rm -f conftest*
echo "$ac_t""$result" 1>&6
if test $result = "yes"; then
PROFILE_GEN_LDFLAGS="-fprofile-generate"
PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
PROFILE_USE_LDFLAGS="-fprofile-use"
fi
CFLAGS="$_SAVE_CFLAGS"
if test -n "$INTEL_CC"; then
PROFILE_GEN_CFLAGS="-prof-gen -prof-dir ."
PROFILE_GEN_LDFLAGS=
PROFILE_USE_CFLAGS="-prof-use -prof-dir ."
PROFILE_USE_LDFLAGS=
fi
if test "$SOLARIS_SUNPRO_CC"; then
PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
fi
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
_SAVE_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}"
echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6
echo "configure:14342: checking for correct overload resolution with const and templates" >&5
if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14347 "configure"
#include "confdefs.h"
template <class T>
class Pointer
{
public:
T* myPtr;
};
template <class T, class U>
int operator==(const Pointer<T>& rhs, U* lhs)
{
return rhs.myPtr == lhs;
}
template <class T, class U>
int operator==(const Pointer<T>& rhs, const U* lhs)
{
return rhs.myPtr == lhs;
}
int main() {
Pointer<int> foo;
const int* bar;
return foo == bar;
; return 0; }
EOF
if { (eval echo configure:14377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_nscap_nonconst_opeq_bug="no"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_nscap_nonconst_opeq_bug="yes"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
CXXFLAGS="$_SAVE_CXXFLAGS"
if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then
cat >> confdefs.pytmp <<\EOF
(''' NSCAP_DONT_PROVIDE_NONCONST_OPEQ ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1
EOF
fi
echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6
echo "configure:14403: checking for tm_zone tm_gmtoff in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14408 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1;
; return 0; }
EOF
if { (eval echo configure:14415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone_tm_gmtoff="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_struct_tm_zone_tm_gmtoff="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6
if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_TM_ZONE_TM_GMTOFF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_TM_ZONE_TM_GMTOFF 1
EOF
fi
fi # ! SKIP_COMPILER_CHECKS
cat >> confdefs.pytmp <<\EOF
(''' CPP_THROW_NEW ''', r''' throw() ''')
EOF
cat >> confdefs.h <<\EOF
#define CPP_THROW_NEW throw()
EOF
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6
echo "configure:14457: checking what kind of list files are supported by the linker" >&5
if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "int main() {return 0;}" > conftest.${ac_ext}
if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:14462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then
echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list
if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:14464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=linkerscript
else
echo "conftest.${OBJ_SUFFIX}" > conftest.list
if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:14468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=filelist
elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:14470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=list
else
EXPAND_LIBS_LIST_STYLE=none
fi
fi
else
{ echo "configure: error: couldn't compile a simple C file" 1>&2; exit 1; }
fi
rm -rf conftest*
fi
echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6
LIBS_DESC_SUFFIX=desc
if test "$GCC_USE_GNU_LD"; then
echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6
echo "configure:14490: checking what kind of ordering can be done with the linker" >&5
if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
> conftest.order
_SAVE_LDFLAGS="$LDFLAGS"
LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order"
cat > conftest.$ac_ext <<EOF
#line 14498 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:14505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
EXPAND_LIBS_ORDER_STYLE=section-ordering-file
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
EXPAND_LIBS_ORDER_STYLE=
fi
rm -f conftest*
LDFLAGS="$_SAVE_LDFLAGS"
if test -z "$EXPAND_LIBS_ORDER_STYLE"; then
if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:14517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
EXPAND_LIBS_ORDER_STYLE=linkerscript
else
EXPAND_LIBS_ORDER_STYLE=none
fi
rm -f ${DLL_PREFIX}conftest${DLL_SUFFIX}
fi
fi
echo "$ac_t""$EXPAND_LIBS_ORDER_STYLE" 1>&6
fi
# Build dependencies
if test "$GNU_CC" -a "$GNU_CXX"; then
_DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp'
elif test "$SOLARIS_SUNPRO_CC"; then
_DEPEND_CFLAGS=
else
if test -z "$_WIN32_MSVC"; then
_USE_CPP_INCLUDE_FLAG=
_DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
_DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
else
echo '#include <stdio.h>' > dummy-hello.c
CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/^\([^:]*:[^:]*:\).*stdio.h$/\1/p'`
if test -z "$CL_INCLUDES_PREFIX"; then
{ echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; exit 1; }
fi
rm -f dummy-hello.c
fi
fi
if test -n "$GNU_CC" -a -z "$CLANG_CC"; then
if test "$GCC_MAJOR_VERSION" -eq "4" -a "$GCC_MINOR_VERSION" -lt "5" ; then
CFLAGS="$CFLAGS -fno-strict-aliasing"
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
fi
fi
# Check whether --enable-readline or --disable-readline was given.
if test "${enable_readline+set}" = set; then
enableval="$enable_readline"
if test "$enableval" = "yes"; then
JS_WANT_READLINE=1
elif test "$enableval" = "no"; then
JS_WANT_READLINE=
else
{ echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
JS_NATIVE_EDITLINE=
EDITLINE_LIBS=
JS_DISABLE_SHELL=
case "$target" in
*-mingw*)
NO_EDITLINE=1
;;
*)
;;
esac
if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then
if test -n "$JS_WANT_READLINE"; then
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
echo "configure:14591: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
#line 14599 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char readline();
int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:14610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
EDITLINE_LIBS="-lreadline"
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: No system readline library found." 1>&2; exit 1; }
fi
else
JS_NATIVE_EDITLINE=1
EDITLINE_LIBS='$(DEPTH)/editline/$(LIB_PREFIX)editline.$(LIB_SUFFIX)'
fi
cat >> confdefs.pytmp <<\EOF
(''' EDITLINE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define EDITLINE 1
EOF
fi
# Standalone module options (Not for building Mozilla)
# Check whether --enable-ctypes or --disable-ctypes was given.
if test "${enable_ctypes+set}" = set; then
enableval="$enable_ctypes"
if test "$enableval" = "yes"; then
JS_HAS_CTYPES=1
elif test "$enableval" = "no"; then
JS_HAS_CTYPES=
else
{ echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test "$JS_HAS_CTYPES"; then
if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then
{ echo "configure: error: \"$AS\" is not a suitable assembler to build js-ctypes. If you are building with MS Visual Studio 8 Express, you may download the MASM 8.0 package, upgrade to Visual Studio 9 Express, or install the Vista SDK. Or do not use --enable-ctypes." 1>&2; exit 1; }
fi
cat >> confdefs.pytmp <<\EOF
(''' JS_HAS_CTYPES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_HAS_CTYPES 1
EOF
fi
if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi
# Check whether --with-qemu-exe or --without-qemu-exe was given.
if test "${with_qemu_exe+set}" = set; then
withval="$with_qemu_exe"
QEMU_EXE=$withval
fi
# Check whether --with-cross-lib or --without-cross-lib was given.
if test "${with_cross_lib+set}" = set; then
withval="$with_cross_lib"
CROSS_LIB=$withval
else
CROSS_LIB=/usr/$target
fi
CFLAGS=`echo \
$_WARNINGS_CFLAGS \
$CFLAGS`
CXXFLAGS=`echo \
$_WARNINGS_CXXFLAGS \
$CXXFLAGS`
COMPILE_CFLAGS=`echo \
$_DEFINES_CFLAGS \
$_DEPEND_CFLAGS \
$COMPILE_CFLAGS`
COMPILE_CXXFLAGS=`echo \
$_DEFINES_CXXFLAGS \
$_DEPEND_CFLAGS \
$COMPILE_CXXFLAGS`
OS_CFLAGS="$CFLAGS"
OS_CXXFLAGS="$CXXFLAGS"
OS_CPPFLAGS="$CPPFLAGS"
OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
OS_LDFLAGS="$LDFLAGS"
OS_LIBS="$LIBS"
cat >> confdefs.pytmp <<EOF
(''' MOZ_DLL_SUFFIX ''', r''' "$DLL_SUFFIX" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
EOF
echo $ac_n "checking for posix_fallocate""... $ac_c" 1>&6
echo "configure:14855: checking for posix_fallocate" >&5
cat > conftest.$ac_ext <<EOF
#line 14857 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE 600
#include <fcntl.h>
int main() {
posix_fallocate(0, 0, 0);
; return 0; }
EOF
if { (eval echo configure:14865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv___posix_fallocate=true
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv___posix_fallocate=false
fi
rm -f conftest*
if test "$ac_cv___posix_fallocate" = true ; then
cat >> confdefs.pytmp <<\EOF
(''' HAVE_POSIX_FALLOCATE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_POSIX_FALLOCATE 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_X11"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $XCFLAGS"
cat > conftest.$ac_ext <<EOF
#line 14894 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
int main() {
Display *dpy = 0;
if ((dpy = XOpenDisplay(NULL)) == NULL) {
fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
exit(1);
}
; return 0; }
EOF
if { (eval echo configure:14912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
{ echo "configure: error: Could not compile basic X program." 1>&2; exit 1; }
fi
rm -f conftest*
CFLAGS="$_SAVE_CFLAGS"
if test -n "$MISSING_X"; then
{ echo "configure: error: Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
fi
fi # MOZ_X11
fi # COMPILE_ENVIRONMENT
if test "$OS_ARCH" = "Darwin"; then
cat >> confdefs.pytmp <<\EOF
(''' XP_MACOSX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define XP_MACOSX 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' XP_UNIX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define XP_UNIX 1
EOF
elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2"; then
cat >> confdefs.pytmp <<\EOF
(''' XP_UNIX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define XP_UNIX 1
EOF
fi
# Check whether --enable-threadsafe or --disable-threadsafe was given.
if test "${enable_threadsafe+set}" = set; then
enableval="$enable_threadsafe"
if test "x$enableval" = "xyes"; then
cat >> confdefs.pytmp <<\EOF
(''' JS_THREADSAFE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_THREADSAFE 1
EOF
fi
fi
if test "$MOZ_DEBUG"; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_REFLOW_PERF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF 1
EOF
cat >> confdefs.pytmp <<\EOF
(''' MOZ_REFLOW_PERF_DSP ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF_DSP 1
EOF
fi
if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK" ; then
cat >> confdefs.pytmp <<\EOF
(''' MOZ_ACCESSIBILITY_ATK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ACCESSIBILITY_ATK 1
EOF
ATK_FULL_VERSION=`$PKG_CONFIG --modversion atk`
ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
ATK_MINOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
ATK_REV_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
cat >> confdefs.pytmp <<EOF
(''' ATK_MAJOR_VERSION ''', r''' $ATK_MAJOR_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ATK_MAJOR_VERSION $ATK_MAJOR_VERSION
EOF
cat >> confdefs.pytmp <<EOF
(''' ATK_MINOR_VERSION ''', r''' $ATK_MINOR_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ATK_MINOR_VERSION $ATK_MINOR_VERSION
EOF
cat >> confdefs.pytmp <<EOF
(''' ATK_REV_VERSION ''', r''' $ATK_REV_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ATK_REV_VERSION $ATK_REV_VERSION
EOF
fi
if test -n "$JS_STANDALONE"; then
ENABLE_INTL_API=
fi
# Check whether --enable-intl-api or --disable-intl-api was given.
if test "${enable_intl_api+set}" = set; then
enableval="$enable_intl_api"
if test "$enableval" = "yes"; then
ENABLE_INTL_API=1
elif test "$enableval" = "no"; then
ENABLE_INTL_API=
else
{ echo "configure: error: Option, intl-api, does not take an argument ($enableval)." 1>&2; exit 1; }
fi
fi
if test -n "$ENABLE_INTL_API"; then
cat >> confdefs.pytmp <<\EOF
(''' ENABLE_INTL_API ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ENABLE_INTL_API 1
EOF
# We build ICU as a static library.
cat >> confdefs.pytmp <<\EOF
(''' U_STATIC_IMPLEMENTATION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define U_STATIC_IMPLEMENTATION 1
EOF
case "$OS_TARGET" in
WINNT)
ICU_LIB_NAMES="icuin icuuc icudt"
;;
Darwin|Linux)
ICU_LIB_NAMES="icui18n icuuc icudata"
;;
*)
{ echo "configure: error: ECMAScript Internationalization API is not yet supported on this platform" 1>&2; exit 1; }
esac
ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
else
ICU_LIB_NAMES=
ICU_LIBS=
fi
cat >> confdefs.pytmp <<\EOF
(''' U_USING_ICU_NAMESPACE ''', r''' 0 ''')
EOF
cat >> confdefs.h <<\EOF
#define U_USING_ICU_NAMESPACE 0
EOF
if test -n "$ENABLE_INTL_API" ; then
# Set ICU compile options
ICU_CPPFLAGS=""
# don't use icu namespace automatically in client code
ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_USING_ICU_NAMESPACE=0"
# don't include obsolete header files
ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
# remove chunks of the library that we don't need (yet)
ICU_CPPFLAGS="$ICU_CPPFLAGS -DUCONFIG_NO_LEGACY_CONVERSION"
ICU_CPPFLAGS="$ICU_CPPFLAGS -DUCONFIG_NO_TRANSLITERATION"
ICU_CPPFLAGS="$ICU_CPPFLAGS -DUCONFIG_NO_REGULAR_EXPRESSIONS"
ICU_CPPFLAGS="$ICU_CPPFLAGS -DUCONFIG_NO_BREAK_ITERATION"
# Set OS dependent options for ICU
case "$OS_TARGET" in
Darwin)
ICU_TARGET=MacOSX
;;
Linux)
ICU_TARGET=Linux
;;
WINNT)
ICU_TARGET=MSYS/MSVC
;;
esac
# To reduce library size, use static linking
ICU_LINK_OPTS="--enable-static --disable-shared"
# Force the ICU static libraries to be position independent code
ICU_CFLAGS="$DSO_PIC_CFLAGS"
ICU_CXXFLAGS="$DSO_PIC_CFLAGS"
ICU_BUILD_OPTS=""
if test -n "$MOZ_DEBUG"; then
ICU_BUILD_OPTS="$ICU_BUILD_OPTS --enable-debug"
fi
if test -z "$MOZ_OPTIMIZE"; then
ICU_BUILD_OPTS="$ICU_BUILD_OPTS --disable-release"
fi
abs_srcdir=`(cd $srcdir; pwd)`
mkdir -p $_objdir/intl/icu
(cd $_objdir/intl/icu; \
CFLAGS="$ICU_CFLAGS" CPPFLAGS="$ICU_CPPFLAGS" CXXFLAGS="$ICU_CXXFLAGS" \
$SHELL $abs_srcdir/../../intl/icu/source/runConfigureICU \
$ICU_BUILD_OPTS \
$ICU_TARGET \
$ICU_LINK_OPTS \
--enable-extras=no --enable-icuio=no --enable-layout=no \
--enable-tests=no --enable-samples=no || exit 1
) || exit 1
fi
for ac_func in setlocale
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15146: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 15151 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:15174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in localeconv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:15204: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 15209 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:15232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.pytmp <<EOF
(''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
WIN_TOP_SRC=
encoding=utf-8
case "$host_os" in
mingw*)
WIN_TOP_SRC=`cd $srcdir; pwd -W`
encoding=mbcs
;;
esac
top_srcdir=$srcdir
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
extra_python_path=${COMM_BUILD:+"'mozilla', "}
cat > $CONFIG_STATUS <<EOF
#!${PYTHON}
# coding=$encoding
import os
topsrcdir = '''${WIN_TOP_SRC:-$srcdir}'''
if not os.path.isabs(topsrcdir):
rel = os.path.join(os.path.dirname(__file__), topsrcdir)
topsrcdir = os.path.normpath(os.path.abspath(rel))
topobjdir = os.path.abspath(os.path.dirname(__file__))
defines = [(name[1:-1], value[1:-1]) for name, value in [
EOF
sed 's/$/,/' confdefs.pytmp >> $CONFIG_STATUS
rm confdefs.pytmp confdefs.h
cat >> $CONFIG_STATUS <<\EOF
] ]
substs = [(name[1:-1], value[1:-1]) for name, value in [
EOF
sed 's/$/,/' >> $CONFIG_STATUS <<EOF
(''' SHELL ''', r''' $SHELL ''')
(''' CFLAGS ''', r''' $CFLAGS ''')
(''' CPPFLAGS ''', r''' $CPPFLAGS ''')
(''' CXXFLAGS ''', r''' $CXXFLAGS ''')
(''' FFLAGS ''', r''' $FFLAGS ''')
(''' DEFS ''', r''' $DEFS ''')
(''' LDFLAGS ''', r''' $LDFLAGS ''')
(''' LIBS ''', r''' $LIBS ''')
(''' exec_prefix ''', r''' $exec_prefix ''')
(''' prefix ''', r''' $prefix ''')
(''' program_transform_name ''', r''' $program_transform_name ''')
(''' bindir ''', r''' $bindir ''')
(''' sbindir ''', r''' $sbindir ''')
(''' libexecdir ''', r''' $libexecdir ''')
(''' datadir ''', r''' $datadir ''')
(''' sysconfdir ''', r''' $sysconfdir ''')
(''' sharedstatedir ''', r''' $sharedstatedir ''')
(''' localstatedir ''', r''' $localstatedir ''')
(''' libdir ''', r''' $libdir ''')
(''' includedir ''', r''' $includedir ''')
(''' oldincludedir ''', r''' $oldincludedir ''')
(''' infodir ''', r''' $infodir ''')
(''' mandir ''', r''' $mandir ''')
(''' host ''', r''' $host ''')
(''' host_alias ''', r''' $host_alias ''')
(''' host_cpu ''', r''' $host_cpu ''')
(''' host_vendor ''', r''' $host_vendor ''')
(''' host_os ''', r''' $host_os ''')
(''' target ''', r''' $target ''')
(''' target_alias ''', r''' $target_alias ''')
(''' target_cpu ''', r''' $target_cpu ''')
(''' target_vendor ''', r''' $target_vendor ''')
(''' target_os ''', r''' $target_os ''')
(''' build ''', r''' $build ''')
(''' build_alias ''', r''' $build_alias ''')
(''' build_cpu ''', r''' $build_cpu ''')
(''' build_vendor ''', r''' $build_vendor ''')
(''' build_os ''', r''' $build_os ''')
(''' AWK ''', r''' $AWK ''')
(''' TOP_DIST ''', r''' $TOP_DIST ''')
(''' CC ''', r''' $CC ''')
(''' CXX ''', r''' $CXX ''')
(''' PERL ''', r''' $PERL ''')
(''' JS_SHARED_LIBRARY ''', r''' $JS_SHARED_LIBRARY ''')
(''' JS_STANDALONE ''', r''' $JS_STANDALONE ''')
(''' ANDROID_NDK ''', r''' $ANDROID_NDK ''')
(''' ANDROID_TOOLCHAIN ''', r''' $ANDROID_TOOLCHAIN ''')
(''' ANDROID_PLATFORM ''', r''' $ANDROID_PLATFORM ''')
(''' MOZILLA_SYMBOLVERSION ''', r''' $MOZILLA_SYMBOLVERSION ''')
(''' JS_SHELL_NAME ''', r''' $JS_SHELL_NAME ''')
(''' JS_CONFIG_NAME ''', r''' $JS_CONFIG_NAME ''')
(''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''')
(''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''')
(''' MOZJS_PATCH_VERSION ''', r''' $MOZJS_PATCH_VERSION ''')
(''' MOZJS_ALPHA ''', r''' $MOZJS_ALPHA ''')
(''' HOST_CC ''', r''' $HOST_CC ''')
(''' HOST_CXX ''', r''' $HOST_CXX ''')
(''' HOST_RANLIB ''', r''' $HOST_RANLIB ''')
(''' HOST_AR ''', r''' $HOST_AR ''')
(''' RANLIB ''', r''' $RANLIB ''')
(''' AR ''', r''' $AR ''')
(''' AS ''', r''' $AS ''')
(''' LD ''', r''' $LD ''')
(''' STRIP ''', r''' $STRIP ''')
(''' WINDRES ''', r''' $WINDRES ''')
(''' CLANG_CXX ''', r''' $CLANG_CXX ''')
(''' CPP ''', r''' $CPP ''')
(''' CXXCPP ''', r''' $CXXCPP ''')
(''' SBCONF ''', r''' $SBCONF ''')
(''' QEMU_CANT_RUN_JS_SHELL ''', r''' $QEMU_CANT_RUN_JS_SHELL ''')
(''' _MSC_VER ''', r''' $_MSC_VER ''')
(''' GNU_AS ''', r''' $GNU_AS ''')
(''' GNU_LD ''', r''' $GNU_LD ''')
(''' GNU_CC ''', r''' $GNU_CC ''')
(''' GNU_CXX ''', r''' $GNU_CXX ''')
(''' INTEL_CC ''', r''' $INTEL_CC ''')
(''' INTEL_CXX ''', r''' $INTEL_CXX ''')
(''' INSTALL_PROGRAM ''', r''' $INSTALL_PROGRAM ''')
(''' INSTALL_SCRIPT ''', r''' $INSTALL_SCRIPT ''')
(''' INSTALL_DATA ''', r''' $INSTALL_DATA ''')
(''' LN_S ''', r''' $LN_S ''')
(''' TAR ''', r''' $TAR ''')
(''' PYTHON ''', r''' $PYTHON ''')
(''' NSINSTALL_BIN ''', r''' $NSINSTALL_BIN ''')
(''' DOXYGEN ''', r''' $DOXYGEN ''')
(''' AUTOCONF ''', r''' $AUTOCONF ''')
(''' XARGS ''', r''' $XARGS ''')
(''' UNIVERSAL_BINARY ''', r''' $UNIVERSAL_BINARY ''')
(''' MOZ_CAN_RUN_PROGRAMS ''', r''' $MOZ_CAN_RUN_PROGRAMS ''')
(''' MACOSX_DEPLOYMENT_TARGET ''', r''' $MACOSX_DEPLOYMENT_TARGET ''')
(''' MACOS_SDK_DIR ''', r''' $MACOS_SDK_DIR ''')
(''' NEXT_ROOT ''', r''' $NEXT_ROOT ''')
(''' GMAKE ''', r''' $GMAKE ''')
(''' X_CFLAGS ''', r''' $X_CFLAGS ''')
(''' X_PRE_LIBS ''', r''' $X_PRE_LIBS ''')
(''' X_LIBS ''', r''' $X_LIBS ''')
(''' X_EXTRA_LIBS ''', r''' $X_EXTRA_LIBS ''')
(''' SOLARIS_SUNPRO_CC ''', r''' $SOLARIS_SUNPRO_CC ''')
(''' SOLARIS_SUNPRO_CXX ''', r''' $SOLARIS_SUNPRO_CXX ''')
(''' MOZ_THUMB2 ''', r''' $MOZ_THUMB2 ''')
(''' HAVE_ARM_SIMD ''', r''' $HAVE_ARM_SIMD ''')
(''' HAVE_ARM_NEON ''', r''' $HAVE_ARM_NEON ''')
(''' BUILD_ARM_NEON ''', r''' $BUILD_ARM_NEON ''')
(''' ANDROID_CPU_ARCH ''', r''' $ANDROID_CPU_ARCH ''')
(''' STLPORT_SOURCES ''', r''' $STLPORT_SOURCES ''')
(''' MOZ_ASAN ''', r''' $MOZ_ASAN ''')
(''' HAVE_64BIT_OS ''', r''' $HAVE_64BIT_OS ''')
(''' MOZ_OS2_HIGH_MEMORY ''', r''' $MOZ_OS2_HIGH_MEMORY ''')
(''' AIX_OBJMODEL ''', r''' $AIX_OBJMODEL ''')
(''' NO_LD_ARCHIVE_FLAGS ''', r''' $NO_LD_ARCHIVE_FLAGS ''')
(''' ENABLE_METHODJIT ''', r''' $ENABLE_METHODJIT ''')
(''' ENABLE_METHODJIT_SPEW ''', r''' $ENABLE_METHODJIT_SPEW ''')
(''' ENABLE_ION ''', r''' $ENABLE_ION ''')
(''' ENABLE_YARR_JIT ''', r''' $ENABLE_YARR_JIT ''')
(''' LD_PRINT_ICF_SECTIONS ''', r''' $LD_PRINT_ICF_SECTIONS ''')
(''' WRAP_SYSTEM_INCLUDES ''', r''' $WRAP_SYSTEM_INCLUDES ''')
(''' VISIBILITY_FLAGS ''', r''' $VISIBILITY_FLAGS ''')
(''' HAVE_DTRACE ''', r''' $HAVE_DTRACE ''')
(''' HAVE_LINUX_PERF_EVENT_H ''', r''' $HAVE_LINUX_PERF_EVENT_H ''')
(''' LINUX_HEADERS_INCLUDES ''', r''' $LINUX_HEADERS_INCLUDES ''')
(''' LIBOBJS ''', r''' $LIBOBJS ''')
(''' MOZ_UPDATE_CHANNEL ''', r''' $MOZ_UPDATE_CHANNEL ''')
(''' GRE_MILESTONE ''', r''' $GRE_MILESTONE ''')
(''' NIGHTLY_BUILD ''', r''' $NIGHTLY_BUILD ''')
(''' RELEASE_BUILD ''', r''' $RELEASE_BUILD ''')
(''' NSPR_CFLAGS ''', r''' $NSPR_CFLAGS ''')
(''' NSPR_LIBS ''', r''' $NSPR_LIBS ''')
(''' NSPR_CONFIG ''', r''' $NSPR_CONFIG ''')
(''' NSPR_PKGCONF_CHECK ''', r''' $NSPR_PKGCONF_CHECK ''')
(''' MOZ_ZLIB_CFLAGS ''', r''' $MOZ_ZLIB_CFLAGS ''')
(''' MOZ_ZLIB_LIBS ''', r''' $MOZ_ZLIB_LIBS ''')
(''' MOZ_NATIVE_ZLIB ''', r''' $MOZ_NATIVE_ZLIB ''')
(''' PKG_CONFIG ''', r''' $PKG_CONFIG ''')
(''' MOZ_FFI_CFLAGS ''', r''' $MOZ_FFI_CFLAGS ''')
(''' MOZ_FFI_LIBS ''', r''' $MOZ_FFI_LIBS ''')
(''' MOZ_NATIVE_FFI ''', r''' $MOZ_NATIVE_FFI ''')
(''' MOZ_UI_LOCALE ''', r''' $MOZ_UI_LOCALE ''')
(''' MOZ_OPTIMIZE ''', r''' $MOZ_OPTIMIZE ''')
(''' MOZ_FRAMEPTR_FLAGS ''', r''' $MOZ_FRAMEPTR_FLAGS ''')
(''' MOZ_OPTIMIZE_FLAGS ''', r''' $MOZ_OPTIMIZE_FLAGS ''')
(''' MOZ_OPTIMIZE_LDFLAGS ''', r''' $MOZ_OPTIMIZE_LDFLAGS ''')
(''' MOZ_OPTIMIZE_SIZE_TWEAK ''', r''' $MOZ_OPTIMIZE_SIZE_TWEAK ''')
(''' MOZ_PGO_OPTIMIZE_FLAGS ''', r''' $MOZ_PGO_OPTIMIZE_FLAGS ''')
(''' ENABLE_TRACE_LOGGING ''', r''' $ENABLE_TRACE_LOGGING ''')
(''' FAIL_ON_WARNINGS ''', r''' $FAIL_ON_WARNINGS ''')
(''' NS_TRACE_MALLOC ''', r''' $NS_TRACE_MALLOC ''')
(''' MOZ_MEMORY ''', r''' $MOZ_MEMORY ''')
(''' MOZ_GLUE_LDFLAGS ''', r''' $MOZ_GLUE_LDFLAGS ''')
(''' MOZ_GLUE_PROGRAM_LDFLAGS ''', r''' $MOZ_GLUE_PROGRAM_LDFLAGS ''')
(''' MOZ_VALGRIND ''', r''' $MOZ_VALGRIND ''')
(''' VTUNE_LIBRARIES ''', r''' $VTUNE_LIBRARIES ''')
(''' CCACHE ''', r''' $CCACHE ''')
(''' MOZ_USING_CCACHE ''', r''' $MOZ_USING_CCACHE ''')
(''' MOZ_USING_COMPILER_WRAPPER ''', r''' $MOZ_USING_COMPILER_WRAPPER ''')
(''' DEHYDRA_PATH ''', r''' $DEHYDRA_PATH ''')
(''' ENABLE_CLANG_PLUGIN ''', r''' $ENABLE_CLANG_PLUGIN ''')
(''' SIXGILL_PATH ''', r''' $SIXGILL_PATH ''')
(''' MOZ_DEMANGLE_SYMBOLS ''', r''' $MOZ_DEMANGLE_SYMBOLS ''')
(''' PROFILE_GEN_CFLAGS ''', r''' $PROFILE_GEN_CFLAGS ''')
(''' PROFILE_GEN_LDFLAGS ''', r''' $PROFILE_GEN_LDFLAGS ''')
(''' PROFILE_USE_CFLAGS ''', r''' $PROFILE_USE_CFLAGS ''')
(''' PROFILE_USE_LDFLAGS ''', r''' $PROFILE_USE_LDFLAGS ''')
(''' LIBS_DESC_SUFFIX ''', r''' $LIBS_DESC_SUFFIX ''')
(''' EXPAND_LIBS_LIST_STYLE ''', r''' $EXPAND_LIBS_LIST_STYLE ''')
(''' EXPAND_LIBS_ORDER_STYLE ''', r''' $EXPAND_LIBS_ORDER_STYLE ''')
(''' CL_INCLUDES_PREFIX ''', r''' $CL_INCLUDES_PREFIX ''')
(''' JS_NATIVE_EDITLINE ''', r''' $JS_NATIVE_EDITLINE ''')
(''' JS_DISABLE_SHELL ''', r''' $JS_DISABLE_SHELL ''')
(''' EDITLINE_LIBS ''', r''' $EDITLINE_LIBS ''')
(''' JS_HAS_CTYPES ''', r''' $JS_HAS_CTYPES ''')
(''' QEMU_EXE ''', r''' $QEMU_EXE ''')
(''' CROSS_LIB ''', r''' $CROSS_LIB ''')
(''' AR_FLAGS ''', r''' $AR_FLAGS ''')
(''' AR_LIST ''', r''' $AR_LIST ''')
(''' AR_EXTRACT ''', r''' $AR_EXTRACT ''')
(''' AR_DELETE ''', r''' $AR_DELETE ''')
(''' ASFLAGS ''', r''' $ASFLAGS ''')
(''' AS_DASH_C_FLAG ''', r''' $AS_DASH_C_FLAG ''')
(''' RC ''', r''' $RC ''')
(''' RCFLAGS ''', r''' $RCFLAGS ''')
(''' MC ''', r''' $MC ''')
(''' IMPLIB ''', r''' $IMPLIB ''')
(''' FILTER ''', r''' $FILTER ''')
(''' BIN_FLAGS ''', r''' $BIN_FLAGS ''')
(''' MOZ_DEBUG ''', r''' $MOZ_DEBUG ''')
(''' MOZ_DEBUG_SYMBOLS ''', r''' $MOZ_DEBUG_SYMBOLS ''')
(''' MOZ_DEBUG_ENABLE_DEFS ''', r''' $MOZ_DEBUG_ENABLE_DEFS ''')
(''' MOZ_DEBUG_DISABLE_DEFS ''', r''' $MOZ_DEBUG_DISABLE_DEFS ''')
(''' MOZ_DEBUG_FLAGS ''', r''' $MOZ_DEBUG_FLAGS ''')
(''' MOZ_DEBUG_LDFLAGS ''', r''' $MOZ_DEBUG_LDFLAGS ''')
(''' WARNINGS_AS_ERRORS ''', r''' $WARNINGS_AS_ERRORS ''')
(''' MOZ_JPROF ''', r''' $MOZ_JPROF ''')
(''' MOZ_SHARK ''', r''' $MOZ_SHARK ''')
(''' MOZ_INSTRUMENTS ''', r''' $MOZ_INSTRUMENTS ''')
(''' MOZ_CALLGRIND ''', r''' $MOZ_CALLGRIND ''')
(''' MOZ_VTUNE ''', r''' $MOZ_VTUNE ''')
(''' MOZ_PROFILING ''', r''' $MOZ_PROFILING ''')
(''' LIBICONV ''', r''' $LIBICONV ''')
(''' ENABLE_TESTS ''', r''' $ENABLE_TESTS ''')
(''' ENABLE_STRIP ''', r''' $ENABLE_STRIP ''')
(''' PKG_SKIP_STRIP ''', r''' $PKG_SKIP_STRIP ''')
(''' INCREMENTAL_LINKER ''', r''' $INCREMENTAL_LINKER ''')
(''' MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS ''', r''' $MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS ''')
(''' MOZ_COMPONENT_NSPR_LIBS ''', r''' $MOZ_COMPONENT_NSPR_LIBS ''')
(''' MOZ_FIX_LINK_PATHS ''', r''' $MOZ_FIX_LINK_PATHS ''')
(''' USE_DEPENDENT_LIBS ''', r''' $USE_DEPENDENT_LIBS ''')
(''' MOZ_BUILD_ROOT ''', r''' $MOZ_BUILD_ROOT ''')
(''' MOZ_OS2_TOOLS ''', r''' $MOZ_OS2_TOOLS ''')
(''' MOZ_POST_DSO_LIB_COMMAND ''', r''' $MOZ_POST_DSO_LIB_COMMAND ''')
(''' MOZ_POST_PROGRAM_COMMAND ''', r''' $MOZ_POST_PROGRAM_COMMAND ''')
(''' MOZ_APP_NAME ''', r''' $MOZ_APP_NAME ''')
(''' MOZ_APP_DISPLAYNAME ''', r''' $MOZ_APP_DISPLAYNAME ''')
(''' MOZ_APP_VERSION ''', r''' $MOZ_APP_VERSION ''')
(''' MOZ_PKG_SPECIAL ''', r''' $MOZ_PKG_SPECIAL ''')
(''' MOZILLA_OFFICIAL ''', r''' $MOZILLA_OFFICIAL ''')
(''' MOZ_MAPINFO ''', r''' $MOZ_MAPINFO ''')
(''' MOZ_BROWSE_INFO ''', r''' $MOZ_BROWSE_INFO ''')
(''' MOZ_TOOLS_DIR ''', r''' $MOZ_TOOLS_DIR ''')
(''' MOZ_NATIVE_NSPR ''', r''' $MOZ_NATIVE_NSPR ''')
(''' OS_CFLAGS ''', r''' $OS_CFLAGS ''')
(''' OS_CXXFLAGS ''', r''' $OS_CXXFLAGS ''')
(''' OS_CPPFLAGS ''', r''' $OS_CPPFLAGS ''')
(''' OS_COMPILE_CFLAGS ''', r''' $OS_COMPILE_CFLAGS ''')
(''' OS_COMPILE_CXXFLAGS ''', r''' $OS_COMPILE_CXXFLAGS ''')
(''' OS_LDFLAGS ''', r''' $OS_LDFLAGS ''')
(''' OS_LIBS ''', r''' $OS_LIBS ''')
(''' CROSS_COMPILE ''', r''' $CROSS_COMPILE ''')
(''' MOZ_METRO ''', r''' $MOZ_METRO ''')
(''' HOST_CFLAGS ''', r''' $HOST_CFLAGS ''')
(''' HOST_CXXFLAGS ''', r''' $HOST_CXXFLAGS ''')
(''' HOST_LDFLAGS ''', r''' $HOST_LDFLAGS ''')
(''' HOST_OPTIMIZE_FLAGS ''', r''' $HOST_OPTIMIZE_FLAGS ''')
(''' HOST_AR_FLAGS ''', r''' $HOST_AR_FLAGS ''')
(''' HOST_LD ''', r''' $HOST_LD ''')
(''' HOST_NSPR_MDCPUCFG ''', r''' $HOST_NSPR_MDCPUCFG ''')
(''' HOST_BIN_SUFFIX ''', r''' $HOST_BIN_SUFFIX ''')
(''' HOST_OS_ARCH ''', r''' $HOST_OS_ARCH ''')
(''' TARGET_CPU ''', r''' $TARGET_CPU ''')
(''' TARGET_VENDOR ''', r''' $TARGET_VENDOR ''')
(''' TARGET_OS ''', r''' $TARGET_OS ''')
(''' TARGET_NSPR_MDCPUCFG ''', r''' $TARGET_NSPR_MDCPUCFG ''')
(''' TARGET_MD_ARCH ''', r''' $TARGET_MD_ARCH ''')
(''' TARGET_XPCOM_ABI ''', r''' $TARGET_XPCOM_ABI ''')
(''' OS_TARGET ''', r''' $OS_TARGET ''')
(''' OS_ARCH ''', r''' $OS_ARCH ''')
(''' OS_RELEASE ''', r''' $OS_RELEASE ''')
(''' OS_TEST ''', r''' $OS_TEST ''')
(''' CPU_ARCH ''', r''' $CPU_ARCH ''')
(''' INTEL_ARCHITECTURE ''', r''' $INTEL_ARCHITECTURE ''')
(''' USE_CXX11 ''', r''' $USE_CXX11 ''')
(''' WRAP_LDFLAGS ''', r''' $WRAP_LDFLAGS ''')
(''' MKSHLIB ''', r''' $MKSHLIB ''')
(''' MKCSHLIB ''', r''' $MKCSHLIB ''')
(''' MKSHLIB_FORCE_ALL ''', r''' $MKSHLIB_FORCE_ALL ''')
(''' MKSHLIB_UNFORCE_ALL ''', r''' $MKSHLIB_UNFORCE_ALL ''')
(''' DSO_CFLAGS ''', r''' $DSO_CFLAGS ''')
(''' DSO_PIC_CFLAGS ''', r''' $DSO_PIC_CFLAGS ''')
(''' DSO_LDOPTS ''', r''' $DSO_LDOPTS ''')
(''' LIB_PREFIX ''', r''' $LIB_PREFIX ''')
(''' DLL_PREFIX ''', r''' $DLL_PREFIX ''')
(''' DLL_SUFFIX ''', r''' $DLL_SUFFIX ''')
(''' LIB_SUFFIX ''', r''' $LIB_SUFFIX ''')
(''' OBJ_SUFFIX ''', r''' $OBJ_SUFFIX ''')
(''' BIN_SUFFIX ''', r''' $BIN_SUFFIX ''')
(''' ASM_SUFFIX ''', r''' $ASM_SUFFIX ''')
(''' IMPORT_LIB_SUFFIX ''', r''' $IMPORT_LIB_SUFFIX ''')
(''' USE_N32 ''', r''' $USE_N32 ''')
(''' CC_VERSION ''', r''' $CC_VERSION ''')
(''' CXX_VERSION ''', r''' $CXX_VERSION ''')
(''' MSMANIFEST_TOOL ''', r''' $MSMANIFEST_TOOL ''')
(''' ENABLE_INTL_API ''', r''' $ENABLE_INTL_API ''')
(''' ICU_LIB_NAMES ''', r''' $ICU_LIB_NAMES ''')
(''' ICU_LIBS ''', r''' $ICU_LIBS ''')
(''' MOZILLA_VERSION ''', r''' $MOZILLA_VERSION ''')
(''' ac_configure_args ''', r''' $ac_configure_args ''')
(''' WIN_TOP_SRC ''', r''' $WIN_TOP_SRC ''')
(''' top_srcdir ''', r''' $top_srcdir ''')
EOF
for ac_subst_arg in $_subconfigure_ac_subst_args; do
variable='$'$ac_subst_arg
echo " (''' $ac_subst_arg ''', r''' `eval echo $variable` ''')," >> $CONFIG_STATUS
done
cat >> $CONFIG_STATUS <<\EOF
] ]
files = [
EOF
for out in js-confdefs.h Makefile config/autoconf.mk config/emptyvars.mk; do
echo " '$out'," >> $CONFIG_STATUS
done
cat >> $CONFIG_STATUS <<\EOF
]
headers = [
EOF
HEADERS="js-config.h"
for header in $HEADERS; do
echo " '$header'," >> $CONFIG_STATUS
done
cat >> $CONFIG_STATUS <<\EOF
]
non_global_defines = [
EOF
if test -n "$_NON_GLOBAL_ACDEFINES"; then
for var in $_NON_GLOBAL_ACDEFINES; do
echo " '$var'," >> $CONFIG_STATUS
done
fi
cat >> $CONFIG_STATUS <<EOF
]
__all__ = ['topobjdir', 'topsrcdir', 'defines', 'non_global_defines', 'substs', 'files', 'headers']
if __name__ == '__main__':
args = dict([(name, globals()[name]) for name in __all__])
import sys
sys.path.append(os.path.join(topsrcdir, ${extra_python_path}'build'))
from ConfigStatus import config_status
config_status(**args)
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${PYTHON} $CONFIG_STATUS || exit 1
# Produce the js-config script at configure time; see the comments for
# 'js*-config' in Makefile.in.
echo "$ac_t""invoking $MAKE to create $JS_CONFIG_NAME script" 1>&6
$MAKE $JS_CONFIG_NAME
# Build jsctypes if it's enabled.
if test "$JS_HAS_CTYPES" -a -z "$MOZ_NATIVE_FFI"; then
# Run the libffi 'configure' script.
ac_configure_args="--disable-shared --enable-static --disable-raw-api"
if test "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --enable-debug"
fi
if test "$DSO_PIC_CFLAGS"; then
ac_configure_args="$ac_configure_args --with-pic"
fi
if test "$CROSS_COMPILE"; then
case "$target" in
*-android*|*-linuxandroid*)
export AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS CFLAGS LDFLAGS
ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\""
;;
*)
ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
;;
esac
fi
if test "$_MSC_VER"; then
# Use a wrapper script for cl and ml that looks more like gcc.
# autotools can't quite handle an MSVC build environment yet.
LDFLAGS=
CFLAGS=
ac_configure_args="$ac_configure_args LD=link CPP=\"cl -nologo -EP\" SHELL=sh.exe"
case "${target_cpu}" in
x86_64)
# Need target since MSYS tools into mozilla-build may be 32bit
ac_configure_args="$ac_configure_args CC=\"$_topsrcdir/ctypes/libffi/msvcc.sh -m64\" --build=$build --host=$target"
;;
*)
ac_configure_args="$ac_configure_args CC=$_topsrcdir/ctypes/libffi/msvcc.sh"
;;
esac
fi
if test "$SOLARIS_SUNPRO_CC"; then
# Always use gcc for libffi on Solaris
if test ! "$HAVE_64BIT_OS"; then
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m32 LD= LDFLAGS="
else
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m64 LD= LDFLAGS="
fi
fi
if test "$AIX_IBM_XLC"; then
# Always use gcc for libffi on IBM AIX5/AIX6
if test ! "$HAVE_64BIT_OS"; then
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix32"
else
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix64"
fi
fi
if test "$OS_ARCH" = "OS2"; then
ac_configure_args="$ac_configure_args CFLAGS=-Zomf AR=emxomfar"
fi
# Use a separate cache file for libffi, since it does things differently
# from our configure.
mkdir -p $_objdir/ctypes/libffi
old_cache_file=$cache_file
cache_file=$_objdir/ctypes/libffi/config.cache
old_config_files=$CONFIG_FILES
unset CONFIG_FILES
trap '' EXIT
if test "$no_recursion" != yes; then
# Remove --cache-file and --srcdir arguments so they do not pile up.
ac_sub_configure_args=
ac_prev=
for ac_arg in $ac_configure_args; do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case "$ac_arg" in
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
*) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
esac
done
for ac_config_dir in ctypes/libffi; do
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
if test ! -d $srcdir/$ac_config_dir; then
continue
fi
echo configuring in $ac_config_dir
case "$srcdir" in
.) ;;
*)
if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
else
{ echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
fi
;;
esac
ac_popdir=`pwd`
cd $ac_config_dir
# A "../" for each directory in /$ac_config_dir.
ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
case "$srcdir" in
.) # No --srcdir option. We are building in place.
ac_sub_srcdir=$srcdir ;;
/* | ?:/*) # Absolute path.
ac_sub_srcdir=$srcdir/$ac_config_dir ;;
*) # Relative path.
ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
esac
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_sub_srcdir/configure; then
ac_sub_configure=$ac_sub_srcdir/configure
elif test -f $ac_sub_srcdir/configure.in; then
ac_sub_configure=$ac_configure
else
echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
ac_sub_configure=
fi
# The recursion is here.
if test -n "$ac_sub_configure"; then
# Make the cache file name correct relative to the subdirectory.
case "$cache_file" in
/* | ?:/*) ac_sub_cache_file=$cache_file ;;
*) # Relative path.
ac_sub_cache_file="$ac_dots$cache_file" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
# The eval makes quoting arguments work.
if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
then :
else
{ echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
fi
fi
cd $ac_popdir
done
fi
trap '[ "$?" != 0 ] && echo "------ config.log ------" && tail -n 25 config.log' EXIT
cache_file=$old_cache_file
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
CONFIG_FILES=$old_config_files
fi