8a0543e1a9725fd1899abe355bb462db84ebbd2c
[platform/upstream/js.git] / js / src / configure
1 #! /bin/sh
2
3 if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then
4   msyshost=1
5 fi
6
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.
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13
14 # Defaults:
15 ac_help=
16 ac_default_prefix=/usr/local
17 # Any additions from configure.in:
18 ac_help="$ac_help
19   --with-dist-dir=DIR     Use DIR as 'dist' staging area.  DIR may be
20                           relative to the top of SpiderMonkey build tree,
21                           or absolute."
22 ac_help="$ac_help
23   --disable-compile-environment
24                           Disable compiler/library checks."
25 ac_help="$ac_help
26   --disable-shared-js
27                           Do not create a shared library."
28 ac_help="$ac_help
29   --with-android-ndk=DIR
30                           location where the Android NDK can be found"
31 ac_help="$ac_help
32   --with-android-toolchain=DIR
33                           location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0"
34 ac_help="$ac_help
35   --with-android-version=VER
36                           android platform version, default 5"
37 ac_help="$ac_help
38   --with-android-sdk=DIR
39                           location where the Android SDK can be found (base directory, e.g. .../android/platforms/android-6)"
40 ac_help="$ac_help
41   --with-symbian-sdk=SYMBIAN_SDK_DIR
42                           The path to the Symbian SDK"
43 ac_help="$ac_help
44   --with-windows-version=WINSDK_TARGETVER
45                           Highest Windows version to target using this SDK
46                               502: Windows Server 2003
47                               600: Windows Vista
48                               601: Windows 7"
49 ac_help="$ac_help
50   --enable-macos-target=VER (default=10.5)
51                           Set the minimum MacOS version needed at runtime"
52 ac_help="$ac_help
53   --with-macos-sdk=dir    Location of platform SDK to use (Mac OS X only)"
54 ac_help="$ac_help
55   --with-x                use the X Window System"
56 ac_help="$ac_help
57   --disable-os2-high-mem  Disable high-memory support on OS/2"
58 ac_help="$ac_help
59   --enable-profiling      Set compile flags necessary for using sampling profilers (e.g. shark, perf)"
60 ac_help="$ac_help
61   --disable-windows-mobile-components
62                           Disable Windows Mobile specific components from
63                           CE build"
64 ac_help="$ac_help
65   --disable-methodjit           Disable method JIT support"
66 ac_help="$ac_help
67   --disable-monoic      Disable use of MICs by JIT compiler"
68 ac_help="$ac_help
69   --disable-polyic      Disable use of PICs by JIT compiler"
70 ac_help="$ac_help
71   --disable-tracejit      Disable tracing JIT support"
72 ac_help="$ac_help
73   --enable-methodjit-spew      Enable method JIT spew support"
74 ac_help="$ac_help
75   --enable-dtrace         build with dtrace support if available (default=no)"
76 ac_help="$ac_help
77   --with-pthreads         Force use of system pthread library with NSPR "
78 ac_help="$ac_help
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
84                           --with-system-nspr.)"
85 ac_help="$ac_help
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."
93 ac_help="$ac_help
94   --with-nspr-libs=LIBS   Pass LIBS to LD when linking code that uses NSPR.
95                           See --with-nspr-cflags for more details."
96 ac_help="$ac_help
97   --with-nspr-prefix=PFX  Prefix where NSPR is installed"
98 ac_help="$ac_help
99   --with-nspr-exec-prefix=PFX
100                           Exec prefix where NSPR is installed"
101 ac_help="$ac_help
102   --with-arm-kuser         Use kuser helpers (Linux/ARM only -- requires kernel 2.6.13 or later)"
103 ac_help="$ac_help
104   --enable-ui-locale=ab-CD
105                           Select the user interface locale (default: en-US)"
106 ac_help="$ac_help
107   --disable-tests         Do not build test libraries & programs"
108 ac_help="$ac_help
109   --enable-thumb2         Enable Thumb2 instruction set (implies ARMv7)"
110 ac_help="$ac_help
111   --with-cpu-arch=arch      Use specific arm architecture CPU features, default armv7"
112 ac_help="$ac_help
113   --enable-debug[=DBG]    Enable building with developer debug info
114                            (using compiler flags DBG)"
115 ac_help="$ac_help
116   --with-debug-label=LABELS
117                           Define DEBUG_<value> for each comma-separated
118                           value given."
119 ac_help="$ac_help
120   --disable-optimize      Disable compiler optimization
121   --enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]"
122 ac_help="$ac_help
123   --enable-debugger-info-modules
124                           Enable/disable debugger info for specific modules"
125 ac_help="$ac_help
126   --enable-debug-symbols[=DBG]
127                           Enable debugging symbols (using compiler flags DBG)"
128 ac_help="$ac_help
129   --disable-warnings-as-errors
130                           Disable treating of warnings as errors"
131 ac_help="$ac_help
132   --enable-trace-malloc   Enable malloc tracing"
133 ac_help="$ac_help
134   --enable-jemalloc       Replace memory allocator with jemalloc"
135 ac_help="$ac_help
136   --enable-wrap-malloc    Wrap malloc calls (gnu linker only)"
137 ac_help="$ac_help
138   --with-wrap-malloc=DIR  Location of malloc wrapper library"
139 ac_help="$ac_help
140   --enable-trace-jscalls  Enable JS call enter/exit callback (default=no)"
141 ac_help="$ac_help
142   --enable-tracevis       Enable TraceVis tracing tool (default=no)"
143 ac_help="$ac_help
144   --enable-gctimer        Enable GC timer (default=no)"
145 ac_help="$ac_help
146   --enable-valgrind       Enable Valgrind integration hooks (default=no)"
147 ac_help="$ac_help
148   --enable-jprof          Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling."
149 ac_help="$ac_help
150   --enable-shark          Enable shark remote profiling. Implies --enable-profiling."
151 ac_help="$ac_help
152   --enable-callgrind      Enable callgrind profiling"
153 ac_help="$ac_help
154   --enable-vtune          Enable vtune profiling. Implies --enable-profiling."
155 ac_help="$ac_help
156   --enable-gczeal         Enable zealous GCing"
157 ac_help="$ac_help
158   --with-ccache[=path/to/ccache]
159                           Enable compiling with ccache"
160 ac_help="$ac_help
161   --with-static-checking=path/to/gcc_dehydra.so
162                           Enable static checking of code using GCC-dehydra"
163 ac_help="$ac_help
164   --enable-strip          Enable stripping of libs & executables "
165 ac_help="$ac_help
166   --enable-install-strip  Enable stripping of libs & executables when packaging "
167 ac_help="$ac_help
168   --enable-timeline       Enable timeline services "
169 ac_help="$ac_help
170   --enable-quantify       Enable Quantify support (Windows only) "
171 ac_help="$ac_help
172   --enable-xterm-updates  Update XTERM titles with current command."
173 ac_help="$ac_help
174   --disable-profile-guided-optimization
175                           Don't build with PGO even if called via make profiledbuild"
176 ac_help="$ac_help
177   --disable-pedantic      Issue all warnings demanded by strict ANSI C "
178 ac_help="$ac_help
179   --enable-cpp-rtti       Enable C++ RTTI "
180 ac_help="$ac_help
181   --enable-cpp-exceptions Enable C++ exceptions "
182 ac_help="$ac_help
183   --disable-auto-deps     Do not automatically generate dependency info"
184 ac_help="$ac_help
185   --disable-md            Do not use compiler-based dependencies "
186 ac_help="$ac_help
187   --enable-static         Enable building of internal static libs"
188 ac_help="$ac_help
189   --enable-readline       Link js shell to system readline library"
190 ac_help="$ac_help
191   --enable-ctypes         Enable js-ctypes (default=no)"
192 ac_help="$ac_help
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."
198 ac_help="$ac_help
199   --enable-threadsafe     Enable support for multiple threads."
200
201 # Initialize some variables set by options.
202 # The variables have the same names as the options, with
203 # dashes changed to underlines.
204 build=NONE
205 cache_file=./config.cache
206 exec_prefix=NONE
207 host=NONE
208 no_create=
209 nonopt=NONE
210 no_recursion=
211 prefix=NONE
212 program_prefix=NONE
213 program_suffix=NONE
214 program_transform_name=s,x,x,
215 silent=
216 site=
217 srcdir=
218 target=NONE
219 verbose=
220 x_includes=NONE
221 x_libraries=NONE
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'
234
235 # Initialize some other variables.
236 subdirs=
237 MFLAGS= MAKEFLAGS=
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 # Maximum number of lines to put in a shell here document.
240 ac_max_here_lines=12
241
242 ac_prev=
243 for ac_option
244 do
245
246   # If the previous option needs an argument, assign it.
247   if test -n "$ac_prev"; then
248     eval "$ac_prev=\$ac_option"
249     ac_prev=
250     continue
251   fi
252
253   case "$ac_option" in
254   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
255   *) ac_optarg= ;;
256   esac
257
258   # Accept the important Cygnus configure options, so we can diagnose typos.
259
260   case "$ac_option" in
261
262   -bindir | --bindir | --bindi | --bind | --bin | --bi)
263     ac_prev=bindir ;;
264   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
265     bindir="$ac_optarg" ;;
266
267   -build | --build | --buil | --bui | --bu)
268     ac_prev=build ;;
269   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
270     build="$ac_optarg" ;;
271
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" ;;
278
279   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
280     ac_prev=datadir ;;
281   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
282   | --da=*)
283     datadir="$ac_optarg" ;;
284
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; }
290     fi
291     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
292     eval "enable_${ac_feature}=no" ;;
293
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; }
299     fi
300     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
301     case "$ac_option" in
302       *=*) ;;
303       *) ac_optarg=yes ;;
304     esac
305     eval "enable_${ac_feature}='$ac_optarg'" ;;
306
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" ;;
315
316   -gas | --gas | --ga | --g)
317     # Obsolete; use --with-gas.
318     with_gas=yes ;;
319
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.
323     cat << EOF
324 Usage: configure [options] [host]
325 Options: [defaults in brackets after descriptions]
326 Configuration:
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
334                           [$ac_default_prefix]
335   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
336                           [same as prefix]
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
341                           [PREFIX/share]
342   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
343   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
344                           [PREFIX/com]
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
356 EOF
357     cat << EOF
358 Host type:
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
369 EOF
370     if test -n "$ac_help"; then
371       echo "--enable and --with options recognized:$ac_help"
372     fi
373     exit 0 ;;
374
375   -host | --host | --hos | --ho)
376     ac_prev=host ;;
377   -host=* | --host=* | --hos=* | --ho=*)
378     host="$ac_optarg" ;;
379
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" ;;
386
387   -infodir | --infodir | --infodi | --infod | --info | --inf)
388     ac_prev=infodir ;;
389   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
390     infodir="$ac_optarg" ;;
391
392   -libdir | --libdir | --libdi | --libd)
393     ac_prev=libdir ;;
394   -libdir=* | --libdir=* | --libdi=* | --libd=*)
395     libdir="$ac_optarg" ;;
396
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" ;;
403
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" ;;
412
413   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
414     ac_prev=mandir ;;
415   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
416     mandir="$ac_optarg" ;;
417
418   -nfp | --nfp | --nf)
419     # Obsolete; use --without-fp.
420     with_fp=no ;;
421
422   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
423   | --no-cr | --no-c)
424     no_create=yes ;;
425
426   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
427   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
428     no_recursion=yes ;;
429
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" ;;
438
439   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
440     ac_prev=prefix ;;
441   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
442     prefix="$ac_optarg" ;;
443
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" ;;
450
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" ;;
457
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" ;;
474
475   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
476   | -silent | --silent | --silen | --sile | --sil)
477     silent=yes ;;
478
479   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
480     ac_prev=sbindir ;;
481   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
482   | --sbi=* | --sb=*)
483     sbindir="$ac_optarg" ;;
484
485   -sharedstatedir | --sharedstatedir | --sharedstatedi \
486   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
487   | --sharedst | --shareds | --shared | --share | --shar \
488   | --sha | --sh)
489     ac_prev=sharedstatedir ;;
490   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
491   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
492   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
493   | --sha=* | --sh=*)
494     sharedstatedir="$ac_optarg" ;;
495
496   -site | --site | --sit)
497     ac_prev=site ;;
498   -site=* | --site=* | --sit=*)
499     site="$ac_optarg" ;;
500
501   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
502     ac_prev=srcdir ;;
503   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
504     srcdir="$ac_optarg" ;;
505
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" ;;
512
513   -target | --target | --targe | --targ | --tar | --ta | --t)
514     ac_prev=target ;;
515   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
516     target="$ac_optarg" ;;
517
518   -v | -verbose | --verbose | --verbos | --verbo | --verb)
519     verbose=yes ;;
520
521   -version | --version | --versio | --versi | --vers)
522     echo "configure generated by autoconf version 2.13"
523     exit 0 ;;
524
525   -with-* | --with-*)
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; }
530     fi
531     ac_package=`echo $ac_package| sed 's/-/_/g'`
532     case "$ac_option" in
533       *=*) ;;
534       *) ac_optarg=yes ;;
535     esac
536     eval "with_${ac_package}='$ac_optarg'" ;;
537
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; }
543     fi
544     ac_package=`echo $ac_package| sed 's/-/_/g'`
545     eval "with_${ac_package}=no" ;;
546
547   --x)
548     # Obsolete; use --with-x.
549     with_x=yes ;;
550
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" ;;
557
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" ;;
564
565   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
566     ;;
567
568   *)
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
571     fi
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; }
574     fi
575     nonopt="$ac_option"
576     ;;
577
578   esac
579 done
580
581 if test -n "$ac_prev"; then
582   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
583 fi
584
585 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
586
587 # File descriptor usage:
588 # 0 standard input
589 # 1 file creation
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
596   exec 6>/dev/null
597 else
598   exec 6>&1
599 fi
600 exec 5>./config.log
601
602 echo "\
603 This file contains any messages produced by compilers while
604 running configure, to aid debugging if configure makes a mistake.
605 " 1>&5
606
607 # Strip out --no-create and --no-recursion so they do not pile up.
608 # Also quote any args containing shell metacharacters.
609 ac_configure_args=
610 for ac_arg
611 do
612   case "$ac_arg" in
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" ;;
620   esac
621 done
622
623 # NLS nuisances.
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
632
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.
636 echo > confdefs.h
637
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
641
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.
646   ac_prog=$0
647   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
648   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
649   srcdir=$ac_confdir
650   if test ! -r $srcdir/$ac_unique_file; then
651     srcdir=..
652   fi
653 else
654   ac_srcdir_defaulted=no
655 fi
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; }
659   else
660     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
661   fi
662 fi
663 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
664
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"
669   else
670     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
671   fi
672 fi
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"
676     . "$ac_site_file"
677   fi
678 done
679
680 if test -r "$cache_file"; then
681   echo "loading cache $cache_file"
682   . $cache_file
683 else
684   echo "creating cache $cache_file"
685   > $cache_file
686 fi
687
688 ac_ext=c
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
694
695 ac_exeext=
696 ac_objext=o
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
700     ac_n= ac_c='
701 ' ac_t='        '
702   else
703     ac_n=-n ac_c= ac_t=
704   fi
705 else
706   ac_n= ac_c='\c' ac_t=
707 fi
708
709
710 ac_aux_dir=
711 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
712   if test -f $ac_dir/install-sh; then
713     ac_aux_dir=$ac_dir
714     ac_install_sh="$ac_aux_dir/install-sh -c"
715     break
716   elif test -f $ac_dir/install.sh; then
717     ac_aux_dir=$ac_dir
718     ac_install_sh="$ac_aux_dir/install.sh -c"
719     break
720   fi
721 done
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; }
724 fi
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.
728
729
730
731 # Do some error checking and defaulting for the host and target type.
732 # The inputs are:
733 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
734 #
735 # The rules are:
736 # 1. You are not allowed to specify --host, --target, and nonopt at the
737 #    same time.
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.
743
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; } ;;
749 esac
750
751
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; }
755 fi
756
757 echo $ac_n "checking host system type""... $ac_c" 1>&6
758 echo "configure:759: checking host system type" >&5
759
760 host_alias=$host
761 case "$host_alias" in
762 NONE)
763   case $nonopt in
764   NONE)
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; }
767     fi ;;
768   *) host_alias=$nonopt ;;
769   esac ;;
770 esac
771
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
777
778 echo $ac_n "checking target system type""... $ac_c" 1>&6
779 echo "configure:780: checking target system type" >&5
780
781 target_alias=$target
782 case "$target_alias" in
783 NONE)
784   case $nonopt in
785   NONE) target_alias=$host_alias ;;
786   *) target_alias=$nonopt ;;
787   esac ;;
788 esac
789
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
795
796 echo $ac_n "checking build system type""... $ac_c" 1>&6
797 echo "configure:798: checking build system type" >&5
798
799 build_alias=$build
800 case "$build_alias" in
801 NONE)
802   case $nonopt in
803   NONE) build_alias=$host_alias ;;
804   *) build_alias=$nonopt ;;
805   esac ;;
806 esac
807
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
813
814 test "$host_alias" != "$target_alias" &&
815   test "$program_prefix$program_suffix$program_transform_name" = \
816     NONENONEs,x,x, &&
817   program_prefix=${target_alias}-
818
819 TARGET_CPU="${target_cpu}"
820 TARGET_VENDOR="${target_vendor}"
821 TARGET_OS="${target_os}"
822
823 CFLAGS="${CFLAGS=}"
824 CPPFLAGS="${CPPFLAGS=}"
825 CXXFLAGS="${CXXFLAGS=}"
826 LDFLAGS="${LDFLAGS=}"
827 HOST_CFLAGS="${HOST_CFLAGS=}"
828 HOST_CXXFLAGS="${HOST_CXXFLAGS=}"
829 HOST_LDFLAGS="${HOST_LDFLAGS=}"
830
831 _SUBDIR_CC="$CC"
832 _SUBDIR_CXX="$CXX"
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"
842
843 NSPR_VERSION=4
844
845 PERL_VERSION=5.006
846 PYTHON_VERSION=2.5
847 WINDRES_VERSION=2.14.90
848 W32API_VERSION=3.8
849
850 MSMANIFEST_TOOL=
851
852 MISSING_X=
853 for ac_prog in mawk gawk nawk awk
854 do
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
861 else
862   if test -n "$AWK"; then
863   ac_cv_prog_AWK="$AWK" # Let the user override the test.
864 else
865   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
866   ac_dummy="$PATH"
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"
871       break
872     fi
873   done
874   IFS="$ac_save_ifs"
875 fi
876 fi
877 AWK="$ac_cv_prog_AWK"
878 if test -n "$AWK"; then
879   echo "$ac_t""$AWK" 1>&6
880 else
881   echo "$ac_t""no" 1>&6
882 fi
883
884 test -n "$AWK" && break
885 done
886
887
888 USE_PTHREADS=
889 _PTHREAD_LDFLAGS=""
890
891 _topsrcdir=`cd \`dirname $0\`; pwd`
892 _objdir=`pwd`
893
894 if test "$_topsrcdir" != "$_objdir"
895 then
896   # Check for a couple representative files in the source tree
897   _conflict_files=
898   for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
899     if test -f $file; then
900       _conflict_files="$_conflict_files $file"
901     fi
902   done
903   if test "$_conflict_files"; then
904     echo "***"
905     echo "*   Your source tree contains these files:"
906     for file in $_conflict_files; do
907       echo "*         $file"
908     done
909     cat 1>&2 <<-EOF
910         *   This indicates that you previously built in the source tree.
911         *   A source tree build can confuse the separate objdir build.
912         *
913         *   To clean up the source tree:
914         *     1. cd $_topsrcdir
915         *     2. gmake distclean
916         ***
917         EOF
918     exit 1
919     break
920   fi
921 fi
922 MOZ_BUILD_ROOT=`pwd`
923
924
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"
928   TOP_DIST=$withval
929 else
930   TOP_DIST=dist
931 fi
932
933
934
935 if test -z "$CROSS_COMPILE"; then
936 case "$target" in
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
945         i*86)
946             AS=ml;
947             ;;
948         x86_64)
949             AS=ml64;
950             ;;
951         esac
952     fi
953     if test -z "$MIDL"; then MIDL=midl; fi
954     ;;
955 *-darwin*)
956     if test -z "$CC"; then CC=gcc-4.2; fi
957     if test -z "$CXX"; then CXX=g++-4.2; fi
958     ;;
959 esac
960 fi
961
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
967     COMPILE_ENVIRONMENT= 
968   elif test "$enableval" = "yes"; then
969     :
970   else
971     { echo "configure: error: Option, compile-environment, does not take an argument ($enableval)." 1>&2; exit 1; }
972   fi
973 fi
974
975
976
977   for ac_prog in $PERL perl5 perl 
978 do
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
985 else
986   case "$PERL" in
987   /*)
988   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
989   ;;
990   ?:/*)                  
991   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
992   ;;
993   *)
994   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
995   ac_dummy="$PATH"
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"
1000       break
1001     fi
1002   done
1003   IFS="$ac_save_ifs"
1004   ;;
1005 esac
1006 fi
1007 PERL="$ac_cv_path_PERL"
1008 if test -n "$PERL"; then
1009   echo "$ac_t""$PERL" 1>&6
1010 else
1011   echo "$ac_t""no" 1>&6
1012 fi
1013
1014 test -n "$PERL" && break
1015 done
1016
1017   if test "$msyshost"; then
1018     case "$PERL" in
1019     /*)
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
1025         PERL="$PERL.exe"
1026       fi
1027     esac
1028   fi
1029
1030 if test -z "$PERL" -o "$PERL" = ":"; then
1031     { echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
1032 fi
1033
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
1038     DISABLE_SHARED_JS=0
1039   elif test "$enableval" = "no"; then
1040     DISABLE_SHARED_JS=1
1041   else
1042     { echo "configure: error: Option, shared-js, does not take an argument ($enableval)." 1>&2; exit 1; }
1043   fi
1044 fi
1045
1046
1047 if test "$DISABLE_SHARED_JS" = "1" ; then
1048   cat >> confdefs.h <<\EOF
1049 #define STATIC_EXPORTABLE_JS_API 1
1050 EOF
1051
1052 else
1053   JS_SHARED_LIBRARY=1
1054 fi
1055
1056
1057
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
1062 fi
1063
1064
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
1069 fi
1070
1071
1072
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
1077 else
1078   android_version=5
1079 fi
1080
1081
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
1086 fi
1087
1088
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; }
1092     fi
1093
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; }
1096     fi
1097
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
1101     fi
1102
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
1105     fi
1106
1107     if test -z "$android_platform" ; then
1108        android_platform="$android_ndk"/build/platforms/android-"$android_version"/arch-"$target_cpu"
1109     fi
1110
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
1119
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"
1123
1124                     LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -llog -Wl,--allow-shlib-undefined $LDFLAGS"
1125
1126         if test -z "$HOST_CPPFLAGS" ; then
1127         HOST_CPPFLAGS=" "
1128     fi
1129     if test -z "$HOST_CFLAGS" ; then
1130         HOST_CFLAGS=" "
1131     fi
1132     if test -z "$HOST_CXXFLAGS" ; then
1133         HOST_CXXFLAGS=" "
1134     fi
1135     if test -z "$HOST_LDFLAGS" ; then
1136         HOST_LDFLAGS=" "
1137     fi
1138
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}"
1145
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"
1151
1152     cat >> confdefs.h <<\EOF
1153 #define ANDROID 1
1154 EOF
1155
1156     cat >> confdefs.h <<EOF
1157 #define ANDROID_VERSION $android_version
1158 EOF
1159
1160     
1161     CROSS_COMPILE=1
1162     MOZ_CHROME_FILE_FORMAT=omni
1163 fi
1164
1165
1166
1167
1168
1169
1170
1171
1172 AR_FLAGS='cr $@'
1173
1174 if test "$COMPILE_ENVIRONMENT"; then
1175
1176 # Note:
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
1182 #       is built.
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"
1187
1188     _SAVE_CC="$CC"
1189     _SAVE_CFLAGS="$CFLAGS"
1190     _SAVE_LDFLAGS="$LDFLAGS"
1191
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
1195 do
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
1202 else
1203   if test -n "$HOST_CC"; then
1204   ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1205 else
1206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1207   ac_dummy="$PATH"
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"
1212       break
1213     fi
1214   done
1215   IFS="$ac_save_ifs"
1216 fi
1217 fi
1218 HOST_CC="$ac_cv_prog_HOST_CC"
1219 if test -n "$HOST_CC"; then
1220   echo "$ac_t""$HOST_CC" 1>&6
1221 else
1222   echo "$ac_t""no" 1>&6
1223 fi
1224
1225 test -n "$HOST_CC" && break
1226 done
1227 test -n "$HOST_CC" || HOST_CC=""""
1228
1229     if test -z "$HOST_CC"; then
1230         { echo "configure: error: no acceptable c compiler found in \$PATH" 1>&2; exit 1; }
1231     fi
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
1236 do
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
1243 else
1244   if test -n "$HOST_CXX"; then
1245   ac_cv_prog_HOST_CXX="$HOST_CXX" # Let the user override the test.
1246 else
1247   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1248   ac_dummy="$PATH"
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"
1253       break
1254     fi
1255   done
1256   IFS="$ac_save_ifs"
1257 fi
1258 fi
1259 HOST_CXX="$ac_cv_prog_HOST_CXX"
1260 if test -n "$HOST_CXX"; then
1261   echo "$ac_t""$HOST_CXX" 1>&6
1262 else
1263   echo "$ac_t""no" 1>&6
1264 fi
1265
1266 test -n "$HOST_CXX" && break
1267 done
1268 test -n "$HOST_CXX" || HOST_CXX=""""
1269
1270     if test -z "$HOST_CXX"; then
1271         { echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&2; exit 1; }
1272     fi
1273     echo "$ac_t""$HOST_CXX" 1>&6
1274
1275     if test -z "$HOST_CFLAGS"; then
1276         HOST_CFLAGS="$CFLAGS"
1277     fi
1278     if test -z "$HOST_CXXFLAGS"; then
1279         HOST_CXXFLAGS="$CXXFLAGS"
1280     fi
1281     if test -z "$HOST_LDFLAGS"; then
1282         HOST_LDFLAGS="$LDFLAGS"
1283     fi
1284     if test -z "$HOST_AR_FLAGS"; then
1285         HOST_AR_FLAGS="$AR_FLAGS"
1286     fi
1287     for ac_prog in $HOST_RANLIB ranlib
1288 do
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
1295 else
1296   if test -n "$HOST_RANLIB"; then
1297   ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test.
1298 else
1299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1300   ac_dummy=":"
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"
1305       break
1306     fi
1307   done
1308   IFS="$ac_save_ifs"
1309 fi
1310 fi
1311 HOST_RANLIB="$ac_cv_prog_HOST_RANLIB"
1312 if test -n "$HOST_RANLIB"; then
1313   echo "$ac_t""$HOST_RANLIB" 1>&6
1314 else
1315   echo "$ac_t""no" 1>&6
1316 fi
1317
1318 test -n "$HOST_RANLIB" && break
1319 done
1320 test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib"
1321
1322     for ac_prog in $HOST_AR ar
1323 do
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
1330 else
1331   if test -n "$HOST_AR"; then
1332   ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test.
1333 else
1334   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1335   ac_dummy=":"
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"
1340       break
1341     fi
1342   done
1343   IFS="$ac_save_ifs"
1344 fi
1345 fi
1346 HOST_AR="$ac_cv_prog_HOST_AR"
1347 if test -n "$HOST_AR"; then
1348   echo "$ac_t""$HOST_AR" 1>&6
1349 else
1350   echo "$ac_t""no" 1>&6
1351 fi
1352
1353 test -n "$HOST_AR" && break
1354 done
1355 test -n "$HOST_AR" || HOST_AR="ar"
1356
1357     CC="$HOST_CC"
1358     CFLAGS="$HOST_CFLAGS"
1359     LDFLAGS="$HOST_LDFLAGS"
1360
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"
1366
1367 int main() {
1368 return(0);
1369 ; return 0; }
1370 EOF
1371 if { (eval echo configure:1372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1372   rm -rf conftest*
1373   ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6
1374 else
1375   echo "configure: failed program was:" >&5
1376   cat conftest.$ac_ext >&5
1377   rm -rf conftest*
1378   { echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&2; exit 1; } 
1379 fi
1380 rm -f conftest*
1381
1382     CC="$HOST_CXX"
1383     CFLAGS="$HOST_CXXFLAGS"
1384
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"
1390
1391 int main() {
1392 return(0);
1393 ; return 0; }
1394 EOF
1395 if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1396   rm -rf conftest*
1397   ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6
1398 else
1399   echo "configure: failed program was:" >&5
1400   cat conftest.$ac_ext >&5
1401   rm -rf conftest*
1402   { echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&2; exit 1; } 
1403 fi
1404 rm -f conftest*
1405     
1406     CC=$_SAVE_CC
1407     CFLAGS=$_SAVE_CFLAGS
1408     LDFLAGS=$_SAVE_LDFLAGS
1409
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"
1416         ;;
1417     esac
1418
1419     case "$target" in
1420     *symbian*)
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
1425 fi
1426
1427
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"
1431
1432         case "$target" in
1433         *-symbianelf)
1434             OS_TARGET=GCCE
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}"
1446             ;;
1447         *-symbianwinscw)
1448                         OS_TARGET=WINSCW
1449             ;;
1450         esac
1451         ;;
1452     esac
1453
1454     for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1455 do
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
1462 else
1463   if test -n "$CC"; then
1464   ac_cv_prog_CC="$CC" # Let the user override the test.
1465 else
1466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1467   ac_dummy="$PATH"
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"
1472       break
1473     fi
1474   done
1475   IFS="$ac_save_ifs"
1476 fi
1477 fi
1478 CC="$ac_cv_prog_CC"
1479 if test -n "$CC"; then
1480   echo "$ac_t""$CC" 1>&6
1481 else
1482   echo "$ac_t""no" 1>&6
1483 fi
1484
1485 test -n "$CC" && break
1486 done
1487 test -n "$CC" || CC=":"
1488
1489     unset ac_cv_prog_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
1496 else
1497   if test -n "$CC"; then
1498   ac_cv_prog_CC="$CC" # Let the user override the test.
1499 else
1500   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1501   ac_dummy="$PATH"
1502   for ac_dir in $ac_dummy; do
1503     test -z "$ac_dir" && ac_dir=.
1504     if test -f $ac_dir/$ac_word; then
1505       ac_cv_prog_CC="gcc"
1506       break
1507     fi
1508   done
1509   IFS="$ac_save_ifs"
1510 fi
1511 fi
1512 CC="$ac_cv_prog_CC"
1513 if test -n "$CC"; then
1514   echo "$ac_t""$CC" 1>&6
1515 else
1516   echo "$ac_t""no" 1>&6
1517 fi
1518
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
1526 else
1527   if test -n "$CC"; then
1528   ac_cv_prog_CC="$CC" # Let the user override the test.
1529 else
1530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1531   ac_prog_rejected=no
1532   ac_dummy="$PATH"
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
1538         continue
1539       fi
1540       ac_cv_prog_CC="cc"
1541       break
1542     fi
1543   done
1544   IFS="$ac_save_ifs"
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
1548   shift
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.
1553     shift
1554     set dummy "$ac_dir/$ac_word" "$@"
1555     shift
1556     ac_cv_prog_CC="$@"
1557   fi
1558 fi
1559 fi
1560 fi
1561 CC="$ac_cv_prog_CC"
1562 if test -n "$CC"; then
1563   echo "$ac_t""$CC" 1>&6
1564 else
1565   echo "$ac_t""no" 1>&6
1566 fi
1567
1568   if test -z "$CC"; then
1569     case "`uname -s`" in
1570     *win32* | *WIN32*)
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
1577 else
1578   if test -n "$CC"; then
1579   ac_cv_prog_CC="$CC" # Let the user override the test.
1580 else
1581   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1582   ac_dummy="$PATH"
1583   for ac_dir in $ac_dummy; do
1584     test -z "$ac_dir" && ac_dir=.
1585     if test -f $ac_dir/$ac_word; then
1586       ac_cv_prog_CC="cl"
1587       break
1588     fi
1589   done
1590   IFS="$ac_save_ifs"
1591 fi
1592 fi
1593 CC="$ac_cv_prog_CC"
1594 if test -n "$CC"; then
1595   echo "$ac_t""$CC" 1>&6
1596 else
1597   echo "$ac_t""no" 1>&6
1598 fi
1599  ;;
1600     esac
1601   fi
1602   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1603 fi
1604
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
1607
1608 ac_ext=c
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
1614
1615 cat > conftest.$ac_ext << EOF
1616
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619
1620 main(){return(0);}
1621 EOF
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
1627   else
1628     ac_cv_prog_cc_cross=yes
1629   fi
1630 else
1631   echo "configure: failed program was:" >&5
1632   cat conftest.$ac_ext >&5
1633   ac_cv_prog_cc_works=no
1634 fi
1635 rm -fr conftest*
1636 ac_ext=c
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
1642
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; }
1646 fi
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
1651
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
1656 else
1657   cat > conftest.c <<EOF
1658 #ifdef __GNUC__
1659   yes;
1660 #endif
1661 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
1663   ac_cv_prog_gcc=yes
1664 else
1665   ac_cv_prog_gcc=no
1666 fi
1667 fi
1668
1669 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1670
1671 if test $ac_cv_prog_gcc = yes; then
1672   GCC=yes
1673 else
1674   GCC=
1675 fi
1676
1677 ac_test_CFLAGS="${CFLAGS+set}"
1678 ac_save_CFLAGS="$CFLAGS"
1679 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
1684 else
1685   echo 'void f(){}' > conftest.c
1686 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1687   ac_cv_prog_cc_g=yes
1688 else
1689   ac_cv_prog_cc_g=no
1690 fi
1691 rm -f conftest*
1692
1693 fi
1694
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
1700     CFLAGS="-g -O2"
1701   else
1702     CFLAGS="-g"
1703   fi
1704 else
1705   if test "$GCC" = yes; then
1706     CFLAGS="-O2"
1707   else
1708     CFLAGS=
1709   fi
1710 fi
1711
1712     for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1713 do
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
1720 else
1721   if test -n "$CXX"; then
1722   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1723 else
1724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1725   ac_dummy="$PATH"
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"
1730       break
1731     fi
1732   done
1733   IFS="$ac_save_ifs"
1734 fi
1735 fi
1736 CXX="$ac_cv_prog_CXX"
1737 if test -n "$CXX"; then
1738   echo "$ac_t""$CXX" 1>&6
1739 else
1740   echo "$ac_t""no" 1>&6
1741 fi
1742
1743 test -n "$CXX" && break
1744 done
1745 test -n "$CXX" || CXX=":"
1746
1747     unset ac_cv_prog_CXX
1748     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1749 do
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
1756 else
1757   if test -n "$CXX"; then
1758   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1759 else
1760   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1761   ac_dummy="$PATH"
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"
1766       break
1767     fi
1768   done
1769   IFS="$ac_save_ifs"
1770 fi
1771 fi
1772 CXX="$ac_cv_prog_CXX"
1773 if test -n "$CXX"; then
1774   echo "$ac_t""$CXX" 1>&6
1775 else
1776   echo "$ac_t""no" 1>&6
1777 fi
1778
1779 test -n "$CXX" && break
1780 done
1781 test -n "$CXX" || CXX="gcc"
1782
1783
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
1786
1787 ac_ext=C
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
1793
1794 cat > conftest.$ac_ext << EOF
1795
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798
1799 int main(){return(0);}
1800 EOF
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
1806   else
1807     ac_cv_prog_cxx_cross=yes
1808   fi
1809 else
1810   echo "configure: failed program was:" >&5
1811   cat conftest.$ac_ext >&5
1812   ac_cv_prog_cxx_works=no
1813 fi
1814 rm -fr conftest*
1815 ac_ext=c
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
1821
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; }
1825 fi
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
1830
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
1835 else
1836   cat > conftest.C <<EOF
1837 #ifdef __GNUC__
1838   yes;
1839 #endif
1840 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
1842   ac_cv_prog_gxx=yes
1843 else
1844   ac_cv_prog_gxx=no
1845 fi
1846 fi
1847
1848 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1849
1850 if test $ac_cv_prog_gxx = yes; then
1851   GXX=yes
1852 else
1853   GXX=
1854 fi
1855
1856 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1857 ac_save_CXXFLAGS="$CXXFLAGS"
1858 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
1863 else
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
1867 else
1868   ac_cv_prog_cxx_g=no
1869 fi
1870 rm -f conftest*
1871
1872 fi
1873
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
1879     CXXFLAGS="-g -O2"
1880   else
1881     CXXFLAGS="-g"
1882   fi
1883 else
1884   if test "$GXX" = yes; then
1885     CXXFLAGS="-O2"
1886   else
1887     CXXFLAGS=
1888   fi
1889 fi
1890
1891
1892     case "$build:$target" in
1893       powerpc-apple-darwin8*:i?86-apple-darwin*)
1894                                 CFLAGS=$_SAVE_CFLAGS
1895         CXXFLAGS=$_SAVE_CXXFLAGS
1896         ;;
1897     esac
1898
1899     for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1900 do
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
1907 else
1908   if test -n "$RANLIB"; then
1909   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1910 else
1911   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1912   ac_dummy="$PATH"
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"
1917       break
1918     fi
1919   done
1920   IFS="$ac_save_ifs"
1921 fi
1922 fi
1923 RANLIB="$ac_cv_prog_RANLIB"
1924 if test -n "$RANLIB"; then
1925   echo "$ac_t""$RANLIB" 1>&6
1926 else
1927   echo "$ac_t""no" 1>&6
1928 fi
1929
1930 test -n "$RANLIB" && break
1931 done
1932 test -n "$RANLIB" || RANLIB=":"
1933
1934     for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1935 do
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
1942 else
1943   if test -n "$AR"; then
1944   ac_cv_prog_AR="$AR" # Let the user override the test.
1945 else
1946   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1947   ac_dummy="$PATH"
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"
1952       break
1953     fi
1954   done
1955   IFS="$ac_save_ifs"
1956 fi
1957 fi
1958 AR="$ac_cv_prog_AR"
1959 if test -n "$AR"; then
1960   echo "$ac_t""$AR" 1>&6
1961 else
1962   echo "$ac_t""no" 1>&6
1963 fi
1964
1965 test -n "$AR" && break
1966 done
1967 test -n "$AR" || AR=":"
1968
1969       for ac_prog in $AS "${target_alias}-as" "${target}-as"
1970 do
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
1977 else
1978   case "$AS" in
1979   /*)
1980   ac_cv_path_AS="$AS" # Let the user override the test with a path.
1981   ;;
1982   ?:/*)                  
1983   ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
1984   ;;
1985   *)
1986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1987   ac_dummy="$PATH"
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"
1992       break
1993     fi
1994   done
1995   IFS="$ac_save_ifs"
1996   ;;
1997 esac
1998 fi
1999 AS="$ac_cv_path_AS"
2000 if test -n "$AS"; then
2001   echo "$ac_t""$AS" 1>&6
2002 else
2003   echo "$ac_t""no" 1>&6
2004 fi
2005
2006 test -n "$AS" && break
2007 done
2008 test -n "$AS" || AS=":"
2009
2010   if test "$msyshost"; then
2011     case "$AS" in
2012     /*)
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
2018         AS="$AS.exe"
2019       fi
2020     esac
2021   fi
2022
2023     for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
2024 do
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
2031 else
2032   if test -n "$LD"; then
2033   ac_cv_prog_LD="$LD" # Let the user override the test.
2034 else
2035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2036   ac_dummy="$PATH"
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"
2041       break
2042     fi
2043   done
2044   IFS="$ac_save_ifs"
2045 fi
2046 fi
2047 LD="$ac_cv_prog_LD"
2048 if test -n "$LD"; then
2049   echo "$ac_t""$LD" 1>&6
2050 else
2051   echo "$ac_t""no" 1>&6
2052 fi
2053
2054 test -n "$LD" && break
2055 done
2056 test -n "$LD" || LD=":"
2057
2058     for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
2059 do
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
2066 else
2067   if test -n "$STRIP"; then
2068   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2069 else
2070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2071   ac_dummy="$PATH"
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"
2076       break
2077     fi
2078   done
2079   IFS="$ac_save_ifs"
2080 fi
2081 fi
2082 STRIP="$ac_cv_prog_STRIP"
2083 if test -n "$STRIP"; then
2084   echo "$ac_t""$STRIP" 1>&6
2085 else
2086   echo "$ac_t""no" 1>&6
2087 fi
2088
2089 test -n "$STRIP" && break
2090 done
2091 test -n "$STRIP" || STRIP=":"
2092
2093     for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
2094 do
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
2101 else
2102   if test -n "$WINDRES"; then
2103   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2104 else
2105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2106   ac_dummy="$PATH"
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"
2111       break
2112     fi
2113   done
2114   IFS="$ac_save_ifs"
2115 fi
2116 fi
2117 WINDRES="$ac_cv_prog_WINDRES"
2118 if test -n "$WINDRES"; then
2119   echo "$ac_t""$WINDRES" 1>&6
2120 else
2121   echo "$ac_t""no" 1>&6
2122 fi
2123
2124 test -n "$WINDRES" && break
2125 done
2126 test -n "$WINDRES" || WINDRES=":"
2127
2128     cat >> confdefs.h <<\EOF
2129 #define CROSS_COMPILE 1
2130 EOF
2131
2132
2133                     cross_compiling=yes
2134 else
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
2141 else
2142   if test -n "$CC"; then
2143   ac_cv_prog_CC="$CC" # Let the user override the test.
2144 else
2145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2146   ac_dummy="$PATH"
2147   for ac_dir in $ac_dummy; do
2148     test -z "$ac_dir" && ac_dir=.
2149     if test -f $ac_dir/$ac_word; then
2150       ac_cv_prog_CC="gcc"
2151       break
2152     fi
2153   done
2154   IFS="$ac_save_ifs"
2155 fi
2156 fi
2157 CC="$ac_cv_prog_CC"
2158 if test -n "$CC"; then
2159   echo "$ac_t""$CC" 1>&6
2160 else
2161   echo "$ac_t""no" 1>&6
2162 fi
2163
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
2171 else
2172   if test -n "$CC"; then
2173   ac_cv_prog_CC="$CC" # Let the user override the test.
2174 else
2175   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2176   ac_prog_rejected=no
2177   ac_dummy="$PATH"
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
2183         continue
2184       fi
2185       ac_cv_prog_CC="cc"
2186       break
2187     fi
2188   done
2189   IFS="$ac_save_ifs"
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
2193   shift
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.
2198     shift
2199     set dummy "$ac_dir/$ac_word" "$@"
2200     shift
2201     ac_cv_prog_CC="$@"
2202   fi
2203 fi
2204 fi
2205 fi
2206 CC="$ac_cv_prog_CC"
2207 if test -n "$CC"; then
2208   echo "$ac_t""$CC" 1>&6
2209 else
2210   echo "$ac_t""no" 1>&6
2211 fi
2212
2213   if test -z "$CC"; then
2214     case "`uname -s`" in
2215     *win32* | *WIN32*)
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
2222 else
2223   if test -n "$CC"; then
2224   ac_cv_prog_CC="$CC" # Let the user override the test.
2225 else
2226   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2227   ac_dummy="$PATH"
2228   for ac_dir in $ac_dummy; do
2229     test -z "$ac_dir" && ac_dir=.
2230     if test -f $ac_dir/$ac_word; then
2231       ac_cv_prog_CC="cl"
2232       break
2233     fi
2234   done
2235   IFS="$ac_save_ifs"
2236 fi
2237 fi
2238 CC="$ac_cv_prog_CC"
2239 if test -n "$CC"; then
2240   echo "$ac_t""$CC" 1>&6
2241 else
2242   echo "$ac_t""no" 1>&6
2243 fi
2244  ;;
2245     esac
2246   fi
2247   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2248 fi
2249
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
2252
2253 ac_ext=c
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
2259
2260 cat > conftest.$ac_ext << EOF
2261
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264
2265 main(){return(0);}
2266 EOF
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
2272   else
2273     ac_cv_prog_cc_cross=yes
2274   fi
2275 else
2276   echo "configure: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   ac_cv_prog_cc_works=no
2279 fi
2280 rm -fr conftest*
2281 ac_ext=c
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
2287
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; }
2291 fi
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
2296
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
2301 else
2302   cat > conftest.c <<EOF
2303 #ifdef __GNUC__
2304   yes;
2305 #endif
2306 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
2308   ac_cv_prog_gcc=yes
2309 else
2310   ac_cv_prog_gcc=no
2311 fi
2312 fi
2313
2314 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2315
2316 if test $ac_cv_prog_gcc = yes; then
2317   GCC=yes
2318 else
2319   GCC=
2320 fi
2321
2322 ac_test_CFLAGS="${CFLAGS+set}"
2323 ac_save_CFLAGS="$CFLAGS"
2324 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
2329 else
2330   echo 'void f(){}' > conftest.c
2331 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2332   ac_cv_prog_cc_g=yes
2333 else
2334   ac_cv_prog_cc_g=no
2335 fi
2336 rm -f conftest*
2337
2338 fi
2339
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
2345     CFLAGS="-g -O2"
2346   else
2347     CFLAGS="-g"
2348   fi
2349 else
2350   if test "$GCC" = yes; then
2351     CFLAGS="-O2"
2352   else
2353     CFLAGS=
2354   fi
2355 fi
2356
2357     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2358 do
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
2365 else
2366   if test -n "$CXX"; then
2367   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2368 else
2369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2370   ac_dummy="$PATH"
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"
2375       break
2376     fi
2377   done
2378   IFS="$ac_save_ifs"
2379 fi
2380 fi
2381 CXX="$ac_cv_prog_CXX"
2382 if test -n "$CXX"; then
2383   echo "$ac_t""$CXX" 1>&6
2384 else
2385   echo "$ac_t""no" 1>&6
2386 fi
2387
2388 test -n "$CXX" && break
2389 done
2390 test -n "$CXX" || CXX="gcc"
2391
2392
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
2395
2396 ac_ext=C
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
2402
2403 cat > conftest.$ac_ext << EOF
2404
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407
2408 int main(){return(0);}
2409 EOF
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
2415   else
2416     ac_cv_prog_cxx_cross=yes
2417   fi
2418 else
2419   echo "configure: failed program was:" >&5
2420   cat conftest.$ac_ext >&5
2421   ac_cv_prog_cxx_works=no
2422 fi
2423 rm -fr conftest*
2424 ac_ext=c
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
2430
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; }
2434 fi
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
2439
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
2444 else
2445   cat > conftest.C <<EOF
2446 #ifdef __GNUC__
2447   yes;
2448 #endif
2449 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
2451   ac_cv_prog_gxx=yes
2452 else
2453   ac_cv_prog_gxx=no
2454 fi
2455 fi
2456
2457 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2458
2459 if test $ac_cv_prog_gxx = yes; then
2460   GXX=yes
2461 else
2462   GXX=
2463 fi
2464
2465 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2466 ac_save_CXXFLAGS="$CXXFLAGS"
2467 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
2472 else
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
2476 else
2477   ac_cv_prog_cxx_g=no
2478 fi
2479 rm -f conftest*
2480
2481 fi
2482
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
2488     CXXFLAGS="-g -O2"
2489   else
2490     CXXFLAGS="-g"
2491   fi
2492 else
2493   if test "$GXX" = yes; then
2494     CXXFLAGS="-O2"
2495   else
2496     CXXFLAGS=
2497   fi
2498 fi
2499
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
2506 else
2507   if test -n "$RANLIB"; then
2508   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2509 else
2510   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2511   ac_dummy="$PATH"
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"
2516       break
2517     fi
2518   done
2519   IFS="$ac_save_ifs"
2520   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2521 fi
2522 fi
2523 RANLIB="$ac_cv_prog_RANLIB"
2524 if test -n "$RANLIB"; then
2525   echo "$ac_t""$RANLIB" 1>&6
2526 else
2527   echo "$ac_t""no" 1>&6
2528 fi
2529
2530       for ac_prog in $AS as
2531 do
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
2538 else
2539   case "$AS" in
2540   /*)
2541   ac_cv_path_AS="$AS" # Let the user override the test with a path.
2542   ;;
2543   ?:/*)                  
2544   ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2545   ;;
2546   *)
2547   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2548   ac_dummy="$PATH"
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"
2553       break
2554     fi
2555   done
2556   IFS="$ac_save_ifs"
2557   ;;
2558 esac
2559 fi
2560 AS="$ac_cv_path_AS"
2561 if test -n "$AS"; then
2562   echo "$ac_t""$AS" 1>&6
2563 else
2564   echo "$ac_t""no" 1>&6
2565 fi
2566
2567 test -n "$AS" && break
2568 done
2569 test -n "$AS" || AS="$CC"
2570
2571   if test "$msyshost"; then
2572     case "$AS" in
2573     /*)
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
2579         AS="$AS.exe"
2580       fi
2581     esac
2582   fi
2583
2584     for ac_prog in ar
2585 do
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
2592 else
2593   if test -n "$AR"; then
2594   ac_cv_prog_AR="$AR" # Let the user override the test.
2595 else
2596   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2597   ac_dummy="$PATH"
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"
2602       break
2603     fi
2604   done
2605   IFS="$ac_save_ifs"
2606 fi
2607 fi
2608 AR="$ac_cv_prog_AR"
2609 if test -n "$AR"; then
2610   echo "$ac_t""$AR" 1>&6
2611 else
2612   echo "$ac_t""no" 1>&6
2613 fi
2614
2615 test -n "$AR" && break
2616 done
2617 test -n "$AR" || AR=":"
2618
2619     for ac_prog in ld
2620 do
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
2627 else
2628   if test -n "$LD"; then
2629   ac_cv_prog_LD="$LD" # Let the user override the test.
2630 else
2631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2632   ac_dummy="$PATH"
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"
2637       break
2638     fi
2639   done
2640   IFS="$ac_save_ifs"
2641 fi
2642 fi
2643 LD="$ac_cv_prog_LD"
2644 if test -n "$LD"; then
2645   echo "$ac_t""$LD" 1>&6
2646 else
2647   echo "$ac_t""no" 1>&6
2648 fi
2649
2650 test -n "$LD" && break
2651 done
2652 test -n "$LD" || LD=":"
2653
2654     for ac_prog in strip
2655 do
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
2662 else
2663   if test -n "$STRIP"; then
2664   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2665 else
2666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2667   ac_dummy="$PATH"
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"
2672       break
2673     fi
2674   done
2675   IFS="$ac_save_ifs"
2676 fi
2677 fi
2678 STRIP="$ac_cv_prog_STRIP"
2679 if test -n "$STRIP"; then
2680   echo "$ac_t""$STRIP" 1>&6
2681 else
2682   echo "$ac_t""no" 1>&6
2683 fi
2684
2685 test -n "$STRIP" && break
2686 done
2687 test -n "$STRIP" || STRIP=":"
2688
2689     for ac_prog in windres
2690 do
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
2697 else
2698   if test -n "$WINDRES"; then
2699   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2700 else
2701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2702   ac_dummy="$PATH"
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"
2707       break
2708     fi
2709   done
2710   IFS="$ac_save_ifs"
2711 fi
2712 fi
2713 WINDRES="$ac_cv_prog_WINDRES"
2714 if test -n "$WINDRES"; then
2715   echo "$ac_t""$WINDRES" 1>&6
2716 else
2717   echo "$ac_t""no" 1>&6
2718 fi
2719
2720 test -n "$WINDRES" && break
2721 done
2722 test -n "$WINDRES" || WINDRES=":"
2723
2724     if test -z "$HOST_CC"; then
2725         HOST_CC='$(CC)'
2726     fi
2727     if test -z "$HOST_CFLAGS"; then
2728         HOST_CFLAGS='$(CFLAGS)'
2729     fi
2730     if test -z "$HOST_CXX"; then
2731         HOST_CXX='$(CXX)'
2732     fi
2733     if test -z "$HOST_CXXFLAGS"; then
2734         HOST_CXXFLAGS='$(CXXFLAGS)'
2735     fi
2736     if test -z "$HOST_LDFLAGS"; then
2737         HOST_LDFLAGS='$(LDFLAGS)'
2738     fi
2739     if test -z "$HOST_RANLIB"; then
2740         HOST_RANLIB='$(RANLIB)'
2741     fi
2742     if test -z "$HOST_AR"; then
2743         HOST_AR='$(AR)'
2744     fi
2745     if test -z "$HOST_AR_FLAGS"; then
2746         HOST_AR_FLAGS='$(AR_FLAGS)'
2747     fi
2748 fi
2749
2750 GNU_AS=
2751 GNU_LD=
2752 GNU_CC=
2753 GNU_CXX=
2754 CC_VERSION='N/A'
2755 CXX_VERSION='N/A'
2756 if test "$GCC" = "yes"; then
2757     GNU_CC=1
2758     CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
2759 fi
2760 if test "$GXX" = "yes"; then
2761     GNU_CXX=1
2762     CXX_VERSION=`$CXX -v 2>&1 | grep 'gcc version'`
2763 fi
2764 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2765     GNU_AS=1
2766 fi
2767 if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
2768     GNU_LD=1
2769 fi
2770 if test "$GNU_CC"; then
2771     if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
2772         GCC_USE_GNU_LD=1
2773     fi
2774 fi
2775
2776 INTEL_CC=
2777 INTEL_CXX=
2778 if test "$GCC" = yes; then
2779    if test "`$CC -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
2780      INTEL_CC=1
2781    fi
2782 fi
2783
2784 if test "$GXX" = yes; then
2785    if test "`$CXX -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
2786      INTEL_CXX=1
2787    fi
2788 fi
2789
2790 case "$target" in
2791 *-wince|*-winmo)
2792     WINVER=500
2793     WINSDK_TARGETVER=502
2794     ;;
2795 *)
2796     WINVER=502
2797         WINSDK_TARGETVER=601
2798     ;;
2799 esac
2800
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
2805 fi
2806
2807
2808 case "$WINSDK_TARGETVER" in
2809 502|600|601)
2810     MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000
2811     ;;
2812
2813 *)
2814     { echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER), must be 502, 600 or 601" 1>&2; exit 1; };
2815     ;;
2816
2817 esac
2818
2819 case "$target" in
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
2823         _WIN32_MSVC=1
2824
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"
2832         
2833         ac_ext=c
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
2839
2840         cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2843 #include <stdio.h>
2844 int main() {
2845  printf("Hello World\n"); 
2846 ; return 0; }
2847 EOF
2848 if { (eval echo configure:2849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2849   :
2850 else
2851   echo "configure: failed program was:" >&5
2852   cat conftest.$ac_ext >&5
2853   rm -rf conftest*
2854   { echo "configure: error: \$(CC) test failed.  You must have MS VC++ in your path to build." 1>&2; exit 1; } 
2855 fi
2856 rm -f conftest*
2857
2858         ac_ext=C
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
2864
2865         cat > conftest.$ac_ext <<EOF
2866 #line 2867 "configure"
2867 #include "confdefs.h"
2868 #include <new.h>
2869 int main() {
2870  unsigned *test = new unsigned(42); 
2871 ; return 0; }
2872 EOF
2873 if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2874   :
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   rm -rf conftest*
2879   { echo "configure: error: \$(CXX) test failed.  You must have MS VC++ in your path to build." 1>&2; exit 1; } 
2880 fi
2881 rm -f conftest*
2882         ac_ext=c
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
2888
2889         
2890         
2891         _MSVC_VER_FILTER='s|.* ([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
2892         
2893         
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}
2901
2902         CXX_VERSION=`"${CXX}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
2903         _CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | $AWK -F\. '{ print $1 }'`
2904
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; }
2907         fi
2908
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; }
2913             fi
2914
2915             _CC_SUITE=8
2916             CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
2917             cat >> confdefs.h <<\EOF
2918 #define _CRT_SECURE_NO_DEPRECATE 1
2919 EOF
2920
2921             cat >> confdefs.h <<\EOF
2922 #define _CRT_NONSTDC_NO_DEPRECATE 1
2923 EOF
2924
2925         elif test "$_CC_MAJOR_VERSION" = "15"; then
2926             _CC_SUITE=9
2927             CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
2928             cat >> confdefs.h <<\EOF
2929 #define _CRT_SECURE_NO_WARNINGS 1
2930 EOF
2931
2932             cat >> confdefs.h <<\EOF
2933 #define _CRT_NONSTDC_NO_WARNINGS 1
2934 EOF
2935
2936         elif test "$_CC_MAJOR_VERSION" = "16"; then
2937             _CC_SUITE=10
2938             CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
2939             cat >> confdefs.h <<\EOF
2940 #define _CRT_SECURE_NO_WARNINGS 1
2941 EOF
2942
2943             cat >> confdefs.h <<\EOF
2944 #define _CRT_NONSTDC_NO_WARNINGS 1
2945 EOF
2946
2947         else
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; }
2949         fi
2950
2951         _MOZ_RTTI_FLAGS_ON='-GR'
2952         _MOZ_RTTI_FLAGS_OFF='-GR-'
2953         _MOZ_EXCEPTIONS_FLAGS_ON='-EHsc'
2954         _MOZ_EXCEPTIONS_FLAGS_OFF=''
2955
2956         if test -n "$WIN32_REDIST_DIR"; then
2957             WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd`
2958         fi
2959
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; }
2963         fi
2964
2965         
2966         _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
2967         
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
2971         fi
2972
2973         MSMANIFEST_TOOL=1
2974         unset MSMT_TOOL
2975
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; }
2981         fi
2982
2983         INCREMENTAL_LINKER=1
2984
2985         # Identify which version of the SDK we're building with
2986         # Windows Server 2008 and newer SDKs have WinSDKVer.h, get the version
2987         # from there
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
2992   CPP=
2993 fi
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
2997 else
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.
3000   CPP="${CC-cc} -E"
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"
3006 #include <assert.h>
3007 Syntax Error
3008 EOF
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
3013   :
3014 else
3015   echo "$ac_err" >&5
3016   echo "configure: failed program was:" >&5
3017   cat conftest.$ac_ext >&5
3018   rm -rf conftest*
3019   CPP="${CC-cc} -E -traditional-cpp"
3020   cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <assert.h>
3024 Syntax Error
3025 EOF
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
3030   :
3031 else
3032   echo "$ac_err" >&5
3033   echo "configure: failed program was:" >&5
3034   cat conftest.$ac_ext >&5
3035   rm -rf conftest*
3036   CPP="${CC-cc} -nologo -E"
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040 #include <assert.h>
3041 Syntax Error
3042 EOF
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
3047   :
3048 else
3049   echo "$ac_err" >&5
3050   echo "configure: failed program was:" >&5
3051   cat conftest.$ac_ext >&5
3052   rm -rf conftest*
3053   CPP=/lib/cpp
3054 fi
3055 rm -f conftest*
3056 fi
3057 rm -f conftest*
3058 fi
3059 rm -f conftest*
3060   ac_cv_prog_CPP="$CPP"
3061 fi
3062   CPP="$ac_cv_prog_CPP"
3063 else
3064   ac_cv_prog_CPP="$CPP"
3065 fi
3066 echo "$ac_t""$CPP" 1>&6
3067
3068 for ac_hdr in winsdkver.h
3069 do
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
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 #include <$ac_hdr>
3080 EOF
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
3085   rm -rf conftest*
3086   eval "ac_cv_header_$ac_safe=yes"
3087 else
3088   echo "$ac_err" >&5
3089   echo "configure: failed program was:" >&5
3090   cat conftest.$ac_ext >&5
3091   rm -rf conftest*
3092   eval "ac_cv_header_$ac_safe=no"
3093 fi
3094 rm -f conftest*
3095 fi
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
3101 EOF
3102  
3103 else
3104   echo "$ac_t""no" 1>&6
3105 fi
3106 done
3107
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
3117 else
3118   cat > conftest.h <<EOF
3119 #include <winsdkver.h>
3120 #include <sdkddkver.h>
3121
3122 #if (NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) > NTDDI_MAXVER)
3123 #define WINSDK_MAXVER NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER)
3124 #else
3125 #define WINSDK_MAXVER NTDDI_MAXVER
3126 #endif
3127
3128 WINSDK_MAXVER
3129 EOF
3130                             ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1`
3131                             rm -f conftest.h
3132                            
3133 fi
3134
3135 echo "$ac_t""$ac_cv_winsdk_maxver" 1>&6
3136             MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}
3137         else
3138             # The Vista SDK is the only one to have sdkddkver.h but not
3139             # WinSDKVer.h
3140             for ac_hdr in sdkddkver.h
3141 do
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
3147 else
3148   cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151 #include <$ac_hdr>
3152 EOF
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
3157   rm -rf conftest*
3158   eval "ac_cv_header_$ac_safe=yes"
3159 else
3160   echo "$ac_err" >&5
3161   echo "configure: failed program was:" >&5
3162   cat conftest.$ac_ext >&5
3163   rm -rf conftest*
3164   eval "ac_cv_header_$ac_safe=no"
3165 fi
3166 rm -f conftest*
3167 fi
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
3173 EOF
3174  
3175 else
3176   echo "$ac_t""no" 1>&6
3177 fi
3178 done
3179
3180             if test "$ac_cv_header_sdkddkver_h" = "yes"; then
3181                 MOZ_WINSDK_MAXVER=0x06000000
3182             else
3183                 # Assume the Server 2003 Platform SDK
3184                 MOZ_WINSDK_MAXVER=0x05020000
3185             fi
3186         fi
3187
3188         unset _MSVC_VER_FILTER
3189
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
3194 else
3195   
3196                 
3197                 ac_ext=C
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
3203
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>
3210 int main() {
3211 std::_Throw(std::exception()); return 0;
3212 ; return 0; }
3213 EOF
3214 if { (eval echo configure:3215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3215   rm -rf conftest*
3216   ac_cv_have_std__Throw="yes"
3217 else
3218   echo "configure: failed program was:" >&5
3219   cat conftest.$ac_ext >&5
3220   rm -rf conftest*
3221   ac_cv_have_std__Throw="no"
3222 fi
3223 rm -f conftest*
3224                 CXXFLAGS="$_SAVE_CXXFLAGS"
3225                 ac_ext=c
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
3231
3232             
3233 fi
3234
3235 echo "$ac_t""$ac_cv_have_std__Throw" 1>&6
3236
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
3242 else
3243   
3244                     
3245                     ac_ext=C
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
3251
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"
3257 #include <vector>
3258 int main() {
3259 std::vector<int> v; return v.at(1);
3260 ; return 0; }
3261 EOF
3262 if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3263   rm -rf conftest*
3264   ac_cv_have_dllimport_exception_bug="no"
3265 else
3266   echo "configure: failed program was:" >&5
3267   cat conftest.$ac_ext >&5
3268   rm -rf conftest*
3269   ac_cv_have_dllimport_exception_bug="yes"
3270 fi
3271 rm -f conftest*
3272                     CXXFLAGS="$_SAVE_CXXFLAGS"
3273                     ac_ext=c
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
3279
3280                 
3281 fi
3282
3283 echo "$ac_t""$ac_cv_have_dllimport_exception_bug" 1>&6
3284             if test "$ac_cv_have_dllimport_exception_bug" = "no"; then
3285                 WRAP_STL_INCLUDES=1
3286                 MOZ_MSVC_STL_WRAP__Throw=1
3287                 cat >> confdefs.h <<\EOF
3288 #define MOZ_MSVC_STL_WRAP__Throw 1
3289 EOF
3290
3291             fi
3292         else
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
3297 else
3298   
3299                     
3300                     ac_ext=C
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
3306
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"
3312 #include <xstddef>
3313                                     #undef _RAISE
3314                                     #define _RAISE(x) externallyDefinedFunction((x).what())
3315                                     #include <vector>
3316                                    
3317 int main() {
3318 std::vector<int> v; return v.at(1);
3319 ; return 0; }
3320 EOF
3321 if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3322   rm -rf conftest*
3323   ac_cv_have__RAISE="no"
3324 else
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   ac_cv_have__RAISE="yes"
3329 fi
3330 rm -f conftest*
3331                     CXXFLAGS="$_SAVE_CXXFLAGS"
3332                     ac_ext=c
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
3338
3339                 
3340 fi
3341
3342 echo "$ac_t""$ac_cv_have__RAISE" 1>&6
3343             if test "$ac_cv_have__RAISE" = "yes"; then
3344                 WRAP_STL_INCLUDES=1
3345                 MOZ_MSVC_STL_WRAP__RAISE=1
3346                 cat >> confdefs.h <<\EOF
3347 #define MOZ_MSVC_STL_WRAP__RAISE 1
3348 EOF
3349
3350             else
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; }
3352             fi
3353         fi
3354
3355         if test "$WRAP_STL_INCLUDES" = "1"; then
3356             STL_FLAGS='-D_HAS_EXCEPTIONS=0 -I$(DIST)/stl_wrappers'
3357         fi
3358     else
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"
3367 #include <w32api.h>
3368 int main() {
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."
3373             #endif
3374             
3375 ; return 0; }
3376 EOF
3377 if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3378   rm -rf conftest*
3379    res=yes 
3380 else
3381   echo "configure: failed program was:" >&5
3382   cat conftest.$ac_ext >&5
3383   rm -rf conftest*
3384    res=no 
3385 fi
3386 rm -f conftest*
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; }
3390         fi
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"
3408         then
3409             { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; exit 1; }
3410         fi
3411
3412         # Server 2003 is the highest version supported
3413         MOZ_WINSDK_MAXVER=0x05020000
3414     fi # !GNU_CC
3415
3416     cat >> confdefs.h <<EOF
3417 #define WINVER 0x$WINVER
3418 EOF
3419
3420     cat >> confdefs.h <<EOF
3421 #define _WIN32_WINNT 0x$WINVER
3422 EOF
3423
3424     # Require OS features provided by IE 5.0
3425     cat >> confdefs.h <<EOF
3426 #define _WIN32_IE 0x0500
3427 EOF
3428
3429
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
3436     else
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; }
3439     fi
3440
3441     cat >> confdefs.h <<EOF
3442 #define MOZ_WINSDK_TARGETVER 0x$MOZ_WINSDK_TARGETVER
3443 EOF
3444
3445     # Definitions matching sdkddkver.h
3446     cat >> confdefs.h <<EOF
3447 #define MOZ_NTDDI_WS03 0x05020000
3448 EOF
3449
3450     cat >> confdefs.h <<EOF
3451 #define MOZ_NTDDI_LONGHORN 0x06000000
3452 EOF
3453
3454     cat >> confdefs.h <<EOF
3455 #define MOZ_NTDDI_WIN7 0x06010000
3456 EOF
3457
3458     ;;
3459 esac
3460
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
3465 else
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
3468 fi
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
3473 else
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; };
3481 then
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; };
3489       then
3490         # cc works too.
3491         :
3492       else
3493         # cc exists but doesn't like -o.
3494         eval ac_cv_prog_cc_${ac_cc}_c_o=no
3495       fi
3496     fi
3497   fi
3498 else
3499   eval ac_cv_prog_cc_${ac_cc}_c_o=no
3500 fi
3501 rm -f conftest*
3502
3503 fi
3504 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3505   echo "$ac_t""yes" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508   cat >> confdefs.h <<\EOF
3509 #define NO_MINUS_C_MINUS_O 1
3510 EOF
3511
3512 fi
3513
3514     if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
3515         USING_HCC=1
3516         _OLDCC=$CC
3517         _OLDCXX=$CXX
3518         CC="${srcdir}/build/hcc '$CC'"
3519         CXX="${srcdir}/build/hcpp '$CXX'"
3520     fi
3521 fi
3522
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
3527   CPP=
3528 fi
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
3532 else
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.
3535   CPP="${CC-cc} -E"
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"
3541 #include <assert.h>
3542 Syntax Error
3543 EOF
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
3548   :
3549 else
3550   echo "$ac_err" >&5
3551   echo "configure: failed program was:" >&5
3552   cat conftest.$ac_ext >&5
3553   rm -rf conftest*
3554   CPP="${CC-cc} -E -traditional-cpp"
3555   cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <assert.h>
3559 Syntax Error
3560 EOF
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
3565   :
3566 else
3567   echo "$ac_err" >&5
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   CPP="${CC-cc} -nologo -E"
3572   cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575 #include <assert.h>
3576 Syntax Error
3577 EOF
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
3582   :
3583 else
3584   echo "$ac_err" >&5
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587   rm -rf conftest*
3588   CPP=/lib/cpp
3589 fi
3590 rm -f conftest*
3591 fi
3592 rm -f conftest*
3593 fi
3594 rm -f conftest*
3595   ac_cv_prog_CPP="$CPP"
3596 fi
3597   CPP="$ac_cv_prog_CPP"
3598 else
3599   ac_cv_prog_CPP="$CPP"
3600 fi
3601 echo "$ac_t""$CPP" 1>&6
3602
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
3608 else
3609   ac_ext=C
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"
3619 #include <stdlib.h>
3620 EOF
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
3625   :
3626 else
3627   echo "$ac_err" >&5
3628   echo "configure: failed program was:" >&5
3629   cat conftest.$ac_ext >&5
3630   rm -rf conftest*
3631   CXXCPP=/lib/cpp
3632 fi
3633 rm -f conftest*
3634   ac_cv_prog_CXXCPP="$CXXCPP"
3635 ac_ext=c
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
3641 fi
3642 fi
3643 CXXCPP="$ac_cv_prog_CXXCPP"
3644 echo "$ac_t""$CXXCPP" 1>&6
3645
3646
3647 if test -n "$_WIN32_MSVC"; then
3648     SKIP_PATH_CHECKS=1
3649     SKIP_COMPILER_CHECKS=1
3650     SKIP_LIBRARY_CHECKS=1
3651
3652     # Since we're skipping compiler and library checks, hard-code
3653     # some facts here.
3654
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
3659 EOF
3660
3661     cat >> confdefs.h <<\EOF
3662 #define HAVE_LOCALECONV 1
3663 EOF
3664
3665
3666     case "$target" in
3667     *-wince|*-winmo)
3668         cat >> confdefs.h <<\EOF
3669 #define HAVE_SYSTEMTIMETOFILETIME 1
3670 EOF
3671
3672         cat >> confdefs.h <<\EOF
3673 #define JS_CRTDEFS_H_HAS_INTPTR_T 1
3674 EOF
3675
3676         ;;
3677     *)
3678         cat >> confdefs.h <<\EOF
3679 #define HAVE_SYSTEMTIMETOFILETIME 1
3680 EOF
3681
3682         cat >> confdefs.h <<\EOF
3683 #define HAVE_GETSYSTEMTIMEASFILETIME 1
3684 EOF
3685
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
3691 EOF
3692
3693         ;;
3694     esac
3695 fi
3696
3697 fi # COMPILE_ENVIRONMENT
3698
3699 if test "$cross_compiling"  = "yes"; then
3700     CROSS_COMPILE=1
3701 else
3702     CROSS_COMPILE=
3703 fi
3704
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
3708 do
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
3715 else
3716   if test -n "$SBCONF"; then
3717   ac_cv_prog_SBCONF="$SBCONF" # Let the user override the test.
3718 else
3719   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3720   ac_dummy="$PATH"
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"
3725       break
3726     fi
3727   done
3728   IFS="$ac_save_ifs"
3729 fi
3730 fi
3731 SBCONF="$ac_cv_prog_SBCONF"
3732 if test -n "$SBCONF"; then
3733   echo "$ac_t""$SBCONF" 1>&6
3734 else
3735   echo "$ac_t""no" 1>&6
3736 fi
3737
3738 test -n "$SBCONF" && break
3739 done
3740 test -n "$SBCONF" || SBCONF=""""
3741
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
3749     fi
3750 fi
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
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
3773 # AIX /bin/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
3783 else
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.
3787     case "$ac_dir/" in
3788     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3789     *)
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
3792       # by default.
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.
3798             :
3799           else
3800             ac_cv_path_install="$ac_dir/$ac_prog -c"
3801             break 2
3802           fi
3803         fi
3804       done
3805       ;;
3806     esac
3807   done
3808   IFS="$ac_save_IFS"
3809
3810 fi
3811   if test "${ac_cv_path_install+set}" = set; then
3812     INSTALL="$ac_cv_path_install"
3813   else
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"
3819   fi
3820 fi
3821 echo "$ac_t""$INSTALL" 1>&6
3822
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}'
3826
3827 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3828
3829 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3830
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
3835 else
3836   rm -f conftestdata
3837 if ln -s X conftestdata 2>/dev/null
3838 then
3839   rm -f conftestdata
3840   ac_cv_prog_LN_S="ln -s"
3841 else
3842   ac_cv_prog_LN_S=ln
3843 fi
3844 fi
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
3848 else
3849   echo "$ac_t""no" 1>&6
3850 fi
3851
3852
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`
3857 _perl_res=$?
3858 echo "$ac_t""$_perl_version" 1>&6
3859
3860 if test "$_perl_res" != 0; then
3861     { echo "configure: error: Perl $PERL_VERSION or higher is required." 1>&2; exit 1; }
3862 fi
3863 fi
3864
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`
3868 _perl_res=$?
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; }
3872 else
3873     echo "$ac_t""yes" 1>&6    
3874 fi
3875
3876   for ac_prog in $PYTHON python2.7 python2.6 python2.5 python
3877 do
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
3884 else
3885   case "$PYTHON" in
3886   /*)
3887   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
3888   ;;
3889   ?:/*)                  
3890   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path.
3891   ;;
3892   *)
3893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3894   ac_dummy="$PATH"
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"
3899       break
3900     fi
3901   done
3902   IFS="$ac_save_ifs"
3903   ;;
3904 esac
3905 fi
3906 PYTHON="$ac_cv_path_PYTHON"
3907 if test -n "$PYTHON"; then
3908   echo "$ac_t""$PYTHON" 1>&6
3909 else
3910   echo "$ac_t""no" 1>&6
3911 fi
3912
3913 test -n "$PYTHON" && break
3914 done
3915
3916   if test "$msyshost"; then
3917     case "$PYTHON" in
3918     /*)
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"
3925       fi
3926     esac
3927   fi
3928
3929 if test -z "$PYTHON"; then
3930     { echo "configure: error: python was not found in \$PATH" 1>&2; exit 1; }
3931 fi
3932
3933 if test -z "$COMPILE_ENVIRONMENT"; then
3934     NSINSTALL_BIN='$(PYTHON) $(topsrcdir)/config/nsinstall.py'
3935 fi
3936
3937
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
3944 else
3945   case "$DOXYGEN" in
3946   /*)
3947   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
3948   ;;
3949   ?:/*)                  
3950   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a dos path.
3951   ;;
3952   *)
3953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3954   ac_dummy="$PATH"
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"
3959       break
3960     fi
3961   done
3962   IFS="$ac_save_ifs"
3963   test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=":"
3964   ;;
3965 esac
3966 fi
3967 DOXYGEN="$ac_cv_path_DOXYGEN"
3968 if test -n "$DOXYGEN"; then
3969   echo "$ac_t""$DOXYGEN" 1>&6
3970 else
3971   echo "$ac_t""no" 1>&6
3972 fi
3973
3974   if test "$msyshost"; then
3975     case "$DOXYGEN" in
3976     /*)
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"
3983       fi
3984     esac
3985   fi
3986
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
3993 else
3994   case "$AUTOCONF" in
3995   /*)
3996   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
3997   ;;
3998   ?:/*)                  
3999   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
4000   ;;
4001   *)
4002   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4003   ac_dummy="$PATH"
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"
4008       break
4009     fi
4010   done
4011   IFS="$ac_save_ifs"
4012   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":"
4013   ;;
4014 esac
4015 fi
4016 AUTOCONF="$ac_cv_path_AUTOCONF"
4017 if test -n "$AUTOCONF"; then
4018   echo "$ac_t""$AUTOCONF" 1>&6
4019 else
4020   echo "$ac_t""no" 1>&6
4021 fi
4022
4023   if test "$msyshost"; then
4024     case "$AUTOCONF" in
4025     /*)
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"
4032       fi
4033     esac
4034   fi
4035
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
4042 else
4043   case "$UNZIP" in
4044   /*)
4045   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
4046   ;;
4047   ?:/*)                  
4048   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path.
4049   ;;
4050   *)
4051   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4052   ac_dummy="$PATH"
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"
4057       break
4058     fi
4059   done
4060   IFS="$ac_save_ifs"
4061   test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP=":"
4062   ;;
4063 esac
4064 fi
4065 UNZIP="$ac_cv_path_UNZIP"
4066 if test -n "$UNZIP"; then
4067   echo "$ac_t""$UNZIP" 1>&6
4068 else
4069   echo "$ac_t""no" 1>&6
4070 fi
4071
4072   if test "$msyshost"; then
4073     case "$UNZIP" in
4074     /*)
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
4080         UNZIP="$UNZIP.exe"
4081       fi
4082     esac
4083   fi
4084
4085   for ac_prog in zip
4086 do
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
4093 else
4094   case "$ZIP" in
4095   /*)
4096   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
4097   ;;
4098   ?:/*)                  
4099   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a dos path.
4100   ;;
4101   *)
4102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4103   ac_dummy="$PATH"
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"
4108       break
4109     fi
4110   done
4111   IFS="$ac_save_ifs"
4112   ;;
4113 esac
4114 fi
4115 ZIP="$ac_cv_path_ZIP"
4116 if test -n "$ZIP"; then
4117   echo "$ac_t""$ZIP" 1>&6
4118 else
4119   echo "$ac_t""no" 1>&6
4120 fi
4121
4122 test -n "$ZIP" && break
4123 done
4124
4125   if test "$msyshost"; then
4126     case "$ZIP" in
4127     /*)
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
4133         ZIP="$ZIP.exe"
4134       fi
4135     esac
4136   fi
4137
4138 if test -z "$ZIP" -o "$ZIP" = ":"; then
4139     { echo "configure: error: zip not found in \$PATH" 1>&2; exit 1; }
4140 fi
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
4147 else
4148   case "$SYSTEM_MAKEDEPEND" in
4149   /*)
4150   ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a path.
4151   ;;
4152   ?:/*)                  
4153   ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a dos path.
4154   ;;
4155   *)
4156   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4157   ac_dummy="$PATH"
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"
4162       break
4163     fi
4164   done
4165   IFS="$ac_save_ifs"
4166   ;;
4167 esac
4168 fi
4169 SYSTEM_MAKEDEPEND="$ac_cv_path_SYSTEM_MAKEDEPEND"
4170 if test -n "$SYSTEM_MAKEDEPEND"; then
4171   echo "$ac_t""$SYSTEM_MAKEDEPEND" 1>&6
4172 else
4173   echo "$ac_t""no" 1>&6
4174 fi
4175
4176   if test "$msyshost"; then
4177     case "$SYSTEM_MAKEDEPEND" in
4178     /*)
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"
4185       fi
4186     esac
4187   fi
4188
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
4195 else
4196   case "$XARGS" in
4197   /*)
4198   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
4199   ;;
4200   ?:/*)                  
4201   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a dos path.
4202   ;;
4203   *)
4204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4205   ac_dummy="$PATH"
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"
4210       break
4211     fi
4212   done
4213   IFS="$ac_save_ifs"
4214   ;;
4215 esac
4216 fi
4217 XARGS="$ac_cv_path_XARGS"
4218 if test -n "$XARGS"; then
4219   echo "$ac_t""$XARGS" 1>&6
4220 else
4221   echo "$ac_t""no" 1>&6
4222 fi
4223
4224   if test "$msyshost"; then
4225     case "$XARGS" in
4226     /*)
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
4232         XARGS="$XARGS.exe"
4233       fi
4234     esac
4235   fi
4236
4237 if test -z "$XARGS" -o "$XARGS" = ":"; then
4238     { echo "configure: error: xargs not found in \$PATH ." 1>&2; exit 1; }
4239 fi
4240
4241 if test "$COMPILE_ENVIRONMENT"; then
4242
4243
4244 case "$target_os" in
4245 darwin*)
4246                     
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/;'`
4249     
4250     if test "$GCC_VERSION_FULL" = "4.0.0" ; then
4251                         
4252         GCC_BUILD=`echo $CXX_VERSION | $PERL -pe 's/^.*build ([^ )]*).*/$1/'`
4253         
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; }
4258         fi
4259     fi
4260
4261                   for ac_prog in pbbuild xcodebuild pbxbuild
4262 do
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
4269 else
4270   case "$PBBUILD" in
4271   /*)
4272   ac_cv_path_PBBUILD="$PBBUILD" # Let the user override the test with a path.
4273   ;;
4274   ?:/*)                  
4275   ac_cv_path_PBBUILD="$PBBUILD" # Let the user override the test with a dos path.
4276   ;;
4277   *)
4278   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4279   ac_dummy="$PATH"
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"
4284       break
4285     fi
4286   done
4287   IFS="$ac_save_ifs"
4288   ;;
4289 esac
4290 fi
4291 PBBUILD="$ac_cv_path_PBBUILD"
4292 if test -n "$PBBUILD"; then
4293   echo "$ac_t""$PBBUILD" 1>&6
4294 else
4295   echo "$ac_t""no" 1>&6
4296 fi
4297
4298 test -n "$PBBUILD" && break
4299 done
4300
4301   if test "$msyshost"; then
4302     case "$PBBUILD" in
4303     /*)
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"
4310       fi
4311     esac
4312   fi
4313
4314
4315     case "$PBBUILD" in
4316       *xcodebuild*)
4317         
4318         XCODEBUILD_VERSION=`$PBBUILD -version 2>/dev/null | xargs | sed -e 's/.*DevToolsCore-\([0-9]*\).*/\1/'`
4319         
4320         if test -n "$XCODEBUILD_VERSION" && test "$XCODEBUILD_VERSION" -ge 620 ; then
4321           HAS_XCODE_2_1=1;
4322         fi
4323       ;;
4324     esac
4325
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
4332 else
4333   case "$SDP" in
4334   /*)
4335   ac_cv_path_SDP="$SDP" # Let the user override the test with a path.
4336   ;;
4337   ?:/*)                  
4338   ac_cv_path_SDP="$SDP" # Let the user override the test with a dos path.
4339   ;;
4340   *)
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"
4347       break
4348     fi
4349   done
4350   IFS="$ac_save_ifs"
4351   test -z "$ac_cv_path_SDP" && ac_cv_path_SDP=":"
4352   ;;
4353 esac
4354 fi
4355 SDP="$ac_cv_path_SDP"
4356 if test -n "$SDP"; then
4357   echo "$ac_t""$SDP" 1>&6
4358 else
4359   echo "$ac_t""no" 1>&6
4360 fi
4361
4362   if test "$msyshost"; then
4363     case "$SDP" in
4364     /*)
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
4370         SDP="$SDP.exe"
4371       fi
4372     esac
4373   fi
4374
4375     ;;
4376 esac
4377
4378
4379
4380
4381
4382
4383
4384
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
4389 fi
4390
4391
4392 case "$target" in
4393 *-darwin*)
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
4398 EOF
4399
4400     else
4401                         case "${target_cpu}" in
4402           ppc*)
4403             export MACOSX_DEPLOYMENT_TARGET=10.5
4404             ;;
4405           i*86)
4406             export MACOSX_DEPLOYMENT_TARGET=10.5
4407             ;;
4408           x86_64)
4409             export MACOSX_DEPLOYMENT_TARGET=10.6
4410             ;;
4411         esac
4412     fi
4413     ;;
4414 esac
4415
4416
4417
4418 MACOS_SDK_DIR=
4419 NEXT_ROOT=
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
4424 fi
4425
4426
4427
4428
4429
4430 if test "$MACOS_SDK_DIR"; then
4431       
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; }
4436   fi
4437
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; }
4441   else
4442     CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
4443     CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}"
4444
4445         CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
4446     CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}"
4447
4448     if test "$GCC_VERSION_FULL" = "4.0.0" ; then
4449                                     LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
4450     fi
4451   fi
4452
4453   
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
4456   ac_ext=C
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
4462
4463   cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 #include <new>
4467                  int main() { return 0; }
4468 int main() {
4469 result=yes
4470 ; return 0; }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4473   rm -rf conftest*
4474   result=no
4475 else
4476   echo "configure: failed program was:" >&5
4477   cat conftest.$ac_ext >&5
4478 fi
4479 rm -f conftest*
4480   ac_ext=c
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
4486
4487   echo "$ac_t""$result" 1>&6
4488
4489   if test "$result" = "no" ; then
4490     { echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; exit 1; }
4491   fi
4492 fi
4493
4494 fi # COMPILE_ENVIRONMENT
4495
4496 if test -n "$MAKE"; then
4497   if test `echo $MAKE | grep -c make.py` != 1; then
4498      NOT_PYMAKE=$MAKE
4499   fi
4500 fi
4501
4502 case "$host_os" in
4503 cygwin*|mingw*|mks*|msvc*)
4504       for ac_prog in $GMAKE $NOT_PYMAKE make gmake
4505 do
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
4512 else
4513   case "$GMAKE" in
4514   /*)
4515   ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
4516   ;;
4517   ?:/*)                  
4518   ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
4519   ;;
4520   *)
4521   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4522   ac_dummy="$PATH"
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"
4527       break
4528     fi
4529   done
4530   IFS="$ac_save_ifs"
4531   ;;
4532 esac
4533 fi
4534 GMAKE="$ac_cv_path_GMAKE"
4535 if test -n "$GMAKE"; then
4536   echo "$ac_t""$GMAKE" 1>&6
4537 else
4538   echo "$ac_t""no" 1>&6
4539 fi
4540
4541 test -n "$GMAKE" && break
4542 done
4543 test -n "$GMAKE" || GMAKE=":"
4544
4545   if test "$msyshost"; then
4546     case "$GMAKE" in
4547     /*)
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
4553         GMAKE="$GMAKE.exe"
4554       fi
4555     esac
4556   fi
4557
4558     ;;
4559 *)
4560       for ac_prog in $GMAKE $NOT_PYMAKE gmake make
4561 do
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
4568 else
4569   case "$GMAKE" in
4570   /*)
4571   ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
4572   ;;
4573   ?:/*)                  
4574   ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
4575   ;;
4576   *)
4577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4578   ac_dummy="$PATH"
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"
4583       break
4584     fi
4585   done
4586   IFS="$ac_save_ifs"
4587   ;;
4588 esac
4589 fi
4590 GMAKE="$ac_cv_path_GMAKE"
4591 if test -n "$GMAKE"; then
4592   echo "$ac_t""$GMAKE" 1>&6
4593 else
4594   echo "$ac_t""no" 1>&6
4595 fi
4596
4597 test -n "$GMAKE" && break
4598 done
4599 test -n "$GMAKE" || GMAKE=":"
4600
4601   if test "$msyshost"; then
4602     case "$GMAKE" in
4603     /*)
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
4609         GMAKE="$GMAKE.exe"
4610       fi
4611     esac
4612   fi
4613
4614     ;;
4615 esac
4616 if test "$GMAKE" = ":"; then
4617    { echo "configure: error: GNU make not found" 1>&2; exit 1; }
4618 fi
4619
4620
4621 if test "$COMPILE_ENVIRONMENT"; then
4622
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
4629
4630 # Check whether --with-x or --without-x was given.
4631 if test "${with_x+set}" = set; then
4632   withval="$with_x"
4633   :
4634 fi
4635
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.
4639   have_x=disabled
4640 else
4641   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4642     # Both variables are already set.
4643     have_x=yes
4644   else
4645 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4646   echo $ac_n "(cached) $ac_c" 1>&6
4647 else
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
4650 rm -fr conftestdir
4651 if mkdir conftestdir; then
4652   cd conftestdir
4653   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4654   cat > Imakefile <<'EOF'
4655 acfindx:
4656         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4657 EOF
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
4666       fi
4667     done
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
4672         /usr/include) ;;
4673         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4674     esac
4675     case "$ac_im_usrlibdir" in
4676         /usr/lib | /lib) ;;
4677         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4678     esac
4679   fi
4680   cd ..
4681   rm -fr conftestdir
4682 fi
4683
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
4687
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>
4693 EOF
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
4698   rm -rf conftest*
4699   # We can compile using X headers with no special include directory.
4700 ac_x_includes=
4701 else
4702   echo "$ac_err" >&5
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -rf conftest*
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.
4708   for ac_dir in               \
4709     /usr/X11/include          \
4710     /usr/X11R6/include        \
4711     /usr/X11R5/include        \
4712     /usr/X11R4/include        \
4713                               \
4714     /usr/include/X11          \
4715     /usr/include/X11R6        \
4716     /usr/include/X11R5        \
4717     /usr/include/X11R4        \
4718                               \
4719     /usr/local/X11/include    \
4720     /usr/local/X11R6/include  \
4721     /usr/local/X11R5/include  \
4722     /usr/local/X11R4/include  \
4723                               \
4724     /usr/local/include/X11    \
4725     /usr/local/include/X11R6  \
4726     /usr/local/include/X11R5  \
4727     /usr/local/include/X11R4  \
4728                               \
4729     /usr/X386/include         \
4730     /usr/x386/include         \
4731     /usr/XFree86/include/X11  \
4732                               \
4733     /usr/include              \
4734     /usr/local/include        \
4735     /usr/unsupported/include  \
4736     /usr/athena/include       \
4737     /usr/local/x11r5/include  \
4738     /usr/lpp/Xamples/include  \
4739                               \
4740     /usr/openwin/include      \
4741     /usr/openwin/share/include \
4742     ; \
4743   do
4744     if test -r "$ac_dir/$x_direct_test_include"; then
4745       ac_x_includes=$ac_dir
4746       break
4747     fi
4748   done
4749 fi
4750 rm -f conftest*
4751 fi # $ac_x_includes = NO
4752
4753 if test "$ac_x_libraries" = NO; then
4754   # Check for the libraries.
4755
4756   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4757   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4758
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"
4766
4767 int main() {
4768 ${x_direct_test_function}()
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   LIBS="$ac_save_LIBS"
4774 # We can link X programs with no special library path.
4775 ac_x_libraries=
4776 else
4777   echo "configure: failed program was:" >&5
4778   cat conftest.$ac_ext >&5
4779   rm -rf conftest*
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/` \
4784     /usr/X11/lib          \
4785     /usr/X11R6/lib        \
4786     /usr/X11R5/lib        \
4787     /usr/X11R4/lib        \
4788                           \
4789     /usr/lib/X11          \
4790     /usr/lib/X11R6        \
4791     /usr/lib/X11R5        \
4792     /usr/lib/X11R4        \
4793                           \
4794     /usr/local/X11/lib    \
4795     /usr/local/X11R6/lib  \
4796     /usr/local/X11R5/lib  \
4797     /usr/local/X11R4/lib  \
4798                           \
4799     /usr/local/lib/X11    \
4800     /usr/local/lib/X11R6  \
4801     /usr/local/lib/X11R5  \
4802     /usr/local/lib/X11R4  \
4803                           \
4804     /usr/X386/lib         \
4805     /usr/x386/lib         \
4806     /usr/XFree86/lib/X11  \
4807                           \
4808     /usr/lib              \
4809     /usr/local/lib        \
4810     /usr/unsupported/lib  \
4811     /usr/athena/lib       \
4812     /usr/local/x11r5/lib  \
4813     /usr/lpp/Xamples/lib  \
4814     /lib/usr/lib/X11      \
4815                           \
4816     /usr/openwin/lib      \
4817     /usr/openwin/share/lib \
4818     ; \
4819 do
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
4823       break 2
4824     fi
4825   done
4826 done
4827 fi
4828 rm -f conftest*
4829 fi # $ac_x_libraries = NO
4830
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"
4834 else
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"
4838 fi
4839 fi
4840   fi
4841   eval "$ac_cv_have_x"
4842 fi # $with_x != no
4843
4844 if test "$have_x" != yes; then
4845   echo "$ac_t""$have_x" 1>&6
4846   no_x=yes
4847 else
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
4855 fi
4856
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
4861 EOF
4862
4863   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4864 else
4865   if test -n "$x_includes"; then
4866     X_CFLAGS="$X_CFLAGS -I$x_includes"
4867   fi
4868
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
4875     "SunOS 5"*)
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"
4882
4883 int main() {
4884
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888   rm -rf conftest*
4889   ac_R_nospace=yes
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   ac_R_nospace=no
4895 fi
4896 rm -f conftest*
4897       if test $ac_R_nospace = yes; then
4898         echo "$ac_t""no" 1>&6
4899         X_LIBS="$X_LIBS -R$x_libraries"
4900       else
4901         LIBS="$ac_xsave_LIBS -R $x_libraries"
4902         cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905
4906 int main() {
4907
4908 ; return 0; }
4909 EOF
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4911   rm -rf conftest*
4912   ac_R_space=yes
4913 else
4914   echo "configure: failed program was:" >&5
4915   cat conftest.$ac_ext >&5
4916   rm -rf conftest*
4917   ac_R_space=no
4918 fi
4919 rm -f conftest*
4920         if test $ac_R_space = yes; then
4921           echo "$ac_t""yes" 1>&6
4922           X_LIBS="$X_LIBS -R $x_libraries"
4923         else
4924           echo "$ac_t""neither works" 1>&6
4925         fi
4926       fi
4927       LIBS="$ac_xsave_LIBS"
4928     esac
4929   fi
4930
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.
4934
4935   if test "$ISC" = yes; then
4936     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4937   else
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
4946 else
4947   ac_save_LIBS="$LIBS"
4948 LIBS="-ldnet  $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.  */
4955 char dnet_ntoa();
4956
4957 int main() {
4958 dnet_ntoa()
4959 ; return 0; }
4960 EOF
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4962   rm -rf conftest*
4963   eval "ac_cv_lib_$ac_lib_var=yes"
4964 else
4965   echo "configure: failed program was:" >&5
4966   cat conftest.$ac_ext >&5
4967   rm -rf conftest*
4968   eval "ac_cv_lib_$ac_lib_var=no"
4969 fi
4970 rm -f conftest*
4971 LIBS="$ac_save_LIBS"
4972
4973 fi
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"
4977 else
4978   echo "$ac_t""no" 1>&6
4979 fi
4980
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
4987 else
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.  */
4996 char dnet_ntoa();
4997
4998 int main() {
4999 dnet_ntoa()
5000 ; return 0; }
5001 EOF
5002 if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5003   rm -rf conftest*
5004   eval "ac_cv_lib_$ac_lib_var=yes"
5005 else
5006   echo "configure: failed program was:" >&5
5007   cat conftest.$ac_ext >&5
5008   rm -rf conftest*
5009   eval "ac_cv_lib_$ac_lib_var=no"
5010 fi
5011 rm -f conftest*
5012 LIBS="$ac_save_LIBS"
5013
5014 fi
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"
5018 else
5019   echo "$ac_t""no" 1>&6
5020 fi
5021
5022     fi
5023
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)
5027     # needs -lnsl.
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
5034 else
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.  */
5040 #include <assert.h>
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();
5045
5046 int main() {
5047
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)
5052 choke me
5053 #else
5054 gethostbyname();
5055 #endif
5056
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5060   rm -rf conftest*
5061   eval "ac_cv_func_gethostbyname=yes"
5062 else
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_func_gethostbyname=no"
5067 fi
5068 rm -f conftest*
5069 fi
5070
5071 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5072   echo "$ac_t""yes" 1>&6
5073   :
5074 else
5075   echo "$ac_t""no" 1>&6
5076 fi
5077
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
5084 else
5085   ac_save_LIBS="$LIBS"
5086 LIBS="-lnsl  $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();
5094
5095 int main() {
5096 gethostbyname()
5097 ; return 0; }
5098 EOF
5099 if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5100   rm -rf conftest*
5101   eval "ac_cv_lib_$ac_lib_var=yes"
5102 else
5103   echo "configure: failed program was:" >&5
5104   cat conftest.$ac_ext >&5
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=no"
5107 fi
5108 rm -f conftest*
5109 LIBS="$ac_save_LIBS"
5110
5111 fi
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"
5115 else
5116   echo "$ac_t""no" 1>&6
5117 fi
5118
5119     fi
5120
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
5132 else
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.  */
5138 #include <assert.h>
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.  */
5142 char connect();
5143
5144 int main() {
5145
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)
5150 choke me
5151 #else
5152 connect();
5153 #endif
5154
5155 ; return 0; }
5156 EOF
5157 if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5158   rm -rf conftest*
5159   eval "ac_cv_func_connect=yes"
5160 else
5161   echo "configure: failed program was:" >&5
5162   cat conftest.$ac_ext >&5
5163   rm -rf conftest*
5164   eval "ac_cv_func_connect=no"
5165 fi
5166 rm -f conftest*
5167 fi
5168
5169 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5170   echo "$ac_t""yes" 1>&6
5171   :
5172 else
5173   echo "$ac_t""no" 1>&6
5174 fi
5175
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
5182 else
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.  */
5191 char connect();
5192
5193 int main() {
5194 connect()
5195 ; return 0; }
5196 EOF
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198   rm -rf conftest*
5199   eval "ac_cv_lib_$ac_lib_var=yes"
5200 else
5201   echo "configure: failed program was:" >&5
5202   cat conftest.$ac_ext >&5
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=no"
5205 fi
5206 rm -f conftest*
5207 LIBS="$ac_save_LIBS"
5208
5209 fi
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"
5213 else
5214   echo "$ac_t""no" 1>&6
5215 fi
5216
5217     fi
5218
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
5224 else
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.  */
5230 #include <assert.h>
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.  */
5234 char remove();
5235
5236 int main() {
5237
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)
5242 choke me
5243 #else
5244 remove();
5245 #endif
5246
5247 ; return 0; }
5248 EOF
5249 if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5250   rm -rf conftest*
5251   eval "ac_cv_func_remove=yes"
5252 else
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255   rm -rf conftest*
5256   eval "ac_cv_func_remove=no"
5257 fi
5258 rm -f conftest*
5259 fi
5260
5261 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5262   echo "$ac_t""yes" 1>&6
5263   :
5264 else
5265   echo "$ac_t""no" 1>&6
5266 fi
5267
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
5274 else
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.  */
5283 char remove();
5284
5285 int main() {
5286 remove()
5287 ; return 0; }
5288 EOF
5289 if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5290   rm -rf conftest*
5291   eval "ac_cv_lib_$ac_lib_var=yes"
5292 else
5293   echo "configure: failed program was:" >&5
5294   cat conftest.$ac_ext >&5
5295   rm -rf conftest*
5296   eval "ac_cv_lib_$ac_lib_var=no"
5297 fi
5298 rm -f conftest*
5299 LIBS="$ac_save_LIBS"
5300
5301 fi
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"
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308
5309     fi
5310
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
5316 else
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.  */
5322 #include <assert.h>
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.  */
5326 char shmat();
5327
5328 int main() {
5329
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)
5334 choke me
5335 #else
5336 shmat();
5337 #endif
5338
5339 ; return 0; }
5340 EOF
5341 if { (eval echo configure:5342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5342   rm -rf conftest*
5343   eval "ac_cv_func_shmat=yes"
5344 else
5345   echo "configure: failed program was:" >&5
5346   cat conftest.$ac_ext >&5
5347   rm -rf conftest*
5348   eval "ac_cv_func_shmat=no"
5349 fi
5350 rm -f conftest*
5351 fi
5352
5353 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5354   echo "$ac_t""yes" 1>&6
5355   :
5356 else
5357   echo "$ac_t""no" 1>&6
5358 fi
5359
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
5366 else
5367   ac_save_LIBS="$LIBS"
5368 LIBS="-lipc  $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.  */
5375 char shmat();
5376
5377 int main() {
5378 shmat()
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5382   rm -rf conftest*
5383   eval "ac_cv_lib_$ac_lib_var=yes"
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   eval "ac_cv_lib_$ac_lib_var=no"
5389 fi
5390 rm -f conftest*
5391 LIBS="$ac_save_LIBS"
5392
5393 fi
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"
5397 else
5398   echo "$ac_t""no" 1>&6
5399 fi
5400
5401     fi
5402   fi
5403
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
5418 else
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();
5428
5429 int main() {
5430 IceConnectionNumber()
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_lib_$ac_lib_var=no"
5441 fi
5442 rm -f conftest*
5443 LIBS="$ac_save_LIBS"
5444
5445 fi
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"
5449 else
5450   echo "$ac_t""no" 1>&6
5451 fi
5452
5453   LDFLAGS="$ac_save_LDFLAGS"
5454
5455 fi
5456
5457
5458 XCFLAGS="$X_CFLAGS"
5459
5460 fi # COMPILE_ENVIRONMENT
5461
5462 AS_BIN=$AS
5463 AR_LIST='$(AR) t'
5464 AR_EXTRACT='$(AR) x'
5465 AR_DELETE='$(AR) d'
5466 AS='$(CC)'
5467 AS_DASH_C_FLAG='-c'
5468 DLL_PREFIX=lib
5469 LIB_PREFIX=lib
5470 DLL_SUFFIX=.so
5471 OBJ_SUFFIX=o
5472 LIB_SUFFIX=a
5473 ASM_SUFFIX=s
5474 IMPORT_LIB_SUFFIX=
5475 TARGET_MD_ARCH=unix
5476 DIRENT_INO=d_ino
5477 CYGWIN_WRAPPER=
5478 WIN_TOP_SRC=
5479 MOZ_USER_DIR=".mozilla"
5480
5481 MOZ_JS_LIBS='-L$(libdir) -lmozjs'
5482 MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
5483
5484 MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
5485
5486 USE_DEPENDENT_LIBS=1
5487
5488 _PLATFORM_DEFAULT_TOOLKIT=cairo-gtk2
5489
5490 if test -n "$CROSS_COMPILE"; then
5491     OS_TARGET="${target_os}"
5492     OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
5493     OS_RELEASE=
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 ;;
5503     esac
5504     case "${target}" in
5505         arm-android-eabi) OS_ARCH=Linux OS_TARGET=Android ;;
5506     esac
5507 else
5508     OS_TARGET=`uname -s`
5509     OS_ARCH=`uname -s | sed -e 's|/|_|g'`
5510     OS_RELEASE=`uname -r`
5511 fi
5512
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}"
5516
5517 _COMPILER_PREFIX=
5518
5519 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
5520
5521 #######################################################################
5522 # Master "Core Components" macros for getting the OS target           #
5523 #######################################################################
5524
5525 #
5526 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
5527 # cross-compilation.
5528 #
5529
5530 #
5531 # Define and override various archtecture-specific variables, including
5532 # HOST_OS_ARCH
5533 # OS_ARCH
5534 # OS_TEST
5535 # OS_TARGET
5536 # OS_RELEASE
5537 # OS_MINOR_RELEASE
5538 #
5539
5540 case "$HOST_OS_ARCH" in
5541 cygwin*|mingw*|mks*|msvc*)
5542     HOST_OS_ARCH=WINNT
5543     ;;
5544 darwin*)
5545     HOST_OS_ARCH=Darwin
5546     ;;
5547 linux*)
5548     HOST_OS_ARCH=Linux
5549     ;;
5550 solaris*)
5551     HOST_OS_ARCH=SunOS
5552     SOLARIS_SUNPRO_CC=
5553     SOLARIS_SUNPRO_CXX=
5554     if test -z "$GNU_CC"; then
5555         if test "`$CC -V 2>&1 | egrep -c 'Sun.*C '`" != "0"; then
5556             SOLARIS_SUNPRO_CC=1
5557        fi
5558     fi
5559
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
5563        fi
5564     fi
5565     
5566     
5567     ;;
5568 BSD_386)
5569     HOST_OS_ARCH=BSD
5570     ;;
5571 dgux)
5572     HOST_OS_ARCH=DGUX
5573     ;;
5574 IRIX64)
5575     HOST_OS_ARCH=IRIX
5576     ;;
5577 UNIX_SV)
5578     if "`cat /etc/bcheckrc | grep -c NCR 2>/dev/null`" != "0"; then
5579         HOST_OS_ARCH=NCR
5580     else
5581         HOST_OS_ARCH=UNIXWARE
5582     fi
5583     ;;
5584 ncr)
5585     HOST_OS_ARCH=NCR
5586     ;;
5587 UNIX_SYSTEM_V)
5588     HOST_OS_ARCH=NEC
5589     ;;
5590 OSF1)
5591     ;;
5592 *OpenVMS*)
5593     HOST_OS_ARCH=OpenVMS
5594     ;;
5595 OS_2)
5596     HOST_OS_ARCH=OS2
5597     ;;
5598 QNX)
5599     ;;
5600 SCO_SV)
5601     HOST_OS_ARCH=SCOOS
5602     ;;
5603 SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX-M)
5604     HOST_OS_ARCH=SINIX
5605     ;;
5606 UnixWare)
5607     HOST_OS_ARCH=UNIXWARE
5608     ;;
5609 esac
5610
5611 case "$OS_ARCH" in
5612 WINNT)
5613     if test -z "$CROSS_COMPILE" ; then
5614         OS_TEST=`uname -p`
5615     fi
5616     ;;
5617 Windows_NT)
5618 #
5619 # If uname -s returns "Windows_NT", we assume that we are using
5620 # the uname.exe in MKS toolkit.
5621 #
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.
5625 #
5626     OS_ARCH=WINNT
5627     OS_TARGET=WINNT
5628     OS_MINOR_RELEASE=`uname -v`
5629     if test "$OS_MINOR_RELEASE" = "00"; then
5630         OS_MINOR_RELEASE=0
5631     fi
5632     OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
5633     ;;
5634 CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
5635 #
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.
5643 #
5644     OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
5645     OS_ARCH=WINNT
5646     OS_TARGET=WINNT
5647     ;;
5648 AIX)
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
5653             AIX_IBM_XLC=1
5654         fi
5655     fi
5656     ;;
5657 BSD_386)
5658     OS_ARCH=BSD
5659     ;;
5660 dgux)
5661     OS_ARCH=DGUX
5662     ;;
5663 IRIX64)
5664     OS_ARCH=IRIX
5665     ;;
5666 UNIX_SV)
5667     if "`cat /etc/bcheckrc | grep -c NCR 2>/dev/null`" != "0"; then
5668         OS_ARCH=NCR
5669     else
5670         OS_ARCH=UNIXWARE
5671         OS_RELEASE=`uname -v`
5672     fi
5673     ;;
5674 ncr)
5675     OS_ARCH=NCR
5676     ;;
5677 UNIX_SYSTEM_V)
5678     OS_ARCH=NEC
5679     ;;
5680 OSF1)
5681     case `uname -v` in
5682     148)
5683         OS_RELEASE=V3.2C
5684         ;;
5685     564)
5686         OS_RELEASE=V4.0B
5687         ;;
5688     878)
5689         OS_RELEASE=V4.0D
5690         ;;
5691     esac
5692     ;;
5693 *OpenVMS*)
5694     OS_ARCH=OpenVMS
5695     OS_RELEASE=`uname -v`
5696     OS_TEST=`uname -p`
5697     ;;
5698 OS_2)
5699     OS_ARCH=OS2
5700     OS_TARGET=OS2
5701     OS_RELEASE=`uname -v`
5702     ;;
5703 QNX)
5704     if test "$OS_TARGET" != "NTO"; then
5705         
5706         OS_RELEASE=`uname -v | sed 's/^\([0-9]\)\([0-9]*\)$/\1.\2/'`
5707         
5708     fi
5709     OS_TEST=x86
5710     ;;
5711 SCO_SV)
5712     OS_ARCH=SCOOS
5713     OS_RELEASE=5.0
5714     ;;
5715 SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX-M)
5716     OS_ARCH=SINIX
5717     OS_TEST=`uname -p`
5718     ;;
5719 UnixWare)
5720     OS_ARCH=UNIXWARE
5721     OS_RELEASE=`uname -v`
5722     ;;
5723 WINCE)
5724     OS_ARCH=WINCE
5725     case "${target_os}" in
5726     *winmo)
5727         OS_TARGET=WINMO
5728         WINCE_WINDOWS_MOBILE=1
5729         cat >> confdefs.h <<\EOF
5730 #define WINCE_WINDOWS_MOBILE 1
5731 EOF
5732
5733         ;;
5734     *)
5735         OS_TARGET=WINCE
5736         ;;
5737     esac
5738     ;;
5739 Darwin)
5740     case "${target_cpu}" in
5741     powerpc*)
5742         OS_TEST=ppc
5743         ;;
5744     i*86*)
5745         OS_TEST=i386 
5746         ;;
5747     x86_64)
5748         OS_TEST=x86_64
5749         ;;
5750     *)
5751         if test -z "$CROSS_COMPILE" ; then
5752             OS_TEST=`uname -p`
5753         fi
5754         ;;
5755     esac
5756     ;;
5757 esac
5758
5759 if test "$OS_ARCH" = "NCR"; then
5760     
5761     OS_RELEASE=`awk '{print $3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$/\2.\3/'`
5762     
5763 fi
5764
5765 # Only set CPU_ARCH if we recognize the value of OS_TEST
5766
5767 case "$OS_TEST" in
5768 *86 | i86pc)
5769     CPU_ARCH=x86
5770     ;;
5771
5772 powerpc64 | ppc64)
5773     CPU_ARCH=ppc64
5774     ;;
5775
5776 powerpc | ppc | rs6000)
5777     CPU_ARCH=ppc
5778     ;;
5779
5780 Alpha | alpha | ALPHA)
5781     CPU_ARCH=Alpha
5782     ;;
5783
5784 s390)
5785     CPU_ARCH=s390
5786     ;;
5787
5788 s390x)
5789     CPU_ARCH=s390x
5790     ;;
5791
5792 hppa* | parisc)
5793     CPU_ARCH=hppa
5794     ;;
5795
5796 sun4u | sparc*)
5797     CPU_ARCH=sparc
5798     ;;
5799
5800 x86_64 | ia64)
5801     CPU_ARCH="$OS_TEST"
5802     ;;
5803
5804 arm*)
5805     CPU_ARCH=arm
5806     ;;
5807
5808 mips|mipsel)
5809     CPU_ARCH="mips"
5810     ;;
5811 esac
5812
5813 if test -z "$OS_TARGET"; then
5814     OS_TARGET=$OS_ARCH
5815 fi
5816 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
5817
5818 INTEL_ARCHITECTURE=
5819 case "$OS_TEST" in
5820     x86_64|i?86)
5821       INTEL_ARCHITECTURE=1
5822 esac
5823
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"
5833     fi
5834     WARNINGS_AS_ERRORS='-Werror'
5835     DSO_CFLAGS=''
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'
5842
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
5853        case "$CPU_ARCH" in
5854            # And don't use it on hppa, ia64, sparc, arm, since it's noisy there
5855            hppa | ia64 | sparc | arm)
5856            ;;
5857            *)
5858         _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wcast-align"
5859            ;;
5860        esac
5861     fi
5862
5863         _PEDANTIC=1
5864
5865     if test -z "$INTEL_CC"; then
5866       _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -W"
5867     fi
5868
5869     _DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT'
5870     _USE_CPP_INCLUDE_FLAG=1
5871 elif test "$SOLARIS_SUNPRO_CC"; then
5872     DSO_CFLAGS=''
5873     if test "$CPU_ARCH" = "sparc"; then
5874         # for Sun Studio on Solaris/SPARC
5875         DSO_PIC_CFLAGS='-xcode=pic32'
5876     else
5877         DSO_PIC_CFLAGS='-KPIC'
5878     fi
5879     _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
5880 else
5881     MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
5882     MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
5883
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"
5888     fi
5889
5890     DSO_CFLAGS=''
5891     DSO_PIC_CFLAGS='-KPIC'
5892     _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
5893 fi
5894
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
5902        case "$CPU_ARCH" in
5903            # And don't use it on hppa, ia64, sparc, arm, since it's noisy there
5904            hppa | ia64 | sparc | arm)
5905            ;;
5906            *)
5907         _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wcast-align"
5908            ;;
5909        esac
5910     fi
5911
5912     _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/js-confdefs.h'
5913     _USE_CPP_INCLUDE_FLAG=1
5914
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
5919 else
5920   
5921             
5922             ac_ext=C
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
5928
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"
5934
5935 int main() {
5936 return(0);
5937 ; return 0; }
5938 EOF
5939 if { (eval echo configure:5940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5940   rm -rf conftest*
5941   ac_has_wno_invalid_offsetof="yes"
5942 else
5943   echo "configure: failed program was:" >&5
5944   cat conftest.$ac_ext >&5
5945   rm -rf conftest*
5946   ac_has_wno_invalid_offsetof="no"
5947 fi
5948 rm -f conftest*
5949             CXXFLAGS="$_SAVE_CXXFLAGS"
5950             ac_ext=c
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
5956
5957         
5958 fi
5959
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"
5963     fi
5964
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
5969 else
5970   
5971             
5972             ac_ext=C
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
5978
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"
5984
5985 int main() {
5986 return(0);
5987 ; return 0; }
5988 EOF
5989 if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5990   rm -rf conftest*
5991   ac_has_wno_variadic_macros="yes"
5992 else
5993   echo "configure: failed program was:" >&5
5994   cat conftest.$ac_ext >&5
5995   rm -rf conftest*
5996   ac_has_wno_variadic_macros="no"
5997 fi
5998 rm -f conftest*
5999             CXXFLAGS="$_SAVE_CXXFLAGS"
6000             ac_ext=c
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
6006
6007         
6008 fi
6009
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"
6013     fi
6014
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
6019 else
6020   
6021             
6022             ac_ext=C
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
6028
6029             _SAVE_CXXFLAGS="$CXXFLAGS"
6030             CXXFLAGS="$CXXFLAGS -Werror=return-type"
6031             cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034
6035 int main() {
6036 return(0);
6037 ; return 0; }
6038 EOF
6039 if { (eval echo configure:6040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6040   rm -rf conftest*
6041   ac_has_werror_return_type="yes"
6042 else
6043   echo "configure: failed program was:" >&5
6044   cat conftest.$ac_ext >&5
6045   rm -rf conftest*
6046   ac_has_werror_return_type="no"
6047 fi
6048 rm -f conftest*
6049             CXXFLAGS="$_SAVE_CXXFLAGS"
6050             ac_ext=c
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
6056
6057         
6058 fi
6059
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"
6063     fi
6064
6065 else
6066     _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_JS_CONFDEFS_H_ $(ACDEFINES)'
6067 fi
6068
6069 MKSHLIB_FORCE_ALL=
6070 MKSHLIB_UNFORCE_ALL=
6071
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
6078 else
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"
6085 LOOP_INPUT
6086     while read line
6087     do
6088       eval $line
6089       LDFLAGS=$force
6090       LIBS=$unforce
6091       cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094
6095 int main() {
6096
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100   rm -rf conftest*
6101   ac_cv_mkshlib_force_and_unforce=$line; break
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105 fi
6106 rm -f conftest*
6107     done
6108     exec 0<&3 3<&-
6109     LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS
6110    
6111 fi
6112
6113   if test "$ac_cv_mkshlib_force_and_unforce" = "no"; then
6114     echo "$ac_t""no" 1>&6
6115   else
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
6120   fi
6121 fi # GNU_CC
6122 fi # COMPILE_ENVIRONMENT
6123
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]
6129 '
6130
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
6135 else
6136   
6137   ac_ext=c
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
6143
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
6149 int main() {
6150 CONFIGURE_STATIC_ASSERT(1)
6151 ; return 0; }
6152 EOF
6153 if { (eval echo configure:6154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6154   :
6155 else
6156   echo "configure: failed program was:" >&5
6157   cat conftest.$ac_ext >&5
6158   rm -rf conftest*
6159   ac_cv_static_assertion_macros_work="no"
6160 fi
6161 rm -f conftest*
6162   cat > conftest.$ac_ext <<EOF
6163 #line 6164 "configure"
6164 #include "confdefs.h"
6165 $configure_static_assert_macros
6166 int main() {
6167 CONFIGURE_STATIC_ASSERT(0)
6168 ; return 0; }
6169 EOF
6170 if { (eval echo configure:6171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6171   rm -rf conftest*
6172   ac_cv_static_assertion_macros_work="no"
6173 else
6174   echo "configure: failed program was:" >&5
6175   cat conftest.$ac_ext >&5
6176 fi
6177 rm -f conftest*
6178   ac_ext=C
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
6184
6185   cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 $configure_static_assert_macros
6189 int main() {
6190 CONFIGURE_STATIC_ASSERT(1)
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6194   :
6195 else
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   ac_cv_static_assertion_macros_work="no"
6200 fi
6201 rm -f conftest*
6202   cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6205 $configure_static_assert_macros
6206 int main() {
6207 CONFIGURE_STATIC_ASSERT(0)
6208 ; return 0; }
6209 EOF
6210 if { (eval echo configure:6211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6211   rm -rf conftest*
6212   ac_cv_static_assertion_macros_work="no"
6213 else
6214   echo "configure: failed program was:" >&5
6215   cat conftest.$ac_ext >&5
6216 fi
6217 rm -f conftest*
6218   ac_ext=c
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
6224
6225  
6226 fi
6227
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; }
6231 fi
6232 fi # COMPILE_ENVIRONMENT
6233
6234 if test "$COMPILE_ENVIRONMENT"; then
6235
6236 ac_ext=c
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
6242
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
6249 int main() {
6250 CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)
6251 ; return 0; }
6252 EOF
6253 if { (eval echo configure:6254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6254   rm -rf conftest*
6255   result="yes"
6256 else
6257   echo "configure: failed program was:" >&5
6258   cat conftest.$ac_ext >&5
6259   rm -rf conftest*
6260   result="no"
6261 fi
6262 rm -f conftest*
6263 echo "$ac_t"""$result"" 1>&6
6264 if test "$result" = "yes"; then
6265     cat >> confdefs.h <<\EOF
6266 #define HAVE_64BIT_OS 1
6267 EOF
6268
6269     HAVE_64BIT_OS=1
6270 fi
6271
6272 ac_ext=c
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
6278
6279 fi # COMPILE_ENVIRONMENT
6280
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 
6289   else
6290     { echo "configure: error: Option, os2-high-mem, does not take an argument ($enableval)." 1>&2; exit 1; }
6291   fi
6292 fi
6293
6294
6295
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
6300     MOZ_PROFILING=1
6301   elif test "$enableval" = "no"; then
6302     MOZ_PROFILING= 
6303   else
6304     { echo "configure: error: Option, profiling, does not take an argument ($enableval)." 1>&2; exit 1; }
6305   fi
6306 fi
6307
6308
6309 case "$host" in
6310 *-beos*)
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}"
6314     ;;
6315
6316 *cygwin*|*mingw*|*mks*|*msvc*|*wince|*winmo)
6317     # we need Python 2.5 on Windows
6318     PYTHON_VERSION=2.5
6319     if test -n "$_WIN32_MSVC"; then
6320         HOST_AR=lib
6321         HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
6322         HOST_CFLAGS="$HOST_CFLAGS -TC -nologo -Fd\$(HOST_PDBFILE)"
6323         HOST_RANLIB='echo ranlib'
6324     else
6325         HOST_CFLAGS="$HOST_CFLAGS -mno-cygwin"
6326     fi
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
6331     case "$host" in
6332     *mingw*)
6333             PERL="/bin/sh ${_topsrcdir}/build/msys-perl-wrapper"
6334         ;;
6335     *)
6336         CYGWIN_WRAPPER="${srcdir}/build/cygwin-wrapper"
6337         if test "`echo ${srcdir} | grep -c ^/ 2>/dev/null`" = 0; then
6338             _pwd=`pwd`
6339             CYGWIN_WRAPPER="${_pwd}/${srcdir}/build/cygwin-wrapper"
6340         fi
6341         if test "`${PERL} -v | grep -c cygwin  2>/dev/null`" = 0; then
6342             AS_PERL=1
6343             PERL="${CYGWIN_WRAPPER} $PERL"
6344         fi
6345
6346         if test "`${PYTHON} -c 'import sys; print sys.platform;'`" != "cygwin"; then
6347             PYTHON="${CYGWIN_WRAPPER} $PYTHON"
6348         fi
6349         ;;
6350     esac
6351
6352     case "${host_cpu}" in
6353     x86_64)
6354         HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_"
6355         ;;
6356     esac
6357     ;;
6358
6359 *-darwin*)
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}"
6363     ;;
6364
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}"
6369     ;;
6370
6371 *os2*)
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
6376     MOZ_FIX_LINK_PATHS=
6377     ;;
6378
6379 *-osf*)
6380     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
6381     HOST_NSPR_MDCPUCFG='\"md/_osf1.cfg\"'
6382     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
6383     ;;
6384
6385 *)
6386     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
6387     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
6388     ;;
6389 esac
6390
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
6393
6394 $PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1] or sys.version[:2] != '2.')" $PYTHON_VERSION
6395 _python_res=$?
6396
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; }
6399 fi
6400 echo "$ac_t""yes" 1>&6
6401
6402
6403 case "$target" in
6404 *-aix*)
6405     cat >> confdefs.h <<\EOF
6406 #define AIX 1
6407 EOF
6408
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"
6416             else
6417                 AIX_OBJMODEL=compat
6418             fi
6419         else
6420             AIX_OBJMODEL=compat
6421         fi
6422         
6423         DSO_LDOPTS='-qmkshrobj=1'
6424         DSO_CFLAGS='-qflag=w:w'
6425         DSO_PIC_CFLAGS=
6426         LDFLAGS="$LDFLAGS -Wl,-brtl -blibpath:/usr/lib:/lib"
6427         MOZ_FIX_LINK_PATHS=
6428         MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
6429         MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
6430         if test "$COMPILE_ENVIRONMENT"; then
6431             
6432             ac_ext=C
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
6438
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"
6444
6445 int main() {
6446 #if (__IBMCPP__ < 900)
6447                  #error "Bad compiler"
6448                  #endif
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6452   rm -rf conftest*
6453   _BAD_COMPILER=
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457   rm -rf conftest*
6458   _BAD_COMPILER=1
6459 fi
6460 rm -f conftest*
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; }
6464             else
6465                 echo "$ac_t""yes" 1>&6    
6466             fi
6467             ac_ext=c
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
6473
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 }'`
6477         fi
6478     fi
6479     case "${target_os}" in
6480     aix4.1*)
6481         DLL_SUFFIX='_shr.a'
6482         ;;
6483     esac
6484     if test "$COMPILE_ENVIRONMENT"; then
6485         for ac_hdr in sys/inttypes.h
6486 do
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
6492 else
6493   cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 #include <$ac_hdr>
6497 EOF
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
6502   rm -rf conftest*
6503   eval "ac_cv_header_$ac_safe=yes"
6504 else
6505   echo "$ac_err" >&5
6506   echo "configure: failed program was:" >&5
6507   cat conftest.$ac_ext >&5
6508   rm -rf conftest*
6509   eval "ac_cv_header_$ac_safe=no"
6510 fi
6511 rm -f conftest*
6512 fi
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
6518 EOF
6519  
6520 else
6521   echo "$ac_t""no" 1>&6
6522 fi
6523 done
6524
6525     fi
6526     cat >> confdefs.h <<\EOF
6527 #define JS_SYS_TYPES_H_DEFINES_EXACT_SIZE_TYPES 1
6528 EOF
6529
6530     cat >> confdefs.h <<\EOF
6531 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6532 EOF
6533
6534     ;;
6535
6536 *-beos*)
6537     no_x=yes
6538     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
6539     _PLATFORM_DEFAULT_TOOLKIT="cairo-beos"
6540     DSO_LDOPTS='-nostart'
6541     TK_LIBS='-lbe -lroot'
6542     LIBS="$LIBS -lbe"
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
6549 else
6550   ac_save_LIBS="$LIBS"
6551 LIBS="-lbind  $LIBS"
6552 cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555
6556 int main() {
6557 main()
6558 ; return 0; }
6559 EOF
6560 if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6561   rm -rf conftest*
6562   eval "ac_cv_lib_$ac_lib_var=yes"
6563 else
6564   echo "configure: failed program was:" >&5
6565   cat conftest.$ac_ext >&5
6566   rm -rf conftest*
6567   eval "ac_cv_lib_$ac_lib_var=no"
6568 fi
6569 rm -f conftest*
6570 LIBS="$ac_save_LIBS"
6571
6572 fi
6573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6574   echo "$ac_t""yes" 1>&6
6575   LIBS="$LIBS -lbind"
6576 else
6577   echo "$ac_t""no" 1>&6
6578 fi
6579
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
6585 else
6586   ac_save_LIBS="$LIBS"
6587 LIBS="-lzeta  $LIBS"
6588 cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591
6592 int main() {
6593 main()
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6597   rm -rf conftest*
6598   eval "ac_cv_lib_$ac_lib_var=yes"
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=no"
6604 fi
6605 rm -f conftest*
6606 LIBS="$ac_save_LIBS"
6607
6608 fi
6609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6610   echo "$ac_t""yes" 1>&6
6611   LIBS="$LIBS -lzeta"
6612 else
6613   echo "$ac_t""no" 1>&6
6614 fi
6615
6616     fi
6617     _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar"
6618     _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar"
6619     _MOZ_USE_RTTI=1
6620     USE_DEPENDENT_LIBS=
6621     MOZ_USER_DIR="Mozilla"
6622     ;;
6623
6624 *-bsdi*)
6625         _PEDANTIC=
6626     case $OS_RELEASE in
6627         4.*|5.*)
6628             STRIP="$STRIP -d"
6629             ;;
6630         *)
6631             DSO_CFLAGS=''
6632             DSO_LDOPTS='-r'
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=''
6638         ;;
6639     esac
6640     ;;
6641
6642 *-darwin*) 
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"
6648     else
6649         MOZ_OPTIMIZE_FLAGS="-O3 -fno-omit-frame-pointer"
6650     fi
6651     _PEDANTIC=
6652     CFLAGS="$CFLAGS -fpascal-strings -fno-common"
6653     CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common"
6654     DLL_SUFFIX=".dylib"
6655     DSO_LDOPTS=''
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
6663     # builds.
6664     MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"
6665
6666             if test "x$enable_dtrace" = "xyes"; then
6667         echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
6668     else
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"
6676
6677 int main() {
6678 return 0;
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   _HAVE_DEAD_STRIP=1
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   _HAVE_DEAD_STRIP=
6689 fi
6690 rm -f conftest*
6691         if test -n "$_HAVE_DEAD_STRIP" ; then
6692             echo "$ac_t""yes" 1>&6
6693             MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip"
6694         else
6695             echo "$ac_t""no" 1>&6
6696         fi
6697         
6698         LDFLAGS=$_SAVE_LDFLAGS
6699     fi
6700     MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
6701     ;;
6702
6703 *-freebsd*)
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"
6707     fi
6708     if test ! "$GNU_CC"; then
6709         DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
6710     fi
6711     ;; 
6712
6713 ia64*-hpux*)
6714     DLL_SUFFIX=".so"
6715     if test ! "$GNU_CC"; then
6716        DSO_LDOPTS='-b'
6717        DSO_CFLAGS=""
6718        DSO_PIC_CFLAGS=
6719        MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
6720        MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
6721        CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
6722     else
6723        DSO_LDOPTS='-b -E'
6724        MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6725        MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6726     fi
6727     MOZ_FIX_LINK_PATHS=
6728     SYSTEM_MAKEDEPEND=
6729     cat >> confdefs.h <<\EOF
6730 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6731 EOF
6732
6733     cat >> confdefs.h <<\EOF
6734 #define _LARGEFILE64_SOURCE 1
6735 EOF
6736
6737     ;;
6738
6739 *-hpux*)
6740     DLL_SUFFIX=".sl"
6741     if test ! "$GNU_CC"; then
6742         DSO_LDOPTS='-b -Wl,+s'
6743         DSO_CFLAGS=""
6744         DSO_PIC_CFLAGS="+Z"
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"
6748     else
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 $@'
6752     fi
6753     MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
6754     cat >> confdefs.h <<\EOF
6755 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6756 EOF
6757
6758     ;;
6759
6760 *-irix5*)
6761     cat >> confdefs.h <<\EOF
6762 #define IRIX 1
6763 EOF
6764
6765     DSO_LDOPTS='-elf -shared'
6766
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"
6773     else
6774        MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6775        MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
6776        MKSHLIB_FORCE_ALL='-all'
6777        MKSHLIB_UNFORCE_ALL='-none'
6778     fi
6779     ;;
6780
6781 *-irix6*)
6782     cat >> confdefs.h <<\EOF
6783 #define IRIX 1
6784 EOF
6785
6786             USE_N32=1
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"
6799     else
6800        MKSHLIB_FORCE_ALL='-all'
6801        MKSHLIB_UNFORCE_ALL='-none'
6802            AR_LIST="$AR t"
6803            AR_EXTRACT="$AR x"
6804            AR_DELETE="$AR d"
6805            AR='$(CXX) -ar'
6806            AR_FLAGS='-o $@'
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"
6814        fi
6815        cat >> confdefs.h <<\EOF
6816 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
6817 EOF
6818
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
6820        MOZ_FIX_LINK_PATHS=
6821     fi
6822     if test -z "$GNU_CXX"; then
6823       MIPSPRO_CXX=1
6824     fi
6825     ;;
6826
6827 *-*linux*)
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
6838         4.1.*|4.2.*|4.5.*)
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"
6841         esac
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"
6845         else
6846             MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-omit-frame-pointer $MOZ_OPTIMIZE_SIZE_TWEAK"
6847         fi
6848         MOZ_DEBUG_FLAGS="-g"
6849     fi
6850
6851     TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
6852
6853     case "${target_cpu}" in
6854     alpha*)
6855         CFLAGS="$CFLAGS -mieee"
6856         CXXFLAGS="$CXXFLAGS -mieee"
6857     ;;
6858     mips*)
6859         MOZ_DEBUG_FLAGS="-g" # We want inlining
6860     ;;
6861     esac
6862     ;;
6863
6864 *-wince*|*-winmo*)
6865     TARGET_COMPILER_ABI=msvc
6866     MOZ_TOOLS_DIR=`echo $MOZ_TOOLS`
6867     AR_LIST="$AR -list"
6868     AR_EXTRACT="$AR -extract"
6869     AR_DELETE="$AR d"
6870     AR_FLAGS='-OUT:"$@"'
6871     AS="$AS_BIN"
6872
6873     DSO_CFLAGS=
6874     DSO_PIC_CFLAGS=
6875     DLL_SUFFIX=.dll
6876     BIN_SUFFIX='.exe'
6877     if test -z "$RC"; then 
6878         RC=rc.exe  
6879     fi
6880     # certain versions of cygwin's makedepend barf on the 
6881     # #include <string> vs -I./dist/include/string issue so don't use it
6882     SYSTEM_MAKEDEPEND=
6883
6884     HOST_CC=cl
6885     HOST_CXX=cl
6886     HOST_LD=link
6887     HOST_AR='lib -OUT:$@'
6888     HOST_RANLIB='echo ranlib'
6889     HOST_CFLAGS="$HOST_CFLAGS -D_X86_"
6890         
6891         
6892     WARNINGS_AS_ERRORS='-WX'
6893     MOZ_OPTIMIZE_FLAGS='-Ox'
6894     AR_FLAGS='-NOLOGO -OUT:"$@"'
6895     ASM_SUFFIX=asm
6896     CFLAGS="$CFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
6897     CXXFLAGS="$CXXFLAGS -W3 -Gy -Fd\$(COMPILE_PDBFILE)"
6898     DLL_PREFIX=
6899     DOXYGEN=:
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'
6902     GARBAGE=
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'
6906     LIB_PREFIX=
6907     LIB_SUFFIX=lib 
6908     MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ $(DSO_LDOPTS)'
6909     MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ $(DSO_LDOPTS)'
6910     MKSHLIB_FORCE_ALL=
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'
6916     MOZ_FIX_LINK_PATHS=
6917     MOZ_JS_LIBS='$(libdir)/mozjs.lib'
6918     OBJ_SUFFIX=obj
6919     RANLIB='echo not_ranlib'
6920     STRIP='echo not_strip'
6921     TARGET_NSPR_MDCPUCFG='\"md/_wince.cfg\"'
6922     UNZIP=unzip
6923     XARGS=xargs
6924     XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
6925     ZIP=zip
6926
6927     cat >> confdefs.h <<\EOF
6928 #define HAVE_SNPRINTF 1
6929 EOF
6930
6931     cat >> confdefs.h <<\EOF
6932 #define _WINDOWS 1
6933 EOF
6934
6935     cat >> confdefs.h <<\EOF
6936 #define WIN32 1
6937 EOF
6938
6939     cat >> confdefs.h <<\EOF
6940 #define XP_WIN 1
6941 EOF
6942
6943     cat >> confdefs.h <<\EOF
6944 #define XP_WIN32 1
6945 EOF
6946
6947     cat >> confdefs.h <<\EOF
6948 #define HW_THREADS 1
6949 EOF
6950
6951     cat >> confdefs.h <<\EOF
6952 #define STDC_HEADERS 1
6953 EOF
6954
6955     cat >> confdefs.h <<\EOF
6956 #define NEW_H <new>
6957 EOF
6958
6959     cat >> confdefs.h <<\EOF
6960 #define WIN32_LEAN_AND_MEAN 1
6961 EOF
6962
6963     cat >> confdefs.h <<\EOF
6964 #define HAVE_LOCALTIME_R 1
6965 EOF
6966
6967
6968     TARGET_MD_ARCH=win32
6969     _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
6970     BIN_SUFFIX='.exe'
6971     MOZ_USER_DIR="Mozilla"
6972
6973         WINCE_WINDOWS_MOBILE=1
6974
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
6982   else
6983     { echo "configure: error: Option, windows-mobile-components, does not take an argument ($enableval)." 1>&2; exit 1; }
6984   fi
6985 fi
6986
6987  
6988     if test "$WINCE_WINDOWS_MOBILE"; then
6989         cat >> confdefs.h <<\EOF
6990 #define WINCE_WINDOWS_MOBILE 1
6991 EOF
6992
6993     fi
6994 ;;
6995
6996 *-symbian*)
6997
6998     cat >> confdefs.h <<\EOF
6999 #define XP_UNIX 1
7000 EOF
7001
7002     cat >> confdefs.h <<\EOF
7003 #define SYMBIAN 1
7004 EOF
7005
7006     cat >> confdefs.h <<\EOF
7007 #define __arm__ 1
7008 EOF
7009
7010     cat >> confdefs.h <<\EOF
7011 #define __SYMBIAN32__ 1
7012 EOF
7013
7014     cat >> confdefs.h <<\EOF
7015 #define _UNICODE 1
7016 EOF
7017
7018     cat >> confdefs.h <<\EOF
7019 #define NDEBUG 1
7020 EOF
7021
7022     cat >> confdefs.h <<\EOF
7023 #define __SUPPORT_CPP_EXCEPTIONS__ 1
7024 EOF
7025
7026     cat >> confdefs.h <<\EOF
7027 #define MOZ_STDERR_TO_STDOUT 1
7028 EOF
7029
7030     cat >> confdefs.h <<\EOF
7031 #define HAVE_FCNTL_FILE_LOCKING 1
7032 EOF
7033
7034     cat >> confdefs.h <<\EOF
7035 #define HAVE_SOCKLEN_T 1
7036 EOF
7037
7038     cat >> confdefs.h <<\EOF
7039 #define __GCCE__ 1
7040 EOF
7041
7042
7043     CPU_ARCH=ARM
7044     OS_RELEASE=9.2
7045     OS_ARCH=SYMBIAN
7046     USE_PTHREADS=1
7047     LIB_SUFFIX=lib
7048     DLL_SUFFIX=dll
7049     MKSHLIB=
7050     DSO_LDOPTS=
7051     DSO_CFLAGS=
7052     VISIBILITY_FLAGS=
7053     TARGET_NSPR_MDCPUCFG='\"md/_symbian.cfg\"'
7054     RANLIB='echo no ranlib '
7055 ;;
7056
7057 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
7058     DSO_CFLAGS=
7059     DSO_PIC_CFLAGS=
7060     DLL_SUFFIX=.dll
7061     RC=rc.exe
7062     # certain versions of cygwin's makedepend barf on the 
7063     # #include <string> vs -I./dist/include/string issue so don't use it
7064     SYSTEM_MAKEDEPEND=
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 $@'
7074         RC='$(WINDRES)'
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'
7080         MOZ_FIX_LINK_PATHS=
7081         DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core -lmozalloc'
7082         XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom -lmozalloc'
7083         DLL_PREFIX=
7084         IMPORT_LIB_SUFFIX=dll.a
7085         GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
7086     else
7087         TARGET_COMPILER_ABI=msvc
7088         HOST_CC='$(CC)'
7089         HOST_CXX='$(CXX)'
7090         HOST_LD='$(LD)'
7091         if test "$AS_BIN"; then
7092             AS="$(basename "$AS_BIN")"
7093         fi
7094         AR='lib -NOLOGO -OUT:"$@"'
7095         AR_FLAGS=
7096         RANLIB='echo not_ranlib'
7097         STRIP='echo not_strip'
7098         PKG_SKIP_STRIP=1
7099         XARGS=xargs
7100         ZIP=zip
7101         UNZIP=unzip
7102         DOXYGEN=:
7103         GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
7104         ASM_SUFFIX=asm
7105         OBJ_SUFFIX=obj
7106         LIB_SUFFIX=lib
7107         DLL_PREFIX=
7108         LIB_PREFIX=
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)'
7112         MKSHLIB_FORCE_ALL=
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'
7129         else
7130             MOZ_OPTIMIZE_FLAGS='-O1 -Oy-'
7131         fi
7132         MOZ_JS_LIBS='$(libdir)/mozjs.lib'
7133         MOZ_FIX_LINK_PATHS=
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"
7145         fi
7146     fi
7147     cat >> confdefs.h <<\EOF
7148 #define HAVE_SNPRINTF 1
7149 EOF
7150
7151     cat >> confdefs.h <<\EOF
7152 #define _WINDOWS 1
7153 EOF
7154
7155     cat >> confdefs.h <<\EOF
7156 #define WIN32 1
7157 EOF
7158
7159     cat >> confdefs.h <<\EOF
7160 #define XP_WIN 1
7161 EOF
7162
7163     cat >> confdefs.h <<\EOF
7164 #define XP_WIN32 1
7165 EOF
7166
7167     cat >> confdefs.h <<\EOF
7168 #define HW_THREADS 1
7169 EOF
7170
7171     cat >> confdefs.h <<\EOF
7172 #define STDC_HEADERS 1
7173 EOF
7174
7175     cat >> confdefs.h <<\EOF
7176 #define NEW_H <new>
7177 EOF
7178
7179     cat >> confdefs.h <<\EOF
7180 #define WIN32_LEAN_AND_MEAN 1
7181 EOF
7182
7183     TARGET_MD_ARCH=win32
7184     _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
7185     BIN_SUFFIX='.exe'
7186     MOZ_USER_DIR="Mozilla"
7187
7188         TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
7189
7190         no_x=yes
7191     cat >> confdefs.h <<\EOF
7192 #define NO_X11 1
7193 EOF
7194
7195
7196         case "$host" in
7197     *-mingw*)
7198         CYGPATH_W=echo
7199         CYGPATH_S=cat
7200         MOZ_BUILD_ROOT=`cd $MOZ_BUILD_ROOT && pwd -W`
7201         ;;
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`
7206         ;;
7207     esac
7208     case "$host" in
7209     *-mingw*|*-cygwin*|*-msvc*|*-mks*)
7210
7211     if test -z "$MOZ_TOOLS"; then
7212         { echo "configure: error: MOZ_TOOLS is not set" 1>&2; exit 1; }
7213     fi
7214
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; }
7218     fi
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; }
7222     fi
7223     MOZ_TOOLS_DIR=`$CYGPATH_W $MOZ_TOOLS_DIR | $CYGPATH_S`
7224     ;;
7225     esac 
7226
7227
7228     case "$host_os" in
7229     cygwin*|msvc*|mks*)
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
7231         ;;
7232     esac
7233
7234     case "$target" in
7235     i*86-*)
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; }
7238         fi
7239
7240         if test $_MSC_VER -ge 1400; then
7241             LDFLAGS="$LDFLAGS -SAFESEH"
7242         fi
7243
7244         if test -n "$GNU_CC"; then
7245             CFLAGS="$CFLAGS -mstackrealign"
7246             CXXFLAGS="$CXXFLAGS -mstackrealign"
7247         fi
7248
7249         for ac_hdr in mmintrin.h
7250 do
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
7256 else
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <$ac_hdr>
7261 EOF
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
7266   rm -rf conftest*
7267   eval "ac_cv_header_$ac_safe=yes"
7268 else
7269   echo "$ac_err" >&5
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -rf conftest*
7273   eval "ac_cv_header_$ac_safe=no"
7274 fi
7275 rm -f conftest*
7276 fi
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
7282 EOF
7283  
7284 else
7285   echo "$ac_t""no" 1>&6
7286 fi
7287 done
7288
7289         cat >> confdefs.h <<\EOF
7290 #define _X86_ 1
7291 EOF
7292
7293         ;;
7294     alpha-*)
7295         cat >> confdefs.h <<\EOF
7296 #define _ALPHA_ 1
7297 EOF
7298
7299         ;;
7300     mips-*)
7301         cat >> confdefs.h <<\EOF
7302 #define _MIPS_ 1
7303 EOF
7304
7305         ;;
7306     x86_64-*)
7307         cat >> confdefs.h <<\EOF
7308 #define _AMD64_ 1
7309 EOF
7310
7311         ;;
7312     *)
7313         cat >> confdefs.h <<\EOF
7314 #define _CPU_ARCH_NOT_DEFINED 1
7315 EOF
7316
7317         ;;
7318     esac
7319
7320     if test "$HAVE_64BIT_OS"; then
7321         cat >> confdefs.h <<\EOF
7322 #define _WIN64 1
7323 EOF
7324
7325     fi
7326     ;;
7327
7328 *-netbsd*)
7329     DSO_CFLAGS=''
7330     CFLAGS="$CFLAGS -Dunix"
7331     CXXFLAGS="$CXXFLAGS -Dunix"
7332     if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
7333         DLL_SUFFIX=".so"
7334         DSO_PIC_CFLAGS='-fPIC -DPIC'
7335         DSO_LDOPTS='-shared'
7336         BIN_FLAGS='-Wl,--export-dynamic'
7337     else
7338         DSO_PIC_CFLAGS='-fPIC -DPIC'
7339         DLL_SUFFIX=".so.1.0"
7340         DSO_LDOPTS='-shared'
7341     fi
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"
7347     fi
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 $@'
7350     ;;
7351
7352 *-nto*) 
7353         cat >> confdefs.h <<\EOF
7354 #define NTO 1
7355 EOF
7356         
7357         cat >> confdefs.h <<\EOF
7358 #define _QNX_SOURCE 1
7359 EOF
7360
7361         cat >> confdefs.h <<\EOF
7362 #define _i386 1
7363 EOF
7364
7365         OS_TARGET=NTO
7366         WARNINGS_AS_ERRORS=''
7367         MOZ_OPTIMIZE_FLAGS="-O"
7368         MOZ_DEBUG_FLAGS="-gstabs"
7369         USE_PTHREADS=1
7370         _PEDANTIC=
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"
7375         then
7376                 _PLATFORM_DEFAULT_TOOLKIT="photon"
7377             TK_CFLAGS='-I/usr/include/photon'
7378                 TK_LIBS='-lph'
7379         fi
7380         case "${target_cpu}" in
7381         ppc*)
7382         cat >> confdefs.h <<\EOF
7383 #define HAVE_VA_LIST_AS_ARRAY 1
7384 EOF
7385         
7386         ;;
7387         esac
7388         ;;
7389
7390 *-openbsd*)
7391     DLL_SUFFIX=".so.1.0"
7392     DSO_CFLAGS=''
7393     DSO_PIC_CFLAGS='-fPIC'
7394     DSO_LDOPTS='-shared -fPIC'
7395     if test "$LIBRUNPATH"; then
7396         DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
7397     fi
7398     ;;
7399
7400 *-openvms*) 
7401     cat >> confdefs.h <<\EOF
7402 #define NO_PW_GECOS 1
7403 EOF
7404
7405     cat >> confdefs.h <<\EOF
7406 #define NO_UDSOCK 1
7407 EOF
7408
7409     cat >> confdefs.h <<\EOF
7410 #define POLL_WITH_XCONNECTIONNUMBER 1
7411 EOF
7412
7413     USE_PTHREADS=1
7414     MKSHLIB_FORCE_ALL='-all'
7415     MKSHLIB_UNFORCE_ALL='-none'
7416     AS='as'
7417     AS_DASH_C_FLAG='-Wc/names=as_is'
7418     AR_FLAGS='c $@'
7419     DSO_LDOPTS='-shared -auto_symvec'
7420     DSO_PIC_CFLAGS=
7421     MOZ_DEBUG_LDFLAGS='-g'
7422     COMPAQ_CXX=1
7423     CC_VERSION=`$CC -V 2>&1 | awk '/ C / { print $3 }'`
7424     CXX_VERSION=`$CXX -V 2>&1 | awk '/ C\+\+ / { print $3 }'`
7425     ;;
7426
7427
7428 *-os2*)
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
7432 #define OS2 1
7433 EOF
7434
7435     cat >> confdefs.h <<\EOF
7436 #define XP_OS2 1
7437 EOF
7438
7439     cat >> confdefs.h <<\EOF
7440 #define OS2EMX_PLAIN_CHAR 1
7441 EOF
7442
7443     cat >> confdefs.h <<\EOF
7444 #define TCPV40HDRS 1
7445 EOF
7446
7447     DLL_PREFIX=
7448     LIB_PREFIX=
7449     LIB_SUFFIX=lib
7450     BIN_SUFFIX=".exe"
7451     DLL_SUFFIX=".dll"
7452     IMPORT_LIB_SUFFIX=lib
7453     DSO_PIC_CFLAGS=
7454     AR=emxomfar
7455     AR_FLAGS='r $@'
7456     CFLAGS="$CFLAGS -Zomf"
7457     CXXFLAGS="$CXXFLAGS -Zomf"
7458     DSO_LDOPTS='-Zdll'
7459     BIN_FLAGS='-Zlinker /ST:0x100000'
7460     IMPLIB='emximp -o'
7461     FILTER='true'
7462     LDFLAGS='-Zmap'
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'
7469     TARGET_MD_ARCH=os2
7470     _PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
7471     RC=rc.exe
7472     RCFLAGS='-n'
7473     MOZ_USER_DIR="Mozilla"
7474
7475     if test "$MOZTOOLS"; then
7476         MOZ_TOOLS_DIR=`echo $MOZTOOLS | sed -e 's|\\\\|/|g'`
7477     else
7478         { echo "configure: error: MOZTOOLS is not set" 1>&2; exit 1; }
7479     fi
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
7486 EOF
7487
7488     fi
7489
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__"
7493
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
7498 else
7499   cat > conftest.$ac_ext <<EOF
7500 #line 7501 "configure"
7501 #include "confdefs.h"
7502 __declspec(dllexport) void ac_os2_declspec(void) {}
7503 int main() {
7504 return 0;
7505 ; return 0; }
7506 EOF
7507 if { (eval echo configure:7508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7508   rm -rf conftest*
7509   ac_os2_declspec="yes"
7510 else
7511   echo "configure: failed program was:" >&5
7512   cat conftest.$ac_ext >&5
7513   rm -rf conftest*
7514   ac_os2_declspec="no"
7515 fi
7516 rm -f conftest*
7517 fi
7518
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; }
7522     fi
7523     ;;
7524
7525 alpha*-*-osf*)
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 $@'
7529
7530     else
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'
7536         DSO_CFLAGS=
7537         DSO_PIC_CFLAGS=
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
7544 EOF
7545
7546         cat >> confdefs.h <<\EOF
7547 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7548 EOF
7549
7550     fi
7551     if test -z "$GNU_CXX"; then
7552       COMPAQ_CXX=1
7553     fi
7554     cat >> confdefs.h <<\EOF
7555 #define NEED_USLEEP_PROTOTYPE 1
7556 EOF
7557
7558     ;;
7559
7560 *-qnx*) 
7561     DIRENT_INO=d_stat.st_ino
7562         cat >> confdefs.h <<\EOF
7563 #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
7564 EOF
7565
7566     cat >> confdefs.h <<\EOF
7567 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7568 EOF
7569
7570         cat >> confdefs.h <<\EOF
7571 #define STDC_HEADERS 1
7572 EOF
7573
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'
7578     fi
7579     ;;
7580
7581 *-sco*) 
7582     cat >> confdefs.h <<\EOF
7583 #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
7584 EOF
7585
7586     cat >> confdefs.h <<\EOF
7587 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7588 EOF
7589
7590     CXXFLAGS="$CXXFLAGS -I/usr/include/CC"
7591     if test ! "$GNU_CC"; then
7592        DSO_LDOPTS='-G'
7593     fi
7594     ;;
7595
7596 *-solaris*) 
7597     cat >> confdefs.h <<\EOF
7598 #define SOLARIS 1
7599 EOF
7600
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/'`"
7606     fi
7607     SYSTEM_MAKEDEPEND=
7608     MOZ_FIX_LINK_PATHS=
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"
7614        NS_USE_NATIVE=1
7615        cat >> confdefs.h <<\EOF
7616 #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
7617 EOF
7618
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"
7630 #include <stdio.h>
7631 int main() {
7632 printf("Hello World\n");
7633 ; return 0; }
7634 EOF
7635 if { (eval echo configure:7636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7636   :
7637 else
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -rf conftest*
7641   LDFLAGS=$_SAVE_LDFLAGS
7642 fi
7643 rm -f conftest*
7644        fi
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'
7651        DSO_LDOPTS='-G'
7652        AR_LIST="$AR t"
7653        AR_EXTRACT="$AR x"
7654        AR_DELETE="$AR d"
7655        AR='$(CXX) -xar'
7656        AR_FLAGS='-o $@'
7657        AS='/usr/ccs/bin/as'
7658        ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0"
7659        AS_DASH_C_FLAG=''
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
7665        
7666        ac_ext=C
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
7672
7673        cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7676
7677 int main() {
7678 #if (__SUNPRO_CC < 0x590)
7679            #error "Denied"
7680            #endif
7681 ; return 0; }
7682 EOF
7683 if { (eval echo configure:7684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7684   rm -rf conftest*
7685   _BAD_COMPILER=
7686 else
7687   echo "configure: failed program was:" >&5
7688   cat conftest.$ac_ext >&5
7689   rm -rf conftest*
7690   _BAD_COMPILER=1
7691 fi
7692 rm -f conftest*
7693        if test -n "$_BAD_COMPILER"; then
7694            _res="no"
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; }
7696        else
7697            _res="yes"
7698        fi
7699        cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7702
7703 int main() {
7704 #if (__SUNPRO_CC >= 0x5100)
7705            #error "Sun C++ 5.10 or above"
7706            #endif
7707 ; return 0; }
7708 EOF
7709 if { (eval echo configure:7710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7710   rm -rf conftest*
7711   _ABOVE_SS12U1=
7712 else
7713   echo "configure: failed program was:" >&5
7714   cat conftest.$ac_ext >&5
7715   rm -rf conftest*
7716   _ABOVE_SS12U1=1
7717 fi
7718 rm -f conftest*
7719        if test "$_ABOVE_SS12U1"; then
7720            # disable xannotate
7721            CXXFLAGS="$CXXFLAGS -xannotate=no"
7722        fi
7723        echo "$ac_t""$_res" 1>&6
7724        ac_ext=c
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
7730
7731     else
7732        LDFLAGS="$LDFLAGS -Wl,-z,ignore -Wl,-R,'\$\$ORIGIN:\$\$ORIGIN/..' -Wl,-z,lazyload -Wl,-z,combreloc -Wl,-z,muldefs"
7733        LIBS="-lc $LIBS"
7734        MKSHLIB_FORCE_ALL='-Wl,-z -Wl,allextract'
7735        MKSHLIB_UNFORCE_ALL='-Wl,-z -Wl,defaultextract'
7736        ASFLAGS="$ASFLAGS -fPIC"
7737        DSO_LDOPTS='-shared'
7738        _WARNINGS_CFLAGS=''
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
7743 EOF
7744
7745        fi
7746     fi
7747     if test "$OS_RELEASE" = "5.5.1"; then
7748         cat >> confdefs.h <<\EOF
7749 #define NEED_USLEEP_PROTOTYPE 1
7750 EOF
7751
7752     fi
7753     ;;
7754
7755 *-sunos*) 
7756     DSO_LDOPTS='-Bdynamic'
7757     MKSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
7758     MKCSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
7759     cat >> confdefs.h <<\EOF
7760 #define SUNOS4 1
7761 EOF
7762
7763     cat >> confdefs.h <<\EOF
7764 #define SPRINTF_RETURNS_STRING 1
7765 EOF
7766
7767     case "$(target_os)" in
7768     sunos4.1*)
7769         DLL_SUFFIX='.so.1.0'
7770         ;;
7771     esac
7772     ;;
7773
7774 *-sysv4.2uw7*) 
7775         NSPR_LIBS="-lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION -L/usr/ccs/lib -lcrt"
7776     ;;
7777
7778 *-os2*)
7779     HOST_NSPR_MDCPUCFG='\"md/_os2.cfg\"'
7780     ;;
7781
7782 *-android*)
7783     cat >> confdefs.h <<\EOF
7784 #define NO_PW_GECOS 1
7785 EOF
7786
7787     no_x=yes
7788     _PLATFORM_DEFAULT_TOOLKIT=cairo-android
7789     TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
7790
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"
7795     else
7796         MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer"
7797     fi
7798     # The Maemo builders don't know about this flag
7799     MOZ_ARM_VFP_FLAGS="-mfpu=vfp"
7800     ;;
7801
7802 esac
7803
7804 cat >> confdefs.h <<EOF
7805 #define D_INO $DIRENT_INO
7806 EOF
7807
7808
7809 NO_LD_ARCHIVE_FLAGS=
7810 if test -z "$MKSHLIB_FORCE_ALL" -o -z "$MKSHLIB_UNFORCE_ALL"; then
7811     NO_LD_ARCHIVE_FLAGS=1
7812 fi
7813 case "$target" in
7814 *-os2*)
7815     NO_LD_ARCHIVE_FLAGS=
7816     ;;
7817 *-aix4.3*|*-aix5*)
7818     NO_LD_ARCHIVE_FLAGS=
7819     ;;
7820 *-openvms*)
7821     NO_LD_ARCHIVE_FLAGS=
7822     ;;
7823 *-msvc*|*-mks*|*-mingw*|*-cygwin*|*-wince|*-winmo)
7824     if test -z "$GNU_CC"; then
7825         NO_LD_ARCHIVE_FLAGS=
7826     fi
7827     ;;
7828 esac
7829
7830
7831 case "$target" in
7832     *-linux*|*-kfreebsd*-gnu|*-gnu*)
7833         MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7834         ;;
7835     *-solaris*)
7836         if test -z "$GNU_CC"; then
7837          MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-M $(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
7838         else
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'
7841          else
7842           MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7843          fi
7844         fi
7845         ;;
7846     *-nto*) 
7847         MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
7848         ;;
7849     *-darwin*)
7850         MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list'
7851         ;;
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'
7855         fi
7856         ;;
7857 esac
7858
7859 if test -z "$COMPILE_ENVIRONMENT"; then
7860     SKIP_COMPILER_CHECKS=1
7861     SKIP_LIBRARY_CHECKS=1
7862 fi
7863
7864
7865 case "$target" in
7866 i?86-*)
7867     ENABLE_TRACEJIT=1
7868     NANOJIT_ARCH=i386
7869     ENABLE_METHODJIT=1
7870     ENABLE_MONOIC=1
7871     ENABLE_POLYIC=1
7872     ENABLE_POLYIC_TYPED_ARRAY=1
7873     cat >> confdefs.h <<\EOF
7874 #define JS_CPU_X86 1
7875 EOF
7876
7877     cat >> confdefs.h <<\EOF
7878 #define JS_NUNBOX32 1
7879 EOF
7880
7881     ;;
7882 x86_64*-*)
7883     ENABLE_TRACEJIT=1
7884     NANOJIT_ARCH=X64
7885     ENABLE_METHODJIT=1
7886     ENABLE_MONOIC=1
7887     ENABLE_POLYIC=1
7888     ENABLE_POLYIC_TYPED_ARRAY=1
7889     cat >> confdefs.h <<\EOF
7890 #define JS_CPU_X64 1
7891 EOF
7892
7893     cat >> confdefs.h <<\EOF
7894 #define JS_PUNBOX64 1
7895 EOF
7896
7897     ;;
7898 arm*-*)
7899     ENABLE_TRACEJIT=1
7900     NANOJIT_ARCH=ARM
7901     ENABLE_METHODJIT=1
7902     ENABLE_MONOIC=1
7903     ENABLE_POLYIC=1
7904     cat >> confdefs.h <<\EOF
7905 #define JS_CPU_ARM 1
7906 EOF
7907
7908     cat >> confdefs.h <<\EOF
7909 #define JS_NUNBOX32 1
7910 EOF
7911
7912     ;;
7913 sparc*-*)
7914     ENABLE_TRACEJIT=1
7915     NANOJIT_ARCH=Sparc
7916     cat >> confdefs.h <<\EOF
7917 #define JS_CPU_SPARC 1
7918 EOF
7919
7920     ;;
7921 esac
7922
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
7927     ENABLE_METHODJIT= 
7928   elif test "$enableval" = "yes"; then
7929     :
7930   else
7931     { echo "configure: error: Option, methodjit, does not take an argument ($enableval)." 1>&2; exit 1; }
7932   fi
7933 fi
7934
7935
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
7940     ENABLE_MONOIC= 
7941   elif test "$enableval" = "yes"; then
7942     :
7943   else
7944     { echo "configure: error: Option, monoic, does not take an argument ($enableval)." 1>&2; exit 1; }
7945   fi
7946 fi
7947
7948
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
7953     ENABLE_POLYIC= 
7954   elif test "$enableval" = "yes"; then
7955     :
7956   else
7957     { echo "configure: error: Option, polyic, does not take an argument ($enableval)." 1>&2; exit 1; }
7958   fi
7959 fi
7960
7961
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
7966     ENABLE_TRACEJIT=
7967   elif test "$enableval" = "yes"; then
7968     :
7969   else
7970     { echo "configure: error: Option, tracejit, does not take an argument ($enableval)." 1>&2; exit 1; }
7971   fi
7972 fi
7973
7974
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= 
7982   else
7983     { echo "configure: error: Option, methodjit-spew, does not take an argument ($enableval)." 1>&2; exit 1; }
7984   fi
7985 fi
7986
7987
7988
7989
7990 if test "$ENABLE_METHODJIT"; then
7991     cat >> confdefs.h <<\EOF
7992 #define JS_METHODJIT 1
7993 EOF
7994
7995 fi
7996
7997 if test "$ENABLE_MONOIC"; then
7998     cat >> confdefs.h <<\EOF
7999 #define JS_MONOIC 1
8000 EOF
8001
8002 fi
8003
8004 if test "$ENABLE_POLYIC"; then
8005     cat >> confdefs.h <<\EOF
8006 #define JS_POLYIC 1
8007 EOF
8008
8009 fi
8010
8011 if test "$ENABLE_POLYIC_TYPED_ARRAY"; then
8012     cat >> confdefs.h <<\EOF
8013 #define JS_POLYIC_TYPED_ARRAY 1
8014 EOF
8015
8016 fi
8017
8018 if test "$ENABLE_METHODJIT_SPEW"; then
8019     cat >> confdefs.h <<\EOF
8020 #define JS_METHODJIT_SPEW 1
8021 EOF
8022
8023 fi
8024
8025 if test "$ENABLE_TRACEJIT"; then
8026
8027 cat >> confdefs.h <<\EOF
8028 #define FEATURE_NANOJIT 1
8029 EOF
8030
8031 cat >> confdefs.h <<\EOF
8032 #define JS_TRACER 1
8033 EOF
8034
8035
8036 case "$target" in
8037 i?86-*)
8038     cat >> confdefs.h <<\EOF
8039 #define AVMPLUS_IA32 1
8040 EOF
8041
8042     ;;
8043 x86_64*-*)
8044     cat >> confdefs.h <<\EOF
8045 #define AVMPLUS_AMD64 1
8046 EOF
8047
8048     cat >> confdefs.h <<\EOF
8049 #define AVMPLUS_64BIT 1
8050 EOF
8051
8052     ;;
8053 arm*-*)
8054     cat >> confdefs.h <<\EOF
8055 #define AVMPLUS_ARM 1
8056 EOF
8057
8058     ;;
8059 sparc-*)
8060     cat >> confdefs.h <<\EOF
8061 #define AVMPLUS_SPARC 1
8062 EOF
8063
8064     ;;
8065 esac
8066
8067 case "$target" in
8068 *-linux*|*-android-eabi)
8069     cat >> confdefs.h <<\EOF
8070 #define AVMPLUS_UNIX 1
8071 EOF
8072
8073     cat >> confdefs.h <<\EOF
8074 #define AVMPLUS_LINUX 1
8075 EOF
8076
8077     ;;
8078 *-darwin*)
8079     cat >> confdefs.h <<\EOF
8080 #define AVMPLUS_UNIX 1
8081 EOF
8082
8083     ;;
8084 *-solaris*)
8085     cat >> confdefs.h <<\EOF
8086 #define AVMPLUS_UNIX 1
8087 EOF
8088
8089     ;;
8090 *-freebsd*|*-kfreebsd*)
8091     cat >> confdefs.h <<\EOF
8092 #define AVMPLUS_UNIX 1
8093 EOF
8094
8095     ;;
8096 *-gnu*)
8097     cat >> confdefs.h <<\EOF
8098 #define AVMPLUS_UNIX 1
8099 EOF
8100
8101     ;;
8102 *-cygwin*|*-mingw*|*-mks*|*-msvc*|*-wince|*-winmo)
8103     cat >> confdefs.h <<\EOF
8104 #define AVMPLUS_WIN32 1
8105 EOF
8106
8107     ;;
8108 *-os2*)
8109     cat >> confdefs.h <<\EOF
8110 #define AVMPLUS_OS2 1
8111 EOF
8112
8113     ;;
8114 *)
8115     { echo "configure: error: Unrecognized nanojit platform. Use --disable-tracejit to build without tracing JIT support." 1>&2; exit 1; }
8116 esac
8117
8118 fi # ENABLE_TRACEJIT
8119
8120
8121
8122
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
8128 else
8129   cat > conftest.$ac_ext <<EOF
8130 #line 8131 "configure"
8131 #include "confdefs.h"
8132 #include <stdlib.h>
8133 #include <stdarg.h>
8134 #include <string.h>
8135 #include <float.h>
8136 EOF
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
8141   rm -rf conftest*
8142   ac_cv_header_stdc=yes
8143 else
8144   echo "$ac_err" >&5
8145   echo "configure: failed program was:" >&5
8146   cat conftest.$ac_ext >&5
8147   rm -rf conftest*
8148   ac_cv_header_stdc=no
8149 fi
8150 rm -f conftest*
8151
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"
8157 #include <string.h>
8158 EOF
8159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8160   egrep "memchr" >/dev/null 2>&1; then
8161   :
8162 else
8163   rm -rf conftest*
8164   ac_cv_header_stdc=no
8165 fi
8166 rm -f conftest*
8167
8168 fi
8169
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"
8175 #include <stdlib.h>
8176 EOF
8177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8178   egrep "free" >/dev/null 2>&1; then
8179   :
8180 else
8181   rm -rf conftest*
8182   ac_cv_header_stdc=no
8183 fi
8184 rm -f conftest*
8185
8186 fi
8187
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
8191   :
8192 else
8193   cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 #include <ctype.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);
8202 exit (0); }
8203
8204 EOF
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
8206 then
8207   :
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -fr conftest*
8212   ac_cv_header_stdc=no
8213 fi
8214 rm -fr conftest*
8215 fi
8216
8217 fi
8218 fi
8219
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
8224 EOF
8225
8226 fi
8227
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
8232 else
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236
8237 int main() {
8238
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;
8243 char **p;
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. */
8253 ++ccp;
8254 p = (char**) ccp;
8255 ccp = (char const *const *) p;
8256 { /* SCO 3.2v4 cc rejects this.  */
8257   char *t;
8258   char const *s = 0 ? (char *) 0 : (char const *) 0;
8259
8260   *t++ = 0;
8261 }
8262 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8263   int x[] = {25, 17};
8264   const int *foo = &x[0];
8265   ++foo;
8266 }
8267 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8268   typedef const int *iptr;
8269   iptr p = 0;
8270   ++p;
8271 }
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;
8276 }
8277 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8278   const int foo = 10;
8279 }
8280
8281 ; return 0; }
8282 EOF
8283 if { (eval echo configure:8284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8284   rm -rf conftest*
8285   ac_cv_c_const=yes
8286 else
8287   echo "configure: failed program was:" >&5
8288   cat conftest.$ac_ext >&5
8289   rm -rf conftest*
8290   ac_cv_c_const=no
8291 fi
8292 rm -f conftest*
8293 fi
8294
8295 echo "$ac_t""$ac_cv_c_const" 1>&6
8296 if test $ac_cv_c_const = no; then
8297   cat >> confdefs.h <<\EOF
8298 #define const 
8299 EOF
8300
8301 fi
8302
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
8307 else
8308   cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <sys/types.h>
8312 #if STDC_HEADERS
8313 #include <stdlib.h>
8314 #include <stddef.h>
8315 #endif
8316 EOF
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
8319   rm -rf conftest*
8320   ac_cv_type_mode_t=yes
8321 else
8322   rm -rf conftest*
8323   ac_cv_type_mode_t=no
8324 fi
8325 rm -f conftest*
8326
8327 fi
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
8331 #define mode_t int
8332 EOF
8333
8334 fi
8335
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
8340 else
8341   cat > conftest.$ac_ext <<EOF
8342 #line 8343 "configure"
8343 #include "confdefs.h"
8344 #include <sys/types.h>
8345 #if STDC_HEADERS
8346 #include <stdlib.h>
8347 #include <stddef.h>
8348 #endif
8349 EOF
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
8352   rm -rf conftest*
8353   ac_cv_type_off_t=yes
8354 else
8355   rm -rf conftest*
8356   ac_cv_type_off_t=no
8357 fi
8358 rm -f conftest*
8359
8360 fi
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
8364 #define off_t long
8365 EOF
8366
8367 fi
8368
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
8373 else
8374   cat > conftest.$ac_ext <<EOF
8375 #line 8376 "configure"
8376 #include "confdefs.h"
8377 #include <sys/types.h>
8378 #if STDC_HEADERS
8379 #include <stdlib.h>
8380 #include <stddef.h>
8381 #endif
8382 EOF
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
8385   rm -rf conftest*
8386   ac_cv_type_pid_t=yes
8387 else
8388   rm -rf conftest*
8389   ac_cv_type_pid_t=no
8390 fi
8391 rm -f conftest*
8392
8393 fi
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
8397 #define pid_t int
8398 EOF
8399
8400 fi
8401
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
8406 else
8407   cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 #include <sys/types.h>
8411 #if STDC_HEADERS
8412 #include <stdlib.h>
8413 #include <stddef.h>
8414 #endif
8415 EOF
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
8418   rm -rf conftest*
8419   ac_cv_type_size_t=yes
8420 else
8421   rm -rf conftest*
8422   ac_cv_type_size_t=no
8423 fi
8424 rm -f conftest*
8425
8426 fi
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
8431 EOF
8432
8433 fi
8434
8435 ac_ext=C
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
8441
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
8446 else
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*)()> {};
8453 int main() {
8454
8455 ; return 0; }
8456 EOF
8457 if { (eval echo configure:8458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8458   rm -rf conftest*
8459   ac_cv___stdcall=true
8460 else
8461   echo "configure: failed program was:" >&5
8462   cat conftest.$ac_ext >&5
8463   rm -rf conftest*
8464   ac_cv___stdcall=false
8465 fi
8466 rm -f conftest*
8467 fi
8468
8469 if test "$ac_cv___stdcall" = true ; then
8470   cat >> confdefs.h <<\EOF
8471 #define HAVE_STDCALL 1
8472 EOF
8473
8474   echo "$ac_t""yes" 1>&6
8475 else
8476   echo "$ac_t""no" 1>&6
8477 fi
8478 ac_ext=c
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
8484
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
8489 else
8490   cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493 #include <stdio.h>
8494                   #include <sys/types.h>
8495 int main() {
8496 ssize_t foo = 0;
8497 ; return 0; }
8498 EOF
8499 if { (eval echo configure:8500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8500   rm -rf conftest*
8501   ac_cv_type_ssize_t=true
8502 else
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   ac_cv_type_ssize_t=false
8507 fi
8508 rm -f conftest*
8509 fi
8510
8511 if test "$ac_cv_type_ssize_t" = true ; then
8512   cat >> confdefs.h <<\EOF
8513 #define HAVE_SSIZE_T 1
8514 EOF
8515
8516   echo "$ac_t""yes" 1>&6
8517 else
8518   echo "$ac_t""no" 1>&6
8519 fi
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
8524 else
8525   cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8528 #include <sys/types.h>
8529 #include <sys/stat.h>
8530 int main() {
8531 struct stat s; s.st_blksize;
8532 ; return 0; }
8533 EOF
8534 if { (eval echo configure:8535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8535   rm -rf conftest*
8536   ac_cv_struct_st_blksize=yes
8537 else
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -rf conftest*
8541   ac_cv_struct_st_blksize=no
8542 fi
8543 rm -f conftest*
8544 fi
8545
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
8550 EOF
8551
8552 fi
8553
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
8558 else
8559   cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562 #define _POSIX_C_SOURCE 199506L
8563                   #include <signal.h>
8564 int main() {
8565 siginfo_t* info;
8566 ; return 0; }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8569   rm -rf conftest*
8570   ac_cv_siginfo_t=true
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   ac_cv_siginfo_t=false
8576 fi
8577 rm -f conftest*
8578 fi
8579
8580 if test "$ac_cv_siginfo_t" = true ; then
8581   cat >> confdefs.h <<\EOF
8582 #define HAVE_SIGINFO_T 1
8583 EOF
8584
8585   echo "$ac_t""yes" 1>&6
8586 else
8587   echo "$ac_t""no" 1>&6
8588 fi
8589
8590
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
8596 else
8597   cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8600 #include <stdint.h>
8601 EOF
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
8606   rm -rf conftest*
8607   eval "ac_cv_header_$ac_safe=yes"
8608 else
8609   echo "$ac_err" >&5
8610   echo "configure: failed program was:" >&5
8611   cat conftest.$ac_ext >&5
8612   rm -rf conftest*
8613   eval "ac_cv_header_$ac_safe=no"
8614 fi
8615 rm -f conftest*
8616 fi
8617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8618   echo "$ac_t""yes" 1>&6
8619   :
8620 else
8621   echo "$ac_t""no" 1>&6
8622 fi
8623
8624 if test "$ac_cv_header_stdint_h" = yes; then
8625     cat >> confdefs.h <<\EOF
8626 #define JS_HAVE_STDINT_H 1
8627 EOF
8628
8629 else
8630                     
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
8635 else
8636   
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"
8642
8643 int main() {
8644
8645                      int a[sizeof ($type) == 1 ? 1 : -1];
8646                      return 0;
8647                    
8648 ; return 0; }
8649 EOF
8650 if { (eval echo configure:8651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8651   rm -rf conftest*
8652   moz_cv_n_byte_type_JS_INT8_TYPE=$type; break
8653 else
8654   echo "configure: failed program was:" >&5
8655   cat conftest.$ac_ext >&5
8656 fi
8657 rm -f conftest*
8658   done
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; }
8661   fi
8662
8663 fi
8664
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
8668 EOF
8669
8670
8671     
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
8676 else
8677   
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"
8683
8684 int main() {
8685
8686                      int a[sizeof ($type) == 2 ? 1 : -1];
8687                      return 0;
8688                    
8689 ; return 0; }
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8692   rm -rf conftest*
8693   moz_cv_n_byte_type_JS_INT16_TYPE=$type; break
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697 fi
8698 rm -f conftest*
8699   done
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; }
8702   fi
8703
8704 fi
8705
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
8709 EOF
8710
8711
8712     
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
8717 else
8718   
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"
8724
8725 int main() {
8726
8727                      int a[sizeof ($type) == 4 ? 1 : -1];
8728                      return 0;
8729                    
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8733   rm -rf conftest*
8734   moz_cv_n_byte_type_JS_INT32_TYPE=$type; break
8735 else
8736   echo "configure: failed program was:" >&5
8737   cat conftest.$ac_ext >&5
8738 fi
8739 rm -f conftest*
8740   done
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; }
8743   fi
8744
8745 fi
8746
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
8750 EOF
8751
8752
8753     
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
8758 else
8759   
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"
8765
8766 int main() {
8767
8768                      int a[sizeof ($type) == 8 ? 1 : -1];
8769                      return 0;
8770                    
8771 ; return 0; }
8772 EOF
8773 if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8774   rm -rf conftest*
8775   moz_cv_n_byte_type_JS_INT64_TYPE=$type; break
8776 else
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779 fi
8780 rm -f conftest*
8781   done
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; }
8784   fi
8785
8786 fi
8787
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
8791 EOF
8792
8793
8794     
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
8799 else
8800   
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"
8806
8807 int main() {
8808
8809                      int a[sizeof ($type) == sizeof (void *) ? 1 : -1];
8810                      return 0;
8811                    
8812 ; return 0; }
8813 EOF
8814 if { (eval echo configure:8815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8815   rm -rf conftest*
8816   moz_cv_n_byte_type_JS_INTPTR_TYPE=$type; break
8817 else
8818   echo "configure: failed program was:" >&5
8819   cat conftest.$ac_ext >&5
8820 fi
8821 rm -f conftest*
8822   done
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; }
8825   fi
8826
8827 fi
8828
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
8832 EOF
8833
8834
8835 fi
8836
8837
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
8842 else
8843   
8844   moz_cv_size_of_JS_BYTES_PER_WORD=
8845   for size in 4 8; do
8846     cat > conftest.$ac_ext <<EOF
8847 #line 8848 "configure"
8848 #include "confdefs.h"
8849
8850 int main() {
8851
8852                      int a[sizeof (void*) == $size ? 1 : -1];
8853                      return 0;
8854                    
8855 ; return 0; }
8856 EOF
8857 if { (eval echo configure:8858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8858   rm -rf conftest*
8859   moz_cv_size_of_JS_BYTES_PER_WORD=$size; break
8860 else
8861   echo "configure: failed program was:" >&5
8862   cat conftest.$ac_ext >&5
8863 fi
8864 rm -f conftest*
8865   done
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; }
8868   fi
8869
8870 fi
8871
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
8875 EOF
8876
8877
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
8881 EOF
8882
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
8886 EOF
8887
8888 else
8889   { echo "configure: error: Unexpected JS_BYTES_PER_WORD" 1>&2; exit 1; }
8890 fi
8891
8892
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
8897 else
8898   
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"
8904
8905                      #include <stddef.h>
8906                      struct aligner { char c; void* a; };
8907                    
8908 int main() {
8909
8910                      int a[offsetof(struct aligner, a) == $align ? 1 : -1];
8911                      return 0;
8912                    
8913 ; return 0; }
8914 EOF
8915 if { (eval echo configure:8916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8916   rm -rf conftest*
8917   moz_cv_align_of_JS_ALIGN_OF_POINTER=$align; break
8918 else
8919   echo "configure: failed program was:" >&5
8920   cat conftest.$ac_ext >&5
8921 fi
8922 rm -f conftest*
8923   done
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; }
8926   fi
8927
8928 fi
8929
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
8933 EOF
8934
8935
8936
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
8941 else
8942   
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"
8948
8949 int main() {
8950
8951                      int a[sizeof (double) == $size ? 1 : -1];
8952                      return 0;
8953                    
8954 ; return 0; }
8955 EOF
8956 if { (eval echo configure:8957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8957   rm -rf conftest*
8958   moz_cv_size_of_JS_BYTES_PER_DOUBLE=$size; break
8959 else
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962 fi
8963 rm -f conftest*
8964   done
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; }
8967   fi
8968
8969 fi
8970
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
8974 EOF
8975
8976
8977
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
8982 else
8983   cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986 #include <stdio.h>
8987                   #include <sys/types.h>
8988 int main() {
8989 int16_t foo = 0;
8990 ; return 0; }
8991 EOF
8992 if { (eval echo configure:8993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8993   rm -rf conftest*
8994   ac_cv_int16_t=true
8995 else
8996   echo "configure: failed program was:" >&5
8997   cat conftest.$ac_ext >&5
8998   rm -rf conftest*
8999   ac_cv_int16_t=false
9000 fi
9001 rm -f conftest*
9002 fi
9003
9004 if test "$ac_cv_int16_t" = true ; then
9005   cat >> confdefs.h <<\EOF
9006 #define HAVE_INT16_T 1
9007 EOF
9008
9009   echo "$ac_t""yes" 1>&6
9010 else
9011   echo "$ac_t""no" 1>&6
9012 fi
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
9017 else
9018   cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 #include <stdio.h>
9022                   #include <sys/types.h>
9023 int main() {
9024 int32_t foo = 0;
9025 ; return 0; }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9028   rm -rf conftest*
9029   ac_cv_int32_t=true
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   ac_cv_int32_t=false
9035 fi
9036 rm -f conftest*
9037 fi
9038
9039 if test "$ac_cv_int32_t" = true ; then
9040   cat >> confdefs.h <<\EOF
9041 #define HAVE_INT32_T 1
9042 EOF
9043
9044   echo "$ac_t""yes" 1>&6
9045 else
9046   echo "$ac_t""no" 1>&6
9047 fi
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
9052 else
9053   cat > conftest.$ac_ext <<EOF
9054 #line 9055 "configure"
9055 #include "confdefs.h"
9056 #include <stdio.h>
9057                   #include <sys/types.h>
9058 int main() {
9059 int64_t foo = 0;
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9063   rm -rf conftest*
9064   ac_cv_int64_t=true
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   ac_cv_int64_t=false
9070 fi
9071 rm -f conftest*
9072 fi
9073
9074 if test "$ac_cv_int64_t" = true ; then
9075   cat >> confdefs.h <<\EOF
9076 #define HAVE_INT64_T 1
9077 EOF
9078
9079   echo "$ac_t""yes" 1>&6
9080 else
9081   echo "$ac_t""no" 1>&6
9082 fi
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
9087 else
9088   cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9091 #include <stdio.h>
9092                   #include <sys/types.h>
9093 int main() {
9094 int64 foo = 0;
9095 ; return 0; }
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9098   rm -rf conftest*
9099   ac_cv_int64=true
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -rf conftest*
9104   ac_cv_int64=false
9105 fi
9106 rm -f conftest*
9107 fi
9108
9109 if test "$ac_cv_int64" = true ; then
9110   cat >> confdefs.h <<\EOF
9111 #define HAVE_INT64 1
9112 EOF
9113
9114   echo "$ac_t""yes" 1>&6
9115 else
9116   echo "$ac_t""no" 1>&6
9117 fi
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
9122 else
9123   cat > conftest.$ac_ext <<EOF
9124 #line 9125 "configure"
9125 #include "confdefs.h"
9126 #include <stdio.h>
9127                   #include <sys/types.h>
9128 int main() {
9129 uint foo = 0;
9130 ; return 0; }
9131 EOF
9132 if { (eval echo configure:9133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9133   rm -rf conftest*
9134   ac_cv_uint=true
9135 else
9136   echo "configure: failed program was:" >&5
9137   cat conftest.$ac_ext >&5
9138   rm -rf conftest*
9139   ac_cv_uint=false
9140 fi
9141 rm -f conftest*
9142 fi
9143
9144 if test "$ac_cv_uint" = true ; then
9145   cat >> confdefs.h <<\EOF
9146 #define HAVE_UINT 1
9147 EOF
9148
9149   echo "$ac_t""yes" 1>&6
9150 else
9151   echo "$ac_t""no" 1>&6
9152 fi
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
9157 else
9158   cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161 #include <stdio.h>
9162                   #include <sys/types.h>
9163 int main() {
9164 uint_t foo = 0;
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9168   rm -rf conftest*
9169   ac_cv_uint_t=true
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   ac_cv_uint_t=false
9175 fi
9176 rm -f conftest*
9177 fi
9178
9179 if test "$ac_cv_uint_t" = true ; then
9180   cat >> confdefs.h <<\EOF
9181 #define HAVE_UINT_T 1
9182 EOF
9183
9184   echo "$ac_t""yes" 1>&6
9185 else
9186   echo "$ac_t""no" 1>&6
9187 fi
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
9192 else
9193   cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 #include <stdio.h>
9197                   #include <sys/types.h>
9198 int main() {
9199 uint16_t foo = 0;
9200 ; return 0; }
9201 EOF
9202 if { (eval echo configure:9203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9203   rm -rf conftest*
9204   ac_cv_uint16_t=true
9205 else
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   ac_cv_uint16_t=false
9210 fi
9211 rm -f conftest*
9212 fi
9213
9214 if test "$ac_cv_uint16_t" = true ; then
9215   cat >> confdefs.h <<\EOF
9216 #define HAVE_UINT16_T 1
9217 EOF
9218
9219   echo "$ac_t""yes" 1>&6
9220 else
9221   echo "$ac_t""no" 1>&6
9222 fi
9223
9224 ac_ext=C
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
9230
9231
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
9236 else
9237   cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240 #include <sys/utsname.h>
9241 int main() {
9242  struct utsname *res; char *domain; 
9243             (void)uname(res);  if (res != 0) { domain = res->domainname; } 
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9247   rm -rf conftest*
9248   ac_cv_have_uname_domainname_field=true
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   ac_cv_have_uname_domainname_field=false
9254 fi
9255 rm -f conftest*
9256 fi
9257
9258
9259 if test "$ac_cv_have_uname_domainname_field" = "true"; then
9260     cat >> confdefs.h <<\EOF
9261 #define HAVE_UNAME_DOMAINNAME_FIELD 1
9262 EOF
9263
9264     echo "$ac_t""yes" 1>&6
9265 else
9266     echo "$ac_t""no" 1>&6
9267 fi
9268
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
9273 else
9274   cat > conftest.$ac_ext <<EOF
9275 #line 9276 "configure"
9276 #include "confdefs.h"
9277 #include <sys/utsname.h>
9278 int main() {
9279  struct utsname *res; char *domain; 
9280             (void)uname(res);  if (res != 0) { domain = res->__domainname; } 
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9284   rm -rf conftest*
9285   ac_cv_have_uname_us_domainname_field=true
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   ac_cv_have_uname_us_domainname_field=false
9291 fi
9292 rm -f conftest*
9293 fi
9294
9295
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
9299 EOF
9300
9301     echo "$ac_t""yes" 1>&6
9302 else
9303     echo "$ac_t""no" 1>&6
9304 fi
9305
9306 ac_ext=c
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
9312
9313
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
9319 else
9320   cat > conftest.c <<EOF
9321                   int foo __attribute__ ((visibility ("hidden"))) = 1;
9322 EOF
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
9327                     fi
9328                   fi
9329                   rm -f conftest.cs
9330                  
9331 fi
9332
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
9337 EOF
9338
9339
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
9344 else
9345   cat > conftest.c <<EOF
9346                     int foo __attribute__ ((visibility ("default"))) = 1;
9347 EOF
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
9352                       fi
9353                     fi
9354                     rm -f conftest.cs
9355                    
9356 fi
9357
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
9362 EOF
9363
9364
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
9369 else
9370   cat > conftest.c <<EOF
9371 #pragma GCC visibility push(hidden)
9372                       int foo_hidden = 1;
9373 #pragma GCC visibility push(default)
9374                       int foo_default = 1;
9375 EOF
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
9381                           fi
9382                         fi
9383                       fi
9384                       rm -f conftest.cs
9385                     
9386 fi
9387
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
9394 else
9395   cat > conftest.c <<EOF
9396 #pragma GCC visibility push(hidden)
9397 struct __attribute__ ((visibility ("default"))) TestStruct {
9398   static void Init();
9399 };
9400 __attribute__ ((visibility ("default"))) void TestFunc() {
9401   TestStruct::Init();
9402 }
9403 EOF
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
9407                        else
9408                          if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then
9409                            ac_cv_have_visibility_class_bug=yes
9410                          fi
9411                        fi
9412                        rm -rf conftest.{c,S}
9413                        
9414 fi
9415
9416 echo "$ac_t""$ac_cv_have_visibility_class_bug" 1>&6
9417
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
9422 else
9423   cat > conftest.c <<EOF
9424 #pragma GCC visibility push(hidden)
9425 #pragma GCC visibility push(default)
9426 #include <string.h>
9427 #pragma GCC visibility pop
9428
9429 __attribute__ ((visibility ("default"))) void Func() {
9430   char c[100];
9431   memset(c, 0, sizeof(c));
9432 }
9433 EOF
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
9437                        else
9438                          if test `grep -c "@PLT" conftest.S` = 0; then
9439                            ac_cv_visibility_builtin_bug=yes
9440                          fi
9441                        fi
9442                        rm -f conftest.{c,S}
9443                        
9444 fi
9445
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'
9452           WRAP_STL_INCLUDES=1
9453         else
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
9459 fi         # GNU_CC
9460
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
9465
9466
9467
9468
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
9476 else
9477   cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480 __attribute__ ((__force_align_arg_pointer__)) void test() {}
9481 int main() {
9482
9483 ; return 0; }
9484 EOF
9485 if { (eval echo configure:9486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9486   rm -rf conftest*
9487   ac_cv_force_align_arg_pointer="yes"
9488 else
9489   echo "configure: failed program was:" >&5
9490   cat conftest.$ac_ext >&5
9491   rm -rf conftest*
9492   ac_cv_force_align_arg_pointer="no"
9493 fi
9494 rm -f conftest*
9495 fi
9496
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
9501   else
9502     HAVE_GCC_ALIGN_ARG_POINTER=
9503   fi
9504 fi
9505
9506
9507 ac_header_dirent=no
9508 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9509 do
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
9515 else
9516   cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 #include <sys/types.h>
9520 #include <$ac_hdr>
9521 int main() {
9522 DIR *dirp = 0;
9523 ; return 0; }
9524 EOF
9525 if { (eval echo configure:9526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9526   rm -rf conftest*
9527   eval "ac_cv_header_dirent_$ac_safe=yes"
9528 else
9529   echo "configure: failed program was:" >&5
9530   cat conftest.$ac_ext >&5
9531   rm -rf conftest*
9532   eval "ac_cv_header_dirent_$ac_safe=no"
9533 fi
9534 rm -f conftest*
9535 fi
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
9541 EOF
9542  ac_header_dirent=$ac_hdr; break
9543 else
9544   echo "$ac_t""no" 1>&6
9545 fi
9546 done
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
9554 else
9555   ac_save_LIBS="$LIBS"
9556 LIBS="-ldir  $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.  */
9563 char opendir();
9564
9565 int main() {
9566 opendir()
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9570   rm -rf conftest*
9571   eval "ac_cv_lib_$ac_lib_var=yes"
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_lib_$ac_lib_var=no"
9577 fi
9578 rm -f conftest*
9579 LIBS="$ac_save_LIBS"
9580
9581 fi
9582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9583   echo "$ac_t""yes" 1>&6
9584   LIBS="$LIBS -ldir"
9585 else
9586   echo "$ac_t""no" 1>&6
9587 fi
9588
9589 else
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
9595 else
9596   ac_save_LIBS="$LIBS"
9597 LIBS="-lx  $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.  */
9604 char opendir();
9605
9606 int main() {
9607 opendir()
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9611   rm -rf conftest*
9612   eval "ac_cv_lib_$ac_lib_var=yes"
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   eval "ac_cv_lib_$ac_lib_var=no"
9618 fi
9619 rm -f conftest*
9620 LIBS="$ac_save_LIBS"
9621
9622 fi
9623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9624   echo "$ac_t""yes" 1>&6
9625   LIBS="$LIBS -lx"
9626 else
9627   echo "$ac_t""no" 1>&6
9628 fi
9629
9630 fi
9631
9632 case "$target_os" in
9633 freebsd*)
9634 # for stuff like -lXshm
9635     CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
9636     ;;
9637 esac
9638 for ac_hdr in sys/byteorder.h compat.h getopt.h
9639 do
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
9645 else
9646   cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9649 #include <$ac_hdr>
9650 EOF
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
9655   rm -rf conftest*
9656   eval "ac_cv_header_$ac_safe=yes"
9657 else
9658   echo "$ac_err" >&5
9659   echo "configure: failed program was:" >&5
9660   cat conftest.$ac_ext >&5
9661   rm -rf conftest*
9662   eval "ac_cv_header_$ac_safe=no"
9663 fi
9664 rm -f conftest*
9665 fi
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
9671 EOF
9672  
9673 else
9674   echo "$ac_t""no" 1>&6
9675 fi
9676 done
9677
9678 for ac_hdr in sys/bitypes.h memory.h unistd.h
9679 do
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
9685 else
9686   cat > conftest.$ac_ext <<EOF
9687 #line 9688 "configure"
9688 #include "confdefs.h"
9689 #include <$ac_hdr>
9690 EOF
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
9695   rm -rf conftest*
9696   eval "ac_cv_header_$ac_safe=yes"
9697 else
9698   echo "$ac_err" >&5
9699   echo "configure: failed program was:" >&5
9700   cat conftest.$ac_ext >&5
9701   rm -rf conftest*
9702   eval "ac_cv_header_$ac_safe=no"
9703 fi
9704 rm -f conftest*
9705 fi
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
9711 EOF
9712  
9713 else
9714   echo "$ac_t""no" 1>&6
9715 fi
9716 done
9717
9718 for ac_hdr in gnu/libc-version.h nl_types.h
9719 do
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
9725 else
9726   cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729 #include <$ac_hdr>
9730 EOF
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
9735   rm -rf conftest*
9736   eval "ac_cv_header_$ac_safe=yes"
9737 else
9738   echo "$ac_err" >&5
9739   echo "configure: failed program was:" >&5
9740   cat conftest.$ac_ext >&5
9741   rm -rf conftest*
9742   eval "ac_cv_header_$ac_safe=no"
9743 fi
9744 rm -f conftest*
9745 fi
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
9751 EOF
9752  
9753 else
9754   echo "$ac_t""no" 1>&6
9755 fi
9756 done
9757
9758 for ac_hdr in malloc.h
9759 do
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
9765 else
9766   cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769 #include <$ac_hdr>
9770 EOF
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
9775   rm -rf conftest*
9776   eval "ac_cv_header_$ac_safe=yes"
9777 else
9778   echo "$ac_err" >&5
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -rf conftest*
9782   eval "ac_cv_header_$ac_safe=no"
9783 fi
9784 rm -f conftest*
9785 fi
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
9791 EOF
9792  
9793 else
9794   echo "$ac_t""no" 1>&6
9795 fi
9796 done
9797
9798 for ac_hdr in X11/XKBlib.h
9799 do
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
9805 else
9806   cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 #include <$ac_hdr>
9810 EOF
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
9815   rm -rf conftest*
9816   eval "ac_cv_header_$ac_safe=yes"
9817 else
9818   echo "$ac_err" >&5
9819   echo "configure: failed program was:" >&5
9820   cat conftest.$ac_ext >&5
9821   rm -rf conftest*
9822   eval "ac_cv_header_$ac_safe=no"
9823 fi
9824 rm -f conftest*
9825 fi
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
9831 EOF
9832  
9833 else
9834   echo "$ac_t""no" 1>&6
9835 fi
9836 done
9837
9838 for ac_hdr in io.h
9839 do
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
9845 else
9846   cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849 #include <$ac_hdr>
9850 EOF
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
9855   rm -rf conftest*
9856   eval "ac_cv_header_$ac_safe=yes"
9857 else
9858   echo "$ac_err" >&5
9859   echo "configure: failed program was:" >&5
9860   cat conftest.$ac_ext >&5
9861   rm -rf conftest*
9862   eval "ac_cv_header_$ac_safe=no"
9863 fi
9864 rm -f conftest*
9865 fi
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
9871 EOF
9872  
9873 else
9874   echo "$ac_t""no" 1>&6
9875 fi
9876 done
9877
9878
9879 for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h
9880 do
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
9886 else
9887   cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 #include <$ac_hdr>
9891 EOF
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
9896   rm -rf conftest*
9897   eval "ac_cv_header_$ac_safe=yes"
9898 else
9899   echo "$ac_err" >&5
9900   echo "configure: failed program was:" >&5
9901   cat conftest.$ac_ext >&5
9902   rm -rf conftest*
9903   eval "ac_cv_header_$ac_safe=no"
9904 fi
9905 rm -f conftest*
9906 fi
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
9912 EOF
9913  
9914 else
9915   echo "$ac_t""no" 1>&6
9916 fi
9917 done
9918
9919
9920 for ac_hdr in sys/quota.h
9921 do
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
9927 else
9928   cat > conftest.$ac_ext <<EOF
9929 #line 9930 "configure"
9930 #include "confdefs.h"
9931 #include <$ac_hdr>
9932 EOF
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
9937   rm -rf conftest*
9938   eval "ac_cv_header_$ac_safe=yes"
9939 else
9940   echo "$ac_err" >&5
9941   echo "configure: failed program was:" >&5
9942   cat conftest.$ac_ext >&5
9943   rm -rf conftest*
9944   eval "ac_cv_header_$ac_safe=no"
9945 fi
9946 rm -f conftest*
9947 fi
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
9953 EOF
9954  
9955 else
9956   echo "$ac_t""no" 1>&6
9957 fi
9958 done
9959
9960 for ac_hdr in linux/quota.h
9961 do
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
9967 else
9968   cat > conftest.$ac_ext <<EOF
9969 #line 9970 "configure"
9970 #include "confdefs.h"
9971 #include <$ac_hdr>
9972 EOF
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
9977   rm -rf conftest*
9978   eval "ac_cv_header_$ac_safe=yes"
9979 else
9980   echo "$ac_err" >&5
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_header_$ac_safe=no"
9985 fi
9986 rm -f conftest*
9987 fi
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
9993 EOF
9994  
9995 else
9996   echo "$ac_t""no" 1>&6
9997 fi
9998 done
9999
10000
10001 for ac_hdr in mmintrin.h
10002 do
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
10008 else
10009   cat > conftest.$ac_ext <<EOF
10010 #line 10011 "configure"
10011 #include "confdefs.h"
10012 #include <$ac_hdr>
10013 EOF
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
10018   rm -rf conftest*
10019   eval "ac_cv_header_$ac_safe=yes"
10020 else
10021   echo "$ac_err" >&5
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   eval "ac_cv_header_$ac_safe=no"
10026 fi
10027 rm -f conftest*
10028 fi
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
10034 EOF
10035  
10036 else
10037   echo "$ac_t""no" 1>&6
10038 fi
10039 done
10040
10041
10042 ac_ext=C
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
10048
10049 NEW_H=new.h
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
10055 else
10056   cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 #include <new>
10060 EOF
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
10065   rm -rf conftest*
10066   eval "ac_cv_header_$ac_safe=yes"
10067 else
10068   echo "$ac_err" >&5
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -rf conftest*
10072   eval "ac_cv_header_$ac_safe=no"
10073 fi
10074 rm -f conftest*
10075 fi
10076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10077   echo "$ac_t""yes" 1>&6
10078   NEW_H=new
10079 else
10080   echo "$ac_t""no" 1>&6
10081 fi
10082
10083 cat >> confdefs.h <<EOF
10084 #define NEW_H <$NEW_H>
10085 EOF
10086
10087 ac_ext=c
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
10093
10094
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"
10099 fi
10100
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
10107 else
10108   cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 #include <sys/sdt.h>
10112 EOF
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
10117   rm -rf conftest*
10118   eval "ac_cv_header_$ac_safe=yes"
10119 else
10120   echo "$ac_err" >&5
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -rf conftest*
10124   eval "ac_cv_header_$ac_safe=no"
10125 fi
10126 rm -f conftest*
10127 fi
10128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10129   echo "$ac_t""yes" 1>&6
10130   HAVE_DTRACE=1
10131 else
10132   echo "$ac_t""no" 1>&6
10133 fi
10134
10135   if test -n "$HAVE_DTRACE"; then
10136       cat >> confdefs.h <<\EOF
10137 #define INCLUDE_MOZILLA_DTRACE 1
10138 EOF
10139
10140   else
10141       { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; exit 1; };
10142   fi
10143 fi
10144
10145
10146 case $target in
10147 *-aix4.3*|*-aix5*)
10148         ;;
10149 *)
10150         for ac_hdr in sys/cdefs.h
10151 do
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
10157 else
10158   cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10161 #include <$ac_hdr>
10162 EOF
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
10167   rm -rf conftest*
10168   eval "ac_cv_header_$ac_safe=yes"
10169 else
10170   echo "$ac_err" >&5
10171   echo "configure: failed program was:" >&5
10172   cat conftest.$ac_ext >&5
10173   rm -rf conftest*
10174   eval "ac_cv_header_$ac_safe=no"
10175 fi
10176 rm -f conftest*
10177 fi
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
10183 EOF
10184  
10185 else
10186   echo "$ac_t""no" 1>&6
10187 fi
10188 done
10189
10190         ;;
10191 esac
10192
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
10198 else
10199   cat > conftest.$ac_ext <<EOF
10200 #line 10201 "configure"
10201 #include "confdefs.h"
10202 #include <linux/perf_event.h>
10203 EOF
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
10208   rm -rf conftest*
10209   eval "ac_cv_header_$ac_safe=yes"
10210 else
10211   echo "$ac_err" >&5
10212   echo "configure: failed program was:" >&5
10213   cat conftest.$ac_ext >&5
10214   rm -rf conftest*
10215   eval "ac_cv_header_$ac_safe=no"
10216 fi
10217 rm -f conftest*
10218 fi
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
10222 else
10223   echo "$ac_t""no" 1>&6
10224 fi
10225
10226
10227
10228 case $target in
10229 *-hpux11.*)
10230         ;;
10231 *)
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
10237 else
10238   ac_save_LIBS="$LIBS"
10239 LIBS="-lc_r  $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();
10247
10248 int main() {
10249 gethostbyname_r()
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10253   rm -rf conftest*
10254   eval "ac_cv_lib_$ac_lib_var=yes"
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_lib_$ac_lib_var=no"
10260 fi
10261 rm -f conftest*
10262 LIBS="$ac_save_LIBS"
10263
10264 fi
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
10271 EOF
10272
10273   LIBS="-lc_r $LIBS"
10274
10275 else
10276   echo "$ac_t""no" 1>&6
10277 fi
10278
10279         ;;
10280 esac
10281
10282 case $target in
10283 *-darwin*)
10284     ;;
10285 *-beos*)
10286     ;;
10287 *-os2*)
10288     ;;
10289 *)
10290     
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
10295 else
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.  */
10304 char dlopen();
10305
10306 int main() {
10307 dlopen()
10308 ; return 0; }
10309 EOF
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10311   rm -rf conftest*
10312   ac_cv_search_dlopen="none required"
10313 else
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316 fi
10317 rm -f conftest*
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.  */
10326 char dlopen();
10327
10328 int main() {
10329 dlopen()
10330 ; return 0; }
10331 EOF
10332 if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10333   rm -rf conftest*
10334   ac_cv_search_dlopen="-l$i"
10335 break
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339 fi
10340 rm -f conftest*
10341 done
10342 LIBS="$ac_func_search_save_LIBS"
10343 fi
10344
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
10353 else
10354   cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 #include <dlfcn.h>
10358 EOF
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
10363   rm -rf conftest*
10364   eval "ac_cv_header_$ac_safe=yes"
10365 else
10366   echo "$ac_err" >&5
10367   echo "configure: failed program was:" >&5
10368   cat conftest.$ac_ext >&5
10369   rm -rf conftest*
10370   eval "ac_cv_header_$ac_safe=no"
10371 fi
10372 rm -f conftest*
10373 fi
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
10378 EOF
10379
10380 else
10381   echo "$ac_t""no" 1>&6
10382 fi
10383
10384 else :
10385   
10386 fi
10387     ;;
10388 esac
10389
10390 _SAVE_CFLAGS="$CFLAGS"
10391 CFLAGS="$CFLAGS -D_GNU_SOURCE"
10392 for ac_func in dladdr
10393 do
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
10398 else
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.  */
10408 char $ac_func();
10409
10410 int main() {
10411
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)
10416 choke me
10417 #else
10418 $ac_func();
10419 #endif
10420
10421 ; return 0; }
10422 EOF
10423 if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10424   rm -rf conftest*
10425   eval "ac_cv_func_$ac_func=yes"
10426 else
10427   echo "configure: failed program was:" >&5
10428   cat conftest.$ac_ext >&5
10429   rm -rf conftest*
10430   eval "ac_cv_func_$ac_func=no"
10431 fi
10432 rm -f conftest*
10433 fi
10434
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
10440 EOF
10441  
10442 else
10443   echo "$ac_t""no" 1>&6
10444 fi
10445 done
10446
10447 CFLAGS="$_SAVE_CFLAGS"
10448
10449 if test ! "$GNU_CXX"; then
10450
10451     case $target in
10452     *-aix*)
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
10458 else
10459   ac_save_LIBS="$LIBS"
10460 LIBS="-lC_r  $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.  */
10467 char demangle();
10468
10469 int main() {
10470 demangle()
10471 ; return 0; }
10472 EOF
10473 if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10474   rm -rf conftest*
10475   eval "ac_cv_lib_$ac_lib_var=yes"
10476 else
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   eval "ac_cv_lib_$ac_lib_var=no"
10481 fi
10482 rm -f conftest*
10483 LIBS="$ac_save_LIBS"
10484
10485 fi
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
10492 EOF
10493
10494   LIBS="-lC_r $LIBS"
10495
10496 else
10497   echo "$ac_t""no" 1>&6
10498 fi
10499
10500         ;;
10501      *)
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
10507 else
10508   ac_save_LIBS="$LIBS"
10509 LIBS="-lC  $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.  */
10516 char demangle();
10517
10518 int main() {
10519 demangle()
10520 ; return 0; }
10521 EOF
10522 if { (eval echo configure:10523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10523   rm -rf conftest*
10524   eval "ac_cv_lib_$ac_lib_var=yes"
10525 else
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   eval "ac_cv_lib_$ac_lib_var=no"
10530 fi
10531 rm -f conftest*
10532 LIBS="$ac_save_LIBS"
10533
10534 fi
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
10541 EOF
10542
10543   LIBS="-lC $LIBS"
10544
10545 else
10546   echo "$ac_t""no" 1>&6
10547 fi
10548
10549         ;;
10550      esac
10551 fi
10552
10553 case $target in
10554 *-os2*)
10555     ;;
10556 *)
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
10562 else
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.  */
10571 char socket();
10572
10573 int main() {
10574 socket()
10575 ; return 0; }
10576 EOF
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10578   rm -rf conftest*
10579   eval "ac_cv_lib_$ac_lib_var=yes"
10580 else
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_lib_$ac_lib_var=no"
10585 fi
10586 rm -f conftest*
10587 LIBS="$ac_save_LIBS"
10588
10589 fi
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
10596 EOF
10597
10598   LIBS="-lsocket $LIBS"
10599
10600 else
10601   echo "$ac_t""no" 1>&6
10602 fi
10603
10604 esac
10605
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"
10611
10612 int main() {
10613 asm("uqadd8 r1, r1, r2");
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10617   rm -rf conftest*
10618   result="yes"
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   result="no"
10624 fi
10625 rm -f conftest*
10626 echo "$ac_t"""$result"" 1>&6
10627 if test "$result" = "yes"; then
10628     cat >> confdefs.h <<\EOF
10629 #define HAVE_ARM_SIMD 1
10630 EOF
10631
10632     HAVE_ARM_SIMD=1
10633 fi
10634
10635
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"
10642 fi
10643 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646
10647 int main() {
10648 asm("vadd.i8 d0, d0, d0");
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10652   rm -rf conftest*
10653   result="yes"
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   result="no"
10659 fi
10660 rm -f conftest*
10661 echo "$ac_t"""$result"" 1>&6
10662 if test "$result" = "yes"; then
10663     cat >> confdefs.h <<\EOF
10664 #define HAVE_ARM_NEON 1
10665 EOF
10666
10667     HAVE_ARM_NEON=1
10668 fi
10669 CFLAGS="$_SAVE_CFLAGS"
10670
10671
10672 case "$target_os" in
10673 darwin*)
10674     USE_PTHREADS=1
10675     ;;
10676 *)
10677     
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
10680 echo "
10681     #include <pthread.h>
10682     #include <stdlib.h>
10683     void *foo(void *v) { int a = 1;  } 
10684     int main() { 
10685         pthread_t t;
10686         if (!pthread_create(&t, 0, &foo, 0)) {
10687             pthread_join(t, 0);
10688         }
10689         exit(0);
10690     }" > dummy.c ;
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;
10693     _res=$? ;
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"
10698     else
10699         echo "$ac_t""no" 1>&6
10700         
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
10703 echo "
10704     #include <pthread.h>
10705     #include <stdlib.h>
10706     void *foo(void *v) { int a = 1;  } 
10707     int main() { 
10708         pthread_t t;
10709         if (!pthread_create(&t, 0, &foo, 0)) {
10710             pthread_join(t, 0);
10711         }
10712         exit(0);
10713     }" > dummy.c ;
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;
10716     _res=$? ;
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"
10721     else
10722         echo "$ac_t""no" 1>&6
10723         
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
10726 echo "
10727     #include <pthread.h>
10728     #include <stdlib.h>
10729     void *foo(void *v) { int a = 1;  } 
10730     int main() { 
10731         pthread_t t;
10732         if (!pthread_create(&t, 0, &foo, 0)) {
10733             pthread_join(t, 0);
10734         }
10735         exit(0);
10736     }" > dummy.c ;
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;
10739     _res=$? ;
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"
10744     else
10745         echo "$ac_t""no" 1>&6
10746         
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
10749 echo "
10750     #include <pthread.h>
10751     #include <stdlib.h>
10752     void *foo(void *v) { int a = 1;  } 
10753     int main() { 
10754         pthread_t t;
10755         if (!pthread_create(&t, 0, &foo, 0)) {
10756             pthread_join(t, 0);
10757         }
10758         exit(0);
10759     }" > dummy.c ;
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;
10762     _res=$? ;
10763     rm -f dummy.c dummy${ac_exeext} ;
10764     if test "$_res" = "0"; then
10765         echo "$ac_t""yes" 1>&6
10766         USE_PTHREADS=1
10767                 
10768     else
10769         echo "$ac_t""no" 1>&6
10770         
10771     fi
10772
10773             
10774     fi
10775
10776         
10777     fi
10778
10779     
10780     fi
10781
10782     ;;
10783 esac
10784
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; };
10791 fi
10792   elif test "$withval" = "no"; then
10793     USE_PTHREADS=
10794     _PTHREAD_LDFLAGS=
10795
10796   else
10797     { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; exit 1; }
10798   fi
10799 fi
10800
10801
10802 if test "$USE_PTHREADS"x != x
10803 then
10804                                 rm -f conftest*
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
10814                 freebsd*)
10815 # Freebsd doesn't use -pthread for compiles, it uses them for linking
10816                 ;;
10817                 *)
10818                             CFLAGS="$CFLAGS -pthread"
10819                             CXXFLAGS="$CXXFLAGS -pthread"
10820                 ;;
10821                 esac
10822                 fi
10823         fi
10824         rm -f conftest*
10825     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
10826
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"
10838                     fi
10839             fi
10840             rm -f conftest*
10841         echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
10842     fi
10843
10844         case "$target" in
10845             *-*-freebsd*)
10846                         cat >> confdefs.h <<\EOF
10847 #define _REENTRANT 1
10848 EOF
10849
10850                         cat >> confdefs.h <<\EOF
10851 #define _THREAD_SAFE 1
10852 EOF
10853
10854                                                 if test "$ac_cv_have_dash_pthread" = "yes"; then
10855                                 _PTHREAD_LDFLAGS="-pthread"
10856                         else
10857                                 _PTHREAD_LDFLAGS="-lc_r"
10858                         fi
10859                         ;;
10860
10861             *-*-openbsd*|*-*-bsdi*)
10862                         cat >> confdefs.h <<\EOF
10863 #define _REENTRANT 1
10864 EOF
10865
10866                         cat >> confdefs.h <<\EOF
10867 #define _THREAD_SAFE 1
10868 EOF
10869
10870                                                 if test "$ac_cv_have_dash_pthread" = "yes"; then
10871                 _PTHREAD_LDFLAGS="-pthread"
10872                         fi
10873                         ;;
10874
10875             *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*)
10876                         cat >> confdefs.h <<\EOF
10877 #define _REENTRANT 1
10878 EOF
10879  
10880                         ;;
10881
10882             *-*-nto*) 
10883                         cat >> confdefs.h <<\EOF
10884 #define _REENTRANT 1
10885 EOF
10886  
10887                         ;;
10888
10889             *-aix4.3*|*-aix5*)
10890                         cat >> confdefs.h <<\EOF
10891 #define _REENTRANT 1
10892 EOF
10893  
10894                         ;;
10895
10896             *-hpux11.*)
10897                         cat >> confdefs.h <<\EOF
10898 #define _REENTRANT 1
10899 EOF
10900  
10901                         ;;
10902
10903             alpha*-*-osf*)
10904                         cat >> confdefs.h <<\EOF
10905 #define _REENTRANT 1
10906 EOF
10907
10908                         ;;
10909
10910             *-*-solaris*) 
10911                         cat >> confdefs.h <<\EOF
10912 #define _REENTRANT 1
10913 EOF
10914
10915                         if test "$SOLARIS_SUNPRO_CC"; then
10916                                 CFLAGS="$CFLAGS -mt" 
10917                                 CXXFLAGS="$CXXFLAGS -mt" 
10918                         fi
10919                         ;;
10920         esac
10921     LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
10922 fi
10923
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
10926
10927
10928 mmap_test_prog='
10929     #include <stdlib.h>
10930     #include <unistd.h>
10931     #include <sys/mman.h>
10932     #include <sys/types.h>
10933     #include <sys/stat.h>
10934     #include <fcntl.h>
10935
10936     char fname[] = "conftest.file";
10937     char zbuff[1024]; /* Fractional page is probably worst case */
10938
10939     int main() {
10940         char *map;
10941         int fd;
10942         int i;
10943         unlink(fname);
10944         fd = open(fname, O_RDWR | O_CREAT, 0660);
10945         if(fd<0) return 1;
10946         unlink(fname);
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;
10954         }
10955         return 0;
10956     }
10957 '
10958
10959
10960 if test "$cross_compiling" = yes; then
10961   result="yes"
10962 else
10963   cat > conftest.$ac_ext <<EOF
10964 #line 10965 "configure"
10965 #include "confdefs.h"
10966 $mmap_test_prog 
10967 EOF
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
10969 then
10970   result="yes"
10971 else
10972   echo "configure: failed program was:" >&5
10973   cat conftest.$ac_ext >&5
10974   rm -fr conftest*
10975   result="no"
10976 fi
10977 rm -fr conftest*
10978 fi
10979
10980
10981 echo "$ac_t"""$result"" 1>&6
10982
10983 if test "$result" = "no"; then
10984     cat >> confdefs.h <<\EOF
10985 #define MMAP_MISSES_WRITES 1
10986 EOF
10987
10988 fi
10989
10990
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
10996 else
10997     ac_pattern="Autoconf.*'x'"
10998   cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001 #include <sgtty.h>
11002 Autoconf TIOCGETP
11003 EOF
11004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005   egrep "$ac_pattern" >/dev/null 2>&1; then
11006   rm -rf conftest*
11007   ac_cv_prog_gcc_traditional=yes
11008 else
11009   rm -rf conftest*
11010   ac_cv_prog_gcc_traditional=no
11011 fi
11012 rm -f conftest*
11013
11014
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>
11020 Autoconf TCGETA
11021 EOF
11022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11023   egrep "$ac_pattern" >/dev/null 2>&1; then
11024   rm -rf conftest*
11025   ac_cv_prog_gcc_traditional=yes
11026 fi
11027 rm -f conftest*
11028
11029   fi
11030 fi
11031
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"
11035   fi
11036 fi
11037
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
11042 else
11043   if test "$cross_compiling" = yes; then
11044   ac_cv_func_memcmp_clean=no
11045 else
11046   cat > conftest.$ac_ext <<EOF
11047 #line 11048 "configure"
11048 #include "confdefs.h"
11049
11050 main()
11051 {
11052   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11053   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11054 }
11055
11056 EOF
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
11058 then
11059   ac_cv_func_memcmp_clean=yes
11060 else
11061   echo "configure: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   rm -fr conftest*
11064   ac_cv_func_memcmp_clean=no
11065 fi
11066 rm -fr conftest*
11067 fi
11068
11069 fi
11070
11071 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11072 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11073
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
11077 do
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
11082 else
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.  */
11092 char $ac_func();
11093
11094 int main() {
11095
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)
11100 choke me
11101 #else
11102 $ac_func();
11103 #endif
11104
11105 ; return 0; }
11106 EOF
11107 if { (eval echo configure:11108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11108   rm -rf conftest*
11109   eval "ac_cv_func_$ac_func=yes"
11110 else
11111   echo "configure: failed program was:" >&5
11112   cat conftest.$ac_ext >&5
11113   rm -rf conftest*
11114   eval "ac_cv_func_$ac_func=no"
11115 fi
11116 rm -f conftest*
11117 fi
11118
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
11124 EOF
11125  
11126 else
11127   echo "$ac_t""no" 1>&6
11128 fi
11129 done
11130
11131
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
11138 else
11139   cat > conftest.$ac_ext <<EOF
11140 #line 11141 "configure"
11141 #include "confdefs.h"
11142 #include <time.h>
11143 int main() {
11144  struct timespec ts;
11145                               clock_gettime(CLOCK_MONOTONIC, &ts); 
11146 ; return 0; }
11147 EOF
11148 if { (eval echo configure:11149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11149   rm -rf conftest*
11150   ac_cv_have_clock_monotonic=yes
11151 else
11152   echo "configure: failed program was:" >&5
11153   cat conftest.$ac_ext >&5
11154   rm -rf conftest*
11155   ac_cv_have_clock_monotonic=no
11156 fi
11157 rm -f conftest*
11158 fi
11159
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
11164     REALTIME_LIBS=-lrt
11165     cat >> confdefs.h <<\EOF
11166 #define HAVE_CLOCK_MONOTONIC 1
11167 EOF
11168
11169     
11170     
11171 fi
11172
11173 cat > conftest.$ac_ext <<EOF
11174 #line 11175 "configure"
11175 #include "confdefs.h"
11176 #include <windows.h>
11177 int main() {
11178 SYSTEMTIME st;FILETIME ft;SystemTimeToFileTime(&st,&ft);
11179 ; return 0; }
11180 EOF
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11182   rm -rf conftest*
11183   ac_cv_have_systemtimetofiletime="yes"
11184 else
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -rf conftest*
11188   ac_cv_have_systemtimetofiletime="no"
11189 fi
11190 rm -f conftest*
11191 if test "$ac_cv_have_systemtimetofiletime" = "yes"; then
11192     cat >> confdefs.h <<\EOF
11193 #define HAVE_SYSTEMTIMETOFILETIME 1
11194 EOF
11195
11196 fi
11197 cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include <windows.h>
11201 int main() {
11202 FILETIME ft;GetSystemTimeAsFileTime(&ft);
11203 ; return 0; }
11204 EOF
11205 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11206   rm -rf conftest*
11207   ac_cv_have_getsystemtimeasfiletime="yes"
11208 else
11209   echo "configure: failed program was:" >&5
11210   cat conftest.$ac_ext >&5
11211   rm -rf conftest*
11212   ac_cv_have_getsystemtimeasfiletime="no"
11213 fi
11214 rm -f conftest*
11215 if test "$ac_cv_have_getsystemtimeasfiletime" = "yes"; then
11216     cat >> confdefs.h <<\EOF
11217 #define HAVE_GETSYSTEMTIMEASFILETIME 1
11218 EOF
11219
11220 fi
11221
11222 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
11223
11224 ac_ext=C
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
11230
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
11235 else
11236   cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11239 #include <wchar.h>
11240 int main() {
11241 mbstate_t ps={0};wcrtomb(0,'f',&ps);
11242 ; return 0; }
11243 EOF
11244 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11245   rm -rf conftest*
11246   ac_cv_have_wcrtomb="yes"
11247 else
11248   echo "configure: failed program was:" >&5
11249   cat conftest.$ac_ext >&5
11250   rm -rf conftest*
11251   ac_cv_have_wcrtomb="no"
11252 fi
11253 rm -f conftest*
11254 fi
11255
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
11260 EOF
11261
11262 fi
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
11267 else
11268   cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <wchar.h>
11272 int main() {
11273 mbstate_t ps={0};mbrtowc(0,0,0,&ps);
11274 ; return 0; }
11275 EOF
11276 if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11277   rm -rf conftest*
11278   ac_cv_have_mbrtowc="yes"
11279 else
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   ac_cv_have_mbrtowc="no"
11284 fi
11285 rm -f conftest*
11286 fi
11287
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
11292 EOF
11293
11294 fi
11295 ac_ext=c
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
11301
11302 fi
11303
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
11308 else
11309   cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11312
11313         #ifdef linux
11314         #define _BSD_SOURCE 1
11315         #endif
11316         #include <resolv.h>
11317         
11318 int main() {
11319 int foo = res_ninit(&_res);
11320 ; return 0; }
11321 EOF
11322 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11323   rm -rf conftest*
11324   ac_cv_func_res_ninit=yes
11325 else
11326   echo "configure: failed program was:" >&5
11327   cat conftest.$ac_ext >&5
11328   rm -rf conftest*
11329   ac_cv_func_res_ninit=no
11330 fi
11331 rm -f conftest*
11332     
11333 fi
11334
11335 echo "$ac_t""$ac_cv_func_res_ninit" 1>&6
11336
11337 if test "$ac_cv_func_res_ninit" = "yes"; then
11338     cat >> confdefs.h <<\EOF
11339 #define HAVE_RES_NINIT 1
11340 EOF
11341
11342 fi
11343
11344 ac_ext=C
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
11350
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
11355 else
11356   cat > conftest.$ac_ext <<EOF
11357 #line 11358 "configure"
11358 #include "confdefs.h"
11359
11360         #ifdef HAVE_GNU_LIBC_VERSION_H
11361         #include <gnu/libc-version.h>
11362         #endif
11363         
11364 int main() {
11365 const char *glibc_version = gnu_get_libc_version();
11366 ; return 0; }
11367 EOF
11368 if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11369   rm -rf conftest*
11370   ac_cv_func_gnu_get_libc_version=yes
11371 else
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -rf conftest*
11375   ac_cv_func_gnu_get_libc_version=no 
11376         
11377 fi
11378 rm -f conftest*
11379     
11380 fi
11381
11382 echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6
11383
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
11387 EOF
11388
11389 fi
11390
11391 case $target_os in
11392     os2*|msvc*|mks*|cygwin*|mingw*|darwin*|wince*|winmo*|beos*)
11393         ;;
11394     *)
11395     
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
11401 else
11402   ac_save_LIBS="$LIBS"
11403 LIBS="-lc  $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.  */
11408 #ifdef __cplusplus
11409 extern "C"
11410 #endif
11411 /* We use char because int might match the return type of a gcc2
11412     builtin and then its argument prototype would still apply.  */
11413 char iconv();
11414
11415 int main() {
11416 iconv()
11417 ; return 0; }
11418 EOF
11419 if { (eval echo configure:11420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11420   rm -rf conftest*
11421   eval "ac_cv_lib_$ac_lib_var=yes"
11422 else
11423   echo "configure: failed program was:" >&5
11424   cat conftest.$ac_ext >&5
11425   rm -rf conftest*
11426   eval "ac_cv_lib_$ac_lib_var=no"
11427 fi
11428 rm -f conftest*
11429 LIBS="$ac_save_LIBS"
11430
11431 fi
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"
11435 else
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
11442 else
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.  */
11449 #ifdef __cplusplus
11450 extern "C"
11451 #endif
11452 /* We use char because int might match the return type of a gcc2
11453     builtin and then its argument prototype would still apply.  */
11454 char iconv();
11455
11456 int main() {
11457 iconv()
11458 ; return 0; }
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11461   rm -rf conftest*
11462   eval "ac_cv_lib_$ac_lib_var=yes"
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   eval "ac_cv_lib_$ac_lib_var=no"
11468 fi
11469 rm -f conftest*
11470 LIBS="$ac_save_LIBS"
11471
11472 fi
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"
11476 else
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
11483 else
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.  */
11490 #ifdef __cplusplus
11491 extern "C"
11492 #endif
11493 /* We use char because int might match the return type of a gcc2
11494     builtin and then its argument prototype would still apply.  */
11495 char libiconv();
11496
11497 int main() {
11498 libiconv()
11499 ; return 0; }
11500 EOF
11501 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11502   rm -rf conftest*
11503   eval "ac_cv_lib_$ac_lib_var=yes"
11504 else
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   eval "ac_cv_lib_$ac_lib_var=no"
11509 fi
11510 rm -f conftest*
11511 LIBS="$ac_save_LIBS"
11512
11513 fi
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"
11517 else
11518   echo "$ac_t""no" 1>&6
11519 fi
11520
11521 fi
11522
11523 fi
11524
11525 _SAVE_LIBS=$LIBS
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
11531 else
11532   cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535
11536         #include <stdlib.h>
11537         #include <iconv.h>
11538         
11539 int main() {
11540
11541             iconv_t h = iconv_open("", "");
11542             iconv(h, NULL, NULL, NULL, NULL);
11543             iconv_close(h);
11544         
11545 ; return 0; }
11546 EOF
11547 if { (eval echo configure:11548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11548   rm -rf conftest*
11549   ac_cv_func_iconv=yes
11550 else
11551   echo "configure: failed program was:" >&5
11552   cat conftest.$ac_ext >&5
11553   rm -rf conftest*
11554   ac_cv_func_iconv=no 
11555         
11556 fi
11557 rm -f conftest*
11558     
11559 fi
11560
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
11565 EOF
11566
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
11574 else
11575   cat > conftest.$ac_ext <<EOF
11576 #line 11577 "configure"
11577 #include "confdefs.h"
11578
11579             #include <stdlib.h>
11580             #include <iconv.h>
11581             
11582 int main() {
11583
11584                 const char *input = "testing";
11585                 iconv_t h = iconv_open("", "");
11586                 iconv(h, &input, NULL, NULL, NULL);
11587                 iconv_close(h);
11588             
11589 ; return 0; }
11590 EOF
11591 if { (eval echo configure:11592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11592   rm -rf conftest*
11593   ac_cv_func_const_iconv=yes
11594 else
11595   echo "configure: failed program was:" >&5
11596   cat conftest.$ac_ext >&5
11597   rm -rf conftest*
11598   ac_cv_func_const_iconv=no 
11599             
11600 fi
11601 rm -f conftest*
11602         
11603 fi
11604
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
11609 EOF
11610
11611     fi
11612 fi
11613 LIBS=$_SAVE_LIBS
11614
11615     ;;
11616 esac
11617
11618 ac_ext=c
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
11624
11625
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
11630 else
11631   
11632     if test "$cross_compiling" = yes; then
11633   ac_cv_va_copy=no
11634     
11635 else
11636   cat > conftest.$ac_ext <<EOF
11637 #line 11638 "configure"
11638 #include "confdefs.h"
11639
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)
11646                 exit (1);
11647             va_end (args1); va_end (args2);
11648         }
11649         int main() { f (0, 42); return 0; }
11650 EOF
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
11652 then
11653   ac_cv_va_copy=yes
11654 else
11655   echo "configure: failed program was:" >&5
11656   cat conftest.$ac_ext >&5
11657   rm -fr conftest*
11658   ac_cv_va_copy=no
11659 fi
11660 rm -fr conftest*
11661 fi
11662
11663
11664 fi
11665
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
11671 else
11672   
11673     if test "$cross_compiling" = yes; then
11674   ac_cv___va_copy=no
11675     
11676 else
11677   cat > conftest.$ac_ext <<EOF
11678 #line 11679 "configure"
11679 #include "confdefs.h"
11680
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)
11687                 exit (1);
11688             va_end (args1); va_end (args2);
11689         }
11690         int main() { f (0, 42); return 0; }
11691 EOF
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
11693 then
11694   ac_cv___va_copy=yes
11695 else
11696   echo "configure: failed program was:" >&5
11697   cat conftest.$ac_ext >&5
11698   rm -fr conftest*
11699   ac_cv___va_copy=no
11700 fi
11701 rm -fr conftest*
11702 fi
11703
11704
11705 fi
11706
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
11712 else
11713   
11714     if test "$cross_compiling" = yes; then
11715   ac_cv_va_val_copy=yes
11716     
11717 else
11718   cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721
11722         #include <stdarg.h>
11723         void f (int i, ...) {
11724             va_list args1, args2;
11725             va_start (args1, i);
11726             args2 = args1;
11727             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11728                 exit (1);
11729             va_end (args1); va_end (args2);
11730         }
11731         int main() { f (0, 42); return 0; }
11732 EOF
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
11734 then
11735   ac_cv_va_val_copy=yes
11736 else
11737   echo "configure: failed program was:" >&5
11738   cat conftest.$ac_ext >&5
11739   rm -fr conftest*
11740   ac_cv_va_val_copy=no
11741 fi
11742 rm -fr conftest*
11743 fi
11744
11745
11746 fi
11747
11748 if test "x$ac_cv_va_copy" = "xyes"; then
11749     cat >> confdefs.h <<\EOF
11750 #define VA_COPY va_copy
11751 EOF
11752
11753     cat >> confdefs.h <<\EOF
11754 #define HAVE_VA_COPY 1
11755 EOF
11756
11757 elif test "x$ac_cv___va_copy" = "xyes"; then
11758     cat >> confdefs.h <<\EOF
11759 #define VA_COPY __va_copy
11760 EOF
11761
11762     cat >> confdefs.h <<\EOF
11763 #define HAVE_VA_COPY 1
11764 EOF
11765
11766 fi
11767
11768 if test "x$ac_cv_va_val_copy" = "xno"; then
11769    cat >> confdefs.h <<\EOF
11770 #define HAVE_VA_LIST_AS_ARRAY 1
11771 EOF
11772
11773 fi
11774 echo "$ac_t""$ac_cv_va_val_copy" 1>&6
11775
11776 case "$target" in
11777         *-linux*)
11778                     _curdir=`pwd`
11779             export _curdir
11780             rm -rf conftest* _conftest
11781             mkdir _conftest
11782             cat >> conftest.C <<\EOF
11783 #include <stdio.h>
11784 #include <link.h>
11785 #include <dlfcn.h>
11786 #ifdef _dl_loaded
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;}
11790 }
11791 int main() {
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);
11796   __dump_link_map();
11797 }
11798 #else
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"); }
11801 #endif
11802 EOF
11803
11804             $PERL -p -i -e "s/CURDIR/\$ENV{_curdir}/g;" conftest.C
11805
11806             cat >> conftest1.C <<\EOF
11807 #include <stdio.h>
11808 void foo(void) {printf("foo in dll called\n");}
11809 EOF
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
11814             cd _conftest
11815             if test `./conftest | grep conftest1.so | wc -l` -gt 1
11816             then
11817                 echo
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."
11822                 echo
11823             fi
11824             cd ${_curdir}
11825             rm -rf conftest* _conftest
11826                     ;;
11827 esac
11828
11829 ac_ext=C
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
11835
11836
11837 ARM_ABI_PREFIX=
11838 HAVE_GCC3_ABI=
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
11845 else
11846   cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849
11850 int main() {
11851
11852 #if defined(__ARM_EABI__)
11853   return 0;
11854 #else
11855 #error Not ARM EABI.
11856 #endif
11857                         
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11861   rm -rf conftest*
11862   ac_cv_gcc_arm_eabi="yes"
11863 else
11864   echo "configure: failed program was:" >&5
11865   cat conftest.$ac_ext >&5
11866   rm -rf conftest*
11867   ac_cv_gcc_arm_eabi="no"
11868 fi
11869 rm -f conftest*
11870 fi
11871
11872 echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6
11873     if test "$ac_cv_gcc_arm_eabi" = "yes"; then
11874         HAVE_ARM_EABI=1
11875         ARM_ABI_PREFIX=eabi-
11876     else
11877         ARM_ABI_PREFIX=oabi-
11878     fi
11879   fi
11880
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
11885 else
11886   cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889
11890 int main() {
11891
11892 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
11893   return 0;
11894 #else
11895 #error Not gcc3.
11896 #endif
11897                       
11898 ; return 0; }
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11901   rm -rf conftest*
11902   ac_cv_gcc_three_abi="yes"
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   ac_cv_gcc_three_abi="no"
11908 fi
11909 rm -f conftest*
11910 fi
11911
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}"
11915       HAVE_GCC3_ABI=1
11916   else
11917       TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc2}"
11918   fi
11919 fi
11920
11921
11922
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
11927 else
11928   cat > conftest.$ac_ext <<EOF
11929 #line 11930 "configure"
11930 #include "confdefs.h"
11931 class X {
11932                                public: explicit X(int i) : i_(i) {}
11933                                private: int i_;
11934                                };
11935 int main() {
11936 X x(3);
11937 ; return 0; }
11938 EOF
11939 if { (eval echo configure:11940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11940   rm -rf conftest*
11941   ac_cv_cpp_explicit=yes
11942 else
11943   echo "configure: failed program was:" >&5
11944   cat conftest.$ac_ext >&5
11945   rm -rf conftest*
11946   ac_cv_cpp_explicit=no
11947 fi
11948 rm -f conftest*
11949 fi
11950
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
11955 EOF
11956
11957 fi
11958
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
11963 else
11964   cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 class param {
11968                                public:
11969                                    typedef unsigned long num_type;
11970                                };
11971
11972                                template <class T> class tplt {
11973                                public:
11974                                    typedef typename T::num_type t_num_type;
11975                                    t_num_type foo(typename T::num_type num) {
11976                                        return num;
11977                                    }
11978                                };
11979 int main() {
11980 tplt<param> A;
11981                                A.foo(0);
11982 ; return 0; }
11983 EOF
11984 if { (eval echo configure:11985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11985   rm -rf conftest*
11986   ac_cv_cpp_typename=yes
11987 else
11988   echo "configure: failed program was:" >&5
11989   cat conftest.$ac_ext >&5
11990   rm -rf conftest*
11991   ac_cv_cpp_typename=no
11992 fi
11993 rm -f conftest*
11994 fi
11995
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
12000 EOF
12001
12002 fi
12003
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
12008 else
12009   cat > conftest.$ac_ext <<EOF
12010 #line 12011 "configure"
12011 #include "confdefs.h"
12012 template <class T> struct X { int a; };
12013                                class Y {};
12014                                template <> struct X<Y> { double a; };
12015 int main() {
12016 X<int> int_x;
12017                                X<Y> y_x;
12018 ; return 0; }
12019 EOF
12020 if { (eval echo configure:12021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12021   rm -rf conftest*
12022   ac_cv_cpp_modern_specialize_template_syntax=yes
12023 else
12024   echo "configure: failed program was:" >&5
12025   cat conftest.$ac_ext >&5
12026   rm -rf conftest*
12027   ac_cv_cpp_modern_specialize_template_syntax=no
12028 fi
12029 rm -f conftest*
12030 fi
12031
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
12036 EOF
12037
12038 fi
12039
12040
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
12045 else
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*> {};
12051 int main() {
12052 return 0;
12053 ; return 0; }
12054 EOF
12055 if { (eval echo configure:12056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12056   rm -rf conftest*
12057   ac_cv_cpp_partial_specialization=yes
12058 else
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   ac_cv_cpp_partial_specialization=no
12063 fi
12064 rm -f conftest*
12065 fi
12066
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
12071 EOF
12072
12073 fi
12074
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
12079 else
12080   cat > conftest.$ac_ext <<EOF
12081 #line 12082 "configure"
12082 #include "confdefs.h"
12083 template <class T> class Base { };
12084                                 template <class T>
12085                                 Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; }
12086                                 template <class T> class Derived : public Base<T> { };
12087 int main() {
12088 Derived<char> a, b;
12089                                 Base<char> c = a + b;
12090                                 return 0;
12091 ; return 0; }
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12094   rm -rf conftest*
12095   ac_cv_need_derived_template_operators=no
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   ac_cv_need_derived_template_operators=yes
12101 fi
12102 rm -f conftest*
12103 fi
12104
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
12109 EOF
12110
12111 fi
12112
12113
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
12118 else
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; }
12125 int main() {
12126 Derived<char> bar; return foo(bar);
12127 ; return 0; }
12128 EOF
12129 if { (eval echo configure:12130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12130   rm -rf conftest*
12131   ac_cv_need_cpp_template_cast_to_base=no
12132 else
12133   echo "configure: failed program was:" >&5
12134   cat conftest.$ac_ext >&5
12135   rm -rf conftest*
12136   ac_cv_need_cpp_template_cast_to_base=yes
12137 fi
12138 rm -f conftest*
12139 fi
12140
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
12145 EOF
12146
12147 fi
12148
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
12153 else
12154   cat > conftest.$ac_ext <<EOF
12155 #line 12156 "configure"
12156 #include "confdefs.h"
12157
12158                                 template <class T> class ptrClass {
12159                                   public: T* ptr;
12160                                 };
12161
12162                                 template <class T> T* a(ptrClass<T> *arg) {
12163                                   return arg->ptr;
12164                                 }
12165
12166                                 template <class T>
12167                                 const T* a(const ptrClass<T> *arg) {
12168                                   return arg->ptr;
12169                                 }
12170                                
12171 int main() {
12172  ptrClass<int> i;
12173                                  a(&i); 
12174 ; return 0; }
12175 EOF
12176 if { (eval echo configure:12177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12177   rm -rf conftest*
12178   ac_cv_can_resolve_const_ambiguity=yes
12179 else
12180   echo "configure: failed program was:" >&5
12181   cat conftest.$ac_ext >&5
12182   rm -rf conftest*
12183   ac_cv_can_resolve_const_ambiguity=no
12184 fi
12185 rm -f conftest*
12186 fi
12187
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
12192 EOF
12193
12194 fi
12195
12196
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
12201 else
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; };
12207 int main() {
12208 B b; return b.foo();
12209 ; return 0; }
12210 EOF
12211 if { (eval echo configure:12212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12212   rm -rf conftest*
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; };
12218 int main() {
12219 B b; return b.foo();
12220 ; return 0; }
12221 EOF
12222 if { (eval echo configure:12223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12223   rm -rf conftest*
12224   ac_cv_cpp_access_changing_using2=no
12225 else
12226   echo "configure: failed program was:" >&5
12227   cat conftest.$ac_ext >&5
12228   rm -rf conftest*
12229   ac_cv_cpp_access_changing_using2=yes
12230 fi
12231 rm -f conftest*
12232 else
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   ac_cv_cpp_access_changing_using2=no
12237 fi
12238 rm -f conftest*
12239 fi
12240
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
12245 EOF
12246
12247 fi
12248
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
12253 else
12254   cat > conftest.$ac_ext <<EOF
12255 #line 12256 "configure"
12256 #include "confdefs.h"
12257 class X { 
12258                                  public: int go(const X&) {return 3;}
12259                                          int jo(const X&) {return 3;}
12260                                };
12261                                class Y : public X {
12262                                  public:  int go(int) {return 2;}
12263                                           int jo(int) {return 2;}
12264                                           using X::jo;
12265                                  private: using X::go;
12266                                };
12267 int main() {
12268 X x; Y y; y.jo(x);
12269 ; return 0; }
12270 EOF
12271 if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12272   rm -rf conftest*
12273   ac_cv_cpp_ambiguity_resolving_using=yes
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277   rm -rf conftest*
12278   ac_cv_cpp_ambiguity_resolving_using=no
12279 fi
12280 rm -f conftest*
12281 fi
12282
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
12287 EOF
12288
12289 fi
12290
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
12295 else
12296   cat > conftest.$ac_ext <<EOF
12297 #line 12298 "configure"
12298 #include "confdefs.h"
12299 #include <algorithm>
12300 int main() {
12301 return std::min(0, 1);
12302 ; return 0; }
12303 EOF
12304 if { (eval echo configure:12305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12305   rm -rf conftest*
12306   ac_cv_cpp_namespace_std=yes
12307 else
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -rf conftest*
12311   ac_cv_cpp_namespace_std=no
12312 fi
12313 rm -f conftest*
12314 fi
12315
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
12320 EOF
12321
12322 fi
12323
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
12328 else
12329   cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 #include <algorithm>
12333                                 struct T1 {};
12334                                 int operator==(const T1&, const T1&) { return 0; }
12335                                 int operator!=(const T1&, const T1&) { return 0; }
12336 int main() {
12337 T1 a,b; return a != b;
12338 ; return 0; }
12339 EOF
12340 if { (eval echo configure:12341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12341   rm -rf conftest*
12342   ac_cv_cpp_unambiguous_std_notequal=unambiguous
12343 else
12344   echo "configure: failed program was:" >&5
12345   cat conftest.$ac_ext >&5
12346   rm -rf conftest*
12347   ac_cv_cpp_unambiguous_std_notequal=ambiguous
12348 fi
12349 rm -f conftest*
12350 fi
12351
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
12356 EOF
12357
12358 fi
12359
12360
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
12365 else
12366   cat > conftest.$ac_ext <<EOF
12367 #line 12368 "configure"
12368 #include "confdefs.h"
12369 struct X { int i; };
12370                                struct Y { int i; };
12371 int main() {
12372 X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
12373 ; return 0; }
12374 EOF
12375 if { (eval echo configure:12376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12376   rm -rf conftest*
12377   ac_cv_cpp_reinterpret_cast=yes
12378 else
12379   echo "configure: failed program was:" >&5
12380   cat conftest.$ac_ext >&5
12381   rm -rf conftest*
12382   ac_cv_cpp_reinterpret_cast=no
12383 fi
12384 rm -f conftest*
12385 fi
12386
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
12391 EOF
12392
12393 fi
12394
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
12399 else
12400   if test "$cross_compiling" = yes; then
12401   ac_cv_cpp_dynamic_cast_void_ptr=no
12402 else
12403   cat > conftest.$ac_ext <<EOF
12404 #line 12405 "configure"
12405 #include "confdefs.h"
12406 #ifdef __cplusplus
12407 extern "C" void exit(int);
12408 #endif
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; };
12412
12413                             int main() {
12414                                  Z mdo;
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))));
12421                             }
12422 EOF
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
12424 then
12425   ac_cv_cpp_dynamic_cast_void_ptr=yes
12426 else
12427   echo "configure: failed program was:" >&5
12428   cat conftest.$ac_ext >&5
12429   rm -fr conftest*
12430   ac_cv_cpp_dynamic_cast_void_ptr=no
12431 fi
12432 rm -fr conftest*
12433 fi
12434
12435 fi
12436
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
12441 EOF
12442
12443 fi
12444
12445
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
12450 else
12451   cat > conftest.$ac_ext <<EOF
12452 #line 12453 "configure"
12453 #include "confdefs.h"
12454 class X {private: virtual void never_called();};
12455 int main() {
12456 X x;
12457 ; return 0; }
12458 EOF
12459 if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12460   rm -rf conftest*
12461   ac_cv_cpp_unused_required=no
12462 else
12463   echo "configure: failed program was:" >&5
12464   cat conftest.$ac_ext >&5
12465   rm -rf conftest*
12466   ac_cv_cpp_unused_required=yes
12467 fi
12468 rm -f conftest*
12469 fi
12470
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
12475 EOF
12476
12477 fi
12478
12479
12480
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
12485 else
12486   cat > conftest.$ac_ext <<EOF
12487 #line 12488 "configure"
12488 #include "confdefs.h"
12489 #include <algorithm>
12490                                 template <class T> class Foo {};
12491                                 class T2;
12492                                 template <class T> int operator==(const T2*, const T&) { return 0; }
12493                                 template <class T> int operator!=(const T2*, const T&) { return 0; }
12494 int main() {
12495 Foo<int> f; return (0 != f);
12496 ; return 0; }
12497 EOF
12498 if { (eval echo configure:12499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12499   rm -rf conftest*
12500   ac_cv_trouble_comparing_to_zero=no
12501 else
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   ac_cv_trouble_comparing_to_zero=yes
12506 fi
12507 rm -f conftest*
12508 fi
12509
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
12514 EOF
12515
12516 fi
12517
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
12525 else
12526   cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 __thread bool tlsIsMainThread = false;
12530 int main() {
12531 return tlsIsMainThread;
12532 ; return 0; }
12533 EOF
12534 if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12535   rm -rf conftest*
12536   ac_cv_thread_keyword=yes
12537 else
12538   echo "configure: failed program was:" >&5
12539   cat conftest.$ac_ext >&5
12540   rm -rf conftest*
12541   ac_cv_thread_keyword=no
12542 fi
12543 rm -f conftest*
12544 fi
12545
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.
12550   # See bug 528687
12551   case "${target}" in
12552     mips*-*)
12553       :
12554       ;;
12555     *-android*)
12556       :
12557       ;;
12558     *)
12559       cat >> confdefs.h <<\EOF
12560 #define HAVE_THREAD_TLS_KEYWORD 1
12561 EOF
12562
12563       ;;
12564   esac
12565 fi
12566
12567
12568 MALLOC_H=
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
12574 else
12575   cat > conftest.$ac_ext <<EOF
12576 #line 12577 "configure"
12577 #include "confdefs.h"
12578 #include <malloc.h>
12579 EOF
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
12584   rm -rf conftest*
12585   eval "ac_cv_header_$ac_safe=yes"
12586 else
12587   echo "$ac_err" >&5
12588   echo "configure: failed program was:" >&5
12589   cat conftest.$ac_ext >&5
12590   rm -rf conftest*
12591   eval "ac_cv_header_$ac_safe=no"
12592 fi
12593 rm -f conftest*
12594 fi
12595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12596   echo "$ac_t""yes" 1>&6
12597   MALLOC_H=malloc.h
12598 else
12599   echo "$ac_t""no" 1>&6
12600 fi
12601
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
12608 else
12609   cat > conftest.$ac_ext <<EOF
12610 #line 12611 "configure"
12611 #include "confdefs.h"
12612 #include <malloc/malloc.h>
12613 EOF
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
12618   rm -rf conftest*
12619   eval "ac_cv_header_$ac_safe=yes"
12620 else
12621   echo "$ac_err" >&5
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   eval "ac_cv_header_$ac_safe=no"
12626 fi
12627 rm -f conftest*
12628 fi
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
12632 else
12633   echo "$ac_t""no" 1>&6
12634 fi
12635
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
12642 else
12643   cat > conftest.$ac_ext <<EOF
12644 #line 12645 "configure"
12645 #include "confdefs.h"
12646 #include <sys/malloc.h>
12647 EOF
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
12652   rm -rf conftest*
12653   eval "ac_cv_header_$ac_safe=yes"
12654 else
12655   echo "$ac_err" >&5
12656   echo "configure: failed program was:" >&5
12657   cat conftest.$ac_ext >&5
12658   rm -rf conftest*
12659   eval "ac_cv_header_$ac_safe=no"
12660 fi
12661 rm -f conftest*
12662 fi
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
12666 else
12667   echo "$ac_t""no" 1>&6
12668 fi
12669
12670   fi
12671 fi
12672 if test "$MALLOC_H" != ""; then
12673    cat >> confdefs.h <<EOF
12674 #define MALLOC_H <$MALLOC_H>
12675 EOF
12676
12677 fi
12678
12679 MOZ_ALLOCATING_FUNCS="strndup posix_memalign memalign valloc"
12680 for ac_func in strndup posix_memalign memalign valloc
12681 do
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
12686 else
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.  */
12694 #ifdef __cplusplus
12695 extern "C"
12696 #endif
12697 /* We use char because int might match the return type of a gcc2
12698     builtin and then its argument prototype would still apply.  */
12699 char $ac_func();
12700
12701 int main() {
12702
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)
12707 choke me
12708 #else
12709 $ac_func();
12710 #endif
12711
12712 ; return 0; }
12713 EOF
12714 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12715   rm -rf conftest*
12716   eval "ac_cv_func_$ac_func=yes"
12717 else
12718   echo "configure: failed program was:" >&5
12719   cat conftest.$ac_ext >&5
12720   rm -rf conftest*
12721   eval "ac_cv_func_$ac_func=no"
12722 fi
12723 rm -f conftest*
12724 fi
12725
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
12731 EOF
12732  
12733 else
12734   echo "$ac_t""no" 1>&6
12735 fi
12736 done
12737
12738
12739
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
12744 else
12745   cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12748
12749 int main() {
12750 inline void f(void) __attribute__((always_inline));
12751 ; return 0; }
12752 EOF
12753 if { (eval echo configure:12754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12754   rm -rf conftest*
12755   ac_cv_attribute_always_inline=yes
12756 else
12757   echo "configure: failed program was:" >&5
12758   cat conftest.$ac_ext >&5
12759   rm -rf conftest*
12760   ac_cv_attribute_always_inline=no
12761 fi
12762 rm -f conftest*
12763 fi
12764
12765 echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6
12766
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
12771 else
12772   cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775
12776 int main() {
12777 void* f(int) __attribute__((malloc));
12778 ; return 0; }
12779 EOF
12780 if { (eval echo configure:12781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12781   rm -rf conftest*
12782   ac_cv_attribute_malloc=yes
12783 else
12784   echo "configure: failed program was:" >&5
12785   cat conftest.$ac_ext >&5
12786   rm -rf conftest*
12787   ac_cv_attribute_malloc=no
12788 fi
12789 rm -f conftest*
12790 fi
12791
12792 echo "$ac_t""$ac_cv_attribute_malloc" 1>&6
12793
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
12798 else
12799   cat > conftest.$ac_ext <<EOF
12800 #line 12801 "configure"
12801 #include "confdefs.h"
12802
12803 int main() {
12804 int f(void) __attribute__((warn_unused_result));
12805 ; return 0; }
12806 EOF
12807 if { (eval echo configure:12808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12808   rm -rf conftest*
12809   ac_cv_attribute_warn_unused=yes
12810 else
12811   echo "configure: failed program was:" >&5
12812   cat conftest.$ac_ext >&5
12813   rm -rf conftest*
12814   ac_cv_attribute_warn_unused=no
12815 fi
12816 rm -f conftest*
12817 fi
12818
12819 echo "$ac_t""$ac_cv_attribute_warn_unused" 1>&6
12820
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
12825 else
12826   cat > conftest.$ac_ext <<EOF
12827 #line 12828 "configure"
12828 #include "confdefs.h"
12829
12830 int main() {
12831 void f(void) __attribute__((noreturn));
12832 ; return 0; }
12833 EOF
12834 if { (eval echo configure:12835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12835   rm -rf conftest*
12836   ac_cv_attribute_noreturn=yes
12837 else
12838   echo "configure: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   rm -rf conftest*
12841   ac_cv_attribute_noreturn=no
12842 fi
12843 rm -f conftest*
12844 fi
12845
12846 echo "$ac_t""$ac_cv_attribute_noreturn" 1>&6
12847  
12848 ac_ext=c
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
12854
12855
12856
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
12861 else
12862   cat > conftest.$ac_ext <<EOF
12863 #line 12864 "configure"
12864 #include "confdefs.h"
12865 #include <locale.h>
12866 int main() {
12867 int category = LC_MESSAGES;
12868 ; return 0; }
12869 EOF
12870 if { (eval echo configure:12871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12871   rm -rf conftest*
12872   ac_cv_i18n_lc_messages=yes
12873 else
12874   echo "configure: failed program was:" >&5
12875   cat conftest.$ac_ext >&5
12876   rm -rf conftest*
12877   ac_cv_i18n_lc_messages=no
12878 fi
12879 rm -f conftest*
12880 fi
12881
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
12886 EOF
12887
12888 fi
12889
12890 for ac_func in localeconv
12891 do
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
12896 else
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.  */
12906 char $ac_func();
12907
12908 int main() {
12909
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)
12914 choke me
12915 #else
12916 $ac_func();
12917 #endif
12918
12919 ; return 0; }
12920 EOF
12921 if { (eval echo configure:12922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12922   rm -rf conftest*
12923   eval "ac_cv_func_$ac_func=yes"
12924 else
12925   echo "configure: failed program was:" >&5
12926   cat conftest.$ac_ext >&5
12927   rm -rf conftest*
12928   eval "ac_cv_func_$ac_func=no"
12929 fi
12930 rm -f conftest*
12931 fi
12932
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
12938 EOF
12939  
12940 else
12941   echo "$ac_t""no" 1>&6
12942 fi
12943 done
12944
12945
12946 fi # SKIP_COMPILER_CHECKS
12947
12948 TARGET_XPCOM_ABI=
12949 if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then
12950     TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}"
12951 fi
12952
12953
12954 if test "$ac_cv_attribute_always_inline" = yes ; then
12955   cat >> confdefs.h <<\EOF
12956 #define NS_ALWAYS_INLINE __attribute__((always_inline))
12957 EOF
12958
12959 else
12960   cat >> confdefs.h <<\EOF
12961 #define NS_ALWAYS_INLINE 
12962 EOF
12963
12964 fi
12965
12966 if test "$ac_cv_attribute_malloc" = yes ; then
12967   cat >> confdefs.h <<\EOF
12968 #define NS_ATTR_MALLOC __attribute__((malloc))
12969 EOF
12970
12971 else
12972   cat >> confdefs.h <<\EOF
12973 #define NS_ATTR_MALLOC 
12974 EOF
12975
12976 fi
12977
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))
12981 EOF
12982
12983 else
12984   cat >> confdefs.h <<\EOF
12985 #define NS_WARN_UNUSED_RESULT 
12986 EOF
12987
12988 fi
12989
12990 if test "$ac_cv_attribute_noreturn" = yes ; then
12991   cat >> confdefs.h <<\EOF
12992 #define NS_NORETURN __attribute__((noreturn))
12993 EOF
12994
12995 else
12996   cat >> confdefs.h <<\EOF
12997 #define NS_NORETURN 
12998 EOF
12999
13000 fi
13001
13002
13003 if test -n "$SKIP_COMPILER_CHECKS"; then
13004       cat >> confdefs.h <<\EOF
13005 #define MALLOC_H <malloc.h>
13006 EOF
13007
13008    cat >> confdefs.h <<\EOF
13009 #define HAVE_FORCEINLINE 1
13010 EOF
13011
13012    cat >> confdefs.h <<\EOF
13013 #define HAVE_LOCALECONV 1
13014 EOF
13015
13016 fi # SKIP_COMPILER_CHECKS
13017
13018 # External Packages
13019
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
13024     _USE_SYSTEM_NSPR=1 
13025   elif test "$withval" = "no"; then
13026     :
13027   else
13028     { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; exit 1; }
13029   fi
13030 fi
13031
13032
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
13037 fi
13038
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"
13042   NSPR_LIBS=$withval
13043 fi
13044
13045
13046
13047
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; }
13051 fi
13052
13053 if test -n "$_USE_SYSTEM_NSPR"; then
13054     MOZ_NATIVE_NSPR=
13055     
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"
13060 else
13061   nspr_config_prefix=""
13062 fi
13063
13064
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"
13069 else
13070   nspr_config_exec_prefix=""
13071 fi
13072
13073
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
13078                 fi
13079         fi
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
13084                 fi
13085         fi
13086
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
13094 else
13095   case "$NSPR_CONFIG" in
13096   /*)
13097   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
13098   ;;
13099   ?:/*)                  
13100   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
13101   ;;
13102   *)
13103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13104   ac_dummy="$PATH"
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"
13109       break
13110     fi
13111   done
13112   IFS="$ac_save_ifs"
13113   test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no"
13114   ;;
13115 esac
13116 fi
13117 NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
13118 if test -n "$NSPR_CONFIG"; then
13119   echo "$ac_t""$NSPR_CONFIG" 1>&6
13120 else
13121   echo "$ac_t""no" 1>&6
13122 fi
13123
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
13127
13128         no_nspr=""
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"
13137         else
13138             no_nspr="yes"
13139         fi
13140
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
13155                         no_nspr="yes"
13156                 elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
13157                      test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then
13158                         no_nspr="yes"
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
13162                         no_nspr="yes"
13163                 fi
13164         fi
13165
13166         if test -z "$no_nspr"; then
13167                 echo "$ac_t""yes" 1>&6
13168                 MOZ_NATIVE_NSPR=1     
13169         else
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; }
13172         fi
13173
13174
13175         
13176         
13177
13178
13179 fi
13180
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"
13187 #include "prlog.h"
13188 int main() {
13189 #ifndef PR_STATIC_ASSERT
13190                  #error PR_STATIC_ASSERT not defined
13191                  #endif
13192 ; return 0; }
13193 EOF
13194 if { (eval echo configure:13195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13195   rm -rf conftest*
13196   MOZ_NATIVE_NSPR=1
13197 else
13198   echo "configure: failed program was:" >&5
13199   cat conftest.$ac_ext >&5
13200   rm -rf conftest*
13201   { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; exit 1; }
13202 fi
13203 rm -f conftest*
13204     CFLAGS=$_SAVE_CFLAGS
13205 fi
13206
13207
13208 # Application
13209
13210 BUILD_STATIC_LIBS=
13211 ENABLE_TESTS=1
13212
13213 MOZ_THUMB2=
13214 USE_ARM_KUSER=
13215
13216 case "${target}" in
13217     arm-android-eabi)
13218         USE_ARM_KUSER=1
13219         MOZ_THUMB2=1
13220         ;;
13221 esac
13222
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
13227     USE_ARM_KUSER=1
13228   elif test "$withval" = "no"; then
13229     :
13230   else
13231     { echo "configure: error: Option, arm-kuser, does not take an argument ($withval)." 1>&2; exit 1; }
13232   fi
13233 fi
13234
13235 if test -n "$USE_ARM_KUSER"; then
13236    cat >> confdefs.h <<\EOF
13237 #define USE_ARM_KUSER 1
13238 EOF
13239
13240 fi
13241
13242 # Components and Features
13243
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 
13248 fi
13249
13250
13251
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
13256     ENABLE_TESTS=
13257   elif test "$enableval" = "yes"; then
13258     ENABLE_TESTS=1 
13259   else
13260     { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; }
13261   fi
13262 fi
13263
13264
13265 # Individual module options
13266
13267 case "$target_cpu" in
13268   arm*)
13269     MOZ_ARM_ARCH=armv7
13270   ;;
13271 esac
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
13276     MOZ_THUMB2=1
13277   elif test "$enableval" = "no"; then
13278     MOZ_THUMB2=
13279   else
13280     { echo "configure: error: Option, thumb2, does not take an argument ($enableval)." 1>&2; exit 1; }
13281   fi
13282 fi
13283
13284 if test -n "$MOZ_THUMB2"; then
13285   MOZ_ARM_ARCH=armv7
13286 fi
13287
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
13292 fi
13293
13294
13295 if test -n "$MOZ_THUMB2"; then
13296   case "$target_cpu" in
13297     arm*)
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; }
13300       fi
13301       if test "$GNU_CC"; then
13302         cat >> confdefs.h <<\EOF
13303 #define MOZ_THUMB2 1
13304 EOF
13305
13306         cat >> confdefs.h <<\EOF
13307 #define MOZ_ARM_ARCH 1
13308 EOF
13309
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"
13313       else
13314         { echo "configure: error: --enable-thumb2 is not supported for non-GNU toolchains" 1>&2; exit 1; }
13315       fi
13316     ;;
13317     *)
13318       { echo "configure: error: --enable-thumb2 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
13319     ;;
13320   esac
13321 elif test "$MOZ_ARM_ARCH" = "armv7"; then
13322   case "$target_cpu" in
13323     arm*)
13324       if test "$GNU_CC"; then
13325         cat >> confdefs.h <<\EOF
13326 #define MOZ_ARM_ARCH 1
13327 EOF
13328
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"
13332       else
13333         { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-GNU toolchains" 1>&2; exit 1; }
13334       fi
13335     ;;
13336     *)
13337       { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
13338     ;;
13339   esac
13340 else
13341   case "$target_cpu" in
13342     arm*)
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"
13347       fi
13348       ;;
13349   esac
13350 fi
13351
13352
13353
13354
13355 # Debugging and Optimizations
13356
13357 if test -z "$MOZ_DEBUG_FLAGS"; then
13358   MOZ_DEBUG_FLAGS="-g"
13359 fi
13360
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
13365     MOZ_DEBUG=1
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
13369     fi
13370   else
13371     MOZ_DEBUG=
13372   fi 
13373 else
13374   MOZ_DEBUG=
13375 fi
13376
13377
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}"
13384 done
13385 fi
13386
13387
13388 MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
13389
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"
13398 #include <stdio.h>
13399 int main() {
13400 printf("Hello World\n");
13401 ; return 0; }
13402 EOF
13403 if { (eval echo configure:13404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13404   rm -rf conftest*
13405   _results=yes
13406 else
13407   echo "configure: failed program was:" >&5
13408   cat conftest.$ac_ext >&5
13409   rm -rf conftest*
13410   _results=no
13411 fi
13412 rm -f conftest*
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; }
13416     fi
13417     CFLAGS=$_SAVE_CFLAGS
13418 fi
13419
13420 if test -z "$MOZ_OPTIMIZE_FLAGS"; then
13421         MOZ_OPTIMIZE_FLAGS="-O"
13422 fi
13423
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
13428     MOZ_OPTIMIZE=1
13429     if test -n "$enableval" -a "$enableval" != "yes"; then
13430         MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'`
13431         MOZ_OPTIMIZE=2
13432     fi
13433 else
13434     MOZ_OPTIMIZE=
13435 fi 
13436 else
13437   MOZ_OPTIMIZE=1
13438 fi
13439
13440
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"
13450 #include <stdio.h>
13451 int main() {
13452 printf("Hello World\n");
13453 ; return 0; }
13454 EOF
13455 if { (eval echo configure:13456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13456   rm -rf conftest*
13457   _results=yes
13458 else
13459   echo "configure: failed program was:" >&5
13460   cat conftest.$ac_ext >&5
13461   rm -rf conftest*
13462   _results=no
13463 fi
13464 rm -f conftest*
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; }
13468     fi
13469     CFLAGS=$_SAVE_CFLAGS
13470 fi
13471 fi # COMPILE_ENVIRONMENT
13472
13473
13474
13475
13476
13477
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
13484   fi 
13485 fi
13486
13487
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'`
13496           else
13497               { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
13498           fi
13499       fi
13500   fi 
13501 fi
13502
13503
13504 if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
13505     cat >> confdefs.h <<\EOF
13506 #define MOZ_DEBUG_SYMBOLS 1
13507 EOF
13508
13509     export MOZ_DEBUG_SYMBOLS
13510 fi
13511
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= 
13519   else
13520     { echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&2; exit 1; }
13521   fi
13522 fi
13523
13524 if test "$MOZ_DISABLE_WARNINGS_AS_ERRORS"; then
13525    WARNINGS_AS_ERRORS=''
13526 fi
13527
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
13533     NS_TRACE_MALLOC=1
13534   elif test "$enableval" = "no"; then
13535     NS_TRACE_MALLOC= 
13536   else
13537     { echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13538   fi
13539 fi
13540
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
13546 EOF
13547
13548 fi
13549
13550
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
13555     MOZ_MEMORY=1
13556   elif test "$enableval" = "no"; then
13557     MOZ_MEMORY=
13558   else
13559     { echo "configure: error: Option, jemalloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13560   fi
13561 fi
13562
13563
13564 if test "$NS_TRACE_MALLOC"; then
13565     MOZ_MEMORY=
13566 fi
13567
13568 if test "$MOZ_MEMORY"; then
13569
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
13574 EOF
13575
13576     else
13577       cat >> confdefs.h <<EOF
13578 #define MOZ_MEMORY_SIZEOF_PTR_2POW 3
13579 EOF
13580
13581     fi
13582   else
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
13587 else
13588   if test "$cross_compiling" = yes; then
13589   ac_cv_sizeof_int_p=4
13590 else
13591   cat > conftest.$ac_ext <<EOF
13592 #line 13593 "configure"
13593 #include "confdefs.h"
13594 #include <stdio.h>
13595 main()
13596 {
13597   FILE *f=fopen("conftestval", "w");
13598   if (!f) exit(1);
13599   fprintf(f, "%d\n", sizeof(int *));
13600   exit(0);
13601 }
13602 EOF
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
13604 then
13605   ac_cv_sizeof_int_p=`cat conftestval`
13606 else
13607   echo "configure: failed program was:" >&5
13608   cat conftest.$ac_ext >&5
13609   rm -fr conftest*
13610   ac_cv_sizeof_int_p=0
13611 fi
13612 rm -fr conftest*
13613 fi
13614
13615 fi
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
13619 EOF
13620
13621
13622     case "${ac_cv_sizeof_int_p}" in
13623     4)
13624       cat >> confdefs.h <<EOF
13625 #define MOZ_MEMORY_SIZEOF_PTR_2POW 2
13626 EOF
13627
13628       ;;
13629     8)
13630       cat >> confdefs.h <<EOF
13631 #define MOZ_MEMORY_SIZEOF_PTR_2POW 3
13632 EOF
13633
13634       ;;
13635     *)
13636       { echo "configure: error: Unexpected pointer size" 1>&2; exit 1; }
13637       ;;
13638     esac
13639   fi
13640
13641   cat >> confdefs.h <<\EOF
13642 #define MOZ_MEMORY 1
13643 EOF
13644
13645   if test "x$MOZ_DEBUG" = "x1"; then
13646     cat >> confdefs.h <<\EOF
13647 #define MOZ_MEMORY_DEBUG 1
13648 EOF
13649
13650   fi
13651         case "${target}" in
13652   *-darwin*)
13653     cat >> confdefs.h <<\EOF
13654 #define MOZ_MEMORY_DARWIN 1
13655 EOF
13656
13657     ;;
13658   *-*freebsd*)
13659     cat >> confdefs.h <<\EOF
13660 #define MOZ_MEMORY_BSD 1
13661 EOF
13662
13663     ;;
13664   *-*linux*)
13665     cat >> confdefs.h <<\EOF
13666 #define MOZ_MEMORY_LINUX 1
13667 EOF
13668
13669     ;;
13670   *-netbsd*)
13671     cat >> confdefs.h <<\EOF
13672 #define MOZ_MEMORY_BSD 1
13673 EOF
13674
13675     ;;
13676   *-solaris*)
13677     cat >> confdefs.h <<\EOF
13678 #define MOZ_MEMORY_SOLARIS 1
13679 EOF
13680
13681     ;;
13682   *-msvc*|*-mks*|*-cygwin*|*-mingw*)
13683     cat >> confdefs.h <<\EOF
13684 #define MOZ_MEMORY_WINDOWS 1
13685 EOF
13686
13687     # the interesting bits will get passed down in MOZ_MEMORY_LDFLAGS
13688     ;;
13689   *-*wince)
13690     cat >> confdefs.h <<\EOF
13691 #define MOZ_MEMORY_WINCE 1
13692 EOF
13693
13694     cat >> confdefs.h <<\EOF
13695 #define MOZ_MEMORY_WINDOWS 1
13696 EOF
13697
13698     if test -z "$WINCE_WINDOWS_MOBILE"; then
13699       cat >> confdefs.h <<\EOF
13700 #define MOZ_MEMORY_WINCE6 1
13701 EOF
13702
13703     fi
13704     ;;
13705   *-*winmo)
13706     cat >> confdefs.h <<\EOF
13707 #define MOZ_MEMORY_WINCE 1
13708 EOF
13709
13710     cat >> confdefs.h <<\EOF
13711 #define MOZ_MEMORY_WINDOWS 1
13712 EOF
13713
13714     ;;
13715   *-android*)
13716     cat >> confdefs.h <<\EOF
13717 #define MOZ_MEMORY_LINUX 1
13718 EOF
13719
13720     cat >> confdefs.h <<\EOF
13721 #define MOZ_MEMORY_ANDROID 1
13722 EOF
13723
13724     ;;
13725   *)
13726     { echo "configure: error: --enable-jemalloc not supported on ${target}" 1>&2; exit 1; }
13727     ;;
13728   esac
13729
13730   if test "$OS_ARCH" != "Darwin"; then
13731         cat >> confdefs.h <<\EOF
13732 #define HAVE_JEMALLOC_VALLOC 1
13733 EOF
13734
13735     cat >> confdefs.h <<\EOF
13736 #define HAVE_JEMALLOC_POSIX_MEMALIGN 1
13737 EOF
13738
13739     cat >> confdefs.h <<\EOF
13740 #define HAVE_JEMALLOC_MEMALIGN 1
13741 EOF
13742
13743   fi
13744 fi
13745
13746
13747
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
13752     _WRAP_MALLOC=1
13753   elif test "$enableval" = "no"; then
13754     _WRAP_MALLOC= 
13755   else
13756     { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13757   fi
13758 fi
13759
13760
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 $@'
13765     fi
13766 fi
13767
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
13772 fi
13773
13774
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
13781     MOZ_TRACE_JSCALLS= 
13782   else
13783     { echo "configure: error: Option, trace-jscalls, does not take an argument ($enableval)." 1>&2; exit 1; }
13784   fi
13785 fi
13786
13787 if test -n "$MOZ_TRACE_JSCALLS"; then
13788     cat >> confdefs.h <<\EOF
13789 #define MOZ_TRACE_JSCALLS 1
13790 EOF
13791
13792 fi
13793
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
13798     MOZ_TRACEVIS=1
13799   elif test "$enableval" = "no"; then
13800     MOZ_TRACEVIS= 
13801   else
13802     { echo "configure: error: Option, tracevis, does not take an argument ($enableval)." 1>&2; exit 1; }
13803   fi
13804 fi
13805
13806 if test -n "$MOZ_TRACEVIS"; then
13807     cat >> confdefs.h <<\EOF
13808 #define MOZ_TRACEVIS 1
13809 EOF
13810
13811     if test -z "$ENABLE_TRACEJIT"; then
13812        { echo "configure: error: --enable-tracevis is incompatible with --disable-tracejit" 1>&2; exit 1; }
13813     fi
13814 fi
13815
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
13820     MOZ_GCTIMER=1
13821   elif test "$enableval" = "no"; then
13822     MOZ_GCTIMER= 
13823   else
13824     { echo "configure: error: Option, gctimer, does not take an argument ($enableval)." 1>&2; exit 1; }
13825   fi
13826 fi
13827
13828 if test -n "$MOZ_GCTIMER"; then
13829     cat >> confdefs.h <<\EOF
13830 #define MOZ_GCTIMER 1
13831 EOF
13832
13833 fi
13834
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
13839     MOZ_VALGRIND=1
13840   elif test "$enableval" = "no"; then
13841     MOZ_VALGRIND= 
13842   else
13843     { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
13844   fi
13845 fi
13846
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
13853 else
13854   cat > conftest.$ac_ext <<EOF
13855 #line 13856 "configure"
13856 #include "confdefs.h"
13857 #include <valgrind/valgrind.h>
13858 EOF
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
13863   rm -rf conftest*
13864   eval "ac_cv_header_$ac_safe=yes"
13865 else
13866   echo "$ac_err" >&5
13867   echo "configure: failed program was:" >&5
13868   cat conftest.$ac_ext >&5
13869   rm -rf conftest*
13870   eval "ac_cv_header_$ac_safe=no"
13871 fi
13872 rm -f conftest*
13873 fi
13874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13875   echo "$ac_t""yes" 1>&6
13876   :
13877 else
13878   echo "$ac_t""no" 1>&6
13879 { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; exit 1; }
13880 fi
13881
13882     cat >> confdefs.h <<\EOF
13883 #define MOZ_VALGRIND 1
13884 EOF
13885
13886 fi
13887
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
13892     MOZ_JPROF=1
13893   elif test "$enableval" = "no"; then
13894     MOZ_JPROF= 
13895   else
13896     { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; }
13897   fi
13898 fi
13899
13900 if test -n "$MOZ_JPROF"; then
13901     MOZ_PROFILING=1
13902     cat >> confdefs.h <<\EOF
13903 #define MOZ_JPROF 1
13904 EOF
13905
13906 fi
13907
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
13912     MOZ_SHARK=1
13913   elif test "$enableval" = "no"; then
13914     MOZ_SHARK= 
13915   else
13916     { echo "configure: error: Option, shark, does not take an argument ($enableval)." 1>&2; exit 1; }
13917   fi
13918 fi
13919
13920 if test -n "$MOZ_SHARK"; then
13921     MOZ_PROFILING=1
13922     cat >> confdefs.h <<\EOF
13923 #define MOZ_SHARK 1
13924 EOF
13925
13926 fi
13927
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
13932     MOZ_CALLGRIND=1
13933   elif test "$enableval" = "no"; then
13934     MOZ_CALLGRIND= 
13935   else
13936     { echo "configure: error: Option, callgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
13937   fi
13938 fi
13939
13940 if test -n "$MOZ_CALLGRIND"; then
13941     cat >> confdefs.h <<\EOF
13942 #define MOZ_CALLGRIND 1
13943 EOF
13944
13945 fi
13946
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
13951     MOZ_VTUNE=1
13952   elif test "$enableval" = "no"; then
13953     MOZ_VTUNE= 
13954   else
13955     { echo "configure: error: Option, vtune, does not take an argument ($enableval)." 1>&2; exit 1; }
13956   fi
13957 fi
13958
13959 if test -n "$MOZ_VTUNE"; then
13960     MOZ_PROFILING=1
13961     cat >> confdefs.h <<\EOF
13962 #define MOZ_VTUNE 1
13963 EOF
13964
13965 fi
13966
13967 if test -n "$MOZ_PROFILING"; then
13968     cat >> confdefs.h <<\EOF
13969 #define MOZ_PROFILING 1
13970 EOF
13971
13972 fi
13973
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
13978     JS_GC_ZEAL=1
13979   elif test "$enableval" = "no"; then
13980     JS_GC_ZEAL= 
13981   else
13982     { echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; exit 1; }
13983   fi
13984 fi
13985
13986 if test -n "$JS_GC_ZEAL"; then
13987     cat >> confdefs.h <<\EOF
13988 #define JS_GC_ZEAL 1
13989 EOF
13990
13991 fi
13992
13993 # Check whether --with-ccache or --without-ccache was given.
13994 if test "${with_ccache+set}" = set; then
13995   withval="$with_ccache"
13996   CCACHE=$withval
13997 else
13998   CCACHE="no"
13999 fi
14000
14001
14002 if test "$CCACHE" != "no"; then
14003     if test -z "$CCACHE" -o "$CCACHE" = "yes"; then
14004         CCACHE=
14005     else
14006         if test ! -e "$CCACHE"; then
14007             { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
14008         fi
14009     fi
14010       for ac_prog in $CCACHE ccache
14011 do
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
14018 else
14019   case "$CCACHE" in
14020   /*)
14021   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
14022   ;;
14023   ?:/*)                  
14024   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
14025   ;;
14026   *)
14027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
14028   ac_dummy="$PATH"
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"
14033       break
14034     fi
14035   done
14036   IFS="$ac_save_ifs"
14037   ;;
14038 esac
14039 fi
14040 CCACHE="$ac_cv_path_CCACHE"
14041 if test -n "$CCACHE"; then
14042   echo "$ac_t""$CCACHE" 1>&6
14043 else
14044   echo "$ac_t""no" 1>&6
14045 fi
14046
14047 test -n "$CCACHE" && break
14048 done
14049
14050   if test "$msyshost"; then
14051     case "$CCACHE" in
14052     /*)
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"
14059       fi
14060     esac
14061   fi
14062
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
14066         CC="$CCACHE $CC"
14067         CXX="$CCACHE $CXX"
14068     else
14069         { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
14070     fi
14071 fi
14072
14073
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
14078 else
14079   DEHYDRA_PATH= 
14080 fi
14081
14082
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; }
14086     fi
14087     cat >> confdefs.h <<\EOF
14088 #define NS_STATIC_CHECKING 1
14089 EOF
14090
14091 fi
14092
14093
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
14098     ENABLE_STRIP=1
14099   elif test "$enableval" = "no"; then
14100     ENABLE_STRIP= 
14101   else
14102     { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; exit 1; }
14103   fi
14104 fi
14105
14106
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
14111     PKG_SKIP_STRIP= 
14112   elif test "$enableval" = "no"; then
14113     PKG_SKIP_STRIP=1
14114   else
14115     { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; exit 1; }
14116   fi
14117 fi
14118
14119
14120 # Profiling and Instrumenting
14121
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
14126     MOZ_TIMELINE=1
14127   elif test "$enableval" = "no"; then
14128     MOZ_TIMELINE= 
14129   else
14130     { echo "configure: error: Option, timeline, does not take an argument ($enableval)." 1>&2; exit 1; }
14131   fi
14132 fi
14133
14134 if test -n "$MOZ_TIMELINE"; then
14135     cat >> confdefs.h <<\EOF
14136 #define MOZ_TIMELINE 1
14137 EOF
14138
14139 fi
14140
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
14145     MOZ_QUANTIFY=1
14146   elif test "$enableval" = "no"; then
14147     MOZ_QUANTIFY= 
14148   else
14149     { echo "configure: error: Option, quantify, does not take an argument ($enableval)." 1>&2; exit 1; }
14150   fi
14151 fi
14152
14153
14154 if test -z "$SKIP_LIBRARY_CHECKS"; then
14155     
14156     ac_ext=C
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
14162
14163     for ac_func in __cxa_demangle
14164 do
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
14169 else
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.  */
14177 #ifdef __cplusplus
14178 extern "C"
14179 #endif
14180 /* We use char because int might match the return type of a gcc2
14181     builtin and then its argument prototype would still apply.  */
14182 char $ac_func();
14183
14184 int main() {
14185
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)
14190 choke me
14191 #else
14192 $ac_func();
14193 #endif
14194
14195 ; return 0; }
14196 EOF
14197 if { (eval echo configure:14198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14198   rm -rf conftest*
14199   eval "ac_cv_func_$ac_func=yes"
14200 else
14201   echo "configure: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203   rm -rf conftest*
14204   eval "ac_cv_func_$ac_func=no"
14205 fi
14206 rm -f conftest*
14207 fi
14208
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
14214 EOF
14215  HAVE_DEMANGLE=1
14216 else
14217   echo "$ac_t""no" 1>&6
14218 HAVE_DEMANGLE=
14219 fi
14220 done
14221
14222     ac_ext=c
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
14228
14229 fi
14230
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
14237 EOF
14238
14239 fi
14240
14241
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
14248 else
14249   cat > conftest.$ac_ext <<EOF
14250 #line 14251 "configure"
14251 #include "confdefs.h"
14252 #include <unwind.h>
14253 EOF
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
14258   rm -rf conftest*
14259   eval "ac_cv_header_$ac_safe=yes"
14260 else
14261   echo "$ac_err" >&5
14262   echo "configure: failed program was:" >&5
14263   cat conftest.$ac_ext >&5
14264   rm -rf conftest*
14265   eval "ac_cv_header_$ac_safe=no"
14266 fi
14267 rm -f conftest*
14268 fi
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
14272 do
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
14277 else
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.  */
14287 char $ac_func();
14288
14289 int main() {
14290
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)
14295 choke me
14296 #else
14297 $ac_func();
14298 #endif
14299
14300 ; return 0; }
14301 EOF
14302 if { (eval echo configure:14303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14303   rm -rf conftest*
14304   eval "ac_cv_func_$ac_func=yes"
14305 else
14306   echo "configure: failed program was:" >&5
14307   cat conftest.$ac_ext >&5
14308   rm -rf conftest*
14309   eval "ac_cv_func_$ac_func=no"
14310 fi
14311 rm -f conftest*
14312 fi
14313
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
14319 EOF
14320  
14321 else
14322   echo "$ac_t""no" 1>&6
14323 fi
14324 done
14325
14326 else
14327   echo "$ac_t""no" 1>&6
14328 fi
14329
14330 fi
14331
14332 # Misc. Options
14333
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
14338     MOZ_UPDATE_XTERM=1
14339   elif test "$enableval" = "no"; then
14340     MOZ_UPDATE_XTERM= 
14341   else
14342     { echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; }
14343   fi
14344 fi
14345
14346
14347 if test -z "$SKIP_COMPILER_CHECKS"; then
14348 # Compiler Options
14349
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"
14359     else
14360         _res_as_stdin="no"
14361     fi
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"
14368  #include <stdio.h> 
14369 int main() {
14370 printf("Hello World\n");
14371 ; return 0; }
14372 EOF
14373 if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14374   rm -rf conftest*
14375   _res_gcc_pipe="yes"
14376 else
14377   echo "configure: failed program was:" >&5
14378   cat conftest.$ac_ext >&5
14379   rm -rf conftest*
14380   _res_gcc_pipe="no" 
14381 fi
14382 rm -f conftest*
14383         CFLAGS=$_SAVE_CFLAGS
14384     fi
14385     if test "$_res_as_stdin" = "yes" -a "$_res_gcc_pipe" = "yes"; then
14386         _res="yes";
14387         CFLAGS="$CFLAGS -pipe"
14388         CXXFLAGS="$CXXFLAGS -pipe"
14389     else
14390         _res="no"
14391     fi
14392     rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
14393     echo "$ac_t""$_res" 1>&6
14394 else
14395     echo "$ac_t""no" 1>&6
14396 fi
14397
14398
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=
14406   else
14407     { echo "configure: error: Option, profile-guided-optimization, does not take an argument ($enableval)." 1>&2; exit 1; }
14408   fi
14409 fi
14410
14411
14412
14413
14414 _SAVE_CFLAGS="$CFLAGS"
14415 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
14416
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"
14422
14423 int main() {
14424 return 0;
14425 ; return 0; }
14426 EOF
14427 if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14428   rm -rf conftest*
14429    PROFILE_GEN_CFLAGS="-fprofile-generate"
14430                  result="yes" 
14431 else
14432   echo "configure: failed program was:" >&5
14433   cat conftest.$ac_ext >&5
14434   rm -rf conftest*
14435   result="no"
14436 fi
14437 rm -f conftest*
14438 echo "$ac_t""$result" 1>&6
14439
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"
14444 fi
14445
14446 CFLAGS="$_SAVE_CFLAGS"
14447
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=
14453 fi
14454
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"
14460 fi
14461
14462
14463
14464
14465
14466
14467 ac_ext=C
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
14473
14474
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
14479     _PEDANTIC= 
14480   elif test "$enableval" = "yes"; then
14481     :
14482   else
14483     { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; }
14484   fi
14485 fi
14486
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
14496 int main() {
14497 CONFIGURE_STATIC_ASSERT(sizeof(long long) == 8)
14498 ; return 0; }
14499 EOF
14500 if { (eval echo configure:14501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14501   rm -rf conftest*
14502   result="no"
14503 else
14504   echo "configure: failed program was:" >&5
14505   cat conftest.$ac_ext >&5
14506   rm -rf conftest*
14507   result="yes" 
14508 fi
14509 rm -f conftest*
14510     echo "$ac_t""$result" 1>&6
14511     CXXFLAGS="$_SAVE_CXXFLAGS"
14512
14513     case "$result" in
14514     no)
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"
14517         ;;
14518     yes)
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; }
14520         ;;
14521     esac
14522 fi
14523
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
14527   result="maybe"
14528 else
14529   cat > conftest.$ac_ext <<EOF
14530 #line 14531 "configure"
14531 #include "confdefs.h"
14532 #ifdef __cplusplus
14533 extern "C" void exit(int);
14534 #endif
14535  class A {
14536              public:  A(int& x) : mValue(x) {}
14537                       ~A() { mValue--; }
14538                       operator char**() { return 0; }
14539              private:  int& mValue;
14540              };
14541              void func(char **arg) {}
14542              int m=2;
14543              void test() {
14544                   func(A(m));
14545                   if (m==1) m = 0;
14546              }
14547              int main() {
14548                  test();
14549                  return(m);
14550              }
14551              
14552 EOF
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
14554 then
14555   result="yes"
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -fr conftest*
14560   result="no"
14561 fi
14562 rm -fr conftest*
14563 fi
14564
14565 echo "$ac_t""$result" 1>&6
14566
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; }
14569 fi
14570
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
14577 else
14578   cat > conftest.$ac_ext <<EOF
14579 #line 14580 "configure"
14580 #include "confdefs.h"
14581
14582                       template <class T>
14583                       class Pointer
14584                         {
14585                         public:
14586                           T* myPtr;
14587                         };
14588                       
14589                       template <class T, class U>
14590                       int operator==(const Pointer<T>& rhs, U* lhs)
14591                         {
14592                           return rhs.myPtr == lhs;
14593                         }
14594                       
14595                       template <class T, class U>
14596                       int operator==(const Pointer<T>& rhs, const U* lhs)
14597                         {
14598                           return rhs.myPtr == lhs;
14599                         }
14600                     
14601 int main() {
14602
14603                       Pointer<int> foo;
14604                       const int* bar;
14605                       return foo == bar;
14606                     
14607 ; return 0; }
14608 EOF
14609 if { (eval echo configure:14610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14610   rm -rf conftest*
14611   ac_nscap_nonconst_opeq_bug="no"
14612 else
14613   echo "configure: failed program was:" >&5
14614   cat conftest.$ac_ext >&5
14615   rm -rf conftest*
14616   ac_nscap_nonconst_opeq_bug="yes"
14617 fi
14618 rm -f conftest*
14619 fi
14620
14621 echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
14622 CXXFLAGS="$_SAVE_CXXFLAGS"
14623
14624 if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then
14625     cat >> confdefs.h <<\EOF
14626 #define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1
14627 EOF
14628
14629 fi
14630
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
14635 else
14636   cat > conftest.$ac_ext <<EOF
14637 #line 14638 "configure"
14638 #include "confdefs.h"
14639 #include <time.h>
14640 int main() {
14641 struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1;
14642 ; return 0; }
14643 EOF
14644 if { (eval echo configure:14645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14645   rm -rf conftest*
14646   ac_cv_struct_tm_zone_tm_gmtoff="yes"
14647 else
14648   echo "configure: failed program was:" >&5
14649   cat conftest.$ac_ext >&5
14650   rm -rf conftest*
14651   ac_cv_struct_tm_zone_tm_gmtoff="no"
14652 fi
14653 rm -f conftest*
14654 fi
14655
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
14660 EOF
14661
14662 fi
14663
14664 fi # SKIP_COMPILER_CHECKS
14665
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
14670      _MOZ_USE_RTTI=1 
14671   elif test "$enableval" = "no"; then
14672      _MOZ_USE_RTTI= 
14673   else
14674     { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; }
14675   fi
14676 fi
14677
14678
14679 if test "$_MOZ_USE_RTTI"; then
14680    _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_ON
14681 else
14682    _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_OFF
14683 fi
14684
14685
14686
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= 
14694   else
14695     { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; }
14696   fi
14697 fi
14698
14699
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
14704 EOF
14705
14706 else
14707     _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF
14708 fi
14709
14710
14711
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 
14717 EOF
14718
14719 else
14720     cat >> confdefs.h <<\EOF
14721 #define CPP_THROW_NEW throw()
14722 EOF
14723
14724 fi
14725 ac_ext=c
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
14731
14732
14733 # Build dependencies
14734
14735 MOZ_AUTO_DEPS=1
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
14740     MOZ_AUTO_DEPS=
14741   elif test "$enableval" = "yes"; then
14742     MOZ_AUTO_DEPS=1
14743   else
14744     { echo "configure: error: Option, auto-deps, does not take an argument ($enableval)." 1>&2; exit 1; }
14745   fi
14746 fi
14747
14748
14749 if test -n "$MOZ_AUTO_DEPS"; then
14750 _cpp_md_flag=
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
14755     _cpp_md_flag=
14756   elif test "$enableval" = "yes"; then
14757     _cpp_md_flag=1
14758   else
14759     { echo "configure: error: Option, md, does not take an argument ($enableval)." 1>&2; exit 1; }
14760   fi
14761 else
14762      if test "$GNU_CC" -a "$GNU_CXX" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "WINCE"; then
14763      _cpp_md_flag=1
14764    fi
14765      if test "$SOLARIS_SUNPRO_CC"; then
14766      _cpp_md_flag=1
14767    fi
14768 fi
14769
14770 if test "$_cpp_md_flag"; then
14771   COMPILER_DEPEND=1
14772   if test "$OS_ARCH" = "OpenVMS"; then
14773     _DEPEND_CFLAGS='$(subst =, ,$(filter-out %/.pp,-MM=-MD=-MF=$(MDDEPDIR)/$(basename $(@F)).pp))'
14774   else
14775     _DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(basename $(@F)).pp)'
14776   fi
14777     if test "$SOLARIS_SUNPRO_CC"; then
14778     _DEPEND_CFLAGS=
14779   fi
14780 else
14781   COMPILER_DEPEND=
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'
14786   else
14787     echo '#include <stdio.h>' > dummy-hello.c
14788     
14789     CL_INCLUDES_PREFIX=`"${CC}" -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/^\([^:]*:[^:]*:\).*stdio.h$/\1/p'`
14790     
14791     if test -z "$CL_INCLUDES_PREFIX"; then
14792         { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; exit 1; }
14793     fi
14794     
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"
14799     COMPILER_DEPEND=1
14800   fi
14801 fi
14802 fi # MOZ_AUTO_DEPS
14803 MDDEPDIR='.deps'
14804
14805
14806
14807
14808
14809
14810
14811 # Static build options
14812
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
14819     BUILD_STATIC_LIBS=
14820   else
14821     { echo "configure: error: Option, static, does not take an argument ($enableval)." 1>&2; exit 1; }
14822   fi
14823 fi
14824
14825
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
14830     JS_WANT_READLINE=1
14831   elif test "$enableval" = "no"; then
14832     JS_WANT_READLINE= 
14833   else
14834     { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; exit 1; }
14835   fi
14836 fi
14837
14838
14839 JS_NATIVE_EDITLINE=
14840 EDITLINE_LIBS=
14841 JS_DISABLE_SHELL=
14842
14843 case "$target" in
14844 *-wince*|*-winmo*|*-mingw*|*-cygwin*|*-msvc*|*-mks*)
14845     NO_EDITLINE=1
14846     ;;
14847 *-symbian*)
14848     NO_EDITLINE=1
14849     JS_DISABLE_SHELL=1
14850     ;;
14851 *)
14852     ;;
14853 esac
14854
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
14862 else
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.  */
14871 char readline();
14872
14873 int main() {
14874 readline()
14875 ; return 0; }
14876 EOF
14877 if { (eval echo configure:14878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14878   rm -rf conftest*
14879   eval "ac_cv_lib_$ac_lib_var=yes"
14880 else
14881   echo "configure: failed program was:" >&5
14882   cat conftest.$ac_ext >&5
14883   rm -rf conftest*
14884   eval "ac_cv_lib_$ac_lib_var=no"
14885 fi
14886 rm -f conftest*
14887 LIBS="$ac_save_LIBS"
14888
14889 fi
14890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14891   echo "$ac_t""yes" 1>&6
14892   EDITLINE_LIBS="-lreadline"
14893 else
14894   echo "$ac_t""no" 1>&6
14895 { echo "configure: error: No system readline library found." 1>&2; exit 1; }
14896 fi
14897
14898   else
14899         JS_NATIVE_EDITLINE=1
14900     EDITLINE_LIBS='$(DEPTH)/editline/$(LIB_PREFIX)editline.$(LIB_SUFFIX)'
14901   fi
14902
14903     cat >> confdefs.h <<\EOF
14904 #define EDITLINE 1
14905 EOF
14906
14907 fi
14908
14909
14910
14911
14912 # Standalone module options (Not for building Mozilla)
14913
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
14918     JS_HAS_CTYPES=1
14919   elif test "$enableval" = "no"; then
14920     JS_HAS_CTYPES= 
14921   else
14922     { echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&2; exit 1; }
14923   fi
14924 fi
14925
14926
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; }
14930   fi
14931   cat >> confdefs.h <<\EOF
14932 #define JS_HAS_CTYPES 1
14933 EOF
14934
14935 fi
14936
14937 if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
14938     MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
14939 fi
14940
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  
14945 fi
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028 CFLAGS=`echo \
15029         $_WARNINGS_CFLAGS \
15030         $CFLAGS`
15031
15032 CXXFLAGS=`echo \
15033         $_MOZ_RTTI_FLAGS \
15034         $_MOZ_EXCEPTIONS_FLAGS \
15035         $_WARNINGS_CXXFLAGS \
15036         $CXXFLAGS`
15037
15038 COMPILE_CFLAGS=`echo \
15039     $_DEFINES_CFLAGS \
15040         $_DEPEND_CFLAGS \
15041     $COMPILE_CFLAGS`
15042
15043 COMPILE_CXXFLAGS=`echo \
15044     $_DEFINES_CXXFLAGS \
15045         $_DEPEND_CFLAGS \
15046     $COMPILE_CXXFLAGS`
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102 cat >> confdefs.h <<EOF
15103 #define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
15104 EOF
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116 if test "$USING_HCC"; then
15117    CC='${topsrcdir}/build/hcc'
15118    CC="$CC '$_OLDCC'"
15119    CXX='${topsrcdir}/build/hcpp'
15120    CXX="$CXX '$_OLDCXX'"
15121    
15122    
15123 fi
15124
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
15131   #include <fcntl.h>
15132 int main() {
15133 posix_fallocate(0, 0, 0);
15134 ; return 0; }
15135 EOF
15136 if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15137   rm -rf conftest*
15138   ac_cv___posix_fallocate=true
15139 else
15140   echo "configure: failed program was:" >&5
15141   cat conftest.$ac_ext >&5
15142   rm -rf conftest*
15143   ac_cv___posix_fallocate=false
15144 fi
15145 rm -f conftest*
15146
15147 if test "$ac_cv___posix_fallocate" = true ; then
15148   cat >> confdefs.h <<\EOF
15149 #define HAVE_POSIX_FALLOCATE 1
15150 EOF
15151
15152   echo "$ac_t""yes" 1>&6
15153 else
15154   echo "$ac_t""no" 1>&6
15155 fi
15156
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"
15164
15165         #include <stdio.h>
15166         #include <stdlib.h>
15167         #include <X11/Xlib.h>
15168         #include <X11/Intrinsic.h>
15169     
15170 int main() {
15171
15172         Display *dpy = 0;
15173         if ((dpy = XOpenDisplay(NULL)) == NULL) {
15174             fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
15175             exit(1);
15176         }
15177     
15178 ; return 0; }
15179 EOF
15180 if { (eval echo configure:15181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15181   :
15182 else
15183   echo "configure: failed program was:" >&5
15184   cat conftest.$ac_ext >&5
15185   rm -rf conftest*
15186    { echo "configure: error: Could not compile basic X program." 1>&2; exit 1; } 
15187 fi
15188 rm -f conftest*
15189     CFLAGS="$_SAVE_CFLAGS"
15190
15191     if test ! -z "$MISSING_X"; then
15192         { echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
15193     fi
15194
15195 fi # MOZ_X11
15196 fi # COMPILE_ENVIRONMENT
15197
15198
15199 if test "$OS_ARCH" = "BeOS"; then
15200   cat >> confdefs.h <<\EOF
15201 #define XP_BEOS 1
15202 EOF
15203
15204 elif test "$OS_ARCH" = "Darwin"; then
15205   cat >> confdefs.h <<\EOF
15206 #define XP_MACOSX 1
15207 EOF
15208
15209   cat >> confdefs.h <<\EOF
15210 #define XP_UNIX 1
15211 EOF
15212
15213   cat >> confdefs.h <<\EOF
15214 #define UNIX_ASYNC_DNS 1
15215 EOF
15216
15217 elif test "$OS_ARCH" = "OpenVMS"; then
15218   cat >> confdefs.h <<\EOF
15219 #define XP_UNIX 1
15220 EOF
15221
15222 elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2" -a "$OS_ARCH" != "WINCE"; then
15223   cat >> confdefs.h <<\EOF
15224 #define XP_UNIX 1
15225 EOF
15226
15227   cat >> confdefs.h <<\EOF
15228 #define UNIX_ASYNC_DNS 1
15229 EOF
15230
15231 fi
15232
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
15238 EOF
15239
15240 fi
15241
15242
15243 if test "$MOZ_DEBUG"; then
15244     cat >> confdefs.h <<\EOF
15245 #define MOZ_REFLOW_PERF 1
15246 EOF
15247
15248     cat >> confdefs.h <<\EOF
15249 #define MOZ_REFLOW_PERF_DSP 1
15250 EOF
15251
15252 fi
15253
15254 if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK2" ; then
15255     cat >> confdefs.h <<\EOF
15256 #define MOZ_ACCESSIBILITY_ATK 1
15257 EOF
15258
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
15265 EOF
15266
15267     cat >> confdefs.h <<EOF
15268 #define ATK_MINOR_VERSION $ATK_MINOR_VERSION
15269 EOF
15270
15271     cat >> confdefs.h <<EOF
15272 #define ATK_REV_VERSION $ATK_REV_VERSION
15273 EOF
15274
15275 fi
15276
15277
15278 for ac_func in setlocale
15279 do
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
15284 else
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.  */
15294 char $ac_func();
15295
15296 int main() {
15297
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)
15302 choke me
15303 #else
15304 $ac_func();
15305 #endif
15306
15307 ; return 0; }
15308 EOF
15309 if { (eval echo configure:15310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15310   rm -rf conftest*
15311   eval "ac_cv_func_$ac_func=yes"
15312 else
15313   echo "configure: failed program was:" >&5
15314   cat conftest.$ac_ext >&5
15315   rm -rf conftest*
15316   eval "ac_cv_func_$ac_func=no"
15317 fi
15318 rm -f conftest*
15319 fi
15320
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
15326 EOF
15327  
15328 else
15329   echo "$ac_t""no" 1>&6
15330 fi
15331 done
15332
15333 for ac_func in localeconv
15334 do
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
15339 else
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.  */
15349 char $ac_func();
15350
15351 int main() {
15352
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)
15357 choke me
15358 #else
15359 $ac_func();
15360 #endif
15361
15362 ; return 0; }
15363 EOF
15364 if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15365   rm -rf conftest*
15366   eval "ac_cv_func_$ac_func=yes"
15367 else
15368   echo "configure: failed program was:" >&5
15369   cat conftest.$ac_ext >&5
15370   rm -rf conftest*
15371   eval "ac_cv_func_$ac_func=no"
15372 fi
15373 rm -f conftest*
15374 fi
15375
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
15381 EOF
15382  
15383 else
15384   echo "$ac_t""no" 1>&6
15385 fi
15386 done
15387
15388
15389 case "$host_os" in
15390 mingw*)
15391     WIN_TOP_SRC=`cd $srcdir; pwd -W`
15392     ;;
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'`
15404     ;;
15405 esac
15406
15407
15408
15409
15410
15411
15412
15413
15414
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
15419
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.
15423  * Do not edit.
15424  */
15425
15426 #ifndef _JS_CONFDEFS_H_
15427 #define _JS_CONFDEFS_H_
15428 EOF
15429
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|"
15434     done
15435 fi
15436 _EGREP_PATTERN="${_EGREP_PATTERN}dummy_never_defined)"
15437  
15438   sort confdefs.h | egrep -v "$_EGREP_PATTERN" >> $_CONFIG_TMP
15439
15440   cat >> $_CONFIG_TMP <<\EOF
15441
15442 #endif /* _JS_CONFDEFS_H_ */
15443
15444 EOF
15445
15446   # Only write js-confdefs.h when something changes (or it doesn't exist)
15447   if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then
15448     rm $_CONFIG_TMP
15449   else
15450     echo "$ac_t"""creating $_CONFIG_DEFS_H"" 1>&6
15451     mv -f $_CONFIG_TMP $_CONFIG_DEFS_H
15452
15453     echo ==== $_CONFIG_DEFS_H =================================
15454     cat $_CONFIG_DEFS_H
15455   fi
15456
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
15466 s%\[%\\&%g
15467 s%\]%\\&%g
15468 s%\$%$$%g
15469 EOF
15470 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
15471 rm -f conftest.defs
15472
15473 MOZ_DEFINES=$DEFS
15474
15475 rm -f confdefs.h
15476 mv confdefs.h.save confdefs.h
15477
15478 MAKEFILES="
15479   Makefile
15480   shell/Makefile
15481   lirasm/Makefile
15482   jsapi-tests/Makefile
15483   tests/Makefile
15484   config/Makefile
15485   config/autoconf.mk
15486   config/mkdepend/Makefile
15487 "
15488
15489 if test -n "$JS_NATIVE_EDITLINE"; then
15490    MAKEFILES="$MAKEFILES
15491 editline/Makefile
15492 "
15493 fi
15494
15495 if test -z "${AS_PERL}"; then
15496 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
15497 else
15498 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh
15499 fi
15500 . ./conftest.sh
15501 rm conftest.sh
15502
15503 echo $MAKEFILES > unallmakefiles
15504
15505 mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
15506
15507 trap '' 1 2 15
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.
15513 #
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.
15522 #
15523 EOF
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.
15529 (set) 2>&1 |
15530   case `(ac_space=' '; set | grep ac_space) 2>&1` in
15531   *ac_space=\ *)
15532     # `set' does not quote correctly, so add quotes (double-quote substitution
15533     # turns \\\\ into \\, and sed turns \\ into \).
15534     sed -n \
15535       -e "s/'/'\\\\''/g" \
15536       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
15537     ;;
15538   *)
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'
15541     ;;
15542   esac >> confcache
15543 if cmp -s $cache_file confcache; then
15544   :
15545 else
15546   if test -w $cache_file; then
15547     echo "updating cache $cache_file"
15548     cat confcache > $cache_file
15549   else
15550     echo "not updating unwritable cache $cache_file"
15551   fi
15552 fi
15553 rm -f confcache
15554
15555 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15556
15557 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15558 # Let make expand exec_prefix.
15559 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15560
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'
15566 fi
15567
15568 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15569
15570 DEFS=-DHAVE_CONFIG_H
15571
15572 # Without the "./", some shells look in PATH for config.status.
15573 : ${CONFIG_STATUS=./config.status}
15574
15575 echo creating $CONFIG_STATUS
15576 rm -f $CONFIG_STATUS
15577 cat > $CONFIG_STATUS <<EOF
15578 #! /bin/sh
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`:
15583 #
15584 # $0 $ac_configure_args
15585 #
15586 # Compiler output produced by configure, useful for debugging
15587 # configure, is in ./config.log if it exists.
15588
15589 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15590 for ac_option
15591 do
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"
15598     exit 0 ;;
15599   -help | --help | --hel | --he | --h)
15600     echo "\$ac_cs_usage"; exit 0 ;;
15601   *) echo "\$ac_cs_usage"; exit 1 ;;
15602   esac
15603 done
15604
15605 ac_given_srcdir=$srcdir
15606 ac_given_INSTALL="$INSTALL"
15607
15608 trap 'rm -fr `echo "$MAKEFILES js-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15609 EOF
15610 cat >> $CONFIG_STATUS <<EOF
15611
15612
15613
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
15617 $ac_vpsub
15618 $extrasub
15619 s%@SHELL@%$SHELL%g
15620 s%@CFLAGS@%$CFLAGS%g
15621 s%@CPPFLAGS@%$CPPFLAGS%g
15622 s%@CXXFLAGS@%$CXXFLAGS%g
15623 s%@FFLAGS@%$FFLAGS%g
15624 s%@DEFS@%$DEFS%g
15625 s%@LDFLAGS@%$LDFLAGS%g
15626 s%@LIBS@%$LIBS%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
15642 s%@host@%$host%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
15652 s%@build@%$build%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
15657 s%@AWK@%$AWK%g
15658 s%@TOP_DIST@%$TOP_DIST%g
15659 s%@COMPILE_ENVIRONMENT@%$COMPILE_ENVIRONMENT%g
15660 s%@PERL@%$PERL%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
15672 s%@CC@%$CC%g
15673 s%@CXX@%$CXX%g
15674 s%@RANLIB@%$RANLIB%g
15675 s%@AR@%$AR%g
15676 s%@AS@%$AS%g
15677 s%@LD@%$LD%g
15678 s%@STRIP@%$STRIP%g
15679 s%@WINDRES@%$WINDRES%g
15680 s%@CPP@%$CPP%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
15698 s%@LN_S@%$LN_S%g
15699 s%@PYTHON@%$PYTHON%g
15700 s%@NSINSTALL_BIN@%$NSINSTALL_BIN%g
15701 s%@DOXYGEN@%$DOXYGEN%g
15702 s%@AUTOCONF@%$AUTOCONF%g
15703 s%@UNZIP@%$UNZIP%g
15704 s%@ZIP@%$ZIP%g
15705 s%@SYSTEM_MAKEDEPEND@%$SYSTEM_MAKEDEPEND%g
15706 s%@XARGS@%$XARGS%g
15707 s%@PBBUILD@%$PBBUILD%g
15708 s%@SDP@%$SDP%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
15716 s%@GMAKE@%$GMAKE%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
15781 s%@RC@%$RC%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
15833 s%@WINCE@%$WINCE%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
15887
15888 CEOF
15889 EOF
15890
15891 cat >> $CONFIG_STATUS <<\EOF
15892
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.
15899 ac_more_lines=:
15900 ac_sed_cmds=""
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
15904   else
15905     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15906   fi
15907   if test ! -s conftest.s$ac_file; then
15908     ac_more_lines=false
15909     rm -f conftest.s$ac_file
15910   else
15911     if test -z "$ac_sed_cmds"; then
15912       ac_sed_cmds="sed -f conftest.s$ac_file"
15913     else
15914       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15915     fi
15916     ac_file=`expr $ac_file + 1`
15917     ac_beg=$ac_end
15918     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15919   fi
15920 done
15921 if test -z "$ac_sed_cmds"; then
15922   ac_sed_cmds=cat
15923 fi
15924 EOF
15925
15926 cat >> $CONFIG_STATUS <<EOF
15927
15928 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
15929 EOF
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".
15933   case "$ac_file" 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" ;;
15937   esac
15938
15939   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15940
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'`
15949   else
15950     ac_dir_suffix= ac_dots=
15951   fi
15952
15953   case "$ac_given_srcdir" in
15954   .)  srcdir=.
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" ;;
15961   esac
15962
15963   case "$ac_given_INSTALL" in
15964   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15965   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15966   esac
15967
15968   echo creating "$ac_file"
15969   rm -f "$ac_file"
15970   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15971   case "$ac_file" in
15972   *Makefile*) ac_comsub="1i\\
15973 # $configure_input" ;;
15974   *) ac_comsub= ;;
15975   esac
15976
15977   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
15978   sed -e "$ac_comsub
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
15984 fi; done
15985 rm -f conftest.s*
15986
15987
15988
15989
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.
15992 #
15993 # ac_d sets the value in "#define NAME VALUE" lines.
15994 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15995 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15996 ac_dC='\3'
15997 ac_dD='%g'
15998 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15999 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16000 ac_uB='\([      ]\)%\1#\2define\3'
16001 ac_uC=' '
16002 ac_uD='\4%g'
16003 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16004 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16005 ac_eB='$%\1#\2define\3'
16006 ac_eC=' '
16007 ac_eD='%g'
16008
16009 if test "${CONFIG_HEADERS+set}" != set; then
16010 EOF
16011 cat >> $CONFIG_STATUS <<EOF
16012   CONFIG_HEADERS="js-config.h"
16013 EOF
16014 cat >> $CONFIG_STATUS <<\EOF
16015 fi
16016 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16017   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16018   case "$ac_file" 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" ;;
16022   esac
16023
16024   echo creating $ac_file
16025
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
16029
16030 EOF
16031
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
16038 s/[\\&%]/\\&/g
16039 s%[\\$`]%\\&%g
16040 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16041 s%ac_d%ac_u%gp
16042 s%ac_u%ac_e%gp
16043 EOF
16044 sed -n -f conftest.hdr confdefs.h > conftest.vals
16045 rm -f conftest.hdr
16046
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]*%/* & */%
16052 EOF
16053
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.
16056
16057 rm -f conftest.tail
16058 while :
16059 do
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
16066   echo 'CEOF
16067   sed -f conftest.frag conftest.in > conftest.out
16068   rm -f conftest.in
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
16074 done
16075 rm -f conftest.vals
16076
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
16081   rm -f conftest.in
16082   if cmp -s $ac_file conftest.h 2>/dev/null; then
16083     echo "$ac_file is unchanged"
16084     rm -f conftest.h
16085   else
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"
16091     fi
16092     rm -f $ac_file
16093     mv conftest.h $ac_file
16094   fi
16095 fi; done
16096
16097
16098 EOF
16099 cat >> $CONFIG_STATUS <<EOF
16100
16101 EOF
16102 cat >> $CONFIG_STATUS <<\EOF
16103
16104 exit 0
16105 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
16109
16110
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
16114 else
16115   rm -f config/autoconf.mk.orig 2> /dev/null
16116 fi
16117
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
16121 $GMAKE js-config
16122
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"
16129   fi
16130   if test "$DSO_PIC_CFLAGS"; then
16131     ac_configure_args="$ac_configure_args --with-pic"
16132   fi
16133   if test "$CROSS_COMPILE"; then
16134     case "$target" in
16135     *-mingw*)
16136       ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\" CC=\"$CC\""
16137       ;;
16138     *-android*)
16139       CFLAGS="$ANDROID_CFLAGS"
16140       CPPFLAGS="$ANDROID_CPPFLAGS"
16141       LDFLAGS="$ANDROID_LDFLAGS"
16142
16143       export AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS CFLAGS LDFLAGS
16144
16145       ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\""
16146       ;;
16147     *)
16148       ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
16149       ;;
16150     esac
16151   fi
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
16157     x86_64)
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"
16160       ;;
16161     *)
16162       ac_configure_args="$ac_configure_args CC=$_topsrcdir/ctypes/libffi/msvcc.sh"
16163       ;;
16164     esac
16165   fi
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="
16170     else
16171       ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m64 LD= LDFLAGS="
16172     fi
16173   fi
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"
16178     else
16179       ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix64"
16180     fi
16181   fi
16182   if test "$OS_ARCH" = "OS2"; then
16183     ac_configure_args="$ac_configure_args CFLAGS=-Zomf AR=emxomfar"
16184   fi
16185   if test -n "$MOZ_THUMB2"; then
16186     ac_configure_args="$ac_configure_args --enable-thumb2"
16187   fi
16188   if test -n "$MOZ_ARM_ARCH"; then
16189     ac_configure_args="$ac_configure_args --with-cpu-arch=$MOZ_ARM_ARCH"
16190   fi
16191
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
16198   unset CONFIG_FILES
16199   
16200
16201 if test "$no_recursion" != yes; then
16202
16203   # Remove --cache-file and --srcdir arguments so they do not pile up.
16204   ac_sub_configure_args=
16205   ac_prev=
16206   for ac_arg in $ac_configure_args; do
16207     if test -n "$ac_prev"; then
16208       ac_prev=
16209       continue
16210     fi
16211     case "$ac_arg" in
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=*)
16217       ;;
16218     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16219       ac_prev=srcdir ;;
16220     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16221       ;;
16222     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
16223     esac
16224   done
16225
16226   for ac_config_dir in ctypes/libffi; do
16227
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
16231       continue
16232     fi
16233
16234     echo configuring in $ac_config_dir
16235
16236     case "$srcdir" in
16237     .) ;;
16238     *)
16239       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
16240       else
16241         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
16242       fi
16243       ;;
16244     esac
16245
16246     ac_popdir=`pwd`
16247     cd $ac_config_dir
16248
16249       # A "../" for each directory in /$ac_config_dir.
16250       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
16251
16252     case "$srcdir" in
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 ;;
16259     esac
16260
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
16266     else
16267       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
16268       ac_sub_configure=
16269     fi
16270
16271     # The recursion is here.
16272     if test -n "$ac_sub_configure"; then
16273
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" ;;
16279       esac
16280   case "$ac_given_INSTALL" in
16281         [/$]*) INSTALL="$ac_given_INSTALL" ;;
16282         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16283         esac
16284
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
16288       then :
16289       else
16290         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
16291       fi
16292     fi
16293
16294     cd $ac_popdir
16295   done
16296 fi
16297
16298
16299   cache_file=$old_cache_file
16300   ac_configure_args="$_SUBDIR_CONFIG_ARGS"
16301   CONFIG_FILES=$old_config_files
16302 fi
16303