do-not-enforce-wrong-arm-flags
[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 case "$target_os" in
10637 darwin*)
10638     USE_PTHREADS=1
10639     ;;
10640 *)
10641     
10642 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
10643 echo "configure:10680: checking for pthread_create in -lpthreads" >&5
10644 echo "
10645     #include <pthread.h>
10646     #include <stdlib.h>
10647     void *foo(void *v) { int a = 1;  } 
10648     int main() { 
10649         pthread_t t;
10650         if (!pthread_create(&t, 0, &foo, 0)) {
10651             pthread_join(t, 0);
10652         }
10653         exit(0);
10654     }" > dummy.c ;
10655     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
10656     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
10657     _res=$? ;
10658     rm -f dummy.c dummy${ac_exeext} ;
10659     if test "$_res" = "0"; then
10660         echo "$ac_t""yes" 1>&6
10661         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
10662     else
10663         echo "$ac_t""no" 1>&6
10664         
10665 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
10666 echo "configure:10703: checking for pthread_create in -lpthread" >&5
10667 echo "
10668     #include <pthread.h>
10669     #include <stdlib.h>
10670     void *foo(void *v) { int a = 1;  } 
10671     int main() { 
10672         pthread_t t;
10673         if (!pthread_create(&t, 0, &foo, 0)) {
10674             pthread_join(t, 0);
10675         }
10676         exit(0);
10677     }" > dummy.c ;
10678     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
10679     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
10680     _res=$? ;
10681     rm -f dummy.c dummy${ac_exeext} ;
10682     if test "$_res" = "0"; then
10683         echo "$ac_t""yes" 1>&6
10684         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
10685     else
10686         echo "$ac_t""no" 1>&6
10687         
10688 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
10689 echo "configure:10726: checking for pthread_create in -lc_r" >&5
10690 echo "
10691     #include <pthread.h>
10692     #include <stdlib.h>
10693     void *foo(void *v) { int a = 1;  } 
10694     int main() { 
10695         pthread_t t;
10696         if (!pthread_create(&t, 0, &foo, 0)) {
10697             pthread_join(t, 0);
10698         }
10699         exit(0);
10700     }" > dummy.c ;
10701     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
10702     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
10703     _res=$? ;
10704     rm -f dummy.c dummy${ac_exeext} ;
10705     if test "$_res" = "0"; then
10706         echo "$ac_t""yes" 1>&6
10707         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
10708     else
10709         echo "$ac_t""no" 1>&6
10710         
10711 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
10712 echo "configure:10749: checking for pthread_create in -lc" >&5
10713 echo "
10714     #include <pthread.h>
10715     #include <stdlib.h>
10716     void *foo(void *v) { int a = 1;  } 
10717     int main() { 
10718         pthread_t t;
10719         if (!pthread_create(&t, 0, &foo, 0)) {
10720             pthread_join(t, 0);
10721         }
10722         exit(0);
10723     }" > dummy.c ;
10724     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
10725     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
10726     _res=$? ;
10727     rm -f dummy.c dummy${ac_exeext} ;
10728     if test "$_res" = "0"; then
10729         echo "$ac_t""yes" 1>&6
10730         USE_PTHREADS=1
10731                 
10732     else
10733         echo "$ac_t""no" 1>&6
10734         
10735     fi
10736
10737             
10738     fi
10739
10740         
10741     fi
10742
10743     
10744     fi
10745
10746     ;;
10747 esac
10748
10749 # Check whether --with-pthreads or --without-pthreads was given.
10750 if test "${with_pthreads+set}" = set; then
10751   withval="$with_pthreads"
10752   if test "$withval" = "yes"; then
10753      if test "$USE_PTHREADS"x = x; then
10754     { echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
10755 fi
10756   elif test "$withval" = "no"; then
10757     USE_PTHREADS=
10758     _PTHREAD_LDFLAGS=
10759
10760   else
10761     { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; exit 1; }
10762   fi
10763 fi
10764
10765
10766 if test "$USE_PTHREADS"x != x
10767 then
10768                                 rm -f conftest*
10769         ac_cv_have_dash_pthread=no
10770         echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
10771 echo "configure:10808: checking whether ${CC-cc} accepts -pthread" >&5
10772         echo 'int main() { return 0; }' | cat > conftest.c
10773         ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
10774         if test $? -eq 0; then
10775                 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
10776                         ac_cv_have_dash_pthread=yes
10777                 case "$target_os" in
10778                 freebsd*)
10779 # Freebsd doesn't use -pthread for compiles, it uses them for linking
10780                 ;;
10781                 *)
10782                             CFLAGS="$CFLAGS -pthread"
10783                             CXXFLAGS="$CXXFLAGS -pthread"
10784                 ;;
10785                 esac
10786                 fi
10787         fi
10788         rm -f conftest*
10789     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
10790
10791                             ac_cv_have_dash_pthreads=no
10792     if test "$ac_cv_have_dash_pthread" = "no"; then
10793             echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
10794 echo "configure:10831: checking whether ${CC-cc} accepts -pthreads" >&5
10795         echo 'int main() { return 0; }' | cat > conftest.c
10796             ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
10797         if test $? -eq 0; then
10798                 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
10799                             ac_cv_have_dash_pthreads=yes
10800                             CFLAGS="$CFLAGS -pthreads"
10801                             CXXFLAGS="$CXXFLAGS -pthreads"
10802                     fi
10803             fi
10804             rm -f conftest*
10805         echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
10806     fi
10807
10808         case "$target" in
10809             *-*-freebsd*)
10810                         cat >> confdefs.h <<\EOF
10811 #define _REENTRANT 1
10812 EOF
10813
10814                         cat >> confdefs.h <<\EOF
10815 #define _THREAD_SAFE 1
10816 EOF
10817
10818                                                 if test "$ac_cv_have_dash_pthread" = "yes"; then
10819                                 _PTHREAD_LDFLAGS="-pthread"
10820                         else
10821                                 _PTHREAD_LDFLAGS="-lc_r"
10822                         fi
10823                         ;;
10824
10825             *-*-openbsd*|*-*-bsdi*)
10826                         cat >> confdefs.h <<\EOF
10827 #define _REENTRANT 1
10828 EOF
10829
10830                         cat >> confdefs.h <<\EOF
10831 #define _THREAD_SAFE 1
10832 EOF
10833
10834                                                 if test "$ac_cv_have_dash_pthread" = "yes"; then
10835                 _PTHREAD_LDFLAGS="-pthread"
10836                         fi
10837                         ;;
10838
10839             *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*)
10840                         cat >> confdefs.h <<\EOF
10841 #define _REENTRANT 1
10842 EOF
10843  
10844                         ;;
10845
10846             *-*-nto*) 
10847                         cat >> confdefs.h <<\EOF
10848 #define _REENTRANT 1
10849 EOF
10850  
10851                         ;;
10852
10853             *-aix4.3*|*-aix5*)
10854                         cat >> confdefs.h <<\EOF
10855 #define _REENTRANT 1
10856 EOF
10857  
10858                         ;;
10859
10860             *-hpux11.*)
10861                         cat >> confdefs.h <<\EOF
10862 #define _REENTRANT 1
10863 EOF
10864  
10865                         ;;
10866
10867             alpha*-*-osf*)
10868                         cat >> confdefs.h <<\EOF
10869 #define _REENTRANT 1
10870 EOF
10871
10872                         ;;
10873
10874             *-*-solaris*) 
10875                         cat >> confdefs.h <<\EOF
10876 #define _REENTRANT 1
10877 EOF
10878
10879                         if test "$SOLARIS_SUNPRO_CC"; then
10880                                 CFLAGS="$CFLAGS -mt" 
10881                                 CXXFLAGS="$CXXFLAGS -mt" 
10882                         fi
10883                         ;;
10884         esac
10885     LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
10886 fi
10887
10888 echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6
10889 echo "configure:10926: checking whether mmap() sees write()s" >&5
10890
10891
10892 mmap_test_prog='
10893     #include <stdlib.h>
10894     #include <unistd.h>
10895     #include <sys/mman.h>
10896     #include <sys/types.h>
10897     #include <sys/stat.h>
10898     #include <fcntl.h>
10899
10900     char fname[] = "conftest.file";
10901     char zbuff[1024]; /* Fractional page is probably worst case */
10902
10903     int main() {
10904         char *map;
10905         int fd;
10906         int i;
10907         unlink(fname);
10908         fd = open(fname, O_RDWR | O_CREAT, 0660);
10909         if(fd<0) return 1;
10910         unlink(fname);
10911         write(fd, zbuff, sizeof(zbuff));
10912         lseek(fd, 0, SEEK_SET);
10913         map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0);
10914         if(map==(char*)-1) return 2;
10915         for(i=0; fname[i]; i++) {
10916             int rc = write(fd, &fname[i], 1);
10917             if(map[i]!=fname[i]) return 4;
10918         }
10919         return 0;
10920     }
10921 '
10922
10923
10924 if test "$cross_compiling" = yes; then
10925   result="yes"
10926 else
10927   cat > conftest.$ac_ext <<EOF
10928 #line 10965 "configure"
10929 #include "confdefs.h"
10930 $mmap_test_prog 
10931 EOF
10932 if { (eval echo configure:10969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10933 then
10934   result="yes"
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -fr conftest*
10939   result="no"
10940 fi
10941 rm -fr conftest*
10942 fi
10943
10944
10945 echo "$ac_t"""$result"" 1>&6
10946
10947 if test "$result" = "no"; then
10948     cat >> confdefs.h <<\EOF
10949 #define MMAP_MISSES_WRITES 1
10950 EOF
10951
10952 fi
10953
10954
10955 if test $ac_cv_prog_gcc = yes; then
10956     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
10957 echo "configure:10994: checking whether ${CC-cc} needs -traditional" >&5
10958 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
10959   echo $ac_n "(cached) $ac_c" 1>&6
10960 else
10961     ac_pattern="Autoconf.*'x'"
10962   cat > conftest.$ac_ext <<EOF
10963 #line 11000 "configure"
10964 #include "confdefs.h"
10965 #include <sgtty.h>
10966 Autoconf TIOCGETP
10967 EOF
10968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10969   egrep "$ac_pattern" >/dev/null 2>&1; then
10970   rm -rf conftest*
10971   ac_cv_prog_gcc_traditional=yes
10972 else
10973   rm -rf conftest*
10974   ac_cv_prog_gcc_traditional=no
10975 fi
10976 rm -f conftest*
10977
10978
10979   if test $ac_cv_prog_gcc_traditional = no; then
10980     cat > conftest.$ac_ext <<EOF
10981 #line 11018 "configure"
10982 #include "confdefs.h"
10983 #include <termio.h>
10984 Autoconf TCGETA
10985 EOF
10986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10987   egrep "$ac_pattern" >/dev/null 2>&1; then
10988   rm -rf conftest*
10989   ac_cv_prog_gcc_traditional=yes
10990 fi
10991 rm -f conftest*
10992
10993   fi
10994 fi
10995
10996 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
10997   if test $ac_cv_prog_gcc_traditional = yes; then
10998     CC="$CC -traditional"
10999   fi
11000 fi
11001
11002 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11003 echo "configure:11040: checking for 8-bit clean memcmp" >&5
11004 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11005   echo $ac_n "(cached) $ac_c" 1>&6
11006 else
11007   if test "$cross_compiling" = yes; then
11008   ac_cv_func_memcmp_clean=no
11009 else
11010   cat > conftest.$ac_ext <<EOF
11011 #line 11048 "configure"
11012 #include "confdefs.h"
11013
11014 main()
11015 {
11016   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11017   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11018 }
11019
11020 EOF
11021 if { (eval echo configure:11058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11022 then
11023   ac_cv_func_memcmp_clean=yes
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -fr conftest*
11028   ac_cv_func_memcmp_clean=no
11029 fi
11030 rm -fr conftest*
11031 fi
11032
11033 fi
11034
11035 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11036 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11037
11038 for ac_func in fchmod flockfile getc_unlocked _getc_nolock getpagesize \
11039                 lchown localtime_r lstat64 memmove random rint sbrk snprintf \
11040                 stat64 statvfs statvfs64 strerror strtok_r truncate64
11041 do
11042 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11043 echo "configure:11080: checking for $ac_func" >&5
11044 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11045   echo $ac_n "(cached) $ac_c" 1>&6
11046 else
11047   cat > conftest.$ac_ext <<EOF
11048 #line 11085 "configure"
11049 #include "confdefs.h"
11050 /* System header to define __stub macros and hopefully few prototypes,
11051     which can conflict with char $ac_func(); below.  */
11052 #include <assert.h>
11053 /* Override any gcc2 internal prototype to avoid an error.  */
11054 /* We use char because int might match the return type of a gcc2
11055     builtin and then its argument prototype would still apply.  */
11056 char $ac_func();
11057
11058 int main() {
11059
11060 /* The GNU C library defines this for functions which it implements
11061     to always fail with ENOSYS.  Some functions are actually named
11062     something starting with __ and the normal name is an alias.  */
11063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11064 choke me
11065 #else
11066 $ac_func();
11067 #endif
11068
11069 ; return 0; }
11070 EOF
11071 if { (eval echo configure:11108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11072   rm -rf conftest*
11073   eval "ac_cv_func_$ac_func=yes"
11074 else
11075   echo "configure: failed program was:" >&5
11076   cat conftest.$ac_ext >&5
11077   rm -rf conftest*
11078   eval "ac_cv_func_$ac_func=no"
11079 fi
11080 rm -f conftest*
11081 fi
11082
11083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11084   echo "$ac_t""yes" 1>&6
11085     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11086   cat >> confdefs.h <<EOF
11087 #define $ac_tr_func 1
11088 EOF
11089  
11090 else
11091   echo "$ac_t""no" 1>&6
11092 fi
11093 done
11094
11095
11096 _SAVE_LDFLAGS=$LDFLAGS
11097 LDFLAGS="$LDFLAGS -lrt"
11098 echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC) and -lrt""... $ac_c" 1>&6
11099 echo "configure:11136: checking for clock_gettime(CLOCK_MONOTONIC) and -lrt" >&5
11100 if eval "test \"`echo '$''{'ac_cv_have_clock_monotonic'+set}'`\" = set"; then
11101   echo $ac_n "(cached) $ac_c" 1>&6
11102 else
11103   cat > conftest.$ac_ext <<EOF
11104 #line 11141 "configure"
11105 #include "confdefs.h"
11106 #include <time.h>
11107 int main() {
11108  struct timespec ts;
11109                               clock_gettime(CLOCK_MONOTONIC, &ts); 
11110 ; return 0; }
11111 EOF
11112 if { (eval echo configure:11149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11113   rm -rf conftest*
11114   ac_cv_have_clock_monotonic=yes
11115 else
11116   echo "configure: failed program was:" >&5
11117   cat conftest.$ac_ext >&5
11118   rm -rf conftest*
11119   ac_cv_have_clock_monotonic=no
11120 fi
11121 rm -f conftest*
11122 fi
11123
11124 echo "$ac_t""$ac_cv_have_clock_monotonic" 1>&6
11125 LDFLAGS=$_SAVE_LDFLAGS
11126 if test "$ac_cv_have_clock_monotonic" = "yes"; then
11127     HAVE_CLOCK_MONOTONIC=1
11128     REALTIME_LIBS=-lrt
11129     cat >> confdefs.h <<\EOF
11130 #define HAVE_CLOCK_MONOTONIC 1
11131 EOF
11132
11133     
11134     
11135 fi
11136
11137 cat > conftest.$ac_ext <<EOF
11138 #line 11175 "configure"
11139 #include "confdefs.h"
11140 #include <windows.h>
11141 int main() {
11142 SYSTEMTIME st;FILETIME ft;SystemTimeToFileTime(&st,&ft);
11143 ; return 0; }
11144 EOF
11145 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11146   rm -rf conftest*
11147   ac_cv_have_systemtimetofiletime="yes"
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   ac_cv_have_systemtimetofiletime="no"
11153 fi
11154 rm -f conftest*
11155 if test "$ac_cv_have_systemtimetofiletime" = "yes"; then
11156     cat >> confdefs.h <<\EOF
11157 #define HAVE_SYSTEMTIMETOFILETIME 1
11158 EOF
11159
11160 fi
11161 cat > conftest.$ac_ext <<EOF
11162 #line 11199 "configure"
11163 #include "confdefs.h"
11164 #include <windows.h>
11165 int main() {
11166 FILETIME ft;GetSystemTimeAsFileTime(&ft);
11167 ; return 0; }
11168 EOF
11169 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11170   rm -rf conftest*
11171   ac_cv_have_getsystemtimeasfiletime="yes"
11172 else
11173   echo "configure: failed program was:" >&5
11174   cat conftest.$ac_ext >&5
11175   rm -rf conftest*
11176   ac_cv_have_getsystemtimeasfiletime="no"
11177 fi
11178 rm -f conftest*
11179 if test "$ac_cv_have_getsystemtimeasfiletime" = "yes"; then
11180     cat >> confdefs.h <<\EOF
11181 #define HAVE_GETSYSTEMTIMEASFILETIME 1
11182 EOF
11183
11184 fi
11185
11186 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
11187
11188 ac_ext=C
11189 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11190 ac_cpp='$CXXCPP $CPPFLAGS'
11191 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11192 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11193 cross_compiling=$ac_cv_prog_cxx_cross
11194
11195 echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6
11196 echo "configure:11233: checking for wcrtomb" >&5
11197 if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then
11198   echo $ac_n "(cached) $ac_c" 1>&6
11199 else
11200   cat > conftest.$ac_ext <<EOF
11201 #line 11238 "configure"
11202 #include "confdefs.h"
11203 #include <wchar.h>
11204 int main() {
11205 mbstate_t ps={0};wcrtomb(0,'f',&ps);
11206 ; return 0; }
11207 EOF
11208 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11209   rm -rf conftest*
11210   ac_cv_have_wcrtomb="yes"
11211 else
11212   echo "configure: failed program was:" >&5
11213   cat conftest.$ac_ext >&5
11214   rm -rf conftest*
11215   ac_cv_have_wcrtomb="no"
11216 fi
11217 rm -f conftest*
11218 fi
11219
11220 echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6
11221 if test "$ac_cv_have_wcrtomb" = "yes"; then
11222     cat >> confdefs.h <<\EOF
11223 #define HAVE_WCRTOMB 1
11224 EOF
11225
11226 fi
11227 echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6
11228 echo "configure:11265: checking for mbrtowc" >&5
11229 if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11270 "configure"
11234 #include "confdefs.h"
11235 #include <wchar.h>
11236 int main() {
11237 mbstate_t ps={0};mbrtowc(0,0,0,&ps);
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11241   rm -rf conftest*
11242   ac_cv_have_mbrtowc="yes"
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   ac_cv_have_mbrtowc="no"
11248 fi
11249 rm -f conftest*
11250 fi
11251
11252 echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6
11253 if test "$ac_cv_have_mbrtowc" = "yes"; then
11254     cat >> confdefs.h <<\EOF
11255 #define HAVE_MBRTOWC 1
11256 EOF
11257
11258 fi
11259 ac_ext=c
11260 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11261 ac_cpp='$CPP $CPPFLAGS'
11262 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11263 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11264 cross_compiling=$ac_cv_prog_cc_cross
11265
11266 fi
11267
11268 echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6
11269 echo "configure:11306: checking for res_ninit()" >&5
11270 if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then
11271   echo $ac_n "(cached) $ac_c" 1>&6
11272 else
11273   cat > conftest.$ac_ext <<EOF
11274 #line 11311 "configure"
11275 #include "confdefs.h"
11276
11277         #ifdef linux
11278         #define _BSD_SOURCE 1
11279         #endif
11280         #include <resolv.h>
11281         
11282 int main() {
11283 int foo = res_ninit(&_res);
11284 ; return 0; }
11285 EOF
11286 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11287   rm -rf conftest*
11288   ac_cv_func_res_ninit=yes
11289 else
11290   echo "configure: failed program was:" >&5
11291   cat conftest.$ac_ext >&5
11292   rm -rf conftest*
11293   ac_cv_func_res_ninit=no
11294 fi
11295 rm -f conftest*
11296     
11297 fi
11298
11299 echo "$ac_t""$ac_cv_func_res_ninit" 1>&6
11300
11301 if test "$ac_cv_func_res_ninit" = "yes"; then
11302     cat >> confdefs.h <<\EOF
11303 #define HAVE_RES_NINIT 1
11304 EOF
11305
11306 fi
11307
11308 ac_ext=C
11309 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11310 ac_cpp='$CXXCPP $CPPFLAGS'
11311 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11312 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11313 cross_compiling=$ac_cv_prog_cxx_cross
11314
11315 echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6
11316 echo "configure:11353: checking for gnu_get_libc_version()" >&5
11317 if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   cat > conftest.$ac_ext <<EOF
11321 #line 11358 "configure"
11322 #include "confdefs.h"
11323
11324         #ifdef HAVE_GNU_LIBC_VERSION_H
11325         #include <gnu/libc-version.h>
11326         #endif
11327         
11328 int main() {
11329 const char *glibc_version = gnu_get_libc_version();
11330 ; return 0; }
11331 EOF
11332 if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11333   rm -rf conftest*
11334   ac_cv_func_gnu_get_libc_version=yes
11335 else
11336   echo "configure: failed program was:" >&5
11337   cat conftest.$ac_ext >&5
11338   rm -rf conftest*
11339   ac_cv_func_gnu_get_libc_version=no 
11340         
11341 fi
11342 rm -f conftest*
11343     
11344 fi
11345
11346 echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6
11347
11348 if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then
11349     cat >> confdefs.h <<\EOF
11350 #define HAVE_GNU_GET_LIBC_VERSION 1
11351 EOF
11352
11353 fi
11354
11355 case $target_os in
11356     os2*|msvc*|mks*|cygwin*|mingw*|darwin*|wince*|winmo*|beos*)
11357         ;;
11358     *)
11359     
11360 echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6
11361 echo "configure:11398: checking for iconv in -lc" >&5
11362 ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'`
11363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11364   echo $ac_n "(cached) $ac_c" 1>&6
11365 else
11366   ac_save_LIBS="$LIBS"
11367 LIBS="-lc  $LIBS"
11368 cat > conftest.$ac_ext <<EOF
11369 #line 11406 "configure"
11370 #include "confdefs.h"
11371 /* Override any gcc2 internal prototype to avoid an error.  */
11372 #ifdef __cplusplus
11373 extern "C"
11374 #endif
11375 /* We use char because int might match the return type of a gcc2
11376     builtin and then its argument prototype would still apply.  */
11377 char iconv();
11378
11379 int main() {
11380 iconv()
11381 ; return 0; }
11382 EOF
11383 if { (eval echo configure:11420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=yes"
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   eval "ac_cv_lib_$ac_lib_var=no"
11391 fi
11392 rm -f conftest*
11393 LIBS="$ac_save_LIBS"
11394
11395 fi
11396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11397   echo "$ac_t""yes" 1>&6
11398   _ICONV_LIBS="$_ICONV_LIBS"
11399 else
11400   echo "$ac_t""no" 1>&6
11401 echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
11402 echo "configure:11439: checking for iconv in -liconv" >&5
11403 ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
11404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   ac_save_LIBS="$LIBS"
11408 LIBS="-liconv  $LIBS"
11409 cat > conftest.$ac_ext <<EOF
11410 #line 11447 "configure"
11411 #include "confdefs.h"
11412 /* Override any gcc2 internal prototype to avoid an error.  */
11413 #ifdef __cplusplus
11414 extern "C"
11415 #endif
11416 /* We use char because int might match the return type of a gcc2
11417     builtin and then its argument prototype would still apply.  */
11418 char iconv();
11419
11420 int main() {
11421 iconv()
11422 ; return 0; }
11423 EOF
11424 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11425   rm -rf conftest*
11426   eval "ac_cv_lib_$ac_lib_var=yes"
11427 else
11428   echo "configure: failed program was:" >&5
11429   cat conftest.$ac_ext >&5
11430   rm -rf conftest*
11431   eval "ac_cv_lib_$ac_lib_var=no"
11432 fi
11433 rm -f conftest*
11434 LIBS="$ac_save_LIBS"
11435
11436 fi
11437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11438   echo "$ac_t""yes" 1>&6
11439   _ICONV_LIBS="$_ICONV_LIBS -liconv"
11440 else
11441   echo "$ac_t""no" 1>&6
11442 echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
11443 echo "configure:11480: checking for libiconv in -liconv" >&5
11444 ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
11445 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11446   echo $ac_n "(cached) $ac_c" 1>&6
11447 else
11448   ac_save_LIBS="$LIBS"
11449 LIBS="-liconv  $LIBS"
11450 cat > conftest.$ac_ext <<EOF
11451 #line 11488 "configure"
11452 #include "confdefs.h"
11453 /* Override any gcc2 internal prototype to avoid an error.  */
11454 #ifdef __cplusplus
11455 extern "C"
11456 #endif
11457 /* We use char because int might match the return type of a gcc2
11458     builtin and then its argument prototype would still apply.  */
11459 char libiconv();
11460
11461 int main() {
11462 libiconv()
11463 ; return 0; }
11464 EOF
11465 if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11466   rm -rf conftest*
11467   eval "ac_cv_lib_$ac_lib_var=yes"
11468 else
11469   echo "configure: failed program was:" >&5
11470   cat conftest.$ac_ext >&5
11471   rm -rf conftest*
11472   eval "ac_cv_lib_$ac_lib_var=no"
11473 fi
11474 rm -f conftest*
11475 LIBS="$ac_save_LIBS"
11476
11477 fi
11478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11479   echo "$ac_t""yes" 1>&6
11480   _ICONV_LIBS="$_ICONV_LIBS -liconv"
11481 else
11482   echo "$ac_t""no" 1>&6
11483 fi
11484
11485 fi
11486
11487 fi
11488
11489 _SAVE_LIBS=$LIBS
11490 LIBS="$LIBS $_ICONV_LIBS"
11491 echo $ac_n "checking for iconv()""... $ac_c" 1>&6
11492 echo "configure:11529: checking for iconv()" >&5
11493 if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
11494   echo $ac_n "(cached) $ac_c" 1>&6
11495 else
11496   cat > conftest.$ac_ext <<EOF
11497 #line 11534 "configure"
11498 #include "confdefs.h"
11499
11500         #include <stdlib.h>
11501         #include <iconv.h>
11502         
11503 int main() {
11504
11505             iconv_t h = iconv_open("", "");
11506             iconv(h, NULL, NULL, NULL, NULL);
11507             iconv_close(h);
11508         
11509 ; return 0; }
11510 EOF
11511 if { (eval echo configure:11548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11512   rm -rf conftest*
11513   ac_cv_func_iconv=yes
11514 else
11515   echo "configure: failed program was:" >&5
11516   cat conftest.$ac_ext >&5
11517   rm -rf conftest*
11518   ac_cv_func_iconv=no 
11519         
11520 fi
11521 rm -f conftest*
11522     
11523 fi
11524
11525 echo "$ac_t""$ac_cv_func_iconv" 1>&6
11526 if test "$ac_cv_func_iconv" = "yes"; then
11527     cat >> confdefs.h <<\EOF
11528 #define HAVE_ICONV 1
11529 EOF
11530
11531     DYNAMIC_XPCOM_LIBS="$DYNAMIC_XPCOM_LIBS $_ICONV_LIBS"
11532     LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
11533     LIBICONV="$_ICONV_LIBS"
11534     echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6
11535 echo "configure:11572: checking for iconv() with const input" >&5
11536 if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then
11537   echo $ac_n "(cached) $ac_c" 1>&6
11538 else
11539   cat > conftest.$ac_ext <<EOF
11540 #line 11577 "configure"
11541 #include "confdefs.h"
11542
11543             #include <stdlib.h>
11544             #include <iconv.h>
11545             
11546 int main() {
11547
11548                 const char *input = "testing";
11549                 iconv_t h = iconv_open("", "");
11550                 iconv(h, &input, NULL, NULL, NULL);
11551                 iconv_close(h);
11552             
11553 ; return 0; }
11554 EOF
11555 if { (eval echo configure:11592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11556   rm -rf conftest*
11557   ac_cv_func_const_iconv=yes
11558 else
11559   echo "configure: failed program was:" >&5
11560   cat conftest.$ac_ext >&5
11561   rm -rf conftest*
11562   ac_cv_func_const_iconv=no 
11563             
11564 fi
11565 rm -f conftest*
11566         
11567 fi
11568
11569 echo "$ac_t""$ac_cv_func_const_iconv" 1>&6
11570     if test "$ac_cv_func_const_iconv" = "yes"; then
11571         cat >> confdefs.h <<\EOF
11572 #define HAVE_ICONV_WITH_CONST_INPUT 1
11573 EOF
11574
11575     fi
11576 fi
11577 LIBS=$_SAVE_LIBS
11578
11579     ;;
11580 esac
11581
11582 ac_ext=c
11583 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11584 ac_cpp='$CPP $CPPFLAGS'
11585 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11586 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11587 cross_compiling=$ac_cv_prog_cc_cross
11588
11589
11590 echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6
11591 echo "configure:11628: checking for an implementation of va_copy()" >&5
11592 if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   
11596     if test "$cross_compiling" = yes; then
11597   ac_cv_va_copy=no
11598     
11599 else
11600   cat > conftest.$ac_ext <<EOF
11601 #line 11638 "configure"
11602 #include "confdefs.h"
11603
11604         #include <stdarg.h>
11605         void f (int i, ...) {
11606             va_list args1, args2;
11607             va_start (args1, i);
11608             va_copy (args2, args1);
11609             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11610                 exit (1);
11611             va_end (args1); va_end (args2);
11612         }
11613         int main() { f (0, 42); return 0; }
11614 EOF
11615 if { (eval echo configure:11652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11616 then
11617   ac_cv_va_copy=yes
11618 else
11619   echo "configure: failed program was:" >&5
11620   cat conftest.$ac_ext >&5
11621   rm -fr conftest*
11622   ac_cv_va_copy=no
11623 fi
11624 rm -fr conftest*
11625 fi
11626
11627
11628 fi
11629
11630 echo "$ac_t""$ac_cv_va_copy" 1>&6
11631 echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6
11632 echo "configure:11669: checking for an implementation of __va_copy()" >&5
11633 if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then
11634   echo $ac_n "(cached) $ac_c" 1>&6
11635 else
11636   
11637     if test "$cross_compiling" = yes; then
11638   ac_cv___va_copy=no
11639     
11640 else
11641   cat > conftest.$ac_ext <<EOF
11642 #line 11679 "configure"
11643 #include "confdefs.h"
11644
11645         #include <stdarg.h>
11646         void f (int i, ...) {
11647             va_list args1, args2;
11648             va_start (args1, i);
11649             __va_copy (args2, args1);
11650             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11651                 exit (1);
11652             va_end (args1); va_end (args2);
11653         }
11654         int main() { f (0, 42); return 0; }
11655 EOF
11656 if { (eval echo configure:11693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11657 then
11658   ac_cv___va_copy=yes
11659 else
11660   echo "configure: failed program was:" >&5
11661   cat conftest.$ac_ext >&5
11662   rm -fr conftest*
11663   ac_cv___va_copy=no
11664 fi
11665 rm -fr conftest*
11666 fi
11667
11668
11669 fi
11670
11671 echo "$ac_t""$ac_cv___va_copy" 1>&6
11672 echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6
11673 echo "configure:11710: checking whether va_lists can be copied by value" >&5
11674 if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then
11675   echo $ac_n "(cached) $ac_c" 1>&6
11676 else
11677   
11678     if test "$cross_compiling" = yes; then
11679   ac_cv_va_val_copy=yes
11680     
11681 else
11682   cat > conftest.$ac_ext <<EOF
11683 #line 11720 "configure"
11684 #include "confdefs.h"
11685
11686         #include <stdarg.h>
11687         void f (int i, ...) {
11688             va_list args1, args2;
11689             va_start (args1, i);
11690             args2 = args1;
11691             if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
11692                 exit (1);
11693             va_end (args1); va_end (args2);
11694         }
11695         int main() { f (0, 42); return 0; }
11696 EOF
11697 if { (eval echo configure:11734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11698 then
11699   ac_cv_va_val_copy=yes
11700 else
11701   echo "configure: failed program was:" >&5
11702   cat conftest.$ac_ext >&5
11703   rm -fr conftest*
11704   ac_cv_va_val_copy=no
11705 fi
11706 rm -fr conftest*
11707 fi
11708
11709
11710 fi
11711
11712 if test "x$ac_cv_va_copy" = "xyes"; then
11713     cat >> confdefs.h <<\EOF
11714 #define VA_COPY va_copy
11715 EOF
11716
11717     cat >> confdefs.h <<\EOF
11718 #define HAVE_VA_COPY 1
11719 EOF
11720
11721 elif test "x$ac_cv___va_copy" = "xyes"; then
11722     cat >> confdefs.h <<\EOF
11723 #define VA_COPY __va_copy
11724 EOF
11725
11726     cat >> confdefs.h <<\EOF
11727 #define HAVE_VA_COPY 1
11728 EOF
11729
11730 fi
11731
11732 if test "x$ac_cv_va_val_copy" = "xno"; then
11733    cat >> confdefs.h <<\EOF
11734 #define HAVE_VA_LIST_AS_ARRAY 1
11735 EOF
11736
11737 fi
11738 echo "$ac_t""$ac_cv_va_val_copy" 1>&6
11739
11740 case "$target" in
11741         *-linux*)
11742                     _curdir=`pwd`
11743             export _curdir
11744             rm -rf conftest* _conftest
11745             mkdir _conftest
11746             cat >> conftest.C <<\EOF
11747 #include <stdio.h>
11748 #include <link.h>
11749 #include <dlfcn.h>
11750 #ifdef _dl_loaded
11751 void __dump_link_map(void) {
11752   struct link_map *map = _dl_loaded;
11753   while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;}
11754 }
11755 int main() {
11756   dlopen("./conftest1.so",RTLD_LAZY);
11757   dlopen("./../_conftest/conftest1.so",RTLD_LAZY);
11758   dlopen("CURDIR/_conftest/conftest1.so",RTLD_LAZY);
11759   dlopen("CURDIR/_conftest/../_conftest/conftest1.so",RTLD_LAZY);
11760   __dump_link_map();
11761 }
11762 #else
11763 /* _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).*/
11764 int main() { printf("./conftest1.so\n"); }
11765 #endif
11766 EOF
11767
11768             $PERL -p -i -e "s/CURDIR/\$ENV{_curdir}/g;" conftest.C
11769
11770             cat >> conftest1.C <<\EOF
11771 #include <stdio.h>
11772 void foo(void) {printf("foo in dll called\n");}
11773 EOF
11774             ${CXX-g++} -fPIC -c -g conftest1.C
11775             ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o
11776             ${CXX-g++} -g conftest.C -o conftest -ldl
11777             cp -f conftest1.so conftest _conftest
11778             cd _conftest
11779             if test `./conftest | grep conftest1.so | wc -l` -gt 1
11780             then
11781                 echo
11782                 echo "*** Your libc has a bug that can result in loading the same dynamic"
11783                 echo "*** library multiple times.  This bug is known to be fixed in glibc-2.0.7-32"
11784                 echo "*** or later.  However, if you choose not to upgrade, the only effect"
11785                 echo "*** will be excessive memory usage at runtime."
11786                 echo
11787             fi
11788             cd ${_curdir}
11789             rm -rf conftest* _conftest
11790                     ;;
11791 esac
11792
11793 ac_ext=C
11794 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
11795 ac_cpp='$CXXCPP $CPPFLAGS'
11796 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
11797 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
11798 cross_compiling=$ac_cv_prog_cxx_cross
11799
11800
11801 ARM_ABI_PREFIX=
11802 HAVE_GCC3_ABI=
11803 if test "$GNU_CC"; then
11804   if test "$CPU_ARCH" = "arm" ; then
11805     echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6
11806 echo "configure:11843: checking for ARM EABI" >&5
11807 if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then
11808   echo $ac_n "(cached) $ac_c" 1>&6
11809 else
11810   cat > conftest.$ac_ext <<EOF
11811 #line 11848 "configure"
11812 #include "confdefs.h"
11813
11814 int main() {
11815
11816 #if defined(__ARM_EABI__)
11817   return 0;
11818 #else
11819 #error Not ARM EABI.
11820 #endif
11821                         
11822 ; return 0; }
11823 EOF
11824 if { (eval echo configure:11861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11825   rm -rf conftest*
11826   ac_cv_gcc_arm_eabi="yes"
11827 else
11828   echo "configure: failed program was:" >&5
11829   cat conftest.$ac_ext >&5
11830   rm -rf conftest*
11831   ac_cv_gcc_arm_eabi="no"
11832 fi
11833 rm -f conftest*
11834 fi
11835
11836 echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6
11837     if test "$ac_cv_gcc_arm_eabi" = "yes"; then
11838         HAVE_ARM_EABI=1
11839         ARM_ABI_PREFIX=eabi-
11840     else
11841         ARM_ABI_PREFIX=oabi-
11842     fi
11843   fi
11844
11845   echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6
11846 echo "configure:11883: checking for gcc 3.0 ABI" >&5
11847 if eval "test \"`echo '$''{'ac_cv_gcc_three_abi'+set}'`\" = set"; then
11848   echo $ac_n "(cached) $ac_c" 1>&6
11849 else
11850   cat > conftest.$ac_ext <<EOF
11851 #line 11888 "configure"
11852 #include "confdefs.h"
11853
11854 int main() {
11855
11856 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
11857   return 0;
11858 #else
11859 #error Not gcc3.
11860 #endif
11861                       
11862 ; return 0; }
11863 EOF
11864 if { (eval echo configure:11901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11865   rm -rf conftest*
11866   ac_cv_gcc_three_abi="yes"
11867 else
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870   rm -rf conftest*
11871   ac_cv_gcc_three_abi="no"
11872 fi
11873 rm -f conftest*
11874 fi
11875
11876 echo "$ac_t""$ac_cv_gcc_three_abi" 1>&6
11877   if test "$ac_cv_gcc_three_abi" = "yes"; then
11878       TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
11879       HAVE_GCC3_ABI=1
11880   else
11881       TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc2}"
11882   fi
11883 fi
11884
11885
11886
11887 echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6
11888 echo "configure:11925: checking for C++ \"explicit\" keyword" >&5
11889 if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then
11890   echo $ac_n "(cached) $ac_c" 1>&6
11891 else
11892   cat > conftest.$ac_ext <<EOF
11893 #line 11930 "configure"
11894 #include "confdefs.h"
11895 class X {
11896                                public: explicit X(int i) : i_(i) {}
11897                                private: int i_;
11898                                };
11899 int main() {
11900 X x(3);
11901 ; return 0; }
11902 EOF
11903 if { (eval echo configure:11940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11904   rm -rf conftest*
11905   ac_cv_cpp_explicit=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -rf conftest*
11910   ac_cv_cpp_explicit=no
11911 fi
11912 rm -f conftest*
11913 fi
11914
11915 echo "$ac_t""$ac_cv_cpp_explicit" 1>&6
11916 if test "$ac_cv_cpp_explicit" = yes ; then
11917    cat >> confdefs.h <<\EOF
11918 #define HAVE_CPP_EXPLICIT 1
11919 EOF
11920
11921 fi
11922
11923 echo $ac_n "checking for C++ \"typename\" keyword""... $ac_c" 1>&6
11924 echo "configure:11961: checking for C++ \"typename\" keyword" >&5
11925 if eval "test \"`echo '$''{'ac_cv_cpp_typename'+set}'`\" = set"; then
11926   echo $ac_n "(cached) $ac_c" 1>&6
11927 else
11928   cat > conftest.$ac_ext <<EOF
11929 #line 11966 "configure"
11930 #include "confdefs.h"
11931 class param {
11932                                public:
11933                                    typedef unsigned long num_type;
11934                                };
11935
11936                                template <class T> class tplt {
11937                                public:
11938                                    typedef typename T::num_type t_num_type;
11939                                    t_num_type foo(typename T::num_type num) {
11940                                        return num;
11941                                    }
11942                                };
11943 int main() {
11944 tplt<param> A;
11945                                A.foo(0);
11946 ; return 0; }
11947 EOF
11948 if { (eval echo configure:11985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11949   rm -rf conftest*
11950   ac_cv_cpp_typename=yes
11951 else
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -rf conftest*
11955   ac_cv_cpp_typename=no
11956 fi
11957 rm -f conftest*
11958 fi
11959
11960 echo "$ac_t""$ac_cv_cpp_typename" 1>&6
11961 if test "$ac_cv_cpp_typename" = yes ; then
11962    cat >> confdefs.h <<\EOF
11963 #define HAVE_CPP_TYPENAME 1
11964 EOF
11965
11966 fi
11967
11968 echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6
11969 echo "configure:12006: checking for modern C++ template specialization syntax support" >&5
11970 if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then
11971   echo $ac_n "(cached) $ac_c" 1>&6
11972 else
11973   cat > conftest.$ac_ext <<EOF
11974 #line 12011 "configure"
11975 #include "confdefs.h"
11976 template <class T> struct X { int a; };
11977                                class Y {};
11978                                template <> struct X<Y> { double a; };
11979 int main() {
11980 X<int> int_x;
11981                                X<Y> y_x;
11982 ; return 0; }
11983 EOF
11984 if { (eval echo configure:12021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11985   rm -rf conftest*
11986   ac_cv_cpp_modern_specialize_template_syntax=yes
11987 else
11988   echo "configure: failed program was:" >&5
11989   cat conftest.$ac_ext >&5
11990   rm -rf conftest*
11991   ac_cv_cpp_modern_specialize_template_syntax=no
11992 fi
11993 rm -f conftest*
11994 fi
11995
11996 echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6
11997 if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then
11998   cat >> confdefs.h <<\EOF
11999 #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1
12000 EOF
12001
12002 fi
12003
12004
12005 echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6
12006 echo "configure:12043: checking whether partial template specialization works" >&5
12007 if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then
12008   echo $ac_n "(cached) $ac_c" 1>&6
12009 else
12010   cat > conftest.$ac_ext <<EOF
12011 #line 12048 "configure"
12012 #include "confdefs.h"
12013 template <class T> class Foo {};
12014                                template <class T> class Foo<T*> {};
12015 int main() {
12016 return 0;
12017 ; return 0; }
12018 EOF
12019 if { (eval echo configure:12056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12020   rm -rf conftest*
12021   ac_cv_cpp_partial_specialization=yes
12022 else
12023   echo "configure: failed program was:" >&5
12024   cat conftest.$ac_ext >&5
12025   rm -rf conftest*
12026   ac_cv_cpp_partial_specialization=no
12027 fi
12028 rm -f conftest*
12029 fi
12030
12031 echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6
12032 if test "$ac_cv_cpp_partial_specialization" = yes ; then
12033   cat >> confdefs.h <<\EOF
12034 #define HAVE_CPP_PARTIAL_SPECIALIZATION 1
12035 EOF
12036
12037 fi
12038
12039 echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6
12040 echo "configure:12077: checking whether operators must be re-defined for templates derived from templates" >&5
12041 if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then
12042   echo $ac_n "(cached) $ac_c" 1>&6
12043 else
12044   cat > conftest.$ac_ext <<EOF
12045 #line 12082 "configure"
12046 #include "confdefs.h"
12047 template <class T> class Base { };
12048                                 template <class T>
12049                                 Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; }
12050                                 template <class T> class Derived : public Base<T> { };
12051 int main() {
12052 Derived<char> a, b;
12053                                 Base<char> c = a + b;
12054                                 return 0;
12055 ; return 0; }
12056 EOF
12057 if { (eval echo configure:12094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12058   rm -rf conftest*
12059   ac_cv_need_derived_template_operators=no
12060 else
12061   echo "configure: failed program was:" >&5
12062   cat conftest.$ac_ext >&5
12063   rm -rf conftest*
12064   ac_cv_need_derived_template_operators=yes
12065 fi
12066 rm -f conftest*
12067 fi
12068
12069 echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6
12070 if test "$ac_cv_need_derived_template_operators" = yes ; then
12071   cat >> confdefs.h <<\EOF
12072 #define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1
12073 EOF
12074
12075 fi
12076
12077
12078 echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6
12079 echo "configure:12116: checking whether we need to cast a derived template to pass as its base class" >&5
12080 if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then
12081   echo $ac_n "(cached) $ac_c" 1>&6
12082 else
12083   cat > conftest.$ac_ext <<EOF
12084 #line 12121 "configure"
12085 #include "confdefs.h"
12086 template <class T> class Base { };
12087                                 template <class T> class Derived : public Base<T> { };
12088                                 template <class T> int foo(const Base<T>&) { return 0; }
12089 int main() {
12090 Derived<char> bar; return foo(bar);
12091 ; return 0; }
12092 EOF
12093 if { (eval echo configure:12130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12094   rm -rf conftest*
12095   ac_cv_need_cpp_template_cast_to_base=no
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   ac_cv_need_cpp_template_cast_to_base=yes
12101 fi
12102 rm -f conftest*
12103 fi
12104
12105 echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6
12106 if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then
12107   cat >> confdefs.h <<\EOF
12108 #define NEED_CPP_TEMPLATE_CAST_TO_BASE 1
12109 EOF
12110
12111 fi
12112
12113 echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6
12114 echo "configure:12151: checking whether the compiler can resolve const ambiguities for templates" >&5
12115 if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then
12116   echo $ac_n "(cached) $ac_c" 1>&6
12117 else
12118   cat > conftest.$ac_ext <<EOF
12119 #line 12156 "configure"
12120 #include "confdefs.h"
12121
12122                                 template <class T> class ptrClass {
12123                                   public: T* ptr;
12124                                 };
12125
12126                                 template <class T> T* a(ptrClass<T> *arg) {
12127                                   return arg->ptr;
12128                                 }
12129
12130                                 template <class T>
12131                                 const T* a(const ptrClass<T> *arg) {
12132                                   return arg->ptr;
12133                                 }
12134                                
12135 int main() {
12136  ptrClass<int> i;
12137                                  a(&i); 
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12141   rm -rf conftest*
12142   ac_cv_can_resolve_const_ambiguity=yes
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   ac_cv_can_resolve_const_ambiguity=no
12148 fi
12149 rm -f conftest*
12150 fi
12151
12152 echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6
12153 if test "$ac_cv_can_resolve_const_ambiguity" = no ; then
12154   cat >> confdefs.h <<\EOF
12155 #define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1
12156 EOF
12157
12158 fi
12159
12160
12161 echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6
12162 echo "configure:12199: checking whether the C++ \"using\" keyword can change access" >&5
12163 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using2'+set}'`\" = set"; then
12164   echo $ac_n "(cached) $ac_c" 1>&6
12165 else
12166   cat > conftest.$ac_ext <<EOF
12167 #line 12204 "configure"
12168 #include "confdefs.h"
12169 class A { protected: int foo() { return 0; } };
12170                    class B : public A { public: using A::foo; };
12171 int main() {
12172 B b; return b.foo();
12173 ; return 0; }
12174 EOF
12175 if { (eval echo configure:12212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12176   rm -rf conftest*
12177   cat > conftest.$ac_ext <<EOF
12178 #line 12215 "configure"
12179 #include "confdefs.h"
12180 class A { public: int foo() { return 1; } };
12181                        class B : public A { private: using A::foo; };
12182 int main() {
12183 B b; return b.foo();
12184 ; return 0; }
12185 EOF
12186 if { (eval echo configure:12223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12187   rm -rf conftest*
12188   ac_cv_cpp_access_changing_using2=no
12189 else
12190   echo "configure: failed program was:" >&5
12191   cat conftest.$ac_ext >&5
12192   rm -rf conftest*
12193   ac_cv_cpp_access_changing_using2=yes
12194 fi
12195 rm -f conftest*
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -rf conftest*
12200   ac_cv_cpp_access_changing_using2=no
12201 fi
12202 rm -f conftest*
12203 fi
12204
12205 echo "$ac_t""$ac_cv_cpp_access_changing_using2" 1>&6
12206 if test "$ac_cv_cpp_access_changing_using2" = yes ; then
12207    cat >> confdefs.h <<\EOF
12208 #define HAVE_CPP_ACCESS_CHANGING_USING 1
12209 EOF
12210
12211 fi
12212
12213 echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
12214 echo "configure:12251: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
12215 if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then
12216   echo $ac_n "(cached) $ac_c" 1>&6
12217 else
12218   cat > conftest.$ac_ext <<EOF
12219 #line 12256 "configure"
12220 #include "confdefs.h"
12221 class X { 
12222                                  public: int go(const X&) {return 3;}
12223                                          int jo(const X&) {return 3;}
12224                                };
12225                                class Y : public X {
12226                                  public:  int go(int) {return 2;}
12227                                           int jo(int) {return 2;}
12228                                           using X::jo;
12229                                  private: using X::go;
12230                                };
12231 int main() {
12232 X x; Y y; y.jo(x);
12233 ; return 0; }
12234 EOF
12235 if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12236   rm -rf conftest*
12237   ac_cv_cpp_ambiguity_resolving_using=yes
12238 else
12239   echo "configure: failed program was:" >&5
12240   cat conftest.$ac_ext >&5
12241   rm -rf conftest*
12242   ac_cv_cpp_ambiguity_resolving_using=no
12243 fi
12244 rm -f conftest*
12245 fi
12246
12247 echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6
12248 if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
12249    cat >> confdefs.h <<\EOF
12250 #define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
12251 EOF
12252
12253 fi
12254
12255 echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6
12256 echo "configure:12293: checking for \"std::\" namespace" >&5
12257 if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then
12258   echo $ac_n "(cached) $ac_c" 1>&6
12259 else
12260   cat > conftest.$ac_ext <<EOF
12261 #line 12298 "configure"
12262 #include "confdefs.h"
12263 #include <algorithm>
12264 int main() {
12265 return std::min(0, 1);
12266 ; return 0; }
12267 EOF
12268 if { (eval echo configure:12305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12269   rm -rf conftest*
12270   ac_cv_cpp_namespace_std=yes
12271 else
12272   echo "configure: failed program was:" >&5
12273   cat conftest.$ac_ext >&5
12274   rm -rf conftest*
12275   ac_cv_cpp_namespace_std=no
12276 fi
12277 rm -f conftest*
12278 fi
12279
12280 echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6
12281 if test "$ac_cv_cpp_namespace_std" = yes ; then
12282    cat >> confdefs.h <<\EOF
12283 #define HAVE_CPP_NAMESPACE_STD 1
12284 EOF
12285
12286 fi
12287
12288 echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6
12289 echo "configure:12326: checking whether standard template operator!=() is ambiguous" >&5
12290 if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then
12291   echo $ac_n "(cached) $ac_c" 1>&6
12292 else
12293   cat > conftest.$ac_ext <<EOF
12294 #line 12331 "configure"
12295 #include "confdefs.h"
12296 #include <algorithm>
12297                                 struct T1 {};
12298                                 int operator==(const T1&, const T1&) { return 0; }
12299                                 int operator!=(const T1&, const T1&) { return 0; }
12300 int main() {
12301 T1 a,b; return a != b;
12302 ; return 0; }
12303 EOF
12304 if { (eval echo configure:12341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12305   rm -rf conftest*
12306   ac_cv_cpp_unambiguous_std_notequal=unambiguous
12307 else
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -rf conftest*
12311   ac_cv_cpp_unambiguous_std_notequal=ambiguous
12312 fi
12313 rm -f conftest*
12314 fi
12315
12316 echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6
12317 if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then
12318   cat >> confdefs.h <<\EOF
12319 #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1
12320 EOF
12321
12322 fi
12323
12324
12325 echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6
12326 echo "configure:12363: checking for C++ reinterpret_cast" >&5
12327 if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then
12328   echo $ac_n "(cached) $ac_c" 1>&6
12329 else
12330   cat > conftest.$ac_ext <<EOF
12331 #line 12368 "configure"
12332 #include "confdefs.h"
12333 struct X { int i; };
12334                                struct Y { int i; };
12335 int main() {
12336 X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
12337 ; return 0; }
12338 EOF
12339 if { (eval echo configure:12376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12340   rm -rf conftest*
12341   ac_cv_cpp_reinterpret_cast=yes
12342 else
12343   echo "configure: failed program was:" >&5
12344   cat conftest.$ac_ext >&5
12345   rm -rf conftest*
12346   ac_cv_cpp_reinterpret_cast=no
12347 fi
12348 rm -f conftest*
12349 fi
12350
12351 echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6
12352 if test "$ac_cv_cpp_reinterpret_cast" = yes ; then
12353    cat >> confdefs.h <<\EOF
12354 #define HAVE_CPP_NEW_CASTS 1
12355 EOF
12356
12357 fi
12358
12359 echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
12360 echo "configure:12397: checking for C++ dynamic_cast to void*" >&5
12361 if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then
12362   echo $ac_n "(cached) $ac_c" 1>&6
12363 else
12364   if test "$cross_compiling" = yes; then
12365   ac_cv_cpp_dynamic_cast_void_ptr=no
12366 else
12367   cat > conftest.$ac_ext <<EOF
12368 #line 12405 "configure"
12369 #include "confdefs.h"
12370 #ifdef __cplusplus
12371 extern "C" void exit(int);
12372 #endif
12373 class X { int i; public: virtual ~X() { } };
12374                             class Y { int j; public: virtual ~Y() { } };
12375                             class Z : public X, public Y { int k; };
12376
12377                             int main() {
12378                                  Z mdo;
12379                                  X *subx = (X*)&mdo;
12380                                  Y *suby = (Y*)&mdo;
12381                                  return !((((void*)&mdo != (void*)subx) &&
12382                                            ((void*)&mdo == dynamic_cast<void*>(subx))) ||
12383                                           (((void*)&mdo != (void*)suby) &&
12384                                            ((void*)&mdo == dynamic_cast<void*>(suby))));
12385                             }
12386 EOF
12387 if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12388 then
12389   ac_cv_cpp_dynamic_cast_void_ptr=yes
12390 else
12391   echo "configure: failed program was:" >&5
12392   cat conftest.$ac_ext >&5
12393   rm -fr conftest*
12394   ac_cv_cpp_dynamic_cast_void_ptr=no
12395 fi
12396 rm -fr conftest*
12397 fi
12398
12399 fi
12400
12401 echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6
12402 if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
12403    cat >> confdefs.h <<\EOF
12404 #define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
12405 EOF
12406
12407 fi
12408
12409
12410 echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
12411 echo "configure:12448: checking whether C++ requires implementation of unused virtual methods" >&5
12412 if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then
12413   echo $ac_n "(cached) $ac_c" 1>&6
12414 else
12415   cat > conftest.$ac_ext <<EOF
12416 #line 12453 "configure"
12417 #include "confdefs.h"
12418 class X {private: virtual void never_called();};
12419 int main() {
12420 X x;
12421 ; return 0; }
12422 EOF
12423 if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12424   rm -rf conftest*
12425   ac_cv_cpp_unused_required=no
12426 else
12427   echo "configure: failed program was:" >&5
12428   cat conftest.$ac_ext >&5
12429   rm -rf conftest*
12430   ac_cv_cpp_unused_required=yes
12431 fi
12432 rm -f conftest*
12433 fi
12434
12435 echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6
12436 if test "$ac_cv_cpp_unused_required" = yes ; then
12437    cat >> confdefs.h <<\EOF
12438 #define NEED_CPP_UNUSED_IMPLEMENTATIONS 1
12439 EOF
12440
12441 fi
12442
12443
12444
12445 echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
12446 echo "configure:12483: checking for trouble comparing to zero near std::operator!=()" >&5
12447 if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then
12448   echo $ac_n "(cached) $ac_c" 1>&6
12449 else
12450   cat > conftest.$ac_ext <<EOF
12451 #line 12488 "configure"
12452 #include "confdefs.h"
12453 #include <algorithm>
12454                                 template <class T> class Foo {};
12455                                 class T2;
12456                                 template <class T> int operator==(const T2*, const T&) { return 0; }
12457                                 template <class T> int operator!=(const T2*, const T&) { return 0; }
12458 int main() {
12459 Foo<int> f; return (0 != f);
12460 ; return 0; }
12461 EOF
12462 if { (eval echo configure:12499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12463   rm -rf conftest*
12464   ac_cv_trouble_comparing_to_zero=no
12465 else
12466   echo "configure: failed program was:" >&5
12467   cat conftest.$ac_ext >&5
12468   rm -rf conftest*
12469   ac_cv_trouble_comparing_to_zero=yes
12470 fi
12471 rm -f conftest*
12472 fi
12473
12474 echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6
12475 if test "$ac_cv_trouble_comparing_to_zero" = yes ; then
12476   cat >> confdefs.h <<\EOF
12477 #define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 1
12478 EOF
12479
12480 fi
12481
12482 # try harder, when checking for __thread support, see bug 521750 comment #33 and below
12483 _SAVE_LDFLAGS=$LDFLAGS
12484 LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS"
12485 echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6
12486 echo "configure:12523: checking for __thread keyword for TLS variables" >&5
12487 if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then
12488   echo $ac_n "(cached) $ac_c" 1>&6
12489 else
12490   cat > conftest.$ac_ext <<EOF
12491 #line 12528 "configure"
12492 #include "confdefs.h"
12493 __thread bool tlsIsMainThread = false;
12494 int main() {
12495 return tlsIsMainThread;
12496 ; return 0; }
12497 EOF
12498 if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12499   rm -rf conftest*
12500   ac_cv_thread_keyword=yes
12501 else
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   ac_cv_thread_keyword=no
12506 fi
12507 rm -f conftest*
12508 fi
12509
12510 echo "$ac_t""$ac_cv_thread_keyword" 1>&6
12511 LDFLAGS=$_SAVE_LDFLAGS
12512 if test "$ac_cv_thread_keyword" = yes; then
12513   # mips builds fail with TLS variables because of a binutils bug.
12514   # See bug 528687
12515   case "${target}" in
12516     mips*-*)
12517       :
12518       ;;
12519     *-android*)
12520       :
12521       ;;
12522     *)
12523       cat >> confdefs.h <<\EOF
12524 #define HAVE_THREAD_TLS_KEYWORD 1
12525 EOF
12526
12527       ;;
12528   esac
12529 fi
12530
12531
12532 MALLOC_H=
12533 ac_safe=`echo "malloc.h" | sed 'y%./+-%__p_%'`
12534 echo $ac_n "checking for malloc.h""... $ac_c" 1>&6
12535 echo "configure:12572: checking for malloc.h" >&5
12536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12537   echo $ac_n "(cached) $ac_c" 1>&6
12538 else
12539   cat > conftest.$ac_ext <<EOF
12540 #line 12577 "configure"
12541 #include "confdefs.h"
12542 #include <malloc.h>
12543 EOF
12544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12545 { (eval echo configure:12582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12547 if test -z "$ac_err"; then
12548   rm -rf conftest*
12549   eval "ac_cv_header_$ac_safe=yes"
12550 else
12551   echo "$ac_err" >&5
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_header_$ac_safe=no"
12556 fi
12557 rm -f conftest*
12558 fi
12559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12560   echo "$ac_t""yes" 1>&6
12561   MALLOC_H=malloc.h
12562 else
12563   echo "$ac_t""no" 1>&6
12564 fi
12565
12566 if test "$MALLOC_H" = ""; then
12567   ac_safe=`echo "malloc/malloc.h" | sed 'y%./+-%__p_%'`
12568 echo $ac_n "checking for malloc/malloc.h""... $ac_c" 1>&6
12569 echo "configure:12606: checking for malloc/malloc.h" >&5
12570 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12571   echo $ac_n "(cached) $ac_c" 1>&6
12572 else
12573   cat > conftest.$ac_ext <<EOF
12574 #line 12611 "configure"
12575 #include "confdefs.h"
12576 #include <malloc/malloc.h>
12577 EOF
12578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12579 { (eval echo configure:12616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12581 if test -z "$ac_err"; then
12582   rm -rf conftest*
12583   eval "ac_cv_header_$ac_safe=yes"
12584 else
12585   echo "$ac_err" >&5
12586   echo "configure: failed program was:" >&5
12587   cat conftest.$ac_ext >&5
12588   rm -rf conftest*
12589   eval "ac_cv_header_$ac_safe=no"
12590 fi
12591 rm -f conftest*
12592 fi
12593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12594   echo "$ac_t""yes" 1>&6
12595   MALLOC_H=malloc/malloc.h
12596 else
12597   echo "$ac_t""no" 1>&6
12598 fi
12599
12600   if test "$MALLOC_H" = ""; then
12601     ac_safe=`echo "sys/malloc.h" | sed 'y%./+-%__p_%'`
12602 echo $ac_n "checking for sys/malloc.h""... $ac_c" 1>&6
12603 echo "configure:12640: checking for sys/malloc.h" >&5
12604 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12605   echo $ac_n "(cached) $ac_c" 1>&6
12606 else
12607   cat > conftest.$ac_ext <<EOF
12608 #line 12645 "configure"
12609 #include "confdefs.h"
12610 #include <sys/malloc.h>
12611 EOF
12612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12613 { (eval echo configure:12650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12615 if test -z "$ac_err"; then
12616   rm -rf conftest*
12617   eval "ac_cv_header_$ac_safe=yes"
12618 else
12619   echo "$ac_err" >&5
12620   echo "configure: failed program was:" >&5
12621   cat conftest.$ac_ext >&5
12622   rm -rf conftest*
12623   eval "ac_cv_header_$ac_safe=no"
12624 fi
12625 rm -f conftest*
12626 fi
12627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12628   echo "$ac_t""yes" 1>&6
12629   MALLOC_H=sys/malloc.h
12630 else
12631   echo "$ac_t""no" 1>&6
12632 fi
12633
12634   fi
12635 fi
12636 if test "$MALLOC_H" != ""; then
12637    cat >> confdefs.h <<EOF
12638 #define MALLOC_H <$MALLOC_H>
12639 EOF
12640
12641 fi
12642
12643 MOZ_ALLOCATING_FUNCS="strndup posix_memalign memalign valloc"
12644 for ac_func in strndup posix_memalign memalign valloc
12645 do
12646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12647 echo "configure:12684: checking for $ac_func" >&5
12648 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12649   echo $ac_n "(cached) $ac_c" 1>&6
12650 else
12651   cat > conftest.$ac_ext <<EOF
12652 #line 12689 "configure"
12653 #include "confdefs.h"
12654 /* System header to define __stub macros and hopefully few prototypes,
12655     which can conflict with char $ac_func(); below.  */
12656 #include <assert.h>
12657 /* Override any gcc2 internal prototype to avoid an error.  */
12658 #ifdef __cplusplus
12659 extern "C"
12660 #endif
12661 /* We use char because int might match the return type of a gcc2
12662     builtin and then its argument prototype would still apply.  */
12663 char $ac_func();
12664
12665 int main() {
12666
12667 /* The GNU C library defines this for functions which it implements
12668     to always fail with ENOSYS.  Some functions are actually named
12669     something starting with __ and the normal name is an alias.  */
12670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12671 choke me
12672 #else
12673 $ac_func();
12674 #endif
12675
12676 ; return 0; }
12677 EOF
12678 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12679   rm -rf conftest*
12680   eval "ac_cv_func_$ac_func=yes"
12681 else
12682   echo "configure: failed program was:" >&5
12683   cat conftest.$ac_ext >&5
12684   rm -rf conftest*
12685   eval "ac_cv_func_$ac_func=no"
12686 fi
12687 rm -f conftest*
12688 fi
12689
12690 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12691   echo "$ac_t""yes" 1>&6
12692     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12693   cat >> confdefs.h <<EOF
12694 #define $ac_tr_func 1
12695 EOF
12696  
12697 else
12698   echo "$ac_t""no" 1>&6
12699 fi
12700 done
12701
12702
12703
12704 echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6
12705 echo "configure:12742: checking for __attribute__((always_inline))" >&5
12706 if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then
12707   echo $ac_n "(cached) $ac_c" 1>&6
12708 else
12709   cat > conftest.$ac_ext <<EOF
12710 #line 12747 "configure"
12711 #include "confdefs.h"
12712
12713 int main() {
12714 inline void f(void) __attribute__((always_inline));
12715 ; return 0; }
12716 EOF
12717 if { (eval echo configure:12754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12718   rm -rf conftest*
12719   ac_cv_attribute_always_inline=yes
12720 else
12721   echo "configure: failed program was:" >&5
12722   cat conftest.$ac_ext >&5
12723   rm -rf conftest*
12724   ac_cv_attribute_always_inline=no
12725 fi
12726 rm -f conftest*
12727 fi
12728
12729 echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6
12730
12731 echo $ac_n "checking for __attribute__((malloc))""... $ac_c" 1>&6
12732 echo "configure:12769: checking for __attribute__((malloc))" >&5
12733 if eval "test \"`echo '$''{'ac_cv_attribute_malloc'+set}'`\" = set"; then
12734   echo $ac_n "(cached) $ac_c" 1>&6
12735 else
12736   cat > conftest.$ac_ext <<EOF
12737 #line 12774 "configure"
12738 #include "confdefs.h"
12739
12740 int main() {
12741 void* f(int) __attribute__((malloc));
12742 ; return 0; }
12743 EOF
12744 if { (eval echo configure:12781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12745   rm -rf conftest*
12746   ac_cv_attribute_malloc=yes
12747 else
12748   echo "configure: failed program was:" >&5
12749   cat conftest.$ac_ext >&5
12750   rm -rf conftest*
12751   ac_cv_attribute_malloc=no
12752 fi
12753 rm -f conftest*
12754 fi
12755
12756 echo "$ac_t""$ac_cv_attribute_malloc" 1>&6
12757
12758 echo $ac_n "checking for __attribute__((warn_unused_result))""... $ac_c" 1>&6
12759 echo "configure:12796: checking for __attribute__((warn_unused_result))" >&5
12760 if eval "test \"`echo '$''{'ac_cv_attribute_warn_unused'+set}'`\" = set"; then
12761   echo $ac_n "(cached) $ac_c" 1>&6
12762 else
12763   cat > conftest.$ac_ext <<EOF
12764 #line 12801 "configure"
12765 #include "confdefs.h"
12766
12767 int main() {
12768 int f(void) __attribute__((warn_unused_result));
12769 ; return 0; }
12770 EOF
12771 if { (eval echo configure:12808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12772   rm -rf conftest*
12773   ac_cv_attribute_warn_unused=yes
12774 else
12775   echo "configure: failed program was:" >&5
12776   cat conftest.$ac_ext >&5
12777   rm -rf conftest*
12778   ac_cv_attribute_warn_unused=no
12779 fi
12780 rm -f conftest*
12781 fi
12782
12783 echo "$ac_t""$ac_cv_attribute_warn_unused" 1>&6
12784
12785 echo $ac_n "checking for __attribute__((noreturn))""... $ac_c" 1>&6
12786 echo "configure:12823: checking for __attribute__((noreturn))" >&5
12787 if eval "test \"`echo '$''{'ac_cv_attribute_noreturn'+set}'`\" = set"; then
12788   echo $ac_n "(cached) $ac_c" 1>&6
12789 else
12790   cat > conftest.$ac_ext <<EOF
12791 #line 12828 "configure"
12792 #include "confdefs.h"
12793
12794 int main() {
12795 void f(void) __attribute__((noreturn));
12796 ; return 0; }
12797 EOF
12798 if { (eval echo configure:12835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12799   rm -rf conftest*
12800   ac_cv_attribute_noreturn=yes
12801 else
12802   echo "configure: failed program was:" >&5
12803   cat conftest.$ac_ext >&5
12804   rm -rf conftest*
12805   ac_cv_attribute_noreturn=no
12806 fi
12807 rm -f conftest*
12808 fi
12809
12810 echo "$ac_t""$ac_cv_attribute_noreturn" 1>&6
12811  
12812 ac_ext=c
12813 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
12814 ac_cpp='$CPP $CPPFLAGS'
12815 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
12816 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
12817 cross_compiling=$ac_cv_prog_cc_cross
12818
12819
12820
12821 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
12822 echo "configure:12859: checking for LC_MESSAGES" >&5
12823 if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then
12824   echo $ac_n "(cached) $ac_c" 1>&6
12825 else
12826   cat > conftest.$ac_ext <<EOF
12827 #line 12864 "configure"
12828 #include "confdefs.h"
12829 #include <locale.h>
12830 int main() {
12831 int category = LC_MESSAGES;
12832 ; return 0; }
12833 EOF
12834 if { (eval echo configure:12871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12835   rm -rf conftest*
12836   ac_cv_i18n_lc_messages=yes
12837 else
12838   echo "configure: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   rm -rf conftest*
12841   ac_cv_i18n_lc_messages=no
12842 fi
12843 rm -f conftest*
12844 fi
12845
12846 echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6
12847 if test "$ac_cv_i18n_lc_messages" = yes; then
12848    cat >> confdefs.h <<\EOF
12849 #define HAVE_I18N_LC_MESSAGES 1
12850 EOF
12851
12852 fi
12853
12854 for ac_func in localeconv
12855 do
12856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12857 echo "configure:12894: checking for $ac_func" >&5
12858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12859   echo $ac_n "(cached) $ac_c" 1>&6
12860 else
12861   cat > conftest.$ac_ext <<EOF
12862 #line 12899 "configure"
12863 #include "confdefs.h"
12864 /* System header to define __stub macros and hopefully few prototypes,
12865     which can conflict with char $ac_func(); below.  */
12866 #include <assert.h>
12867 /* Override any gcc2 internal prototype to avoid an error.  */
12868 /* We use char because int might match the return type of a gcc2
12869     builtin and then its argument prototype would still apply.  */
12870 char $ac_func();
12871
12872 int main() {
12873
12874 /* The GNU C library defines this for functions which it implements
12875     to always fail with ENOSYS.  Some functions are actually named
12876     something starting with __ and the normal name is an alias.  */
12877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12878 choke me
12879 #else
12880 $ac_func();
12881 #endif
12882
12883 ; return 0; }
12884 EOF
12885 if { (eval echo configure:12922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12886   rm -rf conftest*
12887   eval "ac_cv_func_$ac_func=yes"
12888 else
12889   echo "configure: failed program was:" >&5
12890   cat conftest.$ac_ext >&5
12891   rm -rf conftest*
12892   eval "ac_cv_func_$ac_func=no"
12893 fi
12894 rm -f conftest*
12895 fi
12896
12897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12898   echo "$ac_t""yes" 1>&6
12899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12900   cat >> confdefs.h <<EOF
12901 #define $ac_tr_func 1
12902 EOF
12903  
12904 else
12905   echo "$ac_t""no" 1>&6
12906 fi
12907 done
12908
12909
12910 fi # SKIP_COMPILER_CHECKS
12911
12912 TARGET_XPCOM_ABI=
12913 if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then
12914     TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}"
12915 fi
12916
12917
12918 if test "$ac_cv_attribute_always_inline" = yes ; then
12919   cat >> confdefs.h <<\EOF
12920 #define NS_ALWAYS_INLINE __attribute__((always_inline))
12921 EOF
12922
12923 else
12924   cat >> confdefs.h <<\EOF
12925 #define NS_ALWAYS_INLINE 
12926 EOF
12927
12928 fi
12929
12930 if test "$ac_cv_attribute_malloc" = yes ; then
12931   cat >> confdefs.h <<\EOF
12932 #define NS_ATTR_MALLOC __attribute__((malloc))
12933 EOF
12934
12935 else
12936   cat >> confdefs.h <<\EOF
12937 #define NS_ATTR_MALLOC 
12938 EOF
12939
12940 fi
12941
12942 if test "$ac_cv_attribute_warn_unused" = yes ; then
12943   cat >> confdefs.h <<\EOF
12944 #define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
12945 EOF
12946
12947 else
12948   cat >> confdefs.h <<\EOF
12949 #define NS_WARN_UNUSED_RESULT 
12950 EOF
12951
12952 fi
12953
12954 if test "$ac_cv_attribute_noreturn" = yes ; then
12955   cat >> confdefs.h <<\EOF
12956 #define NS_NORETURN __attribute__((noreturn))
12957 EOF
12958
12959 else
12960   cat >> confdefs.h <<\EOF
12961 #define NS_NORETURN 
12962 EOF
12963
12964 fi
12965
12966
12967 if test -n "$SKIP_COMPILER_CHECKS"; then
12968       cat >> confdefs.h <<\EOF
12969 #define MALLOC_H <malloc.h>
12970 EOF
12971
12972    cat >> confdefs.h <<\EOF
12973 #define HAVE_FORCEINLINE 1
12974 EOF
12975
12976    cat >> confdefs.h <<\EOF
12977 #define HAVE_LOCALECONV 1
12978 EOF
12979
12980 fi # SKIP_COMPILER_CHECKS
12981
12982 # External Packages
12983
12984 # Check whether --with-system-nspr or --without-system-nspr was given.
12985 if test "${with_system_nspr+set}" = set; then
12986   withval="$with_system_nspr"
12987   if test "$withval" = "yes"; then
12988     _USE_SYSTEM_NSPR=1 
12989   elif test "$withval" = "no"; then
12990     :
12991   else
12992     { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; exit 1; }
12993   fi
12994 fi
12995
12996
12997 # Check whether --with-nspr-cflags or --without-nspr-cflags was given.
12998 if test "${with_nspr_cflags+set}" = set; then
12999   withval="$with_nspr_cflags"
13000   NSPR_CFLAGS=$withval
13001 fi
13002
13003 # Check whether --with-nspr-libs or --without-nspr-libs was given.
13004 if test "${with_nspr_libs+set}" = set; then
13005   withval="$with_nspr_libs"
13006   NSPR_LIBS=$withval
13007 fi
13008
13009
13010
13011
13012 if test "$_USE_SYSTEM_NSPR" && (test "$NSPR_CFLAGS" -o "$NSPR_LIBS"); then
13013     { echo "configure: error: --with-system-nspr and --with-nspr-libs/cflags are mutually exclusive.
13014 See 'configure --help'." 1>&2; exit 1; }
13015 fi
13016
13017 if test -n "$_USE_SYSTEM_NSPR"; then
13018     MOZ_NATIVE_NSPR=
13019     
13020 # Check whether --with-nspr-prefix or --without-nspr-prefix was given.
13021 if test "${with_nspr_prefix+set}" = set; then
13022   withval="$with_nspr_prefix"
13023   nspr_config_prefix="$withval"
13024 else
13025   nspr_config_prefix=""
13026 fi
13027
13028
13029 # Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given.
13030 if test "${with_nspr_exec_prefix+set}" = set; then
13031   withval="$with_nspr_exec_prefix"
13032   nspr_config_exec_prefix="$withval"
13033 else
13034   nspr_config_exec_prefix=""
13035 fi
13036
13037
13038         if test -n "$nspr_config_exec_prefix"; then
13039                 nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
13040                 if test -z "$NSPR_CONFIG"; then
13041                         NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
13042                 fi
13043         fi
13044         if test -n "$nspr_config_prefix"; then
13045                 nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
13046                 if test -z "$NSPR_CONFIG"; then
13047                         NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
13048                 fi
13049         fi
13050
13051         unset ac_cv_path_NSPR_CONFIG
13052         # Extract the first word of "nspr-config", so it can be a program name with args.
13053 set dummy nspr-config; ac_word=$2
13054 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13055 echo "configure:13092: checking for $ac_word" >&5
13056 if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
13057   echo $ac_n "(cached) $ac_c" 1>&6
13058 else
13059   case "$NSPR_CONFIG" in
13060   /*)
13061   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
13062   ;;
13063   ?:/*)                  
13064   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
13065   ;;
13066   *)
13067   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13068   ac_dummy="$PATH"
13069   for ac_dir in $ac_dummy; do 
13070     test -z "$ac_dir" && ac_dir=.
13071     if test -f $ac_dir/$ac_word; then
13072       ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word"
13073       break
13074     fi
13075   done
13076   IFS="$ac_save_ifs"
13077   test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no"
13078   ;;
13079 esac
13080 fi
13081 NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
13082 if test -n "$NSPR_CONFIG"; then
13083   echo "$ac_t""$NSPR_CONFIG" 1>&6
13084 else
13085   echo "$ac_t""no" 1>&6
13086 fi
13087
13088         min_nspr_version=4.7.0
13089         echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6
13090 echo "configure:13127: checking for NSPR - version >= $min_nspr_version" >&5
13091
13092         no_nspr=""
13093         if test "$NSPR_CONFIG" != "no"; then
13094                 NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
13095                 NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
13096                 NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version`  
13097         elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then
13098             NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}"
13099                 NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}"
13100                 NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION"
13101         else
13102             no_nspr="yes"
13103         fi
13104
13105         if test -z "$no_nspr"; then
13106                 nspr_config_major_version=`echo $NSPR_VERSION_STRING | \
13107                         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
13108                 nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \
13109                         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
13110                 nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \
13111                         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
13112                 min_nspr_major_version=`echo $min_nspr_version | \
13113                         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
13114                 min_nspr_minor_version=`echo $min_nspr_version | \
13115                         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
13116                 min_nspr_micro_version=`echo $min_nspr_version | \
13117                         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
13118                 if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then
13119                         no_nspr="yes"
13120                 elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
13121                      test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then
13122                         no_nspr="yes"
13123                 elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
13124                      test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" &&
13125                      test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then
13126                         no_nspr="yes"
13127                 fi
13128         fi
13129
13130         if test -z "$no_nspr"; then
13131                 echo "$ac_t""yes" 1>&6
13132                 MOZ_NATIVE_NSPR=1     
13133         else
13134                 echo "$ac_t""no" 1>&6
13135                 { echo "configure: error: your don't have NSPR installed or your version is too old" 1>&2; exit 1; }
13136         fi
13137
13138
13139         
13140         
13141
13142
13143 fi
13144
13145 if test -n "$MOZ_NATIVE_NSPR"; then
13146     _SAVE_CFLAGS=$CFLAGS
13147     CFLAGS="$CFLAGS $NSPR_CFLAGS"
13148     cat > conftest.$ac_ext <<EOF
13149 #line 13186 "configure"
13150 #include "confdefs.h"
13151 #include "prlog.h"
13152 int main() {
13153 #ifndef PR_STATIC_ASSERT
13154                  #error PR_STATIC_ASSERT not defined
13155                  #endif
13156 ; return 0; }
13157 EOF
13158 if { (eval echo configure:13195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13159   rm -rf conftest*
13160   MOZ_NATIVE_NSPR=1
13161 else
13162   echo "configure: failed program was:" >&5
13163   cat conftest.$ac_ext >&5
13164   rm -rf conftest*
13165   { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; exit 1; }
13166 fi
13167 rm -f conftest*
13168     CFLAGS=$_SAVE_CFLAGS
13169 fi
13170
13171
13172 # Application
13173
13174 BUILD_STATIC_LIBS=
13175 ENABLE_TESTS=1
13176
13177 MOZ_THUMB2=
13178 USE_ARM_KUSER=
13179
13180 case "${target}" in
13181     arm-android-eabi)
13182         USE_ARM_KUSER=1
13183         MOZ_THUMB2=1
13184         ;;
13185 esac
13186
13187 # Check whether --with-arm-kuser or --without-arm-kuser was given.
13188 if test "${with_arm_kuser+set}" = set; then
13189   withval="$with_arm_kuser"
13190   if test "$withval" = "yes"; then
13191     USE_ARM_KUSER=1
13192   elif test "$withval" = "no"; then
13193     :
13194   else
13195     { echo "configure: error: Option, arm-kuser, does not take an argument ($withval)." 1>&2; exit 1; }
13196   fi
13197 fi
13198
13199 if test -n "$USE_ARM_KUSER"; then
13200    cat >> confdefs.h <<\EOF
13201 #define USE_ARM_KUSER 1
13202 EOF
13203
13204 fi
13205
13206 # Components and Features
13207
13208 # Check whether --enable-ui-locale or --disable-ui-locale was given.
13209 if test "${enable_ui_locale+set}" = set; then
13210   enableval="$enable_ui_locale"
13211   MOZ_UI_LOCALE=$enableval 
13212 fi
13213
13214
13215
13216 # Check whether --enable-tests or --disable-tests was given.
13217 if test "${enable_tests+set}" = set; then
13218   enableval="$enable_tests"
13219   if test "$enableval" = "no"; then
13220     ENABLE_TESTS=
13221   elif test "$enableval" = "yes"; then
13222     ENABLE_TESTS=1 
13223   else
13224     { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; }
13225   fi
13226 fi
13227
13228
13229 # Individual module options
13230
13231 case "$target_cpu" in
13232   arm*)
13233     MOZ_ARM_ARCH=armv7
13234   ;;
13235 esac
13236 # Check whether --enable-thumb2 or --disable-thumb2 was given.
13237 if test "${enable_thumb2+set}" = set; then
13238   enableval="$enable_thumb2"
13239   if test "$enableval" = "yes"; then
13240     MOZ_THUMB2=1
13241   elif test "$enableval" = "no"; then
13242     MOZ_THUMB2=
13243   else
13244     { echo "configure: error: Option, thumb2, does not take an argument ($enableval)." 1>&2; exit 1; }
13245   fi
13246 fi
13247
13248 if test -n "$MOZ_THUMB2"; then
13249   MOZ_ARM_ARCH=armv7
13250 fi
13251
13252 # Check whether --with-cpu-arch or --without-cpu-arch was given.
13253 if test "${with_cpu_arch+set}" = set; then
13254   withval="$with_cpu_arch"
13255   MOZ_ARM_ARCH=$withval
13256 fi
13257
13258
13259 # Debugging and Optimizations
13260
13261 if test -z "$MOZ_DEBUG_FLAGS"; then
13262   MOZ_DEBUG_FLAGS="-g"
13263 fi
13264
13265 # Check whether --enable-debug or --disable-debug was given.
13266 if test "${enable_debug+set}" = set; then
13267   enableval="$enable_debug"
13268    if test "$enableval" != "no"; then
13269     MOZ_DEBUG=1
13270     if test -n "$enableval" -a "$enableval" != "yes"; then
13271         MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
13272         _MOZ_DEBUG_FLAGS_SET=1
13273     fi
13274   else
13275     MOZ_DEBUG=
13276   fi 
13277 else
13278   MOZ_DEBUG=
13279 fi
13280
13281
13282 MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG -DTRACING"
13283 # Check whether --with-debug-label or --without-debug-label was given.
13284 if test "${with_debug_label+set}" = set; then
13285   withval="$with_debug_label"
13286    for option in `echo $withval | sed 's/,/ /g'`; do
13287     MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${option}"
13288 done
13289 fi
13290
13291
13292 MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
13293
13294 if test -n "$MOZ_DEBUG"; then
13295     echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6
13296 echo "configure:13393: checking for valid debug flags" >&5
13297     _SAVE_CFLAGS=$CFLAGS
13298     CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS"
13299     cat > conftest.$ac_ext <<EOF
13300 #line 13397 "configure"
13301 #include "confdefs.h"
13302 #include <stdio.h>
13303 int main() {
13304 printf("Hello World\n");
13305 ; return 0; }
13306 EOF
13307 if { (eval echo configure:13404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13308   rm -rf conftest*
13309   _results=yes
13310 else
13311   echo "configure: failed program was:" >&5
13312   cat conftest.$ac_ext >&5
13313   rm -rf conftest*
13314   _results=no
13315 fi
13316 rm -f conftest*
13317     echo "$ac_t""$_results" 1>&6
13318     if test "$_results" = "no"; then
13319         { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; exit 1; }
13320     fi
13321     CFLAGS=$_SAVE_CFLAGS
13322 fi
13323
13324 if test -z "$MOZ_OPTIMIZE_FLAGS"; then
13325         MOZ_OPTIMIZE_FLAGS="-O"
13326 fi
13327
13328 # Check whether --enable-optimize or --disable-optimize was given.
13329 if test "${enable_optimize+set}" = set; then
13330   enableval="$enable_optimize"
13331    if test "$enableval" != "no"; then
13332     MOZ_OPTIMIZE=1
13333     if test -n "$enableval" -a "$enableval" != "yes"; then
13334         MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'`
13335         MOZ_OPTIMIZE=2
13336     fi
13337 else
13338     MOZ_OPTIMIZE=
13339 fi 
13340 else
13341   MOZ_OPTIMIZE=1
13342 fi
13343
13344
13345 if test "$COMPILE_ENVIRONMENT"; then
13346 if test -n "$MOZ_OPTIMIZE"; then
13347     echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6
13348 echo "configure:13445: checking for valid optimization flags" >&5
13349     _SAVE_CFLAGS=$CFLAGS
13350     CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
13351     cat > conftest.$ac_ext <<EOF
13352 #line 13449 "configure"
13353 #include "confdefs.h"
13354 #include <stdio.h>
13355 int main() {
13356 printf("Hello World\n");
13357 ; return 0; }
13358 EOF
13359 if { (eval echo configure:13456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13360   rm -rf conftest*
13361   _results=yes
13362 else
13363   echo "configure: failed program was:" >&5
13364   cat conftest.$ac_ext >&5
13365   rm -rf conftest*
13366   _results=no
13367 fi
13368 rm -f conftest*
13369     echo "$ac_t""$_results" 1>&6
13370     if test "$_results" = "no"; then
13371         { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; exit 1; }
13372     fi
13373     CFLAGS=$_SAVE_CFLAGS
13374 fi
13375 fi # COMPILE_ENVIRONMENT
13376
13377
13378
13379
13380
13381
13382 # Check whether --enable-debugger-info-modules or --disable-debugger-info-modules was given.
13383 if test "${enable_debugger_info_modules+set}" = set; then
13384   enableval="$enable_debugger_info_modules"
13385    if test "$enableval" != "no"; then
13386     echo "configure: warning: --enable-debugger-info-modules is deprecated, use --enable-debug-symbols instead" 1>&2
13387     MOZ_DEBUG_SYMBOLS=1
13388   fi 
13389 fi
13390
13391
13392 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
13393 if test "${enable_debug_symbols+set}" = set; then
13394   enableval="$enable_debug_symbols"
13395    if test "$enableval" != "no"; then
13396       MOZ_DEBUG_SYMBOLS=1
13397       if test -n "$enableval" -a "$enableval" != "yes"; then
13398           if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
13399               MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
13400           else
13401               { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
13402           fi
13403       fi
13404   fi 
13405 fi
13406
13407
13408 if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
13409     cat >> confdefs.h <<\EOF
13410 #define MOZ_DEBUG_SYMBOLS 1
13411 EOF
13412
13413     export MOZ_DEBUG_SYMBOLS
13414 fi
13415
13416 # Check whether --enable-warnings-as-errors or --disable-warnings-as-errors was given.
13417 if test "${enable_warnings_as_errors+set}" = set; then
13418   enableval="$enable_warnings_as_errors"
13419   if test "$enableval" = "no"; then
13420     MOZ_DISABLE_WARNINGS_AS_ERRORS=1
13421   elif test "$enableval" = "yes"; then
13422     MOZ_DISABLE_WARNINGS_AS_ERRORS= 
13423   else
13424     { echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&2; exit 1; }
13425   fi
13426 fi
13427
13428 if test "$MOZ_DISABLE_WARNINGS_AS_ERRORS"; then
13429    WARNINGS_AS_ERRORS=''
13430 fi
13431
13432 NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
13433 # Check whether --enable-trace-malloc or --disable-trace-malloc was given.
13434 if test "${enable_trace_malloc+set}" = set; then
13435   enableval="$enable_trace_malloc"
13436   if test "$enableval" = "yes"; then
13437     NS_TRACE_MALLOC=1
13438   elif test "$enableval" = "no"; then
13439     NS_TRACE_MALLOC= 
13440   else
13441     { echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13442   fi
13443 fi
13444
13445 if test "$NS_TRACE_MALLOC"; then
13446   # Please, Mr. Linker Man, don't take away our symbol names
13447   MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
13448   cat >> confdefs.h <<\EOF
13449 #define NS_TRACE_MALLOC 1
13450 EOF
13451
13452 fi
13453
13454
13455 # Check whether --enable-jemalloc or --disable-jemalloc was given.
13456 if test "${enable_jemalloc+set}" = set; then
13457   enableval="$enable_jemalloc"
13458   if test "$enableval" = "yes"; then
13459     MOZ_MEMORY=1
13460   elif test "$enableval" = "no"; then
13461     MOZ_MEMORY=
13462   else
13463     { echo "configure: error: Option, jemalloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13464   fi
13465 fi
13466
13467
13468 if test "$NS_TRACE_MALLOC"; then
13469     MOZ_MEMORY=
13470 fi
13471
13472 if test "$MOZ_MEMORY"; then
13473
13474     if test "$OS_ARCH" = "WINNT"; then
13475     if test -z "$HAVE_64BIT_OS"; then
13476       cat >> confdefs.h <<EOF
13477 #define MOZ_MEMORY_SIZEOF_PTR_2POW 2
13478 EOF
13479
13480     else
13481       cat >> confdefs.h <<EOF
13482 #define MOZ_MEMORY_SIZEOF_PTR_2POW 3
13483 EOF
13484
13485     fi
13486   else
13487     echo $ac_n "checking size of int *""... $ac_c" 1>&6
13488 echo "configure:13585: checking size of int *" >&5
13489 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
13490   echo $ac_n "(cached) $ac_c" 1>&6
13491 else
13492   if test "$cross_compiling" = yes; then
13493   ac_cv_sizeof_int_p=4
13494 else
13495   cat > conftest.$ac_ext <<EOF
13496 #line 13593 "configure"
13497 #include "confdefs.h"
13498 #include <stdio.h>
13499 main()
13500 {
13501   FILE *f=fopen("conftestval", "w");
13502   if (!f) exit(1);
13503   fprintf(f, "%d\n", sizeof(int *));
13504   exit(0);
13505 }
13506 EOF
13507 if { (eval echo configure:13604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13508 then
13509   ac_cv_sizeof_int_p=`cat conftestval`
13510 else
13511   echo "configure: failed program was:" >&5
13512   cat conftest.$ac_ext >&5
13513   rm -fr conftest*
13514   ac_cv_sizeof_int_p=0
13515 fi
13516 rm -fr conftest*
13517 fi
13518
13519 fi
13520 echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
13521 cat >> confdefs.h <<EOF
13522 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
13523 EOF
13524
13525
13526     case "${ac_cv_sizeof_int_p}" in
13527     4)
13528       cat >> confdefs.h <<EOF
13529 #define MOZ_MEMORY_SIZEOF_PTR_2POW 2
13530 EOF
13531
13532       ;;
13533     8)
13534       cat >> confdefs.h <<EOF
13535 #define MOZ_MEMORY_SIZEOF_PTR_2POW 3
13536 EOF
13537
13538       ;;
13539     *)
13540       { echo "configure: error: Unexpected pointer size" 1>&2; exit 1; }
13541       ;;
13542     esac
13543   fi
13544
13545   cat >> confdefs.h <<\EOF
13546 #define MOZ_MEMORY 1
13547 EOF
13548
13549   if test "x$MOZ_DEBUG" = "x1"; then
13550     cat >> confdefs.h <<\EOF
13551 #define MOZ_MEMORY_DEBUG 1
13552 EOF
13553
13554   fi
13555         case "${target}" in
13556   *-darwin*)
13557     cat >> confdefs.h <<\EOF
13558 #define MOZ_MEMORY_DARWIN 1
13559 EOF
13560
13561     ;;
13562   *-*freebsd*)
13563     cat >> confdefs.h <<\EOF
13564 #define MOZ_MEMORY_BSD 1
13565 EOF
13566
13567     ;;
13568   *-*linux*)
13569     cat >> confdefs.h <<\EOF
13570 #define MOZ_MEMORY_LINUX 1
13571 EOF
13572
13573     ;;
13574   *-netbsd*)
13575     cat >> confdefs.h <<\EOF
13576 #define MOZ_MEMORY_BSD 1
13577 EOF
13578
13579     ;;
13580   *-solaris*)
13581     cat >> confdefs.h <<\EOF
13582 #define MOZ_MEMORY_SOLARIS 1
13583 EOF
13584
13585     ;;
13586   *-msvc*|*-mks*|*-cygwin*|*-mingw*)
13587     cat >> confdefs.h <<\EOF
13588 #define MOZ_MEMORY_WINDOWS 1
13589 EOF
13590
13591     # the interesting bits will get passed down in MOZ_MEMORY_LDFLAGS
13592     ;;
13593   *-*wince)
13594     cat >> confdefs.h <<\EOF
13595 #define MOZ_MEMORY_WINCE 1
13596 EOF
13597
13598     cat >> confdefs.h <<\EOF
13599 #define MOZ_MEMORY_WINDOWS 1
13600 EOF
13601
13602     if test -z "$WINCE_WINDOWS_MOBILE"; then
13603       cat >> confdefs.h <<\EOF
13604 #define MOZ_MEMORY_WINCE6 1
13605 EOF
13606
13607     fi
13608     ;;
13609   *-*winmo)
13610     cat >> confdefs.h <<\EOF
13611 #define MOZ_MEMORY_WINCE 1
13612 EOF
13613
13614     cat >> confdefs.h <<\EOF
13615 #define MOZ_MEMORY_WINDOWS 1
13616 EOF
13617
13618     ;;
13619   *-android*)
13620     cat >> confdefs.h <<\EOF
13621 #define MOZ_MEMORY_LINUX 1
13622 EOF
13623
13624     cat >> confdefs.h <<\EOF
13625 #define MOZ_MEMORY_ANDROID 1
13626 EOF
13627
13628     ;;
13629   *)
13630     { echo "configure: error: --enable-jemalloc not supported on ${target}" 1>&2; exit 1; }
13631     ;;
13632   esac
13633
13634   if test "$OS_ARCH" != "Darwin"; then
13635         cat >> confdefs.h <<\EOF
13636 #define HAVE_JEMALLOC_VALLOC 1
13637 EOF
13638
13639     cat >> confdefs.h <<\EOF
13640 #define HAVE_JEMALLOC_POSIX_MEMALIGN 1
13641 EOF
13642
13643     cat >> confdefs.h <<\EOF
13644 #define HAVE_JEMALLOC_MEMALIGN 1
13645 EOF
13646
13647   fi
13648 fi
13649
13650
13651
13652 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
13653 if test "${enable_wrap_malloc+set}" = set; then
13654   enableval="$enable_wrap_malloc"
13655   if test "$enableval" = "yes"; then
13656     _WRAP_MALLOC=1
13657   elif test "$enableval" = "no"; then
13658     _WRAP_MALLOC= 
13659   else
13660     { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
13661   fi
13662 fi
13663
13664
13665 if test -n "$_WRAP_MALLOC"; then
13666     if test "$GNU_CC"; then
13667     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"
13668     MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB) -o $@'
13669     fi
13670 fi
13671
13672 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
13673 if test "${with_wrap_malloc+set}" = set; then
13674   withval="$with_wrap_malloc"
13675   WRAP_MALLOC_LIB=$withval
13676 fi
13677
13678
13679 # Check whether --enable-trace-jscalls or --disable-trace-jscalls was given.
13680 if test "${enable_trace_jscalls+set}" = set; then
13681   enableval="$enable_trace_jscalls"
13682   if test "$enableval" = "yes"; then
13683     MOZ_TRACE_JSCALLS=1
13684   elif test "$enableval" = "no"; then
13685     MOZ_TRACE_JSCALLS= 
13686   else
13687     { echo "configure: error: Option, trace-jscalls, does not take an argument ($enableval)." 1>&2; exit 1; }
13688   fi
13689 fi
13690
13691 if test -n "$MOZ_TRACE_JSCALLS"; then
13692     cat >> confdefs.h <<\EOF
13693 #define MOZ_TRACE_JSCALLS 1
13694 EOF
13695
13696 fi
13697
13698 # Check whether --enable-tracevis or --disable-tracevis was given.
13699 if test "${enable_tracevis+set}" = set; then
13700   enableval="$enable_tracevis"
13701   if test "$enableval" = "yes"; then
13702     MOZ_TRACEVIS=1
13703   elif test "$enableval" = "no"; then
13704     MOZ_TRACEVIS= 
13705   else
13706     { echo "configure: error: Option, tracevis, does not take an argument ($enableval)." 1>&2; exit 1; }
13707   fi
13708 fi
13709
13710 if test -n "$MOZ_TRACEVIS"; then
13711     cat >> confdefs.h <<\EOF
13712 #define MOZ_TRACEVIS 1
13713 EOF
13714
13715     if test -z "$ENABLE_TRACEJIT"; then
13716        { echo "configure: error: --enable-tracevis is incompatible with --disable-tracejit" 1>&2; exit 1; }
13717     fi
13718 fi
13719
13720 # Check whether --enable-gctimer or --disable-gctimer was given.
13721 if test "${enable_gctimer+set}" = set; then
13722   enableval="$enable_gctimer"
13723   if test "$enableval" = "yes"; then
13724     MOZ_GCTIMER=1
13725   elif test "$enableval" = "no"; then
13726     MOZ_GCTIMER= 
13727   else
13728     { echo "configure: error: Option, gctimer, does not take an argument ($enableval)." 1>&2; exit 1; }
13729   fi
13730 fi
13731
13732 if test -n "$MOZ_GCTIMER"; then
13733     cat >> confdefs.h <<\EOF
13734 #define MOZ_GCTIMER 1
13735 EOF
13736
13737 fi
13738
13739 # Check whether --enable-valgrind or --disable-valgrind was given.
13740 if test "${enable_valgrind+set}" = set; then
13741   enableval="$enable_valgrind"
13742   if test "$enableval" = "yes"; then
13743     MOZ_VALGRIND=1
13744   elif test "$enableval" = "no"; then
13745     MOZ_VALGRIND= 
13746   else
13747     { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
13748   fi
13749 fi
13750
13751 if test -n "$MOZ_VALGRIND"; then
13752     ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'`
13753 echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6
13754 echo "configure:13851: checking for valgrind/valgrind.h" >&5
13755 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13756   echo $ac_n "(cached) $ac_c" 1>&6
13757 else
13758   cat > conftest.$ac_ext <<EOF
13759 #line 13856 "configure"
13760 #include "confdefs.h"
13761 #include <valgrind/valgrind.h>
13762 EOF
13763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13764 { (eval echo configure:13861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13766 if test -z "$ac_err"; then
13767   rm -rf conftest*
13768   eval "ac_cv_header_$ac_safe=yes"
13769 else
13770   echo "$ac_err" >&5
13771   echo "configure: failed program was:" >&5
13772   cat conftest.$ac_ext >&5
13773   rm -rf conftest*
13774   eval "ac_cv_header_$ac_safe=no"
13775 fi
13776 rm -f conftest*
13777 fi
13778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13779   echo "$ac_t""yes" 1>&6
13780   :
13781 else
13782   echo "$ac_t""no" 1>&6
13783 { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; exit 1; }
13784 fi
13785
13786     cat >> confdefs.h <<\EOF
13787 #define MOZ_VALGRIND 1
13788 EOF
13789
13790 fi
13791
13792 # Check whether --enable-jprof or --disable-jprof was given.
13793 if test "${enable_jprof+set}" = set; then
13794   enableval="$enable_jprof"
13795   if test "$enableval" = "yes"; then
13796     MOZ_JPROF=1
13797   elif test "$enableval" = "no"; then
13798     MOZ_JPROF= 
13799   else
13800     { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; }
13801   fi
13802 fi
13803
13804 if test -n "$MOZ_JPROF"; then
13805     MOZ_PROFILING=1
13806     cat >> confdefs.h <<\EOF
13807 #define MOZ_JPROF 1
13808 EOF
13809
13810 fi
13811
13812 # Check whether --enable-shark or --disable-shark was given.
13813 if test "${enable_shark+set}" = set; then
13814   enableval="$enable_shark"
13815   if test "$enableval" = "yes"; then
13816     MOZ_SHARK=1
13817   elif test "$enableval" = "no"; then
13818     MOZ_SHARK= 
13819   else
13820     { echo "configure: error: Option, shark, does not take an argument ($enableval)." 1>&2; exit 1; }
13821   fi
13822 fi
13823
13824 if test -n "$MOZ_SHARK"; then
13825     MOZ_PROFILING=1
13826     cat >> confdefs.h <<\EOF
13827 #define MOZ_SHARK 1
13828 EOF
13829
13830 fi
13831
13832 # Check whether --enable-callgrind or --disable-callgrind was given.
13833 if test "${enable_callgrind+set}" = set; then
13834   enableval="$enable_callgrind"
13835   if test "$enableval" = "yes"; then
13836     MOZ_CALLGRIND=1
13837   elif test "$enableval" = "no"; then
13838     MOZ_CALLGRIND= 
13839   else
13840     { echo "configure: error: Option, callgrind, does not take an argument ($enableval)." 1>&2; exit 1; }
13841   fi
13842 fi
13843
13844 if test -n "$MOZ_CALLGRIND"; then
13845     cat >> confdefs.h <<\EOF
13846 #define MOZ_CALLGRIND 1
13847 EOF
13848
13849 fi
13850
13851 # Check whether --enable-vtune or --disable-vtune was given.
13852 if test "${enable_vtune+set}" = set; then
13853   enableval="$enable_vtune"
13854   if test "$enableval" = "yes"; then
13855     MOZ_VTUNE=1
13856   elif test "$enableval" = "no"; then
13857     MOZ_VTUNE= 
13858   else
13859     { echo "configure: error: Option, vtune, does not take an argument ($enableval)." 1>&2; exit 1; }
13860   fi
13861 fi
13862
13863 if test -n "$MOZ_VTUNE"; then
13864     MOZ_PROFILING=1
13865     cat >> confdefs.h <<\EOF
13866 #define MOZ_VTUNE 1
13867 EOF
13868
13869 fi
13870
13871 if test -n "$MOZ_PROFILING"; then
13872     cat >> confdefs.h <<\EOF
13873 #define MOZ_PROFILING 1
13874 EOF
13875
13876 fi
13877
13878 # Check whether --enable-gczeal or --disable-gczeal was given.
13879 if test "${enable_gczeal+set}" = set; then
13880   enableval="$enable_gczeal"
13881   if test "$enableval" = "yes"; then
13882     JS_GC_ZEAL=1
13883   elif test "$enableval" = "no"; then
13884     JS_GC_ZEAL= 
13885   else
13886     { echo "configure: error: Option, gczeal, does not take an argument ($enableval)." 1>&2; exit 1; }
13887   fi
13888 fi
13889
13890 if test -n "$JS_GC_ZEAL"; then
13891     cat >> confdefs.h <<\EOF
13892 #define JS_GC_ZEAL 1
13893 EOF
13894
13895 fi
13896
13897 # Check whether --with-ccache or --without-ccache was given.
13898 if test "${with_ccache+set}" = set; then
13899   withval="$with_ccache"
13900   CCACHE=$withval
13901 else
13902   CCACHE="no"
13903 fi
13904
13905
13906 if test "$CCACHE" != "no"; then
13907     if test -z "$CCACHE" -o "$CCACHE" = "yes"; then
13908         CCACHE=
13909     else
13910         if test ! -e "$CCACHE"; then
13911             { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
13912         fi
13913     fi
13914       for ac_prog in $CCACHE ccache
13915 do
13916 # Extract the first word of "$ac_prog", so it can be a program name with args.
13917 set dummy $ac_prog; ac_word=$2
13918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13919 echo "configure:14016: checking for $ac_word" >&5
13920 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
13921   echo $ac_n "(cached) $ac_c" 1>&6
13922 else
13923   case "$CCACHE" in
13924   /*)
13925   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
13926   ;;
13927   ?:/*)                  
13928   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
13929   ;;
13930   *)
13931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13932   ac_dummy="$PATH"
13933   for ac_dir in $ac_dummy; do 
13934     test -z "$ac_dir" && ac_dir=.
13935     if test -f $ac_dir/$ac_word; then
13936       ac_cv_path_CCACHE="$ac_dir/$ac_word"
13937       break
13938     fi
13939   done
13940   IFS="$ac_save_ifs"
13941   ;;
13942 esac
13943 fi
13944 CCACHE="$ac_cv_path_CCACHE"
13945 if test -n "$CCACHE"; then
13946   echo "$ac_t""$CCACHE" 1>&6
13947 else
13948   echo "$ac_t""no" 1>&6
13949 fi
13950
13951 test -n "$CCACHE" && break
13952 done
13953
13954   if test "$msyshost"; then
13955     case "$CCACHE" in
13956     /*)
13957       tmp_DIRNAME=`dirname "$CCACHE"`
13958       tmp_BASENAME=`basename "$CCACHE"`
13959       tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
13960       CCACHE="$tmp_PWD/$tmp_BASENAME"
13961       if test -e "$CCACHE.exe"; then
13962         CCACHE="$CCACHE.exe"
13963       fi
13964     esac
13965   fi
13966
13967     if test -z "$CCACHE" -o "$CCACHE" = ":"; then
13968         { echo "configure: error: ccache not found" 1>&2; exit 1; }
13969     elif test -x "$CCACHE"; then
13970         CC="$CCACHE $CC"
13971         CXX="$CCACHE $CXX"
13972     else
13973         { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
13974     fi
13975 fi
13976
13977
13978 # Check whether --with-static-checking or --without-static-checking was given.
13979 if test "${with_static_checking+set}" = set; then
13980   withval="$with_static_checking"
13981   DEHYDRA_PATH=$withval
13982 else
13983   DEHYDRA_PATH= 
13984 fi
13985
13986
13987 if test -n "$DEHYDRA_PATH"; then
13988     if test ! -f "$DEHYDRA_PATH"; then
13989         { echo "configure: error: The dehydra plugin is not at the specified path." 1>&2; exit 1; }
13990     fi
13991     cat >> confdefs.h <<\EOF
13992 #define NS_STATIC_CHECKING 1
13993 EOF
13994
13995 fi
13996
13997
13998 # Check whether --enable-strip or --disable-strip was given.
13999 if test "${enable_strip+set}" = set; then
14000   enableval="$enable_strip"
14001   if test "$enableval" = "yes"; then
14002     ENABLE_STRIP=1
14003   elif test "$enableval" = "no"; then
14004     ENABLE_STRIP= 
14005   else
14006     { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; exit 1; }
14007   fi
14008 fi
14009
14010
14011 # Check whether --enable-install-strip or --disable-install-strip was given.
14012 if test "${enable_install_strip+set}" = set; then
14013   enableval="$enable_install_strip"
14014   if test "$enableval" = "yes"; then
14015     PKG_SKIP_STRIP= 
14016   elif test "$enableval" = "no"; then
14017     PKG_SKIP_STRIP=1
14018   else
14019     { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; exit 1; }
14020   fi
14021 fi
14022
14023
14024 # Profiling and Instrumenting
14025
14026 # Check whether --enable-timeline or --disable-timeline was given.
14027 if test "${enable_timeline+set}" = set; then
14028   enableval="$enable_timeline"
14029   if test "$enableval" = "yes"; then
14030     MOZ_TIMELINE=1
14031   elif test "$enableval" = "no"; then
14032     MOZ_TIMELINE= 
14033   else
14034     { echo "configure: error: Option, timeline, does not take an argument ($enableval)." 1>&2; exit 1; }
14035   fi
14036 fi
14037
14038 if test -n "$MOZ_TIMELINE"; then
14039     cat >> confdefs.h <<\EOF
14040 #define MOZ_TIMELINE 1
14041 EOF
14042
14043 fi
14044
14045 # Check whether --enable-quantify or --disable-quantify was given.
14046 if test "${enable_quantify+set}" = set; then
14047   enableval="$enable_quantify"
14048   if test "$enableval" = "yes"; then
14049     MOZ_QUANTIFY=1
14050   elif test "$enableval" = "no"; then
14051     MOZ_QUANTIFY= 
14052   else
14053     { echo "configure: error: Option, quantify, does not take an argument ($enableval)." 1>&2; exit 1; }
14054   fi
14055 fi
14056
14057
14058 if test -z "$SKIP_LIBRARY_CHECKS"; then
14059     
14060     ac_ext=C
14061 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14062 ac_cpp='$CXXCPP $CPPFLAGS'
14063 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14064 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14065 cross_compiling=$ac_cv_prog_cxx_cross
14066
14067     for ac_func in __cxa_demangle
14068 do
14069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14070 echo "configure:14167: checking for $ac_func" >&5
14071 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14072   echo $ac_n "(cached) $ac_c" 1>&6
14073 else
14074   cat > conftest.$ac_ext <<EOF
14075 #line 14172 "configure"
14076 #include "confdefs.h"
14077 /* System header to define __stub macros and hopefully few prototypes,
14078     which can conflict with char $ac_func(); below.  */
14079 #include <assert.h>
14080 /* Override any gcc2 internal prototype to avoid an error.  */
14081 #ifdef __cplusplus
14082 extern "C"
14083 #endif
14084 /* We use char because int might match the return type of a gcc2
14085     builtin and then its argument prototype would still apply.  */
14086 char $ac_func();
14087
14088 int main() {
14089
14090 /* The GNU C library defines this for functions which it implements
14091     to always fail with ENOSYS.  Some functions are actually named
14092     something starting with __ and the normal name is an alias.  */
14093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14094 choke me
14095 #else
14096 $ac_func();
14097 #endif
14098
14099 ; return 0; }
14100 EOF
14101 if { (eval echo configure:14198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14102   rm -rf conftest*
14103   eval "ac_cv_func_$ac_func=yes"
14104 else
14105   echo "configure: failed program was:" >&5
14106   cat conftest.$ac_ext >&5
14107   rm -rf conftest*
14108   eval "ac_cv_func_$ac_func=no"
14109 fi
14110 rm -f conftest*
14111 fi
14112
14113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14114   echo "$ac_t""yes" 1>&6
14115     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14116   cat >> confdefs.h <<EOF
14117 #define $ac_tr_func 1
14118 EOF
14119  HAVE_DEMANGLE=1
14120 else
14121   echo "$ac_t""no" 1>&6
14122 HAVE_DEMANGLE=
14123 fi
14124 done
14125
14126     ac_ext=c
14127 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14128 ac_cpp='$CPP $CPPFLAGS'
14129 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14130 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14131 cross_compiling=$ac_cv_prog_cc_cross
14132
14133 fi
14134
14135 # Demangle only for debug or trace-malloc builds
14136 MOZ_DEMANGLE_SYMBOLS=
14137 if test "$HAVE_DEMANGLE" -a "$HAVE_GCC3_ABI" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
14138     MOZ_DEMANGLE_SYMBOLS=1
14139     cat >> confdefs.h <<\EOF
14140 #define MOZ_DEMANGLE_SYMBOLS 1
14141 EOF
14142
14143 fi
14144
14145
14146 if test "$HAVE_GCC3_ABI" -a -z "$SKIP_LIBRARY_CHECKS"; then
14147     ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'`
14148 echo $ac_n "checking for unwind.h""... $ac_c" 1>&6
14149 echo "configure:14246: checking for unwind.h" >&5
14150 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
14151   echo $ac_n "(cached) $ac_c" 1>&6
14152 else
14153   cat > conftest.$ac_ext <<EOF
14154 #line 14251 "configure"
14155 #include "confdefs.h"
14156 #include <unwind.h>
14157 EOF
14158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14159 { (eval echo configure:14256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14161 if test -z "$ac_err"; then
14162   rm -rf conftest*
14163   eval "ac_cv_header_$ac_safe=yes"
14164 else
14165   echo "$ac_err" >&5
14166   echo "configure: failed program was:" >&5
14167   cat conftest.$ac_ext >&5
14168   rm -rf conftest*
14169   eval "ac_cv_header_$ac_safe=no"
14170 fi
14171 rm -f conftest*
14172 fi
14173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14174   echo "$ac_t""yes" 1>&6
14175   for ac_func in _Unwind_Backtrace
14176 do
14177 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14178 echo "configure:14275: checking for $ac_func" >&5
14179 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14180   echo $ac_n "(cached) $ac_c" 1>&6
14181 else
14182   cat > conftest.$ac_ext <<EOF
14183 #line 14280 "configure"
14184 #include "confdefs.h"
14185 /* System header to define __stub macros and hopefully few prototypes,
14186     which can conflict with char $ac_func(); below.  */
14187 #include <assert.h>
14188 /* Override any gcc2 internal prototype to avoid an error.  */
14189 /* We use char because int might match the return type of a gcc2
14190     builtin and then its argument prototype would still apply.  */
14191 char $ac_func();
14192
14193 int main() {
14194
14195 /* The GNU C library defines this for functions which it implements
14196     to always fail with ENOSYS.  Some functions are actually named
14197     something starting with __ and the normal name is an alias.  */
14198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14199 choke me
14200 #else
14201 $ac_func();
14202 #endif
14203
14204 ; return 0; }
14205 EOF
14206 if { (eval echo configure:14303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14207   rm -rf conftest*
14208   eval "ac_cv_func_$ac_func=yes"
14209 else
14210   echo "configure: failed program was:" >&5
14211   cat conftest.$ac_ext >&5
14212   rm -rf conftest*
14213   eval "ac_cv_func_$ac_func=no"
14214 fi
14215 rm -f conftest*
14216 fi
14217
14218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14219   echo "$ac_t""yes" 1>&6
14220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14221   cat >> confdefs.h <<EOF
14222 #define $ac_tr_func 1
14223 EOF
14224  
14225 else
14226   echo "$ac_t""no" 1>&6
14227 fi
14228 done
14229
14230 else
14231   echo "$ac_t""no" 1>&6
14232 fi
14233
14234 fi
14235
14236 # Misc. Options
14237
14238 # Check whether --enable-xterm-updates or --disable-xterm-updates was given.
14239 if test "${enable_xterm_updates+set}" = set; then
14240   enableval="$enable_xterm_updates"
14241   if test "$enableval" = "yes"; then
14242     MOZ_UPDATE_XTERM=1
14243   elif test "$enableval" = "no"; then
14244     MOZ_UPDATE_XTERM= 
14245   else
14246     { echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; }
14247   fi
14248 fi
14249
14250
14251 if test -z "$SKIP_COMPILER_CHECKS"; then
14252 # Compiler Options
14253
14254 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
14255 echo "configure:14352: checking for gcc -pipe support" >&5
14256 if test -n "$GNU_CC" -a -n "$GNU_CXX" -a -n "$GNU_AS"; then
14257     echo '#include <stdio.h>' > dummy-hello.c
14258     echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
14259     ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
14260     cat dummy-hello.s 2> /dev/null | ${AS_BIN} -o dummy-hello.S - 2>&5
14261     if test $? = 0; then
14262         _res_as_stdin="yes"
14263     else
14264         _res_as_stdin="no"
14265     fi
14266     if test "$_res_as_stdin" = "yes"; then
14267         _SAVE_CFLAGS=$CFLAGS
14268         CFLAGS="$CFLAGS -pipe"
14269         cat > conftest.$ac_ext <<EOF
14270 #line 14367 "configure"
14271 #include "confdefs.h"
14272  #include <stdio.h> 
14273 int main() {
14274 printf("Hello World\n");
14275 ; return 0; }
14276 EOF
14277 if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14278   rm -rf conftest*
14279   _res_gcc_pipe="yes"
14280 else
14281   echo "configure: failed program was:" >&5
14282   cat conftest.$ac_ext >&5
14283   rm -rf conftest*
14284   _res_gcc_pipe="no" 
14285 fi
14286 rm -f conftest*
14287         CFLAGS=$_SAVE_CFLAGS
14288     fi
14289     if test "$_res_as_stdin" = "yes" -a "$_res_gcc_pipe" = "yes"; then
14290         _res="yes";
14291         CFLAGS="$CFLAGS -pipe"
14292         CXXFLAGS="$CXXFLAGS -pipe"
14293     else
14294         _res="no"
14295     fi
14296     rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
14297     echo "$ac_t""$_res" 1>&6
14298 else
14299     echo "$ac_t""no" 1>&6
14300 fi
14301
14302
14303 # Check whether --enable-profile-guided-optimization or --disable-profile-guided-optimization was given.
14304 if test "${enable_profile_guided_optimization+set}" = set; then
14305   enableval="$enable_profile_guided_optimization"
14306   if test "$enableval" = "no"; then
14307     MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE=1
14308   elif test "$enableval" = "yes"; then
14309     MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE=
14310   else
14311     { echo "configure: error: Option, profile-guided-optimization, does not take an argument ($enableval)." 1>&2; exit 1; }
14312   fi
14313 fi
14314
14315
14316
14317
14318 _SAVE_CFLAGS="$CFLAGS"
14319 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
14320
14321 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
14322 echo "configure:14419: checking whether C compiler supports -fprofile-generate" >&5
14323 cat > conftest.$ac_ext <<EOF
14324 #line 14421 "configure"
14325 #include "confdefs.h"
14326
14327 int main() {
14328 return 0;
14329 ; return 0; }
14330 EOF
14331 if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14332   rm -rf conftest*
14333    PROFILE_GEN_CFLAGS="-fprofile-generate"
14334                  result="yes" 
14335 else
14336   echo "configure: failed program was:" >&5
14337   cat conftest.$ac_ext >&5
14338   rm -rf conftest*
14339   result="no"
14340 fi
14341 rm -f conftest*
14342 echo "$ac_t""$result" 1>&6
14343
14344 if test $result = "yes"; then
14345   PROFILE_GEN_LDFLAGS="-fprofile-generate"
14346   PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition"
14347   PROFILE_USE_LDFLAGS="-fprofile-use"
14348 fi
14349
14350 CFLAGS="$_SAVE_CFLAGS"
14351
14352 if test -n "$INTEL_CC"; then
14353   PROFILE_GEN_CFLAGS="-prof-gen -prof-dir ."
14354   PROFILE_GEN_LDFLAGS=
14355   PROFILE_USE_CFLAGS="-prof-use -prof-dir ."
14356   PROFILE_USE_LDFLAGS=
14357 fi
14358
14359 if test "$SOLARIS_SUNPRO_CC"; then
14360   PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
14361   PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
14362   PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
14363   PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
14364 fi
14365
14366
14367
14368
14369
14370
14371 ac_ext=C
14372 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14373 ac_cpp='$CXXCPP $CPPFLAGS'
14374 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14375 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14376 cross_compiling=$ac_cv_prog_cxx_cross
14377
14378
14379 # Check whether --enable-pedantic or --disable-pedantic was given.
14380 if test "${enable_pedantic+set}" = set; then
14381   enableval="$enable_pedantic"
14382   if test "$enableval" = "no"; then
14383     _PEDANTIC= 
14384   elif test "$enableval" = "yes"; then
14385     :
14386   else
14387     { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; }
14388   fi
14389 fi
14390
14391 if test "$_PEDANTIC"; then
14392     _SAVE_CXXFLAGS=$CXXFLAGS
14393     CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
14394     echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6
14395 echo "configure:14492: checking whether C++ compiler has -pedantic long long bug" >&5
14396     cat > conftest.$ac_ext <<EOF
14397 #line 14494 "configure"
14398 #include "confdefs.h"
14399 $configure_static_assert_macros
14400 int main() {
14401 CONFIGURE_STATIC_ASSERT(sizeof(long long) == 8)
14402 ; return 0; }
14403 EOF
14404 if { (eval echo configure:14501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14405   rm -rf conftest*
14406   result="no"
14407 else
14408   echo "configure: failed program was:" >&5
14409   cat conftest.$ac_ext >&5
14410   rm -rf conftest*
14411   result="yes" 
14412 fi
14413 rm -f conftest*
14414     echo "$ac_t""$result" 1>&6
14415     CXXFLAGS="$_SAVE_CXXFLAGS"
14416
14417     case "$result" in
14418     no)
14419         _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
14420         _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
14421         ;;
14422     yes)
14423         { 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; }
14424         ;;
14425     esac
14426 fi
14427
14428 echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6
14429 echo "configure:14526: checking for correct temporary object destruction order" >&5
14430 if test "$cross_compiling" = yes; then
14431   result="maybe"
14432 else
14433   cat > conftest.$ac_ext <<EOF
14434 #line 14531 "configure"
14435 #include "confdefs.h"
14436 #ifdef __cplusplus
14437 extern "C" void exit(int);
14438 #endif
14439  class A {
14440              public:  A(int& x) : mValue(x) {}
14441                       ~A() { mValue--; }
14442                       operator char**() { return 0; }
14443              private:  int& mValue;
14444              };
14445              void func(char **arg) {}
14446              int m=2;
14447              void test() {
14448                   func(A(m));
14449                   if (m==1) m = 0;
14450              }
14451              int main() {
14452                  test();
14453                  return(m);
14454              }
14455              
14456 EOF
14457 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14458 then
14459   result="yes"
14460 else
14461   echo "configure: failed program was:" >&5
14462   cat conftest.$ac_ext >&5
14463   rm -fr conftest*
14464   result="no"
14465 fi
14466 rm -fr conftest*
14467 fi
14468
14469 echo "$ac_t""$result" 1>&6
14470
14471 if test "$result" = "no"; then
14472     { echo "configure: error: Your compiler does not follow the C++ specification for temporary object destruction order." 1>&2; exit 1; }
14473 fi
14474
14475 _SAVE_CXXFLAGS=$CXXFLAGS
14476 CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}"
14477 echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6
14478 echo "configure:14575: checking for correct overload resolution with const and templates" >&5
14479 if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then
14480   echo $ac_n "(cached) $ac_c" 1>&6
14481 else
14482   cat > conftest.$ac_ext <<EOF
14483 #line 14580 "configure"
14484 #include "confdefs.h"
14485
14486                       template <class T>
14487                       class Pointer
14488                         {
14489                         public:
14490                           T* myPtr;
14491                         };
14492                       
14493                       template <class T, class U>
14494                       int operator==(const Pointer<T>& rhs, U* lhs)
14495                         {
14496                           return rhs.myPtr == lhs;
14497                         }
14498                       
14499                       template <class T, class U>
14500                       int operator==(const Pointer<T>& rhs, const U* lhs)
14501                         {
14502                           return rhs.myPtr == lhs;
14503                         }
14504                     
14505 int main() {
14506
14507                       Pointer<int> foo;
14508                       const int* bar;
14509                       return foo == bar;
14510                     
14511 ; return 0; }
14512 EOF
14513 if { (eval echo configure:14610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14514   rm -rf conftest*
14515   ac_nscap_nonconst_opeq_bug="no"
14516 else
14517   echo "configure: failed program was:" >&5
14518   cat conftest.$ac_ext >&5
14519   rm -rf conftest*
14520   ac_nscap_nonconst_opeq_bug="yes"
14521 fi
14522 rm -f conftest*
14523 fi
14524
14525 echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
14526 CXXFLAGS="$_SAVE_CXXFLAGS"
14527
14528 if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then
14529     cat >> confdefs.h <<\EOF
14530 #define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1
14531 EOF
14532
14533 fi
14534
14535 echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6
14536 echo "configure:14633: checking for tm_zone tm_gmtoff in struct tm" >&5
14537 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then
14538   echo $ac_n "(cached) $ac_c" 1>&6
14539 else
14540   cat > conftest.$ac_ext <<EOF
14541 #line 14638 "configure"
14542 #include "confdefs.h"
14543 #include <time.h>
14544 int main() {
14545 struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1;
14546 ; return 0; }
14547 EOF
14548 if { (eval echo configure:14645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14549   rm -rf conftest*
14550   ac_cv_struct_tm_zone_tm_gmtoff="yes"
14551 else
14552   echo "configure: failed program was:" >&5
14553   cat conftest.$ac_ext >&5
14554   rm -rf conftest*
14555   ac_cv_struct_tm_zone_tm_gmtoff="no"
14556 fi
14557 rm -f conftest*
14558 fi
14559
14560 echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6
14561 if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then
14562     cat >> confdefs.h <<\EOF
14563 #define HAVE_TM_ZONE_TM_GMTOFF 1
14564 EOF
14565
14566 fi
14567
14568 fi # SKIP_COMPILER_CHECKS
14569
14570 # Check whether --enable-cpp-rtti or --disable-cpp-rtti was given.
14571 if test "${enable_cpp_rtti+set}" = set; then
14572   enableval="$enable_cpp_rtti"
14573   if test "$enableval" = "yes"; then
14574      _MOZ_USE_RTTI=1 
14575   elif test "$enableval" = "no"; then
14576      _MOZ_USE_RTTI= 
14577   else
14578     { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; }
14579   fi
14580 fi
14581
14582
14583 if test "$_MOZ_USE_RTTI"; then
14584    _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_ON
14585 else
14586    _MOZ_RTTI_FLAGS=$_MOZ_RTTI_FLAGS_OFF
14587 fi
14588
14589
14590
14591 # Check whether --enable-cpp-exceptions or --disable-cpp-exceptions was given.
14592 if test "${enable_cpp_exceptions+set}" = set; then
14593   enableval="$enable_cpp_exceptions"
14594   if test "$enableval" = "yes"; then
14595      _MOZ_CPP_EXCEPTIONS=1 
14596   elif test "$enableval" = "no"; then
14597      _MOZ_CPP_EXCEPTIONS= 
14598   else
14599     { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; }
14600   fi
14601 fi
14602
14603
14604 if test "$_MOZ_CPP_EXCEPTIONS"; then
14605     _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_ON
14606     cat >> confdefs.h <<\EOF
14607 #define MOZ_CPP_EXCEPTIONS 1
14608 EOF
14609
14610 else
14611     _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF
14612 fi
14613
14614
14615
14616 # Irix & OSF native compilers do not like exception declarations 
14617 # when exceptions are disabled
14618 if test -n "$MIPSPRO_CXX" -o -n "$COMPAQ_CXX" -o -n "$VACPP"; then
14619     cat >> confdefs.h <<\EOF
14620 #define CPP_THROW_NEW 
14621 EOF
14622
14623 else
14624     cat >> confdefs.h <<\EOF
14625 #define CPP_THROW_NEW throw()
14626 EOF
14627
14628 fi
14629 ac_ext=c
14630 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
14631 ac_cpp='$CPP $CPPFLAGS'
14632 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
14633 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
14634 cross_compiling=$ac_cv_prog_cc_cross
14635
14636
14637 # Build dependencies
14638
14639 MOZ_AUTO_DEPS=1
14640 # Check whether --enable-auto-deps or --disable-auto-deps was given.
14641 if test "${enable_auto_deps+set}" = set; then
14642   enableval="$enable_auto_deps"
14643   if test "$enableval" = "no"; then
14644     MOZ_AUTO_DEPS=
14645   elif test "$enableval" = "yes"; then
14646     MOZ_AUTO_DEPS=1
14647   else
14648     { echo "configure: error: Option, auto-deps, does not take an argument ($enableval)." 1>&2; exit 1; }
14649   fi
14650 fi
14651
14652
14653 if test -n "$MOZ_AUTO_DEPS"; then
14654 _cpp_md_flag=
14655 # Check whether --enable-md or --disable-md was given.
14656 if test "${enable_md+set}" = set; then
14657   enableval="$enable_md"
14658   if test "$enableval" = "no"; then
14659     _cpp_md_flag=
14660   elif test "$enableval" = "yes"; then
14661     _cpp_md_flag=1
14662   else
14663     { echo "configure: error: Option, md, does not take an argument ($enableval)." 1>&2; exit 1; }
14664   fi
14665 else
14666      if test "$GNU_CC" -a "$GNU_CXX" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "WINCE"; then
14667      _cpp_md_flag=1
14668    fi
14669      if test "$SOLARIS_SUNPRO_CC"; then
14670      _cpp_md_flag=1
14671    fi
14672 fi
14673
14674 if test "$_cpp_md_flag"; then
14675   COMPILER_DEPEND=1
14676   if test "$OS_ARCH" = "OpenVMS"; then
14677     _DEPEND_CFLAGS='$(subst =, ,$(filter-out %/.pp,-MM=-MD=-MF=$(MDDEPDIR)/$(basename $(@F)).pp))'
14678   else
14679     _DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(basename $(@F)).pp)'
14680   fi
14681     if test "$SOLARIS_SUNPRO_CC"; then
14682     _DEPEND_CFLAGS=
14683   fi
14684 else
14685   COMPILER_DEPEND=
14686     if test -z "$_WIN32_MSVC"; then
14687     _USE_CPP_INCLUDE_FLAG=
14688     _DEFINES_CFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
14689     _DEFINES_CXXFLAGS='$(ACDEFINES) -D_JS_CONFDEFS_H_ -DMOZILLA_CLIENT'
14690   else
14691     echo '#include <stdio.h>' > dummy-hello.c
14692     
14693     CL_INCLUDES_PREFIX=`"${CC}" -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/^\([^:]*:[^:]*:\).*stdio.h$/\1/p'`
14694     
14695     if test -z "$CL_INCLUDES_PREFIX"; then
14696         { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; exit 1; }
14697     fi
14698     
14699     rm -f dummy-hello.c
14700     _topsrcdirwin=`cd \`dirname $0\`; pwd -W`
14701         CC_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
14702     CXX_WRAPPER="$PYTHON -O $_topsrcdirwin/build/cl.py"
14703     COMPILER_DEPEND=1
14704   fi
14705 fi
14706 fi # MOZ_AUTO_DEPS
14707 MDDEPDIR='.deps'
14708
14709
14710
14711
14712
14713
14714
14715 # Static build options
14716
14717 # Check whether --enable-static or --disable-static was given.
14718 if test "${enable_static+set}" = set; then
14719   enableval="$enable_static"
14720   if test "$enableval" = "yes"; then
14721     BUILD_STATIC_LIBS=1
14722   elif test "$enableval" = "no"; then
14723     BUILD_STATIC_LIBS=
14724   else
14725     { echo "configure: error: Option, static, does not take an argument ($enableval)." 1>&2; exit 1; }
14726   fi
14727 fi
14728
14729
14730 # Check whether --enable-readline or --disable-readline was given.
14731 if test "${enable_readline+set}" = set; then
14732   enableval="$enable_readline"
14733   if test "$enableval" = "yes"; then
14734     JS_WANT_READLINE=1
14735   elif test "$enableval" = "no"; then
14736     JS_WANT_READLINE= 
14737   else
14738     { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; exit 1; }
14739   fi
14740 fi
14741
14742
14743 JS_NATIVE_EDITLINE=
14744 EDITLINE_LIBS=
14745 JS_DISABLE_SHELL=
14746
14747 case "$target" in
14748 *-wince*|*-winmo*|*-mingw*|*-cygwin*|*-msvc*|*-mks*)
14749     NO_EDITLINE=1
14750     ;;
14751 *-symbian*)
14752     NO_EDITLINE=1
14753     JS_DISABLE_SHELL=1
14754     ;;
14755 *)
14756     ;;
14757 esac
14758
14759 if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then
14760   if test -n "$JS_WANT_READLINE"; then
14761     echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14762 echo "configure:14859: checking for readline in -lreadline" >&5
14763 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
14764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14765   echo $ac_n "(cached) $ac_c" 1>&6
14766 else
14767   ac_save_LIBS="$LIBS"
14768 LIBS="-lreadline  $LIBS"
14769 cat > conftest.$ac_ext <<EOF
14770 #line 14867 "configure"
14771 #include "confdefs.h"
14772 /* Override any gcc2 internal prototype to avoid an error.  */
14773 /* We use char because int might match the return type of a gcc2
14774     builtin and then its argument prototype would still apply.  */
14775 char readline();
14776
14777 int main() {
14778 readline()
14779 ; return 0; }
14780 EOF
14781 if { (eval echo configure:14878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14782   rm -rf conftest*
14783   eval "ac_cv_lib_$ac_lib_var=yes"
14784 else
14785   echo "configure: failed program was:" >&5
14786   cat conftest.$ac_ext >&5
14787   rm -rf conftest*
14788   eval "ac_cv_lib_$ac_lib_var=no"
14789 fi
14790 rm -f conftest*
14791 LIBS="$ac_save_LIBS"
14792
14793 fi
14794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14795   echo "$ac_t""yes" 1>&6
14796   EDITLINE_LIBS="-lreadline"
14797 else
14798   echo "$ac_t""no" 1>&6
14799 { echo "configure: error: No system readline library found." 1>&2; exit 1; }
14800 fi
14801
14802   else
14803         JS_NATIVE_EDITLINE=1
14804     EDITLINE_LIBS='$(DEPTH)/editline/$(LIB_PREFIX)editline.$(LIB_SUFFIX)'
14805   fi
14806
14807     cat >> confdefs.h <<\EOF
14808 #define EDITLINE 1
14809 EOF
14810
14811 fi
14812
14813
14814
14815
14816 # Standalone module options (Not for building Mozilla)
14817
14818 # Check whether --enable-ctypes or --disable-ctypes was given.
14819 if test "${enable_ctypes+set}" = set; then
14820   enableval="$enable_ctypes"
14821   if test "$enableval" = "yes"; then
14822     JS_HAS_CTYPES=1
14823   elif test "$enableval" = "no"; then
14824     JS_HAS_CTYPES= 
14825   else
14826     { echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&2; exit 1; }
14827   fi
14828 fi
14829
14830
14831 if test "$JS_HAS_CTYPES"; then
14832     if test -n "$_MSC_VER" -a \( "$AS" != "ml.exe" -a "$AS" != "ml64.exe" \); then
14833     { 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; }
14834   fi
14835   cat >> confdefs.h <<\EOF
14836 #define JS_HAS_CTYPES 1
14837 EOF
14838
14839 fi
14840
14841 if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
14842     MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
14843 fi
14844
14845 # Check whether --with-sync-build-files or --without-sync-build-files was given.
14846 if test "${with_sync_build_files+set}" = set; then
14847   withval="$with_sync_build_files"
14848   MOZ_SYNC_BUILD_FILES=$withval  
14849 fi
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932 CFLAGS=`echo \
14933         $_WARNINGS_CFLAGS \
14934         $CFLAGS`
14935
14936 CXXFLAGS=`echo \
14937         $_MOZ_RTTI_FLAGS \
14938         $_MOZ_EXCEPTIONS_FLAGS \
14939         $_WARNINGS_CXXFLAGS \
14940         $CXXFLAGS`
14941
14942 COMPILE_CFLAGS=`echo \
14943     $_DEFINES_CFLAGS \
14944         $_DEPEND_CFLAGS \
14945     $COMPILE_CFLAGS`
14946
14947 COMPILE_CXXFLAGS=`echo \
14948     $_DEFINES_CXXFLAGS \
14949         $_DEPEND_CFLAGS \
14950     $COMPILE_CXXFLAGS`
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 cat >> confdefs.h <<EOF
15007 #define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
15008 EOF
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020 if test "$USING_HCC"; then
15021    CC='${topsrcdir}/build/hcc'
15022    CC="$CC '$_OLDCC'"
15023    CXX='${topsrcdir}/build/hcpp'
15024    CXX="$CXX '$_OLDCXX'"
15025    
15026    
15027 fi
15028
15029 echo $ac_n "checking for posix_fallocate""... $ac_c" 1>&6
15030 echo "configure:15127: checking for posix_fallocate" >&5
15031 cat > conftest.$ac_ext <<EOF
15032 #line 15129 "configure"
15033 #include "confdefs.h"
15034 #define _XOPEN_SOURCE 600
15035   #include <fcntl.h>
15036 int main() {
15037 posix_fallocate(0, 0, 0);
15038 ; return 0; }
15039 EOF
15040 if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15041   rm -rf conftest*
15042   ac_cv___posix_fallocate=true
15043 else
15044   echo "configure: failed program was:" >&5
15045   cat conftest.$ac_ext >&5
15046   rm -rf conftest*
15047   ac_cv___posix_fallocate=false
15048 fi
15049 rm -f conftest*
15050
15051 if test "$ac_cv___posix_fallocate" = true ; then
15052   cat >> confdefs.h <<\EOF
15053 #define HAVE_POSIX_FALLOCATE 1
15054 EOF
15055
15056   echo "$ac_t""yes" 1>&6
15057 else
15058   echo "$ac_t""no" 1>&6
15059 fi
15060
15061 if test "$COMPILE_ENVIRONMENT"; then
15062 if test "$MOZ_X11"; then
15063                 _SAVE_CFLAGS=$CFLAGS
15064     CFLAGS="$CFLAGS $XCFLAGS"
15065     cat > conftest.$ac_ext <<EOF
15066 #line 15163 "configure"
15067 #include "confdefs.h"
15068
15069         #include <stdio.h>
15070         #include <stdlib.h>
15071         #include <X11/Xlib.h>
15072         #include <X11/Intrinsic.h>
15073     
15074 int main() {
15075
15076         Display *dpy = 0;
15077         if ((dpy = XOpenDisplay(NULL)) == NULL) {
15078             fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
15079             exit(1);
15080         }
15081     
15082 ; return 0; }
15083 EOF
15084 if { (eval echo configure:15181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15085   :
15086 else
15087   echo "configure: failed program was:" >&5
15088   cat conftest.$ac_ext >&5
15089   rm -rf conftest*
15090    { echo "configure: error: Could not compile basic X program." 1>&2; exit 1; } 
15091 fi
15092 rm -f conftest*
15093     CFLAGS="$_SAVE_CFLAGS"
15094
15095     if test ! -z "$MISSING_X"; then
15096         { echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
15097     fi
15098
15099 fi # MOZ_X11
15100 fi # COMPILE_ENVIRONMENT
15101
15102
15103 if test "$OS_ARCH" = "BeOS"; then
15104   cat >> confdefs.h <<\EOF
15105 #define XP_BEOS 1
15106 EOF
15107
15108 elif test "$OS_ARCH" = "Darwin"; then
15109   cat >> confdefs.h <<\EOF
15110 #define XP_MACOSX 1
15111 EOF
15112
15113   cat >> confdefs.h <<\EOF
15114 #define XP_UNIX 1
15115 EOF
15116
15117   cat >> confdefs.h <<\EOF
15118 #define UNIX_ASYNC_DNS 1
15119 EOF
15120
15121 elif test "$OS_ARCH" = "OpenVMS"; then
15122   cat >> confdefs.h <<\EOF
15123 #define XP_UNIX 1
15124 EOF
15125
15126 elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2" -a "$OS_ARCH" != "WINCE"; then
15127   cat >> confdefs.h <<\EOF
15128 #define XP_UNIX 1
15129 EOF
15130
15131   cat >> confdefs.h <<\EOF
15132 #define UNIX_ASYNC_DNS 1
15133 EOF
15134
15135 fi
15136
15137 # Check whether --enable-threadsafe or --disable-threadsafe was given.
15138 if test "${enable_threadsafe+set}" = set; then
15139   enableval="$enable_threadsafe"
15140   cat >> confdefs.h <<\EOF
15141 #define JS_THREADSAFE 1
15142 EOF
15143
15144 fi
15145
15146
15147 if test "$MOZ_DEBUG"; then
15148     cat >> confdefs.h <<\EOF
15149 #define MOZ_REFLOW_PERF 1
15150 EOF
15151
15152     cat >> confdefs.h <<\EOF
15153 #define MOZ_REFLOW_PERF_DSP 1
15154 EOF
15155
15156 fi
15157
15158 if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK2" ; then
15159     cat >> confdefs.h <<\EOF
15160 #define MOZ_ACCESSIBILITY_ATK 1
15161 EOF
15162
15163     ATK_FULL_VERSION=`$PKG_CONFIG --modversion atk`
15164     ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
15165     ATK_MINOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
15166     ATK_REV_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
15167     cat >> confdefs.h <<EOF
15168 #define ATK_MAJOR_VERSION $ATK_MAJOR_VERSION
15169 EOF
15170
15171     cat >> confdefs.h <<EOF
15172 #define ATK_MINOR_VERSION $ATK_MINOR_VERSION
15173 EOF
15174
15175     cat >> confdefs.h <<EOF
15176 #define ATK_REV_VERSION $ATK_REV_VERSION
15177 EOF
15178
15179 fi
15180
15181
15182 for ac_func in setlocale
15183 do
15184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15185 echo "configure:15282: checking for $ac_func" >&5
15186 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15187   echo $ac_n "(cached) $ac_c" 1>&6
15188 else
15189   cat > conftest.$ac_ext <<EOF
15190 #line 15287 "configure"
15191 #include "confdefs.h"
15192 /* System header to define __stub macros and hopefully few prototypes,
15193     which can conflict with char $ac_func(); below.  */
15194 #include <assert.h>
15195 /* Override any gcc2 internal prototype to avoid an error.  */
15196 /* We use char because int might match the return type of a gcc2
15197     builtin and then its argument prototype would still apply.  */
15198 char $ac_func();
15199
15200 int main() {
15201
15202 /* The GNU C library defines this for functions which it implements
15203     to always fail with ENOSYS.  Some functions are actually named
15204     something starting with __ and the normal name is an alias.  */
15205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15206 choke me
15207 #else
15208 $ac_func();
15209 #endif
15210
15211 ; return 0; }
15212 EOF
15213 if { (eval echo configure:15310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15214   rm -rf conftest*
15215   eval "ac_cv_func_$ac_func=yes"
15216 else
15217   echo "configure: failed program was:" >&5
15218   cat conftest.$ac_ext >&5
15219   rm -rf conftest*
15220   eval "ac_cv_func_$ac_func=no"
15221 fi
15222 rm -f conftest*
15223 fi
15224
15225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15226   echo "$ac_t""yes" 1>&6
15227     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15228   cat >> confdefs.h <<EOF
15229 #define $ac_tr_func 1
15230 EOF
15231  
15232 else
15233   echo "$ac_t""no" 1>&6
15234 fi
15235 done
15236
15237 for ac_func in localeconv
15238 do
15239 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15240 echo "configure:15337: checking for $ac_func" >&5
15241 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15242   echo $ac_n "(cached) $ac_c" 1>&6
15243 else
15244   cat > conftest.$ac_ext <<EOF
15245 #line 15342 "configure"
15246 #include "confdefs.h"
15247 /* System header to define __stub macros and hopefully few prototypes,
15248     which can conflict with char $ac_func(); below.  */
15249 #include <assert.h>
15250 /* Override any gcc2 internal prototype to avoid an error.  */
15251 /* We use char because int might match the return type of a gcc2
15252     builtin and then its argument prototype would still apply.  */
15253 char $ac_func();
15254
15255 int main() {
15256
15257 /* The GNU C library defines this for functions which it implements
15258     to always fail with ENOSYS.  Some functions are actually named
15259     something starting with __ and the normal name is an alias.  */
15260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15261 choke me
15262 #else
15263 $ac_func();
15264 #endif
15265
15266 ; return 0; }
15267 EOF
15268 if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15269   rm -rf conftest*
15270   eval "ac_cv_func_$ac_func=yes"
15271 else
15272   echo "configure: failed program was:" >&5
15273   cat conftest.$ac_ext >&5
15274   rm -rf conftest*
15275   eval "ac_cv_func_$ac_func=no"
15276 fi
15277 rm -f conftest*
15278 fi
15279
15280 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15281   echo "$ac_t""yes" 1>&6
15282     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15283   cat >> confdefs.h <<EOF
15284 #define $ac_tr_func 1
15285 EOF
15286  
15287 else
15288   echo "$ac_t""no" 1>&6
15289 fi
15290 done
15291
15292
15293 case "$host_os" in
15294 mingw*)
15295     WIN_TOP_SRC=`cd $srcdir; pwd -W`
15296     ;;
15297 cygwin*|msvc*|mks*)
15298     HOST_CC="\$(CYGWIN_WRAPPER) $HOST_CC"
15299     HOST_CXX="\$(CYGWIN_WRAPPER) $HOST_CXX"
15300     CC="\$(CYGWIN_WRAPPER) $CC"
15301     CXX="\$(CYGWIN_WRAPPER) $CXX"
15302     CPP="\$(CYGWIN_WRAPPER) $CPP"
15303     LD="\$(CYGWIN_WRAPPER) $LD"
15304     AS="\$(CYGWIN_WRAPPER) $AS"
15305     RC="\$(CYGWIN_WRAPPER) $RC"
15306     CYGDRIVE_MOUNT=`mount -p | awk '{ if (/^\//) { print $1; exit } }'`
15307     WIN_TOP_SRC=`cygpath -a -w $srcdir | sed -e 's|\\\\|/|g'`
15308     ;;
15309 esac
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319 # Save the defines header file before autoconf removes it.
15320 # (Do not add AC_DEFINE calls after this line.)
15321   _CONFIG_TMP=confdefs-tmp.h
15322   _CONFIG_DEFS_H=js-confdefs.h
15323
15324   cat > $_CONFIG_TMP <<\EOF
15325 /* List of defines generated by configure. Included with preprocessor flag,
15326  * -include, to avoid long list of -D defines on the compile command-line.
15327  * Do not edit.
15328  */
15329
15330 #ifndef _JS_CONFDEFS_H_
15331 #define _JS_CONFDEFS_H_
15332 EOF
15333
15334 _EGREP_PATTERN='^#define ('
15335 if test -n "$_NON_GLOBAL_ACDEFINES"; then
15336     for f in $_NON_GLOBAL_ACDEFINES; do
15337         _EGREP_PATTERN="${_EGREP_PATTERN}$f|"
15338     done
15339 fi
15340 _EGREP_PATTERN="${_EGREP_PATTERN}dummy_never_defined)"
15341  
15342   sort confdefs.h | egrep -v "$_EGREP_PATTERN" >> $_CONFIG_TMP
15343
15344   cat >> $_CONFIG_TMP <<\EOF
15345
15346 #endif /* _JS_CONFDEFS_H_ */
15347
15348 EOF
15349
15350   # Only write js-confdefs.h when something changes (or it doesn't exist)
15351   if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then
15352     rm $_CONFIG_TMP
15353   else
15354     echo "$ac_t"""creating $_CONFIG_DEFS_H"" 1>&6
15355     mv -f $_CONFIG_TMP $_CONFIG_DEFS_H
15356
15357     echo ==== $_CONFIG_DEFS_H =================================
15358     cat $_CONFIG_DEFS_H
15359   fi
15360
15361 rm -f confdefs.h.save
15362 mv confdefs.h confdefs.h.save
15363 egrep -v "$_EGREP_PATTERN" confdefs.h.save > confdefs.h
15364 # Transform confdefs.h into DEFS.
15365 # Protect against shell expansion while executing Makefile rules.
15366 # Protect against Makefile macro expansion.
15367 cat > conftest.defs <<\EOF
15368 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
15369 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
15370 s%\[%\\&%g
15371 s%\]%\\&%g
15372 s%\$%$$%g
15373 EOF
15374 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
15375 rm -f conftest.defs
15376
15377 MOZ_DEFINES=$DEFS
15378
15379 rm -f confdefs.h
15380 mv confdefs.h.save confdefs.h
15381
15382 MAKEFILES="
15383   Makefile
15384   shell/Makefile
15385   lirasm/Makefile
15386   jsapi-tests/Makefile
15387   tests/Makefile
15388   config/Makefile
15389   config/autoconf.mk
15390   config/mkdepend/Makefile
15391 "
15392
15393 if test -n "$JS_NATIVE_EDITLINE"; then
15394    MAKEFILES="$MAKEFILES
15395 editline/Makefile
15396 "
15397 fi
15398
15399 if test -z "${AS_PERL}"; then
15400 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
15401 else
15402 echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl -nowrap --cygwin-srcdir=$srcdir > conftest.sh
15403 fi
15404 . ./conftest.sh
15405 rm conftest.sh
15406
15407 echo $MAKEFILES > unallmakefiles
15408
15409 mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
15410
15411 trap '' 1 2 15
15412 cat > confcache <<\EOF
15413 # This file is a shell script that caches the results of configure
15414 # tests run on this system so they can be shared between configure
15415 # scripts and configure runs.  It is not useful on other systems.
15416 # If it contains results you don't want to keep, you may remove or edit it.
15417 #
15418 # By default, configure uses ./config.cache as the cache file,
15419 # creating it if it does not exist already.  You can give configure
15420 # the --cache-file=FILE option to use a different cache file; that is
15421 # what configure does when it calls configure scripts in
15422 # subdirectories, so they share the cache.
15423 # Giving --cache-file=/dev/null disables caching, for debugging configure.
15424 # config.status only pays attention to the cache file if you give it the
15425 # --recheck option to rerun configure.
15426 #
15427 EOF
15428 # The following way of writing the cache mishandles newlines in values,
15429 # but we know of no workaround that is simple, portable, and efficient.
15430 # So, don't put newlines in cache variables' values.
15431 # Ultrix sh set writes to stderr and can't be redirected directly,
15432 # and sets the high bit in the cache file unless we assign to the vars.
15433 (set) 2>&1 |
15434   case `(ac_space=' '; set | grep ac_space) 2>&1` in
15435   *ac_space=\ *)
15436     # `set' does not quote correctly, so add quotes (double-quote substitution
15437     # turns \\\\ into \\, and sed turns \\ into \).
15438     sed -n \
15439       -e "s/'/'\\\\''/g" \
15440       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
15441     ;;
15442   *)
15443     # `set' quotes correctly as required by POSIX, so do not add quotes.
15444     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
15445     ;;
15446   esac >> confcache
15447 if cmp -s $cache_file confcache; then
15448   :
15449 else
15450   if test -w $cache_file; then
15451     echo "updating cache $cache_file"
15452     cat confcache > $cache_file
15453   else
15454     echo "not updating unwritable cache $cache_file"
15455   fi
15456 fi
15457 rm -f confcache
15458
15459 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15460
15461 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15462 # Let make expand exec_prefix.
15463 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15464
15465 # Any assignment to VPATH causes Sun make to only execute
15466 # the first set of double-colon rules, so remove it if not needed.
15467 # If there is a colon in the path, we need to keep it.
15468 if test "x$srcdir" = x.; then
15469   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15470 fi
15471
15472 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15473
15474 DEFS=-DHAVE_CONFIG_H
15475
15476 # Without the "./", some shells look in PATH for config.status.
15477 : ${CONFIG_STATUS=./config.status}
15478
15479 echo creating $CONFIG_STATUS
15480 rm -f $CONFIG_STATUS
15481 cat > $CONFIG_STATUS <<EOF
15482 #! /bin/sh
15483 # Generated automatically by configure.
15484 # Run this file to recreate the current configuration.
15485 # This directory was configured as follows,
15486 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15487 #
15488 # $0 $ac_configure_args
15489 #
15490 # Compiler output produced by configure, useful for debugging
15491 # configure, is in ./config.log if it exists.
15492
15493 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15494 for ac_option
15495 do
15496   case "\$ac_option" in
15497   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15498     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15499     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15500   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15501     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15502     exit 0 ;;
15503   -help | --help | --hel | --he | --h)
15504     echo "\$ac_cs_usage"; exit 0 ;;
15505   *) echo "\$ac_cs_usage"; exit 1 ;;
15506   esac
15507 done
15508
15509 ac_given_srcdir=$srcdir
15510 ac_given_INSTALL="$INSTALL"
15511
15512 trap 'rm -fr `echo "$MAKEFILES js-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15513 EOF
15514 cat >> $CONFIG_STATUS <<EOF
15515
15516
15517
15518 # Protect against being on the right side of a sed subst in config.status.
15519 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15520  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15521 $ac_vpsub
15522 $extrasub
15523 s%@SHELL@%$SHELL%g
15524 s%@CFLAGS@%$CFLAGS%g
15525 s%@CPPFLAGS@%$CPPFLAGS%g
15526 s%@CXXFLAGS@%$CXXFLAGS%g
15527 s%@FFLAGS@%$FFLAGS%g
15528 s%@DEFS@%$DEFS%g
15529 s%@LDFLAGS@%$LDFLAGS%g
15530 s%@LIBS@%$LIBS%g
15531 s%@exec_prefix@%$exec_prefix%g
15532 s%@prefix@%$prefix%g
15533 s%@program_transform_name@%$program_transform_name%g
15534 s%@bindir@%$bindir%g
15535 s%@sbindir@%$sbindir%g
15536 s%@libexecdir@%$libexecdir%g
15537 s%@datadir@%$datadir%g
15538 s%@sysconfdir@%$sysconfdir%g
15539 s%@sharedstatedir@%$sharedstatedir%g
15540 s%@localstatedir@%$localstatedir%g
15541 s%@libdir@%$libdir%g
15542 s%@includedir@%$includedir%g
15543 s%@oldincludedir@%$oldincludedir%g
15544 s%@infodir@%$infodir%g
15545 s%@mandir@%$mandir%g
15546 s%@host@%$host%g
15547 s%@host_alias@%$host_alias%g
15548 s%@host_cpu@%$host_cpu%g
15549 s%@host_vendor@%$host_vendor%g
15550 s%@host_os@%$host_os%g
15551 s%@target@%$target%g
15552 s%@target_alias@%$target_alias%g
15553 s%@target_cpu@%$target_cpu%g
15554 s%@target_vendor@%$target_vendor%g
15555 s%@target_os@%$target_os%g
15556 s%@build@%$build%g
15557 s%@build_alias@%$build_alias%g
15558 s%@build_cpu@%$build_cpu%g
15559 s%@build_vendor@%$build_vendor%g
15560 s%@build_os@%$build_os%g
15561 s%@AWK@%$AWK%g
15562 s%@TOP_DIST@%$TOP_DIST%g
15563 s%@COMPILE_ENVIRONMENT@%$COMPILE_ENVIRONMENT%g
15564 s%@PERL@%$PERL%g
15565 s%@JS_SHARED_LIBRARY@%$JS_SHARED_LIBRARY%g
15566 s%@ANDROID_VERSION@%$ANDROID_VERSION%g
15567 s%@ANDROID_NDK@%$ANDROID_NDK%g
15568 s%@ANDROID_TOOLCHAIN@%$ANDROID_TOOLCHAIN%g
15569 s%@ANDROID_PLATFORM@%$ANDROID_PLATFORM%g
15570 s%@ANDROID_SDK@%$ANDROID_SDK%g
15571 s%@ANDROID_PLATFORM_TOOLS@%$ANDROID_PLATFORM_TOOLS%g
15572 s%@HOST_CC@%$HOST_CC%g
15573 s%@HOST_CXX@%$HOST_CXX%g
15574 s%@HOST_RANLIB@%$HOST_RANLIB%g
15575 s%@HOST_AR@%$HOST_AR%g
15576 s%@CC@%$CC%g
15577 s%@CXX@%$CXX%g
15578 s%@RANLIB@%$RANLIB%g
15579 s%@AR@%$AR%g
15580 s%@AS@%$AS%g
15581 s%@LD@%$LD%g
15582 s%@STRIP@%$STRIP%g
15583 s%@WINDRES@%$WINDRES%g
15584 s%@CPP@%$CPP%g
15585 s%@CXXCPP@%$CXXCPP%g
15586 s%@SBCONF@%$SBCONF%g
15587 s%@QEMU_CANT_RUN_JS_SHELL@%$QEMU_CANT_RUN_JS_SHELL%g
15588 s%@_MSC_VER@%$_MSC_VER%g
15589 s%@GNU_AS@%$GNU_AS%g
15590 s%@GNU_LD@%$GNU_LD%g
15591 s%@GNU_CC@%$GNU_CC%g
15592 s%@GNU_CXX@%$GNU_CXX%g
15593 s%@INTEL_CC@%$INTEL_CC%g
15594 s%@INTEL_CXX@%$INTEL_CXX%g
15595 s%@STL_FLAGS@%$STL_FLAGS%g
15596 s%@WRAP_STL_INCLUDES@%$WRAP_STL_INCLUDES%g
15597 s%@MOZ_MSVC_STL_WRAP__Throw@%$MOZ_MSVC_STL_WRAP__Throw%g
15598 s%@MOZ_MSVC_STL_WRAP__RAISE@%$MOZ_MSVC_STL_WRAP__RAISE%g
15599 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15600 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15601 s%@INSTALL_DATA@%$INSTALL_DATA%g
15602 s%@LN_S@%$LN_S%g
15603 s%@PYTHON@%$PYTHON%g
15604 s%@NSINSTALL_BIN@%$NSINSTALL_BIN%g
15605 s%@DOXYGEN@%$DOXYGEN%g
15606 s%@AUTOCONF@%$AUTOCONF%g
15607 s%@UNZIP@%$UNZIP%g
15608 s%@ZIP@%$ZIP%g
15609 s%@SYSTEM_MAKEDEPEND@%$SYSTEM_MAKEDEPEND%g
15610 s%@XARGS@%$XARGS%g
15611 s%@PBBUILD@%$PBBUILD%g
15612 s%@SDP@%$SDP%g
15613 s%@GCC_VERSION@%$GCC_VERSION%g
15614 s%@XCODEBUILD_VERSION@%$XCODEBUILD_VERSION%g
15615 s%@HAS_XCODE_2_1@%$HAS_XCODE_2_1%g
15616 s%@UNIVERSAL_BINARY@%$UNIVERSAL_BINARY%g
15617 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
15618 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
15619 s%@NEXT_ROOT@%$NEXT_ROOT%g
15620 s%@GMAKE@%$GMAKE%g
15621 s%@X_CFLAGS@%$X_CFLAGS%g
15622 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15623 s%@X_LIBS@%$X_LIBS%g
15624 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15625 s%@SOLARIS_SUNPRO_CC@%$SOLARIS_SUNPRO_CC%g
15626 s%@SOLARIS_SUNPRO_CXX@%$SOLARIS_SUNPRO_CXX%g
15627 s%@HAVE_64BIT_OS@%$HAVE_64BIT_OS%g
15628 s%@MOZ_OS2_HIGH_MEMORY@%$MOZ_OS2_HIGH_MEMORY%g
15629 s%@AIX_OBJMODEL@%$AIX_OBJMODEL%g
15630 s%@NO_LD_ARCHIVE_FLAGS@%$NO_LD_ARCHIVE_FLAGS%g
15631 s%@ENABLE_METHODJIT@%$ENABLE_METHODJIT%g
15632 s%@ENABLE_TRACEJIT@%$ENABLE_TRACEJIT%g
15633 s%@NANOJIT_ARCH@%$NANOJIT_ARCH%g
15634 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
15635 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
15636 s%@HAVE_GCC_ALIGN_ARG_POINTER@%$HAVE_GCC_ALIGN_ARG_POINTER%g
15637 s%@HAVE_DTRACE@%$HAVE_DTRACE%g
15638 s%@HAVE_LINUX_PERF_EVENT_H@%$HAVE_LINUX_PERF_EVENT_H%g
15639 s%@HAVE_ARM_SIMD@%$HAVE_ARM_SIMD%g
15640 s%@HAVE_ARM_NEON@%$HAVE_ARM_NEON%g
15641 s%@LIBOBJS@%$LIBOBJS%g
15642 s%@HAVE_CLOCK_MONOTONIC@%$HAVE_CLOCK_MONOTONIC%g
15643 s%@REALTIME_LIBS@%$REALTIME_LIBS%g
15644 s%@HAVE_GCC3_ABI@%$HAVE_GCC3_ABI%g
15645 s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g
15646 s%@NSPR_LIBS@%$NSPR_LIBS%g
15647 s%@NSPR_CONFIG@%$NSPR_CONFIG%g
15648 s%@MOZ_UI_LOCALE@%$MOZ_UI_LOCALE%g
15649 s%@MOZ_THUMB2@%$MOZ_THUMB2%g
15650 s%@MOZ_ARM_ARCH@%$MOZ_ARM_ARCH%g
15651 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
15652 s%@MOZ_OPTIMIZE_FLAGS@%$MOZ_OPTIMIZE_FLAGS%g
15653 s%@MOZ_OPTIMIZE_LDFLAGS@%$MOZ_OPTIMIZE_LDFLAGS%g
15654 s%@MOZ_OPTIMIZE_SIZE_TWEAK@%$MOZ_OPTIMIZE_SIZE_TWEAK%g
15655 s%@NS_TRACE_MALLOC@%$NS_TRACE_MALLOC%g
15656 s%@MOZ_MEMORY@%$MOZ_MEMORY%g
15657 s%@MOZ_MEMORY_LDFLAGS@%$MOZ_MEMORY_LDFLAGS%g
15658 s%@CCACHE@%$CCACHE%g
15659 s%@DEHYDRA_PATH@%$DEHYDRA_PATH%g
15660 s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g
15661 s%@MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE@%$MOZ_PROFILE_GUIDED_OPTIMIZE_DISABLE%g
15662 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
15663 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
15664 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
15665 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
15666 s%@_MOZ_RTTI_FLAGS_ON@%$_MOZ_RTTI_FLAGS_ON%g
15667 s%@_MOZ_EXCEPTIONS_FLAGS_ON@%$_MOZ_EXCEPTIONS_FLAGS_ON%g
15668 s%@CL_INCLUDES_PREFIX@%$CL_INCLUDES_PREFIX%g
15669 s%@MOZ_AUTO_DEPS@%$MOZ_AUTO_DEPS%g
15670 s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g
15671 s%@MDDEPDIR@%$MDDEPDIR%g
15672 s%@CC_WRAPPER@%$CC_WRAPPER%g
15673 s%@CXX_WRAPPER@%$CXX_WRAPPER%g
15674 s%@JS_NATIVE_EDITLINE@%$JS_NATIVE_EDITLINE%g
15675 s%@JS_DISABLE_SHELL@%$JS_DISABLE_SHELL%g
15676 s%@EDITLINE_LIBS@%$EDITLINE_LIBS%g
15677 s%@JS_HAS_CTYPES@%$JS_HAS_CTYPES%g
15678 s%@MOZ_SYNC_BUILD_FILES@%$MOZ_SYNC_BUILD_FILES%g
15679 s%@AR_FLAGS@%$AR_FLAGS%g
15680 s%@AR_LIST@%$AR_LIST%g
15681 s%@AR_EXTRACT@%$AR_EXTRACT%g
15682 s%@AR_DELETE@%$AR_DELETE%g
15683 s%@ASFLAGS@%$ASFLAGS%g
15684 s%@AS_DASH_C_FLAG@%$AS_DASH_C_FLAG%g
15685 s%@RC@%$RC%g
15686 s%@RCFLAGS@%$RCFLAGS%g
15687 s%@IMPLIB@%$IMPLIB%g
15688 s%@FILTER@%$FILTER%g
15689 s%@BIN_FLAGS@%$BIN_FLAGS%g
15690 s%@NS_USE_NATIVE@%$NS_USE_NATIVE%g
15691 s%@MOZ_JS_LIBS@%$MOZ_JS_LIBS%g
15692 s%@MOZ_PSM@%$MOZ_PSM%g
15693 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
15694 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
15695 s%@MOZ_DEBUG_ENABLE_DEFS@%$MOZ_DEBUG_ENABLE_DEFS%g
15696 s%@MOZ_DEBUG_DISABLE_DEFS@%$MOZ_DEBUG_DISABLE_DEFS%g
15697 s%@MOZ_DEBUG_FLAGS@%$MOZ_DEBUG_FLAGS%g
15698 s%@MOZ_DEBUG_LDFLAGS@%$MOZ_DEBUG_LDFLAGS%g
15699 s%@WARNINGS_AS_ERRORS@%$WARNINGS_AS_ERRORS%g
15700 s%@MOZ_LEAKY@%$MOZ_LEAKY%g
15701 s%@MOZ_JPROF@%$MOZ_JPROF%g
15702 s%@MOZ_SHARK@%$MOZ_SHARK%g
15703 s%@MOZ_CALLGRIND@%$MOZ_CALLGRIND%g
15704 s%@MOZ_VTUNE@%$MOZ_VTUNE%g
15705 s%@MOZ_PROFILING@%$MOZ_PROFILING%g
15706 s%@MOZ_JSLOADER@%$MOZ_JSLOADER%g
15707 s%@MOZ_QUANTIFY@%$MOZ_QUANTIFY%g
15708 s%@LIBICONV@%$LIBICONV%g
15709 s%@BUILD_STATIC_LIBS@%$BUILD_STATIC_LIBS%g
15710 s%@ENABLE_TESTS@%$ENABLE_TESTS%g
15711 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
15712 s%@PKG_SKIP_STRIP@%$PKG_SKIP_STRIP%g
15713 s%@INCREMENTAL_LINKER@%$INCREMENTAL_LINKER%g
15714 s%@MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@%$MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS%g
15715 s%@MOZ_COMPONENT_NSPR_LIBS@%$MOZ_COMPONENT_NSPR_LIBS%g
15716 s%@MOZ_FIX_LINK_PATHS@%$MOZ_FIX_LINK_PATHS%g
15717 s%@USE_DEPENDENT_LIBS@%$USE_DEPENDENT_LIBS%g
15718 s%@MOZ_BUILD_ROOT@%$MOZ_BUILD_ROOT%g
15719 s%@MOZ_OS2_TOOLS@%$MOZ_OS2_TOOLS%g
15720 s%@MOZ_POST_DSO_LIB_COMMAND@%$MOZ_POST_DSO_LIB_COMMAND%g
15721 s%@MOZ_POST_PROGRAM_COMMAND@%$MOZ_POST_PROGRAM_COMMAND%g
15722 s%@MOZ_TIMELINE@%$MOZ_TIMELINE%g
15723 s%@MOZ_APP_NAME@%$MOZ_APP_NAME%g
15724 s%@MOZ_APP_DISPLAYNAME@%$MOZ_APP_DISPLAYNAME%g
15725 s%@MOZ_APP_UA_NAME@%$MOZ_APP_UA_NAME%g
15726 s%@MOZ_APP_VERSION@%$MOZ_APP_VERSION%g
15727 s%@MOZ_UA_FIREFOX_VERSION@%$MOZ_UA_FIREFOX_VERSION%g
15728 s%@FIREFOX_VERSION@%$FIREFOX_VERSION%g
15729 s%@MOZ_PKG_SPECIAL@%$MOZ_PKG_SPECIAL%g
15730 s%@MOZILLA_OFFICIAL@%$MOZILLA_OFFICIAL%g
15731 s%@MOZ_MAPINFO@%$MOZ_MAPINFO%g
15732 s%@MOZ_BROWSE_INFO@%$MOZ_BROWSE_INFO%g
15733 s%@MOZ_TOOLS_DIR@%$MOZ_TOOLS_DIR%g
15734 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
15735 s%@AS_PERL@%$AS_PERL%g
15736 s%@WIN32_REDIST_DIR@%$WIN32_REDIST_DIR%g
15737 s%@WINCE@%$WINCE%g
15738 s%@WINCE_SDK_DIR@%$WINCE_SDK_DIR%g
15739 s%@WINCE_WINDOWS_MOBILE@%$WINCE_WINDOWS_MOBILE%g
15740 s%@MOZ_NATIVE_NSPR@%$MOZ_NATIVE_NSPR%g
15741 s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g
15742 s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g
15743 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
15744 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
15745 s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g
15746 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
15747 s%@HOST_OPTIMIZE_FLAGS@%$HOST_OPTIMIZE_FLAGS%g
15748 s%@HOST_AR_FLAGS@%$HOST_AR_FLAGS%g
15749 s%@HOST_LD@%$HOST_LD%g
15750 s%@HOST_NSPR_MDCPUCFG@%$HOST_NSPR_MDCPUCFG%g
15751 s%@HOST_BIN_SUFFIX@%$HOST_BIN_SUFFIX%g
15752 s%@HOST_OS_ARCH@%$HOST_OS_ARCH%g
15753 s%@TARGET_CPU@%$TARGET_CPU%g
15754 s%@TARGET_VENDOR@%$TARGET_VENDOR%g
15755 s%@TARGET_OS@%$TARGET_OS%g
15756 s%@TARGET_NSPR_MDCPUCFG@%$TARGET_NSPR_MDCPUCFG%g
15757 s%@TARGET_MD_ARCH@%$TARGET_MD_ARCH%g
15758 s%@TARGET_XPCOM_ABI@%$TARGET_XPCOM_ABI%g
15759 s%@OS_TARGET@%$OS_TARGET%g
15760 s%@OS_ARCH@%$OS_ARCH%g
15761 s%@OS_RELEASE@%$OS_RELEASE%g
15762 s%@OS_TEST@%$OS_TEST%g
15763 s%@CPU_ARCH@%$CPU_ARCH%g
15764 s%@INTEL_ARCHITECTURE@%$INTEL_ARCHITECTURE%g
15765 s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
15766 s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
15767 s%@MKSHLIB@%$MKSHLIB%g
15768 s%@MKCSHLIB@%$MKCSHLIB%g
15769 s%@MKSHLIB_FORCE_ALL@%$MKSHLIB_FORCE_ALL%g
15770 s%@MKSHLIB_UNFORCE_ALL@%$MKSHLIB_UNFORCE_ALL%g
15771 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
15772 s%@DSO_PIC_CFLAGS@%$DSO_PIC_CFLAGS%g
15773 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
15774 s%@LIB_PREFIX@%$LIB_PREFIX%g
15775 s%@DLL_PREFIX@%$DLL_PREFIX%g
15776 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
15777 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
15778 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
15779 s%@BIN_SUFFIX@%$BIN_SUFFIX%g
15780 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
15781 s%@IMPORT_LIB_SUFFIX@%$IMPORT_LIB_SUFFIX%g
15782 s%@USE_N32@%$USE_N32%g
15783 s%@CC_VERSION@%$CC_VERSION%g
15784 s%@CXX_VERSION@%$CXX_VERSION%g
15785 s%@MSMANIFEST_TOOL@%$MSMANIFEST_TOOL%g
15786 s%@CYGDRIVE_MOUNT@%$CYGDRIVE_MOUNT%g
15787 s%@WIN_TOP_SRC@%$WIN_TOP_SRC%g
15788 s%@MOZILLA_VERSION@%$MOZILLA_VERSION%g
15789 s%@ac_configure_args@%$ac_configure_args%g
15790 s%@MOZ_DEFINES@%$MOZ_DEFINES%g
15791
15792 CEOF
15793 EOF
15794
15795 cat >> $CONFIG_STATUS <<\EOF
15796
15797 # Split the substitutions into bite-sized pieces for seds with
15798 # small command number limits, like on Digital OSF/1 and HP-UX.
15799 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15800 ac_file=1 # Number of current file.
15801 ac_beg=1 # First line for current file.
15802 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15803 ac_more_lines=:
15804 ac_sed_cmds=""
15805 while $ac_more_lines; do
15806   if test $ac_beg -gt 1; then
15807     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15808   else
15809     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15810   fi
15811   if test ! -s conftest.s$ac_file; then
15812     ac_more_lines=false
15813     rm -f conftest.s$ac_file
15814   else
15815     if test -z "$ac_sed_cmds"; then
15816       ac_sed_cmds="sed -f conftest.s$ac_file"
15817     else
15818       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15819     fi
15820     ac_file=`expr $ac_file + 1`
15821     ac_beg=$ac_end
15822     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15823   fi
15824 done
15825 if test -z "$ac_sed_cmds"; then
15826   ac_sed_cmds=cat
15827 fi
15828 EOF
15829
15830 cat >> $CONFIG_STATUS <<EOF
15831
15832 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
15833 EOF
15834 cat >> $CONFIG_STATUS <<\EOF
15835 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15836   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15837   case "$ac_file" in
15838   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15839        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15840   *) ac_file_in="${ac_file}.in" ;;
15841   esac
15842
15843   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15844
15845   # Remove last slash and all that follows it.  Not all systems have dirname.
15846   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15847   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15848     # The file is in a subdirectory.
15849     test ! -d "$ac_dir" && mkdir "$ac_dir"
15850     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15851     # A "../" for each directory in $ac_dir_suffix.
15852     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15853   else
15854     ac_dir_suffix= ac_dots=
15855   fi
15856
15857   case "$ac_given_srcdir" in
15858   .)  srcdir=.
15859       if test -z "$ac_dots"; then top_srcdir=.
15860       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15861   /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15862   *) # Relative path.
15863     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15864     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15865   esac
15866
15867   case "$ac_given_INSTALL" in
15868   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15869   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15870   esac
15871
15872   echo creating "$ac_file"
15873   rm -f "$ac_file"
15874   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15875   case "$ac_file" in
15876   *Makefile*) ac_comsub="1i\\
15877 # $configure_input" ;;
15878   *) ac_comsub= ;;
15879   esac
15880
15881   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
15882   sed -e "$ac_comsub
15883 s%@configure_input@%$configure_input%g
15884 s%@srcdir@%$srcdir%g
15885 s%@top_srcdir@%$top_srcdir%g
15886 s%@INSTALL@%$INSTALL%g
15887 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15888 fi; done
15889 rm -f conftest.s*
15890
15891
15892
15893
15894 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15895 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15896 #
15897 # ac_d sets the value in "#define NAME VALUE" lines.
15898 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15899 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15900 ac_dC='\3'
15901 ac_dD='%g'
15902 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15903 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15904 ac_uB='\([      ]\)%\1#\2define\3'
15905 ac_uC=' '
15906 ac_uD='\4%g'
15907 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15908 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15909 ac_eB='$%\1#\2define\3'
15910 ac_eC=' '
15911 ac_eD='%g'
15912
15913 if test "${CONFIG_HEADERS+set}" != set; then
15914 EOF
15915 cat >> $CONFIG_STATUS <<EOF
15916   CONFIG_HEADERS="js-config.h"
15917 EOF
15918 cat >> $CONFIG_STATUS <<\EOF
15919 fi
15920 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15921   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15922   case "$ac_file" in
15923   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15924        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15925   *) ac_file_in="${ac_file}.in" ;;
15926   esac
15927
15928   echo creating $ac_file
15929
15930   rm -f conftest.frag conftest.in conftest.out
15931   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
15932   cat $ac_file_inputs > conftest.in
15933
15934 EOF
15935
15936 # Transform confdefs.h into a sed script conftest.vals that substitutes
15937 # the proper values into config.h.in to produce config.h.  And first:
15938 # Protect against being on the right side of a sed subst in config.status.
15939 # Protect against being in an unquoted here document in config.status.
15940 rm -f conftest.vals
15941 cat > conftest.hdr <<\EOF
15942 s/[\\&%]/\\&/g
15943 s%[\\$`]%\\&%g
15944 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15945 s%ac_d%ac_u%gp
15946 s%ac_u%ac_e%gp
15947 EOF
15948 sed -n -f conftest.hdr confdefs.h > conftest.vals
15949 rm -f conftest.hdr
15950
15951 # This sed command replaces #undef with comments.  This is necessary, for
15952 # example, in the case of _POSIX_SOURCE, which is predefined and required
15953 # on some systems where configure will not decide to define it.
15954 cat >> conftest.vals <<\EOF
15955 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15956 EOF
15957
15958 # Break up conftest.vals because some shells have a limit on
15959 # the size of here documents, and old seds have small limits too.
15960
15961 rm -f conftest.tail
15962 while :
15963 do
15964   ac_lines=`grep -c . conftest.vals`
15965   # grep -c gives empty output for an empty file on some AIX systems.
15966   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15967   # Write a limited-size here document to conftest.frag.
15968   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15969   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15970   echo 'CEOF
15971   sed -f conftest.frag conftest.in > conftest.out
15972   rm -f conftest.in
15973   mv conftest.out conftest.in
15974 ' >> $CONFIG_STATUS
15975   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15976   rm -f conftest.vals
15977   mv conftest.tail conftest.vals
15978 done
15979 rm -f conftest.vals
15980
15981 cat >> $CONFIG_STATUS <<\EOF
15982   rm -f conftest.frag conftest.h
15983   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15984   cat conftest.in >> conftest.h
15985   rm -f conftest.in
15986   if cmp -s $ac_file conftest.h 2>/dev/null; then
15987     echo "$ac_file is unchanged"
15988     rm -f conftest.h
15989   else
15990     # Remove last slash and all that follows it.  Not all systems have dirname.
15991       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15992       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15993       # The file is in a subdirectory.
15994       test ! -d "$ac_dir" && mkdir "$ac_dir"
15995     fi
15996     rm -f $ac_file
15997     mv conftest.h $ac_file
15998   fi
15999 fi; done
16000
16001
16002 EOF
16003 cat >> $CONFIG_STATUS <<EOF
16004
16005 EOF
16006 cat >> $CONFIG_STATUS <<\EOF
16007
16008 exit 0
16009 EOF
16010 chmod +x $CONFIG_STATUS
16011 rm -fr confdefs* $ac_clean_files
16012 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
16013
16014
16015 if cmp -s config/autoconf.mk config/autoconf.mk.orig; then
16016   echo "config/autoconf.mk is unchanged"
16017   mv -f config/autoconf.mk.orig config/autoconf.mk 2> /dev/null
16018 else
16019   rm -f config/autoconf.mk.orig 2> /dev/null
16020 fi
16021
16022 # Produce the js-config script at configure time; see the comments for
16023 # 'js-config' in Makefile.in.
16024 echo "$ac_t""invoking make to create js-config script" 1>&6
16025 $GMAKE js-config
16026
16027 # Build jsctypes if it's enabled.
16028 if test "$JS_HAS_CTYPES"; then
16029   # Run the libffi 'configure' script.
16030   ac_configure_args="--disable-shared --enable-static --disable-raw-api"
16031   if test "$MOZ_DEBUG"; then
16032     ac_configure_args="$ac_configure_args --enable-debug"
16033   fi
16034   if test "$DSO_PIC_CFLAGS"; then
16035     ac_configure_args="$ac_configure_args --with-pic"
16036   fi
16037   if test "$CROSS_COMPILE"; then
16038     case "$target" in
16039     *-mingw*)
16040       ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\" CC=\"$CC\""
16041       ;;
16042     *-android*)
16043       CFLAGS="$ANDROID_CFLAGS"
16044       CPPFLAGS="$ANDROID_CPPFLAGS"
16045       LDFLAGS="$ANDROID_LDFLAGS"
16046
16047       export AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS CFLAGS LDFLAGS
16048
16049       ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\""
16050       ;;
16051     *)
16052       ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
16053       ;;
16054     esac
16055   fi
16056   if test "$_MSC_VER"; then
16057     # Use a wrapper script for cl and ml that looks more like gcc.
16058     # autotools can't quite handle an MSVC build environment yet.
16059     ac_configure_args="$ac_configure_args LD=link CPP=\"cl -nologo -EP\" SHELL=sh.exe"
16060     case "${target_cpu}" in
16061     x86_64)
16062       # Need target since MSYS tools into mozilla-build may be 32bit
16063       ac_configure_args="$ac_configure_args CC=\"$_topsrcdir/ctypes/libffi/msvcc.sh -m64\" --build=$build --host=$target"
16064       ;;
16065     *)
16066       ac_configure_args="$ac_configure_args CC=$_topsrcdir/ctypes/libffi/msvcc.sh"
16067       ;;
16068     esac
16069   fi
16070   if test "$SOLARIS_SUNPRO_CC"; then
16071     # Always use gcc for libffi on Solaris
16072     if test ! "$HAVE_64BIT_OS"; then
16073       ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m32 LD= LDFLAGS="
16074     else
16075       ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m64 LD= LDFLAGS="
16076     fi
16077   fi
16078   if test "$AIX_IBM_XLC"; then
16079     # Always use gcc for libffi on IBM AIX5/AIX6
16080     if test ! "$HAVE_64BIT_OS"; then
16081       ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix32"
16082     else
16083       ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix64"
16084     fi
16085   fi
16086   if test "$OS_ARCH" = "OS2"; then
16087     ac_configure_args="$ac_configure_args CFLAGS=-Zomf AR=emxomfar"
16088   fi
16089   if test -n "$MOZ_THUMB2"; then
16090     ac_configure_args="$ac_configure_args --enable-thumb2"
16091   fi
16092   if test -n "$MOZ_ARM_ARCH"; then
16093     ac_configure_args="$ac_configure_args --with-cpu-arch=$MOZ_ARM_ARCH"
16094   fi
16095
16096   # Use a separate cache file for libffi, since it does things differently
16097   # from our configure.
16098   mkdir -p $_objdir/ctypes/libffi
16099   old_cache_file=$cache_file
16100   cache_file=$_objdir/ctypes/libffi/config.cache
16101   old_config_files=$CONFIG_FILES
16102   unset CONFIG_FILES
16103   
16104
16105 if test "$no_recursion" != yes; then
16106
16107   # Remove --cache-file and --srcdir arguments so they do not pile up.
16108   ac_sub_configure_args=
16109   ac_prev=
16110   for ac_arg in $ac_configure_args; do
16111     if test -n "$ac_prev"; then
16112       ac_prev=
16113       continue
16114     fi
16115     case "$ac_arg" in
16116     -cache-file | --cache-file | --cache-fil | --cache-fi \
16117     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16118       ac_prev=cache_file ;;
16119     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
16120     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
16121       ;;
16122     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16123       ac_prev=srcdir ;;
16124     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16125       ;;
16126     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
16127     esac
16128   done
16129
16130   for ac_config_dir in ctypes/libffi; do
16131
16132     # Do not complain, so a configure script can configure whichever
16133     # parts of a large source tree are present.
16134     if test ! -d $srcdir/$ac_config_dir; then
16135       continue
16136     fi
16137
16138     echo configuring in $ac_config_dir
16139
16140     case "$srcdir" in
16141     .) ;;
16142     *)
16143       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
16144       else
16145         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
16146       fi
16147       ;;
16148     esac
16149
16150     ac_popdir=`pwd`
16151     cd $ac_config_dir
16152
16153       # A "../" for each directory in /$ac_config_dir.
16154       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
16155
16156     case "$srcdir" in
16157     .) # No --srcdir option.  We are building in place.
16158       ac_sub_srcdir=$srcdir ;;
16159     /* | ?:/*) # Absolute path.
16160       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
16161     *) # Relative path.
16162       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
16163     esac
16164
16165     # Check for guested configure; otherwise get Cygnus style configure.
16166     if test -f $ac_sub_srcdir/configure; then
16167       ac_sub_configure=$ac_sub_srcdir/configure
16168     elif test -f $ac_sub_srcdir/configure.in; then
16169       ac_sub_configure=$ac_configure
16170     else
16171       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
16172       ac_sub_configure=
16173     fi
16174
16175     # The recursion is here.
16176     if test -n "$ac_sub_configure"; then
16177
16178       # Make the cache file name correct relative to the subdirectory.
16179       case "$cache_file" in
16180       /* | ?:/*) ac_sub_cache_file=$cache_file ;;
16181       *) # Relative path.
16182         ac_sub_cache_file="$ac_dots$cache_file" ;;
16183       esac
16184   case "$ac_given_INSTALL" in
16185         [/$]*) INSTALL="$ac_given_INSTALL" ;;
16186         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16187         esac
16188
16189       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
16190       # The eval makes quoting arguments work.
16191       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
16192       then :
16193       else
16194         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
16195       fi
16196     fi
16197
16198     cd $ac_popdir
16199   done
16200 fi
16201
16202
16203   cache_file=$old_cache_file
16204   ac_configure_args="$_SUBDIR_CONFIG_ARGS"
16205   CONFIG_FILES=$old_config_files
16206 fi
16207