3 if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then
7 # Guess values for system-dependent variables and create Makefiles.
8 # Generated automatically using autoconf version 2.13
9 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
16 ac_default_prefix=/usr/local
17 # Any additions from configure.in:
19 --with-dist-dir=DIR Use DIR as 'dist' staging area. DIR may be
20 relative to the top of SpiderMonkey build tree,
23 --disable-compile-environment
24 Disable compiler/library checks."
27 Do not create a shared library."
29 --with-android-ndk=DIR
30 location where the Android NDK can be found"
32 --with-android-toolchain=DIR
33 location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0"
35 --with-android-version=VER
36 android platform version, default 5"
38 --with-android-sdk=DIR
39 location where the Android SDK can be found (base directory, e.g. .../android/platforms/android-6)"
41 --with-symbian-sdk=SYMBIAN_SDK_DIR
42 The path to the Symbian SDK"
44 --with-windows-version=WINSDK_TARGETVER
45 Highest Windows version to target using this SDK
46 502: Windows Server 2003
50 --enable-macos-target=VER (default=10.5)
51 Set the minimum MacOS version needed at runtime"
53 --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
55 --with-x use the X Window System"
57 --disable-os2-high-mem Disable high-memory support on OS/2"
59 --enable-profiling Set compile flags necessary for using sampling profilers (e.g. shark, perf)"
61 --disable-windows-mobile-components
62 Disable Windows Mobile specific components from
65 --disable-methodjit Disable method JIT support"
67 --disable-monoic Disable use of MICs by JIT compiler"
69 --disable-polyic Disable use of PICs by JIT compiler"
71 --disable-tracejit Disable tracing JIT support"
73 --enable-methodjit-spew Enable method JIT spew support"
75 --enable-dtrace build with dtrace support if available (default=no)"
77 --with-pthreads Force use of system pthread library with NSPR "
79 --with-system-nspr Use an NSPR that is already built and installed.
80 Use the 'nspr-config' script in the current path,
81 or look for the script in the directories given with
82 --with-nspr-exec-prefix or --with-nspr-prefix.
83 (Those flags are only checked if you specify
86 --with-nspr-cflags=FLAGS
87 Pass FLAGS to CC when building code that uses NSPR.
88 Use this when there's no accurate nspr-config
89 script available. This is the case when building
90 SpiderMonkey as part of the Mozilla tree: the
91 top-level configure script computes NSPR flags
92 that accomodate the quirks of that environment."
94 --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR.
95 See --with-nspr-cflags for more details."
97 --with-nspr-prefix=PFX Prefix where NSPR is installed"
99 --with-nspr-exec-prefix=PFX
100 Exec prefix where NSPR is installed"
102 --with-arm-kuser Use kuser helpers (Linux/ARM only -- requires kernel 2.6.13 or later)"
104 --enable-ui-locale=ab-CD
105 Select the user interface locale (default: en-US)"
107 --disable-tests Do not build test libraries & programs"
109 --enable-thumb2 Enable Thumb2 instruction set (implies ARMv7)"
111 --with-cpu-arch=arch Use specific arm architecture CPU features, default armv7"
113 --enable-debug[=DBG] Enable building with developer debug info
114 (using compiler flags DBG)"
116 --with-debug-label=LABELS
117 Define DEBUG_<value> for each comma-separated
120 --disable-optimize Disable compiler optimization
121 --enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]"
123 --enable-debugger-info-modules
124 Enable/disable debugger info for specific modules"
126 --enable-debug-symbols[=DBG]
127 Enable debugging symbols (using compiler flags DBG)"
129 --disable-warnings-as-errors
130 Disable treating of warnings as errors"
132 --enable-trace-malloc Enable malloc tracing"
134 --enable-jemalloc Replace memory allocator with jemalloc"
136 --enable-wrap-malloc Wrap malloc calls (gnu linker only)"
138 --with-wrap-malloc=DIR Location of malloc wrapper library"
140 --enable-trace-jscalls Enable JS call enter/exit callback (default=no)"
142 --enable-tracevis Enable TraceVis tracing tool (default=no)"
144 --enable-gctimer Enable GC timer (default=no)"
146 --enable-valgrind Enable Valgrind integration hooks (default=no)"
148 --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling."
150 --enable-shark Enable shark remote profiling. Implies --enable-profiling."
152 --enable-callgrind Enable callgrind profiling"
154 --enable-vtune Enable vtune profiling. Implies --enable-profiling."
156 --enable-gczeal Enable zealous GCing"
158 --with-ccache[=path/to/ccache]
159 Enable compiling with ccache"
161 --with-static-checking=path/to/gcc_dehydra.so
162 Enable static checking of code using GCC-dehydra"
164 --enable-strip Enable stripping of libs & executables "
166 --enable-install-strip Enable stripping of libs & executables when packaging "
168 --enable-timeline Enable timeline services "
170 --enable-quantify Enable Quantify support (Windows only) "
172 --enable-xterm-updates Update XTERM titles with current command."
174 --disable-profile-guided-optimization
175 Don't build with PGO even if called via make profiledbuild"
177 --disable-pedantic Issue all warnings demanded by strict ANSI C "
179 --enable-cpp-rtti Enable C++ RTTI "
181 --enable-cpp-exceptions Enable C++ exceptions "
183 --disable-auto-deps Do not automatically generate dependency info"
185 --disable-md Do not use compiler-based dependencies "
187 --enable-static Enable building of internal static libs"
189 --enable-readline Link js shell to system readline library"
191 --enable-ctypes Enable js-ctypes (default=no)"
193 --with-sync-build-files=DIR
194 Check that files in 'config' and 'build' match
195 their originals in 'DIR/config' and 'DIR/build'.
196 This helps keep the SpiderMonkey build machinery
197 in sync with Mozilla's, on which it is based."
199 --enable-threadsafe Enable support for multiple threads."
201 # Initialize some variables set by options.
202 # The variables have the same names as the options, with
203 # dashes changed to underlines.
205 cache_file=./config.cache
214 program_transform_name=s,x,x,
222 bindir='${exec_prefix}/bin'
223 sbindir='${exec_prefix}/sbin'
224 libexecdir='${exec_prefix}/libexec'
225 datadir='${prefix}/share'
226 sysconfdir='${prefix}/etc'
227 sharedstatedir='${prefix}/com'
228 localstatedir='${prefix}/var'
229 libdir='${exec_prefix}/lib'
230 includedir='${prefix}/include'
231 oldincludedir='/usr/include'
232 infodir='${prefix}/info'
233 mandir='${prefix}/man'
235 # Initialize some other variables.
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 # Maximum number of lines to put in a shell here document.
246 # If the previous option needs an argument, assign it.
247 if test -n "$ac_prev"; then
248 eval "$ac_prev=\$ac_option"
254 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
258 # Accept the important Cygnus configure options, so we can diagnose typos.
262 -bindir | --bindir | --bindi | --bind | --bin | --bi)
264 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
265 bindir="$ac_optarg" ;;
267 -build | --build | --buil | --bui | --bu)
269 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
270 build="$ac_optarg" ;;
272 -cache-file | --cache-file | --cache-fil | --cache-fi \
273 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
274 ac_prev=cache_file ;;
275 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
276 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
277 cache_file="$ac_optarg" ;;
279 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
281 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
283 datadir="$ac_optarg" ;;
285 -disable-* | --disable-*)
286 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
287 # Reject names that are not valid shell variable names.
288 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
289 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
291 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
292 eval "enable_${ac_feature}=no" ;;
294 -enable-* | --enable-*)
295 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
296 # Reject names that are not valid shell variable names.
297 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
298 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
300 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
305 eval "enable_${ac_feature}='$ac_optarg'" ;;
307 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
308 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
309 | --exec | --exe | --ex)
310 ac_prev=exec_prefix ;;
311 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
312 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
313 | --exec=* | --exe=* | --ex=*)
314 exec_prefix="$ac_optarg" ;;
316 -gas | --gas | --ga | --g)
317 # Obsolete; use --with-gas.
320 -help | --help | --hel | --he)
321 # Omit some internal or obsolete options to make the list less imposing.
322 # This message is too long to be a string in the A/UX 3.1 sh.
324 Usage: configure [options] [host]
325 Options: [defaults in brackets after descriptions]
327 --cache-file=FILE cache test results in FILE
328 --help print this message
329 --no-create do not create output files
330 --quiet, --silent do not print \`checking...' messages
331 --version print the version of autoconf that created configure
332 Directory and file names:
333 --prefix=PREFIX install architecture-independent files in PREFIX
335 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
337 --bindir=DIR user executables in DIR [EPREFIX/bin]
338 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
339 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
340 --datadir=DIR read-only architecture-independent data in DIR
342 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
343 --sharedstatedir=DIR modifiable architecture-independent data in DIR
345 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
346 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
347 --includedir=DIR C header files in DIR [PREFIX/include]
348 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
349 --infodir=DIR info documentation in DIR [PREFIX/info]
350 --mandir=DIR man documentation in DIR [PREFIX/man]
351 --srcdir=DIR find the sources in DIR [configure dir or ..]
352 --program-prefix=PREFIX prepend PREFIX to installed program names
353 --program-suffix=SUFFIX append SUFFIX to installed program names
354 --program-transform-name=PROGRAM
355 run sed PROGRAM on installed program names
359 --build=BUILD configure for building on BUILD [BUILD=HOST]
360 --host=HOST configure for HOST [guessed]
361 --target=TARGET configure for TARGET [TARGET=HOST]
362 Features and packages:
363 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
364 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
365 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
366 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
367 --x-includes=DIR X include files are in DIR
368 --x-libraries=DIR X library files are in DIR
370 if test -n "$ac_help"; then
371 echo "--enable and --with options recognized:$ac_help"
375 -host | --host | --hos | --ho)
377 -host=* | --host=* | --hos=* | --ho=*)
380 -includedir | --includedir | --includedi | --included | --include \
381 | --includ | --inclu | --incl | --inc)
382 ac_prev=includedir ;;
383 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
384 | --includ=* | --inclu=* | --incl=* | --inc=*)
385 includedir="$ac_optarg" ;;
387 -infodir | --infodir | --infodi | --infod | --info | --inf)
389 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
390 infodir="$ac_optarg" ;;
392 -libdir | --libdir | --libdi | --libd)
394 -libdir=* | --libdir=* | --libdi=* | --libd=*)
395 libdir="$ac_optarg" ;;
397 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
398 | --libexe | --libex | --libe)
399 ac_prev=libexecdir ;;
400 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
401 | --libexe=* | --libex=* | --libe=*)
402 libexecdir="$ac_optarg" ;;
404 -localstatedir | --localstatedir | --localstatedi | --localstated \
405 | --localstate | --localstat | --localsta | --localst \
406 | --locals | --local | --loca | --loc | --lo)
407 ac_prev=localstatedir ;;
408 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
409 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
410 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
411 localstatedir="$ac_optarg" ;;
413 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
415 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
416 mandir="$ac_optarg" ;;
419 # Obsolete; use --without-fp.
422 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
426 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
427 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
430 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
431 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
432 | --oldin | --oldi | --old | --ol | --o)
433 ac_prev=oldincludedir ;;
434 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
435 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
436 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
437 oldincludedir="$ac_optarg" ;;
439 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
441 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
442 prefix="$ac_optarg" ;;
444 -program-prefix | --program-prefix | --program-prefi | --program-pref \
445 | --program-pre | --program-pr | --program-p)
446 ac_prev=program_prefix ;;
447 -program-prefix=* | --program-prefix=* | --program-prefi=* \
448 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
449 program_prefix="$ac_optarg" ;;
451 -program-suffix | --program-suffix | --program-suffi | --program-suff \
452 | --program-suf | --program-su | --program-s)
453 ac_prev=program_suffix ;;
454 -program-suffix=* | --program-suffix=* | --program-suffi=* \
455 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
456 program_suffix="$ac_optarg" ;;
458 -program-transform-name | --program-transform-name \
459 | --program-transform-nam | --program-transform-na \
460 | --program-transform-n | --program-transform- \
461 | --program-transform | --program-transfor \
462 | --program-transfo | --program-transf \
463 | --program-trans | --program-tran \
464 | --progr-tra | --program-tr | --program-t)
465 ac_prev=program_transform_name ;;
466 -program-transform-name=* | --program-transform-name=* \
467 | --program-transform-nam=* | --program-transform-na=* \
468 | --program-transform-n=* | --program-transform-=* \
469 | --program-transform=* | --program-transfor=* \
470 | --program-transfo=* | --program-transf=* \
471 | --program-trans=* | --program-tran=* \
472 | --progr-tra=* | --program-tr=* | --program-t=*)
473 program_transform_name="$ac_optarg" ;;
475 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
476 | -silent | --silent | --silen | --sile | --sil)
479 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
481 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
483 sbindir="$ac_optarg" ;;
485 -sharedstatedir | --sharedstatedir | --sharedstatedi \
486 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
487 | --sharedst | --shareds | --shared | --share | --shar \
489 ac_prev=sharedstatedir ;;
490 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
491 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
492 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
494 sharedstatedir="$ac_optarg" ;;
496 -site | --site | --sit)
498 -site=* | --site=* | --sit=*)
501 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
503 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
504 srcdir="$ac_optarg" ;;
506 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
507 | --syscon | --sysco | --sysc | --sys | --sy)
508 ac_prev=sysconfdir ;;
509 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
510 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
511 sysconfdir="$ac_optarg" ;;
513 -target | --target | --targe | --targ | --tar | --ta | --t)
515 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
516 target="$ac_optarg" ;;
518 -v | -verbose | --verbose | --verbos | --verbo | --verb)
521 -version | --version | --versio | --versi | --vers)
522 echo "configure generated by autoconf version 2.13"
526 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
527 # Reject names that are not valid shell variable names.
528 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
529 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
531 ac_package=`echo $ac_package| sed 's/-/_/g'`
536 eval "with_${ac_package}='$ac_optarg'" ;;
538 -without-* | --without-*)
539 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
540 # Reject names that are not valid shell variable names.
541 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
542 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
544 ac_package=`echo $ac_package| sed 's/-/_/g'`
545 eval "with_${ac_package}=no" ;;
548 # Obsolete; use --with-x.
551 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
552 | --x-incl | --x-inc | --x-in | --x-i)
553 ac_prev=x_includes ;;
554 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
555 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
556 x_includes="$ac_optarg" ;;
558 -x-libraries | --x-libraries | --x-librarie | --x-librari \
559 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
560 ac_prev=x_libraries ;;
561 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
562 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
563 x_libraries="$ac_optarg" ;;
565 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
569 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
570 echo "configure: warning: $ac_option: invalid host type" 1>&2
572 if test "x$nonopt" != xNONE; then
573 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
581 if test -n "$ac_prev"; then
582 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
585 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
587 # File descriptor usage:
590 # 2 errors and warnings
591 # 3 some systems may open it to /dev/tty
592 # 4 used on the Kubota Titan
593 # 6 checking for... messages and results
594 # 5 compiler messages saved in config.log
595 if test "$silent" = yes; then
603 This file contains any messages produced by compilers while
604 running configure, to aid debugging if configure makes a mistake.
607 # Strip out --no-create and --no-recursion so they do not pile up.
608 # Also quote any args containing shell metacharacters.
613 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
614 | --no-cr | --no-c) ;;
615 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
616 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
617 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
618 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
619 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
624 # Only set these to C if already set. These must not be set unconditionally
625 # because not all systems understand e.g. LANG=C (notably SCO).
626 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
627 # Non-C LC_CTYPE values break the ctype check.
628 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
629 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
630 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
631 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
633 # confdefs.h avoids OS command line length limits that DEFS can exceed.
634 rm -rf conftest* confdefs.h
635 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
638 # A filename unique to this package, relative to the directory that
639 # configure is in, which we can look for to find out if srcdir is correct.
640 ac_unique_file=jsapi.h
642 # Find the source files, if location was not specified.
643 if test -z "$srcdir"; then
644 ac_srcdir_defaulted=yes
645 # Try the directory containing this script, then its parent.
647 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
648 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
650 if test ! -r $srcdir/$ac_unique_file; then
654 ac_srcdir_defaulted=no
656 if test ! -r $srcdir/$ac_unique_file; then
657 if test "$ac_srcdir_defaulted" = yes; then
658 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
660 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
663 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
665 # Prefer explicitly selected file to automatically selected ones.
666 if test -z "$CONFIG_SITE"; then
667 if test "x$prefix" != xNONE; then
668 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
670 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
673 for ac_site_file in $CONFIG_SITE; do
674 if test -r "$ac_site_file"; then
675 echo "loading site script $ac_site_file"
680 if test -r "$cache_file"; then
681 echo "loading cache $cache_file"
684 echo "creating cache $cache_file"
689 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
690 ac_cpp='$CPP $CPPFLAGS'
691 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
692 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
693 cross_compiling=$ac_cv_prog_cc_cross
697 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
698 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
699 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
706 ac_n= ac_c='\c' ac_t=
711 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
712 if test -f $ac_dir/install-sh; then
714 ac_install_sh="$ac_aux_dir/install-sh -c"
716 elif test -f $ac_dir/install.sh; then
718 ac_install_sh="$ac_aux_dir/install.sh -c"
722 if test -z "$ac_aux_dir"; then
723 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
725 ac_config_guess=$ac_aux_dir/config.guess
726 ac_config_sub=$ac_aux_dir/config.sub
727 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
731 # Do some error checking and defaulting for the host and target type.
733 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
736 # 1. You are not allowed to specify --host, --target, and nonopt at the
738 # 2. Host defaults to nonopt.
739 # 3. If nonopt is not specified, then host defaults to the current host,
740 # as determined by config.guess.
741 # 4. Target and build default to nonopt.
742 # 5. If nonopt is not specified, then target and build default to host.
744 # The aliases save the names the user supplied, while $host etc.
745 # will get canonicalized.
746 case $host---$target---$nonopt in
747 NONE---*---* | *---NONE---* | *---*---NONE) ;;
748 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
752 # Make sure we can run config.sub.
753 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
754 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
757 echo $ac_n "checking host system type""... $ac_c" 1>&6
758 echo "configure:759: checking host system type" >&5
761 case "$host_alias" in
765 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
766 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
768 *) host_alias=$nonopt ;;
772 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
773 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
774 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
775 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
776 echo "$ac_t""$host" 1>&6
778 echo $ac_n "checking target system type""... $ac_c" 1>&6
779 echo "configure:780: checking target system type" >&5
782 case "$target_alias" in
785 NONE) target_alias=$host_alias ;;
786 *) target_alias=$nonopt ;;
790 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
791 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
792 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
793 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
794 echo "$ac_t""$target" 1>&6
796 echo $ac_n "checking build system type""... $ac_c" 1>&6
797 echo "configure:798: checking build system type" >&5
800 case "$build_alias" in
803 NONE) build_alias=$host_alias ;;
804 *) build_alias=$nonopt ;;
808 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
809 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
810 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
811 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
812 echo "$ac_t""$build" 1>&6
814 test "$host_alias" != "$target_alias" &&
815 test "$program_prefix$program_suffix$program_transform_name" = \
817 program_prefix=${target_alias}-
819 TARGET_CPU="${target_cpu}"
820 TARGET_VENDOR="${target_vendor}"
821 TARGET_OS="${target_os}"
824 CPPFLAGS="${CPPFLAGS=}"
825 CXXFLAGS="${CXXFLAGS=}"
826 LDFLAGS="${LDFLAGS=}"
827 HOST_CFLAGS="${HOST_CFLAGS=}"
828 HOST_CXXFLAGS="${HOST_CXXFLAGS=}"
829 HOST_LDFLAGS="${HOST_LDFLAGS=}"
833 _SUBDIR_CFLAGS="$CFLAGS"
834 _SUBDIR_CPPFLAGS="$CPPFLAGS"
835 _SUBDIR_CXXFLAGS="$CXXFLAGS"
836 _SUBDIR_LDFLAGS="$LDFLAGS"
837 _SUBDIR_HOST_CC="$HOST_CC"
838 _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
839 _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
840 _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
841 _SUBDIR_CONFIG_ARGS="$ac_configure_args"
847 WINDRES_VERSION=2.14.90
853 for ac_prog in mawk gawk nawk awk
855 # Extract the first word of "$ac_prog", so it can be a program name with args.
856 set dummy $ac_prog; ac_word=$2
857 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
858 echo "configure:859: checking for $ac_word" >&5
859 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
860 echo $ac_n "(cached) $ac_c" 1>&6
862 if test -n "$AWK"; then
863 ac_cv_prog_AWK="$AWK" # Let the user override the test.
865 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
867 for ac_dir in $ac_dummy; do
868 test -z "$ac_dir" && ac_dir=.
869 if test -f $ac_dir/$ac_word; then
870 ac_cv_prog_AWK="$ac_prog"
877 AWK="$ac_cv_prog_AWK"
878 if test -n "$AWK"; then
879 echo "$ac_t""$AWK" 1>&6
881 echo "$ac_t""no" 1>&6
884 test -n "$AWK" && break
891 _topsrcdir=`cd \`dirname $0\`; pwd`
894 if test "$_topsrcdir" != "$_objdir"
896 # Check for a couple representative files in the source tree
898 for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
899 if test -f $file; then
900 _conflict_files="$_conflict_files $file"
903 if test "$_conflict_files"; then
905 echo "* Your source tree contains these files:"
906 for file in $_conflict_files; do
910 * This indicates that you previously built in the source tree.
911 * A source tree build can confuse the separate objdir build.
913 * To clean up the source tree:
925 # Check whether --with-dist-dir or --without-dist-dir was given.
926 if test "${with_dist_dir+set}" = set; then
927 withval="$with_dist_dir"
935 if test -z "$CROSS_COMPILE"; then
937 *-cygwin*|*-mingw*|*-msvc*|*-mks*)
938 if test -z "$CC"; then CC=cl; fi
939 if test -z "$CXX"; then CXX=cl; fi
940 if test -z "$CPP"; then CPP="cl -E -nologo"; fi
941 if test -z "$CXXCPP"; then CXXCPP="cl -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
942 if test -z "$LD"; then LD=link; fi
943 if test -z "$AS"; then
944 case "${target_cpu}" in
953 if test -z "$MIDL"; then MIDL=midl; fi
956 if test -z "$CC"; then CC=gcc-4.2; fi
957 if test -z "$CXX"; then CXX=g++-4.2; fi
962 COMPILE_ENVIRONMENT=1
963 # Check whether --enable-compile-environment or --disable-compile-environment was given.
964 if test "${enable_compile_environment+set}" = set; then
965 enableval="$enable_compile_environment"
966 if test "$enableval" = "no"; then
968 elif test "$enableval" = "yes"; then
971 { echo "configure: error: Option, compile-environment, does not take an argument ($enableval)." 1>&2; exit 1; }
977 for ac_prog in $PERL perl5 perl
979 # Extract the first word of "$ac_prog", so it can be a program name with args.
980 set dummy $ac_prog; ac_word=$2
981 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
982 echo "configure:983: checking for $ac_word" >&5
983 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
984 echo $ac_n "(cached) $ac_c" 1>&6
988 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
991 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
994 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
996 for ac_dir in $ac_dummy; do
997 test -z "$ac_dir" && ac_dir=.
998 if test -f $ac_dir/$ac_word; then
999 ac_cv_path_PERL="$ac_dir/$ac_word"
1007 PERL="$ac_cv_path_PERL"
1008 if test -n "$PERL"; then
1009 echo "$ac_t""$PERL" 1>&6
1011 echo "$ac_t""no" 1>&6
1014 test -n "$PERL" && break
1017 if test "$msyshost"; then
1020 tmp_DIRNAME=`dirname "$PERL"`
1021 tmp_BASENAME=`basename "$PERL"`
1022 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
1023 PERL="$tmp_PWD/$tmp_BASENAME"
1024 if test -e "$PERL.exe"; then
1030 if test -z "$PERL" -o "$PERL" = ":"; then
1031 { echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
1034 # Check whether --enable-shared-js or --disable-shared-js was given.
1035 if test "${enable_shared_js+set}" = set; then
1036 enableval="$enable_shared_js"
1037 if test "$enableval" = "yes"; then
1039 elif test "$enableval" = "no"; then
1042 { echo "configure: error: Option, shared-js, does not take an argument ($enableval)." 1>&2; exit 1; }
1047 if test "$DISABLE_SHARED_JS" = "1" ; then
1048 cat >> confdefs.h <<\EOF
1049 #define STATIC_EXPORTABLE_JS_API 1
1058 # Check whether --with-android-ndk or --without-android-ndk was given.
1059 if test "${with_android_ndk+set}" = set; then
1060 withval="$with_android_ndk"
1061 android_ndk=$withval
1065 # Check whether --with-android-toolchain or --without-android-toolchain was given.
1066 if test "${with_android_toolchain+set}" = set; then
1067 withval="$with_android_toolchain"
1068 android_toolchain=$withval
1073 # Check whether --with-android-version or --without-android-version was given.
1074 if test "${with_android_version+set}" = set; then
1075 withval="$with_android_version"
1076 android_version=$withval
1082 # Check whether --with-android-sdk or --without-android-sdk was given.
1083 if test "${with_android_sdk+set}" = set; then
1084 withval="$with_android_sdk"
1085 android_sdk=$withval
1089 if test "$target" = "arm-android-eabi" ; then
1090 if test -z "$android_ndk" ; then
1091 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
1094 if test -z "$android_sdk" ; then
1095 { echo "configure: error: You must specify --with-android-sdk=/path/to/sdk when targeting Android." 1>&2; exit 1; }
1098 android_platform_tools="$android_sdk"/../../platform-tools
1099 if test ! -d "$android_platform_tools" ; then
1100 android_platform_tools="$android_sdk"/tools # SDK Tools < r8
1103 if test -z "$android_toolchain" ; then
1104 android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[:upper:]" "[:lower:]"`-x86/arm-eabi-4.4.0
1107 if test -z "$android_platform" ; then
1108 android_platform="$android_ndk"/build/platforms/android-"$android_version"/arch-"$target_cpu"
1111 AS="$android_toolchain"/bin/arm-eabi-as
1112 CC="$android_toolchain"/bin/arm-eabi-gcc
1113 CXX="$android_toolchain"/bin/arm-eabi-g++
1114 CPP="$android_toolchain"/bin/arm-eabi-cpp
1115 LD="$android_toolchain"/bin/arm-eabi-ld
1116 AR="$android_toolchain"/bin/arm-eabi-ar
1117 RANLIB="$android_toolchain"/bin/arm-eabi-ranlib
1118 STRIP="$android_toolchain"/bin/arm-eabi-strip
1120 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
1121 CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
1122 CXXFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CXXFLAGS"
1124 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -llog -Wl,--allow-shlib-undefined $LDFLAGS"
1126 if test -z "$HOST_CPPFLAGS" ; then
1129 if test -z "$HOST_CFLAGS" ; then
1132 if test -z "$HOST_CXXFLAGS" ; then
1135 if test -z "$HOST_LDFLAGS" ; then
1139 ANDROID_NDK="${android_ndk}"
1140 ANDROID_TOOLCHAIN="{android_toolchain}"
1141 ANDROID_PLATFORM="{android_platform}"
1142 ANDROID_SDK="${android_sdk}"
1143 ANDROID_PLATFORM_TOOLS="${android_platform_tools}"
1144 ANDROID_VERSION="${android_version}"
1146 # save these for libffi's subconfigure,
1147 # which doesn't know how to figure this stuff out on its own
1148 ANDROID_CFLAGS="$CFLAGS"
1149 ANDROID_CPPFLAGS="$CPPFLAGS"
1150 ANDROID_LDFLAGS="$LDFLAGS"
1152 cat >> confdefs.h <<\EOF
1156 cat >> confdefs.h <<EOF
1157 #define ANDROID_VERSION $android_version
1162 MOZ_CHROME_FILE_FORMAT=omni
1174 if test "$COMPILE_ENVIRONMENT"; then
1177 # In Mozilla, we use the names $target, $host and $build incorrectly, but are
1178 # too far gone to back out now. See Bug 475488:
1179 # - When we say $target, we mean $host, that is, the system on which
1180 # Mozilla will be run.
1181 # - When we say $host, we mean $build, that is, the system on which Mozilla
1183 # - $target (in its correct usage) is for compilers who generate code for a
1184 # different platform than $host, so it would not be used by Mozilla.
1185 if test "$target" != "$host"; then
1186 echo "cross compiling from $host to $target"
1189 _SAVE_CFLAGS="$CFLAGS"
1190 _SAVE_LDFLAGS="$LDFLAGS"
1192 echo $ac_n "checking for host c compiler""... $ac_c" 1>&6
1193 echo "configure:1194: checking for host c compiler" >&5
1194 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc cl icc
1196 # Extract the first word of "$ac_prog", so it can be a program name with args.
1197 set dummy $ac_prog; ac_word=$2
1198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1199 echo "configure:1200: checking for $ac_word" >&5
1200 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1201 echo $ac_n "(cached) $ac_c" 1>&6
1203 if test -n "$HOST_CC"; then
1204 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1208 for ac_dir in $ac_dummy; do
1209 test -z "$ac_dir" && ac_dir=.
1210 if test -f $ac_dir/$ac_word; then
1211 ac_cv_prog_HOST_CC="$ac_prog"
1218 HOST_CC="$ac_cv_prog_HOST_CC"
1219 if test -n "$HOST_CC"; then
1220 echo "$ac_t""$HOST_CC" 1>&6
1222 echo "$ac_t""no" 1>&6
1225 test -n "$HOST_CC" && break
1227 test -n "$HOST_CC" || HOST_CC=""""
1229 if test -z "$HOST_CC"; then
1230 { echo "configure: error: no acceptable c compiler found in \$PATH" 1>&2; exit 1; }
1232 echo "$ac_t""$HOST_CC" 1>&6
1233 echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6
1234 echo "configure:1235: checking for host c++ compiler" >&5
1235 for ac_prog in $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc
1237 # Extract the first word of "$ac_prog", so it can be a program name with args.
1238 set dummy $ac_prog; ac_word=$2
1239 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1240 echo "configure:1241: checking for $ac_word" >&5
1241 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then
1242 echo $ac_n "(cached) $ac_c" 1>&6
1244 if test -n "$HOST_CXX"; then
1245 ac_cv_prog_HOST_CXX="$HOST_CXX" # Let the user override the test.
1247 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1249 for ac_dir in $ac_dummy; do
1250 test -z "$ac_dir" && ac_dir=.
1251 if test -f $ac_dir/$ac_word; then
1252 ac_cv_prog_HOST_CXX="$ac_prog"
1259 HOST_CXX="$ac_cv_prog_HOST_CXX"
1260 if test -n "$HOST_CXX"; then
1261 echo "$ac_t""$HOST_CXX" 1>&6
1263 echo "$ac_t""no" 1>&6
1266 test -n "$HOST_CXX" && break
1268 test -n "$HOST_CXX" || HOST_CXX=""""
1270 if test -z "$HOST_CXX"; then
1271 { echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&2; exit 1; }
1273 echo "$ac_t""$HOST_CXX" 1>&6
1275 if test -z "$HOST_CFLAGS"; then
1276 HOST_CFLAGS="$CFLAGS"
1278 if test -z "$HOST_CXXFLAGS"; then
1279 HOST_CXXFLAGS="$CXXFLAGS"
1281 if test -z "$HOST_LDFLAGS"; then
1282 HOST_LDFLAGS="$LDFLAGS"
1284 if test -z "$HOST_AR_FLAGS"; then
1285 HOST_AR_FLAGS="$AR_FLAGS"
1287 for ac_prog in $HOST_RANLIB ranlib
1289 # Extract the first word of "$ac_prog", so it can be a program name with args.
1290 set dummy $ac_prog; ac_word=$2
1291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1292 echo "configure:1293: checking for $ac_word" >&5
1293 if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1296 if test -n "$HOST_RANLIB"; then
1297 ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test.
1299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1301 for ac_dir in $ac_dummy; do
1302 test -z "$ac_dir" && ac_dir=.
1303 if test -f $ac_dir/$ac_word; then
1304 ac_cv_prog_HOST_RANLIB="$ac_prog"
1311 HOST_RANLIB="$ac_cv_prog_HOST_RANLIB"
1312 if test -n "$HOST_RANLIB"; then
1313 echo "$ac_t""$HOST_RANLIB" 1>&6
1315 echo "$ac_t""no" 1>&6
1318 test -n "$HOST_RANLIB" && break
1320 test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib"
1322 for ac_prog in $HOST_AR ar
1324 # Extract the first word of "$ac_prog", so it can be a program name with args.
1325 set dummy $ac_prog; ac_word=$2
1326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1327 echo "configure:1328: checking for $ac_word" >&5
1328 if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then
1329 echo $ac_n "(cached) $ac_c" 1>&6
1331 if test -n "$HOST_AR"; then
1332 ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test.
1334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1336 for ac_dir in $ac_dummy; do
1337 test -z "$ac_dir" && ac_dir=.
1338 if test -f $ac_dir/$ac_word; then
1339 ac_cv_prog_HOST_AR="$ac_prog"
1346 HOST_AR="$ac_cv_prog_HOST_AR"
1347 if test -n "$HOST_AR"; then
1348 echo "$ac_t""$HOST_AR" 1>&6
1350 echo "$ac_t""no" 1>&6
1353 test -n "$HOST_AR" && break
1355 test -n "$HOST_AR" || HOST_AR="ar"
1358 CFLAGS="$HOST_CFLAGS"
1359 LDFLAGS="$HOST_LDFLAGS"
1361 echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1362 echo "configure:1363: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1363 cat > conftest.$ac_ext <<EOF
1364 #line 1365 "configure"
1365 #include "confdefs.h"
1371 if { (eval echo configure:1372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1373 ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6
1375 echo "configure: failed program was:" >&5
1376 cat conftest.$ac_ext >&5
1378 { echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1383 CFLAGS="$HOST_CXXFLAGS"
1385 echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1386 echo "configure:1387: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
1387 cat > conftest.$ac_ext <<EOF
1388 #line 1389 "configure"
1389 #include "confdefs.h"
1395 if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1397 ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6
1399 echo "configure: failed program was:" >&5
1400 cat conftest.$ac_ext >&5
1402 { echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&2; exit 1; }
1407 CFLAGS=$_SAVE_CFLAGS
1408 LDFLAGS=$_SAVE_LDFLAGS
1410 case "$build:$target" in
1411 powerpc-apple-darwin8*:i?86-apple-darwin*)
1412 _SAVE_CFLAGS=$CFLAGS
1413 _SAVE_CXXFLAGS=$CXXLAGS
1414 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk $CFLAGS"
1415 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk $CXXFLAGS"
1421 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
1422 if test "${with_symbian_sdk+set}" = set; then
1423 withval="$with_symbian_sdk"
1424 SYMBIAN_SDK_DIR=$withval
1428 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
1429 CFLAGS="-MD -nostdinc"
1430 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
1435 CC=arm-none-symbianelf-gcc.exe
1436 CXX=arm-none-symbianelf-g++.exe
1437 LD=arm-none-symbianelf-ld.exe
1438 AR=arm-none-symbianelf-ar.exe
1439 CPP=arm-none-symbianelf-cpp.exe
1440 CFLAGS="$CFLAGS -c -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -msoft-float"
1441 CXXFLAGS="$CFLAGS -Wno-ctor-dtor-privacy"
1442 GCCE_INCLUDE="-include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
1443 CFLAGS="$CFLAGS ${GCCE_INCLUDE} -x c"
1444 CXXFLAGS="$CXXFLAGS ${GCCE_INCLUDE} -x c++"
1445 CPPFLAGS="$CPPFLAGS ${SYMBIAN_SYS_INCLUDE}"
1454 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1456 # Extract the first word of "$ac_prog", so it can be a program name with args.
1457 set dummy $ac_prog; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1463 if test -n "$CC"; then
1464 ac_cv_prog_CC="$CC" # Let the user override the test.
1466 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1468 for ac_dir in $ac_dummy; do
1469 test -z "$ac_dir" && ac_dir=.
1470 if test -f $ac_dir/$ac_word; then
1471 ac_cv_prog_CC="$ac_prog"
1479 if test -n "$CC"; then
1480 echo "$ac_t""$CC" 1>&6
1482 echo "$ac_t""no" 1>&6
1485 test -n "$CC" && break
1487 test -n "$CC" || CC=":"
1490 # Extract the first word of "gcc", so it can be a program name with args.
1491 set dummy gcc; ac_word=$2
1492 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1493 echo "configure:1494: checking for $ac_word" >&5
1494 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1495 echo $ac_n "(cached) $ac_c" 1>&6
1497 if test -n "$CC"; then
1498 ac_cv_prog_CC="$CC" # Let the user override the test.
1500 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1502 for ac_dir in $ac_dummy; do
1503 test -z "$ac_dir" && ac_dir=.
1504 if test -f $ac_dir/$ac_word; then
1513 if test -n "$CC"; then
1514 echo "$ac_t""$CC" 1>&6
1516 echo "$ac_t""no" 1>&6
1519 if test -z "$CC"; then
1520 # Extract the first word of "cc", so it can be a program name with args.
1521 set dummy cc; ac_word=$2
1522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1523 echo "configure:1524: checking for $ac_word" >&5
1524 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1527 if test -n "$CC"; then
1528 ac_cv_prog_CC="$CC" # Let the user override the test.
1530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1533 for ac_dir in $ac_dummy; do
1534 test -z "$ac_dir" && ac_dir=.
1535 if test -f $ac_dir/$ac_word; then
1536 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1537 ac_prog_rejected=yes
1545 if test $ac_prog_rejected = yes; then
1546 # We found a bogon in the path, so make sure we never use it.
1547 set dummy $ac_cv_prog_CC
1549 if test $# -gt 0; then
1550 # We chose a different compiler from the bogus one.
1551 # However, it has the same basename, so the bogon will be chosen
1552 # first if we set CC to just the basename; use the full file name.
1554 set dummy "$ac_dir/$ac_word" "$@"
1562 if test -n "$CC"; then
1563 echo "$ac_t""$CC" 1>&6
1565 echo "$ac_t""no" 1>&6
1568 if test -z "$CC"; then
1569 case "`uname -s`" in
1571 # Extract the first word of "cl", so it can be a program name with args.
1572 set dummy cl; ac_word=$2
1573 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1574 echo "configure:1575: checking for $ac_word" >&5
1575 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1576 echo $ac_n "(cached) $ac_c" 1>&6
1578 if test -n "$CC"; then
1579 ac_cv_prog_CC="$CC" # Let the user override the test.
1581 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1583 for ac_dir in $ac_dummy; do
1584 test -z "$ac_dir" && ac_dir=.
1585 if test -f $ac_dir/$ac_word; then
1594 if test -n "$CC"; then
1595 echo "$ac_t""$CC" 1>&6
1597 echo "$ac_t""no" 1>&6
1602 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1605 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1606 echo "configure:1607: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1609 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1610 ac_cpp='$CPP $CPPFLAGS'
1611 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1612 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1613 cross_compiling=$ac_cv_prog_cc_cross
1615 cat > conftest.$ac_ext << EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1622 if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1623 ac_cv_prog_cc_works=yes
1624 # If we can't run a trivial program, we are probably using a cross compiler.
1625 if (./conftest; exit) 2>/dev/null; then
1626 ac_cv_prog_cc_cross=no
1628 ac_cv_prog_cc_cross=yes
1631 echo "configure: failed program was:" >&5
1632 cat conftest.$ac_ext >&5
1633 ac_cv_prog_cc_works=no
1637 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1638 ac_cpp='$CPP $CPPFLAGS'
1639 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1640 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1641 cross_compiling=$ac_cv_prog_cc_cross
1643 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1644 if test $ac_cv_prog_cc_works = no; then
1645 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1647 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1648 echo "configure:1649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1649 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1650 cross_compiling=$ac_cv_prog_cc_cross
1652 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1653 echo "configure:1654: checking whether we are using GNU C" >&5
1654 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1655 echo $ac_n "(cached) $ac_c" 1>&6
1657 cat > conftest.c <<EOF
1662 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1669 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1671 if test $ac_cv_prog_gcc = yes; then
1677 ac_test_CFLAGS="${CFLAGS+set}"
1678 ac_save_CFLAGS="$CFLAGS"
1680 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1681 echo "configure:1682: checking whether ${CC-cc} accepts -g" >&5
1682 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1683 echo $ac_n "(cached) $ac_c" 1>&6
1685 echo 'void f(){}' > conftest.c
1686 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1695 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1696 if test "$ac_test_CFLAGS" = set; then
1697 CFLAGS="$ac_save_CFLAGS"
1698 elif test $ac_cv_prog_cc_g = yes; then
1699 if test "$GCC" = yes; then
1705 if test "$GCC" = yes; then
1712 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1714 # Extract the first word of "$ac_prog", so it can be a program name with args.
1715 set dummy $ac_prog; ac_word=$2
1716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1717 echo "configure:1718: checking for $ac_word" >&5
1718 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1719 echo $ac_n "(cached) $ac_c" 1>&6
1721 if test -n "$CXX"; then
1722 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1726 for ac_dir in $ac_dummy; do
1727 test -z "$ac_dir" && ac_dir=.
1728 if test -f $ac_dir/$ac_word; then
1729 ac_cv_prog_CXX="$ac_prog"
1736 CXX="$ac_cv_prog_CXX"
1737 if test -n "$CXX"; then
1738 echo "$ac_t""$CXX" 1>&6
1740 echo "$ac_t""no" 1>&6
1743 test -n "$CXX" && break
1745 test -n "$CXX" || CXX=":"
1747 unset ac_cv_prog_CXX
1748 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1750 # Extract the first word of "$ac_prog", so it can be a program name with args.
1751 set dummy $ac_prog; ac_word=$2
1752 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1753 echo "configure:1754: checking for $ac_word" >&5
1754 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1755 echo $ac_n "(cached) $ac_c" 1>&6
1757 if test -n "$CXX"; then
1758 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1760 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1762 for ac_dir in $ac_dummy; do
1763 test -z "$ac_dir" && ac_dir=.
1764 if test -f $ac_dir/$ac_word; then
1765 ac_cv_prog_CXX="$ac_prog"
1772 CXX="$ac_cv_prog_CXX"
1773 if test -n "$CXX"; then
1774 echo "$ac_t""$CXX" 1>&6
1776 echo "$ac_t""no" 1>&6
1779 test -n "$CXX" && break
1781 test -n "$CXX" || CXX="gcc"
1784 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1785 echo "configure:1786: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1788 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1789 ac_cpp='$CXXCPP $CPPFLAGS'
1790 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1791 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1792 cross_compiling=$ac_cv_prog_cxx_cross
1794 cat > conftest.$ac_ext << EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1799 int main(){return(0);}
1801 if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1802 ac_cv_prog_cxx_works=yes
1803 # If we can't run a trivial program, we are probably using a cross compiler.
1804 if (./conftest; exit) 2>/dev/null; then
1805 ac_cv_prog_cxx_cross=no
1807 ac_cv_prog_cxx_cross=yes
1810 echo "configure: failed program was:" >&5
1811 cat conftest.$ac_ext >&5
1812 ac_cv_prog_cxx_works=no
1816 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1817 ac_cpp='$CPP $CPPFLAGS'
1818 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1819 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1820 cross_compiling=$ac_cv_prog_cc_cross
1822 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1823 if test $ac_cv_prog_cxx_works = no; then
1824 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1826 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1827 echo "configure:1828: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1828 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1829 cross_compiling=$ac_cv_prog_cxx_cross
1831 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1832 echo "configure:1833: checking whether we are using GNU C++" >&5
1833 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1834 echo $ac_n "(cached) $ac_c" 1>&6
1836 cat > conftest.C <<EOF
1841 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1848 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1850 if test $ac_cv_prog_gxx = yes; then
1856 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1857 ac_save_CXXFLAGS="$CXXFLAGS"
1859 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1860 echo "configure:1861: checking whether ${CXX-g++} accepts -g" >&5
1861 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1864 echo 'void f(){}' > conftest.cc
1865 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1866 ac_cv_prog_cxx_g=yes
1874 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1875 if test "$ac_test_CXXFLAGS" = set; then
1876 CXXFLAGS="$ac_save_CXXFLAGS"
1877 elif test $ac_cv_prog_cxx_g = yes; then
1878 if test "$GXX" = yes; then
1884 if test "$GXX" = yes; then
1892 case "$build:$target" in
1893 powerpc-apple-darwin8*:i?86-apple-darwin*)
1894 CFLAGS=$_SAVE_CFLAGS
1895 CXXFLAGS=$_SAVE_CXXFLAGS
1899 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1901 # Extract the first word of "$ac_prog", so it can be a program name with args.
1902 set dummy $ac_prog; ac_word=$2
1903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1904 echo "configure:1905: checking for $ac_word" >&5
1905 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1908 if test -n "$RANLIB"; then
1909 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1911 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1913 for ac_dir in $ac_dummy; do
1914 test -z "$ac_dir" && ac_dir=.
1915 if test -f $ac_dir/$ac_word; then
1916 ac_cv_prog_RANLIB="$ac_prog"
1923 RANLIB="$ac_cv_prog_RANLIB"
1924 if test -n "$RANLIB"; then
1925 echo "$ac_t""$RANLIB" 1>&6
1927 echo "$ac_t""no" 1>&6
1930 test -n "$RANLIB" && break
1932 test -n "$RANLIB" || RANLIB=":"
1934 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1936 # Extract the first word of "$ac_prog", so it can be a program name with args.
1937 set dummy $ac_prog; ac_word=$2
1938 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1939 echo "configure:1940: checking for $ac_word" >&5
1940 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1941 echo $ac_n "(cached) $ac_c" 1>&6
1943 if test -n "$AR"; then
1944 ac_cv_prog_AR="$AR" # Let the user override the test.
1946 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1948 for ac_dir in $ac_dummy; do
1949 test -z "$ac_dir" && ac_dir=.
1950 if test -f $ac_dir/$ac_word; then
1951 ac_cv_prog_AR="$ac_prog"
1959 if test -n "$AR"; then
1960 echo "$ac_t""$AR" 1>&6
1962 echo "$ac_t""no" 1>&6
1965 test -n "$AR" && break
1967 test -n "$AR" || AR=":"
1969 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1971 # Extract the first word of "$ac_prog", so it can be a program name with args.
1972 set dummy $ac_prog; ac_word=$2
1973 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1974 echo "configure:1975: checking for $ac_word" >&5
1975 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
1976 echo $ac_n "(cached) $ac_c" 1>&6
1980 ac_cv_path_AS="$AS" # Let the user override the test with a path.
1983 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
1986 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1988 for ac_dir in $ac_dummy; do
1989 test -z "$ac_dir" && ac_dir=.
1990 if test -f $ac_dir/$ac_word; then
1991 ac_cv_path_AS="$ac_dir/$ac_word"
2000 if test -n "$AS"; then
2001 echo "$ac_t""$AS" 1>&6
2003 echo "$ac_t""no" 1>&6
2006 test -n "$AS" && break
2008 test -n "$AS" || AS=":"
2010 if test "$msyshost"; then
2013 tmp_DIRNAME=`dirname "$AS"`
2014 tmp_BASENAME=`basename "$AS"`
2015 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
2016 AS="$tmp_PWD/$tmp_BASENAME"
2017 if test -e "$AS.exe"; then
2023 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
2025 # Extract the first word of "$ac_prog", so it can be a program name with args.
2026 set dummy $ac_prog; ac_word=$2
2027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2028 echo "configure:2029: checking for $ac_word" >&5
2029 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
2030 echo $ac_n "(cached) $ac_c" 1>&6
2032 if test -n "$LD"; then
2033 ac_cv_prog_LD="$LD" # Let the user override the test.
2035 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2037 for ac_dir in $ac_dummy; do
2038 test -z "$ac_dir" && ac_dir=.
2039 if test -f $ac_dir/$ac_word; then
2040 ac_cv_prog_LD="$ac_prog"
2048 if test -n "$LD"; then
2049 echo "$ac_t""$LD" 1>&6
2051 echo "$ac_t""no" 1>&6
2054 test -n "$LD" && break
2056 test -n "$LD" || LD=":"
2058 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
2060 # Extract the first word of "$ac_prog", so it can be a program name with args.
2061 set dummy $ac_prog; ac_word=$2
2062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2063 echo "configure:2064: checking for $ac_word" >&5
2064 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2065 echo $ac_n "(cached) $ac_c" 1>&6
2067 if test -n "$STRIP"; then
2068 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2070 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2072 for ac_dir in $ac_dummy; do
2073 test -z "$ac_dir" && ac_dir=.
2074 if test -f $ac_dir/$ac_word; then
2075 ac_cv_prog_STRIP="$ac_prog"
2082 STRIP="$ac_cv_prog_STRIP"
2083 if test -n "$STRIP"; then
2084 echo "$ac_t""$STRIP" 1>&6
2086 echo "$ac_t""no" 1>&6
2089 test -n "$STRIP" && break
2091 test -n "$STRIP" || STRIP=":"
2093 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
2095 # Extract the first word of "$ac_prog", so it can be a program name with args.
2096 set dummy $ac_prog; ac_word=$2
2097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2098 echo "configure:2099: checking for $ac_word" >&5
2099 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2100 echo $ac_n "(cached) $ac_c" 1>&6
2102 if test -n "$WINDRES"; then
2103 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2107 for ac_dir in $ac_dummy; do
2108 test -z "$ac_dir" && ac_dir=.
2109 if test -f $ac_dir/$ac_word; then
2110 ac_cv_prog_WINDRES="$ac_prog"
2117 WINDRES="$ac_cv_prog_WINDRES"
2118 if test -n "$WINDRES"; then
2119 echo "$ac_t""$WINDRES" 1>&6
2121 echo "$ac_t""no" 1>&6
2124 test -n "$WINDRES" && break
2126 test -n "$WINDRES" || WINDRES=":"
2128 cat >> confdefs.h <<\EOF
2129 #define CROSS_COMPILE 1
2135 # Extract the first word of "gcc", so it can be a program name with args.
2136 set dummy gcc; ac_word=$2
2137 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2138 echo "configure:2139: checking for $ac_word" >&5
2139 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2140 echo $ac_n "(cached) $ac_c" 1>&6
2142 if test -n "$CC"; then
2143 ac_cv_prog_CC="$CC" # Let the user override the test.
2145 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2147 for ac_dir in $ac_dummy; do
2148 test -z "$ac_dir" && ac_dir=.
2149 if test -f $ac_dir/$ac_word; then
2158 if test -n "$CC"; then
2159 echo "$ac_t""$CC" 1>&6
2161 echo "$ac_t""no" 1>&6
2164 if test -z "$CC"; then
2165 # Extract the first word of "cc", so it can be a program name with args.
2166 set dummy cc; ac_word=$2
2167 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2168 echo "configure:2169: checking for $ac_word" >&5
2169 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2170 echo $ac_n "(cached) $ac_c" 1>&6
2172 if test -n "$CC"; then
2173 ac_cv_prog_CC="$CC" # Let the user override the test.
2175 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2178 for ac_dir in $ac_dummy; do
2179 test -z "$ac_dir" && ac_dir=.
2180 if test -f $ac_dir/$ac_word; then
2181 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2182 ac_prog_rejected=yes
2190 if test $ac_prog_rejected = yes; then
2191 # We found a bogon in the path, so make sure we never use it.
2192 set dummy $ac_cv_prog_CC
2194 if test $# -gt 0; then
2195 # We chose a different compiler from the bogus one.
2196 # However, it has the same basename, so the bogon will be chosen
2197 # first if we set CC to just the basename; use the full file name.
2199 set dummy "$ac_dir/$ac_word" "$@"
2207 if test -n "$CC"; then
2208 echo "$ac_t""$CC" 1>&6
2210 echo "$ac_t""no" 1>&6
2213 if test -z "$CC"; then
2214 case "`uname -s`" in
2216 # Extract the first word of "cl", so it can be a program name with args.
2217 set dummy cl; ac_word=$2
2218 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2219 echo "configure:2220: checking for $ac_word" >&5
2220 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2221 echo $ac_n "(cached) $ac_c" 1>&6
2223 if test -n "$CC"; then
2224 ac_cv_prog_CC="$CC" # Let the user override the test.
2226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2228 for ac_dir in $ac_dummy; do
2229 test -z "$ac_dir" && ac_dir=.
2230 if test -f $ac_dir/$ac_word; then
2239 if test -n "$CC"; then
2240 echo "$ac_t""$CC" 1>&6
2242 echo "$ac_t""no" 1>&6
2247 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2250 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2251 echo "configure:2252: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2254 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2257 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2258 cross_compiling=$ac_cv_prog_cc_cross
2260 cat > conftest.$ac_ext << EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2267 if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2268 ac_cv_prog_cc_works=yes
2269 # If we can't run a trivial program, we are probably using a cross compiler.
2270 if (./conftest; exit) 2>/dev/null; then
2271 ac_cv_prog_cc_cross=no
2273 ac_cv_prog_cc_cross=yes
2276 echo "configure: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2278 ac_cv_prog_cc_works=no
2282 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2283 ac_cpp='$CPP $CPPFLAGS'
2284 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2285 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2286 cross_compiling=$ac_cv_prog_cc_cross
2288 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2289 if test $ac_cv_prog_cc_works = no; then
2290 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2292 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2293 echo "configure:2294: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2294 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2295 cross_compiling=$ac_cv_prog_cc_cross
2297 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2298 echo "configure:2299: checking whether we are using GNU C" >&5
2299 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2300 echo $ac_n "(cached) $ac_c" 1>&6
2302 cat > conftest.c <<EOF
2307 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2314 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2316 if test $ac_cv_prog_gcc = yes; then
2322 ac_test_CFLAGS="${CFLAGS+set}"
2323 ac_save_CFLAGS="$CFLAGS"
2325 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2326 echo "configure:2327: checking whether ${CC-cc} accepts -g" >&5
2327 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2328 echo $ac_n "(cached) $ac_c" 1>&6
2330 echo 'void f(){}' > conftest.c
2331 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2340 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2341 if test "$ac_test_CFLAGS" = set; then
2342 CFLAGS="$ac_save_CFLAGS"
2343 elif test $ac_cv_prog_cc_g = yes; then
2344 if test "$GCC" = yes; then
2350 if test "$GCC" = yes; then
2357 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2359 # Extract the first word of "$ac_prog", so it can be a program name with args.
2360 set dummy $ac_prog; ac_word=$2
2361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2362 echo "configure:2363: checking for $ac_word" >&5
2363 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2364 echo $ac_n "(cached) $ac_c" 1>&6
2366 if test -n "$CXX"; then
2367 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2369 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2371 for ac_dir in $ac_dummy; do
2372 test -z "$ac_dir" && ac_dir=.
2373 if test -f $ac_dir/$ac_word; then
2374 ac_cv_prog_CXX="$ac_prog"
2381 CXX="$ac_cv_prog_CXX"
2382 if test -n "$CXX"; then
2383 echo "$ac_t""$CXX" 1>&6
2385 echo "$ac_t""no" 1>&6
2388 test -n "$CXX" && break
2390 test -n "$CXX" || CXX="gcc"
2393 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2394 echo "configure:2395: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2397 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2398 ac_cpp='$CXXCPP $CPPFLAGS'
2399 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2400 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2401 cross_compiling=$ac_cv_prog_cxx_cross
2403 cat > conftest.$ac_ext << EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2408 int main(){return(0);}
2410 if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2411 ac_cv_prog_cxx_works=yes
2412 # If we can't run a trivial program, we are probably using a cross compiler.
2413 if (./conftest; exit) 2>/dev/null; then
2414 ac_cv_prog_cxx_cross=no
2416 ac_cv_prog_cxx_cross=yes
2419 echo "configure: failed program was:" >&5
2420 cat conftest.$ac_ext >&5
2421 ac_cv_prog_cxx_works=no
2425 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2426 ac_cpp='$CPP $CPPFLAGS'
2427 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2428 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2429 cross_compiling=$ac_cv_prog_cc_cross
2431 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2432 if test $ac_cv_prog_cxx_works = no; then
2433 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2435 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2436 echo "configure:2437: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2437 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2438 cross_compiling=$ac_cv_prog_cxx_cross
2440 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2441 echo "configure:2442: checking whether we are using GNU C++" >&5
2442 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2443 echo $ac_n "(cached) $ac_c" 1>&6
2445 cat > conftest.C <<EOF
2450 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2457 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2459 if test $ac_cv_prog_gxx = yes; then
2465 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2466 ac_save_CXXFLAGS="$CXXFLAGS"
2468 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2469 echo "configure:2470: checking whether ${CXX-g++} accepts -g" >&5
2470 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2473 echo 'void f(){}' > conftest.cc
2474 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2475 ac_cv_prog_cxx_g=yes
2483 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2484 if test "$ac_test_CXXFLAGS" = set; then
2485 CXXFLAGS="$ac_save_CXXFLAGS"
2486 elif test $ac_cv_prog_cxx_g = yes; then
2487 if test "$GXX" = yes; then
2493 if test "$GXX" = yes; then
2500 # Extract the first word of "ranlib", so it can be a program name with args.
2501 set dummy ranlib; ac_word=$2
2502 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2503 echo "configure:2504: checking for $ac_word" >&5
2504 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2505 echo $ac_n "(cached) $ac_c" 1>&6
2507 if test -n "$RANLIB"; then
2508 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2510 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2512 for ac_dir in $ac_dummy; do
2513 test -z "$ac_dir" && ac_dir=.
2514 if test -f $ac_dir/$ac_word; then
2515 ac_cv_prog_RANLIB="ranlib"
2520 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2523 RANLIB="$ac_cv_prog_RANLIB"
2524 if test -n "$RANLIB"; then
2525 echo "$ac_t""$RANLIB" 1>&6
2527 echo "$ac_t""no" 1>&6
2530 for ac_prog in $AS as
2532 # Extract the first word of "$ac_prog", so it can be a program name with args.
2533 set dummy $ac_prog; ac_word=$2
2534 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2535 echo "configure:2536: checking for $ac_word" >&5
2536 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2541 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2544 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2549 for ac_dir in $ac_dummy; do
2550 test -z "$ac_dir" && ac_dir=.
2551 if test -f $ac_dir/$ac_word; then
2552 ac_cv_path_AS="$ac_dir/$ac_word"
2561 if test -n "$AS"; then
2562 echo "$ac_t""$AS" 1>&6
2564 echo "$ac_t""no" 1>&6
2567 test -n "$AS" && break
2569 test -n "$AS" || AS="$CC"
2571 if test "$msyshost"; then
2574 tmp_DIRNAME=`dirname "$AS"`
2575 tmp_BASENAME=`basename "$AS"`
2576 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
2577 AS="$tmp_PWD/$tmp_BASENAME"
2578 if test -e "$AS.exe"; then
2586 # Extract the first word of "$ac_prog", so it can be a program name with args.
2587 set dummy $ac_prog; ac_word=$2
2588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2589 echo "configure:2590: checking for $ac_word" >&5
2590 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2591 echo $ac_n "(cached) $ac_c" 1>&6
2593 if test -n "$AR"; then
2594 ac_cv_prog_AR="$AR" # Let the user override the test.
2596 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2598 for ac_dir in $ac_dummy; do
2599 test -z "$ac_dir" && ac_dir=.
2600 if test -f $ac_dir/$ac_word; then
2601 ac_cv_prog_AR="$ac_prog"
2609 if test -n "$AR"; then
2610 echo "$ac_t""$AR" 1>&6
2612 echo "$ac_t""no" 1>&6
2615 test -n "$AR" && break
2617 test -n "$AR" || AR=":"
2621 # Extract the first word of "$ac_prog", so it can be a program name with args.
2622 set dummy $ac_prog; ac_word=$2
2623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2624 echo "configure:2625: checking for $ac_word" >&5
2625 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
2626 echo $ac_n "(cached) $ac_c" 1>&6
2628 if test -n "$LD"; then
2629 ac_cv_prog_LD="$LD" # Let the user override the test.
2631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2633 for ac_dir in $ac_dummy; do
2634 test -z "$ac_dir" && ac_dir=.
2635 if test -f $ac_dir/$ac_word; then
2636 ac_cv_prog_LD="$ac_prog"
2644 if test -n "$LD"; then
2645 echo "$ac_t""$LD" 1>&6
2647 echo "$ac_t""no" 1>&6
2650 test -n "$LD" && break
2652 test -n "$LD" || LD=":"
2654 for ac_prog in strip
2656 # Extract the first word of "$ac_prog", so it can be a program name with args.
2657 set dummy $ac_prog; ac_word=$2
2658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2659 echo "configure:2660: checking for $ac_word" >&5
2660 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2661 echo $ac_n "(cached) $ac_c" 1>&6
2663 if test -n "$STRIP"; then
2664 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2666 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2668 for ac_dir in $ac_dummy; do
2669 test -z "$ac_dir" && ac_dir=.
2670 if test -f $ac_dir/$ac_word; then
2671 ac_cv_prog_STRIP="$ac_prog"
2678 STRIP="$ac_cv_prog_STRIP"
2679 if test -n "$STRIP"; then
2680 echo "$ac_t""$STRIP" 1>&6
2682 echo "$ac_t""no" 1>&6
2685 test -n "$STRIP" && break
2687 test -n "$STRIP" || STRIP=":"
2689 for ac_prog in windres
2691 # Extract the first word of "$ac_prog", so it can be a program name with args.
2692 set dummy $ac_prog; ac_word=$2
2693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2694 echo "configure:2695: checking for $ac_word" >&5
2695 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2696 echo $ac_n "(cached) $ac_c" 1>&6
2698 if test -n "$WINDRES"; then
2699 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2701 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2703 for ac_dir in $ac_dummy; do
2704 test -z "$ac_dir" && ac_dir=.
2705 if test -f $ac_dir/$ac_word; then
2706 ac_cv_prog_WINDRES="$ac_prog"
2713 WINDRES="$ac_cv_prog_WINDRES"
2714 if test -n "$WINDRES"; then
2715 echo "$ac_t""$WINDRES" 1>&6
2717 echo "$ac_t""no" 1>&6
2720 test -n "$WINDRES" && break
2722 test -n "$WINDRES" || WINDRES=":"
2724 if test -z "$HOST_CC"; then
2727 if test -z "$HOST_CFLAGS"; then
2728 HOST_CFLAGS='$(CFLAGS)'
2730 if test -z "$HOST_CXX"; then
2733 if test -z "$HOST_CXXFLAGS"; then
2734 HOST_CXXFLAGS='$(CXXFLAGS)'
2736 if test -z "$HOST_LDFLAGS"; then
2737 HOST_LDFLAGS='$(LDFLAGS)'
2739 if test -z "$HOST_RANLIB"; then
2740 HOST_RANLIB='$(RANLIB)'
2742 if test -z "$HOST_AR"; then
2745 if test -z "$HOST_AR_FLAGS"; then
2746 HOST_AR_FLAGS='$(AR_FLAGS)'
2756 if test "$GCC" = "yes"; then
2758 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
2760 if test "$GXX" = "yes"; then
2762 CXX_VERSION=`$CXX -v 2>&1 | grep 'gcc version'`
2764 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2767 if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
2770 if test "$GNU_CC"; then
2771 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
2778 if test "$GCC" = yes; then
2779 if test "`$CC -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
2784 if test "$GXX" = yes; then
2785 if test "`$CXX -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
2793 WINSDK_TARGETVER=502
2797 WINSDK_TARGETVER=601
2801 # Check whether --with-windows-version or --without-windows-version was given.
2802 if test "${with_windows_version+set}" = set; then
2803 withval="$with_windows_version"
2804 WINSDK_TARGETVER=$withval
2808 case "$WINSDK_TARGETVER" in
2810 MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000
2814 { echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER), must be 502, 600 or 601" 1>&2; exit 1; };
2820 *-cygwin*|*-mingw*|*-msvc*|*-mks*|*-wince|*-winmo)
2821 if test "$GCC" != "yes"; then
2822 # Check to see if we are really running in a msvc environemnt
2825 # Make sure compilers are valid
2826 CFLAGS="$CFLAGS -TC -nologo"
2827 CXXFLAGS="$CXXFLAGS -TP -nologo"
2828 # MSVC warning C4345 warns of newly conformant behavior as of VS2003.
2829 # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific
2830 # secure CRT functions.
2831 CXXFLAGS="$CXXFLAGS -wd4345 -D_CRT_SECURE_NO_WARNINGS"
2834 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2835 ac_cpp='$CPP $CPPFLAGS'
2836 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2837 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2838 cross_compiling=$ac_cv_prog_cc_cross
2840 cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2845 printf("Hello World\n");
2848 if { (eval echo configure:2849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2851 echo "configure: failed program was:" >&5
2852 cat conftest.$ac_ext >&5
2854 { echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; exit 1; }
2859 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2860 ac_cpp='$CXXCPP $CPPFLAGS'
2861 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2862 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2863 cross_compiling=$ac_cv_prog_cxx_cross
2865 cat > conftest.$ac_ext <<EOF
2866 #line 2867 "configure"
2867 #include "confdefs.h"
2870 unsigned *test = new unsigned(42);
2873 if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2876 echo "configure: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2879 { echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; exit 1; }
2883 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2884 ac_cpp='$CPP $CPPFLAGS'
2885 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2886 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2887 cross_compiling=$ac_cv_prog_cc_cross
2891 _MSVC_VER_FILTER='s|.* ([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
2894 # Determine compiler version
2895 CC_VERSION=`"${CC}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
2896 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | $AWK -F\. '{ print $1 }'`
2897 _CC_MINOR_VERSION=`echo ${CC_VERSION} | $AWK -F\. '{ print $2 }'`
2898 _CC_RELEASE=`echo ${CC_VERSION} | $AWK -F\. '{ print $3 }'`
2899 _CC_BUILD=`echo ${CC_VERSION} | $AWK -F\. '{ print $4 }'`
2900 _MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
2902 CXX_VERSION=`"${CXX}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
2903 _CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | $AWK -F\. '{ print $1 }'`
2905 if test "$_CC_MAJOR_VERSION" != "$_CXX_MAJOR_VERSION"; then
2906 { echo "configure: error: The major versions of \$CC and \$CXX do not match." 1>&2; exit 1; }
2909 if test "$_CC_MAJOR_VERSION" = "14"; then
2910 if test "$_CC_RELEASE" -lt 50727 -o \
2911 \( "$_CC_RELEASE" -eq 50727 -a "$_CC_BUILD" -lt 762 \); then
2912 { echo "configure: error: This version ($CC_VERSION) of the MSVC compiler is unsupported. You probably need to install Service Pack 1 of Visual Studio 2005. See https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; exit 1; }
2916 CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
2917 cat >> confdefs.h <<\EOF
2918 #define _CRT_SECURE_NO_DEPRECATE 1
2921 cat >> confdefs.h <<\EOF
2922 #define _CRT_NONSTDC_NO_DEPRECATE 1
2925 elif test "$_CC_MAJOR_VERSION" = "15"; then
2927 CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
2928 cat >> confdefs.h <<\EOF
2929 #define _CRT_SECURE_NO_WARNINGS 1
2932 cat >> confdefs.h <<\EOF
2933 #define _CRT_NONSTDC_NO_WARNINGS 1
2936 elif test "$_CC_MAJOR_VERSION" = "16"; then
2938 CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
2939 cat >> confdefs.h <<\EOF
2940 #define _CRT_SECURE_NO_WARNINGS 1
2943 cat >> confdefs.h <<\EOF
2944 #define _CRT_NONSTDC_NO_WARNINGS 1
2948 { 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; }
2951 _MOZ_RTTI_FLAGS_ON='-GR'
2952 _MOZ_RTTI_FLAGS_OFF='-GR-'
2953 _MOZ_EXCEPTIONS_FLAGS_ON='-EHsc'
2954 _MOZ_EXCEPTIONS_FLAGS_OFF=''
2956 if test -n "$WIN32_REDIST_DIR"; then
2957 WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd`
2960 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
2961 if test -z "$MSMT_TOOL"; then
2962 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
2966 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
2968 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
2969 if test -z "$MSMANIFEST_TOOL_VERSION"; then
2970 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
2976 # Check linker version
2977 _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
2978 _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
2979 if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
2980 { echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; exit 1; }
2983 INCREMENTAL_LINKER=1
2985 # Identify which version of the SDK we're building with
2986 # Windows Server 2008 and newer SDKs have WinSDKVer.h, get the version
2988 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2989 echo "configure:2990: checking how to run the C preprocessor" >&5
2990 # On Suns, sometimes $CPP names a directory.
2991 if test -n "$CPP" && test -d "$CPP"; then
2994 if test -z "$CPP"; then
2995 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2996 echo $ac_n "(cached) $ac_c" 1>&6
2998 # This must be in double quotes, not single quotes, because CPP may get
2999 # substituted into the Makefile and "${CC-cc}" will confuse make.
3001 # On the NeXT, cc -E runs the code through the compiler's parser,
3002 # not just through cpp.
3003 cat > conftest.$ac_ext <<EOF
3004 #line 3005 "configure"
3005 #include "confdefs.h"
3009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3010 { (eval echo configure:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3012 if test -z "$ac_err"; then
3016 echo "configure: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3019 CPP="${CC-cc} -E -traditional-cpp"
3020 cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3027 { (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3029 if test -z "$ac_err"; then
3033 echo "configure: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3036 CPP="${CC-cc} -nologo -E"
3037 cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3044 { (eval echo configure:3045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3046 if test -z "$ac_err"; then
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3060 ac_cv_prog_CPP="$CPP"
3062 CPP="$ac_cv_prog_CPP"
3064 ac_cv_prog_CPP="$CPP"
3066 echo "$ac_t""$CPP" 1>&6
3068 for ac_hdr in winsdkver.h
3070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_hdr" >&5
3073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3074 echo $ac_n "(cached) $ac_c" 1>&6
3076 cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3082 { (eval echo configure:3083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3084 if test -z "$ac_err"; then
3086 eval "ac_cv_header_$ac_safe=yes"
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3092 eval "ac_cv_header_$ac_safe=no"
3096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3097 echo "$ac_t""yes" 1>&6
3098 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3099 cat >> confdefs.h <<EOF
3100 #define $ac_tr_hdr 1
3104 echo "$ac_t""no" 1>&6
3108 if test "$ac_cv_header_winsdkver_h" = "yes"; then
3109 # Get the highest _WIN32_WINNT and NTDDI versions supported
3110 # Take the higher of the two
3111 # This is done because the Windows 7 beta SDK reports its
3112 # NTDDI_MAXVER to be 0x06000100 instead of 0x06010000, as it should
3113 echo $ac_n "checking for highest Windows version supported by this SDK""... $ac_c" 1>&6
3114 echo "configure:3115: checking for highest Windows version supported by this SDK" >&5
3115 if eval "test \"`echo '$''{'ac_cv_winsdk_maxver'+set}'`\" = set"; then
3116 echo $ac_n "(cached) $ac_c" 1>&6
3118 cat > conftest.h <<EOF
3119 #include <winsdkver.h>
3120 #include <sdkddkver.h>
3122 #if (NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) > NTDDI_MAXVER)
3123 #define WINSDK_MAXVER NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER)
3125 #define WINSDK_MAXVER NTDDI_MAXVER
3130 ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1`
3135 echo "$ac_t""$ac_cv_winsdk_maxver" 1>&6
3136 MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}
3138 # The Vista SDK is the only one to have sdkddkver.h but not
3140 for ac_hdr in sdkddkver.h
3142 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3143 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3144 echo "configure:3145: checking for $ac_hdr" >&5
3145 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3148 cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3153 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3154 { (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3155 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3156 if test -z "$ac_err"; then
3158 eval "ac_cv_header_$ac_safe=yes"
3161 echo "configure: failed program was:" >&5
3162 cat conftest.$ac_ext >&5
3164 eval "ac_cv_header_$ac_safe=no"
3168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3169 echo "$ac_t""yes" 1>&6
3170 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3171 cat >> confdefs.h <<EOF
3172 #define $ac_tr_hdr 1
3176 echo "$ac_t""no" 1>&6
3180 if test "$ac_cv_header_sdkddkver_h" = "yes"; then
3181 MOZ_WINSDK_MAXVER=0x06000000
3183 # Assume the Server 2003 Platform SDK
3184 MOZ_WINSDK_MAXVER=0x05020000
3188 unset _MSVC_VER_FILTER
3190 echo $ac_n "checking for std::_Throw""... $ac_c" 1>&6
3191 echo "configure:3192: checking for std::_Throw" >&5
3192 if eval "test \"`echo '$''{'ac_cv_have_std__Throw'+set}'`\" = set"; then
3193 echo $ac_n "(cached) $ac_c" 1>&6
3198 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3199 ac_cpp='$CXXCPP $CPPFLAGS'
3200 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3201 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3202 cross_compiling=$ac_cv_prog_cxx_cross
3204 _SAVE_CXXFLAGS="$CXXFLAGS"
3205 CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
3206 cat > conftest.$ac_ext <<EOF
3207 #line 3208 "configure"
3208 #include "confdefs.h"
3209 #include <exception>
3211 std::_Throw(std::exception()); return 0;
3214 if { (eval echo configure:3215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3216 ac_cv_have_std__Throw="yes"
3218 echo "configure: failed program was:" >&5
3219 cat conftest.$ac_ext >&5
3221 ac_cv_have_std__Throw="no"
3224 CXXFLAGS="$_SAVE_CXXFLAGS"
3226 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3227 ac_cpp='$CPP $CPPFLAGS'
3228 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3229 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3230 cross_compiling=$ac_cv_prog_cc_cross
3235 echo "$ac_t""$ac_cv_have_std__Throw" 1>&6
3237 if test "$ac_cv_have_std__Throw" == "yes"; then
3238 echo $ac_n "checking for |class __declspec(dllimport) exception| bug""... $ac_c" 1>&6
3239 echo "configure:3240: checking for |class __declspec(dllimport) exception| bug" >&5
3240 if eval "test \"`echo '$''{'ac_cv_have_dllimport_exception_bug'+set}'`\" = set"; then
3241 echo $ac_n "(cached) $ac_c" 1>&6
3246 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3247 ac_cpp='$CXXCPP $CPPFLAGS'
3248 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3249 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3250 cross_compiling=$ac_cv_prog_cxx_cross
3252 _SAVE_CXXFLAGS="$CXXFLAGS"
3253 CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3259 std::vector<int> v; return v.at(1);
3262 if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3264 ac_cv_have_dllimport_exception_bug="no"
3266 echo "configure: failed program was:" >&5
3267 cat conftest.$ac_ext >&5
3269 ac_cv_have_dllimport_exception_bug="yes"
3272 CXXFLAGS="$_SAVE_CXXFLAGS"
3274 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3275 ac_cpp='$CPP $CPPFLAGS'
3276 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3277 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3278 cross_compiling=$ac_cv_prog_cc_cross
3283 echo "$ac_t""$ac_cv_have_dllimport_exception_bug" 1>&6
3284 if test "$ac_cv_have_dllimport_exception_bug" = "no"; then
3286 MOZ_MSVC_STL_WRAP__Throw=1
3287 cat >> confdefs.h <<\EOF
3288 #define MOZ_MSVC_STL_WRAP__Throw 1
3293 echo $ac_n "checking for overridable _RAISE""... $ac_c" 1>&6
3294 echo "configure:3295: checking for overridable _RAISE" >&5
3295 if eval "test \"`echo '$''{'ac_cv_have__RAISE'+set}'`\" = set"; then
3296 echo $ac_n "(cached) $ac_c" 1>&6
3301 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3302 ac_cpp='$CXXCPP $CPPFLAGS'
3303 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3304 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3305 cross_compiling=$ac_cv_prog_cxx_cross
3307 _SAVE_CXXFLAGS="$CXXFLAGS"
3308 CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
3309 cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3314 #define _RAISE(x) externallyDefinedFunction((x).what())
3318 std::vector<int> v; return v.at(1);
3321 if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3323 ac_cv_have__RAISE="no"
3325 echo "configure: failed program was:" >&5
3326 cat conftest.$ac_ext >&5
3328 ac_cv_have__RAISE="yes"
3331 CXXFLAGS="$_SAVE_CXXFLAGS"
3333 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3334 ac_cpp='$CPP $CPPFLAGS'
3335 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3336 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3337 cross_compiling=$ac_cv_prog_cc_cross
3342 echo "$ac_t""$ac_cv_have__RAISE" 1>&6
3343 if test "$ac_cv_have__RAISE" = "yes"; then
3345 MOZ_MSVC_STL_WRAP__RAISE=1
3346 cat >> confdefs.h <<\EOF
3347 #define MOZ_MSVC_STL_WRAP__RAISE 1
3351 { echo "configure: error: Gecko exception wrapping doesn't understand your your MSVC/SDK. Please file a bug describing this error and your build configuration." 1>&2; exit 1; }
3355 if test "$WRAP_STL_INCLUDES" = "1"; then
3356 STL_FLAGS='-D_HAS_EXCEPTIONS=0 -I$(DIST)/stl_wrappers'
3359 # Check w32api version
3360 _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
3361 _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
3362 echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6
3363 echo "configure:3364: checking for w32api version >= $W32API_VERSION" >&5
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3369 #if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \
3370 (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \
3371 __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
3372 #error "test failed."
3377 if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3381 echo "configure: failed program was:" >&5
3382 cat conftest.$ac_ext >&5
3387 echo "$ac_t""$res" 1>&6
3388 if test "$res" != "yes"; then
3389 { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; exit 1; }
3391 # Check windres version
3392 echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6
3393 echo "configure:3394: checking for windres version >= $WINDRES_VERSION" >&5
3394 _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'`
3395 echo "$ac_t""$_WINDRES_VERSION" 1>&6
3396 _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
3397 _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
3398 _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
3399 WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
3400 WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
3401 WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
3402 if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \
3403 "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
3404 "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \
3405 "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
3406 "$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \
3407 "$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION"
3409 { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; exit 1; }
3412 # Server 2003 is the highest version supported
3413 MOZ_WINSDK_MAXVER=0x05020000
3416 cat >> confdefs.h <<EOF
3417 #define WINVER 0x$WINVER
3420 cat >> confdefs.h <<EOF
3421 #define _WIN32_WINNT 0x$WINVER
3424 # Require OS features provided by IE 5.0
3425 cat >> confdefs.h <<EOF
3426 #define _WIN32_IE 0x0500
3430 # If the maximum version supported by this SDK is lower than the target
3431 # version, error out
3432 echo $ac_n "checking for Windows SDK being recent enough""... $ac_c" 1>&6
3433 echo "configure:3434: checking for Windows SDK being recent enough" >&5
3434 if $PERL -e "exit(0x$MOZ_WINSDK_TARGETVER > $MOZ_WINSDK_MAXVER)"; then
3435 echo "$ac_t"""yes"" 1>&6
3437 echo "$ac_t"""no"" 1>&6
3438 { 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; }
3441 cat >> confdefs.h <<EOF
3442 #define MOZ_WINSDK_TARGETVER 0x$MOZ_WINSDK_TARGETVER
3445 # Definitions matching sdkddkver.h
3446 cat >> confdefs.h <<EOF
3447 #define MOZ_NTDDI_WS03 0x05020000
3450 cat >> confdefs.h <<EOF
3451 #define MOZ_NTDDI_LONGHORN 0x06000000
3454 cat >> confdefs.h <<EOF
3455 #define MOZ_NTDDI_WIN7 0x06010000
3461 if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then
3462 if test "x$CC" != xcc; then
3463 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
3464 echo "configure:3465: checking whether $CC and cc understand -c and -o together" >&5
3466 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
3467 echo "configure:3468: checking whether cc understands -c and -o together" >&5
3469 set dummy $CC; ac_cc="`echo $2 |
3470 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
3471 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
3474 echo 'foo(){}' > conftest.c
3475 # Make sure it works both with $CC and with simple cc.
3476 # We do the test twice because some compilers refuse to overwrite an
3477 # existing .o file with -o, though they will create one.
3478 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
3479 if { (eval echo configure:3480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
3480 test -f conftest.o && { (eval echo configure:3481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
3482 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3483 if test "x$CC" != xcc; then
3484 # Test first that cc exists at all.
3485 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
3486 ac_try='cc -c conftest.c -o conftest.o 1>&5'
3487 if { (eval echo configure:3488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
3488 test -f conftest.o && { (eval echo configure:3489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
3493 # cc exists but doesn't like -o.
3494 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3499 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3504 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3505 echo "$ac_t""yes" 1>&6
3507 echo "$ac_t""no" 1>&6
3508 cat >> confdefs.h <<\EOF
3509 #define NO_MINUS_C_MINUS_O 1
3514 if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
3518 CC="${srcdir}/build/hcc '$CC'"
3519 CXX="${srcdir}/build/hcpp '$CXX'"
3523 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3524 echo "configure:3525: checking how to run the C preprocessor" >&5
3525 # On Suns, sometimes $CPP names a directory.
3526 if test -n "$CPP" && test -d "$CPP"; then
3529 if test -z "$CPP"; then
3530 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3531 echo $ac_n "(cached) $ac_c" 1>&6
3533 # This must be in double quotes, not single quotes, because CPP may get
3534 # substituted into the Makefile and "${CC-cc}" will confuse make.
3536 # On the NeXT, cc -E runs the code through the compiler's parser,
3537 # not just through cpp.
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3551 echo "configure: failed program was:" >&5
3552 cat conftest.$ac_ext >&5
3554 CPP="${CC-cc} -E -traditional-cpp"
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3562 { (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3564 if test -z "$ac_err"; then
3568 echo "configure: failed program was:" >&5
3569 cat conftest.$ac_ext >&5
3571 CPP="${CC-cc} -nologo -E"
3572 cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3579 { (eval echo configure:3580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3581 if test -z "$ac_err"; then
3585 echo "configure: failed program was:" >&5
3586 cat conftest.$ac_ext >&5
3595 ac_cv_prog_CPP="$CPP"
3597 CPP="$ac_cv_prog_CPP"
3599 ac_cv_prog_CPP="$CPP"
3601 echo "$ac_t""$CPP" 1>&6
3603 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
3604 echo "configure:3605: checking how to run the C++ preprocessor" >&5
3605 if test -z "$CXXCPP"; then
3606 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
3607 echo $ac_n "(cached) $ac_c" 1>&6
3610 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3611 ac_cpp='$CXXCPP $CPPFLAGS'
3612 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3613 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3614 cross_compiling=$ac_cv_prog_cxx_cross
3615 CXXCPP="${CXX-g++} -E"
3616 cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3622 { (eval echo configure:3623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3624 if test -z "$ac_err"; then
3628 echo "configure: failed program was:" >&5
3629 cat conftest.$ac_ext >&5
3634 ac_cv_prog_CXXCPP="$CXXCPP"
3636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3637 ac_cpp='$CPP $CPPFLAGS'
3638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3639 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3640 cross_compiling=$ac_cv_prog_cc_cross
3643 CXXCPP="$ac_cv_prog_CXXCPP"
3644 echo "$ac_t""$CXXCPP" 1>&6
3647 if test -n "$_WIN32_MSVC"; then
3649 SKIP_COMPILER_CHECKS=1
3650 SKIP_LIBRARY_CHECKS=1
3652 # Since we're skipping compiler and library checks, hard-code
3655 # Common to all MSVC environments:
3656 # Windows lacks <stdint.h>, but has __int8, and so on.
3657 cat >> confdefs.h <<\EOF
3658 #define JS_HAVE___INTN 1
3661 cat >> confdefs.h <<\EOF
3662 #define HAVE_LOCALECONV 1
3668 cat >> confdefs.h <<\EOF
3669 #define HAVE_SYSTEMTIMETOFILETIME 1
3672 cat >> confdefs.h <<\EOF
3673 #define JS_CRTDEFS_H_HAS_INTPTR_T 1
3678 cat >> confdefs.h <<\EOF
3679 #define HAVE_SYSTEMTIMETOFILETIME 1
3682 cat >> confdefs.h <<\EOF
3683 #define HAVE_GETSYSTEMTIMEASFILETIME 1
3686 # Windows <stddef.h> defines intptr_t and uintptr_t.
3687 # VS2005: http://msdn.microsoft.com/en-us/library/323b6b3k(VS.80).aspx
3688 # VS2008: http://msdn.microsoft.com/en-us/library/323b6b3k.aspx
3689 cat >> confdefs.h <<\EOF
3690 #define JS_STDDEF_H_HAS_INTPTR_T 1
3697 fi # COMPILE_ENVIRONMENT
3699 if test "$cross_compiling" = "yes"; then
3705 # Check to see if we are running in a broken QEMU scratchbox.
3706 # We know that anything below 1.0.16 is broken.
3707 for ac_prog in sb-conf ve
3709 # Extract the first word of "$ac_prog", so it can be a program name with args.
3710 set dummy $ac_prog; ac_word=$2
3711 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3712 echo "configure:3713: checking for $ac_word" >&5
3713 if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then
3714 echo $ac_n "(cached) $ac_c" 1>&6
3716 if test -n "$SBCONF"; then
3717 ac_cv_prog_SBCONF="$SBCONF" # Let the user override the test.
3719 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3721 for ac_dir in $ac_dummy; do
3722 test -z "$ac_dir" && ac_dir=.
3723 if test -f $ac_dir/$ac_word; then
3724 ac_cv_prog_SBCONF="$ac_prog"
3731 SBCONF="$ac_cv_prog_SBCONF"
3732 if test -n "$SBCONF"; then
3733 echo "$ac_t""$SBCONF" 1>&6
3735 echo "$ac_t""no" 1>&6
3738 test -n "$SBCONF" && break
3740 test -n "$SBCONF" || SBCONF=""""
3742 if test -n "$SBCONF"; then
3743 _sb_version=`$SBCONF ve`
3744 _sb_version_major=`echo $_sb_version | cut -f1 -d.`
3745 _sb_version_minor=`echo $_sb_version | cut -f2 -d.`
3746 _sb_version_point=`echo $_sb_version | cut -f3 -d.`
3747 if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then
3748 QEMU_CANT_RUN_JS_SHELL=1
3767 # Find a good install program. We prefer a C program (faster),
3768 # so one script is as good as another. But avoid the broken or
3769 # incompatible versions:
3770 # SysV /etc/install, /usr/sbin/install
3771 # SunOS /usr/etc/install
3772 # IRIX /sbin/install
3774 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3775 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3776 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3777 # ./install, which can be erroneously created by make from ./install.sh.
3778 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3779 echo "configure:3780: checking for a BSD compatible install" >&5
3780 if test -z "$INSTALL"; then
3781 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3782 echo $ac_n "(cached) $ac_c" 1>&6
3784 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3785 for ac_dir in $PATH; do
3786 # Account for people who put trailing slashes in PATH elements.
3788 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3790 # OSF1 and SCO ODT 3.0 have their own names for install.
3791 # Don't use installbsd from OSF since it installs stuff as root
3793 for ac_prog in ginstall scoinst install; do
3794 if test -f $ac_dir/$ac_prog; then
3795 if test $ac_prog = install &&
3796 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3797 # AIX install. It has an incompatible calling convention.
3800 ac_cv_path_install="$ac_dir/$ac_prog -c"
3811 if test "${ac_cv_path_install+set}" = set; then
3812 INSTALL="$ac_cv_path_install"
3814 # As a last resort, use the slow shell script. We don't cache a
3815 # path for INSTALL within a source directory, because that will
3816 # break other packages using the cache if that directory is
3817 # removed, or if the path is relative.
3818 INSTALL="$ac_install_sh"
3821 echo "$ac_t""$INSTALL" 1>&6
3823 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3824 # It thinks the first close brace ends the variable substitution.
3825 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3827 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3829 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3831 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3832 echo "configure:3833: checking whether ln -s works" >&5
3833 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3834 echo $ac_n "(cached) $ac_c" 1>&6
3837 if ln -s X conftestdata 2>/dev/null
3840 ac_cv_prog_LN_S="ln -s"
3845 LN_S="$ac_cv_prog_LN_S"
3846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3847 echo "$ac_t""yes" 1>&6
3849 echo "$ac_t""no" 1>&6
3853 if test -z "$TINDERBOX_SKIP_PERL_VERSION_CHECK"; then
3854 echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6
3855 echo "configure:3856: checking for minimum required perl version >= $PERL_VERSION" >&5
3856 _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
3858 echo "$ac_t""$_perl_version" 1>&6
3860 if test "$_perl_res" != 0; then
3861 { echo "configure: error: Perl $PERL_VERSION or higher is required." 1>&2; exit 1; }
3865 echo $ac_n "checking for full perl installation""... $ac_c" 1>&6
3866 echo "configure:3867: checking for full perl installation" >&5
3867 _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5`
3869 if test "$_perl_res" != 0; then
3870 echo "$ac_t""no" 1>&6
3871 { echo "configure: error: Cannot find Config.pm or \$Config{archlib}. A full perl installation is required." 1>&2; exit 1; }
3873 echo "$ac_t""yes" 1>&6
3876 for ac_prog in $PYTHON python2.7 python2.6 python2.5 python
3878 # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3881 echo "configure:3882: checking for $ac_word" >&5
3882 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
3887 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
3890 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path.
3893 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3895 for ac_dir in $ac_dummy; do
3896 test -z "$ac_dir" && ac_dir=.
3897 if test -f $ac_dir/$ac_word; then
3898 ac_cv_path_PYTHON="$ac_dir/$ac_word"
3906 PYTHON="$ac_cv_path_PYTHON"
3907 if test -n "$PYTHON"; then
3908 echo "$ac_t""$PYTHON" 1>&6
3910 echo "$ac_t""no" 1>&6
3913 test -n "$PYTHON" && break
3916 if test "$msyshost"; then
3919 tmp_DIRNAME=`dirname "$PYTHON"`
3920 tmp_BASENAME=`basename "$PYTHON"`
3921 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
3922 PYTHON="$tmp_PWD/$tmp_BASENAME"
3923 if test -e "$PYTHON.exe"; then
3924 PYTHON="$PYTHON.exe"
3929 if test -z "$PYTHON"; then
3930 { echo "configure: error: python was not found in \$PATH" 1>&2; exit 1; }
3933 if test -z "$COMPILE_ENVIRONMENT"; then
3934 NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py'
3938 # Extract the first word of "doxygen", so it can be a program name with args.
3939 set dummy doxygen; ac_word=$2
3940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3941 echo "configure:3942: checking for $ac_word" >&5
3942 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
3943 echo $ac_n "(cached) $ac_c" 1>&6
3947 ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
3950 ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a dos path.
3953 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3955 for ac_dir in $ac_dummy; do
3956 test -z "$ac_dir" && ac_dir=.
3957 if test -f $ac_dir/$ac_word; then
3958 ac_cv_path_DOXYGEN="$ac_dir/$ac_word"
3963 test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=":"
3967 DOXYGEN="$ac_cv_path_DOXYGEN"
3968 if test -n "$DOXYGEN"; then
3969 echo "$ac_t""$DOXYGEN" 1>&6
3971 echo "$ac_t""no" 1>&6
3974 if test "$msyshost"; then
3977 tmp_DIRNAME=`dirname "$DOXYGEN"`
3978 tmp_BASENAME=`basename "$DOXYGEN"`
3979 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
3980 DOXYGEN="$tmp_PWD/$tmp_BASENAME"
3981 if test -e "$DOXYGEN.exe"; then
3982 DOXYGEN="$DOXYGEN.exe"
3987 # Extract the first word of "autoconf", so it can be a program name with args.
3988 set dummy autoconf; ac_word=$2
3989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3990 echo "configure:3991: checking for $ac_word" >&5
3991 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
3992 echo $ac_n "(cached) $ac_c" 1>&6
3996 ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
3999 ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
4002 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4004 for ac_dir in $ac_dummy; do
4005 test -z "$ac_dir" && ac_dir=.
4006 if test -f $ac_dir/$ac_word; then
4007 ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
4012 test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":"
4016 AUTOCONF="$ac_cv_path_AUTOCONF"
4017 if test -n "$AUTOCONF"; then
4018 echo "$ac_t""$AUTOCONF" 1>&6
4020 echo "$ac_t""no" 1>&6
4023 if test "$msyshost"; then
4026 tmp_DIRNAME=`dirname "$AUTOCONF"`
4027 tmp_BASENAME=`basename "$AUTOCONF"`
4028 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4029 AUTOCONF="$tmp_PWD/$tmp_BASENAME"
4030 if test -e "$AUTOCONF.exe"; then
4031 AUTOCONF="$AUTOCONF.exe"
4036 # Extract the first word of "unzip", so it can be a program name with args.
4037 set dummy unzip; ac_word=$2
4038 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4039 echo "configure:4040: checking for $ac_word" >&5
4040 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then
4041 echo $ac_n "(cached) $ac_c" 1>&6
4045 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
4048 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path.
4051 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4053 for ac_dir in $ac_dummy; do
4054 test -z "$ac_dir" && ac_dir=.
4055 if test -f $ac_dir/$ac_word; then
4056 ac_cv_path_UNZIP="$ac_dir/$ac_word"
4061 test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP=":"
4065 UNZIP="$ac_cv_path_UNZIP"
4066 if test -n "$UNZIP"; then
4067 echo "$ac_t""$UNZIP" 1>&6
4069 echo "$ac_t""no" 1>&6
4072 if test "$msyshost"; then
4075 tmp_DIRNAME=`dirname "$UNZIP"`
4076 tmp_BASENAME=`basename "$UNZIP"`
4077 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4078 UNZIP="$tmp_PWD/$tmp_BASENAME"
4079 if test -e "$UNZIP.exe"; then
4087 # Extract the first word of "$ac_prog", so it can be a program name with args.
4088 set dummy $ac_prog; ac_word=$2
4089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4090 echo "configure:4091: checking for $ac_word" >&5
4091 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then
4092 echo $ac_n "(cached) $ac_c" 1>&6
4096 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
4099 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a dos path.
4102 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4104 for ac_dir in $ac_dummy; do
4105 test -z "$ac_dir" && ac_dir=.
4106 if test -f $ac_dir/$ac_word; then
4107 ac_cv_path_ZIP="$ac_dir/$ac_word"
4115 ZIP="$ac_cv_path_ZIP"
4116 if test -n "$ZIP"; then
4117 echo "$ac_t""$ZIP" 1>&6
4119 echo "$ac_t""no" 1>&6
4122 test -n "$ZIP" && break
4125 if test "$msyshost"; then
4128 tmp_DIRNAME=`dirname "$ZIP"`
4129 tmp_BASENAME=`basename "$ZIP"`
4130 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4131 ZIP="$tmp_PWD/$tmp_BASENAME"
4132 if test -e "$ZIP.exe"; then
4138 if test -z "$ZIP" -o "$ZIP" = ":"; then
4139 { echo "configure: error: zip not found in \$PATH" 1>&2; exit 1; }
4141 # Extract the first word of "makedepend", so it can be a program name with args.
4142 set dummy makedepend; ac_word=$2
4143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4144 echo "configure:4145: checking for $ac_word" >&5
4145 if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then
4146 echo $ac_n "(cached) $ac_c" 1>&6
4148 case "$SYSTEM_MAKEDEPEND" in
4150 ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a path.
4153 ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a dos path.
4156 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4158 for ac_dir in $ac_dummy; do
4159 test -z "$ac_dir" && ac_dir=.
4160 if test -f $ac_dir/$ac_word; then
4161 ac_cv_path_SYSTEM_MAKEDEPEND="$ac_dir/$ac_word"
4169 SYSTEM_MAKEDEPEND="$ac_cv_path_SYSTEM_MAKEDEPEND"
4170 if test -n "$SYSTEM_MAKEDEPEND"; then
4171 echo "$ac_t""$SYSTEM_MAKEDEPEND" 1>&6
4173 echo "$ac_t""no" 1>&6
4176 if test "$msyshost"; then
4177 case "$SYSTEM_MAKEDEPEND" in
4179 tmp_DIRNAME=`dirname "$SYSTEM_MAKEDEPEND"`
4180 tmp_BASENAME=`basename "$SYSTEM_MAKEDEPEND"`
4181 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4182 SYSTEM_MAKEDEPEND="$tmp_PWD/$tmp_BASENAME"
4183 if test -e "$SYSTEM_MAKEDEPEND.exe"; then
4184 SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND.exe"
4189 # Extract the first word of "xargs", so it can be a program name with args.
4190 set dummy xargs; ac_word=$2
4191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4192 echo "configure:4193: checking for $ac_word" >&5
4193 if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then
4194 echo $ac_n "(cached) $ac_c" 1>&6
4198 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
4201 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a dos path.
4204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4206 for ac_dir in $ac_dummy; do
4207 test -z "$ac_dir" && ac_dir=.
4208 if test -f $ac_dir/$ac_word; then
4209 ac_cv_path_XARGS="$ac_dir/$ac_word"
4217 XARGS="$ac_cv_path_XARGS"
4218 if test -n "$XARGS"; then
4219 echo "$ac_t""$XARGS" 1>&6
4221 echo "$ac_t""no" 1>&6
4224 if test "$msyshost"; then
4227 tmp_DIRNAME=`dirname "$XARGS"`
4228 tmp_BASENAME=`basename "$XARGS"`
4229 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4230 XARGS="$tmp_PWD/$tmp_BASENAME"
4231 if test -e "$XARGS.exe"; then
4237 if test -z "$XARGS" -o "$XARGS" = ":"; then
4238 { echo "configure: error: xargs not found in \$PATH ." 1>&2; exit 1; }
4241 if test "$COMPILE_ENVIRONMENT"; then
4244 case "$target_os" in
4247 GCC_VERSION_FULL=`echo $CXX_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
4248 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
4250 if test "$GCC_VERSION_FULL" = "4.0.0" ; then
4252 GCC_BUILD=`echo $CXX_VERSION | $PERL -pe 's/^.*build ([^ )]*).*/$1/'`
4254 if test "$GCC_BUILD" = "4061" ; then
4255 { echo "configure: error: You are attempting to use Apple gcc 4.0 build 4061.
4256 This compiler was supplied with Xcode 2.0, and contains bugs that prevent it
4257 from building Mozilla. Upgrade to Xcode 2.1 or later." 1>&2; exit 1; }
4261 for ac_prog in pbbuild xcodebuild pbxbuild
4263 # Extract the first word of "$ac_prog", so it can be a program name with args.
4264 set dummy $ac_prog; ac_word=$2
4265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4266 echo "configure:4267: checking for $ac_word" >&5
4267 if eval "test \"`echo '$''{'ac_cv_path_PBBUILD'+set}'`\" = set"; then
4268 echo $ac_n "(cached) $ac_c" 1>&6
4272 ac_cv_path_PBBUILD="$PBBUILD" # Let the user override the test with a path.
4275 ac_cv_path_PBBUILD="$PBBUILD" # Let the user override the test with a dos path.
4278 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4280 for ac_dir in $ac_dummy; do
4281 test -z "$ac_dir" && ac_dir=.
4282 if test -f $ac_dir/$ac_word; then
4283 ac_cv_path_PBBUILD="$ac_dir/$ac_word"
4291 PBBUILD="$ac_cv_path_PBBUILD"
4292 if test -n "$PBBUILD"; then
4293 echo "$ac_t""$PBBUILD" 1>&6
4295 echo "$ac_t""no" 1>&6
4298 test -n "$PBBUILD" && break
4301 if test "$msyshost"; then
4304 tmp_DIRNAME=`dirname "$PBBUILD"`
4305 tmp_BASENAME=`basename "$PBBUILD"`
4306 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4307 PBBUILD="$tmp_PWD/$tmp_BASENAME"
4308 if test -e "$PBBUILD.exe"; then
4309 PBBUILD="$PBBUILD.exe"
4318 XCODEBUILD_VERSION=`$PBBUILD -version 2>/dev/null | xargs | sed -e 's/.*DevToolsCore-\([0-9]*\).*/\1/'`
4320 if test -n "$XCODEBUILD_VERSION" && test "$XCODEBUILD_VERSION" -ge 620 ; then
4326 # Extract the first word of "sdp", so it can be a program name with args.
4327 set dummy sdp; ac_word=$2
4328 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4329 echo "configure:4330: checking for $ac_word" >&5
4330 if eval "test \"`echo '$''{'ac_cv_path_SDP'+set}'`\" = set"; then
4331 echo $ac_n "(cached) $ac_c" 1>&6
4335 ac_cv_path_SDP="$SDP" # Let the user override the test with a path.
4338 ac_cv_path_SDP="$SDP" # Let the user override the test with a dos path.
4341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4342 ac_dummy="$PATH:/usr/bin:/Developer/Tools"
4343 for ac_dir in $ac_dummy; do
4344 test -z "$ac_dir" && ac_dir=.
4345 if test -f $ac_dir/$ac_word; then
4346 ac_cv_path_SDP="$ac_dir/$ac_word"
4351 test -z "$ac_cv_path_SDP" && ac_cv_path_SDP=":"
4355 SDP="$ac_cv_path_SDP"
4356 if test -n "$SDP"; then
4357 echo "$ac_t""$SDP" 1>&6
4359 echo "$ac_t""no" 1>&6
4362 if test "$msyshost"; then
4365 tmp_DIRNAME=`dirname "$SDP"`
4366 tmp_BASENAME=`basename "$SDP"`
4367 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4368 SDP="$tmp_PWD/$tmp_BASENAME"
4369 if test -e "$SDP.exe"; then
4385 # Check whether --enable-macos-target or --disable-macos-target was given.
4386 if test "${enable_macos_target+set}" = set; then
4387 enableval="$enable_macos_target"
4388 _MACOSX_DEPLOYMENT_TARGET=$enableval
4394 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
4395 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
4396 cat >> confdefs.h <<EOF
4397 #define __ENVIRONMENT_MAC_OS_X_VERION_MIN_REQUIRED__ $_MACOSX_DEPLOYMENT_TARGET
4401 case "${target_cpu}" in
4403 export MACOSX_DEPLOYMENT_TARGET=10.5
4406 export MACOSX_DEPLOYMENT_TARGET=10.5
4409 export MACOSX_DEPLOYMENT_TARGET=10.6
4420 # Check whether --with-macos-sdk or --without-macos-sdk was given.
4421 if test "${with_macos_sdk+set}" = set; then
4422 withval="$with_macos_sdk"
4423 MACOS_SDK_DIR=$withval
4430 if test "$MACOS_SDK_DIR"; then
4432 if test ! -d "$MACOS_SDK_DIR"; then
4433 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
4434 specify a valid SDK. SDKs are installed when the optional cross-development
4435 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
4438 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
4439 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
4440 { echo "configure: error: You need to upgrade the compiler version to 4.x" 1>&2; exit 1; }
4442 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
4443 CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}"
4445 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
4446 CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}"
4448 if test "$GCC_VERSION_FULL" = "4.0.0" ; then
4449 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
4454 echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6
4455 echo "configure:4456: checking for valid compiler/Mac OS X SDK combination" >&5
4457 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4458 ac_cpp='$CXXCPP $CPPFLAGS'
4459 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4460 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4461 cross_compiling=$ac_cv_prog_cxx_cross
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4467 int main() { return 0; }
4472 if { (eval echo configure:4473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4476 echo "configure: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4482 ac_cpp='$CPP $CPPFLAGS'
4483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4485 cross_compiling=$ac_cv_prog_cc_cross
4487 echo "$ac_t""$result" 1>&6
4489 if test "$result" = "no" ; then
4490 { echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; exit 1; }
4494 fi # COMPILE_ENVIRONMENT
4496 if test -n "$MAKE"; then
4497 if test `echo $MAKE | grep -c make.py` != 1; then
4503 cygwin*|mingw*|mks*|msvc*)
4504 for ac_prog in $GMAKE $NOT_PYMAKE make gmake
4506 # Extract the first word of "$ac_prog", so it can be a program name with args.
4507 set dummy $ac_prog; ac_word=$2
4508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4509 echo "configure:4510: checking for $ac_word" >&5
4510 if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4515 ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
4518 ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
4521 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4523 for ac_dir in $ac_dummy; do
4524 test -z "$ac_dir" && ac_dir=.
4525 if test -f $ac_dir/$ac_word; then
4526 ac_cv_path_GMAKE="$ac_dir/$ac_word"
4534 GMAKE="$ac_cv_path_GMAKE"
4535 if test -n "$GMAKE"; then
4536 echo "$ac_t""$GMAKE" 1>&6
4538 echo "$ac_t""no" 1>&6
4541 test -n "$GMAKE" && break
4543 test -n "$GMAKE" || GMAKE=":"
4545 if test "$msyshost"; then
4548 tmp_DIRNAME=`dirname "$GMAKE"`
4549 tmp_BASENAME=`basename "$GMAKE"`
4550 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4551 GMAKE="$tmp_PWD/$tmp_BASENAME"
4552 if test -e "$GMAKE.exe"; then
4560 for ac_prog in $GMAKE $NOT_PYMAKE gmake make
4562 # Extract the first word of "$ac_prog", so it can be a program name with args.
4563 set dummy $ac_prog; ac_word=$2
4564 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4565 echo "configure:4566: checking for $ac_word" >&5
4566 if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
4567 echo $ac_n "(cached) $ac_c" 1>&6
4571 ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
4574 ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
4577 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4579 for ac_dir in $ac_dummy; do
4580 test -z "$ac_dir" && ac_dir=.
4581 if test -f $ac_dir/$ac_word; then
4582 ac_cv_path_GMAKE="$ac_dir/$ac_word"
4590 GMAKE="$ac_cv_path_GMAKE"
4591 if test -n "$GMAKE"; then
4592 echo "$ac_t""$GMAKE" 1>&6
4594 echo "$ac_t""no" 1>&6
4597 test -n "$GMAKE" && break
4599 test -n "$GMAKE" || GMAKE=":"
4601 if test "$msyshost"; then
4604 tmp_DIRNAME=`dirname "$GMAKE"`
4605 tmp_BASENAME=`basename "$GMAKE"`
4606 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
4607 GMAKE="$tmp_PWD/$tmp_BASENAME"
4608 if test -e "$GMAKE.exe"; then
4616 if test "$GMAKE" = ":"; then
4617 { echo "configure: error: GNU make not found" 1>&2; exit 1; }
4621 if test "$COMPILE_ENVIRONMENT"; then
4623 # If we find X, set shell vars x_includes and x_libraries to the
4624 # paths, otherwise set no_x=yes.
4625 # Uses ac_ vars as temps to allow command line to override cache and checks.
4626 # --without-x overrides everything else, but does not touch the cache.
4627 echo $ac_n "checking for X""... $ac_c" 1>&6
4628 echo "configure:4629: checking for X" >&5
4630 # Check whether --with-x or --without-x was given.
4631 if test "${with_x+set}" = set; then
4636 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4637 if test "x$with_x" = xno; then
4638 # The user explicitly disabled X.
4641 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4642 # Both variables are already set.
4645 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4646 echo $ac_n "(cached) $ac_c" 1>&6
4648 # One or both of the vars are not set, and there is no cached value.
4649 ac_x_includes=NO ac_x_libraries=NO
4651 if mkdir conftestdir; then
4653 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4654 cat > Imakefile <<'EOF'
4656 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4658 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4659 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4660 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4661 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4662 for ac_extension in a so sl; do
4663 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4664 test -f $ac_im_libdir/libX11.$ac_extension; then
4665 ac_im_usrlibdir=$ac_im_libdir; break
4668 # Screen out bogus values from the imake configuration. They are
4669 # bogus both because they are the default anyway, and because
4670 # using them would break gcc on systems where it needs fixed includes.
4671 case "$ac_im_incroot" in
4673 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4675 case "$ac_im_usrlibdir" in
4677 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4684 if test "$ac_x_includes" = NO; then
4685 # Guess where to find include files, by looking for this one X11 .h file.
4686 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4688 # First, try using that file with no special directory specified.
4689 cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 #include <$x_direct_test_include>
4694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4695 { (eval echo configure:4696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4697 if test -z "$ac_err"; then
4699 # We can compile using X headers with no special include directory.
4703 echo "configure: failed program was:" >&5
4704 cat conftest.$ac_ext >&5
4706 # Look for the header file in a standard set of common directories.
4707 # Check X11 before X11Rn because it is often a symlink to the current release.
4710 /usr/X11R6/include \
4711 /usr/X11R5/include \
4712 /usr/X11R4/include \
4715 /usr/include/X11R6 \
4716 /usr/include/X11R5 \
4717 /usr/include/X11R4 \
4719 /usr/local/X11/include \
4720 /usr/local/X11R6/include \
4721 /usr/local/X11R5/include \
4722 /usr/local/X11R4/include \
4724 /usr/local/include/X11 \
4725 /usr/local/include/X11R6 \
4726 /usr/local/include/X11R5 \
4727 /usr/local/include/X11R4 \
4731 /usr/XFree86/include/X11 \
4734 /usr/local/include \
4735 /usr/unsupported/include \
4736 /usr/athena/include \
4737 /usr/local/x11r5/include \
4738 /usr/lpp/Xamples/include \
4740 /usr/openwin/include \
4741 /usr/openwin/share/include \
4744 if test -r "$ac_dir/$x_direct_test_include"; then
4745 ac_x_includes=$ac_dir
4751 fi # $ac_x_includes = NO
4753 if test "$ac_x_libraries" = NO; then
4754 # Check for the libraries.
4756 test -z "$x_direct_test_library" && x_direct_test_library=Xt
4757 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4759 # See if we find them without any special options.
4760 # Don't add to $LIBS permanently.
4761 ac_save_LIBS="$LIBS"
4762 LIBS="-l$x_direct_test_library $LIBS"
4763 cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4768 ${x_direct_test_function}()
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773 LIBS="$ac_save_LIBS"
4774 # We can link X programs with no special library path.
4777 echo "configure: failed program was:" >&5
4778 cat conftest.$ac_ext >&5
4780 LIBS="$ac_save_LIBS"
4781 # First see if replacing the include by lib works.
4782 # Check X11 before X11Rn because it is often a symlink to the current release.
4783 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4794 /usr/local/X11/lib \
4795 /usr/local/X11R6/lib \
4796 /usr/local/X11R5/lib \
4797 /usr/local/X11R4/lib \
4799 /usr/local/lib/X11 \
4800 /usr/local/lib/X11R6 \
4801 /usr/local/lib/X11R5 \
4802 /usr/local/lib/X11R4 \
4806 /usr/XFree86/lib/X11 \
4810 /usr/unsupported/lib \
4812 /usr/local/x11r5/lib \
4813 /usr/lpp/Xamples/lib \
4817 /usr/openwin/share/lib \
4820 for ac_extension in a so sl; do
4821 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4822 ac_x_libraries=$ac_dir
4829 fi # $ac_x_libraries = NO
4831 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4832 # Didn't find X anywhere. Cache the known absence of X.
4833 ac_cv_have_x="have_x=no"
4835 # Record where we found X for the cache.
4836 ac_cv_have_x="have_x=yes \
4837 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4841 eval "$ac_cv_have_x"
4844 if test "$have_x" != yes; then
4845 echo "$ac_t""$have_x" 1>&6
4848 # If each of the values was on the command line, it overrides each guess.
4849 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4850 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4851 # Update the cache value to reflect the command line values.
4852 ac_cv_have_x="have_x=yes \
4853 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4854 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4857 if test "$no_x" = yes; then
4858 # Not all programs may use this symbol, but it does not hurt to define it.
4859 cat >> confdefs.h <<\EOF
4860 #define X_DISPLAY_MISSING 1
4863 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4865 if test -n "$x_includes"; then
4866 X_CFLAGS="$X_CFLAGS -I$x_includes"
4869 # It would also be nice to do this for all -L options, not just this one.
4870 if test -n "$x_libraries"; then
4871 X_LIBS="$X_LIBS -L$x_libraries"
4872 # For Solaris; some versions of Sun CC require a space after -R and
4873 # others require no space. Words are not sufficient . . . .
4874 case "`(uname -sr) 2>/dev/null`" in
4876 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4877 echo "configure:4878: checking whether -R must be followed by a space" >&5
4878 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4891 echo "configure: failed program was:" >&5
4892 cat conftest.$ac_ext >&5
4897 if test $ac_R_nospace = yes; then
4898 echo "$ac_t""no" 1>&6
4899 X_LIBS="$X_LIBS -R$x_libraries"
4901 LIBS="$ac_xsave_LIBS -R $x_libraries"
4902 cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4914 echo "configure: failed program was:" >&5
4915 cat conftest.$ac_ext >&5
4920 if test $ac_R_space = yes; then
4921 echo "$ac_t""yes" 1>&6
4922 X_LIBS="$X_LIBS -R $x_libraries"
4924 echo "$ac_t""neither works" 1>&6
4927 LIBS="$ac_xsave_LIBS"
4931 # Check for system-dependent libraries X programs must link with.
4932 # Do this before checking for the system-independent R6 libraries
4933 # (-lICE), since we may need -lsocket or whatever for X linking.
4935 if test "$ISC" = yes; then
4936 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4938 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4939 # libraries were built with DECnet support. And karl@cs.umb.edu says
4940 # the Alpha needs dnet_stub (dnet does not exist).
4941 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4942 echo "configure:4943: checking for dnet_ntoa in -ldnet" >&5
4943 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4944 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4945 echo $ac_n "(cached) $ac_c" 1>&6
4947 ac_save_LIBS="$LIBS"
4949 cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952 /* Override any gcc2 internal prototype to avoid an error. */
4953 /* We use char because int might match the return type of a gcc2
4954 builtin and then its argument prototype would still apply. */
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963 eval "ac_cv_lib_$ac_lib_var=yes"
4965 echo "configure: failed program was:" >&5
4966 cat conftest.$ac_ext >&5
4968 eval "ac_cv_lib_$ac_lib_var=no"
4971 LIBS="$ac_save_LIBS"
4974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4975 echo "$ac_t""yes" 1>&6
4976 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4978 echo "$ac_t""no" 1>&6
4981 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4982 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4983 echo "configure:4984: checking for dnet_ntoa in -ldnet_stub" >&5
4984 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4985 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4986 echo $ac_n "(cached) $ac_c" 1>&6
4988 ac_save_LIBS="$LIBS"
4989 LIBS="-ldnet_stub $LIBS"
4990 cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4993 /* Override any gcc2 internal prototype to avoid an error. */
4994 /* We use char because int might match the return type of a gcc2
4995 builtin and then its argument prototype would still apply. */
5002 if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5004 eval "ac_cv_lib_$ac_lib_var=yes"
5006 echo "configure: failed program was:" >&5
5007 cat conftest.$ac_ext >&5
5009 eval "ac_cv_lib_$ac_lib_var=no"
5012 LIBS="$ac_save_LIBS"
5015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5016 echo "$ac_t""yes" 1>&6
5017 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5019 echo "$ac_t""no" 1>&6
5024 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5025 # to get the SysV transport functions.
5026 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5028 # The nsl library prevents programs from opening the X display
5029 # on Irix 5.2, according to dickey@clark.net.
5030 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5031 echo "configure:5032: checking for gethostbyname" >&5
5032 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5033 echo $ac_n "(cached) $ac_c" 1>&6
5035 cat > conftest.$ac_ext <<EOF
5036 #line 5037 "configure"
5037 #include "confdefs.h"
5038 /* System header to define __stub macros and hopefully few prototypes,
5039 which can conflict with char gethostbyname(); below. */
5041 /* Override any gcc2 internal prototype to avoid an error. */
5042 /* We use char because int might match the return type of a gcc2
5043 builtin and then its argument prototype would still apply. */
5044 char gethostbyname();
5048 /* The GNU C library defines this for functions which it implements
5049 to always fail with ENOSYS. Some functions are actually named
5050 something starting with __ and the normal name is an alias. */
5051 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061 eval "ac_cv_func_gethostbyname=yes"
5063 echo "configure: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5066 eval "ac_cv_func_gethostbyname=no"
5071 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5072 echo "$ac_t""yes" 1>&6
5075 echo "$ac_t""no" 1>&6
5078 if test $ac_cv_func_gethostbyname = no; then
5079 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5080 echo "configure:5081: checking for gethostbyname in -lnsl" >&5
5081 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5082 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5083 echo $ac_n "(cached) $ac_c" 1>&6
5085 ac_save_LIBS="$LIBS"
5087 cat > conftest.$ac_ext <<EOF
5088 #line 5089 "configure"
5089 #include "confdefs.h"
5090 /* Override any gcc2 internal prototype to avoid an error. */
5091 /* We use char because int might match the return type of a gcc2
5092 builtin and then its argument prototype would still apply. */
5093 char gethostbyname();
5099 if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5101 eval "ac_cv_lib_$ac_lib_var=yes"
5103 echo "configure: failed program was:" >&5
5104 cat conftest.$ac_ext >&5
5106 eval "ac_cv_lib_$ac_lib_var=no"
5109 LIBS="$ac_save_LIBS"
5112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5113 echo "$ac_t""yes" 1>&6
5114 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5116 echo "$ac_t""no" 1>&6
5121 # lieder@skyler.mavd.honeywell.com says without -lsocket,
5122 # socket/setsockopt and other routines are undefined under SCO ODT
5123 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
5124 # on later versions), says simon@lia.di.epfl.ch: it contains
5125 # gethostby* variants that don't use the nameserver (or something).
5126 # -lsocket must be given before -lnsl if both are needed.
5127 # We assume that if connect needs -lnsl, so does gethostbyname.
5128 echo $ac_n "checking for connect""... $ac_c" 1>&6
5129 echo "configure:5130: checking for connect" >&5
5130 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5131 echo $ac_n "(cached) $ac_c" 1>&6
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 /* System header to define __stub macros and hopefully few prototypes,
5137 which can conflict with char connect(); below. */
5139 /* Override any gcc2 internal prototype to avoid an error. */
5140 /* We use char because int might match the return type of a gcc2
5141 builtin and then its argument prototype would still apply. */
5146 /* The GNU C library defines this for functions which it implements
5147 to always fail with ENOSYS. Some functions are actually named
5148 something starting with __ and the normal name is an alias. */
5149 #if defined (__stub_connect) || defined (__stub___connect)
5157 if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5159 eval "ac_cv_func_connect=yes"
5161 echo "configure: failed program was:" >&5
5162 cat conftest.$ac_ext >&5
5164 eval "ac_cv_func_connect=no"
5169 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5170 echo "$ac_t""yes" 1>&6
5173 echo "$ac_t""no" 1>&6
5176 if test $ac_cv_func_connect = no; then
5177 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5178 echo "configure:5179: checking for connect in -lsocket" >&5
5179 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5181 echo $ac_n "(cached) $ac_c" 1>&6
5183 ac_save_LIBS="$LIBS"
5184 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5185 cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 /* Override any gcc2 internal prototype to avoid an error. */
5189 /* We use char because int might match the return type of a gcc2
5190 builtin and then its argument prototype would still apply. */
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5199 eval "ac_cv_lib_$ac_lib_var=yes"
5201 echo "configure: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5204 eval "ac_cv_lib_$ac_lib_var=no"
5207 LIBS="$ac_save_LIBS"
5210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5211 echo "$ac_t""yes" 1>&6
5212 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5214 echo "$ac_t""no" 1>&6
5219 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5220 echo $ac_n "checking for remove""... $ac_c" 1>&6
5221 echo "configure:5222: checking for remove" >&5
5222 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5223 echo $ac_n "(cached) $ac_c" 1>&6
5225 cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228 /* System header to define __stub macros and hopefully few prototypes,
5229 which can conflict with char remove(); below. */
5231 /* Override any gcc2 internal prototype to avoid an error. */
5232 /* We use char because int might match the return type of a gcc2
5233 builtin and then its argument prototype would still apply. */
5238 /* The GNU C library defines this for functions which it implements
5239 to always fail with ENOSYS. Some functions are actually named
5240 something starting with __ and the normal name is an alias. */
5241 #if defined (__stub_remove) || defined (__stub___remove)
5249 if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5251 eval "ac_cv_func_remove=yes"
5253 echo "configure: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5256 eval "ac_cv_func_remove=no"
5261 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5262 echo "$ac_t""yes" 1>&6
5265 echo "$ac_t""no" 1>&6
5268 if test $ac_cv_func_remove = no; then
5269 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5270 echo "configure:5271: checking for remove in -lposix" >&5
5271 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5273 echo $ac_n "(cached) $ac_c" 1>&6
5275 ac_save_LIBS="$LIBS"
5276 LIBS="-lposix $LIBS"
5277 cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* Override any gcc2 internal prototype to avoid an error. */
5281 /* We use char because int might match the return type of a gcc2
5282 builtin and then its argument prototype would still apply. */
5289 if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5291 eval "ac_cv_lib_$ac_lib_var=yes"
5293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5296 eval "ac_cv_lib_$ac_lib_var=no"
5299 LIBS="$ac_save_LIBS"
5302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5303 echo "$ac_t""yes" 1>&6
5304 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5306 echo "$ac_t""no" 1>&6
5311 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5312 echo $ac_n "checking for shmat""... $ac_c" 1>&6
5313 echo "configure:5314: checking for shmat" >&5
5314 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5317 cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 /* System header to define __stub macros and hopefully few prototypes,
5321 which can conflict with char shmat(); below. */
5323 /* Override any gcc2 internal prototype to avoid an error. */
5324 /* We use char because int might match the return type of a gcc2
5325 builtin and then its argument prototype would still apply. */
5330 /* The GNU C library defines this for functions which it implements
5331 to always fail with ENOSYS. Some functions are actually named
5332 something starting with __ and the normal name is an alias. */
5333 #if defined (__stub_shmat) || defined (__stub___shmat)
5341 if { (eval echo configure:5342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5343 eval "ac_cv_func_shmat=yes"
5345 echo "configure: failed program was:" >&5
5346 cat conftest.$ac_ext >&5
5348 eval "ac_cv_func_shmat=no"
5353 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5354 echo "$ac_t""yes" 1>&6
5357 echo "$ac_t""no" 1>&6
5360 if test $ac_cv_func_shmat = no; then
5361 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5362 echo "configure:5363: checking for shmat in -lipc" >&5
5363 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5364 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5365 echo $ac_n "(cached) $ac_c" 1>&6
5367 ac_save_LIBS="$LIBS"
5369 cat > conftest.$ac_ext <<EOF
5370 #line 5371 "configure"
5371 #include "confdefs.h"
5372 /* Override any gcc2 internal prototype to avoid an error. */
5373 /* We use char because int might match the return type of a gcc2
5374 builtin and then its argument prototype would still apply. */
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383 eval "ac_cv_lib_$ac_lib_var=yes"
5385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5388 eval "ac_cv_lib_$ac_lib_var=no"
5391 LIBS="$ac_save_LIBS"
5394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5395 echo "$ac_t""yes" 1>&6
5396 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5398 echo "$ac_t""no" 1>&6
5404 # Check for libraries that X11R6 Xt/Xaw programs need.
5405 ac_save_LDFLAGS="$LDFLAGS"
5406 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5407 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5408 # check for ICE first), but we must link in the order -lSM -lICE or
5409 # we get undefined symbols. So assume we have SM if we have ICE.
5410 # These have to be linked with before -lX11, unlike the other
5411 # libraries we check for below, so use a different variable.
5412 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5413 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5414 echo "configure:5415: checking for IceConnectionNumber in -lICE" >&5
5415 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5416 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5417 echo $ac_n "(cached) $ac_c" 1>&6
5419 ac_save_LIBS="$LIBS"
5420 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5421 cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* Override any gcc2 internal prototype to avoid an error. */
5425 /* We use char because int might match the return type of a gcc2
5426 builtin and then its argument prototype would still apply. */
5427 char IceConnectionNumber();
5430 IceConnectionNumber()
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435 eval "ac_cv_lib_$ac_lib_var=yes"
5437 echo "configure: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
5440 eval "ac_cv_lib_$ac_lib_var=no"
5443 LIBS="$ac_save_LIBS"
5446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5447 echo "$ac_t""yes" 1>&6
5448 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5450 echo "$ac_t""no" 1>&6
5453 LDFLAGS="$ac_save_LDFLAGS"
5460 fi # COMPILE_ENVIRONMENT
5464 AR_EXTRACT='$(AR) x'
5479 MOZ_USER_DIR=".mozilla"
5481 MOZ_JS_LIBS='-L$(libdir) -lmozjs'
5482 MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
5484 MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
5486 USE_DEPENDENT_LIBS=1
5488 _PLATFORM_DEFAULT_TOOLKIT=cairo-gtk2
5490 if test -n "$CROSS_COMPILE"; then
5491 OS_TARGET="${target_os}"
5492 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
5494 case "${target_os}" in
5495 linux*) OS_ARCH=Linux OS_TARGET=Linux ;;
5496 kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD OS_TARGET=GNU_kFreeBSD ;;
5497 gnu*) OS_ARCH=GNU ;;
5498 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
5499 mingw*) OS_ARCH=WINNT ;;
5500 wince*) OS_ARCH=WINCE ;;
5501 winmo*) OS_ARCH=WINCE ;;
5502 darwin*) OS_ARCH=Darwin OS_TARGET=Darwin ;;
5505 arm-android-eabi) OS_ARCH=Linux OS_TARGET=Android ;;
5508 OS_TARGET=`uname -s`
5509 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
5510 OS_RELEASE=`uname -r`
5513 # Before this used `uname -m` when not cross compiling
5514 # but that breaks when you have a 64 bit kernel with a 32 bit userland.
5515 OS_TEST="${target_cpu}"
5519 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
5521 #######################################################################
5522 # Master "Core Components" macros for getting the OS target #
5523 #######################################################################
5526 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
5527 # cross-compilation.
5531 # Define and override various archtecture-specific variables, including
5540 case "$HOST_OS_ARCH" in
5541 cygwin*|mingw*|mks*|msvc*)
5554 if test -z "$GNU_CC"; then
5555 if test "`$CC -V 2>&1 | egrep -c 'Sun.*C '`" != "0"; then
5560 if test -z "$GNU_CXX"; then
5561 if test "`$CXX -V 2>&1 | egrep -c 'Sun.*C\+\+ '`" != "0"; then
5562 SOLARIS_SUNPRO_CXX=1
5578 if "`cat /etc/bcheckrc | grep -c NCR 2>/dev/null`" != "0"; then
5581 HOST_OS_ARCH=UNIXWARE
5593 HOST_OS_ARCH=OpenVMS
5603 SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX-M)
5607 HOST_OS_ARCH=UNIXWARE
5613 if test -z "$CROSS_COMPILE" ; then
5619 # If uname -s returns "Windows_NT", we assume that we are using
5620 # the uname.exe in MKS toolkit.
5622 # The -r option of MKS uname only returns the major version number.
5623 # So we need to use its -v option to get the minor version number.
5624 # Moreover, it doesn't have the -p option, so we need to use uname -m.
5628 OS_MINOR_RELEASE=`uname -v`
5629 if test "$OS_MINOR_RELEASE" = "00"; then
5632 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
5634 CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
5636 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
5637 # the uname.exe in the Cygwin tools.
5638 # Prior to the Beta 20 release, Cygwin was called GNU-Win32.
5639 # If uname -s returns "CYGWIN32/NT", we assume that we are using
5640 # the uname.exe in the GNU-Win32 tools.
5641 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
5642 # the uname.exe in the MSYS tools.
5644 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
5649 OS_RELEASE=`uname -v`.`uname -r`
5650 OS_TEST=${target_cpu}
5651 if test -z "$GNU_CC"; then
5652 if test "`$CC -qversion 2>&1 | egrep -c 'IBM XL'`" != "0"; then
5667 if "`cat /etc/bcheckrc | grep -c NCR 2>/dev/null`" != "0"; then
5671 OS_RELEASE=`uname -v`
5695 OS_RELEASE=`uname -v`
5701 OS_RELEASE=`uname -v`
5704 if test "$OS_TARGET" != "NTO"; then
5706 OS_RELEASE=`uname -v | sed 's/^\([0-9]\)\([0-9]*\)$/\1.\2/'`
5715 SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX-M)
5721 OS_RELEASE=`uname -v`
5725 case "${target_os}" in
5728 WINCE_WINDOWS_MOBILE=1
5729 cat >> confdefs.h <<\EOF
5730 #define WINCE_WINDOWS_MOBILE 1
5740 case "${target_cpu}" in
5751 if test -z "$CROSS_COMPILE" ; then
5759 if test "$OS_ARCH" = "NCR"; then
5761 OS_RELEASE=`awk '{print $3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$/\2.\3/'`
5765 # Only set CPU_ARCH if we recognize the value of OS_TEST
5776 powerpc | ppc | rs6000)
5780 Alpha | alpha | ALPHA)
5813 if test -z "$OS_TARGET"; then
5816 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
5821 INTEL_ARCHITECTURE=1
5824 if test "$GNU_CC"; then
5825 # FIXME: Let us build with strict aliasing. bug 414641.
5826 CFLAGS="$CFLAGS -fno-strict-aliasing"
5827 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
5828 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
5829 DSO_LDOPTS='-shared'
5830 if test "$GCC_USE_GNU_LD"; then
5831 # Don't allow undefined symbols in libraries
5832 DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
5834 WARNINGS_AS_ERRORS='-Werror'
5836 DSO_PIC_CFLAGS='-fPIC'
5837 ASFLAGS="$ASFLAGS -fPIC"
5838 _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti
5839 _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti
5840 _MOZ_EXCEPTIONS_FLAGS_ON='-fexceptions'
5841 _MOZ_EXCEPTIONS_FLAGS_OFF='-fno-exceptions'
5843 # Turn on GNU specific features
5844 # -Wall - turn on all warnings
5845 # -pedantic - make compiler warn about non-ANSI stuff, and
5846 # be a little bit stricter
5847 # Warnings slamm took out for now (these were giving more noise than help):
5848 # -Wbad-function-cast - warns when casting a function to a new return type
5849 # -Wshadow - removed because it generates more noise than help --pete
5850 _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith"
5851 if test -z "$INTEL_CC"; then
5852 # Don't use -Wcast-align with ICC
5854 # And don't use it on hppa, ia64, sparc, arm, since it's noisy there
5855 hppa | ia64 | sparc | arm)
5858 _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wcast-align"
5865 if test -z "$INTEL_CC"; then
5866 _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -W"
5869 _DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
5870 _USE_CPP_INCLUDE_FLAG=1
5871 elif test "$SOLARIS_SUNPRO_CC"; then
5873 if test "$CPU_ARCH" = "sparc"; then
5874 # for Sun Studio on Solaris/SPARC
5875 DSO_PIC_CFLAGS='-xcode=pic32'
5877 DSO_PIC_CFLAGS='-KPIC'
5879 _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
5881 MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
5882 MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
5884 DSO_LDOPTS='-shared'
5885 if test "$GNU_LD"; then
5886 # Don't allow undefined symbols in libraries
5887 DSO_LDOPTS="$DSO_LDOPTS -z defs"
5891 DSO_PIC_CFLAGS='-KPIC'
5892 _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
5895 if test "$GNU_CXX"; then
5896 # FIXME: Let us build with strict aliasing. bug 414641.
5897 CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
5898 # Turn on GNU specific features
5899 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
5900 if test -z "$INTEL_CC"; then
5901 # Don't use -Wcast-align with ICC
5903 # And don't use it on hppa, ia64, sparc, arm, since it's noisy there
5904 hppa | ia64 | sparc | arm)
5907 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wcast-align"
5912 _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/js-confdefs.h'
5913 _USE_CPP_INCLUDE_FLAG=1
5915 echo $ac_n "checking whether the compiler supports -Wno-invalid-offsetof""... $ac_c" 1>&6
5916 echo "configure:5917: checking whether the compiler supports -Wno-invalid-offsetof" >&5
5917 if eval "test \"`echo '$''{'ac_has_wno_invalid_offsetof'+set}'`\" = set"; then
5918 echo $ac_n "(cached) $ac_c" 1>&6
5923 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5924 ac_cpp='$CXXCPP $CPPFLAGS'
5925 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5926 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5927 cross_compiling=$ac_cv_prog_cxx_cross
5929 _SAVE_CXXFLAGS="$CXXFLAGS"
5930 CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-invalid-offsetof"
5931 cat > conftest.$ac_ext <<EOF
5932 #line 5933 "configure"
5933 #include "confdefs.h"
5939 if { (eval echo configure:5940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5941 ac_has_wno_invalid_offsetof="yes"
5943 echo "configure: failed program was:" >&5
5944 cat conftest.$ac_ext >&5
5946 ac_has_wno_invalid_offsetof="no"
5949 CXXFLAGS="$_SAVE_CXXFLAGS"
5951 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5952 ac_cpp='$CPP $CPPFLAGS'
5953 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5954 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5955 cross_compiling=$ac_cv_prog_cc_cross
5960 echo "$ac_t""$ac_has_wno_invalid_offsetof" 1>&6
5961 if test "$ac_has_wno_invalid_offsetof" = "yes"; then
5962 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-invalid-offsetof"
5965 echo $ac_n "checking whether the compiler supports -Wno-variadic-macros""... $ac_c" 1>&6
5966 echo "configure:5967: checking whether the compiler supports -Wno-variadic-macros" >&5
5967 if eval "test \"`echo '$''{'ac_has_wno_variadic_macros'+set}'`\" = set"; then
5968 echo $ac_n "(cached) $ac_c" 1>&6
5973 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5974 ac_cpp='$CXXCPP $CPPFLAGS'
5975 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5976 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5977 cross_compiling=$ac_cv_prog_cxx_cross
5979 _SAVE_CXXFLAGS="$CXXFLAGS"
5980 CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-variadic-macros"
5981 cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5989 if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5991 ac_has_wno_variadic_macros="yes"
5993 echo "configure: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5996 ac_has_wno_variadic_macros="no"
5999 CXXFLAGS="$_SAVE_CXXFLAGS"
6001 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6002 ac_cpp='$CPP $CPPFLAGS'
6003 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6004 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6005 cross_compiling=$ac_cv_prog_cc_cross
6010 echo "$ac_t""$ac_has_wno_variadic_macros" 1>&6
6011 if test "$ac_has_wno_variadic_macros" = "yes"; then
6012 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-variadic-macros"
6015 echo $ac_n "checking whether the compiler supports -Werror=return-type""... $ac_c" 1>&6
6016 echo "configure:6017: checking whether the compiler supports -Werror=return-type" >&5
6017 if eval "test \"`echo '$''{'ac_has_werror_return_type'+set}'`\" = set"; then
6018 echo $ac_n "(cached) $ac_c" 1>&6
6023 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6024 ac_cpp='$CXXCPP $CPPFLAGS'
6025 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6026 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6027 cross_compiling=$ac_cv_prog_cxx_cross
6029 _SAVE_CXXFLAGS="$CXXFLAGS"
6030 CXXFLAGS="$CXXFLAGS -Werror=return-type"
6031 cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6039 if { (eval echo configure:6040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6041 ac_has_werror_return_type="yes"
6043 echo "configure: failed program was:" >&5
6044 cat conftest.$ac_ext >&5
6046 ac_has_werror_return_type="no"
6049 CXXFLAGS="$_SAVE_CXXFLAGS"
6051 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6052 ac_cpp='$CPP $CPPFLAGS'
6053 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6054 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6055 cross_compiling=$ac_cv_prog_cc_cross
6060 echo "$ac_t""$ac_has_werror_return_type" 1>&6
6061 if test "$ac_has_werror_return_type" = "yes"; then
6062 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Werror=return-type"
6066 _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)'
6070 MKSHLIB_UNFORCE_ALL=
6072 if test "$COMPILE_ENVIRONMENT"; then
6073 if test "$GNU_CC"; then
6074 echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6
6075 echo "configure:6076: checking whether ld has archive extraction flags" >&5
6076 if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then
6077 echo $ac_n "(cached) $ac_c" 1>&6
6079 _SAVE_LDFLAGS=$LDFLAGS; _SAVE_LIBS=$LIBS
6080 ac_cv_mkshlib_force_and_unforce="no"
6081 exec 3<&0 <<LOOP_INPUT
6082 force="-Wl,--whole-archive"; unforce="-Wl,--no-whole-archive"
6083 force="-Wl,-z -Wl,allextract"; unforce="-Wl,-z -Wl,defaultextract"
6084 force="-Wl,-all"; unforce="-Wl,-none"
6091 cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6101 ac_cv_mkshlib_force_and_unforce=$line; break
6103 echo "configure: failed program was:" >&5
6104 cat conftest.$ac_ext >&5
6109 LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS
6113 if test "$ac_cv_mkshlib_force_and_unforce" = "no"; then
6114 echo "$ac_t""no" 1>&6
6116 echo "$ac_t""yes" 1>&6
6117 eval $ac_cv_mkshlib_force_and_unforce
6118 MKSHLIB_FORCE_ALL=$force
6119 MKSHLIB_UNFORCE_ALL=$unforce
6122 fi # COMPILE_ENVIRONMENT
6124 if test "$COMPILE_ENVIRONMENT"; then
6125 configure_static_assert_macros='
6126 #define CONFIGURE_STATIC_ASSERT(condition) CONFIGURE_STATIC_ASSERT_IMPL(condition, __LINE__)
6127 #define CONFIGURE_STATIC_ASSERT_IMPL(condition, line) CONFIGURE_STATIC_ASSERT_IMPL2(condition, line)
6128 #define CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) typedef int static_assert_line_##line[(condition) ? 1 : -1]
6131 echo $ac_n "checking that static assertion macros used in autoconf tests work""... $ac_c" 1>&6
6132 echo "configure:6133: checking that static assertion macros used in autoconf tests work" >&5
6133 if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then
6134 echo $ac_n "(cached) $ac_c" 1>&6
6138 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6139 ac_cpp='$CPP $CPPFLAGS'
6140 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6141 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6142 cross_compiling=$ac_cv_prog_cc_cross
6144 ac_cv_static_assertion_macros_work="yes"
6145 cat > conftest.$ac_ext <<EOF
6146 #line 6147 "configure"
6147 #include "confdefs.h"
6148 $configure_static_assert_macros
6150 CONFIGURE_STATIC_ASSERT(1)
6153 if { (eval echo configure:6154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6156 echo "configure: failed program was:" >&5
6157 cat conftest.$ac_ext >&5
6159 ac_cv_static_assertion_macros_work="no"
6162 cat > conftest.$ac_ext <<EOF
6163 #line 6164 "configure"
6164 #include "confdefs.h"
6165 $configure_static_assert_macros
6167 CONFIGURE_STATIC_ASSERT(0)
6170 if { (eval echo configure:6171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6172 ac_cv_static_assertion_macros_work="no"
6174 echo "configure: failed program was:" >&5
6175 cat conftest.$ac_ext >&5
6179 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6180 ac_cpp='$CXXCPP $CPPFLAGS'
6181 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6182 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6183 cross_compiling=$ac_cv_prog_cxx_cross
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 $configure_static_assert_macros
6190 CONFIGURE_STATIC_ASSERT(1)
6193 if { (eval echo configure:6194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6196 echo "configure: failed program was:" >&5
6197 cat conftest.$ac_ext >&5
6199 ac_cv_static_assertion_macros_work="no"
6202 cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205 $configure_static_assert_macros
6207 CONFIGURE_STATIC_ASSERT(0)
6210 if { (eval echo configure:6211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6212 ac_cv_static_assertion_macros_work="no"
6214 echo "configure: failed program was:" >&5
6215 cat conftest.$ac_ext >&5
6219 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6220 ac_cpp='$CPP $CPPFLAGS'
6221 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6222 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6223 cross_compiling=$ac_cv_prog_cc_cross
6228 echo "$ac_t"""$ac_cv_static_assertion_macros_work"" 1>&6
6229 if test "$ac_cv_static_assertion_macros_work" = "no"; then
6230 { echo "configure: error: Compiler cannot compile macros used in autoconf tests." 1>&2; exit 1; }
6232 fi # COMPILE_ENVIRONMENT
6234 if test "$COMPILE_ENVIRONMENT"; then
6237 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6238 ac_cpp='$CPP $CPPFLAGS'
6239 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6240 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6241 cross_compiling=$ac_cv_prog_cc_cross
6243 echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6
6244 echo "configure:6245: checking for 64-bit OS" >&5
6245 cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 $configure_static_assert_macros
6250 CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)
6253 if { (eval echo configure:6254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6257 echo "configure: failed program was:" >&5
6258 cat conftest.$ac_ext >&5
6263 echo "$ac_t"""$result"" 1>&6
6264 if test "$result" = "yes"; then
6265 cat >> confdefs.h <<\EOF
6266 #define HAVE_64BIT_OS 1
6273 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6274 ac_cpp='$CPP $CPPFLAGS'
6275 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6276 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6277 cross_compiling=$ac_cv_prog_cc_cross
6279 fi # COMPILE_ENVIRONMENT
6281 MOZ_OS2_HIGH_MEMORY=1
6282 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
6283 if test "${enable_os2_high_mem+set}" = set; then
6284 enableval="$enable_os2_high_mem"
6285 if test "$enableval" = "no"; then
6286 MOZ_OS2_HIGH_MEMORY=
6287 elif test "$enableval" = "yes"; then
6288 MOZ_OS2_HIGH_MEMORY=1
6290 { echo "configure: error: Option, os2-high-mem, does not take an argument ($enableval)." 1>&2; exit 1; }
6296 # Check whether --enable-profiling or --disable-profiling was given.
6297 if test "${enable_profiling+set}" = set; then
6298 enableval="$enable_profiling"
6299 if test "$enableval" = "yes"; then
6301 elif test "$enableval" = "no"; then
6304 { echo "configure: error: Option, profiling, does not take an argument ($enableval)." 1>&2; exit 1; }
6311 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE -DNO_X11"
6312 HOST_NSPR_MDCPUCFG='\"md/_beos.cfg\"'
6313 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
6316 *cygwin*|*mingw*|*mks*|*msvc*|*wince|*winmo)
6317 # we need Python 2.5 on Windows
6319 if test -n "$_WIN32_MSVC"; then
6321 HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
6322 HOST_CFLAGS="$HOST_CFLAGS -TC -nologo -Fd\$(HOST_PDBFILE)"
6323 HOST_RANLIB='echo ranlib'
6325 HOST_CFLAGS="$HOST_CFLAGS -mno-cygwin"
6327 HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11"
6328 HOST_NSPR_MDCPUCFG='\"md/_winnt.cfg\"'
6329 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
6330 HOST_BIN_SUFFIX=.exe
6333 PERL="/bin/sh ${_topsrcdir}/build/msys-perl-wrapper"
6336 CYGWIN_WRAPPER="${srcdir}/build/cygwin-wrapper"
6337 if test "`echo ${srcdir} | grep -c ^/ 2>/dev/null`" = 0; then
6339 CYGWIN_WRAPPER="${_pwd}/${srcdir}/build/cygwin-wrapper"
6341 if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then
6343 PERL="${CYGWIN_WRAPPER} $PERL"
6346 if test "`${PYTHON} -c 'import sys; print sys.platform;'`" != "cygwin"; then
6347 PYTHON="${CYGWIN_WRAPPER} $PYTHON"
6352 case "${host_cpu}" in
6354 HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_"
6360 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
6361 HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
6362 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
6365 *-linux*|*-kfreebsd*-gnu|*-gnu*)
6366 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
6367 HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
6368 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
6372 HOST_CFLAGS="$HOST_CFLAGS -DXP_OS2 -DNO_X11 -Zomf"
6373 HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"'
6374 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
6375 HOST_BIN_SUFFIX=.exe
6380 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
6381 HOST_NSPR_MDCPUCFG='\"md/_osf1.cfg\"'
6382 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
6386 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
6387 HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
6391 echo $ac_n "checking for Python version >= $PYTHON_VERSION but not 3.x""... $ac_c" 1>&6
6392 echo "configure:6393: checking for Python version >= $PYTHON_VERSION but not 3.x" >&5
6394 $PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1] or sys.version[:2] != '2.')" $PYTHON_VERSION
6397 if test "$_python_res" != 0; then
6398 { echo "configure: error: Python $PYTHON_VERSION or higher (but not Python 3.x) is required." 1>&2; exit 1; }
6400 echo "$ac_t""yes" 1>&6
6405 cat >> confdefs.h <<\EOF
6409 if test ! "$GNU_CC"; then
6410 if test ! "$HAVE_64BIT_OS"; then
6411 # Compiling with Visual Age C++ object model compat is the
6412 # default. To compile with object model ibm, add
6413 # AIX_OBJMODEL=ibm to .mozconfig.
6414 if test "$AIX_OBJMODEL" = "ibm"; then
6415 CXXFLAGS="$CXXFLAGS -qobjmodel=ibm"
6423 DSO_LDOPTS='-qmkshrobj=1'
6424 DSO_CFLAGS='-qflag=w:w'
6426 LDFLAGS="$LDFLAGS -Wl,-brtl -blibpath:/usr/lib:/lib"
6428 MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
6429 MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
6430 if test "$COMPILE_ENVIRONMENT"; then
6433 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6434 ac_cpp='$CXXCPP $CPPFLAGS'
6435 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6436 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6437 cross_compiling=$ac_cv_prog_cxx_cross
6439 echo $ac_n "checking for IBM XLC/C++ compiler version >= 9.0.0.7""... $ac_c" 1>&6
6440 echo "configure:6441: checking for IBM XLC/C++ compiler version >= 9.0.0.7" >&5
6441 cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6446 #if (__IBMCPP__ < 900)
6447 #error "Bad compiler"
6451 if { (eval echo configure:6452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6455 echo "configure: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6461 if test -n "$_BAD_COMPILER"; then
6462 echo "$ac_t""no" 1>&6
6463 { echo "configure: error: IBM XLC/C++ 9.0.0.7 or higher is required to build." 1>&2; exit 1; }
6465 echo "$ac_t""yes" 1>&6
6468 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6469 ac_cpp='$CPP $CPPFLAGS'
6470 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6471 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6472 cross_compiling=$ac_cv_prog_cc_cross
6474 TARGET_COMPILER_ABI="ibmc"
6475 CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
6476 CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
6479 case "${target_os}" in
6484 if test "$COMPILE_ENVIRONMENT"; then
6485 for ac_hdr in sys/inttypes.h
6487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6489 echo "configure:6490: checking for $ac_hdr" >&5
6490 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6491 echo $ac_n "(cached) $ac_c" 1>&6
6493 cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6499 { (eval echo configure:6500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6501 if test -z "$ac_err"; then
6503 eval "ac_cv_header_$ac_safe=yes"
6506 echo "configure: failed program was:" >&5
6507 cat conftest.$ac_ext >&5
6509 eval "ac_cv_header_$ac_safe=no"
6513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6514 echo "$ac_t""yes" 1>&6
6515 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6516 cat >> confdefs.h <<EOF
6517 #define $ac_tr_hdr 1
6521 echo "$ac_t""no" 1>&6
6526 cat >> confdefs.h <<\EOF
6527 #define JS_SYS_TYPES_H_DEFINES_EXACT_SIZE_TYPES 1
6530 cat >> confdefs.h <<\EOF
6531 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6538 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
6539 _PLATFORM_DEFAULT_TOOLKIT="cairo-beos"
6540 DSO_LDOPTS='-nostart'
6541 TK_LIBS='-lbe -lroot'
6543 if test "$COMPILE_ENVIRONMENT"; then
6544 echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6
6545 echo "configure:6546: checking for main in -lbind" >&5
6546 ac_lib_var=`echo bind'_'main | sed 'y%./+-%__p_%'`
6547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6548 echo $ac_n "(cached) $ac_c" 1>&6
6550 ac_save_LIBS="$LIBS"
6552 cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6560 if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6562 eval "ac_cv_lib_$ac_lib_var=yes"
6564 echo "configure: failed program was:" >&5
6565 cat conftest.$ac_ext >&5
6567 eval "ac_cv_lib_$ac_lib_var=no"
6570 LIBS="$ac_save_LIBS"
6573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6574 echo "$ac_t""yes" 1>&6
6577 echo "$ac_t""no" 1>&6
6580 echo $ac_n "checking for main in -lzeta""... $ac_c" 1>&6
6581 echo "configure:6582: checking for main in -lzeta" >&5
6582 ac_lib_var=`echo zeta'_'main | sed 'y%./+-%__p_%'`
6583 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6584 echo $ac_n "(cached) $ac_c" 1>&6
6586 ac_save_LIBS="$LIBS"
6588 cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6596 if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598 eval "ac_cv_lib_$ac_lib_var=yes"
6600 echo "configure: failed program was:" >&5
6601 cat conftest.$ac_ext >&5
6603 eval "ac_cv_lib_$ac_lib_var=no"
6606 LIBS="$ac_save_LIBS"
6609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6610 echo "$ac_t""yes" 1>&6
6613 echo "$ac_t""no" 1>&6
6617 _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar"
6618 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar"
6621 MOZ_USER_DIR="Mozilla"
6633 _WARNINGS_CFLAGS="-Wall"
6634 _WARNINGS_CXXFLAGS="-Wall"
6635 # The test above doesn't work properly, at least on 3.1.
6636 MKSHLIB_FORCE_ALL=''
6637 MKSHLIB_UNFORCE_ALL=''
6643 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
6644 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
6645 # If we're building with --enable-profiling, we need a frame pointer.
6646 if test -z "$MOZ_PROFILING"; then
6647 MOZ_OPTIMIZE_FLAGS="-O3 -fomit-frame-pointer"
6649 MOZ_OPTIMIZE_FLAGS="-O3 -fno-omit-frame-pointer"
6652 CFLAGS="$CFLAGS -fpascal-strings -fno-common"
6653 CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common"
6656 STRIP="$STRIP -x -S"
6657 _PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
6658 TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
6659 LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
6660 LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
6661 # The ExceptionHandling framework is needed for Objective-C exception
6662 # logging code in nsObjCExceptions.h. Currently we only use that in debug
6664 MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"
6666 if test "x$enable_dtrace" = "xyes"; then
6667 echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
6669 echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6
6670 echo "configure:6671: checking for -dead_strip option to ld" >&5
6671 _SAVE_LDFLAGS=$LDFLAGS
6672 LDFLAGS="$LDFLAGS -Wl,-dead_strip"
6673 cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685 echo "configure: failed program was:" >&5
6686 cat conftest.$ac_ext >&5
6691 if test -n "$_HAVE_DEAD_STRIP" ; then
6692 echo "$ac_t""yes" 1>&6
6693 MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip"
6695 echo "$ac_t""no" 1>&6
6698 LDFLAGS=$_SAVE_LDFLAGS
6700 MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
6704 if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
6705 DLL_SUFFIX=".so.1.0"
6706 DSO_LDOPTS="-shared"
6708 if test ! "$GNU_CC"; then
6709 DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
6715 if test ! "$GNU_CC"; then
6719 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
6720 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
6721 CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
6724 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6725 MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6729 cat >> confdefs.h <<\EOF
6730 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6733 cat >> confdefs.h <<\EOF
6734 #define _LARGEFILE64_SOURCE 1
6741 if test ! "$GNU_CC"; then
6742 DSO_LDOPTS='-b -Wl,+s'
6745 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -o $@'
6746 MKCSHLIB='$(LD) -b +s -L$(LIBXUL_DIST)/bin -o $@'
6747 CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
6749 DSO_LDOPTS='-b -E +s'
6750 MKSHLIB='$(LD) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -L$(LIBXUL_DIST)/lib -o $@'
6751 MKCSHLIB='$(LD) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -L$(LIBXUL_DIST)/lib -o $@'
6753 MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
6754 cat >> confdefs.h <<\EOF
6755 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6761 cat >> confdefs.h <<\EOF
6765 DSO_LDOPTS='-elf -shared'
6767 if test "$GNU_CC"; then
6768 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
6769 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
6770 MKSHLIB_FORCE_ALL='-Wl,-all'
6771 MKSHLIB_UNFORCE_ALL='-Wl,-none'
6772 CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS"
6774 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6775 MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6776 MKSHLIB_FORCE_ALL='-all'
6777 MKSHLIB_UNFORCE_ALL='-none'
6782 cat >> confdefs.h <<\EOF
6787 TARGET_COMPILER_ABI=n32
6788 DSO_LDOPTS='-elf -shared'
6789 MKSHLIB='$(CCC) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
6790 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
6791 _MOZ_EXCEPTIONS_FLAGS_OFF="-LANG:exceptions=OFF"
6792 _MOZ_EXCEPTIONS_FLAGS_ON="-LANG:exceptions=ON"
6793 if test "$GNU_CC"; then
6794 MKSHLIB_FORCE_ALL='-Wl,-all'
6795 MKSHLIB_UNFORCE_ALL='-Wl,-none'
6796 _WARNINGS_CFLAGS="-Wall"
6797 _WARNINGS_CXXFLAGS="-Wall"
6798 CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS"
6800 MKSHLIB_FORCE_ALL='-all'
6801 MKSHLIB_UNFORCE_ALL='-none'
6807 CFLAGS="$CFLAGS -woff 3262 -G 4"
6808 CXXFLAGS="$CXXFLAGS -woff 3262 -G 4"
6809 if test -n "$USE_N32"; then
6810 ASFLAGS="$ASFLAGS -n32"
6811 CFLAGS="$CFLAGS -n32"
6812 CXXFLAGS="$CXXFLAGS -n32"
6813 LDFLAGS="$LDFLAGS -n32"
6815 cat >> confdefs.h <<\EOF
6816 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6819 echo "configure: warning: Clearing MOZ_FIX_LINK_PATHS for OSF/1 as fix for bug 333545 (till the reference bug 332075 is fixed." 1>&2
6822 if test -z "$GNU_CXX"; then
6828 # Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler.
6829 # Similarly for GNU_CXX and INTEL_CXX.
6830 if test "$INTEL_CC" -o "$INTEL_CXX"; then
6831 # -Os has been broken on Intel's C/C++ compilers for quite a
6832 # while; Intel recommends against using it.
6833 MOZ_OPTIMIZE_FLAGS="-O2"
6834 MOZ_DEBUG_FLAGS="-g"
6835 elif test "$GNU_CC" -o "$GNU_CXX"; then
6836 GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
6837 case $GCC_VERSION in
6839 # -Os is broken on gcc 4.1.x 4.2.x, 4.5.x we need to tweak it to get good results.
6840 MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50"
6842 # If we're building with --enable-profiling, we need a frame pointer.
6843 if test -z "$MOZ_PROFILING"; then
6844 MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fomit-frame-pointer $MOZ_OPTIMIZE_SIZE_TWEAK"
6846 MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-omit-frame-pointer $MOZ_OPTIMIZE_SIZE_TWEAK"
6848 MOZ_DEBUG_FLAGS="-g"
6851 TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
6853 case "${target_cpu}" in
6855 CFLAGS="$CFLAGS -mieee"
6856 CXXFLAGS="$CXXFLAGS -mieee"
6859 MOZ_DEBUG_FLAGS="-g" # We want inlining
6865 TARGET_COMPILER_ABI=msvc
6866 MOZ_TOOLS_DIR=`echo $MOZ_TOOLS`
6868 AR_EXTRACT="$AR -extract"
6870 AR_FLAGS='-OUT:"$@"'
6877 if test -z "$RC"; then
6880 # certain versions of cygwin's makedepend barf on the
6881 # #include <string> vs -I./dist/include/string issue so don't use it
6887 HOST_AR='lib -OUT:$@'
6888 HOST_RANLIB='echo ranlib'
6889 HOST_CFLAGS="$HOST_CFLAGS -D_X86_"
6892 WARNINGS_AS_ERRORS='-WX'
6893 MOZ_OPTIMIZE_FLAGS='-Ox'
6894 AR_FLAGS='-NOLOGO -OUT:"$@"'
6896 CFLAGS="$CFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
6897 CXXFLAGS="$CXXFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
6900 DSO_LDOPTS=-SUBSYSTEM:WINDOWSCE
6901 DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
6903 IMPORT_LIB_SUFFIX=lib
6904 LIBS="$LIBS \$(LIBXUL_DIST)/lib/mozalloc.lib"
6905 LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
6908 MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ $(DSO_LDOPTS)'
6909 MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ $(DSO_LDOPTS)'
6911 MKSHLIB_UNFORCE_ALL=
6912 MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
6913 MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
6914 MOZ_DEBUG_FLAGS='-Zi'
6915 MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
6917 MOZ_JS_LIBS='$(libdir)/mozjs.lib'
6919 RANLIB='echo not_ranlib'
6920 STRIP='echo not_strip'
6921 TARGET_NSPR_MDCPUCFG='\"md/_wince.cfg\"'
6924 XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
6927 cat >> confdefs.h <<\EOF
6928 #define HAVE_SNPRINTF 1
6931 cat >> confdefs.h <<\EOF
6935 cat >> confdefs.h <<\EOF
6939 cat >> confdefs.h <<\EOF
6943 cat >> confdefs.h <<\EOF
6947 cat >> confdefs.h <<\EOF
6948 #define HW_THREADS 1
6951 cat >> confdefs.h <<\EOF
6952 #define STDC_HEADERS 1
6955 cat >> confdefs.h <<\EOF
6959 cat >> confdefs.h <<\EOF
6960 #define WIN32_LEAN_AND_MEAN 1
6963 cat >> confdefs.h <<\EOF
6964 #define HAVE_LOCALTIME_R 1
6968 TARGET_MD_ARCH=win32
6969 _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
6971 MOZ_USER_DIR="Mozilla"
6973 WINCE_WINDOWS_MOBILE=1
6975 # Check whether --enable-windows-mobile-components or --disable-windows-mobile-components was given.
6976 if test "${enable_windows_mobile_components+set}" = set; then
6977 enableval="$enable_windows_mobile_components"
6978 if test "$enableval" = "no"; then
6979 WINCE_WINDOWS_MOBILE=
6980 elif test "$enableval" = "yes"; then
6981 WINCE_WINDOWS_MOBILE=1
6983 { echo "configure: error: Option, windows-mobile-components, does not take an argument ($enableval)." 1>&2; exit 1; }
6988 if test "$WINCE_WINDOWS_MOBILE"; then
6989 cat >> confdefs.h <<\EOF
6990 #define WINCE_WINDOWS_MOBILE 1
6998 cat >> confdefs.h <<\EOF
7002 cat >> confdefs.h <<\EOF
7006 cat >> confdefs.h <<\EOF
7010 cat >> confdefs.h <<\EOF
7011 #define __SYMBIAN32__ 1
7014 cat >> confdefs.h <<\EOF
7018 cat >> confdefs.h <<\EOF
7022 cat >> confdefs.h <<\EOF
7023 #define __SUPPORT_CPP_EXCEPTIONS__ 1
7026 cat >> confdefs.h <<\EOF
7027 #define MOZ_STDERR_TO_STDOUT 1
7030 cat >> confdefs.h <<\EOF
7031 #define HAVE_FCNTL_FILE_LOCKING 1
7034 cat >> confdefs.h <<\EOF
7035 #define HAVE_SOCKLEN_T 1
7038 cat >> confdefs.h <<\EOF
7053 TARGET_NSPR_MDCPUCFG='\"md/_symbian.cfg\"'
7054 RANLIB='echo no ranlib '
7057 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
7062 # certain versions of cygwin's makedepend barf on the
7063 # #include <string> vs -I./dist/include/string issue so don't use it
7065 if test -n "$GNU_CC"; then
7066 CC="$CC -mno-cygwin"
7067 CXX="$CXX -mno-cygwin"
7068 CPP="$CPP -mno-cygwin"
7069 CFLAGS="$CFLAGS -mms-bitfields"
7070 CXXFLAGS="$CXXFLAGS -mms-bitfields"
7071 DSO_LDOPTS='-shared'
7072 MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
7073 MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
7075 # Use temp file for windres (bug 213281)
7076 RCFLAGS='-O coff --use-temp-file'
7077 # mingw doesn't require kernel32, user32, and advapi32 explicitly
7078 LIBS="$LIBS -lgdi32 -lwinmm -lwsock32"
7079 MOZ_JS_LIBS='-L$(libdir) -lmozjs'
7081 DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core -lmozalloc'
7082 XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom -lmozalloc'
7084 IMPORT_LIB_SUFFIX=dll.a
7085 GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
7087 TARGET_COMPILER_ABI=msvc
7091 if test "$AS_BIN"; then
7092 AS="$(basename "$AS_BIN")"
7094 AR='lib -NOLOGO -OUT:"$@"'
7096 RANLIB='echo not_ranlib'
7097 STRIP='echo not_strip'
7103 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
7109 IMPORT_LIB_SUFFIX=lib
7110 MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
7111 MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
7113 MKSHLIB_UNFORCE_ALL=
7114 DSO_LDOPTS=-SUBSYSTEM:WINDOWS
7115 _USE_CPP_INCLUDE_FLAG=1
7116 _DEFINES_CFLAGS='-FI $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
7117 _DEFINES_CXXFLAGS='-FI $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
7118 CFLAGS="$CFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
7119 CXXFLAGS="$CXXFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
7120 # MSVC warnings C4244 and C4800 are ubiquitous, useless, and annoying.
7121 CXXFLAGS="$CXXFLAGS -wd4244 -wd4800"
7122 LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib"
7123 MOZ_DEBUG_FLAGS='-Zi'
7124 MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
7125 WARNINGS_AS_ERRORS='-WX'
7126 # If we're building with --enable-profiling, we need -Oy-, which forces a frame pointer.
7127 if test -z "$MOZ_PROFILING"; then
7128 MOZ_OPTIMIZE_FLAGS='-O1'
7130 MOZ_OPTIMIZE_FLAGS='-O1 -Oy-'
7132 MOZ_JS_LIBS='$(libdir)/mozjs.lib'
7134 DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
7135 XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
7136 LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
7137 MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
7138 if test $_MSC_VER -ge 1400; then
7139 LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
7140 PROFILE_GEN_CFLAGS="-GL"
7141 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
7142 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
7143 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
7144 LDFLAGS="$LDFLAGS -DYNAMICBASE"
7147 cat >> confdefs.h <<\EOF
7148 #define HAVE_SNPRINTF 1
7151 cat >> confdefs.h <<\EOF
7155 cat >> confdefs.h <<\EOF
7159 cat >> confdefs.h <<\EOF
7163 cat >> confdefs.h <<\EOF
7167 cat >> confdefs.h <<\EOF
7168 #define HW_THREADS 1
7171 cat >> confdefs.h <<\EOF
7172 #define STDC_HEADERS 1
7175 cat >> confdefs.h <<\EOF
7179 cat >> confdefs.h <<\EOF
7180 #define WIN32_LEAN_AND_MEAN 1
7183 TARGET_MD_ARCH=win32
7184 _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
7186 MOZ_USER_DIR="Mozilla"
7188 TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
7191 cat >> confdefs.h <<\EOF
7200 MOZ_BUILD_ROOT=`cd $MOZ_BUILD_ROOT && pwd -W`
7202 *-cygwin*|*-msvc*|*-mks*)
7203 CYGPATH_W="cygpath -a -w"
7204 CYGPATH_S="sed -e s|\\\\|/|g"
7205 MOZ_BUILD_ROOT=`$CYGPATH_W $MOZ_BUILD_ROOT | $CYGPATH_S`
7209 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
7211 if test -z "$MOZ_TOOLS"; then
7212 { echo "configure: error: MOZ_TOOLS is not set" 1>&2; exit 1; }
7215 MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd -W`
7216 if test "$?" != "0" -o -z "$MOZ_TOOLS_DIR"; then
7217 { echo "configure: error: cd \$MOZ_TOOLS failed. MOZ_TOOLS ==? $MOZ_TOOLS" 1>&2; exit 1; }
7219 MOZ_TOOLS_BIN_DIR="$(cd "$MOZ_TOOLS_DIR/bin" && pwd)"
7220 if test `echo ${PATH}: | grep -ic "$MOZ_TOOLS_BINDIR:"` = 0; then
7221 { echo "configure: error: \$MOZ_TOOLS\\bin must be in your path." 1>&2; exit 1; }
7223 MOZ_TOOLS_DIR=`$CYGPATH_W $MOZ_TOOLS_DIR | $CYGPATH_S`
7230 echo "configure: warning: Using a cygwin build environment is unsupported. Configure cannot check for the presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2
7236 if test "$HAVE_64BIT_OS"; then
7237 { echo "configure: error: You are targeting i386 but using the 64-bit compiler." 1>&2; exit 1; }
7240 if test $_MSC_VER -ge 1400; then
7241 LDFLAGS="$LDFLAGS -SAFESEH"
7244 if test -n "$GNU_CC"; then
7245 CFLAGS="$CFLAGS -mstackrealign"
7246 CXXFLAGS="$CXXFLAGS -mstackrealign"
7249 for ac_hdr in mmintrin.h
7251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7253 echo "configure:7254: checking for $ac_hdr" >&5
7254 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7255 echo $ac_n "(cached) $ac_c" 1>&6
7257 cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7263 { (eval echo configure:7264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7265 if test -z "$ac_err"; then
7267 eval "ac_cv_header_$ac_safe=yes"
7270 echo "configure: failed program was:" >&5
7271 cat conftest.$ac_ext >&5
7273 eval "ac_cv_header_$ac_safe=no"
7277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7278 echo "$ac_t""yes" 1>&6
7279 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7280 cat >> confdefs.h <<EOF
7281 #define $ac_tr_hdr 1
7285 echo "$ac_t""no" 1>&6
7289 cat >> confdefs.h <<\EOF
7295 cat >> confdefs.h <<\EOF
7301 cat >> confdefs.h <<\EOF
7307 cat >> confdefs.h <<\EOF
7313 cat >> confdefs.h <<\EOF
7314 #define _CPU_ARCH_NOT_DEFINED 1
7320 if test "$HAVE_64BIT_OS"; then
7321 cat >> confdefs.h <<\EOF
7330 CFLAGS="$CFLAGS -Dunix"
7331 CXXFLAGS="$CXXFLAGS -Dunix"
7332 if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
7334 DSO_PIC_CFLAGS='-fPIC -DPIC'
7335 DSO_LDOPTS='-shared'
7336 BIN_FLAGS='-Wl,--export-dynamic'
7338 DSO_PIC_CFLAGS='-fPIC -DPIC'
7339 DLL_SUFFIX=".so.1.0"
7340 DSO_LDOPTS='-shared'
7342 # This will fail on a.out systems prior to 1.5.1_ALPHA.
7343 MKSHLIB_FORCE_ALL='-Wl,--whole-archive'
7344 MKSHLIB_UNFORCE_ALL='-Wl,--no-whole-archive'
7345 if test "$LIBRUNPATH"; then
7346 DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
7348 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@'
7349 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@'
7353 cat >> confdefs.h <<\EOF
7357 cat >> confdefs.h <<\EOF
7358 #define _QNX_SOURCE 1
7361 cat >> confdefs.h <<\EOF
7366 WARNINGS_AS_ERRORS=''
7367 MOZ_OPTIMIZE_FLAGS="-O"
7368 MOZ_DEBUG_FLAGS="-gstabs"
7371 LIBS="$LIBS -lsocket -lstdc++"
7372 _DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506'
7373 _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/js-confdefs.h -D_POSIX_C_SOURCE=199506'
7374 if test "$with_x" != "yes"
7376 _PLATFORM_DEFAULT_TOOLKIT="photon"
7377 TK_CFLAGS='-I/usr/include/photon'
7380 case "${target_cpu}" in
7382 cat >> confdefs.h <<\EOF
7383 #define HAVE_VA_LIST_AS_ARRAY 1
7391 DLL_SUFFIX=".so.1.0"
7393 DSO_PIC_CFLAGS='-fPIC'
7394 DSO_LDOPTS='-shared -fPIC'
7395 if test "$LIBRUNPATH"; then
7396 DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
7401 cat >> confdefs.h <<\EOF
7402 #define NO_PW_GECOS 1
7405 cat >> confdefs.h <<\EOF
7409 cat >> confdefs.h <<\EOF
7410 #define POLL_WITH_XCONNECTIONNUMBER 1
7414 MKSHLIB_FORCE_ALL='-all'
7415 MKSHLIB_UNFORCE_ALL='-none'
7417 AS_DASH_C_FLAG='-Wc/names=as_is'
7419 DSO_LDOPTS='-shared -auto_symvec'
7421 MOZ_DEBUG_LDFLAGS='-g'
7423 CC_VERSION=`$CC -V 2>&1 | awk '/ C / { print $3 }'`
7424 CXX_VERSION=`$CXX -V 2>&1 | awk '/ C\+\+ / { print $3 }'`
7429 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
7430 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
7431 cat >> confdefs.h <<\EOF
7435 cat >> confdefs.h <<\EOF
7439 cat >> confdefs.h <<\EOF
7440 #define OS2EMX_PLAIN_CHAR 1
7443 cat >> confdefs.h <<\EOF
7444 #define TCPV40HDRS 1
7452 IMPORT_LIB_SUFFIX=lib
7456 CFLAGS="$CFLAGS -Zomf"
7457 CXXFLAGS="$CXXFLAGS -Zomf"
7459 BIN_FLAGS='-Zlinker /ST:0x100000'
7463 WARNINGS_AS_ERRORS='-Werror'
7464 MOZ_DEBUG_FLAGS="-g -fno-inline"
7465 MOZ_OPTIMIZE_FLAGS="-O2"
7466 MOZ_OPTIMIZE_LDFLAGS="-s -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
7467 DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
7468 LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
7470 _PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
7473 MOZ_USER_DIR="Mozilla"
7475 if test "$MOZTOOLS"; then
7476 MOZ_TOOLS_DIR=`echo $MOZTOOLS | sed -e 's|\\\\|/|g'`
7478 { echo "configure: error: MOZTOOLS is not set" 1>&2; exit 1; }
7480 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
7481 DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
7482 LDFLAGS="$LDFLAGS -Zhigh-mem"
7483 MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -Zhigh-mem"
7484 cat >> confdefs.h <<\EOF
7485 #define MOZ_OS2_HIGH_MEMORY 1
7490 # GCC for OS/2 currently predefines these, but we don't want them
7491 _DEFINES_CFLAGS="$_DEFINES_CFLAGS -Uunix -U__unix -U__unix__"
7492 _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__"
7494 echo $ac_n "checking for __declspec(dllexport)""... $ac_c" 1>&6
7495 echo "configure:7496: checking for __declspec(dllexport)" >&5
7496 if eval "test \"`echo '$''{'ac_os2_declspec'+set}'`\" = set"; then
7497 echo $ac_n "(cached) $ac_c" 1>&6
7499 cat > conftest.$ac_ext <<EOF
7500 #line 7501 "configure"
7501 #include "confdefs.h"
7502 __declspec(dllexport) void ac_os2_declspec(void) {}
7507 if { (eval echo configure:7508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7509 ac_os2_declspec="yes"
7511 echo "configure: failed program was:" >&5
7512 cat conftest.$ac_ext >&5
7514 ac_os2_declspec="no"
7519 echo "$ac_t""$ac_os2_declspec" 1>&6
7520 if test "$ac_os2_declspec" != "yes"; then
7521 { echo "configure: error: Compiler does not support __declspec(dllexport), install GCC-4.3.2 or newer" 1>&2; exit 1; }
7526 if test "$GNU_CC"; then
7527 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
7528 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
7531 MOZ_DEBUG_FLAGS='-g'
7532 ASFLAGS='-I$(topsrcdir)/xpcom/reflect/xptcall/public -g'
7533 CFLAGS="$CFLAGS -ieee"
7534 CXXFLAGS="$CXXFLAGS "'-noexceptions -ieee -ptr $(DIST)/cxx_repository'
7535 DSO_LDOPTS='-shared -msym -expect_unresolved \* -update_registry $(DIST)/so_locations'
7538 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
7539 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
7540 MKSHLIB_FORCE_ALL='-all'
7541 MKSHLIB_UNFORCE_ALL='-none'
7542 cat >> confdefs.h <<\EOF
7543 #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
7546 cat >> confdefs.h <<\EOF
7547 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7551 if test -z "$GNU_CXX"; then
7554 cat >> confdefs.h <<\EOF
7555 #define NEED_USLEEP_PROTOTYPE 1
7561 DIRENT_INO=d_stat.st_ino
7562 cat >> confdefs.h <<\EOF
7563 #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
7566 cat >> confdefs.h <<\EOF
7567 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7570 cat >> confdefs.h <<\EOF
7571 #define STDC_HEADERS 1
7574 if test "$no_x" = "yes"; then
7575 _PLATFORM_DEFAULT_TOOLKIT='photon'
7576 TK_CFLAGS='-I/usr/nto/include/photon'
7577 TK_LIBS='-lphoton -lphrender'
7582 cat >> confdefs.h <<\EOF
7583 #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
7586 cat >> confdefs.h <<\EOF
7587 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7590 CXXFLAGS="$CXXFLAGS -I/usr/include/CC"
7591 if test ! "$GNU_CC"; then
7597 cat >> confdefs.h <<\EOF
7601 TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
7602 if test -z "$CROSS_COMPILE" && pkginfo -q SUNWpr && pkginfo -q SUNWprd; then
7603 NO_NSPR_CONFIG_SYSTEM_LDFLAGS="-L/usr/lib/mps -R/usr/lib/mps -lnspr4"
7604 NO_NSPR_CONFIG_SYSTEM_CFLAGS="-I/usr/include/mps"
7605 NO_NSPR_CONFIG_SYSTEM_VERSION="`pkgparam SUNWpr SUNW_PRODVERS | sed -e 's/^[1-9][0-9]*\.[0-9][0-9]*$/&.0/'`"
7609 # $ORIGIN/.. is for shared libraries under components/ to locate shared
7610 # libraries one level up (e.g. libnspr4.so)
7611 if test "$SOLARIS_SUNPRO_CC"; then
7612 LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..' -z lazyload -z combreloc -z muldefs"
7613 LIBS="-lCrun -lCstd -lc $LIBS"
7615 cat >> confdefs.h <<\EOF
7616 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7619 CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
7620 CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions -norunpath -D__FUNCTION__=__func__ -template=no%extdef"
7621 _MOZ_EXCEPTIONS_FLAGS_ON='-features=except'
7622 _MOZ_EXCEPTIONS_FLAGS_OFF='-features=no%except'
7623 LDFLAGS="-xildoff $LDFLAGS"
7624 if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then
7625 _SAVE_LDFLAGS=$LDFLAGS
7626 LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
7627 cat > conftest.$ac_ext <<EOF
7628 #line 7629 "configure"
7629 #include "confdefs.h"
7632 printf("Hello World\n");
7635 if { (eval echo configure:7636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7641 LDFLAGS=$_SAVE_LDFLAGS
7645 WARNINGS_AS_ERRORS='-Werror'
7646 MOZ_OPTIMIZE_FLAGS="-xO4"
7647 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
7648 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
7649 MKSHLIB_FORCE_ALL='-z allextract'
7650 MKSHLIB_UNFORCE_ALL='-z defaultextract'
7657 AS='/usr/ccs/bin/as'
7658 ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0"
7660 TARGET_COMPILER_ABI="sunc"
7661 CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
7662 CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
7663 echo $ac_n "checking for Sun C++ compiler version >= 5.9""... $ac_c" 1>&6
7664 echo "configure:7665: checking for Sun C++ compiler version >= 5.9" >&5
7667 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7668 ac_cpp='$CXXCPP $CPPFLAGS'
7669 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7670 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7671 cross_compiling=$ac_cv_prog_cxx_cross
7673 cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7678 #if (__SUNPRO_CC < 0x590)
7683 if { (eval echo configure:7684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7687 echo "configure: failed program was:" >&5
7688 cat conftest.$ac_ext >&5
7693 if test -n "$_BAD_COMPILER"; then
7695 { 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; }
7699 cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7704 #if (__SUNPRO_CC >= 0x5100)
7705 #error "Sun C++ 5.10 or above"
7709 if { (eval echo configure:7710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7713 echo "configure: failed program was:" >&5
7714 cat conftest.$ac_ext >&5
7719 if test "$_ABOVE_SS12U1"; then
7721 CXXFLAGS="$CXXFLAGS -xannotate=no"
7723 echo "$ac_t""$_res" 1>&6
7725 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7726 ac_cpp='$CPP $CPPFLAGS'
7727 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7728 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7729 cross_compiling=$ac_cv_prog_cc_cross
7732 LDFLAGS="$LDFLAGS -Wl,-z,ignore -Wl,-R,'\$\$ORIGIN:\$\$ORIGIN/..' -Wl,-z,lazyload -Wl,-z,combreloc -Wl,-z,muldefs"
7734 MKSHLIB_FORCE_ALL='-Wl,-z -Wl,allextract'
7735 MKSHLIB_UNFORCE_ALL='-Wl,-z -Wl,defaultextract'
7736 ASFLAGS="$ASFLAGS -fPIC"
7737 DSO_LDOPTS='-shared'
7739 _WARNINGS_CXXFLAGS=''
7740 if test "$OS_RELEASE" = "5.3"; then
7741 cat >> confdefs.h <<\EOF
7742 #define MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES 1
7747 if test "$OS_RELEASE" = "5.5.1"; then
7748 cat >> confdefs.h <<\EOF
7749 #define NEED_USLEEP_PROTOTYPE 1
7756 DSO_LDOPTS='-Bdynamic'
7757 MKSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
7758 MKCSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
7759 cat >> confdefs.h <<\EOF
7763 cat >> confdefs.h <<\EOF
7764 #define SPRINTF_RETURNS_STRING 1
7767 case "$(target_os)" in
7769 DLL_SUFFIX='.so.1.0'
7775 NSPR_LIBS="-lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION -L/usr/ccs/lib -lcrt"
7779 HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"'
7783 cat >> confdefs.h <<\EOF
7784 #define NO_PW_GECOS 1
7788 _PLATFORM_DEFAULT_TOOLKIT=cairo-android
7789 TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
7791 MOZ_GFX_OPTIMIZE_MOBILE=1
7792 # If we're building with --enable-profiling, we need a frame pointer.
7793 if test -z "$MOZ_PROFILING"; then
7794 MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer"
7796 MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer"
7798 # The Maemo builders don't know about this flag
7799 MOZ_ARM_VFP_FLAGS="-mfpu=vfp"
7804 cat >> confdefs.h <<EOF
7805 #define D_INO $DIRENT_INO
7809 NO_LD_ARCHIVE_FLAGS=
7810 if test -z "$MKSHLIB_FORCE_ALL" -o -z "$MKSHLIB_UNFORCE_ALL"; then
7811 NO_LD_ARCHIVE_FLAGS=1
7815 NO_LD_ARCHIVE_FLAGS=
7818 NO_LD_ARCHIVE_FLAGS=
7821 NO_LD_ARCHIVE_FLAGS=
7823 *-msvc*|*-mks*|*-mingw*|*-cygwin*|*-wince|*-winmo)
7824 if test -z "$GNU_CC"; then
7825 NO_LD_ARCHIVE_FLAGS=
7832 *-linux*|*-kfreebsd*-gnu|*-gnu*)
7833 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7836 if test -z "$GNU_CC"; then
7837 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-M $(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
7839 if test -z "$GCC_USE_GNU_LD"; then
7840 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-M -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
7842 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7847 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7850 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list'
7852 *-cygwin*|*-mingw*|*-mks*|*-msvc|*-wince|*-winmo)
7853 if test -n "$GNU_CC"; then
7854 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7859 if test -z "$COMPILE_ENVIRONMENT"; then
7860 SKIP_COMPILER_CHECKS=1
7861 SKIP_LIBRARY_CHECKS=1
7872 ENABLE_POLYIC_TYPED_ARRAY=1
7873 cat >> confdefs.h <<\EOF
7874 #define JS_CPU_X86 1
7877 cat >> confdefs.h <<\EOF
7878 #define JS_NUNBOX32 1
7888 ENABLE_POLYIC_TYPED_ARRAY=1
7889 cat >> confdefs.h <<\EOF
7890 #define JS_CPU_X64 1
7893 cat >> confdefs.h <<\EOF
7894 #define JS_PUNBOX64 1
7904 cat >> confdefs.h <<\EOF
7905 #define JS_CPU_ARM 1
7908 cat >> confdefs.h <<\EOF
7909 #define JS_NUNBOX32 1
7916 cat >> confdefs.h <<\EOF
7917 #define JS_CPU_SPARC 1
7923 # Check whether --enable-methodjit or --disable-methodjit was given.
7924 if test "${enable_methodjit+set}" = set; then
7925 enableval="$enable_methodjit"
7926 if test "$enableval" = "no"; then
7928 elif test "$enableval" = "yes"; then
7931 { echo "configure: error: Option, methodjit, does not take an argument ($enableval)." 1>&2; exit 1; }
7936 # Check whether --enable-monoic or --disable-monoic was given.
7937 if test "${enable_monoic+set}" = set; then
7938 enableval="$enable_monoic"
7939 if test "$enableval" = "no"; then
7941 elif test "$enableval" = "yes"; then
7944 { echo "configure: error: Option, monoic, does not take an argument ($enableval)." 1>&2; exit 1; }
7949 # Check whether --enable-polyic or --disable-polyic was given.
7950 if test "${enable_polyic+set}" = set; then
7951 enableval="$enable_polyic"
7952 if test "$enableval" = "no"; then
7954 elif test "$enableval" = "yes"; then
7957 { echo "configure: error: Option, polyic, does not take an argument ($enableval)." 1>&2; exit 1; }
7962 # Check whether --enable-tracejit or --disable-tracejit was given.
7963 if test "${enable_tracejit+set}" = set; then
7964 enableval="$enable_tracejit"
7965 if test "$enableval" = "no"; then
7967 elif test "$enableval" = "yes"; then
7970 { echo "configure: error: Option, tracejit, does not take an argument ($enableval)." 1>&2; exit 1; }
7975 # Check whether --enable-methodjit-spew or --disable-methodjit-spew was given.
7976 if test "${enable_methodjit_spew+set}" = set; then
7977 enableval="$enable_methodjit_spew"
7978 if test "$enableval" = "yes"; then
7979 ENABLE_METHODJIT_SPEW=1
7980 elif test "$enableval" = "no"; then
7981 ENABLE_METHODJIT_SPEW=
7983 { echo "configure: error: Option, methodjit-spew, does not take an argument ($enableval)." 1>&2; exit 1; }
7990 if test "$ENABLE_METHODJIT"; then
7991 cat >> confdefs.h <<\EOF
7992 #define JS_METHODJIT 1
7997 if test "$ENABLE_MONOIC"; then
7998 cat >> confdefs.h <<\EOF
8004 if test "$ENABLE_POLYIC"; then
8005 cat >> confdefs.h <<\EOF
8011 if test "$ENABLE_POLYIC_TYPED_ARRAY"; then
8012 cat >> confdefs.h <<\EOF
8013 #define JS_POLYIC_TYPED_ARRAY 1
8018 if test "$ENABLE_METHODJIT_SPEW"; then
8019 cat >> confdefs.h <<\EOF
8020 #define JS_METHODJIT_SPEW 1
8025 if test "$ENABLE_TRACEJIT"; then
8027 cat >> confdefs.h <<\EOF
8028 #define FEATURE_NANOJIT 1
8031 cat >> confdefs.h <<\EOF
8038 cat >> confdefs.h <<\EOF
8039 #define AVMPLUS_IA32 1
8044 cat >> confdefs.h <<\EOF
8045 #define AVMPLUS_AMD64 1
8048 cat >> confdefs.h <<\EOF
8049 #define AVMPLUS_64BIT 1
8054 cat >> confdefs.h <<\EOF
8055 #define AVMPLUS_ARM 1
8060 cat >> confdefs.h <<\EOF
8061 #define AVMPLUS_SPARC 1
8068 *-linux*|*-android-eabi)
8069 cat >> confdefs.h <<\EOF
8070 #define AVMPLUS_UNIX 1
8073 cat >> confdefs.h <<\EOF
8074 #define AVMPLUS_LINUX 1
8079 cat >> confdefs.h <<\EOF
8080 #define AVMPLUS_UNIX 1
8085 cat >> confdefs.h <<\EOF
8086 #define AVMPLUS_UNIX 1
8090 *-freebsd*|*-kfreebsd*)
8091 cat >> confdefs.h <<\EOF
8092 #define AVMPLUS_UNIX 1
8097 cat >> confdefs.h <<\EOF
8098 #define AVMPLUS_UNIX 1
8102 *-cygwin*|*-mingw*|*-mks*|*-msvc*|*-wince|*-winmo)
8103 cat >> confdefs.h <<\EOF
8104 #define AVMPLUS_WIN32 1
8109 cat >> confdefs.h <<\EOF
8110 #define AVMPLUS_OS2 1
8115 { echo "configure: error: Unrecognized nanojit platform. Use --disable-tracejit to build without tracing JIT support." 1>&2; exit 1; }
8118 fi # ENABLE_TRACEJIT
8123 if test -z "$SKIP_COMPILER_CHECKS"; then
8124 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8125 echo "configure:8126: checking for ANSI C header files" >&5
8126 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8127 echo $ac_n "(cached) $ac_c" 1>&6
8129 cat > conftest.$ac_ext <<EOF
8130 #line 8131 "configure"
8131 #include "confdefs.h"
8137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8138 { (eval echo configure:8139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8140 if test -z "$ac_err"; then
8142 ac_cv_header_stdc=yes
8145 echo "configure: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8148 ac_cv_header_stdc=no
8152 if test $ac_cv_header_stdc = yes; then
8153 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8160 egrep "memchr" >/dev/null 2>&1; then
8164 ac_cv_header_stdc=no
8170 if test $ac_cv_header_stdc = yes; then
8171 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8172 cat > conftest.$ac_ext <<EOF
8173 #line 8174 "configure"
8174 #include "confdefs.h"
8177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8178 egrep "free" >/dev/null 2>&1; then
8182 ac_cv_header_stdc=no
8188 if test $ac_cv_header_stdc = yes; then
8189 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8190 if test "$cross_compiling" = yes; then
8193 cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8197 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8198 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8199 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8200 int main () { int i; for (i = 0; i < 256; i++)
8201 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8209 echo "configure: failed program was:" >&5
8210 cat conftest.$ac_ext >&5
8212 ac_cv_header_stdc=no
8220 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8221 if test $ac_cv_header_stdc = yes; then
8222 cat >> confdefs.h <<\EOF
8223 #define STDC_HEADERS 1
8228 echo $ac_n "checking for working const""... $ac_c" 1>&6
8229 echo "configure:8230: checking for working const" >&5
8230 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
8231 echo $ac_n "(cached) $ac_c" 1>&6
8233 cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8239 /* Ultrix mips cc rejects this. */
8240 typedef int charset[2]; const charset x;
8241 /* SunOS 4.1.1 cc rejects this. */
8242 char const *const *ccp;
8244 /* NEC SVR4.0.2 mips cc rejects this. */
8245 struct point {int x, y;};
8246 static struct point const zero = {0,0};
8247 /* AIX XL C 1.02.0.0 rejects this.
8248 It does not let you subtract one const X* pointer from another in an arm
8249 of an if-expression whose if-part is not a constant expression */
8250 const char *g = "string";
8251 ccp = &g + (g ? g-g : 0);
8252 /* HPUX 7.0 cc rejects these. */
8255 ccp = (char const *const *) p;
8256 { /* SCO 3.2v4 cc rejects this. */
8258 char const *s = 0 ? (char *) 0 : (char const *) 0;
8262 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8264 const int *foo = &x[0];
8267 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8268 typedef const int *iptr;
8272 { /* AIX XL C 1.02.0.0 rejects this saying
8273 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8274 struct s { int j; const int *ap[3]; };
8275 struct s *b; b->j = 5;
8277 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8283 if { (eval echo configure:8284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8287 echo "configure: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8295 echo "$ac_t""$ac_cv_c_const" 1>&6
8296 if test $ac_cv_c_const = no; then
8297 cat >> confdefs.h <<\EOF
8303 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
8304 echo "configure:8305: checking for mode_t" >&5
8305 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
8306 echo $ac_n "(cached) $ac_c" 1>&6
8308 cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <sys/types.h>
8317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8318 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8320 ac_cv_type_mode_t=yes
8323 ac_cv_type_mode_t=no
8328 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
8329 if test $ac_cv_type_mode_t = no; then
8330 cat >> confdefs.h <<\EOF
8336 echo $ac_n "checking for off_t""... $ac_c" 1>&6
8337 echo "configure:8338: checking for off_t" >&5
8338 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
8339 echo $ac_n "(cached) $ac_c" 1>&6
8341 cat > conftest.$ac_ext <<EOF
8342 #line 8343 "configure"
8343 #include "confdefs.h"
8344 #include <sys/types.h>
8350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8351 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8353 ac_cv_type_off_t=yes
8361 echo "$ac_t""$ac_cv_type_off_t" 1>&6
8362 if test $ac_cv_type_off_t = no; then
8363 cat >> confdefs.h <<\EOF
8369 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8370 echo "configure:8371: checking for pid_t" >&5
8371 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8372 echo $ac_n "(cached) $ac_c" 1>&6
8374 cat > conftest.$ac_ext <<EOF
8375 #line 8376 "configure"
8376 #include "confdefs.h"
8377 #include <sys/types.h>
8383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8384 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8386 ac_cv_type_pid_t=yes
8394 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8395 if test $ac_cv_type_pid_t = no; then
8396 cat >> confdefs.h <<\EOF
8402 echo $ac_n "checking for size_t""... $ac_c" 1>&6
8403 echo "configure:8404: checking for size_t" >&5
8404 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
8405 echo $ac_n "(cached) $ac_c" 1>&6
8407 cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 #include <sys/types.h>
8416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8417 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8419 ac_cv_type_size_t=yes
8422 ac_cv_type_size_t=no
8427 echo "$ac_t""$ac_cv_type_size_t" 1>&6
8428 if test $ac_cv_type_size_t = no; then
8429 cat >> confdefs.h <<\EOF
8430 #define size_t unsigned
8436 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
8437 ac_cpp='$CXXCPP $CPPFLAGS'
8438 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
8439 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
8440 cross_compiling=$ac_cv_prog_cxx_cross
8442 echo $ac_n "checking for __stdcall""... $ac_c" 1>&6
8443 echo "configure:8444: checking for __stdcall" >&5
8444 if eval "test \"`echo '$''{'ac_cv___stdcall'+set}'`\" = set"; then
8445 echo $ac_n "(cached) $ac_c" 1>&6
8447 cat > conftest.$ac_ext <<EOF
8448 #line 8449 "configure"
8449 #include "confdefs.h"
8450 template <typename Method> struct foo;
8451 template <> struct foo<void (*)()> {};
8452 template <> struct foo<void (__stdcall*)()> {};
8457 if { (eval echo configure:8458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8459 ac_cv___stdcall=true
8461 echo "configure: failed program was:" >&5
8462 cat conftest.$ac_ext >&5
8464 ac_cv___stdcall=false
8469 if test "$ac_cv___stdcall" = true ; then
8470 cat >> confdefs.h <<\EOF
8471 #define HAVE_STDCALL 1
8474 echo "$ac_t""yes" 1>&6
8476 echo "$ac_t""no" 1>&6
8479 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
8480 ac_cpp='$CPP $CPPFLAGS'
8481 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
8482 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
8483 cross_compiling=$ac_cv_prog_cc_cross
8485 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
8486 echo "configure:8487: checking for ssize_t" >&5
8487 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
8488 echo $ac_n "(cached) $ac_c" 1>&6
8490 cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8494 #include <sys/types.h>
8499 if { (eval echo configure:8500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8501 ac_cv_type_ssize_t=true
8503 echo "configure: failed program was:" >&5
8504 cat conftest.$ac_ext >&5
8506 ac_cv_type_ssize_t=false
8511 if test "$ac_cv_type_ssize_t" = true ; then
8512 cat >> confdefs.h <<\EOF
8513 #define HAVE_SSIZE_T 1
8516 echo "$ac_t""yes" 1>&6
8518 echo "$ac_t""no" 1>&6
8520 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
8521 echo "configure:8522: checking for st_blksize in struct stat" >&5
8522 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
8523 echo $ac_n "(cached) $ac_c" 1>&6
8525 cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8528 #include <sys/types.h>
8529 #include <sys/stat.h>
8531 struct stat s; s.st_blksize;
8534 if { (eval echo configure:8535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8536 ac_cv_struct_st_blksize=yes
8538 echo "configure: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8541 ac_cv_struct_st_blksize=no
8546 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
8547 if test $ac_cv_struct_st_blksize = yes; then
8548 cat >> confdefs.h <<\EOF
8549 #define HAVE_ST_BLKSIZE 1
8554 echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6
8555 echo "configure:8556: checking for siginfo_t" >&5
8556 if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then
8557 echo $ac_n "(cached) $ac_c" 1>&6
8559 cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562 #define _POSIX_C_SOURCE 199506L
8568 if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8570 ac_cv_siginfo_t=true
8572 echo "configure: failed program was:" >&5
8573 cat conftest.$ac_ext >&5
8575 ac_cv_siginfo_t=false
8580 if test "$ac_cv_siginfo_t" = true ; then
8581 cat >> confdefs.h <<\EOF
8582 #define HAVE_SIGINFO_T 1
8585 echo "$ac_t""yes" 1>&6
8587 echo "$ac_t""no" 1>&6
8591 ac_safe=`echo "stdint.h" | sed 'y%./+-%__p_%'`
8592 echo $ac_n "checking for stdint.h""... $ac_c" 1>&6
8593 echo "configure:8594: checking for stdint.h" >&5
8594 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8595 echo $ac_n "(cached) $ac_c" 1>&6
8597 cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8603 { (eval echo configure:8604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8605 if test -z "$ac_err"; then
8607 eval "ac_cv_header_$ac_safe=yes"
8610 echo "configure: failed program was:" >&5
8611 cat conftest.$ac_ext >&5
8613 eval "ac_cv_header_$ac_safe=no"
8617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8618 echo "$ac_t""yes" 1>&6
8621 echo "$ac_t""no" 1>&6
8624 if test "$ac_cv_header_stdint_h" = yes; then
8625 cat >> confdefs.h <<\EOF
8626 #define JS_HAVE_STDINT_H 1
8631 echo $ac_n "checking for a 1-byte type""... $ac_c" 1>&6
8632 echo "configure:8633: checking for a 1-byte type" >&5
8633 if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT8_TYPE'+set}'`\" = set"; then
8634 echo $ac_n "(cached) $ac_c" 1>&6
8637 moz_cv_n_byte_type_JS_INT8_TYPE=
8638 for type in char; do
8639 cat > conftest.$ac_ext <<EOF
8640 #line 8641 "configure"
8641 #include "confdefs.h"
8645 int a[sizeof ($type) == 1 ? 1 : -1];
8650 if { (eval echo configure:8651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8652 moz_cv_n_byte_type_JS_INT8_TYPE=$type; break
8654 echo "configure: failed program was:" >&5
8655 cat conftest.$ac_ext >&5
8659 if test ! "$moz_cv_n_byte_type_JS_INT8_TYPE"; then
8660 { echo "configure: error: Couldn't find a 1-byte type" 1>&2; exit 1; }
8665 echo "$ac_t""$moz_cv_n_byte_type_JS_INT8_TYPE" 1>&6
8666 cat >> confdefs.h <<EOF
8667 #define JS_INT8_TYPE $moz_cv_n_byte_type_JS_INT8_TYPE
8672 echo $ac_n "checking for a 2-byte type""... $ac_c" 1>&6
8673 echo "configure:8674: checking for a 2-byte type" >&5
8674 if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT16_TYPE'+set}'`\" = set"; then
8675 echo $ac_n "(cached) $ac_c" 1>&6
8678 moz_cv_n_byte_type_JS_INT16_TYPE=
8679 for type in short int long; do
8680 cat > conftest.$ac_ext <<EOF
8681 #line 8682 "configure"
8682 #include "confdefs.h"
8686 int a[sizeof ($type) == 2 ? 1 : -1];
8691 if { (eval echo configure:8692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8693 moz_cv_n_byte_type_JS_INT16_TYPE=$type; break
8695 echo "configure: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8700 if test ! "$moz_cv_n_byte_type_JS_INT16_TYPE"; then
8701 { echo "configure: error: Couldn't find a 2-byte type" 1>&2; exit 1; }
8706 echo "$ac_t""$moz_cv_n_byte_type_JS_INT16_TYPE" 1>&6
8707 cat >> confdefs.h <<EOF
8708 #define JS_INT16_TYPE $moz_cv_n_byte_type_JS_INT16_TYPE
8713 echo $ac_n "checking for a 4-byte type""... $ac_c" 1>&6
8714 echo "configure:8715: checking for a 4-byte type" >&5
8715 if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT32_TYPE'+set}'`\" = set"; then
8716 echo $ac_n "(cached) $ac_c" 1>&6
8719 moz_cv_n_byte_type_JS_INT32_TYPE=
8720 for type in int long 'long long' short; do
8721 cat > conftest.$ac_ext <<EOF
8722 #line 8723 "configure"
8723 #include "confdefs.h"
8727 int a[sizeof ($type) == 4 ? 1 : -1];
8732 if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8734 moz_cv_n_byte_type_JS_INT32_TYPE=$type; break
8736 echo "configure: failed program was:" >&5
8737 cat conftest.$ac_ext >&5
8741 if test ! "$moz_cv_n_byte_type_JS_INT32_TYPE"; then
8742 { echo "configure: error: Couldn't find a 4-byte type" 1>&2; exit 1; }
8747 echo "$ac_t""$moz_cv_n_byte_type_JS_INT32_TYPE" 1>&6
8748 cat >> confdefs.h <<EOF
8749 #define JS_INT32_TYPE $moz_cv_n_byte_type_JS_INT32_TYPE
8754 echo $ac_n "checking for a 8-byte type""... $ac_c" 1>&6
8755 echo "configure:8756: checking for a 8-byte type" >&5
8756 if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT64_TYPE'+set}'`\" = set"; then
8757 echo $ac_n "(cached) $ac_c" 1>&6
8760 moz_cv_n_byte_type_JS_INT64_TYPE=
8761 for type in int long 'long long'; do
8762 cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8768 int a[sizeof ($type) == 8 ? 1 : -1];
8773 if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8775 moz_cv_n_byte_type_JS_INT64_TYPE=$type; break
8777 echo "configure: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8782 if test ! "$moz_cv_n_byte_type_JS_INT64_TYPE"; then
8783 { echo "configure: error: Couldn't find a 8-byte type" 1>&2; exit 1; }
8788 echo "$ac_t""$moz_cv_n_byte_type_JS_INT64_TYPE" 1>&6
8789 cat >> confdefs.h <<EOF
8790 #define JS_INT64_TYPE $moz_cv_n_byte_type_JS_INT64_TYPE
8795 echo $ac_n "checking for a sizeof (void *)-byte type""... $ac_c" 1>&6
8796 echo "configure:8797: checking for a sizeof (void *)-byte type" >&5
8797 if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INTPTR_TYPE'+set}'`\" = set"; then
8798 echo $ac_n "(cached) $ac_c" 1>&6
8801 moz_cv_n_byte_type_JS_INTPTR_TYPE=
8802 for type in int long 'long long' short; do
8803 cat > conftest.$ac_ext <<EOF
8804 #line 8805 "configure"
8805 #include "confdefs.h"
8809 int a[sizeof ($type) == sizeof (void *) ? 1 : -1];
8814 if { (eval echo configure:8815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8816 moz_cv_n_byte_type_JS_INTPTR_TYPE=$type; break
8818 echo "configure: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8823 if test ! "$moz_cv_n_byte_type_JS_INTPTR_TYPE"; then
8824 { echo "configure: error: Couldn't find a sizeof (void *)-byte type" 1>&2; exit 1; }
8829 echo "$ac_t""$moz_cv_n_byte_type_JS_INTPTR_TYPE" 1>&6
8830 cat >> confdefs.h <<EOF
8831 #define JS_INTPTR_TYPE $moz_cv_n_byte_type_JS_INTPTR_TYPE
8838 echo $ac_n "checking for the size of void*""... $ac_c" 1>&6
8839 echo "configure:8840: checking for the size of void*" >&5
8840 if eval "test \"`echo '$''{'moz_cv_size_of_JS_BYTES_PER_WORD'+set}'`\" = set"; then
8841 echo $ac_n "(cached) $ac_c" 1>&6
8844 moz_cv_size_of_JS_BYTES_PER_WORD=
8846 cat > conftest.$ac_ext <<EOF
8847 #line 8848 "configure"
8848 #include "confdefs.h"
8852 int a[sizeof (void*) == $size ? 1 : -1];
8857 if { (eval echo configure:8858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8859 moz_cv_size_of_JS_BYTES_PER_WORD=$size; break
8861 echo "configure: failed program was:" >&5
8862 cat conftest.$ac_ext >&5
8866 if test ! "$moz_cv_size_of_JS_BYTES_PER_WORD"; then
8867 { echo "configure: error: No size found for void*" 1>&2; exit 1; }
8872 echo "$ac_t""$moz_cv_size_of_JS_BYTES_PER_WORD" 1>&6
8873 cat >> confdefs.h <<EOF
8874 #define JS_BYTES_PER_WORD $moz_cv_size_of_JS_BYTES_PER_WORD
8878 if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then
8879 cat >> confdefs.h <<\EOF
8880 #define JS_BITS_PER_WORD_LOG2 5
8883 elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then
8884 cat >> confdefs.h <<\EOF
8885 #define JS_BITS_PER_WORD_LOG2 6
8889 { echo "configure: error: Unexpected JS_BYTES_PER_WORD" 1>&2; exit 1; }
8893 echo $ac_n "checking for the alignment of void*""... $ac_c" 1>&6
8894 echo "configure:8895: checking for the alignment of void*" >&5
8895 if eval "test \"`echo '$''{'moz_cv_align_of_JS_ALIGN_OF_POINTER'+set}'`\" = set"; then
8896 echo $ac_n "(cached) $ac_c" 1>&6
8899 moz_cv_align_of_JS_ALIGN_OF_POINTER=
8900 for align in 2 4 8 16; do
8901 cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8906 struct aligner { char c; void* a; };
8910 int a[offsetof(struct aligner, a) == $align ? 1 : -1];
8915 if { (eval echo configure:8916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8917 moz_cv_align_of_JS_ALIGN_OF_POINTER=$align; break
8919 echo "configure: failed program was:" >&5
8920 cat conftest.$ac_ext >&5
8924 if test ! "$moz_cv_align_of_JS_ALIGN_OF_POINTER"; then
8925 { echo "configure: error: No alignment found for void*" 1>&2; exit 1; }
8930 echo "$ac_t""$moz_cv_align_of_JS_ALIGN_OF_POINTER" 1>&6
8931 cat >> confdefs.h <<EOF
8932 #define JS_ALIGN_OF_POINTER $moz_cv_align_of_JS_ALIGN_OF_POINTER
8937 echo $ac_n "checking for the size of double""... $ac_c" 1>&6
8938 echo "configure:8939: checking for the size of double" >&5
8939 if eval "test \"`echo '$''{'moz_cv_size_of_JS_BYTES_PER_DOUBLE'+set}'`\" = set"; then
8940 echo $ac_n "(cached) $ac_c" 1>&6
8943 moz_cv_size_of_JS_BYTES_PER_DOUBLE=
8944 for size in 6 8 10 12 14; do
8945 cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8951 int a[sizeof (double) == $size ? 1 : -1];
8956 if { (eval echo configure:8957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8958 moz_cv_size_of_JS_BYTES_PER_DOUBLE=$size; break
8960 echo "configure: failed program was:" >&5
8961 cat conftest.$ac_ext >&5
8965 if test ! "$moz_cv_size_of_JS_BYTES_PER_DOUBLE"; then
8966 { echo "configure: error: No size found for double" 1>&2; exit 1; }
8971 echo "$ac_t""$moz_cv_size_of_JS_BYTES_PER_DOUBLE" 1>&6
8972 cat >> confdefs.h <<EOF
8973 #define JS_BYTES_PER_DOUBLE $moz_cv_size_of_JS_BYTES_PER_DOUBLE
8978 echo $ac_n "checking for int16_t""... $ac_c" 1>&6
8979 echo "configure:8980: checking for int16_t" >&5
8980 if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then
8981 echo $ac_n "(cached) $ac_c" 1>&6
8983 cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8987 #include <sys/types.h>
8992 if { (eval echo configure:8993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8996 echo "configure: failed program was:" >&5
8997 cat conftest.$ac_ext >&5
9004 if test "$ac_cv_int16_t" = true ; then
9005 cat >> confdefs.h <<\EOF
9006 #define HAVE_INT16_T 1
9009 echo "$ac_t""yes" 1>&6
9011 echo "$ac_t""no" 1>&6
9013 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
9014 echo "configure:9015: checking for int32_t" >&5
9015 if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then
9016 echo $ac_n "(cached) $ac_c" 1>&6
9018 cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9022 #include <sys/types.h>
9027 if { (eval echo configure:9028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9031 echo "configure: failed program was:" >&5
9032 cat conftest.$ac_ext >&5
9039 if test "$ac_cv_int32_t" = true ; then
9040 cat >> confdefs.h <<\EOF
9041 #define HAVE_INT32_T 1
9044 echo "$ac_t""yes" 1>&6
9046 echo "$ac_t""no" 1>&6
9048 echo $ac_n "checking for int64_t""... $ac_c" 1>&6
9049 echo "configure:9050: checking for int64_t" >&5
9050 if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then
9051 echo $ac_n "(cached) $ac_c" 1>&6
9053 cat > conftest.$ac_ext <<EOF
9054 #line 9055 "configure"
9055 #include "confdefs.h"
9057 #include <sys/types.h>
9062 if { (eval echo configure:9063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9066 echo "configure: failed program was:" >&5
9067 cat conftest.$ac_ext >&5
9074 if test "$ac_cv_int64_t" = true ; then
9075 cat >> confdefs.h <<\EOF
9076 #define HAVE_INT64_T 1
9079 echo "$ac_t""yes" 1>&6
9081 echo "$ac_t""no" 1>&6
9083 echo $ac_n "checking for int64""... $ac_c" 1>&6
9084 echo "configure:9085: checking for int64" >&5
9085 if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then
9086 echo $ac_n "(cached) $ac_c" 1>&6
9088 cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9092 #include <sys/types.h>
9097 if { (eval echo configure:9098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9101 echo "configure: failed program was:" >&5
9102 cat conftest.$ac_ext >&5
9109 if test "$ac_cv_int64" = true ; then
9110 cat >> confdefs.h <<\EOF
9111 #define HAVE_INT64 1
9114 echo "$ac_t""yes" 1>&6
9116 echo "$ac_t""no" 1>&6
9118 echo $ac_n "checking for uint""... $ac_c" 1>&6
9119 echo "configure:9120: checking for uint" >&5
9120 if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then
9121 echo $ac_n "(cached) $ac_c" 1>&6
9123 cat > conftest.$ac_ext <<EOF
9124 #line 9125 "configure"
9125 #include "confdefs.h"
9127 #include <sys/types.h>
9132 if { (eval echo configure:9133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9136 echo "configure: failed program was:" >&5
9137 cat conftest.$ac_ext >&5
9144 if test "$ac_cv_uint" = true ; then
9145 cat >> confdefs.h <<\EOF
9149 echo "$ac_t""yes" 1>&6
9151 echo "$ac_t""no" 1>&6
9153 echo $ac_n "checking for uint_t""... $ac_c" 1>&6
9154 echo "configure:9155: checking for uint_t" >&5
9155 if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then
9156 echo $ac_n "(cached) $ac_c" 1>&6
9158 cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9162 #include <sys/types.h>
9167 if { (eval echo configure:9168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9171 echo "configure: failed program was:" >&5
9172 cat conftest.$ac_ext >&5
9179 if test "$ac_cv_uint_t" = true ; then
9180 cat >> confdefs.h <<\EOF
9181 #define HAVE_UINT_T 1
9184 echo "$ac_t""yes" 1>&6
9186 echo "$ac_t""no" 1>&6
9188 echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
9189 echo "configure:9190: checking for uint16_t" >&5
9190 if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then
9191 echo $ac_n "(cached) $ac_c" 1>&6
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9197 #include <sys/types.h>
9202 if { (eval echo configure:9203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9206 echo "configure: failed program was:" >&5
9207 cat conftest.$ac_ext >&5
9209 ac_cv_uint16_t=false
9214 if test "$ac_cv_uint16_t" = true ; then
9215 cat >> confdefs.h <<\EOF
9216 #define HAVE_UINT16_T 1
9219 echo "$ac_t""yes" 1>&6
9221 echo "$ac_t""no" 1>&6
9225 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
9226 ac_cpp='$CXXCPP $CPPFLAGS'
9227 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
9228 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
9229 cross_compiling=$ac_cv_prog_cxx_cross
9232 echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6
9233 echo "configure:9234: checking for uname.domainname" >&5
9234 if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then
9235 echo $ac_n "(cached) $ac_c" 1>&6
9237 cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240 #include <sys/utsname.h>
9242 struct utsname *res; char *domain;
9243 (void)uname(res); if (res != 0) { domain = res->domainname; }
9246 if { (eval echo configure:9247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9248 ac_cv_have_uname_domainname_field=true
9250 echo "configure: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9253 ac_cv_have_uname_domainname_field=false
9259 if test "$ac_cv_have_uname_domainname_field" = "true"; then
9260 cat >> confdefs.h <<\EOF
9261 #define HAVE_UNAME_DOMAINNAME_FIELD 1
9264 echo "$ac_t""yes" 1>&6
9266 echo "$ac_t""no" 1>&6
9269 echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6
9270 echo "configure:9271: checking for uname.__domainname" >&5
9271 if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then
9272 echo $ac_n "(cached) $ac_c" 1>&6
9274 cat > conftest.$ac_ext <<EOF
9275 #line 9276 "configure"
9276 #include "confdefs.h"
9277 #include <sys/utsname.h>
9279 struct utsname *res; char *domain;
9280 (void)uname(res); if (res != 0) { domain = res->__domainname; }
9283 if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9285 ac_cv_have_uname_us_domainname_field=true
9287 echo "configure: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9290 ac_cv_have_uname_us_domainname_field=false
9296 if test "$ac_cv_have_uname_us_domainname_field" = "true"; then
9297 cat >> confdefs.h <<\EOF
9298 #define HAVE_UNAME_US_DOMAINNAME_FIELD 1
9301 echo "$ac_t""yes" 1>&6
9303 echo "$ac_t""no" 1>&6
9307 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
9308 ac_cpp='$CPP $CPPFLAGS'
9309 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
9310 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
9311 cross_compiling=$ac_cv_prog_cc_cross
9314 if test "$GNU_CC"; then
9315 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
9316 echo "configure:9317: checking for visibility(hidden) attribute" >&5
9317 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
9318 echo $ac_n "(cached) $ac_c" 1>&6
9320 cat > conftest.c <<EOF
9321 int foo __attribute__ ((visibility ("hidden"))) = 1;
9323 ac_cv_visibility_hidden=no
9324 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
9325 if egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
9326 ac_cv_visibility_hidden=yes
9333 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
9334 if test "$ac_cv_visibility_hidden" = "yes"; then
9335 cat >> confdefs.h <<\EOF
9336 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
9340 echo $ac_n "checking for visibility(default) attribute""... $ac_c" 1>&6
9341 echo "configure:9342: checking for visibility(default) attribute" >&5
9342 if eval "test \"`echo '$''{'ac_cv_visibility_default'+set}'`\" = set"; then
9343 echo $ac_n "(cached) $ac_c" 1>&6
9345 cat > conftest.c <<EOF
9346 int foo __attribute__ ((visibility ("default"))) = 1;
9348 ac_cv_visibility_default=no
9349 if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
9350 if ! egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
9351 ac_cv_visibility_default=yes
9358 echo "$ac_t""$ac_cv_visibility_default" 1>&6
9359 if test "$ac_cv_visibility_default" = "yes"; then
9360 cat >> confdefs.h <<\EOF
9361 #define HAVE_VISIBILITY_ATTRIBUTE 1
9365 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
9366 echo "configure:9367: checking for visibility pragma support" >&5
9367 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
9368 echo $ac_n "(cached) $ac_c" 1>&6
9370 cat > conftest.c <<EOF
9371 #pragma GCC visibility push(hidden)
9373 #pragma GCC visibility push(default)
9374 int foo_default = 1;
9376 ac_cv_visibility_pragma=no
9377 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
9378 if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then
9379 if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then
9380 ac_cv_visibility_pragma=yes
9388 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
9389 if test "$ac_cv_visibility_pragma" = "yes"; then
9390 echo $ac_n "checking For gcc visibility bug with class-level attributes (GCC bug 26905)""... $ac_c" 1>&6
9391 echo "configure:9392: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5
9392 if eval "test \"`echo '$''{'ac_cv_have_visibility_class_bug'+set}'`\" = set"; then
9393 echo $ac_n "(cached) $ac_c" 1>&6
9395 cat > conftest.c <<EOF
9396 #pragma GCC visibility push(hidden)
9397 struct __attribute__ ((visibility ("default"))) TestStruct {
9400 __attribute__ ((visibility ("default"))) void TestFunc() {
9404 ac_cv_have_visibility_class_bug=no
9405 if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
9406 ac_cv_have_visibility_class_bug=yes
9408 if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then
9409 ac_cv_have_visibility_class_bug=yes
9412 rm -rf conftest.{c,S}
9416 echo "$ac_t""$ac_cv_have_visibility_class_bug" 1>&6
9418 echo $ac_n "checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)""... $ac_c" 1>&6
9419 echo "configure:9420: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5
9420 if eval "test \"`echo '$''{'ac_cv_have_visibility_builtin_bug'+set}'`\" = set"; then
9421 echo $ac_n "(cached) $ac_c" 1>&6
9423 cat > conftest.c <<EOF
9424 #pragma GCC visibility push(hidden)
9425 #pragma GCC visibility push(default)
9427 #pragma GCC visibility pop
9429 __attribute__ ((visibility ("default"))) void Func() {
9431 memset(c, 0, sizeof(c));
9434 ac_cv_have_visibility_builtin_bug=no
9435 if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
9436 ac_cv_have_visibility_builtin_bug=yes
9438 if test `grep -c "@PLT" conftest.S` = 0; then
9439 ac_cv_visibility_builtin_bug=yes
9442 rm -f conftest.{c,S}
9446 echo "$ac_t""$ac_cv_have_visibility_builtin_bug" 1>&6
9447 if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
9448 "$ac_cv_have_visibility_class_bug" = "no"; then
9449 VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
9450 WRAP_SYSTEM_INCLUDES=1
9451 STL_FLAGS='-I$(DIST)/stl_wrappers'
9454 VISIBILITY_FLAGS='-fvisibility=hidden'
9455 fi # have visibility pragma bug
9456 fi # have visibility pragma
9457 fi # have visibility(default) attribute
9458 fi # have visibility(hidden) attribute
9461 # visibility hidden flag for Sun Studio on Solaris
9462 if test "$SOLARIS_SUNPRO_CC"; then
9463 VISIBILITY_FLAGS='-xldscope=hidden'
9464 fi # Sun Studio on Solaris
9469 if test "$GNU_CC"; then
9470 CFLAGS_save="${CFLAGS}"
9471 CFLAGS="${CFLAGS} -Werror"
9472 echo $ac_n "checking for __force_align_arg_pointer__ attribute""... $ac_c" 1>&6
9473 echo "configure:9474: checking for __force_align_arg_pointer__ attribute" >&5
9474 if eval "test \"`echo '$''{'ac_cv_force_align_arg_pointer'+set}'`\" = set"; then
9475 echo $ac_n "(cached) $ac_c" 1>&6
9477 cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480 __attribute__ ((__force_align_arg_pointer__)) void test() {}
9485 if { (eval echo configure:9486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9487 ac_cv_force_align_arg_pointer="yes"
9489 echo "configure: failed program was:" >&5
9490 cat conftest.$ac_ext >&5
9492 ac_cv_force_align_arg_pointer="no"
9497 echo "$ac_t""$ac_cv_force_align_arg_pointer" 1>&6
9498 CFLAGS="${CFLAGS_save}"
9499 if test "$ac_cv_force_align_arg_pointer" = "yes"; then
9500 HAVE_GCC_ALIGN_ARG_POINTER=1
9502 HAVE_GCC_ALIGN_ARG_POINTER=
9508 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9511 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9512 echo "configure:9513: checking for $ac_hdr that defines DIR" >&5
9513 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9514 echo $ac_n "(cached) $ac_c" 1>&6
9516 cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 #include <sys/types.h>
9525 if { (eval echo configure:9526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9527 eval "ac_cv_header_dirent_$ac_safe=yes"
9529 echo "configure: failed program was:" >&5
9530 cat conftest.$ac_ext >&5
9532 eval "ac_cv_header_dirent_$ac_safe=no"
9536 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9537 echo "$ac_t""yes" 1>&6
9538 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9539 cat >> confdefs.h <<EOF
9540 #define $ac_tr_hdr 1
9542 ac_header_dirent=$ac_hdr; break
9544 echo "$ac_t""no" 1>&6
9547 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9548 if test $ac_header_dirent = dirent.h; then
9549 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9550 echo "configure:9551: checking for opendir in -ldir" >&5
9551 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9553 echo $ac_n "(cached) $ac_c" 1>&6
9555 ac_save_LIBS="$LIBS"
9557 cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 /* Override any gcc2 internal prototype to avoid an error. */
9561 /* We use char because int might match the return type of a gcc2
9562 builtin and then its argument prototype would still apply. */
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9571 eval "ac_cv_lib_$ac_lib_var=yes"
9573 echo "configure: failed program was:" >&5
9574 cat conftest.$ac_ext >&5
9576 eval "ac_cv_lib_$ac_lib_var=no"
9579 LIBS="$ac_save_LIBS"
9582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9583 echo "$ac_t""yes" 1>&6
9586 echo "$ac_t""no" 1>&6
9590 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9591 echo "configure:9592: checking for opendir in -lx" >&5
9592 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9594 echo $ac_n "(cached) $ac_c" 1>&6
9596 ac_save_LIBS="$LIBS"
9598 cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 /* Override any gcc2 internal prototype to avoid an error. */
9602 /* We use char because int might match the return type of a gcc2
9603 builtin and then its argument prototype would still apply. */
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9612 eval "ac_cv_lib_$ac_lib_var=yes"
9614 echo "configure: failed program was:" >&5
9615 cat conftest.$ac_ext >&5
9617 eval "ac_cv_lib_$ac_lib_var=no"
9620 LIBS="$ac_save_LIBS"
9623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9624 echo "$ac_t""yes" 1>&6
9627 echo "$ac_t""no" 1>&6
9632 case "$target_os" in
9634 # for stuff like -lXshm
9635 CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
9638 for ac_hdr in sys/byteorder.h compat.h getopt.h
9640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9642 echo "configure:9643: checking for $ac_hdr" >&5
9643 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9644 echo $ac_n "(cached) $ac_c" 1>&6
9646 cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9652 { (eval echo configure:9653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9654 if test -z "$ac_err"; then
9656 eval "ac_cv_header_$ac_safe=yes"
9659 echo "configure: failed program was:" >&5
9660 cat conftest.$ac_ext >&5
9662 eval "ac_cv_header_$ac_safe=no"
9666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9667 echo "$ac_t""yes" 1>&6
9668 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9669 cat >> confdefs.h <<EOF
9670 #define $ac_tr_hdr 1
9674 echo "$ac_t""no" 1>&6
9678 for ac_hdr in sys/bitypes.h memory.h unistd.h
9680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9681 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9682 echo "configure:9683: checking for $ac_hdr" >&5
9683 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9684 echo $ac_n "(cached) $ac_c" 1>&6
9686 cat > conftest.$ac_ext <<EOF
9687 #line 9688 "configure"
9688 #include "confdefs.h"
9691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9692 { (eval echo configure:9693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9694 if test -z "$ac_err"; then
9696 eval "ac_cv_header_$ac_safe=yes"
9699 echo "configure: failed program was:" >&5
9700 cat conftest.$ac_ext >&5
9702 eval "ac_cv_header_$ac_safe=no"
9706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9707 echo "$ac_t""yes" 1>&6
9708 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9709 cat >> confdefs.h <<EOF
9710 #define $ac_tr_hdr 1
9714 echo "$ac_t""no" 1>&6
9718 for ac_hdr in gnu/libc-version.h nl_types.h
9720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9722 echo "configure:9723: checking for $ac_hdr" >&5
9723 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9724 echo $ac_n "(cached) $ac_c" 1>&6
9726 cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9732 { (eval echo configure:9733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9734 if test -z "$ac_err"; then
9736 eval "ac_cv_header_$ac_safe=yes"
9739 echo "configure: failed program was:" >&5
9740 cat conftest.$ac_ext >&5
9742 eval "ac_cv_header_$ac_safe=no"
9746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9747 echo "$ac_t""yes" 1>&6
9748 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9749 cat >> confdefs.h <<EOF
9750 #define $ac_tr_hdr 1
9754 echo "$ac_t""no" 1>&6
9758 for ac_hdr in malloc.h
9760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9762 echo "configure:9763: checking for $ac_hdr" >&5
9763 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9764 echo $ac_n "(cached) $ac_c" 1>&6
9766 cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9772 { (eval echo configure:9773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9774 if test -z "$ac_err"; then
9776 eval "ac_cv_header_$ac_safe=yes"
9779 echo "configure: failed program was:" >&5
9780 cat conftest.$ac_ext >&5
9782 eval "ac_cv_header_$ac_safe=no"
9786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9787 echo "$ac_t""yes" 1>&6
9788 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9789 cat >> confdefs.h <<EOF
9790 #define $ac_tr_hdr 1
9794 echo "$ac_t""no" 1>&6
9798 for ac_hdr in X11/XKBlib.h
9800 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9801 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9802 echo "configure:9803: checking for $ac_hdr" >&5
9803 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9804 echo $ac_n "(cached) $ac_c" 1>&6
9806 cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9812 { (eval echo configure:9813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9814 if test -z "$ac_err"; then
9816 eval "ac_cv_header_$ac_safe=yes"
9819 echo "configure: failed program was:" >&5
9820 cat conftest.$ac_ext >&5
9822 eval "ac_cv_header_$ac_safe=no"
9826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9827 echo "$ac_t""yes" 1>&6
9828 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9829 cat >> confdefs.h <<EOF
9830 #define $ac_tr_hdr 1
9834 echo "$ac_t""no" 1>&6
9840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9842 echo "configure:9843: checking for $ac_hdr" >&5
9843 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9844 echo $ac_n "(cached) $ac_c" 1>&6
9846 cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9852 { (eval echo configure:9853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9854 if test -z "$ac_err"; then
9856 eval "ac_cv_header_$ac_safe=yes"
9859 echo "configure: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9862 eval "ac_cv_header_$ac_safe=no"
9866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9867 echo "$ac_t""yes" 1>&6
9868 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9869 cat >> confdefs.h <<EOF
9870 #define $ac_tr_hdr 1
9874 echo "$ac_t""no" 1>&6
9879 for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h
9881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9883 echo "configure:9884: checking for $ac_hdr" >&5
9884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9885 echo $ac_n "(cached) $ac_c" 1>&6
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9893 { (eval echo configure:9894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9895 if test -z "$ac_err"; then
9897 eval "ac_cv_header_$ac_safe=yes"
9900 echo "configure: failed program was:" >&5
9901 cat conftest.$ac_ext >&5
9903 eval "ac_cv_header_$ac_safe=no"
9907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9908 echo "$ac_t""yes" 1>&6
9909 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9910 cat >> confdefs.h <<EOF
9911 #define $ac_tr_hdr 1
9915 echo "$ac_t""no" 1>&6
9920 for ac_hdr in sys/quota.h
9922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9924 echo "configure:9925: checking for $ac_hdr" >&5
9925 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9926 echo $ac_n "(cached) $ac_c" 1>&6
9928 cat > conftest.$ac_ext <<EOF
9929 #line 9930 "configure"
9930 #include "confdefs.h"
9933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9934 { (eval echo configure:9935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9936 if test -z "$ac_err"; then
9938 eval "ac_cv_header_$ac_safe=yes"
9941 echo "configure: failed program was:" >&5
9942 cat conftest.$ac_ext >&5
9944 eval "ac_cv_header_$ac_safe=no"
9948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9949 echo "$ac_t""yes" 1>&6
9950 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9951 cat >> confdefs.h <<EOF
9952 #define $ac_tr_hdr 1
9956 echo "$ac_t""no" 1>&6
9960 for ac_hdr in linux/quota.h
9962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9964 echo "configure:9965: checking for $ac_hdr" >&5
9965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9966 echo $ac_n "(cached) $ac_c" 1>&6
9968 cat > conftest.$ac_ext <<EOF
9969 #line 9970 "configure"
9970 #include "confdefs.h"
9973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9974 { (eval echo configure:9975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9976 if test -z "$ac_err"; then
9978 eval "ac_cv_header_$ac_safe=yes"
9981 echo "configure: failed program was:" >&5
9982 cat conftest.$ac_ext >&5
9984 eval "ac_cv_header_$ac_safe=no"
9988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9989 echo "$ac_t""yes" 1>&6
9990 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9991 cat >> confdefs.h <<EOF
9992 #define $ac_tr_hdr 1
9996 echo "$ac_t""no" 1>&6
10001 for ac_hdr in mmintrin.h
10003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10005 echo "configure:10006: checking for $ac_hdr" >&5
10006 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10007 echo $ac_n "(cached) $ac_c" 1>&6
10009 cat > conftest.$ac_ext <<EOF
10010 #line 10011 "configure"
10011 #include "confdefs.h"
10014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10015 { (eval echo configure:10016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10017 if test -z "$ac_err"; then
10019 eval "ac_cv_header_$ac_safe=yes"
10022 echo "configure: failed program was:" >&5
10023 cat conftest.$ac_ext >&5
10025 eval "ac_cv_header_$ac_safe=no"
10029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10030 echo "$ac_t""yes" 1>&6
10031 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10032 cat >> confdefs.h <<EOF
10033 #define $ac_tr_hdr 1
10037 echo "$ac_t""no" 1>&6
10043 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
10044 ac_cpp='$CXXCPP $CPPFLAGS'
10045 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
10046 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
10047 cross_compiling=$ac_cv_prog_cxx_cross
10050 ac_safe=`echo "new" | sed 'y%./+-%__p_%'`
10051 echo $ac_n "checking for new""... $ac_c" 1>&6
10052 echo "configure:10053: checking for new" >&5
10053 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10054 echo $ac_n "(cached) $ac_c" 1>&6
10056 cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10062 { (eval echo configure:10063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10064 if test -z "$ac_err"; then
10066 eval "ac_cv_header_$ac_safe=yes"
10069 echo "configure: failed program was:" >&5
10070 cat conftest.$ac_ext >&5
10072 eval "ac_cv_header_$ac_safe=no"
10076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10077 echo "$ac_t""yes" 1>&6
10080 echo "$ac_t""no" 1>&6
10083 cat >> confdefs.h <<EOF
10084 #define NEW_H <$NEW_H>
10088 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
10089 ac_cpp='$CPP $CPPFLAGS'
10090 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
10091 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
10092 cross_compiling=$ac_cv_prog_cc_cross
10095 # Check whether --enable-dtrace or --disable-dtrace was given.
10096 if test "${enable_dtrace+set}" = set; then
10097 enableval="$enable_dtrace"
10098 enable_dtrace="yes"
10101 if test "x$enable_dtrace" = "xyes"; then
10102 ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'`
10103 echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6
10104 echo "configure:10105: checking for sys/sdt.h" >&5
10105 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10106 echo $ac_n "(cached) $ac_c" 1>&6
10108 cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 #include <sys/sdt.h>
10113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10114 { (eval echo configure:10115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10116 if test -z "$ac_err"; then
10118 eval "ac_cv_header_$ac_safe=yes"
10121 echo "configure: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10124 eval "ac_cv_header_$ac_safe=no"
10128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10129 echo "$ac_t""yes" 1>&6
10132 echo "$ac_t""no" 1>&6
10135 if test -n "$HAVE_DTRACE"; then
10136 cat >> confdefs.h <<\EOF
10137 #define INCLUDE_MOZILLA_DTRACE 1
10141 { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; exit 1; };
10150 for ac_hdr in sys/cdefs.h
10152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10154 echo "configure:10155: checking for $ac_hdr" >&5
10155 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10156 echo $ac_n "(cached) $ac_c" 1>&6
10158 cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10164 { (eval echo configure:10165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10166 if test -z "$ac_err"; then
10168 eval "ac_cv_header_$ac_safe=yes"
10171 echo "configure: failed program was:" >&5
10172 cat conftest.$ac_ext >&5
10174 eval "ac_cv_header_$ac_safe=no"
10178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10179 echo "$ac_t""yes" 1>&6
10180 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10181 cat >> confdefs.h <<EOF
10182 #define $ac_tr_hdr 1
10186 echo "$ac_t""no" 1>&6
10193 ac_safe=`echo "linux/perf_event.h" | sed 'y%./+-%__p_%'`
10194 echo $ac_n "checking for linux/perf_event.h""... $ac_c" 1>&6
10195 echo "configure:10196: checking for linux/perf_event.h" >&5
10196 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10197 echo $ac_n "(cached) $ac_c" 1>&6
10199 cat > conftest.$ac_ext <<EOF
10200 #line 10201 "configure"
10201 #include "confdefs.h"
10202 #include <linux/perf_event.h>
10204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10205 { (eval echo configure:10206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10207 if test -z "$ac_err"; then
10209 eval "ac_cv_header_$ac_safe=yes"
10212 echo "configure: failed program was:" >&5
10213 cat conftest.$ac_ext >&5
10215 eval "ac_cv_header_$ac_safe=no"
10219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10220 echo "$ac_t""yes" 1>&6
10221 HAVE_LINUX_PERF_EVENT_H=1
10223 echo "$ac_t""no" 1>&6
10232 echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
10233 echo "configure:10234: checking for gethostbyname_r in -lc_r" >&5
10234 ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'`
10235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10236 echo $ac_n "(cached) $ac_c" 1>&6
10238 ac_save_LIBS="$LIBS"
10240 cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 /* Override any gcc2 internal prototype to avoid an error. */
10244 /* We use char because int might match the return type of a gcc2
10245 builtin and then its argument prototype would still apply. */
10246 char gethostbyname_r();
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10254 eval "ac_cv_lib_$ac_lib_var=yes"
10256 echo "configure: failed program was:" >&5
10257 cat conftest.$ac_ext >&5
10259 eval "ac_cv_lib_$ac_lib_var=no"
10262 LIBS="$ac_save_LIBS"
10265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10266 echo "$ac_t""yes" 1>&6
10267 ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10268 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10269 cat >> confdefs.h <<EOF
10270 #define $ac_tr_lib 1
10276 echo "$ac_t""no" 1>&6
10291 echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
10292 echo "configure:10293: checking for library containing dlopen" >&5
10293 if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
10294 echo $ac_n "(cached) $ac_c" 1>&6
10296 ac_func_search_save_LIBS="$LIBS"
10297 ac_cv_search_dlopen="no"
10298 cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* Override any gcc2 internal prototype to avoid an error. */
10302 /* We use char because int might match the return type of a gcc2
10303 builtin and then its argument prototype would still apply. */
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10312 ac_cv_search_dlopen="none required"
10314 echo "configure: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10318 test "$ac_cv_search_dlopen" = "no" && for i in dl; do
10319 LIBS="-l$i $ac_func_search_save_LIBS"
10320 cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323 /* Override any gcc2 internal prototype to avoid an error. */
10324 /* We use char because int might match the return type of a gcc2
10325 builtin and then its argument prototype would still apply. */
10332 if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10334 ac_cv_search_dlopen="-l$i"
10337 echo "configure: failed program was:" >&5
10338 cat conftest.$ac_ext >&5
10342 LIBS="$ac_func_search_save_LIBS"
10345 echo "$ac_t""$ac_cv_search_dlopen" 1>&6
10346 if test "$ac_cv_search_dlopen" != "no"; then
10347 test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
10348 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
10349 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
10350 echo "configure:10351: checking for dlfcn.h" >&5
10351 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10352 echo $ac_n "(cached) $ac_c" 1>&6
10354 cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10360 { (eval echo configure:10361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10362 if test -z "$ac_err"; then
10364 eval "ac_cv_header_$ac_safe=yes"
10367 echo "configure: failed program was:" >&5
10368 cat conftest.$ac_ext >&5
10370 eval "ac_cv_header_$ac_safe=no"
10374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10375 echo "$ac_t""yes" 1>&6
10376 cat >> confdefs.h <<\EOF
10377 #define HAVE_DLOPEN 1
10381 echo "$ac_t""no" 1>&6
10390 _SAVE_CFLAGS="$CFLAGS"
10391 CFLAGS="$CFLAGS -D_GNU_SOURCE"
10392 for ac_func in dladdr
10394 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10395 echo "configure:10396: checking for $ac_func" >&5
10396 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10397 echo $ac_n "(cached) $ac_c" 1>&6
10399 cat > conftest.$ac_ext <<EOF
10400 #line 10401 "configure"
10401 #include "confdefs.h"
10402 /* System header to define __stub macros and hopefully few prototypes,
10403 which can conflict with char $ac_func(); below. */
10404 #include <assert.h>
10405 /* Override any gcc2 internal prototype to avoid an error. */
10406 /* We use char because int might match the return type of a gcc2
10407 builtin and then its argument prototype would still apply. */
10412 /* The GNU C library defines this for functions which it implements
10413 to always fail with ENOSYS. Some functions are actually named
10414 something starting with __ and the normal name is an alias. */
10415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10423 if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10425 eval "ac_cv_func_$ac_func=yes"
10427 echo "configure: failed program was:" >&5
10428 cat conftest.$ac_ext >&5
10430 eval "ac_cv_func_$ac_func=no"
10435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10436 echo "$ac_t""yes" 1>&6
10437 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10438 cat >> confdefs.h <<EOF
10439 #define $ac_tr_func 1
10443 echo "$ac_t""no" 1>&6
10447 CFLAGS="$_SAVE_CFLAGS"
10449 if test ! "$GNU_CXX"; then
10453 echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6
10454 echo "configure:10455: checking for demangle in -lC_r" >&5
10455 ac_lib_var=`echo C_r'_'demangle | sed 'y%./+-%__p_%'`
10456 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10457 echo $ac_n "(cached) $ac_c" 1>&6
10459 ac_save_LIBS="$LIBS"
10461 cat > conftest.$ac_ext <<EOF
10462 #line 10463 "configure"
10463 #include "confdefs.h"
10464 /* Override any gcc2 internal prototype to avoid an error. */
10465 /* We use char because int might match the return type of a gcc2
10466 builtin and then its argument prototype would still apply. */
10473 if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10475 eval "ac_cv_lib_$ac_lib_var=yes"
10477 echo "configure: failed program was:" >&5
10478 cat conftest.$ac_ext >&5
10480 eval "ac_cv_lib_$ac_lib_var=no"
10483 LIBS="$ac_save_LIBS"
10486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10487 echo "$ac_t""yes" 1>&6
10488 ac_tr_lib=HAVE_LIB`echo C_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10489 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10490 cat >> confdefs.h <<EOF
10491 #define $ac_tr_lib 1
10497 echo "$ac_t""no" 1>&6
10502 echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
10503 echo "configure:10504: checking for demangle in -lC" >&5
10504 ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'`
10505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10506 echo $ac_n "(cached) $ac_c" 1>&6
10508 ac_save_LIBS="$LIBS"
10510 cat > conftest.$ac_ext <<EOF
10511 #line 10512 "configure"
10512 #include "confdefs.h"
10513 /* Override any gcc2 internal prototype to avoid an error. */
10514 /* We use char because int might match the return type of a gcc2
10515 builtin and then its argument prototype would still apply. */
10522 if { (eval echo configure:10523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10524 eval "ac_cv_lib_$ac_lib_var=yes"
10526 echo "configure: failed program was:" >&5
10527 cat conftest.$ac_ext >&5
10529 eval "ac_cv_lib_$ac_lib_var=no"
10532 LIBS="$ac_save_LIBS"
10535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10536 echo "$ac_t""yes" 1>&6
10537 ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10538 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10539 cat >> confdefs.h <<EOF
10540 #define $ac_tr_lib 1
10546 echo "$ac_t""no" 1>&6
10557 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
10558 echo "configure:10559: checking for socket in -lsocket" >&5
10559 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
10560 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10561 echo $ac_n "(cached) $ac_c" 1>&6
10563 ac_save_LIBS="$LIBS"
10564 LIBS="-lsocket $LIBS"
10565 cat > conftest.$ac_ext <<EOF
10566 #line 10567 "configure"
10567 #include "confdefs.h"
10568 /* Override any gcc2 internal prototype to avoid an error. */
10569 /* We use char because int might match the return type of a gcc2
10570 builtin and then its argument prototype would still apply. */
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10579 eval "ac_cv_lib_$ac_lib_var=yes"
10581 echo "configure: failed program was:" >&5
10582 cat conftest.$ac_ext >&5
10584 eval "ac_cv_lib_$ac_lib_var=no"
10587 LIBS="$ac_save_LIBS"
10590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10591 echo "$ac_t""yes" 1>&6
10592 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10593 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10594 cat >> confdefs.h <<EOF
10595 #define $ac_tr_lib 1
10598 LIBS="-lsocket $LIBS"
10601 echo "$ac_t""no" 1>&6
10606 echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6
10607 echo "configure:10608: checking for ARM SIMD support in compiler" >&5
10608 cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10613 asm("uqadd8 r1, r1, r2");
10616 if { (eval echo configure:10617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10620 echo "configure: failed program was:" >&5
10621 cat conftest.$ac_ext >&5
10626 echo "$ac_t"""$result"" 1>&6
10627 if test "$result" = "yes"; then
10628 cat >> confdefs.h <<\EOF
10629 #define HAVE_ARM_SIMD 1
10636 echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6
10637 echo "configure:10638: checking for ARM NEON support in compiler" >&5
10638 _SAVE_CFLAGS="$CFLAGS"
10639 if test "$GNU_CC"; then
10640 # gcc needs -mfpu=neon to recognize NEON instructions
10641 CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
10643 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10648 asm("vadd.i8 d0, d0, d0");
10651 if { (eval echo configure:10652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10655 echo "configure: failed program was:" >&5
10656 cat conftest.$ac_ext >&5
10661 echo "$ac_t"""$result"" 1>&6
10662 if test "$result" = "yes"; then
10663 cat >> confdefs.h <<\EOF
10664 #define HAVE_ARM_NEON 1
10669 CFLAGS="$_SAVE_CFLAGS"
10672 case "$target_os" in
10678 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
10679 echo "configure:10680: checking for pthread_create in -lpthreads" >&5
10681 #include <pthread.h>
10682 #include <stdlib.h>
10683 void *foo(void *v) { int a = 1; }
10686 if (!pthread_create(&t, 0, &foo, 0)) {
10687 pthread_join(t, 0);
10691 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
10692 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
10694 rm -f dummy.c dummy${ac_exeext} ;
10695 if test "$_res" = "0"; then
10696 echo "$ac_t""yes" 1>&6
10697 USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
10699 echo "$ac_t""no" 1>&6
10701 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
10702 echo "configure:10703: checking for pthread_create in -lpthread" >&5
10704 #include <pthread.h>
10705 #include <stdlib.h>
10706 void *foo(void *v) { int a = 1; }
10709 if (!pthread_create(&t, 0, &foo, 0)) {
10710 pthread_join(t, 0);
10714 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
10715 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
10717 rm -f dummy.c dummy${ac_exeext} ;
10718 if test "$_res" = "0"; then
10719 echo "$ac_t""yes" 1>&6
10720 USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
10722 echo "$ac_t""no" 1>&6
10724 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
10725 echo "configure:10726: checking for pthread_create in -lc_r" >&5
10727 #include <pthread.h>
10728 #include <stdlib.h>
10729 void *foo(void *v) { int a = 1; }
10732 if (!pthread_create(&t, 0, &foo, 0)) {
10733 pthread_join(t, 0);
10737 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
10738 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
10740 rm -f dummy.c dummy${ac_exeext} ;
10741 if test "$_res" = "0"; then
10742 echo "$ac_t""yes" 1>&6
10743 USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
10745 echo "$ac_t""no" 1>&6
10747 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
10748 echo "configure:10749: checking for pthread_create in -lc" >&5
10750 #include <pthread.h>
10751 #include <stdlib.h>
10752 void *foo(void *v) { int a = 1; }
10755 if (!pthread_create(&t, 0, &foo, 0)) {
10756 pthread_join(t, 0);
10760 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
10761 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
10763 rm -f dummy.c dummy${ac_exeext} ;
10764 if test "$_res" = "0"; then
10765 echo "$ac_t""yes" 1>&6
10769 echo "$ac_t""no" 1>&6
10785 # Check whether --with-pthreads or --without-pthreads was given.
10786 if test "${with_pthreads+set}" = set; then
10787 withval="$with_pthreads"
10788 if test "$withval" = "yes"; then
10789 if test "$USE_PTHREADS"x = x; then
10790 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
10792 elif test "$withval" = "no"; then
10797 { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; exit 1; }
10802 if test "$USE_PTHREADS"x != x
10805 ac_cv_have_dash_pthread=no
10806 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
10807 echo "configure:10808: checking whether ${CC-cc} accepts -pthread" >&5
10808 echo 'int main() { return 0; }' | cat > conftest.c
10809 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
10810 if test $? -eq 0; then
10811 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
10812 ac_cv_have_dash_pthread=yes
10813 case "$target_os" in
10815 # Freebsd doesn't use -pthread for compiles, it uses them for linking
10818 CFLAGS="$CFLAGS -pthread"
10819 CXXFLAGS="$CXXFLAGS -pthread"
10825 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
10827 ac_cv_have_dash_pthreads=no
10828 if test "$ac_cv_have_dash_pthread" = "no"; then
10829 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
10830 echo "configure:10831: checking whether ${CC-cc} accepts -pthreads" >&5
10831 echo 'int main() { return 0; }' | cat > conftest.c
10832 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
10833 if test $? -eq 0; then
10834 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
10835 ac_cv_have_dash_pthreads=yes
10836 CFLAGS="$CFLAGS -pthreads"
10837 CXXFLAGS="$CXXFLAGS -pthreads"
10841 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
10846 cat >> confdefs.h <<\EOF
10847 #define _REENTRANT 1
10850 cat >> confdefs.h <<\EOF
10851 #define _THREAD_SAFE 1
10854 if test "$ac_cv_have_dash_pthread" = "yes"; then
10855 _PTHREAD_LDFLAGS="-pthread"
10857 _PTHREAD_LDFLAGS="-lc_r"
10861 *-*-openbsd*|*-*-bsdi*)
10862 cat >> confdefs.h <<\EOF
10863 #define _REENTRANT 1
10866 cat >> confdefs.h <<\EOF
10867 #define _THREAD_SAFE 1
10870 if test "$ac_cv_have_dash_pthread" = "yes"; then
10871 _PTHREAD_LDFLAGS="-pthread"
10875 *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*)
10876 cat >> confdefs.h <<\EOF
10877 #define _REENTRANT 1
10883 cat >> confdefs.h <<\EOF
10884 #define _REENTRANT 1
10890 cat >> confdefs.h <<\EOF
10891 #define _REENTRANT 1
10897 cat >> confdefs.h <<\EOF
10898 #define _REENTRANT 1
10904 cat >> confdefs.h <<\EOF
10905 #define _REENTRANT 1
10911 cat >> confdefs.h <<\EOF
10912 #define _REENTRANT 1
10915 if test "$SOLARIS_SUNPRO_CC"; then
10916 CFLAGS="$CFLAGS -mt"
10917 CXXFLAGS="$CXXFLAGS -mt"
10921 LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
10924 echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6
10925 echo "configure:10926: checking whether mmap() sees write()s" >&5
10929 #include <stdlib.h>
10930 #include <unistd.h>
10931 #include <sys/mman.h>
10932 #include <sys/types.h>
10933 #include <sys/stat.h>
10936 char fname[] = "conftest.file";
10937 char zbuff[1024]; /* Fractional page is probably worst case */
10944 fd = open(fname, O_RDWR | O_CREAT, 0660);
10947 write(fd, zbuff, sizeof(zbuff));
10948 lseek(fd, 0, SEEK_SET);
10949 map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0);
10950 if(map==(char*)-1) return 2;
10951 for(i=0; fname[i]; i++) {
10952 int rc = write(fd, &fname[i], 1);
10953 if(map[i]!=fname[i]) return 4;
10960 if test "$cross_compiling" = yes; then
10963 cat > conftest.$ac_ext <<EOF
10964 #line 10965 "configure"
10965 #include "confdefs.h"
10968 if { (eval echo configure:10969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10972 echo "configure: failed program was:" >&5
10973 cat conftest.$ac_ext >&5
10981 echo "$ac_t"""$result"" 1>&6
10983 if test "$result" = "no"; then
10984 cat >> confdefs.h <<\EOF
10985 #define MMAP_MISSES_WRITES 1
10991 if test $ac_cv_prog_gcc = yes; then
10992 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
10993 echo "configure:10994: checking whether ${CC-cc} needs -traditional" >&5
10994 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
10995 echo $ac_n "(cached) $ac_c" 1>&6
10997 ac_pattern="Autoconf.*'x'"
10998 cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005 egrep "$ac_pattern" >/dev/null 2>&1; then
11007 ac_cv_prog_gcc_traditional=yes
11010 ac_cv_prog_gcc_traditional=no
11015 if test $ac_cv_prog_gcc_traditional = no; then
11016 cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <termio.h>
11022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11023 egrep "$ac_pattern" >/dev/null 2>&1; then
11025 ac_cv_prog_gcc_traditional=yes
11032 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
11033 if test $ac_cv_prog_gcc_traditional = yes; then
11034 CC="$CC -traditional"
11038 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11039 echo "configure:11040: checking for 8-bit clean memcmp" >&5
11040 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11041 echo $ac_n "(cached) $ac_c" 1>&6
11043 if test "$cross_compiling" = yes; then
11044 ac_cv_func_memcmp_clean=no
11046 cat > conftest.$ac_ext <<EOF
11047 #line 11048 "configure"
11048 #include "confdefs.h"
11052 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11053 exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11057 if { (eval echo configure:11058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11059 ac_cv_func_memcmp_clean=yes
11061 echo "configure: failed program was:" >&5
11062 cat conftest.$ac_ext >&5
11064 ac_cv_func_memcmp_clean=no
11071 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11072 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11074 for ac_func in fchmod flockfile getc_unlocked _getc_nolock getpagesize \
11075 lchown localtime_r lstat64 memmove random rint sbrk snprintf \
11076 stat64 statvfs statvfs64 strerror strtok_r truncate64
11078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11079 echo "configure:11080: checking for $ac_func" >&5
11080 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11081 echo $ac_n "(cached) $ac_c" 1>&6
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 /* System header to define __stub macros and hopefully few prototypes,
11087 which can conflict with char $ac_func(); below. */
11088 #include <assert.h>
11089 /* Override any gcc2 internal prototype to avoid an error. */
11090 /* We use char because int might match the return type of a gcc2
11091 builtin and then its argument prototype would still apply. */
11096 /* The GNU C library defines this for functions which it implements
11097 to always fail with ENOSYS. Some functions are actually named
11098 something starting with __ and the normal name is an alias. */
11099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11107 if { (eval echo configure:11108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11109 eval "ac_cv_func_$ac_func=yes"
11111 echo "configure: failed program was:" >&5
11112 cat conftest.$ac_ext >&5
11114 eval "ac_cv_func_$ac_func=no"
11119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11120 echo "$ac_t""yes" 1>&6
11121 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11122 cat >> confdefs.h <<EOF
11123 #define $ac_tr_func 1
11127 echo "$ac_t""no" 1>&6
11132 _SAVE_LDFLAGS=$LDFLAGS
11133 LDFLAGS="$LDFLAGS -lrt"
11134 echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC) and -lrt""... $ac_c" 1>&6
11135 echo "configure:11136: checking for clock_gettime(CLOCK_MONOTONIC) and -lrt" >&5
11136 if eval "test \"`echo '$''{'ac_cv_have_clock_monotonic'+set}'`\" = set"; then
11137 echo $ac_n "(cached) $ac_c" 1>&6
11139 cat > conftest.$ac_ext <<EOF
11140 #line 11141 "configure"
11141 #include "confdefs.h"
11144 struct timespec ts;
11145 clock_gettime(CLOCK_MONOTONIC, &ts);
11148 if { (eval echo configure:11149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11150 ac_cv_have_clock_monotonic=yes
11152 echo "configure: failed program was:" >&5
11153 cat conftest.$ac_ext >&5
11155 ac_cv_have_clock_monotonic=no
11160 echo "$ac_t""$ac_cv_have_clock_monotonic" 1>&6
11161 LDFLAGS=$_SAVE_LDFLAGS
11162 if test "$ac_cv_have_clock_monotonic" = "yes"; then
11163 HAVE_CLOCK_MONOTONIC=1
11165 cat >> confdefs.h <<\EOF
11166 #define HAVE_CLOCK_MONOTONIC 1
11173 cat > conftest.$ac_ext <<EOF
11174 #line 11175 "configure"
11175 #include "confdefs.h"
11176 #include <windows.h>
11178 SYSTEMTIME st;FILETIME ft;SystemTimeToFileTime(&st,&ft);
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11183 ac_cv_have_systemtimetofiletime="yes"
11185 echo "configure: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11188 ac_cv_have_systemtimetofiletime="no"
11191 if test "$ac_cv_have_systemtimetofiletime" = "yes"; then
11192 cat >> confdefs.h <<\EOF
11193 #define HAVE_SYSTEMTIMETOFILETIME 1
11197 cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include <windows.h>
11202 FILETIME ft;GetSystemTimeAsFileTime(&ft);
11205 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11207 ac_cv_have_getsystemtimeasfiletime="yes"
11209 echo "configure: failed program was:" >&5
11210 cat conftest.$ac_ext >&5
11212 ac_cv_have_getsystemtimeasfiletime="no"
11215 if test "$ac_cv_have_getsystemtimeasfiletime" = "yes"; then
11216 cat >> confdefs.h <<\EOF
11217 #define HAVE_GETSYSTEMTIMEASFILETIME 1
11222 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
11225 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11226 ac_cpp='$CXXCPP $CPPFLAGS'
11227 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11228 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11229 cross_compiling=$ac_cv_prog_cxx_cross
11231 echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6
11232 echo "configure:11233: checking for wcrtomb" >&5
11233 if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then
11234 echo $ac_n "(cached) $ac_c" 1>&6
11236 cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11241 mbstate_t ps={0};wcrtomb(0,'f',&ps);
11244 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11246 ac_cv_have_wcrtomb="yes"
11248 echo "configure: failed program was:" >&5
11249 cat conftest.$ac_ext >&5
11251 ac_cv_have_wcrtomb="no"
11256 echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6
11257 if test "$ac_cv_have_wcrtomb" = "yes"; then
11258 cat >> confdefs.h <<\EOF
11259 #define HAVE_WCRTOMB 1
11263 echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6
11264 echo "configure:11265: checking for mbrtowc" >&5
11265 if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then
11266 echo $ac_n "(cached) $ac_c" 1>&6
11268 cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11273 mbstate_t ps={0};mbrtowc(0,0,0,&ps);
11276 if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11278 ac_cv_have_mbrtowc="yes"
11280 echo "configure: failed program was:" >&5
11281 cat conftest.$ac_ext >&5
11283 ac_cv_have_mbrtowc="no"
11288 echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6
11289 if test "$ac_cv_have_mbrtowc" = "yes"; then
11290 cat >> confdefs.h <<\EOF
11291 #define HAVE_MBRTOWC 1
11296 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11297 ac_cpp='$CPP $CPPFLAGS'
11298 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11299 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11300 cross_compiling=$ac_cv_prog_cc_cross
11304 echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6
11305 echo "configure:11306: checking for res_ninit()" >&5
11306 if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then
11307 echo $ac_n "(cached) $ac_c" 1>&6
11309 cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11314 #define _BSD_SOURCE 1
11316 #include <resolv.h>
11319 int foo = res_ninit(&_res);
11322 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11324 ac_cv_func_res_ninit=yes
11326 echo "configure: failed program was:" >&5
11327 cat conftest.$ac_ext >&5
11329 ac_cv_func_res_ninit=no
11335 echo "$ac_t""$ac_cv_func_res_ninit" 1>&6
11337 if test "$ac_cv_func_res_ninit" = "yes"; then
11338 cat >> confdefs.h <<\EOF
11339 #define HAVE_RES_NINIT 1
11345 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11346 ac_cpp='$CXXCPP $CPPFLAGS'
11347 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11348 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11349 cross_compiling=$ac_cv_prog_cxx_cross
11351 echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6
11352 echo "configure:11353: checking for gnu_get_libc_version()" >&5
11353 if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then
11354 echo $ac_n "(cached) $ac_c" 1>&6
11356 cat > conftest.$ac_ext <<EOF
11357 #line 11358 "configure"
11358 #include "confdefs.h"
11360 #ifdef HAVE_GNU_LIBC_VERSION_H
11361 #include <gnu/libc-version.h>
11365 const char *glibc_version = gnu_get_libc_version();
11368 if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11370 ac_cv_func_gnu_get_libc_version=yes
11372 echo "configure: failed program was:" >&5
11373 cat conftest.$ac_ext >&5
11375 ac_cv_func_gnu_get_libc_version=no
11382 echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6
11384 if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then
11385 cat >> confdefs.h <<\EOF
11386 #define HAVE_GNU_GET_LIBC_VERSION 1
11392 os2*|msvc*|mks*|cygwin*|mingw*|darwin*|wince*|winmo*|beos*)
11396 echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6
11397 echo "configure:11398: checking for iconv in -lc" >&5
11398 ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'`
11399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11400 echo $ac_n "(cached) $ac_c" 1>&6
11402 ac_save_LIBS="$LIBS"
11404 cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407 /* Override any gcc2 internal prototype to avoid an error. */
11411 /* We use char because int might match the return type of a gcc2
11412 builtin and then its argument prototype would still apply. */
11419 if { (eval echo configure:11420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11421 eval "ac_cv_lib_$ac_lib_var=yes"
11423 echo "configure: failed program was:" >&5
11424 cat conftest.$ac_ext >&5
11426 eval "ac_cv_lib_$ac_lib_var=no"
11429 LIBS="$ac_save_LIBS"
11432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11433 echo "$ac_t""yes" 1>&6
11434 _ICONV_LIBS="$_ICONV_LIBS"
11436 echo "$ac_t""no" 1>&6
11437 echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
11438 echo "configure:11439: checking for iconv in -liconv" >&5
11439 ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
11440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11441 echo $ac_n "(cached) $ac_c" 1>&6
11443 ac_save_LIBS="$LIBS"
11444 LIBS="-liconv $LIBS"
11445 cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448 /* Override any gcc2 internal prototype to avoid an error. */
11452 /* We use char because int might match the return type of a gcc2
11453 builtin and then its argument prototype would still apply. */
11460 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11462 eval "ac_cv_lib_$ac_lib_var=yes"
11464 echo "configure: failed program was:" >&5
11465 cat conftest.$ac_ext >&5
11467 eval "ac_cv_lib_$ac_lib_var=no"
11470 LIBS="$ac_save_LIBS"
11473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11474 echo "$ac_t""yes" 1>&6
11475 _ICONV_LIBS="$_ICONV_LIBS -liconv"
11477 echo "$ac_t""no" 1>&6
11478 echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
11479 echo "configure:11480: checking for libiconv in -liconv" >&5
11480 ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
11481 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11482 echo $ac_n "(cached) $ac_c" 1>&6
11484 ac_save_LIBS="$LIBS"
11485 LIBS="-liconv $LIBS"
11486 cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 /* Override any gcc2 internal prototype to avoid an error. */
11493 /* We use char because int might match the return type of a gcc2
11494 builtin and then its argument prototype would still apply. */
11501 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11503 eval "ac_cv_lib_$ac_lib_var=yes"
11505 echo "configure: failed program was:" >&5
11506 cat conftest.$ac_ext >&5
11508 eval "ac_cv_lib_$ac_lib_var=no"
11511 LIBS="$ac_save_LIBS"
11514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11515 echo "$ac_t""yes" 1>&6
11516 _ICONV_LIBS="$_ICONV_LIBS -liconv"
11518 echo "$ac_t""no" 1>&6
11526 LIBS="$LIBS $_ICONV_LIBS"
11527 echo $ac_n "checking for iconv()""... $ac_c" 1>&6
11528 echo "configure:11529: checking for iconv()" >&5
11529 if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
11530 echo $ac_n "(cached) $ac_c" 1>&6
11532 cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11536 #include <stdlib.h>
11541 iconv_t h = iconv_open("", "");
11542 iconv(h, NULL, NULL, NULL, NULL);
11547 if { (eval echo configure:11548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11549 ac_cv_func_iconv=yes
11551 echo "configure: failed program was:" >&5
11552 cat conftest.$ac_ext >&5
11554 ac_cv_func_iconv=no
11561 echo "$ac_t""$ac_cv_func_iconv" 1>&6
11562 if test "$ac_cv_func_iconv" = "yes"; then
11563 cat >> confdefs.h <<\EOF
11564 #define HAVE_ICONV 1
11567 DYNAMIC_XPCOM_LIBS="$DYNAMIC_XPCOM_LIBS $_ICONV_LIBS"
11568 LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
11569 LIBICONV="$_ICONV_LIBS"
11570 echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6
11571 echo "configure:11572: checking for iconv() with const input" >&5
11572 if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then
11573 echo $ac_n "(cached) $ac_c" 1>&6
11575 cat > conftest.$ac_ext <<EOF
11576 #line 11577 "configure"
11577 #include "confdefs.h"
11579 #include <stdlib.h>
11584 const char *input = "testing";
11585 iconv_t h = iconv_open("", "");
11586 iconv(h, &input, NULL, NULL, NULL);
11591 if { (eval echo configure:11592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11593 ac_cv_func_const_iconv=yes
11595 echo "configure: failed program was:" >&5
11596 cat conftest.$ac_ext >&5
11598 ac_cv_func_const_iconv=no
11605 echo "$ac_t""$ac_cv_func_const_iconv" 1>&6
11606 if test "$ac_cv_func_const_iconv" = "yes"; then
11607 cat >> confdefs.h <<\EOF
11608 #define HAVE_ICONV_WITH_CONST_INPUT 1
11619 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11620 ac_cpp='$CPP $CPPFLAGS'
11621 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11622 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11623 cross_compiling=$ac_cv_prog_cc_cross
11626 echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6
11627 echo "configure:11628: checking for an implementation of va_copy()" >&5
11628 if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then
11629 echo $ac_n "(cached) $ac_c" 1>&6
11632 if test "$cross_compiling" = yes; then
11636 cat > conftest.$ac_ext <<EOF
11637 #line 11638 "configure"
11638 #include "confdefs.h"
11640 #include <stdarg.h>
11641 void f (int i, ...) {
11642 va_list args1, args2;
11643 va_start (args1, i);
11644 va_copy (args2, args1);
11645 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11647 va_end (args1); va_end (args2);
11649 int main() { f (0, 42); return 0; }
11651 if { (eval echo configure:11652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11655 echo "configure: failed program was:" >&5
11656 cat conftest.$ac_ext >&5
11666 echo "$ac_t""$ac_cv_va_copy" 1>&6
11667 echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6
11668 echo "configure:11669: checking for an implementation of __va_copy()" >&5
11669 if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then
11670 echo $ac_n "(cached) $ac_c" 1>&6
11673 if test "$cross_compiling" = yes; then
11677 cat > conftest.$ac_ext <<EOF
11678 #line 11679 "configure"
11679 #include "confdefs.h"
11681 #include <stdarg.h>
11682 void f (int i, ...) {
11683 va_list args1, args2;
11684 va_start (args1, i);
11685 __va_copy (args2, args1);
11686 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11688 va_end (args1); va_end (args2);
11690 int main() { f (0, 42); return 0; }
11692 if { (eval echo configure:11693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11694 ac_cv___va_copy=yes
11696 echo "configure: failed program was:" >&5
11697 cat conftest.$ac_ext >&5
11707 echo "$ac_t""$ac_cv___va_copy" 1>&6
11708 echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6
11709 echo "configure:11710: checking whether va_lists can be copied by value" >&5
11710 if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then
11711 echo $ac_n "(cached) $ac_c" 1>&6
11714 if test "$cross_compiling" = yes; then
11715 ac_cv_va_val_copy=yes
11718 cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11722 #include <stdarg.h>
11723 void f (int i, ...) {
11724 va_list args1, args2;
11725 va_start (args1, i);
11727 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11729 va_end (args1); va_end (args2);
11731 int main() { f (0, 42); return 0; }
11733 if { (eval echo configure:11734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11735 ac_cv_va_val_copy=yes
11737 echo "configure: failed program was:" >&5
11738 cat conftest.$ac_ext >&5
11740 ac_cv_va_val_copy=no
11748 if test "x$ac_cv_va_copy" = "xyes"; then
11749 cat >> confdefs.h <<\EOF
11750 #define VA_COPY va_copy
11753 cat >> confdefs.h <<\EOF
11754 #define HAVE_VA_COPY 1
11757 elif test "x$ac_cv___va_copy" = "xyes"; then
11758 cat >> confdefs.h <<\EOF
11759 #define VA_COPY __va_copy
11762 cat >> confdefs.h <<\EOF
11763 #define HAVE_VA_COPY 1
11768 if test "x$ac_cv_va_val_copy" = "xno"; then
11769 cat >> confdefs.h <<\EOF
11770 #define HAVE_VA_LIST_AS_ARRAY 1
11774 echo "$ac_t""$ac_cv_va_val_copy" 1>&6
11780 rm -rf conftest* _conftest
11782 cat >> conftest.C <<\EOF
11787 void __dump_link_map(void) {
11788 struct link_map *map = _dl_loaded;
11789 while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;}
11792 dlopen("./conftest1.so",RTLD_LAZY);
11793 dlopen("./../_conftest/conftest1.so",RTLD_LAZY);
11794 dlopen("CURDIR/_conftest/conftest1.so",RTLD_LAZY);
11795 dlopen("CURDIR/_conftest/../_conftest/conftest1.so",RTLD_LAZY);
11799 /* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/
11800 int main() { printf("./conftest1.so\n"); }
11804 $PERL -p -i -e "s/CURDIR/\$ENV{_curdir}/g;" conftest.C
11806 cat >> conftest1.C <<\EOF
11808 void foo(void) {printf("foo in dll called\n");}
11810 ${CXX-g++} -fPIC -c -g conftest1.C
11811 ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o
11812 ${CXX-g++} -g conftest.C -o conftest -ldl
11813 cp -f conftest1.so conftest _conftest
11815 if test `./conftest | grep conftest1.so | wc -l` -gt 1
11818 echo "*** Your libc has a bug that can result in loading the same dynamic"
11819 echo "*** library multiple times. This bug is known to be fixed in glibc-2.0.7-32"
11820 echo "*** or later. However, if you choose not to upgrade, the only effect"
11821 echo "*** will be excessive memory usage at runtime."
11825 rm -rf conftest* _conftest
11830 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11831 ac_cpp='$CXXCPP $CPPFLAGS'
11832 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11833 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11834 cross_compiling=$ac_cv_prog_cxx_cross
11839 if test "$GNU_CC"; then
11840 if test "$CPU_ARCH" = "arm" ; then
11841 echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6
11842 echo "configure:11843: checking for ARM EABI" >&5
11843 if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then
11844 echo $ac_n "(cached) $ac_c" 1>&6
11846 cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11852 #if defined(__ARM_EABI__)
11855 #error Not ARM EABI.
11860 if { (eval echo configure:11861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11862 ac_cv_gcc_arm_eabi="yes"
11864 echo "configure: failed program was:" >&5
11865 cat conftest.$ac_ext >&5
11867 ac_cv_gcc_arm_eabi="no"
11872 echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6
11873 if test "$ac_cv_gcc_arm_eabi" = "yes"; then
11875 ARM_ABI_PREFIX=eabi-
11877 ARM_ABI_PREFIX=oabi-
11881 echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6
11882 echo "configure:11883: checking for gcc 3.0 ABI" >&5
11883 if eval "test \"`echo '$''{'ac_cv_gcc_three_abi'+set}'`\" = set"; then
11884 echo $ac_n "(cached) $ac_c" 1>&6
11886 cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11892 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
11900 if { (eval echo configure:11901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11902 ac_cv_gcc_three_abi="yes"
11904 echo "configure: failed program was:" >&5
11905 cat conftest.$ac_ext >&5
11907 ac_cv_gcc_three_abi="no"
11912 echo "$ac_t""$ac_cv_gcc_three_abi" 1>&6
11913 if test "$ac_cv_gcc_three_abi" = "yes"; then
11914 TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
11917 TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc2}"
11923 echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6
11924 echo "configure:11925: checking for C++ \"explicit\" keyword" >&5
11925 if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then
11926 echo $ac_n "(cached) $ac_c" 1>&6
11928 cat > conftest.$ac_ext <<EOF
11929 #line 11930 "configure"
11930 #include "confdefs.h"
11932 public: explicit X(int i) : i_(i) {}
11939 if { (eval echo configure:11940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11941 ac_cv_cpp_explicit=yes
11943 echo "configure: failed program was:" >&5
11944 cat conftest.$ac_ext >&5
11946 ac_cv_cpp_explicit=no
11951 echo "$ac_t""$ac_cv_cpp_explicit" 1>&6
11952 if test "$ac_cv_cpp_explicit" = yes ; then
11953 cat >> confdefs.h <<\EOF
11954 #define HAVE_CPP_EXPLICIT 1
11959 echo $ac_n "checking for C++ \"typename\" keyword""... $ac_c" 1>&6
11960 echo "configure:11961: checking for C++ \"typename\" keyword" >&5
11961 if eval "test \"`echo '$''{'ac_cv_cpp_typename'+set}'`\" = set"; then
11962 echo $ac_n "(cached) $ac_c" 1>&6
11964 cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11969 typedef unsigned long num_type;
11972 template <class T> class tplt {
11974 typedef typename T::num_type t_num_type;
11975 t_num_type foo(typename T::num_type num) {
11984 if { (eval echo configure:11985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11986 ac_cv_cpp_typename=yes
11988 echo "configure: failed program was:" >&5
11989 cat conftest.$ac_ext >&5
11991 ac_cv_cpp_typename=no
11996 echo "$ac_t""$ac_cv_cpp_typename" 1>&6
11997 if test "$ac_cv_cpp_typename" = yes ; then
11998 cat >> confdefs.h <<\EOF
11999 #define HAVE_CPP_TYPENAME 1
12004 echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6
12005 echo "configure:12006: checking for modern C++ template specialization syntax support" >&5
12006 if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then
12007 echo $ac_n "(cached) $ac_c" 1>&6
12009 cat > conftest.$ac_ext <<EOF
12010 #line 12011 "configure"
12011 #include "confdefs.h"
12012 template <class T> struct X { int a; };
12014 template <> struct X<Y> { double a; };
12020 if { (eval echo configure:12021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12022 ac_cv_cpp_modern_specialize_template_syntax=yes
12024 echo "configure: failed program was:" >&5
12025 cat conftest.$ac_ext >&5
12027 ac_cv_cpp_modern_specialize_template_syntax=no
12032 echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6
12033 if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then
12034 cat >> confdefs.h <<\EOF
12035 #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1
12041 echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6
12042 echo "configure:12043: checking whether partial template specialization works" >&5
12043 if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then
12044 echo $ac_n "(cached) $ac_c" 1>&6
12046 cat > conftest.$ac_ext <<EOF
12047 #line 12048 "configure"
12048 #include "confdefs.h"
12049 template <class T> class Foo {};
12050 template <class T> class Foo<T*> {};
12055 if { (eval echo configure:12056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12057 ac_cv_cpp_partial_specialization=yes
12059 echo "configure: failed program was:" >&5
12060 cat conftest.$ac_ext >&5
12062 ac_cv_cpp_partial_specialization=no
12067 echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6
12068 if test "$ac_cv_cpp_partial_specialization" = yes ; then
12069 cat >> confdefs.h <<\EOF
12070 #define HAVE_CPP_PARTIAL_SPECIALIZATION 1
12075 echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6
12076 echo "configure:12077: checking whether operators must be re-defined for templates derived from templates" >&5
12077 if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then
12078 echo $ac_n "(cached) $ac_c" 1>&6
12080 cat > conftest.$ac_ext <<EOF
12081 #line 12082 "configure"
12082 #include "confdefs.h"
12083 template <class T> class Base { };
12085 Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; }
12086 template <class T> class Derived : public Base<T> { };
12088 Derived<char> a, b;
12089 Base<char> c = a + b;
12093 if { (eval echo configure:12094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12095 ac_cv_need_derived_template_operators=no
12097 echo "configure: failed program was:" >&5
12098 cat conftest.$ac_ext >&5
12100 ac_cv_need_derived_template_operators=yes
12105 echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6
12106 if test "$ac_cv_need_derived_template_operators" = yes ; then
12107 cat >> confdefs.h <<\EOF
12108 #define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1
12114 echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6
12115 echo "configure:12116: checking whether we need to cast a derived template to pass as its base class" >&5
12116 if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then
12117 echo $ac_n "(cached) $ac_c" 1>&6
12119 cat > conftest.$ac_ext <<EOF
12120 #line 12121 "configure"
12121 #include "confdefs.h"
12122 template <class T> class Base { };
12123 template <class T> class Derived : public Base<T> { };
12124 template <class T> int foo(const Base<T>&) { return 0; }
12126 Derived<char> bar; return foo(bar);
12129 if { (eval echo configure:12130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12131 ac_cv_need_cpp_template_cast_to_base=no
12133 echo "configure: failed program was:" >&5
12134 cat conftest.$ac_ext >&5
12136 ac_cv_need_cpp_template_cast_to_base=yes
12141 echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6
12142 if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then
12143 cat >> confdefs.h <<\EOF
12144 #define NEED_CPP_TEMPLATE_CAST_TO_BASE 1
12149 echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6
12150 echo "configure:12151: checking whether the compiler can resolve const ambiguities for templates" >&5
12151 if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then
12152 echo $ac_n "(cached) $ac_c" 1>&6
12154 cat > conftest.$ac_ext <<EOF
12155 #line 12156 "configure"
12156 #include "confdefs.h"
12158 template <class T> class ptrClass {
12162 template <class T> T* a(ptrClass<T> *arg) {
12167 const T* a(const ptrClass<T> *arg) {
12176 if { (eval echo configure:12177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12178 ac_cv_can_resolve_const_ambiguity=yes
12180 echo "configure: failed program was:" >&5
12181 cat conftest.$ac_ext >&5
12183 ac_cv_can_resolve_const_ambiguity=no
12188 echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6
12189 if test "$ac_cv_can_resolve_const_ambiguity" = no ; then
12190 cat >> confdefs.h <<\EOF
12191 #define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1
12197 echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6
12198 echo "configure:12199: checking whether the C++ \"using\" keyword can change access" >&5
12199 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using2'+set}'`\" = set"; then
12200 echo $ac_n "(cached) $ac_c" 1>&6
12202 cat > conftest.$ac_ext <<EOF
12203 #line 12204 "configure"
12204 #include "confdefs.h"
12205 class A { protected: int foo() { return 0; } };
12206 class B : public A { public: using A::foo; };
12208 B b; return b.foo();
12211 if { (eval echo configure:12212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12213 cat > conftest.$ac_ext <<EOF
12214 #line 12215 "configure"
12215 #include "confdefs.h"
12216 class A { public: int foo() { return 1; } };
12217 class B : public A { private: using A::foo; };
12219 B b; return b.foo();
12222 if { (eval echo configure:12223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12224 ac_cv_cpp_access_changing_using2=no
12226 echo "configure: failed program was:" >&5
12227 cat conftest.$ac_ext >&5
12229 ac_cv_cpp_access_changing_using2=yes
12233 echo "configure: failed program was:" >&5
12234 cat conftest.$ac_ext >&5
12236 ac_cv_cpp_access_changing_using2=no
12241 echo "$ac_t""$ac_cv_cpp_access_changing_using2" 1>&6
12242 if test "$ac_cv_cpp_access_changing_using2" = yes ; then
12243 cat >> confdefs.h <<\EOF
12244 #define HAVE_CPP_ACCESS_CHANGING_USING 1
12249 echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
12250 echo "configure:12251: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
12251 if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then
12252 echo $ac_n "(cached) $ac_c" 1>&6
12254 cat > conftest.$ac_ext <<EOF
12255 #line 12256 "configure"
12256 #include "confdefs.h"
12258 public: int go(const X&) {return 3;}
12259 int jo(const X&) {return 3;}
12261 class Y : public X {
12262 public: int go(int) {return 2;}
12263 int jo(int) {return 2;}
12265 private: using X::go;
12271 if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12273 ac_cv_cpp_ambiguity_resolving_using=yes
12275 echo "configure: failed program was:" >&5
12276 cat conftest.$ac_ext >&5
12278 ac_cv_cpp_ambiguity_resolving_using=no
12283 echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6
12284 if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
12285 cat >> confdefs.h <<\EOF
12286 #define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
12291 echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6
12292 echo "configure:12293: checking for \"std::\" namespace" >&5
12293 if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then
12294 echo $ac_n "(cached) $ac_c" 1>&6
12296 cat > conftest.$ac_ext <<EOF
12297 #line 12298 "configure"
12298 #include "confdefs.h"
12299 #include <algorithm>
12301 return std::min(0, 1);
12304 if { (eval echo configure:12305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12306 ac_cv_cpp_namespace_std=yes
12308 echo "configure: failed program was:" >&5
12309 cat conftest.$ac_ext >&5
12311 ac_cv_cpp_namespace_std=no
12316 echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6
12317 if test "$ac_cv_cpp_namespace_std" = yes ; then
12318 cat >> confdefs.h <<\EOF
12319 #define HAVE_CPP_NAMESPACE_STD 1
12324 echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6
12325 echo "configure:12326: checking whether standard template operator!=() is ambiguous" >&5
12326 if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then
12327 echo $ac_n "(cached) $ac_c" 1>&6
12329 cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 #include <algorithm>
12334 int operator==(const T1&, const T1&) { return 0; }
12335 int operator!=(const T1&, const T1&) { return 0; }
12337 T1 a,b; return a != b;
12340 if { (eval echo configure:12341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12342 ac_cv_cpp_unambiguous_std_notequal=unambiguous
12344 echo "configure: failed program was:" >&5
12345 cat conftest.$ac_ext >&5
12347 ac_cv_cpp_unambiguous_std_notequal=ambiguous
12352 echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6
12353 if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then
12354 cat >> confdefs.h <<\EOF
12355 #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1
12361 echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6
12362 echo "configure:12363: checking for C++ reinterpret_cast" >&5
12363 if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then
12364 echo $ac_n "(cached) $ac_c" 1>&6
12366 cat > conftest.$ac_ext <<EOF
12367 #line 12368 "configure"
12368 #include "confdefs.h"
12369 struct X { int i; };
12370 struct Y { int i; };
12372 X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
12375 if { (eval echo configure:12376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12377 ac_cv_cpp_reinterpret_cast=yes
12379 echo "configure: failed program was:" >&5
12380 cat conftest.$ac_ext >&5
12382 ac_cv_cpp_reinterpret_cast=no
12387 echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6
12388 if test "$ac_cv_cpp_reinterpret_cast" = yes ; then
12389 cat >> confdefs.h <<\EOF
12390 #define HAVE_CPP_NEW_CASTS 1
12395 echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
12396 echo "configure:12397: checking for C++ dynamic_cast to void*" >&5
12397 if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then
12398 echo $ac_n "(cached) $ac_c" 1>&6
12400 if test "$cross_compiling" = yes; then
12401 ac_cv_cpp_dynamic_cast_void_ptr=no
12403 cat > conftest.$ac_ext <<EOF
12404 #line 12405 "configure"
12405 #include "confdefs.h"
12407 extern "C" void exit(int);
12409 class X { int i; public: virtual ~X() { } };
12410 class Y { int j; public: virtual ~Y() { } };
12411 class Z : public X, public Y { int k; };
12415 X *subx = (X*)&mdo;
12416 Y *suby = (Y*)&mdo;
12417 return !((((void*)&mdo != (void*)subx) &&
12418 ((void*)&mdo == dynamic_cast<void*>(subx))) ||
12419 (((void*)&mdo != (void*)suby) &&
12420 ((void*)&mdo == dynamic_cast<void*>(suby))));
12423 if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12425 ac_cv_cpp_dynamic_cast_void_ptr=yes
12427 echo "configure: failed program was:" >&5
12428 cat conftest.$ac_ext >&5
12430 ac_cv_cpp_dynamic_cast_void_ptr=no
12437 echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6
12438 if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
12439 cat >> confdefs.h <<\EOF
12440 #define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
12446 echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
12447 echo "configure:12448: checking whether C++ requires implementation of unused virtual methods" >&5
12448 if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then
12449 echo $ac_n "(cached) $ac_c" 1>&6
12451 cat > conftest.$ac_ext <<EOF
12452 #line 12453 "configure"
12453 #include "confdefs.h"
12454 class X {private: virtual void never_called();};
12459 if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12461 ac_cv_cpp_unused_required=no
12463 echo "configure: failed program was:" >&5
12464 cat conftest.$ac_ext >&5
12466 ac_cv_cpp_unused_required=yes
12471 echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6
12472 if test "$ac_cv_cpp_unused_required" = yes ; then
12473 cat >> confdefs.h <<\EOF
12474 #define NEED_CPP_UNUSED_IMPLEMENTATIONS 1
12481 echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
12482 echo "configure:12483: checking for trouble comparing to zero near std::operator!=()" >&5
12483 if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then
12484 echo $ac_n "(cached) $ac_c" 1>&6
12486 cat > conftest.$ac_ext <<EOF
12487 #line 12488 "configure"
12488 #include "confdefs.h"
12489 #include <algorithm>
12490 template <class T> class Foo {};
12492 template <class T> int operator==(const T2*, const T&) { return 0; }
12493 template <class T> int operator!=(const T2*, const T&) { return 0; }
12495 Foo<int> f; return (0 != f);
12498 if { (eval echo configure:12499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12500 ac_cv_trouble_comparing_to_zero=no
12502 echo "configure: failed program was:" >&5
12503 cat conftest.$ac_ext >&5
12505 ac_cv_trouble_comparing_to_zero=yes
12510 echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6
12511 if test "$ac_cv_trouble_comparing_to_zero" = yes ; then
12512 cat >> confdefs.h <<\EOF
12513 #define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 1
12518 # try harder, when checking for __thread support, see bug 521750 comment #33 and below
12519 _SAVE_LDFLAGS=$LDFLAGS
12520 LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS"
12521 echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6
12522 echo "configure:12523: checking for __thread keyword for TLS variables" >&5
12523 if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then
12524 echo $ac_n "(cached) $ac_c" 1>&6
12526 cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 __thread bool tlsIsMainThread = false;
12531 return tlsIsMainThread;
12534 if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12536 ac_cv_thread_keyword=yes
12538 echo "configure: failed program was:" >&5
12539 cat conftest.$ac_ext >&5
12541 ac_cv_thread_keyword=no
12546 echo "$ac_t""$ac_cv_thread_keyword" 1>&6
12547 LDFLAGS=$_SAVE_LDFLAGS
12548 if test "$ac_cv_thread_keyword" = yes; then
12549 # mips builds fail with TLS variables because of a binutils bug.
12551 case "${target}" in
12559 cat >> confdefs.h <<\EOF
12560 #define HAVE_THREAD_TLS_KEYWORD 1
12569 ac_safe=`echo "malloc.h" | sed 'y%./+-%__p_%'`
12570 echo $ac_n "checking for malloc.h""... $ac_c" 1>&6
12571 echo "configure:12572: checking for malloc.h" >&5
12572 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12573 echo $ac_n "(cached) $ac_c" 1>&6
12575 cat > conftest.$ac_ext <<EOF
12576 #line 12577 "configure"
12577 #include "confdefs.h"
12578 #include <malloc.h>
12580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12581 { (eval echo configure:12582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12583 if test -z "$ac_err"; then
12585 eval "ac_cv_header_$ac_safe=yes"
12588 echo "configure: failed program was:" >&5
12589 cat conftest.$ac_ext >&5
12591 eval "ac_cv_header_$ac_safe=no"
12595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12596 echo "$ac_t""yes" 1>&6
12599 echo "$ac_t""no" 1>&6
12602 if test "$MALLOC_H" = ""; then
12603 ac_safe=`echo "malloc/malloc.h" | sed 'y%./+-%__p_%'`
12604 echo $ac_n "checking for malloc/malloc.h""... $ac_c" 1>&6
12605 echo "configure:12606: checking for malloc/malloc.h" >&5
12606 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12607 echo $ac_n "(cached) $ac_c" 1>&6
12609 cat > conftest.$ac_ext <<EOF
12610 #line 12611 "configure"
12611 #include "confdefs.h"
12612 #include <malloc/malloc.h>
12614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12615 { (eval echo configure:12616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12617 if test -z "$ac_err"; then
12619 eval "ac_cv_header_$ac_safe=yes"
12622 echo "configure: failed program was:" >&5
12623 cat conftest.$ac_ext >&5
12625 eval "ac_cv_header_$ac_safe=no"
12629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12630 echo "$ac_t""yes" 1>&6
12631 MALLOC_H=malloc/malloc.h
12633 echo "$ac_t""no" 1>&6
12636 if test "$MALLOC_H" = ""; then
12637 ac_safe=`echo "sys/malloc.h" | sed 'y%./+-%__p_%'`
12638 echo $ac_n "checking for sys/malloc.h""... $ac_c" 1>&6
12639 echo "configure:12640: checking for sys/malloc.h" >&5
12640 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12641 echo $ac_n "(cached) $ac_c" 1>&6
12643 cat > conftest.$ac_ext <<EOF
12644 #line 12645 "configure"
12645 #include "confdefs.h"
12646 #include <sys/malloc.h>
12648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12649 { (eval echo configure:12650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12651 if test -z "$ac_err"; then
12653 eval "ac_cv_header_$ac_safe=yes"
12656 echo "configure: failed program was:" >&5
12657 cat conftest.$ac_ext >&5
12659 eval "ac_cv_header_$ac_safe=no"
12663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12664 echo "$ac_t""yes" 1>&6
12665 MALLOC_H=sys/malloc.h
12667 echo "$ac_t""no" 1>&6
12672 if test "$MALLOC_H" != ""; then
12673 cat >> confdefs.h <<EOF
12674 #define MALLOC_H <$MALLOC_H>
12679 MOZ_ALLOCATING_FUNCS="strndup posix_memalign memalign valloc"
12680 for ac_func in strndup posix_memalign memalign valloc
12682 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12683 echo "configure:12684: checking for $ac_func" >&5
12684 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12685 echo $ac_n "(cached) $ac_c" 1>&6
12687 cat > conftest.$ac_ext <<EOF
12688 #line 12689 "configure"
12689 #include "confdefs.h"
12690 /* System header to define __stub macros and hopefully few prototypes,
12691 which can conflict with char $ac_func(); below. */
12692 #include <assert.h>
12693 /* Override any gcc2 internal prototype to avoid an error. */
12697 /* We use char because int might match the return type of a gcc2
12698 builtin and then its argument prototype would still apply. */
12703 /* The GNU C library defines this for functions which it implements
12704 to always fail with ENOSYS. Some functions are actually named
12705 something starting with __ and the normal name is an alias. */
12706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12714 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12716 eval "ac_cv_func_$ac_func=yes"
12718 echo "configure: failed program was:" >&5
12719 cat conftest.$ac_ext >&5
12721 eval "ac_cv_func_$ac_func=no"
12726 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12727 echo "$ac_t""yes" 1>&6
12728 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12729 cat >> confdefs.h <<EOF
12730 #define $ac_tr_func 1
12734 echo "$ac_t""no" 1>&6
12740 echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6
12741 echo "configure:12742: checking for __attribute__((always_inline))" >&5
12742 if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then
12743 echo $ac_n "(cached) $ac_c" 1>&6
12745 cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12750 inline void f(void) __attribute__((always_inline));
12753 if { (eval echo configure:12754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12755 ac_cv_attribute_always_inline=yes
12757 echo "configure: failed program was:" >&5
12758 cat conftest.$ac_ext >&5
12760 ac_cv_attribute_always_inline=no
12765 echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6
12767 echo $ac_n "checking for __attribute__((malloc))""... $ac_c" 1>&6
12768 echo "configure:12769: checking for __attribute__((malloc))" >&5
12769 if eval "test \"`echo '$''{'ac_cv_attribute_malloc'+set}'`\" = set"; then
12770 echo $ac_n "(cached) $ac_c" 1>&6
12772 cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12777 void* f(int) __attribute__((malloc));
12780 if { (eval echo configure:12781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12782 ac_cv_attribute_malloc=yes
12784 echo "configure: failed program was:" >&5
12785 cat conftest.$ac_ext >&5
12787 ac_cv_attribute_malloc=no
12792 echo "$ac_t""$ac_cv_attribute_malloc" 1>&6
12794 echo $ac_n "checking for __attribute__((warn_unused_result))""... $ac_c" 1>&6
12795 echo "configure:12796: checking for __attribute__((warn_unused_result))" >&5
12796 if eval "test \"`echo '$''{'ac_cv_attribute_warn_unused'+set}'`\" = set"; then
12797 echo $ac_n "(cached) $ac_c" 1>&6
12799 cat > conftest.$ac_ext <<EOF
12800 #line 12801 "configure"
12801 #include "confdefs.h"
12804 int f(void) __attribute__((warn_unused_result));
12807 if { (eval echo configure:12808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12809 ac_cv_attribute_warn_unused=yes
12811 echo "configure: failed program was:" >&5
12812 cat conftest.$ac_ext >&5
12814 ac_cv_attribute_warn_unused=no
12819 echo "$ac_t""$ac_cv_attribute_warn_unused" 1>&6
12821 echo $ac_n "checking for __attribute__((noreturn))""... $ac_c" 1>&6
12822 echo "configure:12823: checking for __attribute__((noreturn))" >&5
12823 if eval "test \"`echo '$''{'ac_cv_attribute_noreturn'+set}'`\" = set"; then
12824 echo $ac_n "(cached) $ac_c" 1>&6
12826 cat > conftest.$ac_ext <<EOF
12827 #line 12828 "configure"
12828 #include "confdefs.h"
12831 void f(void) __attribute__((noreturn));
12834 if { (eval echo configure:12835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12836 ac_cv_attribute_noreturn=yes
12838 echo "configure: failed program was:" >&5
12839 cat conftest.$ac_ext >&5
12841 ac_cv_attribute_noreturn=no
12846 echo "$ac_t""$ac_cv_attribute_noreturn" 1>&6
12849 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
12850 ac_cpp='$CPP $CPPFLAGS'
12851 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
12852 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
12853 cross_compiling=$ac_cv_prog_cc_cross
12857 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
12858 echo "configure:12859: checking for LC_MESSAGES" >&5
12859 if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then
12860 echo $ac_n "(cached) $ac_c" 1>&6
12862 cat > conftest.$ac_ext <<EOF
12863 #line 12864 "configure"
12864 #include "confdefs.h"
12865 #include <locale.h>
12867 int category = LC_MESSAGES;
12870 if { (eval echo configure:12871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12872 ac_cv_i18n_lc_messages=yes
12874 echo "configure: failed program was:" >&5
12875 cat conftest.$ac_ext >&5
12877 ac_cv_i18n_lc_messages=no
12882 echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6
12883 if test "$ac_cv_i18n_lc_messages" = yes; then
12884 cat >> confdefs.h <<\EOF
12885 #define HAVE_I18N_LC_MESSAGES 1
12890 for ac_func in localeconv
12892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12893 echo "configure:12894: checking for $ac_func" >&5
12894 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12895 echo $ac_n "(cached) $ac_c" 1>&6
12897 cat > conftest.$ac_ext <<EOF
12898 #line 12899 "configure"
12899 #include "confdefs.h"
12900 /* System header to define __stub macros and hopefully few prototypes,
12901 which can conflict with char $ac_func(); below. */
12902 #include <assert.h>
12903 /* Override any gcc2 internal prototype to avoid an error. */
12904 /* We use char because int might match the return type of a gcc2
12905 builtin and then its argument prototype would still apply. */
12910 /* The GNU C library defines this for functions which it implements
12911 to always fail with ENOSYS. Some functions are actually named
12912 something starting with __ and the normal name is an alias. */
12913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12921 if { (eval echo configure:12922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12923 eval "ac_cv_func_$ac_func=yes"
12925 echo "configure: failed program was:" >&5
12926 cat conftest.$ac_ext >&5
12928 eval "ac_cv_func_$ac_func=no"
12933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12934 echo "$ac_t""yes" 1>&6
12935 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12936 cat >> confdefs.h <<EOF
12937 #define $ac_tr_func 1
12941 echo "$ac_t""no" 1>&6
12946 fi # SKIP_COMPILER_CHECKS
12949 if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then
12950 TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}"
12954 if test "$ac_cv_attribute_always_inline" = yes ; then
12955 cat >> confdefs.h <<\EOF
12956 #define NS_ALWAYS_INLINE __attribute__((always_inline))
12960 cat >> confdefs.h <<\EOF
12961 #define NS_ALWAYS_INLINE
12966 if test "$ac_cv_attribute_malloc" = yes ; then
12967 cat >> confdefs.h <<\EOF
12968 #define NS_ATTR_MALLOC __attribute__((malloc))
12972 cat >> confdefs.h <<\EOF
12973 #define NS_ATTR_MALLOC
12978 if test "$ac_cv_attribute_warn_unused" = yes ; then
12979 cat >> confdefs.h <<\EOF
12980 #define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
12984 cat >> confdefs.h <<\EOF
12985 #define NS_WARN_UNUSED_RESULT
12990 if test "$ac_cv_attribute_noreturn" = yes ; then
12991 cat >> confdefs.h <<\EOF
12992 #define NS_NORETURN __attribute__((noreturn))
12996 cat >> confdefs.h <<\EOF
12997 #define NS_NORETURN
13003 if test -n "$SKIP_COMPILER_CHECKS"; then
13004 cat >> confdefs.h <<\EOF
13005 #define MALLOC_H <malloc.h>
13008 cat >> confdefs.h <<\EOF
13009 #define HAVE_FORCEINLINE 1
13012 cat >> confdefs.h <<\EOF
13013 #define HAVE_LOCALECONV 1
13016 fi # SKIP_COMPILER_CHECKS
13018 # External Packages
13020 # Check whether --with-system-nspr or --without-system-nspr was given.
13021 if test "${with_system_nspr+set}" = set; then
13022 withval="$with_system_nspr"
13023 if test "$withval" = "yes"; then
13025 elif test "$withval" = "no"; then
13028 { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; exit 1; }
13033 # Check whether --with-nspr-cflags or --without-nspr-cflags was given.
13034 if test "${with_nspr_cflags+set}" = set; then
13035 withval="$with_nspr_cflags"
13036 NSPR_CFLAGS=$withval
13039 # Check whether --with-nspr-libs or --without-nspr-libs was given.
13040 if test "${with_nspr_libs+set}" = set; then
13041 withval="$with_nspr_libs"
13048 if test "$_USE_SYSTEM_NSPR" && (test "$NSPR_CFLAGS" -o "$NSPR_LIBS"); then
13049 { echo "configure: error: --with-system-nspr and --with-nspr-libs/cflags are mutually exclusive.
13050 See 'configure --help'." 1>&2; exit 1; }
13053 if test -n "$_USE_SYSTEM_NSPR"; then
13056 # Check whether --with-nspr-prefix or --without-nspr-prefix was given.
13057 if test "${with_nspr_prefix+set}" = set; then
13058 withval="$with_nspr_prefix"
13059 nspr_config_prefix="$withval"
13061 nspr_config_prefix=""
13065 # Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given.
13066 if test "${with_nspr_exec_prefix+set}" = set; then
13067 withval="$with_nspr_exec_prefix"
13068 nspr_config_exec_prefix="$withval"
13070 nspr_config_exec_prefix=""
13074 if test -n "$nspr_config_exec_prefix"; then
13075 nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
13076 if test -z "$NSPR_CONFIG"; then
13077 NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
13080 if test -n "$nspr_config_prefix"; then
13081 nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
13082 if test -z "$NSPR_CONFIG"; then
13083 NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
13087 unset ac_cv_path_NSPR_CONFIG
13088 # Extract the first word of "nspr-config", so it can be a program name with args.
13089 set dummy nspr-config; ac_word=$2
13090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13091 echo "configure:13092: checking for $ac_word" >&5
13092 if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
13093 echo $ac_n "(cached) $ac_c" 1>&6
13095 case "$NSPR_CONFIG" in
13097 ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
13100 ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
13103 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
13105 for ac_dir in $ac_dummy; do
13106 test -z "$ac_dir" && ac_dir=.
13107 if test -f $ac_dir/$ac_word; then
13108 ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word"
13113 test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no"
13117 NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
13118 if test -n "$NSPR_CONFIG"; then
13119 echo "$ac_t""$NSPR_CONFIG" 1>&6
13121 echo "$ac_t""no" 1>&6
13124 min_nspr_version=4.7.0
13125 echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6
13126 echo "configure:13127: checking for NSPR - version >= $min_nspr_version" >&5
13129 if test "$NSPR_CONFIG" != "no"; then
13130 NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
13131 NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
13132 NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version`
13133 elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then
13134 NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}"
13135 NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}"
13136 NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION"
13141 if test -z "$no_nspr"; then
13142 nspr_config_major_version=`echo $NSPR_VERSION_STRING | \
13143 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
13144 nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \
13145 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
13146 nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \
13147 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
13148 min_nspr_major_version=`echo $min_nspr_version | \
13149 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
13150 min_nspr_minor_version=`echo $min_nspr_version | \
13151 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
13152 min_nspr_micro_version=`echo $min_nspr_version | \
13153 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
13154 if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then
13156 elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
13157 test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then
13159 elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
13160 test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" &&
13161 test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then
13166 if test -z "$no_nspr"; then
13167 echo "$ac_t""yes" 1>&6
13170 echo "$ac_t""no" 1>&6
13171 { echo "configure: error: your don't have NSPR installed or your version is too old" 1>&2; exit 1; }
13181 if test -n "$MOZ_NATIVE_NSPR"; then
13182 _SAVE_CFLAGS=$CFLAGS
13183 CFLAGS="$CFLAGS $NSPR_CFLAGS"
13184 cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13189 #ifndef PR_STATIC_ASSERT
13190 #error PR_STATIC_ASSERT not defined
13194 if { (eval echo configure:13195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13198 echo "configure: failed program was:" >&5
13199 cat conftest.$ac_ext >&5
13201 { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; exit 1; }
13204 CFLAGS=$_SAVE_CFLAGS
13216 case "${target}" in
13223 # Check whether --with-arm-kuser or --without-arm-kuser was given.
13224 if test "${with_arm_kuser+set}" = set; then
13225 withval="$with_arm_kuser"
13226 if test "$withval" = "yes"; then
13228 elif test "$withval" = "no"; then
13231 { echo "configure: error: Option, arm-kuser, does not take an argument ($withval)." 1>&2; exit 1; }
13235 if test -n "$USE_ARM_KUSER"; then
13236 cat >> confdefs.h <<\EOF
13237 #define USE_ARM_KUSER 1
13242 # Components and Features
13244 # Check whether --enable-ui-locale or --disable-ui-locale was given.
13245 if test "${enable_ui_locale+set}" = set; then
13246 enableval="$enable_ui_locale"
13247 MOZ_UI_LOCALE=$enableval
13252 # Check whether --enable-tests or --disable-tests was given.
13253 if test "${enable_tests+set}" = set; then
13254 enableval="$enable_tests"
13255 if test "$enableval" = "no"; then
13257 elif test "$enableval" = "yes"; then
13260 { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; }
13265 # Individual module options
13267 case "$target_cpu" in
13272 # Check whether --enable-thumb2 or --disable-thumb2 was given.
13273 if test "${enable_thumb2+set}" = set; then
13274 enableval="$enable_thumb2"
13275 if test "$enableval" = "yes"; then
13277 elif test "$enableval" = "no"; then
13280 { echo "configure: error: Option, thumb2, does not take an argument ($enableval)." 1>&2; exit 1; }
13284 if test -n "$MOZ_THUMB2"; then
13288 # Check whether --with-cpu-arch or --without-cpu-arch was given.
13289 if test "${with_cpu_arch+set}" = set; then
13290 withval="$with_cpu_arch"
13291 MOZ_ARM_ARCH=$withval
13295 if test -n "$MOZ_THUMB2"; then
13296 case "$target_cpu" in
13298 if test "$MOZ_ARM_ARCH" != "armv7"; then
13299 { echo "configure: error: --enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH" 1>&2; exit 1; }
13301 if test "$GNU_CC"; then
13302 cat >> confdefs.h <<\EOF
13303 #define MOZ_THUMB2 1
13306 cat >> confdefs.h <<\EOF
13307 #define MOZ_ARM_ARCH 1
13310 CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
13311 CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
13312 ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
13314 { echo "configure: error: --enable-thumb2 is not supported for non-GNU toolchains" 1>&2; exit 1; }
13318 { echo "configure: error: --enable-thumb2 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
13321 elif test "$MOZ_ARM_ARCH" = "armv7"; then
13322 case "$target_cpu" in
13324 if test "$GNU_CC"; then
13325 cat >> confdefs.h <<\EOF
13326 #define MOZ_ARM_ARCH 1
13329 CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
13330 CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
13331 ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
13333 { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-GNU toolchains" 1>&2; exit 1; }
13337 { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
13341 case "$target_cpu" in
13343 if test "$GNU_CC"; then
13344 CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
13345 CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
13346 ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
13355 # Debugging and Optimizations
13357 if test -z "$MOZ_DEBUG_FLAGS"; then
13358 MOZ_DEBUG_FLAGS="-g"
13361 # Check whether --enable-debug or --disable-debug was given.
13362 if test "${enable_debug+set}" = set; then
13363 enableval="$enable_debug"
13364 if test "$enableval" != "no"; then
13366 if test -n "$enableval" -a "$enableval" != "yes"; then
13367 MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
13368 _MOZ_DEBUG_FLAGS_SET=1
13378 MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG -DTRACING"
13379 # Check whether --with-debug-label or --without-debug-label was given.
13380 if test "${with_debug_label+set}" = set; then
13381 withval="$with_debug_label"
13382 for option in `echo $withval | sed 's/,/ /g'`; do
13383 MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${option}"
13388 MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
13390 if test -n "$MOZ_DEBUG"; then
13391 echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6
13392 echo "configure:13393: checking for valid debug flags" >&5
13393 _SAVE_CFLAGS=$CFLAGS
13394 CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS"
13395 cat > conftest.$ac_ext <<EOF
13396 #line 13397 "configure"
13397 #include "confdefs.h"
13400 printf("Hello World\n");
13403 if { (eval echo configure:13404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13407 echo "configure: failed program was:" >&5
13408 cat conftest.$ac_ext >&5
13413 echo "$ac_t""$_results" 1>&6
13414 if test "$_results" = "no"; then
13415 { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; exit 1; }
13417 CFLAGS=$_SAVE_CFLAGS
13420 if test -z "$MOZ_OPTIMIZE_FLAGS"; then
13421 MOZ_OPTIMIZE_FLAGS="-O"
13424 # Check whether --enable-optimize or --disable-optimize was given.
13425 if test "${enable_optimize+set}" = set; then
13426 enableval="$enable_optimize"
13427 if test "$enableval" != "no"; then
13429 if test -n "$enableval" -a "$enableval" != "yes"; then
13430 MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'`
13441 if test "$COMPILE_ENVIRONMENT"; then
13442 if test -n "$MOZ_OPTIMIZE"; then
13443 echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6
13444 echo "configure:13445: checking for valid optimization flags" >&5
13445 _SAVE_CFLAGS=$CFLAGS
13446 CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
13447 cat > conftest.$ac_ext <<EOF
13448 #line 13449 "configure"
13449 #include "confdefs.h"
13452 printf("Hello World\n");
13455 if { (eval echo configure:13456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13459 echo "configure: failed program was:" >&5
13460 cat conftest.$ac_ext >&5
13465 echo "$ac_t""$_results" 1>&6
13466 if test "$_results" = "no"; then
13467 { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; exit 1; }
13469 CFLAGS=$_SAVE_CFLAGS
13471 fi # COMPILE_ENVIRONMENT
13478 # Check whether --enable-debugger-info-modules or --disable-debugger-info-modules was given.
13479 if test "${enable_debugger_info_modules+set}" = set; then
13480 enableval="$enable_debugger_info_modules"
13481 if test "$enableval" != "no"; then
13482 echo "configure: warning: --enable-debugger-info-modules is deprecated, use --enable-debug-symbols instead" 1>&2
13483 MOZ_DEBUG_SYMBOLS=1
13488 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
13489 if test "${enable_debug_symbols+set}" = set; then
13490 enableval="$enable_debug_symbols"
13491 if test "$enableval" != "no"; then
13492 MOZ_DEBUG_SYMBOLS=1
13493 if test -n "$enableval" -a "$enableval" != "yes"; then
13494 if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
13495 MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
13497 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
13504 if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
13505 cat >> confdefs.h <<\EOF
13506 #define MOZ_DEBUG_SYMBOLS 1
13509 export MOZ_DEBUG_SYMBOLS
13512 # Check whether --enable-warnings-as-errors or --disable-warnings-as-errors was given.
13513 if test "${enable_warnings_as_errors+set}" = set; then
13514 enableval="$enable_warnings_as_errors"
13515 if test "$enableval" = "no"; then
13516 MOZ_DISABLE_WARNINGS_AS_ERRORS=1
13517 elif test "$enableval" = "yes"; then
13518 MOZ_DISABLE_WARNINGS_AS_ERRORS=
13520 { echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&2; exit 1; }
13524 if test "$MOZ_DISABLE_WARNINGS_AS_ERRORS"; then
13525 WARNINGS_AS_ERRORS=''
13528 NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
13529 # Check whether --enable-trace-malloc or --disable-trace-malloc was given.
13530 if test "${enable_trace_malloc+set}" = set; then
13531 enableval="$enable_trace_malloc"
13532 if test "$enableval" = "yes"; then
13534 elif test "$enableval" = "no"; then
13537 { echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13541 if test "$NS_TRACE_MALLOC"; then
13542 # Please, Mr. Linker Man, don't take away our symbol names
13543 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
13544 cat >> confdefs.h <<\EOF
13545 #define NS_TRACE_MALLOC 1
13551 # Check whether --enable-jemalloc or --disable-jemalloc was given.
13552 if test "${enable_jemalloc+set}" = set; then
13553 enableval="$enable_jemalloc"
13554 if test "$enableval" = "yes"; then
13556 elif test "$enableval" = "no"; then
13559 { echo "configure: error: Option, jemalloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13564 if test "$NS_TRACE_MALLOC"; then
13568 if test "$MOZ_MEMORY"; then
13570 if test "$OS_ARCH" = "WINNT"; then
13571 if test -z "$HAVE_64BIT_OS"; then
13572 cat >> confdefs.h <<EOF
13573 #define MOZ_MEMORY_SIZEOF_PTR_2POW 2
13577 cat >> confdefs.h <<EOF
13578 #define MOZ_MEMORY_SIZEOF_PTR_2POW 3
13583 echo $ac_n "checking size of int *""... $ac_c" 1>&6
13584 echo "configure:13585: checking size of int *" >&5
13585 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
13586 echo $ac_n "(cached) $ac_c" 1>&6
13588 if test "$cross_compiling" = yes; then
13589 ac_cv_sizeof_int_p=4
13591 cat > conftest.$ac_ext <<EOF
13592 #line 13593 "configure"
13593 #include "confdefs.h"
13597 FILE *f=fopen("conftestval", "w");
13599 fprintf(f, "%d\n", sizeof(int *));
13603 if { (eval echo configure:13604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13605 ac_cv_sizeof_int_p=`cat conftestval`
13607 echo "configure: failed program was:" >&5
13608 cat conftest.$ac_ext >&5
13610 ac_cv_sizeof_int_p=0
13616 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
13617 cat >> confdefs.h <<EOF
13618 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
13622 case "${ac_cv_sizeof_int_p}" in
13624 cat >> confdefs.h <<EOF
13625 #define MOZ_MEMORY_SIZEOF_PTR_2POW 2
13630 cat >> confdefs.h <<EOF
13631 #define MOZ_MEMORY_SIZEOF_PTR_2POW 3
13636 { echo "configure: error: Unexpected pointer size" 1>&2; exit 1; }
13641 cat >> confdefs.h <<\EOF
13642 #define MOZ_MEMORY 1
13645 if test "x$MOZ_DEBUG" = "x1"; then
13646 cat >> confdefs.h <<\EOF
13647 #define MOZ_MEMORY_DEBUG 1
13651 case "${target}" in
13653 cat >> confdefs.h <<\EOF
13654 #define MOZ_MEMORY_DARWIN 1
13659 cat >> confdefs.h <<\EOF
13660 #define MOZ_MEMORY_BSD 1
13665 cat >> confdefs.h <<\EOF
13666 #define MOZ_MEMORY_LINUX 1
13671 cat >> confdefs.h <<\EOF
13672 #define MOZ_MEMORY_BSD 1
13677 cat >> confdefs.h <<\EOF
13678 #define MOZ_MEMORY_SOLARIS 1
13682 *-msvc*|*-mks*|*-cygwin*|*-mingw*)
13683 cat >> confdefs.h <<\EOF
13684 #define MOZ_MEMORY_WINDOWS 1
13687 # the interesting bits will get passed down in MOZ_MEMORY_LDFLAGS
13690 cat >> confdefs.h <<\EOF
13691 #define MOZ_MEMORY_WINCE 1
13694 cat >> confdefs.h <<\EOF
13695 #define MOZ_MEMORY_WINDOWS 1
13698 if test -z "$WINCE_WINDOWS_MOBILE"; then
13699 cat >> confdefs.h <<\EOF
13700 #define MOZ_MEMORY_WINCE6 1
13706 cat >> confdefs.h <<\EOF
13707 #define MOZ_MEMORY_WINCE 1
13710 cat >> confdefs.h <<\EOF
13711 #define MOZ_MEMORY_WINDOWS 1
13716 cat >> confdefs.h <<\EOF
13717 #define MOZ_MEMORY_LINUX 1
13720 cat >> confdefs.h <<\EOF
13721 #define MOZ_MEMORY_ANDROID 1
13726 { echo "configure: error: --enable-jemalloc not supported on ${target}" 1>&2; exit 1; }
13730 if test "$OS_ARCH" != "Darwin"; then
13731 cat >> confdefs.h <<\EOF
13732 #define HAVE_JEMALLOC_VALLOC 1
13735 cat >> confdefs.h <<\EOF
13736 #define HAVE_JEMALLOC_POSIX_MEMALIGN 1
13739 cat >> confdefs.h <<\EOF
13740 #define HAVE_JEMALLOC_MEMALIGN 1
13748 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
13749 if test "${enable_wrap_malloc+set}" = set; then
13750 enableval="$enable_wrap_malloc"
13751 if test "$enableval" = "yes"; then
13753 elif test "$enableval" = "no"; then
13756 { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13761 if test -n "$_WRAP_MALLOC"; then
13762 if test "$GNU_CC"; then
13763 WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,calloc -Wl,--wrap -Wl,valloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,memalign -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wl,--wrap -Wl,strdup -Wl,--wrap -Wl,strndup -Wl,--wrap -Wl,posix_memalign"
13764 MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB) -o $@'
13768 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
13769 if test "${with_wrap_malloc+set}" = set; then
13770 withval="$with_wrap_malloc"
13771 WRAP_MALLOC_LIB=$withval
13775 # Check whether --enable-trace-jscalls or --disable-trace-jscalls was given.
13776 if test "${enable_trace_jscalls+set}" = set; then
13777 enableval="$enable_trace_jscalls"
13778 if test "$enableval" = "yes"; then
13779 MOZ_TRACE_JSCALLS=1
13780 elif test "$enableval" = "no"; then
13783 { echo "configure: error: Option, trace-jscalls, does not take an argument ($enableval)." 1>&2; exit 1; }
13787 if test -n "$MOZ_TRACE_JSCALLS"; then
13788 cat >> confdefs.h <<\EOF
13789 #define MOZ_TRACE_JSCALLS 1
13794 # Check whether --enable-tracevis or --disable-tracevis was given.
13795 if test "${enable_tracevis+set}" = set; then
13796 enableval="$enable_tracevis"
13797 if test "$enableval" = "yes"; then
13799 elif test "$enableval" = "no"; then
13802 { echo "configure: error: Option, tracevis, does not take an argument ($enableval)." 1>&2; exit 1; }
13806 if test -n "$MOZ_TRACEVIS"; then
13807 cat >> confdefs.h <<\EOF
13808 #define MOZ_TRACEVIS 1
13811 if test -z "$ENABLE_TRACEJIT"; then
13812 { echo "configure: error: --enable-tracevis is incompatible with --disable-tracejit" 1>&2; exit 1; }
13816 # Check whether --enable-gctimer or --disable-gctimer was given.
13817 if test "${enable_gctimer+set}" = set; then
13818 enableval="$enable_gctimer"
13819 if test "$enableval" = "yes"; then
13821 elif test "$enableval" = "no"; then
13824 { echo "configure: error: Option, gctimer, does not take an argument ($enableval)." 1>&2; exit 1; }
13828 if test -n "$MOZ_GCTIMER"; then
13829 cat >> confdefs.h <<\EOF
13830 #define MOZ_GCTIMER 1
13835 # Check whether --enable-valgrind or --disable-valgrind was given.
13836 if test "${enable_valgrind+set}" = set; then
13837 enableval="$enable_valgrind"
13838 if test "$enableval" = "yes"; then
13840 elif test "$enableval" = "no"; then
13843 { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
13847 if test -n "$MOZ_VALGRIND"; then
13848 ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'`
13849 echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6
13850 echo "configure:13851: checking for valgrind/valgrind.h" >&5
13851 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13852 echo $ac_n "(cached) $ac_c" 1>&6
13854 cat > conftest.$ac_ext <<EOF
13855 #line 13856 "configure"
13856 #include "confdefs.h"
13857 #include <valgrind/valgrind.h>
13859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13860 { (eval echo configure:13861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13862 if test -z "$ac_err"; then
13864 eval "ac_cv_header_$ac_safe=yes"
13867 echo "configure: failed program was:" >&5
13868 cat conftest.$ac_ext >&5
13870 eval "ac_cv_header_$ac_safe=no"
13874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13875 echo "$ac_t""yes" 1>&6
13878 echo "$ac_t""no" 1>&6
13879 { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; exit 1; }
13882 cat >> confdefs.h <<\EOF
13883 #define MOZ_VALGRIND 1
13888 # Check whether --enable-jprof or --disable-jprof was given.
13889 if test "${enable_jprof+set}" = set; then
13890 enableval="$enable_jprof"
13891 if test "$enableval" = "yes"; then
13893 elif test "$enableval" = "no"; then
13896 { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; }
13900 if test -n "$MOZ_JPROF"; then
13902 cat >> confdefs.h <<\EOF
13903 #define MOZ_JPROF 1
13908 # Check whether --enable-shark or --disable-shark was given.
13909 if test "${enable_shark+set}" = set; then
13910 enableval="$enable_shark"
13911 if test "$enableval" = "yes"; then
13913 elif test "$enableval" = "no"; then
13916 { echo "configure: error: Option, shark, does not take an argument ($enableval)." 1>&2; exit 1; }
13920 if test -n "$MOZ_SHARK"; then
13922 cat >> confdefs.h <<\EOF
13923 #define MOZ_SHARK 1
13928 # Check whether --enable-callgrind or --disable-callgrind was given.
13929 if test "${enable_callgrind+set}" = set; then
13930 enableval="$enable_callgrind"
13931 if test "$enableval" = "yes"; then
13933 elif test "$enableval" = "no"; then
13936 { echo "configure: error: Option, callgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
13940 if test -n "$MOZ_CALLGRIND"; then
13941 cat >> confdefs.h <<\EOF
13942 #define MOZ_CALLGRIND 1
13947 # Check whether --enable-vtune or --disable-vtune was given.
13948 if test "${enable_vtune+set}" = set; then
13949 enableval="$enable_vtune"
13950 if test "$enableval" = "yes"; then
13952 elif test "$enableval" = "no"; then
13955 { echo "configure: error: Option, vtune, does not take an argument ($enableval)." 1>&2; exit 1; }
13959 if test -n "$MOZ_VTUNE"; then
13961 cat >> confdefs.h <<\EOF
13962 #define MOZ_VTUNE 1
13967 if test -n "$MOZ_PROFILING"; then
13968 cat >> confdefs.h <<\EOF
13969 #define MOZ_PROFILING 1
13974 # Check whether --enable-gczeal or --disable-gczeal was given.
13975 if test "${enable_gczeal+set}" = set; then
13976 enableval="$enable_gczeal"
13977 if test "$enableval" = "yes"; then
13979 elif test "$enableval" = "no"; then
13982 { echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; exit 1; }
13986 if test -n "$JS_GC_ZEAL"; then
13987 cat >> confdefs.h <<\EOF
13988 #define JS_GC_ZEAL 1
13993 # Check whether --with-ccache or --without-ccache was given.
13994 if test "${with_ccache+set}" = set; then
13995 withval="$with_ccache"
14002 if test "$CCACHE" != "no"; then
14003 if test -z "$CCACHE" -o "$CCACHE" = "yes"; then
14006 if test ! -e "$CCACHE"; then
14007 { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
14010 for ac_prog in $CCACHE ccache
14012 # Extract the first word of "$ac_prog", so it can be a program name with args.
14013 set dummy $ac_prog; ac_word=$2
14014 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14015 echo "configure:14016: checking for $ac_word" >&5
14016 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
14017 echo $ac_n "(cached) $ac_c" 1>&6
14021 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
14024 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
14027 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
14029 for ac_dir in $ac_dummy; do
14030 test -z "$ac_dir" && ac_dir=.
14031 if test -f $ac_dir/$ac_word; then
14032 ac_cv_path_CCACHE="$ac_dir/$ac_word"
14040 CCACHE="$ac_cv_path_CCACHE"
14041 if test -n "$CCACHE"; then
14042 echo "$ac_t""$CCACHE" 1>&6
14044 echo "$ac_t""no" 1>&6
14047 test -n "$CCACHE" && break
14050 if test "$msyshost"; then
14053 tmp_DIRNAME=`dirname "$CCACHE"`
14054 tmp_BASENAME=`basename "$CCACHE"`
14055 tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
14056 CCACHE="$tmp_PWD/$tmp_BASENAME"
14057 if test -e "$CCACHE.exe"; then
14058 CCACHE="$CCACHE.exe"
14063 if test -z "$CCACHE" -o "$CCACHE" = ":"; then
14064 { echo "configure: error: ccache not found" 1>&2; exit 1; }
14065 elif test -x "$CCACHE"; then
14069 { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
14074 # Check whether --with-static-checking or --without-static-checking was given.
14075 if test "${with_static_checking+set}" = set; then
14076 withval="$with_static_checking"
14077 DEHYDRA_PATH=$withval
14083 if test -n "$DEHYDRA_PATH"; then
14084 if test ! -f "$DEHYDRA_PATH"; then
14085 { echo "configure: error: The dehydra plugin is not at the specified path." 1>&2; exit 1; }
14087 cat >> confdefs.h <<\EOF
14088 #define NS_STATIC_CHECKING 1
14094 # Check whether --enable-strip or --disable-strip was given.
14095 if test "${enable_strip+set}" = set; then
14096 enableval="$enable_strip"
14097 if test "$enableval" = "yes"; then
14099 elif test "$enableval" = "no"; then
14102 { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; exit 1; }
14107 # Check whether --enable-install-strip or --disable-install-strip was given.
14108 if test "${enable_install_strip+set}" = set; then
14109 enableval="$enable_install_strip"
14110 if test "$enableval" = "yes"; then
14112 elif test "$enableval" = "no"; then
14115 { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; exit 1; }
14120 # Profiling and Instrumenting
14122 # Check whether --enable-timeline or --disable-timeline was given.
14123 if test "${enable_timeline+set}" = set; then
14124 enableval="$enable_timeline"
14125 if test "$enableval" = "yes"; then
14127 elif test "$enableval" = "no"; then
14130 { echo "configure: error: Option, timeline, does not take an argument ($enableval)." 1>&2; exit 1; }
14134 if test -n "$MOZ_TIMELINE"; then
14135 cat >> confdefs.h <<\EOF
14136 #define MOZ_TIMELINE 1
14141 # Check whether --enable-quantify or --disable-quantify was given.
14142 if test "${enable_quantify+set}" = set; then
14143 enableval="$enable_quantify"
14144 if test "$enableval" = "yes"; then
14146 elif test "$enableval" = "no"; then
14149 { echo "configure: error: Option, quantify, does not take an argument ($enableval)." 1>&2; exit 1; }
14154 if test -z "$SKIP_LIBRARY_CHECKS"; then
14157 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14158 ac_cpp='$CXXCPP $CPPFLAGS'
14159 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14160 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14161 cross_compiling=$ac_cv_prog_cxx_cross
14163 for ac_func in __cxa_demangle
14165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14166 echo "configure:14167: checking for $ac_func" >&5
14167 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14168 echo $ac_n "(cached) $ac_c" 1>&6
14170 cat > conftest.$ac_ext <<EOF
14171 #line 14172 "configure"
14172 #include "confdefs.h"
14173 /* System header to define __stub macros and hopefully few prototypes,
14174 which can conflict with char $ac_func(); below. */
14175 #include <assert.h>
14176 /* Override any gcc2 internal prototype to avoid an error. */
14180 /* We use char because int might match the return type of a gcc2
14181 builtin and then its argument prototype would still apply. */
14186 /* The GNU C library defines this for functions which it implements
14187 to always fail with ENOSYS. Some functions are actually named
14188 something starting with __ and the normal name is an alias. */
14189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14197 if { (eval echo configure:14198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14199 eval "ac_cv_func_$ac_func=yes"
14201 echo "configure: failed program was:" >&5
14202 cat conftest.$ac_ext >&5
14204 eval "ac_cv_func_$ac_func=no"
14209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14210 echo "$ac_t""yes" 1>&6
14211 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14212 cat >> confdefs.h <<EOF
14213 #define $ac_tr_func 1
14217 echo "$ac_t""no" 1>&6
14223 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14224 ac_cpp='$CPP $CPPFLAGS'
14225 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14226 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14227 cross_compiling=$ac_cv_prog_cc_cross
14231 # Demangle only for debug or trace-malloc builds
14232 MOZ_DEMANGLE_SYMBOLS=
14233 if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
14234 MOZ_DEMANGLE_SYMBOLS=1
14235 cat >> confdefs.h <<\EOF
14236 #define MOZ_DEMANGLE_SYMBOLS 1
14242 if test "$HAVE_GCC3_ABI" -a -z "$SKIP_LIBRARY_CHECKS"; then
14243 ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'`
14244 echo $ac_n "checking for unwind.h""... $ac_c" 1>&6
14245 echo "configure:14246: checking for unwind.h" >&5
14246 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
14247 echo $ac_n "(cached) $ac_c" 1>&6
14249 cat > conftest.$ac_ext <<EOF
14250 #line 14251 "configure"
14251 #include "confdefs.h"
14252 #include <unwind.h>
14254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14255 { (eval echo configure:14256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14257 if test -z "$ac_err"; then
14259 eval "ac_cv_header_$ac_safe=yes"
14262 echo "configure: failed program was:" >&5
14263 cat conftest.$ac_ext >&5
14265 eval "ac_cv_header_$ac_safe=no"
14269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14270 echo "$ac_t""yes" 1>&6
14271 for ac_func in _Unwind_Backtrace
14273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14274 echo "configure:14275: checking for $ac_func" >&5
14275 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14276 echo $ac_n "(cached) $ac_c" 1>&6
14278 cat > conftest.$ac_ext <<EOF
14279 #line 14280 "configure"
14280 #include "confdefs.h"
14281 /* System header to define __stub macros and hopefully few prototypes,
14282 which can conflict with char $ac_func(); below. */
14283 #include <assert.h>
14284 /* Override any gcc2 internal prototype to avoid an error. */
14285 /* We use char because int might match the return type of a gcc2
14286 builtin and then its argument prototype would still apply. */
14291 /* The GNU C library defines this for functions which it implements
14292 to always fail with ENOSYS. Some functions are actually named
14293 something starting with __ and the normal name is an alias. */
14294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14302 if { (eval echo configure:14303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14304 eval "ac_cv_func_$ac_func=yes"
14306 echo "configure: failed program was:" >&5
14307 cat conftest.$ac_ext >&5
14309 eval "ac_cv_func_$ac_func=no"
14314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14315 echo "$ac_t""yes" 1>&6
14316 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14317 cat >> confdefs.h <<EOF
14318 #define $ac_tr_func 1
14322 echo "$ac_t""no" 1>&6
14327 echo "$ac_t""no" 1>&6
14334 # Check whether --enable-xterm-updates or --disable-xterm-updates was given.
14335 if test "${enable_xterm_updates+set}" = set; then
14336 enableval="$enable_xterm_updates"
14337 if test "$enableval" = "yes"; then
14339 elif test "$enableval" = "no"; then
14342 { echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; }
14347 if test -z "$SKIP_COMPILER_CHECKS"; then
14350 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
14351 echo "configure:14352: checking for gcc -pipe support" >&5
14352 if test -n "$GNU_CC" -a -n "$GNU_CXX" -a -n "$GNU_AS"; then
14353 echo '#include <stdio.h>' > dummy-hello.c
14354 echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
14355 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
14356 cat dummy-hello.s 2> /dev/null | ${AS_BIN} -o dummy-hello.S - 2>&5
14357 if test $? = 0; then
14358 _res_as_stdin="yes"
14362 if test "$_res_as_stdin" = "yes"; then
14363 _SAVE_CFLAGS=$CFLAGS
14364 CFLAGS="$CFLAGS -pipe"
14365 cat > conftest.$ac_ext <<EOF
14366 #line 14367 "configure"
14367 #include "confdefs.h"
14370 printf("Hello World\n");
14373 if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14375 _res_gcc_pipe="yes"
14377 echo "configure: failed program was:" >&5
14378 cat conftest.$ac_ext >&5
14383 CFLAGS=$_SAVE_CFLAGS
14385 if test "$_res_as_stdin" = "yes" -a "$_res_gcc_pipe" = "yes"; then
14387 CFLAGS="$CFLAGS -pipe"
14388 CXXFLAGS="$CXXFLAGS -pipe"
14392 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
14393 echo "$ac_t""$_res" 1>&6
14395 echo "$ac_t""no" 1>&6
14399 # Check whether --enable-profile-guided-optimization or --disable-profile-guided-optimization was given.
14400 if test "${enable_profile_guided_optimization+set}" = set; then
14401 enableval="$enable_profile_guided_optimization"
14402 if test "$enableval" = "no"; then
14403 MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE=1
14404 elif test "$enableval" = "yes"; then
14405 MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE=
14407 { echo "configure: error: Option, profile-guided-optimization, does not take an argument ($enableval)." 1>&2; exit 1; }
14414 _SAVE_CFLAGS="$CFLAGS"
14415 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
14417 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
14418 echo "configure:14419: checking whether C compiler supports -fprofile-generate" >&5
14419 cat > conftest.$ac_ext <<EOF
14420 #line 14421 "configure"
14421 #include "confdefs.h"
14427 if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14429 PROFILE_GEN_CFLAGS="-fprofile-generate"
14432 echo "configure: failed program was:" >&5
14433 cat conftest.$ac_ext >&5
14438 echo "$ac_t""$result" 1>&6
14440 if test $result = "yes"; then
14441 PROFILE_GEN_LDFLAGS="-fprofile-generate"
14442 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition"
14443 PROFILE_USE_LDFLAGS="-fprofile-use"
14446 CFLAGS="$_SAVE_CFLAGS"
14448 if test -n "$INTEL_CC"; then
14449 PROFILE_GEN_CFLAGS="-prof-gen -prof-dir ."
14450 PROFILE_GEN_LDFLAGS=
14451 PROFILE_USE_CFLAGS="-prof-use -prof-dir ."
14452 PROFILE_USE_LDFLAGS=
14455 if test "$SOLARIS_SUNPRO_CC"; then
14456 PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
14457 PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
14458 PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
14459 PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
14468 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14469 ac_cpp='$CXXCPP $CPPFLAGS'
14470 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14471 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14472 cross_compiling=$ac_cv_prog_cxx_cross
14475 # Check whether --enable-pedantic or --disable-pedantic was given.
14476 if test "${enable_pedantic+set}" = set; then
14477 enableval="$enable_pedantic"
14478 if test "$enableval" = "no"; then
14480 elif test "$enableval" = "yes"; then
14483 { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; }
14487 if test "$_PEDANTIC"; then
14488 _SAVE_CXXFLAGS=$CXXFLAGS
14489 CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
14490 echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6
14491 echo "configure:14492: checking whether C++ compiler has -pedantic long long bug" >&5
14492 cat > conftest.$ac_ext <<EOF
14493 #line 14494 "configure"
14494 #include "confdefs.h"
14495 $configure_static_assert_macros
14497 CONFIGURE_STATIC_ASSERT(sizeof(long long) == 8)
14500 if { (eval echo configure:14501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14504 echo "configure: failed program was:" >&5
14505 cat conftest.$ac_ext >&5
14510 echo "$ac_t""$result" 1>&6
14511 CXXFLAGS="$_SAVE_CXXFLAGS"
14515 _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
14516 _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
14519 { echo "configure: error: Your compiler appears to have a known bug where long long is miscompiled when using -pedantic. Reconfigure using --disable-pedantic. " 1>&2; exit 1; }
14524 echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6
14525 echo "configure:14526: checking for correct temporary object destruction order" >&5
14526 if test "$cross_compiling" = yes; then
14529 cat > conftest.$ac_ext <<EOF
14530 #line 14531 "configure"
14531 #include "confdefs.h"
14533 extern "C" void exit(int);
14536 public: A(int& x) : mValue(x) {}
14538 operator char**() { return 0; }
14539 private: int& mValue;
14541 void func(char **arg) {}
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14557 echo "configure: failed program was:" >&5
14558 cat conftest.$ac_ext >&5
14565 echo "$ac_t""$result" 1>&6
14567 if test "$result" = "no"; then
14568 { echo "configure: error: Your compiler does not follow the C++ specification for temporary object destruction order." 1>&2; exit 1; }
14571 _SAVE_CXXFLAGS=$CXXFLAGS
14572 CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}"
14573 echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6
14574 echo "configure:14575: checking for correct overload resolution with const and templates" >&5
14575 if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then
14576 echo $ac_n "(cached) $ac_c" 1>&6
14578 cat > conftest.$ac_ext <<EOF
14579 #line 14580 "configure"
14580 #include "confdefs.h"
14589 template <class T, class U>
14590 int operator==(const Pointer<T>& rhs, U* lhs)
14592 return rhs.myPtr == lhs;
14595 template <class T, class U>
14596 int operator==(const Pointer<T>& rhs, const U* lhs)
14598 return rhs.myPtr == lhs;
14609 if { (eval echo configure:14610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14611 ac_nscap_nonconst_opeq_bug="no"
14613 echo "configure: failed program was:" >&5
14614 cat conftest.$ac_ext >&5
14616 ac_nscap_nonconst_opeq_bug="yes"
14621 echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
14622 CXXFLAGS="$_SAVE_CXXFLAGS"
14624 if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then
14625 cat >> confdefs.h <<\EOF
14626 #define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1
14631 echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6
14632 echo "configure:14633: checking for tm_zone tm_gmtoff in struct tm" >&5
14633 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then
14634 echo $ac_n "(cached) $ac_c" 1>&6
14636 cat > conftest.$ac_ext <<EOF
14637 #line 14638 "configure"
14638 #include "confdefs.h"
14641 struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1;
14644 if { (eval echo configure:14645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14646 ac_cv_struct_tm_zone_tm_gmtoff="yes"
14648 echo "configure: failed program was:" >&5
14649 cat conftest.$ac_ext >&5
14651 ac_cv_struct_tm_zone_tm_gmtoff="no"
14656 echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6
14657 if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then
14658 cat >> confdefs.h <<\EOF
14659 #define HAVE_TM_ZONE_TM_GMTOFF 1
14664 fi # SKIP_COMPILER_CHECKS
14666 # Check whether --enable-cpp-rtti or --disable-cpp-rtti was given.
14667 if test "${enable_cpp_rtti+set}" = set; then
14668 enableval="$enable_cpp_rtti"
14669 if test "$enableval" = "yes"; then
14671 elif test "$enableval" = "no"; then
14674 { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; }
14679 if test "$_MOZ_USE_RTTI"; then
14680 _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_ON
14682 _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_OFF
14687 # Check whether --enable-cpp-exceptions or --disable-cpp-exceptions was given.
14688 if test "${enable_cpp_exceptions+set}" = set; then
14689 enableval="$enable_cpp_exceptions"
14690 if test "$enableval" = "yes"; then
14691 _MOZ_CPP_EXCEPTIONS=1
14692 elif test "$enableval" = "no"; then
14693 _MOZ_CPP_EXCEPTIONS=
14695 { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; }
14700 if test "$_MOZ_CPP_EXCEPTIONS"; then
14701 _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_ON
14702 cat >> confdefs.h <<\EOF
14703 #define MOZ_CPP_EXCEPTIONS 1
14707 _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF
14712 # Irix & OSF native compilers do not like exception declarations
14713 # when exceptions are disabled
14714 if test -n "$MIPSPRO_CXX" -o -n "$COMPAQ_CXX" -o -n "$VACPP"; then
14715 cat >> confdefs.h <<\EOF
14716 #define CPP_THROW_NEW
14720 cat >> confdefs.h <<\EOF
14721 #define CPP_THROW_NEW throw()
14726 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14727 ac_cpp='$CPP $CPPFLAGS'
14728 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14729 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14730 cross_compiling=$ac_cv_prog_cc_cross
14733 # Build dependencies
14736 # Check whether --enable-auto-deps or --disable-auto-deps was given.
14737 if test "${enable_auto_deps+set}" = set; then
14738 enableval="$enable_auto_deps"
14739 if test "$enableval" = "no"; then
14741 elif test "$enableval" = "yes"; then
14744 { echo "configure: error: Option, auto-deps, does not take an argument ($enableval)." 1>&2; exit 1; }
14749 if test -n "$MOZ_AUTO_DEPS"; then
14751 # Check whether --enable-md or --disable-md was given.
14752 if test "${enable_md+set}" = set; then
14753 enableval="$enable_md"
14754 if test "$enableval" = "no"; then
14756 elif test "$enableval" = "yes"; then
14759 { echo "configure: error: Option, md, does not take an argument ($enableval)." 1>&2; exit 1; }
14762 if test "$GNU_CC" -a "$GNU_CXX" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "WINCE"; then
14765 if test "$SOLARIS_SUNPRO_CC"; then
14770 if test "$_cpp_md_flag"; then
14772 if test "$OS_ARCH" = "OpenVMS"; then
14773 _DEPEND_CFLAGS='$(subst =, ,$(filter-out %/.pp,-MM=-MD=-MF=$(MDDEPDIR)/$(basename $(@F)).pp))'
14775 _DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(basename $(@F)).pp)'
14777 if test "$SOLARIS_SUNPRO_CC"; then
14782 if test -z "$_WIN32_MSVC"; then
14783 _USE_CPP_INCLUDE_FLAG=
14784 _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
14785 _DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
14787 echo '#include <stdio.h>' > dummy-hello.c
14789 CL_INCLUDES_PREFIX=`"${CC}" -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/^\([^:]*:[^:]*:\).*stdio.h$/\1/p'`
14791 if test -z "$CL_INCLUDES_PREFIX"; then
14792 { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; exit 1; }
14795 rm -f dummy-hello.c
14796 _topsrcdirwin=`cd \`dirname $0\`; pwd -W`
14797 CC_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
14798 CXX_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
14811 # Static build options
14813 # Check whether --enable-static or --disable-static was given.
14814 if test "${enable_static+set}" = set; then
14815 enableval="$enable_static"
14816 if test "$enableval" = "yes"; then
14817 BUILD_STATIC_LIBS=1
14818 elif test "$enableval" = "no"; then
14821 { echo "configure: error: Option, static, does not take an argument ($enableval)." 1>&2; exit 1; }
14826 # Check whether --enable-readline or --disable-readline was given.
14827 if test "${enable_readline+set}" = set; then
14828 enableval="$enable_readline"
14829 if test "$enableval" = "yes"; then
14831 elif test "$enableval" = "no"; then
14834 { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; exit 1; }
14839 JS_NATIVE_EDITLINE=
14844 *-wince*|*-winmo*|*-mingw*|*-cygwin*|*-msvc*|*-mks*)
14855 if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then
14856 if test -n "$JS_WANT_READLINE"; then
14857 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14858 echo "configure:14859: checking for readline in -lreadline" >&5
14859 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
14860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14861 echo $ac_n "(cached) $ac_c" 1>&6
14863 ac_save_LIBS="$LIBS"
14864 LIBS="-lreadline $LIBS"
14865 cat > conftest.$ac_ext <<EOF
14866 #line 14867 "configure"
14867 #include "confdefs.h"
14868 /* Override any gcc2 internal prototype to avoid an error. */
14869 /* We use char because int might match the return type of a gcc2
14870 builtin and then its argument prototype would still apply. */
14877 if { (eval echo configure:14878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14879 eval "ac_cv_lib_$ac_lib_var=yes"
14881 echo "configure: failed program was:" >&5
14882 cat conftest.$ac_ext >&5
14884 eval "ac_cv_lib_$ac_lib_var=no"
14887 LIBS="$ac_save_LIBS"
14890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14891 echo "$ac_t""yes" 1>&6
14892 EDITLINE_LIBS="-lreadline"
14894 echo "$ac_t""no" 1>&6
14895 { echo "configure: error: No system readline library found." 1>&2; exit 1; }
14899 JS_NATIVE_EDITLINE=1
14900 EDITLINE_LIBS='$(DEPTH)/editline/$(LIB_PREFIX)editline.$(LIB_SUFFIX)'
14903 cat >> confdefs.h <<\EOF
14912 # Standalone module options (Not for building Mozilla)
14914 # Check whether --enable-ctypes or --disable-ctypes was given.
14915 if test "${enable_ctypes+set}" = set; then
14916 enableval="$enable_ctypes"
14917 if test "$enableval" = "yes"; then
14919 elif test "$enableval" = "no"; then
14922 { echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&2; exit 1; }
14927 if test "$JS_HAS_CTYPES"; then
14928 if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then
14929 { 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; }
14931 cat >> confdefs.h <<\EOF
14932 #define JS_HAS_CTYPES 1
14937 if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
14938 MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
14941 # Check whether --with-sync-build-files or --without-sync-build-files was given.
14942 if test "${with_sync_build_files+set}" = set; then
14943 withval="$with_sync_build_files"
14944 MOZ_SYNC_BUILD_FILES=$withval
15029 $_WARNINGS_CFLAGS \
15034 $_MOZ_EXCEPTIONS_FLAGS \
15035 $_WARNINGS_CXXFLAGS \
15038 COMPILE_CFLAGS=`echo \
15043 COMPILE_CXXFLAGS=`echo \
15044 $_DEFINES_CXXFLAGS \
15102 cat >> confdefs.h <<EOF
15103 #define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
15116 if test "$USING_HCC"; then
15117 CC='${topsrcdir}/build/hcc'
15119 CXX='${topsrcdir}/build/hcpp'
15120 CXX="$CXX '$_OLDCXX'"
15125 echo $ac_n "checking for posix_fallocate""... $ac_c" 1>&6
15126 echo "configure:15127: checking for posix_fallocate" >&5
15127 cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 #define _XOPEN_SOURCE 600
15133 posix_fallocate(0, 0, 0);
15136 if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15138 ac_cv___posix_fallocate=true
15140 echo "configure: failed program was:" >&5
15141 cat conftest.$ac_ext >&5
15143 ac_cv___posix_fallocate=false
15147 if test "$ac_cv___posix_fallocate" = true ; then
15148 cat >> confdefs.h <<\EOF
15149 #define HAVE_POSIX_FALLOCATE 1
15152 echo "$ac_t""yes" 1>&6
15154 echo "$ac_t""no" 1>&6
15157 if test "$COMPILE_ENVIRONMENT"; then
15158 if test "$MOZ_X11"; then
15159 _SAVE_CFLAGS=$CFLAGS
15160 CFLAGS="$CFLAGS $XCFLAGS"
15161 cat > conftest.$ac_ext <<EOF
15162 #line 15163 "configure"
15163 #include "confdefs.h"
15166 #include <stdlib.h>
15167 #include <X11/Xlib.h>
15168 #include <X11/Intrinsic.h>
15173 if ((dpy = XOpenDisplay(NULL)) == NULL) {
15174 fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
15180 if { (eval echo configure:15181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15183 echo "configure: failed program was:" >&5
15184 cat conftest.$ac_ext >&5
15186 { echo "configure: error: Could not compile basic X program." 1>&2; exit 1; }
15189 CFLAGS="$_SAVE_CFLAGS"
15191 if test ! -z "$MISSING_X"; then
15192 { echo "configure: error: Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
15196 fi # COMPILE_ENVIRONMENT
15199 if test "$OS_ARCH" = "BeOS"; then
15200 cat >> confdefs.h <<\EOF
15204 elif test "$OS_ARCH" = "Darwin"; then
15205 cat >> confdefs.h <<\EOF
15206 #define XP_MACOSX 1
15209 cat >> confdefs.h <<\EOF
15213 cat >> confdefs.h <<\EOF
15214 #define UNIX_ASYNC_DNS 1
15217 elif test "$OS_ARCH" = "OpenVMS"; then
15218 cat >> confdefs.h <<\EOF
15222 elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2" -a "$OS_ARCH" != "WINCE"; then
15223 cat >> confdefs.h <<\EOF
15227 cat >> confdefs.h <<\EOF
15228 #define UNIX_ASYNC_DNS 1
15233 # Check whether --enable-threadsafe or --disable-threadsafe was given.
15234 if test "${enable_threadsafe+set}" = set; then
15235 enableval="$enable_threadsafe"
15236 cat >> confdefs.h <<\EOF
15237 #define JS_THREADSAFE 1
15243 if test "$MOZ_DEBUG"; then
15244 cat >> confdefs.h <<\EOF
15245 #define MOZ_REFLOW_PERF 1
15248 cat >> confdefs.h <<\EOF
15249 #define MOZ_REFLOW_PERF_DSP 1
15254 if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK2" ; then
15255 cat >> confdefs.h <<\EOF
15256 #define MOZ_ACCESSIBILITY_ATK 1
15259 ATK_FULL_VERSION=`$PKG_CONFIG --modversion atk`
15260 ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
15261 ATK_MINOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
15262 ATK_REV_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
15263 cat >> confdefs.h <<EOF
15264 #define ATK_MAJOR_VERSION $ATK_MAJOR_VERSION
15267 cat >> confdefs.h <<EOF
15268 #define ATK_MINOR_VERSION $ATK_MINOR_VERSION
15271 cat >> confdefs.h <<EOF
15272 #define ATK_REV_VERSION $ATK_REV_VERSION
15278 for ac_func in setlocale
15280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15281 echo "configure:15282: checking for $ac_func" >&5
15282 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15283 echo $ac_n "(cached) $ac_c" 1>&6
15285 cat > conftest.$ac_ext <<EOF
15286 #line 15287 "configure"
15287 #include "confdefs.h"
15288 /* System header to define __stub macros and hopefully few prototypes,
15289 which can conflict with char $ac_func(); below. */
15290 #include <assert.h>
15291 /* Override any gcc2 internal prototype to avoid an error. */
15292 /* We use char because int might match the return type of a gcc2
15293 builtin and then its argument prototype would still apply. */
15298 /* The GNU C library defines this for functions which it implements
15299 to always fail with ENOSYS. Some functions are actually named
15300 something starting with __ and the normal name is an alias. */
15301 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15309 if { (eval echo configure:15310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15311 eval "ac_cv_func_$ac_func=yes"
15313 echo "configure: failed program was:" >&5
15314 cat conftest.$ac_ext >&5
15316 eval "ac_cv_func_$ac_func=no"
15321 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15322 echo "$ac_t""yes" 1>&6
15323 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15324 cat >> confdefs.h <<EOF
15325 #define $ac_tr_func 1
15329 echo "$ac_t""no" 1>&6
15333 for ac_func in localeconv
15335 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15336 echo "configure:15337: checking for $ac_func" >&5
15337 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15338 echo $ac_n "(cached) $ac_c" 1>&6
15340 cat > conftest.$ac_ext <<EOF
15341 #line 15342 "configure"
15342 #include "confdefs.h"
15343 /* System header to define __stub macros and hopefully few prototypes,
15344 which can conflict with char $ac_func(); below. */
15345 #include <assert.h>
15346 /* Override any gcc2 internal prototype to avoid an error. */
15347 /* We use char because int might match the return type of a gcc2
15348 builtin and then its argument prototype would still apply. */
15353 /* The GNU C library defines this for functions which it implements
15354 to always fail with ENOSYS. Some functions are actually named
15355 something starting with __ and the normal name is an alias. */
15356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15364 if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15366 eval "ac_cv_func_$ac_func=yes"
15368 echo "configure: failed program was:" >&5
15369 cat conftest.$ac_ext >&5
15371 eval "ac_cv_func_$ac_func=no"
15376 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15377 echo "$ac_t""yes" 1>&6
15378 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15379 cat >> confdefs.h <<EOF
15380 #define $ac_tr_func 1
15384 echo "$ac_t""no" 1>&6
15391 WIN_TOP_SRC=`cd $srcdir; pwd -W`
15393 cygwin*|msvc*|mks*)
15394 HOST_CC="\$(CYGWIN_WRAPPER) $HOST_CC"
15395 HOST_CXX="\$(CYGWIN_WRAPPER) $HOST_CXX"
15396 CC="\$(CYGWIN_WRAPPER) $CC"
15397 CXX="\$(CYGWIN_WRAPPER) $CXX"
15398 CPP="\$(CYGWIN_WRAPPER) $CPP"
15399 LD="\$(CYGWIN_WRAPPER) $LD"
15400 AS="\$(CYGWIN_WRAPPER) $AS"
15401 RC="\$(CYGWIN_WRAPPER) $RC"
15402 CYGDRIVE_MOUNT=`mount -p | awk '{ if (/^\//) { print $1; exit } }'`
15403 WIN_TOP_SRC=`cygpath -a -w $srcdir | sed -e 's|\\\\|/|g'`
15415 # Save the defines header file before autoconf removes it.
15416 # (Do not add AC_DEFINE calls after this line.)
15417 _CONFIG_TMP=confdefs-tmp.h
15418 _CONFIG_DEFS_H=js-confdefs.h
15420 cat > $_CONFIG_TMP <<\EOF
15421 /* List of defines generated by configure. Included with preprocessor flag,
15422 * -include, to avoid long list of -D defines on the compile command-line.
15426 #ifndef _JS_CONFDEFS_H_
15427 #define _JS_CONFDEFS_H_
15430 _EGREP_PATTERN='^#define ('
15431 if test -n "$_NON_GLOBAL_ACDEFINES"; then
15432 for f in $_NON_GLOBAL_ACDEFINES; do
15433 _EGREP_PATTERN="${_EGREP_PATTERN}$f|"
15436 _EGREP_PATTERN="${_EGREP_PATTERN}dummy_never_defined)"
15438 sort confdefs.h | egrep -v "$_EGREP_PATTERN" >> $_CONFIG_TMP
15440 cat >> $_CONFIG_TMP <<\EOF
15442 #endif /* _JS_CONFDEFS_H_ */
15446 # Only write js-confdefs.h when something changes (or it doesn't exist)
15447 if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then
15450 echo "$ac_t"""creating $_CONFIG_DEFS_H"" 1>&6
15451 mv -f $_CONFIG_TMP $_CONFIG_DEFS_H
15453 echo ==== $_CONFIG_DEFS_H =================================
15454 cat $_CONFIG_DEFS_H
15457 rm -f confdefs.h.save
15458 mv confdefs.h confdefs.h.save
15459 egrep -v "$_EGREP_PATTERN" confdefs.h.save > confdefs.h
15460 # Transform confdefs.h into DEFS.
15461 # Protect against shell expansion while executing Makefile rules.
15462 # Protect against Makefile macro expansion.
15463 cat > conftest.defs <<\EOF
15464 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
15465 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
15470 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
15471 rm -f conftest.defs
15476 mv confdefs.h.save confdefs.h
15482 jsapi-tests/Makefile
15486 config/mkdepend/Makefile
15489 if test -n "$JS_NATIVE_EDITLINE"; then
15490 MAKEFILES="$MAKEFILES
15495 if test -z "${AS_PERL}"; then
15496 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
15498 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh
15503 echo $MAKEFILES > unallmakefiles
15505 mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
15508 cat > confcache <<\EOF
15509 # This file is a shell script that caches the results of configure
15510 # tests run on this system so they can be shared between configure
15511 # scripts and configure runs. It is not useful on other systems.
15512 # If it contains results you don't want to keep, you may remove or edit it.
15514 # By default, configure uses ./config.cache as the cache file,
15515 # creating it if it does not exist already. You can give configure
15516 # the --cache-file=FILE option to use a different cache file; that is
15517 # what configure does when it calls configure scripts in
15518 # subdirectories, so they share the cache.
15519 # Giving --cache-file=/dev/null disables caching, for debugging configure.
15520 # config.status only pays attention to the cache file if you give it the
15521 # --recheck option to rerun configure.
15524 # The following way of writing the cache mishandles newlines in values,
15525 # but we know of no workaround that is simple, portable, and efficient.
15526 # So, don't put newlines in cache variables' values.
15527 # Ultrix sh set writes to stderr and can't be redirected directly,
15528 # and sets the high bit in the cache file unless we assign to the vars.
15530 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15532 # `set' does not quote correctly, so add quotes (double-quote substitution
15533 # turns \\\\ into \\, and sed turns \\ into \).
15535 -e "s/'/'\\\\''/g" \
15536 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
15539 # `set' quotes correctly as required by POSIX, so do not add quotes.
15540 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
15543 if cmp -s $cache_file confcache; then
15546 if test -w $cache_file; then
15547 echo "updating cache $cache_file"
15548 cat confcache > $cache_file
15550 echo "not updating unwritable cache $cache_file"
15555 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15557 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15558 # Let make expand exec_prefix.
15559 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15561 # Any assignment to VPATH causes Sun make to only execute
15562 # the first set of double-colon rules, so remove it if not needed.
15563 # If there is a colon in the path, we need to keep it.
15564 if test "x$srcdir" = x.; then
15565 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
15568 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15570 DEFS=-DHAVE_CONFIG_H
15572 # Without the "./", some shells look in PATH for config.status.
15573 : ${CONFIG_STATUS=./config.status}
15575 echo creating $CONFIG_STATUS
15576 rm -f $CONFIG_STATUS
15577 cat > $CONFIG_STATUS <<EOF
15579 # Generated automatically by configure.
15580 # Run this file to recreate the current configuration.
15581 # This directory was configured as follows,
15582 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15584 # $0 $ac_configure_args
15586 # Compiler output produced by configure, useful for debugging
15587 # configure, is in ./config.log if it exists.
15589 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15592 case "\$ac_option" in
15593 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15594 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15595 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15596 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15597 echo "$CONFIG_STATUS generated by autoconf version 2.13"
15599 -help | --help | --hel | --he | --h)
15600 echo "\$ac_cs_usage"; exit 0 ;;
15601 *) echo "\$ac_cs_usage"; exit 1 ;;
15605 ac_given_srcdir=$srcdir
15606 ac_given_INSTALL="$INSTALL"
15608 trap 'rm -fr `echo "$MAKEFILES js-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15610 cat >> $CONFIG_STATUS <<EOF
15614 # Protect against being on the right side of a sed subst in config.status.
15615 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15616 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15620 s%@CFLAGS@%$CFLAGS%g
15621 s%@CPPFLAGS@%$CPPFLAGS%g
15622 s%@CXXFLAGS@%$CXXFLAGS%g
15623 s%@FFLAGS@%$FFLAGS%g
15625 s%@LDFLAGS@%$LDFLAGS%g
15627 s%@exec_prefix@%$exec_prefix%g
15628 s%@prefix@%$prefix%g
15629 s%@program_transform_name@%$program_transform_name%g
15630 s%@bindir@%$bindir%g
15631 s%@sbindir@%$sbindir%g
15632 s%@libexecdir@%$libexecdir%g
15633 s%@datadir@%$datadir%g
15634 s%@sysconfdir@%$sysconfdir%g
15635 s%@sharedstatedir@%$sharedstatedir%g
15636 s%@localstatedir@%$localstatedir%g
15637 s%@libdir@%$libdir%g
15638 s%@includedir@%$includedir%g
15639 s%@oldincludedir@%$oldincludedir%g
15640 s%@infodir@%$infodir%g
15641 s%@mandir@%$mandir%g
15643 s%@host_alias@%$host_alias%g
15644 s%@host_cpu@%$host_cpu%g
15645 s%@host_vendor@%$host_vendor%g
15646 s%@host_os@%$host_os%g
15647 s%@target@%$target%g
15648 s%@target_alias@%$target_alias%g
15649 s%@target_cpu@%$target_cpu%g
15650 s%@target_vendor@%$target_vendor%g
15651 s%@target_os@%$target_os%g
15653 s%@build_alias@%$build_alias%g
15654 s%@build_cpu@%$build_cpu%g
15655 s%@build_vendor@%$build_vendor%g
15656 s%@build_os@%$build_os%g
15658 s%@TOP_DIST@%$TOP_DIST%g
15659 s%@COMPILE_ENVIRONMENT@%$COMPILE_ENVIRONMENT%g
15661 s%@JS_SHARED_LIBRARY@%$JS_SHARED_LIBRARY%g
15662 s%@ANDROID_VERSION@%$ANDROID_VERSION%g
15663 s%@ANDROID_NDK@%$ANDROID_NDK%g
15664 s%@ANDROID_TOOLCHAIN@%$ANDROID_TOOLCHAIN%g
15665 s%@ANDROID_PLATFORM@%$ANDROID_PLATFORM%g
15666 s%@ANDROID_SDK@%$ANDROID_SDK%g
15667 s%@ANDROID_PLATFORM_TOOLS@%$ANDROID_PLATFORM_TOOLS%g
15668 s%@HOST_CC@%$HOST_CC%g
15669 s%@HOST_CXX@%$HOST_CXX%g
15670 s%@HOST_RANLIB@%$HOST_RANLIB%g
15671 s%@HOST_AR@%$HOST_AR%g
15674 s%@RANLIB@%$RANLIB%g
15679 s%@WINDRES@%$WINDRES%g
15681 s%@CXXCPP@%$CXXCPP%g
15682 s%@SBCONF@%$SBCONF%g
15683 s%@QEMU_CANT_RUN_JS_SHELL@%$QEMU_CANT_RUN_JS_SHELL%g
15684 s%@_MSC_VER@%$_MSC_VER%g
15685 s%@GNU_AS@%$GNU_AS%g
15686 s%@GNU_LD@%$GNU_LD%g
15687 s%@GNU_CC@%$GNU_CC%g
15688 s%@GNU_CXX@%$GNU_CXX%g
15689 s%@INTEL_CC@%$INTEL_CC%g
15690 s%@INTEL_CXX@%$INTEL_CXX%g
15691 s%@STL_FLAGS@%$STL_FLAGS%g
15692 s%@WRAP_STL_INCLUDES@%$WRAP_STL_INCLUDES%g
15693 s%@MOZ_MSVC_STL_WRAP__Throw@%$MOZ_MSVC_STL_WRAP__Throw%g
15694 s%@MOZ_MSVC_STL_WRAP__RAISE@%$MOZ_MSVC_STL_WRAP__RAISE%g
15695 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15696 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15697 s%@INSTALL_DATA@%$INSTALL_DATA%g
15699 s%@PYTHON@%$PYTHON%g
15700 s%@NSINSTALL_BIN@%$NSINSTALL_BIN%g
15701 s%@DOXYGEN@%$DOXYGEN%g
15702 s%@AUTOCONF@%$AUTOCONF%g
15705 s%@SYSTEM_MAKEDEPEND@%$SYSTEM_MAKEDEPEND%g
15707 s%@PBBUILD@%$PBBUILD%g
15709 s%@GCC_VERSION@%$GCC_VERSION%g
15710 s%@XCODEBUILD_VERSION@%$XCODEBUILD_VERSION%g
15711 s%@HAS_XCODE_2_1@%$HAS_XCODE_2_1%g
15712 s%@UNIVERSAL_BINARY@%$UNIVERSAL_BINARY%g
15713 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
15714 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
15715 s%@NEXT_ROOT@%$NEXT_ROOT%g
15717 s%@X_CFLAGS@%$X_CFLAGS%g
15718 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15719 s%@X_LIBS@%$X_LIBS%g
15720 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15721 s%@SOLARIS_SUNPRO_CC@%$SOLARIS_SUNPRO_CC%g
15722 s%@SOLARIS_SUNPRO_CXX@%$SOLARIS_SUNPRO_CXX%g
15723 s%@HAVE_64BIT_OS@%$HAVE_64BIT_OS%g
15724 s%@MOZ_OS2_HIGH_MEMORY@%$MOZ_OS2_HIGH_MEMORY%g
15725 s%@AIX_OBJMODEL@%$AIX_OBJMODEL%g
15726 s%@NO_LD_ARCHIVE_FLAGS@%$NO_LD_ARCHIVE_FLAGS%g
15727 s%@ENABLE_METHODJIT@%$ENABLE_METHODJIT%g
15728 s%@ENABLE_TRACEJIT@%$ENABLE_TRACEJIT%g
15729 s%@NANOJIT_ARCH@%$NANOJIT_ARCH%g
15730 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
15731 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
15732 s%@HAVE_GCC_ALIGN_ARG_POINTER@%$HAVE_GCC_ALIGN_ARG_POINTER%g
15733 s%@HAVE_DTRACE@%$HAVE_DTRACE%g
15734 s%@HAVE_LINUX_PERF_EVENT_H@%$HAVE_LINUX_PERF_EVENT_H%g
15735 s%@HAVE_ARM_SIMD@%$HAVE_ARM_SIMD%g
15736 s%@HAVE_ARM_NEON@%$HAVE_ARM_NEON%g
15737 s%@LIBOBJS@%$LIBOBJS%g
15738 s%@HAVE_CLOCK_MONOTONIC@%$HAVE_CLOCK_MONOTONIC%g
15739 s%@REALTIME_LIBS@%$REALTIME_LIBS%g
15740 s%@HAVE_GCC3_ABI@%$HAVE_GCC3_ABI%g
15741 s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g
15742 s%@NSPR_LIBS@%$NSPR_LIBS%g
15743 s%@NSPR_CONFIG@%$NSPR_CONFIG%g
15744 s%@MOZ_UI_LOCALE@%$MOZ_UI_LOCALE%g
15745 s%@MOZ_THUMB2@%$MOZ_THUMB2%g
15746 s%@MOZ_ARM_ARCH@%$MOZ_ARM_ARCH%g
15747 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
15748 s%@MOZ_OPTIMIZE_FLAGS@%$MOZ_OPTIMIZE_FLAGS%g
15749 s%@MOZ_OPTIMIZE_LDFLAGS@%$MOZ_OPTIMIZE_LDFLAGS%g
15750 s%@MOZ_OPTIMIZE_SIZE_TWEAK@%$MOZ_OPTIMIZE_SIZE_TWEAK%g
15751 s%@NS_TRACE_MALLOC@%$NS_TRACE_MALLOC%g
15752 s%@MOZ_MEMORY@%$MOZ_MEMORY%g
15753 s%@MOZ_MEMORY_LDFLAGS@%$MOZ_MEMORY_LDFLAGS%g
15754 s%@CCACHE@%$CCACHE%g
15755 s%@DEHYDRA_PATH@%$DEHYDRA_PATH%g
15756 s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g
15757 s%@MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE@%$MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE%g
15758 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
15759 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
15760 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
15761 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
15762 s%@_MOZ_RTTI_FLAGS_ON@%$_MOZ_RTTI_FLAGS_ON%g
15763 s%@_MOZ_EXCEPTIONS_FLAGS_ON@%$_MOZ_EXCEPTIONS_FLAGS_ON%g
15764 s%@CL_INCLUDES_PREFIX@%$CL_INCLUDES_PREFIX%g
15765 s%@MOZ_AUTO_DEPS@%$MOZ_AUTO_DEPS%g
15766 s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g
15767 s%@MDDEPDIR@%$MDDEPDIR%g
15768 s%@CC_WRAPPER@%$CC_WRAPPER%g
15769 s%@CXX_WRAPPER@%$CXX_WRAPPER%g
15770 s%@JS_NATIVE_EDITLINE@%$JS_NATIVE_EDITLINE%g
15771 s%@JS_DISABLE_SHELL@%$JS_DISABLE_SHELL%g
15772 s%@EDITLINE_LIBS@%$EDITLINE_LIBS%g
15773 s%@JS_HAS_CTYPES@%$JS_HAS_CTYPES%g
15774 s%@MOZ_SYNC_BUILD_FILES@%$MOZ_SYNC_BUILD_FILES%g
15775 s%@AR_FLAGS@%$AR_FLAGS%g
15776 s%@AR_LIST@%$AR_LIST%g
15777 s%@AR_EXTRACT@%$AR_EXTRACT%g
15778 s%@AR_DELETE@%$AR_DELETE%g
15779 s%@ASFLAGS@%$ASFLAGS%g
15780 s%@AS_DASH_C_FLAG@%$AS_DASH_C_FLAG%g
15782 s%@RCFLAGS@%$RCFLAGS%g
15783 s%@IMPLIB@%$IMPLIB%g
15784 s%@FILTER@%$FILTER%g
15785 s%@BIN_FLAGS@%$BIN_FLAGS%g
15786 s%@NS_USE_NATIVE@%$NS_USE_NATIVE%g
15787 s%@MOZ_JS_LIBS@%$MOZ_JS_LIBS%g
15788 s%@MOZ_PSM@%$MOZ_PSM%g
15789 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
15790 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
15791 s%@MOZ_DEBUG_ENABLE_DEFS@%$MOZ_DEBUG_ENABLE_DEFS%g
15792 s%@MOZ_DEBUG_DISABLE_DEFS@%$MOZ_DEBUG_DISABLE_DEFS%g
15793 s%@MOZ_DEBUG_FLAGS@%$MOZ_DEBUG_FLAGS%g
15794 s%@MOZ_DEBUG_LDFLAGS@%$MOZ_DEBUG_LDFLAGS%g
15795 s%@WARNINGS_AS_ERRORS@%$WARNINGS_AS_ERRORS%g
15796 s%@MOZ_LEAKY@%$MOZ_LEAKY%g
15797 s%@MOZ_JPROF@%$MOZ_JPROF%g
15798 s%@MOZ_SHARK@%$MOZ_SHARK%g
15799 s%@MOZ_CALLGRIND@%$MOZ_CALLGRIND%g
15800 s%@MOZ_VTUNE@%$MOZ_VTUNE%g
15801 s%@MOZ_PROFILING@%$MOZ_PROFILING%g
15802 s%@MOZ_JSLOADER@%$MOZ_JSLOADER%g
15803 s%@MOZ_QUANTIFY@%$MOZ_QUANTIFY%g
15804 s%@LIBICONV@%$LIBICONV%g
15805 s%@BUILD_STATIC_LIBS@%$BUILD_STATIC_LIBS%g
15806 s%@ENABLE_TESTS@%$ENABLE_TESTS%g
15807 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
15808 s%@PKG_SKIP_STRIP@%$PKG_SKIP_STRIP%g
15809 s%@INCREMENTAL_LINKER@%$INCREMENTAL_LINKER%g
15810 s%@MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@%$MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS%g
15811 s%@MOZ_COMPONENT_NSPR_LIBS@%$MOZ_COMPONENT_NSPR_LIBS%g
15812 s%@MOZ_FIX_LINK_PATHS@%$MOZ_FIX_LINK_PATHS%g
15813 s%@USE_DEPENDENT_LIBS@%$USE_DEPENDENT_LIBS%g
15814 s%@MOZ_BUILD_ROOT@%$MOZ_BUILD_ROOT%g
15815 s%@MOZ_OS2_TOOLS@%$MOZ_OS2_TOOLS%g
15816 s%@MOZ_POST_DSO_LIB_COMMAND@%$MOZ_POST_DSO_LIB_COMMAND%g
15817 s%@MOZ_POST_PROGRAM_COMMAND@%$MOZ_POST_PROGRAM_COMMAND%g
15818 s%@MOZ_TIMELINE@%$MOZ_TIMELINE%g
15819 s%@MOZ_APP_NAME@%$MOZ_APP_NAME%g
15820 s%@MOZ_APP_DISPLAYNAME@%$MOZ_APP_DISPLAYNAME%g
15821 s%@MOZ_APP_UA_NAME@%$MOZ_APP_UA_NAME%g
15822 s%@MOZ_APP_VERSION@%$MOZ_APP_VERSION%g
15823 s%@MOZ_UA_FIREFOX_VERSION@%$MOZ_UA_FIREFOX_VERSION%g
15824 s%@FIREFOX_VERSION@%$FIREFOX_VERSION%g
15825 s%@MOZ_PKG_SPECIAL@%$MOZ_PKG_SPECIAL%g
15826 s%@MOZILLA_OFFICIAL@%$MOZILLA_OFFICIAL%g
15827 s%@MOZ_MAPINFO@%$MOZ_MAPINFO%g
15828 s%@MOZ_BROWSE_INFO@%$MOZ_BROWSE_INFO%g
15829 s%@MOZ_TOOLS_DIR@%$MOZ_TOOLS_DIR%g
15830 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
15831 s%@AS_PERL@%$AS_PERL%g
15832 s%@WIN32_REDIST_DIR@%$WIN32_REDIST_DIR%g
15834 s%@WINCE_SDK_DIR@%$WINCE_SDK_DIR%g
15835 s%@WINCE_WINDOWS_MOBILE@%$WINCE_WINDOWS_MOBILE%g
15836 s%@MOZ_NATIVE_NSPR@%$MOZ_NATIVE_NSPR%g
15837 s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g
15838 s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g
15839 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
15840 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
15841 s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g
15842 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
15843 s%@HOST_OPTIMIZE_FLAGS@%$HOST_OPTIMIZE_FLAGS%g
15844 s%@HOST_AR_FLAGS@%$HOST_AR_FLAGS%g
15845 s%@HOST_LD@%$HOST_LD%g
15846 s%@HOST_NSPR_MDCPUCFG@%$HOST_NSPR_MDCPUCFG%g
15847 s%@HOST_BIN_SUFFIX@%$HOST_BIN_SUFFIX%g
15848 s%@HOST_OS_ARCH@%$HOST_OS_ARCH%g
15849 s%@TARGET_CPU@%$TARGET_CPU%g
15850 s%@TARGET_VENDOR@%$TARGET_VENDOR%g
15851 s%@TARGET_OS@%$TARGET_OS%g
15852 s%@TARGET_NSPR_MDCPUCFG@%$TARGET_NSPR_MDCPUCFG%g
15853 s%@TARGET_MD_ARCH@%$TARGET_MD_ARCH%g
15854 s%@TARGET_XPCOM_ABI@%$TARGET_XPCOM_ABI%g
15855 s%@OS_TARGET@%$OS_TARGET%g
15856 s%@OS_ARCH@%$OS_ARCH%g
15857 s%@OS_RELEASE@%$OS_RELEASE%g
15858 s%@OS_TEST@%$OS_TEST%g
15859 s%@CPU_ARCH@%$CPU_ARCH%g
15860 s%@INTEL_ARCHITECTURE@%$INTEL_ARCHITECTURE%g
15861 s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
15862 s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
15863 s%@MKSHLIB@%$MKSHLIB%g
15864 s%@MKCSHLIB@%$MKCSHLIB%g
15865 s%@MKSHLIB_FORCE_ALL@%$MKSHLIB_FORCE_ALL%g
15866 s%@MKSHLIB_UNFORCE_ALL@%$MKSHLIB_UNFORCE_ALL%g
15867 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
15868 s%@DSO_PIC_CFLAGS@%$DSO_PIC_CFLAGS%g
15869 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
15870 s%@LIB_PREFIX@%$LIB_PREFIX%g
15871 s%@DLL_PREFIX@%$DLL_PREFIX%g
15872 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
15873 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
15874 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
15875 s%@BIN_SUFFIX@%$BIN_SUFFIX%g
15876 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
15877 s%@IMPORT_LIB_SUFFIX@%$IMPORT_LIB_SUFFIX%g
15878 s%@USE_N32@%$USE_N32%g
15879 s%@CC_VERSION@%$CC_VERSION%g
15880 s%@CXX_VERSION@%$CXX_VERSION%g
15881 s%@MSMANIFEST_TOOL@%$MSMANIFEST_TOOL%g
15882 s%@CYGDRIVE_MOUNT@%$CYGDRIVE_MOUNT%g
15883 s%@WIN_TOP_SRC@%$WIN_TOP_SRC%g
15884 s%@MOZILLA_VERSION@%$MOZILLA_VERSION%g
15885 s%@ac_configure_args@%$ac_configure_args%g
15886 s%@MOZ_DEFINES@%$MOZ_DEFINES%g
15891 cat >> $CONFIG_STATUS <<\EOF
15893 # Split the substitutions into bite-sized pieces for seds with
15894 # small command number limits, like on Digital OSF/1 and HP-UX.
15895 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15896 ac_file=1 # Number of current file.
15897 ac_beg=1 # First line for current file.
15898 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15901 while $ac_more_lines; do
15902 if test $ac_beg -gt 1; then
15903 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15905 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15907 if test ! -s conftest.s$ac_file; then
15908 ac_more_lines=false
15909 rm -f conftest.s$ac_file
15911 if test -z "$ac_sed_cmds"; then
15912 ac_sed_cmds="sed -f conftest.s$ac_file"
15914 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15916 ac_file=`expr $ac_file + 1`
15918 ac_end=`expr $ac_end + $ac_max_sed_cmds`
15921 if test -z "$ac_sed_cmds"; then
15926 cat >> $CONFIG_STATUS <<EOF
15928 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
15930 cat >> $CONFIG_STATUS <<\EOF
15931 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15932 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15934 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15935 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15936 *) ac_file_in="${ac_file}.in" ;;
15939 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15941 # Remove last slash and all that follows it. Not all systems have dirname.
15942 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15943 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15944 # The file is in a subdirectory.
15945 test ! -d "$ac_dir" && mkdir "$ac_dir"
15946 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15947 # A "../" for each directory in $ac_dir_suffix.
15948 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15950 ac_dir_suffix= ac_dots=
15953 case "$ac_given_srcdir" in
15955 if test -z "$ac_dots"; then top_srcdir=.
15956 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15957 /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15958 *) # Relative path.
15959 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15960 top_srcdir="$ac_dots$ac_given_srcdir" ;;
15963 case "$ac_given_INSTALL" in
15964 [/$]*) INSTALL="$ac_given_INSTALL" ;;
15965 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15968 echo creating "$ac_file"
15970 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15972 *Makefile*) ac_comsub="1i\\
15973 # $configure_input" ;;
15977 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
15979 s%@configure_input@%$configure_input%g
15980 s%@srcdir@%$srcdir%g
15981 s%@top_srcdir@%$top_srcdir%g
15982 s%@INSTALL@%$INSTALL%g
15983 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15990 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15991 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15993 # ac_d sets the value in "#define NAME VALUE" lines.
15994 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
15995 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
15998 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15999 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16000 ac_uB='\([ ]\)%\1#\2define\3'
16003 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16004 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16005 ac_eB='$%\1#\2define\3'
16009 if test "${CONFIG_HEADERS+set}" != set; then
16011 cat >> $CONFIG_STATUS <<EOF
16012 CONFIG_HEADERS="js-config.h"
16014 cat >> $CONFIG_STATUS <<\EOF
16016 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16017 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16019 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16020 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16021 *) ac_file_in="${ac_file}.in" ;;
16024 echo creating $ac_file
16026 rm -f conftest.frag conftest.in conftest.out
16027 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
16028 cat $ac_file_inputs > conftest.in
16032 # Transform confdefs.h into a sed script conftest.vals that substitutes
16033 # the proper values into config.h.in to produce config.h. And first:
16034 # Protect against being on the right side of a sed subst in config.status.
16035 # Protect against being in an unquoted here document in config.status.
16036 rm -f conftest.vals
16037 cat > conftest.hdr <<\EOF
16040 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16044 sed -n -f conftest.hdr confdefs.h > conftest.vals
16047 # This sed command replaces #undef with comments. This is necessary, for
16048 # example, in the case of _POSIX_SOURCE, which is predefined and required
16049 # on some systems where configure will not decide to define it.
16050 cat >> conftest.vals <<\EOF
16051 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16054 # Break up conftest.vals because some shells have a limit on
16055 # the size of here documents, and old seds have small limits too.
16057 rm -f conftest.tail
16060 ac_lines=`grep -c . conftest.vals`
16061 # grep -c gives empty output for an empty file on some AIX systems.
16062 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16063 # Write a limited-size here document to conftest.frag.
16064 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16065 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16067 sed -f conftest.frag conftest.in > conftest.out
16069 mv conftest.out conftest.in
16070 ' >> $CONFIG_STATUS
16071 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16072 rm -f conftest.vals
16073 mv conftest.tail conftest.vals
16075 rm -f conftest.vals
16077 cat >> $CONFIG_STATUS <<\EOF
16078 rm -f conftest.frag conftest.h
16079 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
16080 cat conftest.in >> conftest.h
16082 if cmp -s $ac_file conftest.h 2>/dev/null; then
16083 echo "$ac_file is unchanged"
16086 # Remove last slash and all that follows it. Not all systems have dirname.
16087 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16088 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16089 # The file is in a subdirectory.
16090 test ! -d "$ac_dir" && mkdir "$ac_dir"
16093 mv conftest.h $ac_file
16099 cat >> $CONFIG_STATUS <<EOF
16102 cat >> $CONFIG_STATUS <<\EOF
16106 chmod +x $CONFIG_STATUS
16107 rm -fr confdefs* $ac_clean_files
16108 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
16111 if cmp -s config/autoconf.mk config/autoconf.mk.orig; then
16112 echo "config/autoconf.mk is unchanged"
16113 mv -f config/autoconf.mk.orig config/autoconf.mk 2> /dev/null
16115 rm -f config/autoconf.mk.orig 2> /dev/null
16118 # Produce the js-config script at configure time; see the comments for
16119 # 'js-config' in Makefile.in.
16120 echo "$ac_t""invoking make to create js-config script" 1>&6
16123 # Build jsctypes if it's enabled.
16124 if test "$JS_HAS_CTYPES"; then
16125 # Run the libffi 'configure' script.
16126 ac_configure_args="--disable-shared --enable-static --disable-raw-api"
16127 if test "$MOZ_DEBUG"; then
16128 ac_configure_args="$ac_configure_args --enable-debug"
16130 if test "$DSO_PIC_CFLAGS"; then
16131 ac_configure_args="$ac_configure_args --with-pic"
16133 if test "$CROSS_COMPILE"; then
16136 ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\" CC=\"$CC\""
16139 CFLAGS="$ANDROID_CFLAGS"
16140 CPPFLAGS="$ANDROID_CPPFLAGS"
16141 LDFLAGS="$ANDROID_LDFLAGS"
16143 export AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS CFLAGS LDFLAGS
16145 ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\""
16148 ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
16152 if test "$_MSC_VER"; then
16153 # Use a wrapper script for cl and ml that looks more like gcc.
16154 # autotools can't quite handle an MSVC build environment yet.
16155 ac_configure_args="$ac_configure_args LD=link CPP=\"cl -nologo -EP\" SHELL=sh.exe"
16156 case "${target_cpu}" in
16158 # Need target since MSYS tools into mozilla-build may be 32bit
16159 ac_configure_args="$ac_configure_args CC=\"$_topsrcdir/ctypes/libffi/msvcc.sh -m64\" --build=$build --host=$target"
16162 ac_configure_args="$ac_configure_args CC=$_topsrcdir/ctypes/libffi/msvcc.sh"
16166 if test "$SOLARIS_SUNPRO_CC"; then
16167 # Always use gcc for libffi on Solaris
16168 if test ! "$HAVE_64BIT_OS"; then
16169 ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m32 LD= LDFLAGS="
16171 ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m64 LD= LDFLAGS="
16174 if test "$AIX_IBM_XLC"; then
16175 # Always use gcc for libffi on IBM AIX5/AIX6
16176 if test ! "$HAVE_64BIT_OS"; then
16177 ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix32"
16179 ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix64"
16182 if test "$OS_ARCH" = "OS2"; then
16183 ac_configure_args="$ac_configure_args CFLAGS=-Zomf AR=emxomfar"
16185 if test -n "$MOZ_THUMB2"; then
16186 ac_configure_args="$ac_configure_args --enable-thumb2"
16188 if test -n "$MOZ_ARM_ARCH"; then
16189 ac_configure_args="$ac_configure_args --with-cpu-arch=$MOZ_ARM_ARCH"
16192 # Use a separate cache file for libffi, since it does things differently
16193 # from our configure.
16194 mkdir -p $_objdir/ctypes/libffi
16195 old_cache_file=$cache_file
16196 cache_file=$_objdir/ctypes/libffi/config.cache
16197 old_config_files=$CONFIG_FILES
16201 if test "$no_recursion" != yes; then
16203 # Remove --cache-file and --srcdir arguments so they do not pile up.
16204 ac_sub_configure_args=
16206 for ac_arg in $ac_configure_args; do
16207 if test -n "$ac_prev"; then
16212 -cache-file | --cache-file | --cache-fil | --cache-fi \
16213 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16214 ac_prev=cache_file ;;
16215 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
16216 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
16218 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16220 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16222 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
16226 for ac_config_dir in ctypes/libffi; do
16228 # Do not complain, so a configure script can configure whichever
16229 # parts of a large source tree are present.
16230 if test ! -d $srcdir/$ac_config_dir; then
16234 echo configuring in $ac_config_dir
16239 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
16241 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
16249 # A "../" for each directory in /$ac_config_dir.
16250 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
16253 .) # No --srcdir option. We are building in place.
16254 ac_sub_srcdir=$srcdir ;;
16255 /* | ?:/*) # Absolute path.
16256 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
16257 *) # Relative path.
16258 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
16261 # Check for guested configure; otherwise get Cygnus style configure.
16262 if test -f $ac_sub_srcdir/configure; then
16263 ac_sub_configure=$ac_sub_srcdir/configure
16264 elif test -f $ac_sub_srcdir/configure.in; then
16265 ac_sub_configure=$ac_configure
16267 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
16271 # The recursion is here.
16272 if test -n "$ac_sub_configure"; then
16274 # Make the cache file name correct relative to the subdirectory.
16275 case "$cache_file" in
16276 /* | ?:/*) ac_sub_cache_file=$cache_file ;;
16277 *) # Relative path.
16278 ac_sub_cache_file="$ac_dots$cache_file" ;;
16280 case "$ac_given_INSTALL" in
16281 [/$]*) INSTALL="$ac_given_INSTALL" ;;
16282 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16285 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
16286 # The eval makes quoting arguments work.
16287 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
16290 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
16299 cache_file=$old_cache_file
16300 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
16301 CONFIG_FILES=$old_config_files