Bug 915938 - Increase fuzz for text-not-in-doc-test.html. r=gw280, a=bustage
[gecko.git] / nsprpub / configure
blobc64aa69d5a557b316f84a1936fce8dd31e7b48a6
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-android-ndk=DIR
16 location where the Android NDK can be found"
17 ac_help="$ac_help
18 --with-android-toolchain=DIR
19 location of the Android toolchain"
20 ac_help="$ac_help
21 --with-android-version=VER
22 Android platform version, default 5 for arm, 9 for x86/mips"
23 ac_help="$ac_help
24 --with-android-platform=DIR
25 location of platform dir"
26 ac_help="$ac_help
27 --with-gonk=DIR location of gonk dir"
28 ac_help="$ac_help
29 --with-dist-prefix=DIST_PREFIX
30 place build files in DIST_PREFIX [dist]"
31 ac_help="$ac_help
32 --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]"
33 ac_help="$ac_help
34 --with-dist-includedir=DIR
35 build include files in DIR [DIST_PREFIX/include/nspr]"
36 ac_help="$ac_help
37 --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]"
38 ac_help="$ac_help
39 --with-mozilla Compile NSPR with Mozilla support"
40 ac_help="$ac_help
41 --enable-optimize[=OPT] Enable code optimizations (ie. -O2) "
42 ac_help="$ac_help
43 --enable-debug[=DBG] Enable debugging (using compiler flags DBG)"
44 ac_help="$ac_help
45 --enable-debug-symbols[=DBG] Enable debugging symbols
46 (using compiler flags DBG)"
47 ac_help="$ac_help
48 --enable-win32-target=\$t
49 Specify win32 flavor. (WIN95 or WINNT)"
50 ac_help="$ac_help
51 --enable-symbian-target=\$t
52 Specify symbian flavor. (WINSCW or GCCE)"
53 ac_help="$ac_help
54 --enable-debug-rtl Use the MSVC debug runtime library"
55 ac_help="$ac_help
56 --enable-n32 Enable n32 ABI support (IRIX only)"
57 ac_help="$ac_help
58 --enable-64bit Enable 64-bit support (on certain platforms)"
59 ac_help="$ac_help
60 --enable-mdupdate Enable use of certain compilers' mdupdate feature"
61 ac_help="$ac_help
62 --enable-cplus Enable some c++ api routines"
63 ac_help="$ac_help
64 --with-arm-kuser Use kuser helpers (Linux/ARM only)
65 (Requires kernel 2.6.13 or later)"
66 ac_help="$ac_help
67 --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
68 ac_help="$ac_help
69 --enable-macos-target=VER
70 Set the minimum MacOS version needed at runtime
71 [10.2 for ppc, 10.4 for x86]"
72 ac_help="$ac_help
73 --disable-os2-high-mem Disable high-memory support on OS/2"
74 ac_help="$ac_help
76 ac_help="$ac_help
77 --with-thumb[[=yes|no|toolchain-default]]
78 Use Thumb instruction set (-mthumb)"
79 ac_help="$ac_help
80 --with-thumb-interwork[[=yes|no|toolchain-default]]
81 Use Thumb/ARM instuctions interwork (-mthumb-interwork)"
82 ac_help="$ac_help
83 --with-arch=[[type|toolchain-default]]
84 Use specific CPU features (-march=type)"
85 ac_help="$ac_help
86 --with-fpu=[[type|toolchain-default]]
87 Use specific FPU type (-mfpu=type)"
88 ac_help="$ac_help
89 --with-float-abi=[[type|toolchain-default]]
90 Use specific arm float ABI (-mfloat-abi=type)"
91 ac_help="$ac_help
92 --with-soft-float[[=yes|no|toolchain-default]]
93 Use soft float library (-msoft-float)"
94 ac_help="$ac_help
95 --with-symbian-sdk=SYMBIAN_SDK_DIR
96 The path to the Symbian SDK"
97 ac_help="$ac_help
98 --with-ccache[=path/to/ccache]
99 Enable compiling with ccache"
100 ac_help="$ac_help
101 --enable-strip Enable stripping of shared libs and programs"
102 ac_help="$ac_help
103 --with-pthreads Use system pthreads library as thread subsystem"
104 ac_help="$ac_help
105 --enable-user-pthreads Build using userland pthreads"
106 ac_help="$ac_help
107 --enable-nspr-threads Build using classic nspr threads"
108 ac_help="$ac_help
109 --with-bthreads Use system bthreads library as thread subsystem
110 (BeOS only)"
111 ac_help="$ac_help
112 --enable-ipv6 Compile ipv6 support"
113 ac_help="$ac_help
114 --enable-wrap-malloc Wrap malloc calls (gnu linker only)"
115 ac_help="$ac_help
116 --with-wrap-malloc=SHAREDLIB Location of malloc wrapper library"
118 # Initialize some variables set by options.
119 # The variables have the same names as the options, with
120 # dashes changed to underlines.
121 build=NONE
122 cache_file=./config.cache
123 exec_prefix=NONE
124 host=NONE
125 no_create=
126 nonopt=NONE
127 no_recursion=
128 prefix=NONE
129 program_prefix=NONE
130 program_suffix=NONE
131 program_transform_name=s,x,x,
132 silent=
133 site=
134 srcdir=
135 target=NONE
136 verbose=
137 x_includes=NONE
138 x_libraries=NONE
139 bindir='${exec_prefix}/bin'
140 sbindir='${exec_prefix}/sbin'
141 libexecdir='${exec_prefix}/libexec'
142 datadir='${prefix}/share'
143 sysconfdir='${prefix}/etc'
144 sharedstatedir='${prefix}/com'
145 localstatedir='${prefix}/var'
146 libdir='${exec_prefix}/lib'
147 includedir='${prefix}/include'
148 oldincludedir='/usr/include'
149 infodir='${prefix}/info'
150 mandir='${prefix}/man'
152 # Initialize some other variables.
153 subdirs=
154 MFLAGS= MAKEFLAGS=
155 SHELL=${CONFIG_SHELL-/bin/sh}
156 # Maximum number of lines to put in a shell here document.
157 ac_max_here_lines=12
159 ac_prev=
160 for ac_option
163 # If the previous option needs an argument, assign it.
164 if test -n "$ac_prev"; then
165 eval "$ac_prev=\$ac_option"
166 ac_prev=
167 continue
170 case "$ac_option" in
171 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
172 *) ac_optarg= ;;
173 esac
175 # Accept the important Cygnus configure options, so we can diagnose typos.
177 case "$ac_option" in
179 -bindir | --bindir | --bindi | --bind | --bin | --bi)
180 ac_prev=bindir ;;
181 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
182 bindir="$ac_optarg" ;;
184 -build | --build | --buil | --bui | --bu)
185 ac_prev=build ;;
186 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
187 build="$ac_optarg" ;;
189 -cache-file | --cache-file | --cache-fil | --cache-fi \
190 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
191 ac_prev=cache_file ;;
192 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
193 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
194 cache_file="$ac_optarg" ;;
196 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
197 ac_prev=datadir ;;
198 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
199 | --da=*)
200 datadir="$ac_optarg" ;;
202 -disable-* | --disable-*)
203 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
204 # Reject names that are not valid shell variable names.
205 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
206 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209 eval "enable_${ac_feature}=no" ;;
211 -enable-* | --enable-*)
212 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
213 # Reject names that are not valid shell variable names.
214 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
215 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
217 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218 case "$ac_option" in
219 *=*) ;;
220 *) ac_optarg=yes ;;
221 esac
222 eval "enable_${ac_feature}='$ac_optarg'" ;;
224 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
225 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
226 | --exec | --exe | --ex)
227 ac_prev=exec_prefix ;;
228 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
229 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
230 | --exec=* | --exe=* | --ex=*)
231 exec_prefix="$ac_optarg" ;;
233 -gas | --gas | --ga | --g)
234 # Obsolete; use --with-gas.
235 with_gas=yes ;;
237 -help | --help | --hel | --he)
238 # Omit some internal or obsolete options to make the list less imposing.
239 # This message is too long to be a string in the A/UX 3.1 sh.
240 cat << EOF
241 Usage: configure [options] [host]
242 Options: [defaults in brackets after descriptions]
243 Configuration:
244 --cache-file=FILE cache test results in FILE
245 --help print this message
246 --no-create do not create output files
247 --quiet, --silent do not print \`checking...' messages
248 --version print the version of autoconf that created configure
249 Directory and file names:
250 --prefix=PREFIX install architecture-independent files in PREFIX
251 [$ac_default_prefix]
252 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
253 [same as prefix]
254 --bindir=DIR user executables in DIR [EPREFIX/bin]
255 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
256 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
257 --datadir=DIR read-only architecture-independent data in DIR
258 [PREFIX/share]
259 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
260 --sharedstatedir=DIR modifiable architecture-independent data in DIR
261 [PREFIX/com]
262 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
263 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
264 --includedir=DIR C header files in DIR [PREFIX/include]
265 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
266 --infodir=DIR info documentation in DIR [PREFIX/info]
267 --mandir=DIR man documentation in DIR [PREFIX/man]
268 --srcdir=DIR find the sources in DIR [configure dir or ..]
269 --program-prefix=PREFIX prepend PREFIX to installed program names
270 --program-suffix=SUFFIX append SUFFIX to installed program names
271 --program-transform-name=PROGRAM
272 run sed PROGRAM on installed program names
274 cat << EOF
275 Host type:
276 --build=BUILD configure for building on BUILD [BUILD=HOST]
277 --host=HOST configure for HOST [guessed]
278 --target=TARGET configure for TARGET [TARGET=HOST]
279 Features and packages:
280 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
281 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
282 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
283 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
284 --x-includes=DIR X include files are in DIR
285 --x-libraries=DIR X library files are in DIR
287 if test -n "$ac_help"; then
288 echo "--enable and --with options recognized:$ac_help"
290 exit 0 ;;
292 -host | --host | --hos | --ho)
293 ac_prev=host ;;
294 -host=* | --host=* | --hos=* | --ho=*)
295 host="$ac_optarg" ;;
297 -includedir | --includedir | --includedi | --included | --include \
298 | --includ | --inclu | --incl | --inc)
299 ac_prev=includedir ;;
300 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
301 | --includ=* | --inclu=* | --incl=* | --inc=*)
302 includedir="$ac_optarg" ;;
304 -infodir | --infodir | --infodi | --infod | --info | --inf)
305 ac_prev=infodir ;;
306 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
307 infodir="$ac_optarg" ;;
309 -libdir | --libdir | --libdi | --libd)
310 ac_prev=libdir ;;
311 -libdir=* | --libdir=* | --libdi=* | --libd=*)
312 libdir="$ac_optarg" ;;
314 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
315 | --libexe | --libex | --libe)
316 ac_prev=libexecdir ;;
317 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
318 | --libexe=* | --libex=* | --libe=*)
319 libexecdir="$ac_optarg" ;;
321 -localstatedir | --localstatedir | --localstatedi | --localstated \
322 | --localstate | --localstat | --localsta | --localst \
323 | --locals | --local | --loca | --loc | --lo)
324 ac_prev=localstatedir ;;
325 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
326 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
327 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
328 localstatedir="$ac_optarg" ;;
330 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
331 ac_prev=mandir ;;
332 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
333 mandir="$ac_optarg" ;;
335 -nfp | --nfp | --nf)
336 # Obsolete; use --without-fp.
337 with_fp=no ;;
339 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
340 | --no-cr | --no-c)
341 no_create=yes ;;
343 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
344 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
345 no_recursion=yes ;;
347 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
348 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
349 | --oldin | --oldi | --old | --ol | --o)
350 ac_prev=oldincludedir ;;
351 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
352 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
353 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
354 oldincludedir="$ac_optarg" ;;
356 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
357 ac_prev=prefix ;;
358 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
359 prefix="$ac_optarg" ;;
361 -program-prefix | --program-prefix | --program-prefi | --program-pref \
362 | --program-pre | --program-pr | --program-p)
363 ac_prev=program_prefix ;;
364 -program-prefix=* | --program-prefix=* | --program-prefi=* \
365 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
366 program_prefix="$ac_optarg" ;;
368 -program-suffix | --program-suffix | --program-suffi | --program-suff \
369 | --program-suf | --program-su | --program-s)
370 ac_prev=program_suffix ;;
371 -program-suffix=* | --program-suffix=* | --program-suffi=* \
372 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
373 program_suffix="$ac_optarg" ;;
375 -program-transform-name | --program-transform-name \
376 | --program-transform-nam | --program-transform-na \
377 | --program-transform-n | --program-transform- \
378 | --program-transform | --program-transfor \
379 | --program-transfo | --program-transf \
380 | --program-trans | --program-tran \
381 | --progr-tra | --program-tr | --program-t)
382 ac_prev=program_transform_name ;;
383 -program-transform-name=* | --program-transform-name=* \
384 | --program-transform-nam=* | --program-transform-na=* \
385 | --program-transform-n=* | --program-transform-=* \
386 | --program-transform=* | --program-transfor=* \
387 | --program-transfo=* | --program-transf=* \
388 | --program-trans=* | --program-tran=* \
389 | --progr-tra=* | --program-tr=* | --program-t=*)
390 program_transform_name="$ac_optarg" ;;
392 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
393 | -silent | --silent | --silen | --sile | --sil)
394 silent=yes ;;
396 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
397 ac_prev=sbindir ;;
398 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
399 | --sbi=* | --sb=*)
400 sbindir="$ac_optarg" ;;
402 -sharedstatedir | --sharedstatedir | --sharedstatedi \
403 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
404 | --sharedst | --shareds | --shared | --share | --shar \
405 | --sha | --sh)
406 ac_prev=sharedstatedir ;;
407 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
408 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
409 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
410 | --sha=* | --sh=*)
411 sharedstatedir="$ac_optarg" ;;
413 -site | --site | --sit)
414 ac_prev=site ;;
415 -site=* | --site=* | --sit=*)
416 site="$ac_optarg" ;;
418 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
419 ac_prev=srcdir ;;
420 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
421 srcdir="$ac_optarg" ;;
423 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
424 | --syscon | --sysco | --sysc | --sys | --sy)
425 ac_prev=sysconfdir ;;
426 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
427 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
428 sysconfdir="$ac_optarg" ;;
430 -target | --target | --targe | --targ | --tar | --ta | --t)
431 ac_prev=target ;;
432 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
433 target="$ac_optarg" ;;
435 -v | -verbose | --verbose | --verbos | --verbo | --verb)
436 verbose=yes ;;
438 -version | --version | --versio | --versi | --vers)
439 echo "configure generated by autoconf version 2.13"
440 exit 0 ;;
442 -with-* | --with-*)
443 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
444 # Reject names that are not valid shell variable names.
445 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
446 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
449 case "$ac_option" in
450 *=*) ;;
451 *) ac_optarg=yes ;;
452 esac
453 eval "with_${ac_package}='$ac_optarg'" ;;
455 -without-* | --without-*)
456 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
457 # Reject names that are not valid shell variable names.
458 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
459 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
461 ac_package=`echo $ac_package| sed 's/-/_/g'`
462 eval "with_${ac_package}=no" ;;
464 --x)
465 # Obsolete; use --with-x.
466 with_x=yes ;;
468 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469 | --x-incl | --x-inc | --x-in | --x-i)
470 ac_prev=x_includes ;;
471 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473 x_includes="$ac_optarg" ;;
475 -x-libraries | --x-libraries | --x-librarie | --x-librari \
476 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477 ac_prev=x_libraries ;;
478 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480 x_libraries="$ac_optarg" ;;
482 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
486 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
487 echo "configure: warning: $ac_option: invalid host type" 1>&2
489 if test "x$nonopt" != xNONE; then
490 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
492 nonopt="$ac_option"
495 esac
496 done
498 if test -n "$ac_prev"; then
499 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
502 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
504 # File descriptor usage:
505 # 0 standard input
506 # 1 file creation
507 # 2 errors and warnings
508 # 3 some systems may open it to /dev/tty
509 # 4 used on the Kubota Titan
510 # 6 checking for... messages and results
511 # 5 compiler messages saved in config.log
512 if test "$silent" = yes; then
513 exec 6>/dev/null
514 else
515 exec 6>&1
517 exec 5>./config.log
519 echo "\
520 This file contains any messages produced by compilers while
521 running configure, to aid debugging if configure makes a mistake.
522 " 1>&5
524 # Strip out --no-create and --no-recursion so they do not pile up.
525 # Also quote any args containing shell metacharacters.
526 ac_configure_args=
527 for ac_arg
529 case "$ac_arg" in
530 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
531 | --no-cr | --no-c) ;;
532 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
533 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
534 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
535 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
536 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
537 esac
538 done
540 # NLS nuisances.
541 # Only set these to C if already set. These must not be set unconditionally
542 # because not all systems understand e.g. LANG=C (notably SCO).
543 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
544 # Non-C LC_CTYPE values break the ctype check.
545 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
546 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
547 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
548 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
550 # confdefs.h avoids OS command line length limits that DEFS can exceed.
551 rm -rf conftest* confdefs.h
552 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
553 echo > confdefs.h
555 # A filename unique to this package, relative to the directory that
556 # configure is in, which we can look for to find out if srcdir is correct.
557 ac_unique_file=config/libc_r.h
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561 ac_srcdir_defaulted=yes
562 # Try the directory containing this script, then its parent.
563 ac_prog=$0
564 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
565 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566 srcdir=$ac_confdir
567 if test ! -r $srcdir/$ac_unique_file; then
568 srcdir=..
570 else
571 ac_srcdir_defaulted=no
573 if test ! -r $srcdir/$ac_unique_file; then
574 if test "$ac_srcdir_defaulted" = yes; then
575 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
576 else
577 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
580 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
582 # Prefer explicitly selected file to automatically selected ones.
583 if test -z "$CONFIG_SITE"; then
584 if test "x$prefix" != xNONE; then
585 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
586 else
587 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
590 for ac_site_file in $CONFIG_SITE; do
591 if test -r "$ac_site_file"; then
592 echo "loading site script $ac_site_file"
593 . "$ac_site_file"
595 done
597 if test -r "$cache_file"; then
598 echo "loading cache $cache_file"
599 . $cache_file
600 else
601 echo "creating cache $cache_file"
602 > $cache_file
605 ac_ext=c
606 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
607 ac_cpp='$CPP $CPPFLAGS'
608 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
609 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
610 cross_compiling=$ac_cv_prog_cc_cross
612 ac_exeext=
613 ac_objext=o
614 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
615 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
616 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
617 ac_n= ac_c='
618 ' ac_t=' '
619 else
620 ac_n=-n ac_c= ac_t=
622 else
623 ac_n= ac_c='\c' ac_t=
628 ac_aux_dir=
629 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
630 if test -f $ac_dir/install-sh; then
631 ac_aux_dir=$ac_dir
632 ac_install_sh="$ac_aux_dir/install-sh -c"
633 break
634 elif test -f $ac_dir/install.sh; then
635 ac_aux_dir=$ac_dir
636 ac_install_sh="$ac_aux_dir/install.sh -c"
637 break
639 done
640 if test -z "$ac_aux_dir"; then
641 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
643 ac_config_guess=$ac_aux_dir/config.guess
644 ac_config_sub=$ac_aux_dir/config.sub
645 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
648 # Do some error checking and defaulting for the host and target type.
649 # The inputs are:
650 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
652 # The rules are:
653 # 1. You are not allowed to specify --host, --target, and nonopt at the
654 # same time.
655 # 2. Host defaults to nonopt.
656 # 3. If nonopt is not specified, then host defaults to the current host,
657 # as determined by config.guess.
658 # 4. Target and build default to nonopt.
659 # 5. If nonopt is not specified, then target and build default to host.
661 # The aliases save the names the user supplied, while $host etc.
662 # will get canonicalized.
663 case $host---$target---$nonopt in
664 NONE---*---* | *---NONE---* | *---*---NONE) ;;
665 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
666 esac
669 # Make sure we can run config.sub.
670 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
671 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
677 host_alias=$host
678 case "$host_alias" in
679 NONE)
680 case $nonopt in
681 NONE)
682 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
683 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684 fi ;;
685 *) host_alias=$nonopt ;;
686 esac ;;
687 esac
689 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
690 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 echo "$ac_t""$host" 1>&6
695 echo $ac_n "checking target system type""... $ac_c" 1>&6
696 echo "configure:697: checking target system type" >&5
698 target_alias=$target
699 case "$target_alias" in
700 NONE)
701 case $nonopt in
702 NONE) target_alias=$host_alias ;;
703 *) target_alias=$nonopt ;;
704 esac ;;
705 esac
707 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
708 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 echo "$ac_t""$target" 1>&6
713 echo $ac_n "checking build system type""... $ac_c" 1>&6
714 echo "configure:715: checking build system type" >&5
716 build_alias=$build
717 case "$build_alias" in
718 NONE)
719 case $nonopt in
720 NONE) build_alias=$host_alias ;;
721 *) build_alias=$nonopt ;;
722 esac ;;
723 esac
725 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
726 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729 echo "$ac_t""$build" 1>&6
731 test "$host_alias" != "$target_alias" &&
732 test "$program_prefix$program_suffix$program_transform_name" = \
733 NONENONEs,x,x, &&
734 program_prefix=${target_alias}-
737 MOD_MAJOR_VERSION=4
738 MOD_MINOR_VERSION=10
739 MOD_PATCH_VERSION=1
740 NSPR_MODNAME=nspr20
741 _HAVE_PTHREADS=
742 USE_PTHREADS=
743 USE_USER_PTHREADS=
744 USE_NSPR_THREADS=
745 USE_N32=
746 USE_64=
747 USE_CPLUS=
748 USE_IPV6=
749 USE_MDUPDATE=
750 _MACOSX_DEPLOYMENT_TARGET=
751 _OPTIMIZE_FLAGS=-O
752 _DEBUG_FLAGS=-g
753 MOZ_DEBUG=1
754 MOZ_OPTIMIZE=
755 OBJDIR='$(OBJDIR_NAME)'
756 OBJDIR_NAME=.
757 OBJDIR_SUFFIX=OBJ
758 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
759 NOSUCHFILE=/no-such-file
760 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
761 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
762 CYGWIN_WRAPPER=
763 MACOS_SDK_DIR=
764 NEXT_ROOT=
766 MOZ_OS2_HIGH_MEMORY=1
767 PROFILE_GEN_CFLAGS=
768 PROFILE_GEN_LDFLAGS=
769 PROFILE_USE_CFLAGS=
770 PROFILE_USE_LDFLAGS=
772 RESOLVE_LINK_SYMBOLS=
774 CFLAGS="${CFLAGS=}"
775 CXXFLAGS="${CXXFLAGS=}"
776 LDFLAGS="${LDFLAGS=}"
777 DLLFLAGS="${DLLFLAGS=}"
778 HOST_CFLAGS="${HOST_CFLAGS=}"
779 HOST_LDFLAGS="${HOST_LDFLAGS=}"
781 case "$target" in
782 *-cygwin*|*-mingw*)
783 # Check to see if we are really running in a msvc environemnt
784 _WIN32_MSVC=
785 for ac_prog in cl
787 # Extract the first word of "$ac_prog", so it can be a program name with args.
788 set dummy $ac_prog; ac_word=$2
789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
790 echo "configure:791: checking for $ac_word" >&5
791 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
792 echo $ac_n "(cached) $ac_c" 1>&6
793 else
794 if test -n "$CC"; then
795 ac_cv_prog_CC="$CC" # Let the user override the test.
796 else
797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
798 ac_dummy="$PATH"
799 for ac_dir in $ac_dummy; do
800 test -z "$ac_dir" && ac_dir=.
801 if test -f $ac_dir/$ac_word; then
802 ac_cv_prog_CC="$ac_prog"
803 break
805 done
806 IFS="$ac_save_ifs"
809 CC="$ac_cv_prog_CC"
810 if test -n "$CC"; then
811 echo "$ac_t""$CC" 1>&6
812 else
813 echo "$ac_t""no" 1>&6
816 test -n "$CC" && break
817 done
819 if test "$CC" = "cl"; then
820 echo 'main() { return 0; }' > dummy.c
821 ${CC} -o dummy dummy.c >/dev/null 2>&1
822 if test $? = 0; then
823 _WIN32_MSVC=1
824 CXX=$CC
825 else
826 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
828 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
831 *-msvc*)
832 _WIN32_MSVC=1
834 *-mks*)
835 _WIN32_MSVC=1
837 esac
839 if test -n "$_WIN32_MSVC"; then
840 SKIP_PATH_CHECKS=1
841 SKIP_COMPILER_CHECKS=1
842 SKIP_LIBRARY_CHECKS=1
846 # Check whether --with-android-ndk or --without-android-ndk was given.
847 if test "${with_android_ndk+set}" = set; then
848 withval="$with_android_ndk"
849 android_ndk=$withval
853 # Check whether --with-android-toolchain or --without-android-toolchain was given.
854 if test "${with_android_toolchain+set}" = set; then
855 withval="$with_android_toolchain"
856 android_toolchain=$withval
860 case "$target_cpu" in
861 arm)
862 android_version=5
864 i?86|mipsel)
865 android_version=9
867 esac
869 # Check whether --with-android-version or --without-android-version was given.
870 if test "${with_android_version+set}" = set; then
871 withval="$with_android_version"
872 android_version=$withval
876 # Check whether --with-android-platform or --without-android-platform was given.
877 if test "${with_android_platform+set}" = set; then
878 withval="$with_android_platform"
879 android_platform=$withval
883 case "$target" in
884 arm-linux*-android*|*-linuxandroid*)
885 android_tool_prefix="arm-linux-androideabi"
887 i?86-*android*)
888 android_tool_prefix="i686-linux-android"
890 mipsel-*android*)
891 android_tool_prefix="mipsel-linux-android"
894 android_tool_prefix="$target_os"
896 esac
899 # Check whether --with-gonk or --without-gonk was given.
900 if test "${with_gonk+set}" = set; then
901 withval="$with_gonk"
902 gonkdir=$withval
906 if test -n "$gonkdir" ; then
908 if test -z "$HOST_CPPFLAGS" ; then
909 HOST_CPPFLAGS=" "
911 if test -z "$HOST_CFLAGS" ; then
912 HOST_CFLAGS=" "
914 if test -z "$HOST_CXXFLAGS" ; then
915 HOST_CXXFLAGS=" "
917 if test -z "$HOST_LDFLAGS" ; then
918 HOST_LDFLAGS=" "
921 cat >> confdefs.h <<\EOF
922 #define ANDROID 1
925 else
926 case "$target" in
927 *-android*|*-linuxandroid*)
928 if test -z "$android_ndk" ; then
929 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
932 if test -z "$android_toolchain" ; then
933 echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
934 echo "configure:935: checking for android toolchain directory" >&5
936 kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
938 case "$target_cpu" in
939 arm)
940 target_name=arm-linux-androideabi-4.4.3
942 i?86)
943 target_name=x86-4.4.3
945 mipsel)
946 target_name=mipsel-linux-android-4.4.3
948 esac
949 android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
951 if test -d "$android_toolchain" ; then
952 echo "$ac_t""$android_toolchain" 1>&6
953 else
954 { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
958 if test -z "$android_platform" ; then
959 echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
960 echo "configure:961: checking for android platform directory" >&5
962 case "$target_cpu" in
963 arm)
964 target_name=arm
966 i?86)
967 target_name=x86
969 mipsel)
970 target_name=mips
972 esac
974 android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
976 if test -d "$android_platform" ; then
977 echo "$ac_t""$android_platform" 1>&6
978 else
979 { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
983 case "$target_cpu" in
984 i?86)
985 if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
986 android_tool_prefix="i686-android-linux"
989 esac
991 AS="$android_toolchain"/bin/"$android_tool_prefix"-as
992 CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
993 CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
994 CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
995 LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
996 AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
997 RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
998 STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
1000 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
1001 CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
1002 CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
1003 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
1005 if test -z "$HOST_CPPFLAGS" ; then
1006 HOST_CPPFLAGS=" "
1008 if test -z "$HOST_CFLAGS" ; then
1009 HOST_CFLAGS=" "
1011 if test -z "$HOST_CXXFLAGS" ; then
1012 HOST_CXXFLAGS=" "
1014 if test -z "$HOST_LDFLAGS" ; then
1015 HOST_LDFLAGS=" "
1018 cat >> confdefs.h <<\EOF
1019 #define ANDROID 1
1023 esac
1026 dist_prefix='${MOD_DEPTH}/dist'
1027 dist_bindir='${dist_prefix}/bin'
1028 dist_includedir='${dist_prefix}/include/nspr'
1029 dist_libdir='${dist_prefix}/lib'
1030 if test "${includedir}" = '${prefix}/include'; then
1031 includedir='${prefix}/include/nspr'
1034 # Check whether --with-dist-prefix or --without-dist-prefix was given.
1035 if test "${with_dist_prefix+set}" = set; then
1036 withval="$with_dist_prefix"
1037 dist_prefix=$withval
1041 # Check whether --with-dist-bindir or --without-dist-bindir was given.
1042 if test "${with_dist_bindir+set}" = set; then
1043 withval="$with_dist_bindir"
1044 dist_bindir=$withval
1048 # Check whether --with-dist-includedir or --without-dist-includedir was given.
1049 if test "${with_dist_includedir+set}" = set; then
1050 withval="$with_dist_includedir"
1051 dist_includedir=$withval
1055 # Check whether --with-dist-libdir or --without-dist-libdir was given.
1056 if test "${with_dist_libdir+set}" = set; then
1057 withval="$with_dist_libdir"
1058 dist_libdir=$withval
1067 # Check whether --with-mozilla or --without-mozilla was given.
1068 if test "${with_mozilla+set}" = set; then
1069 withval="$with_mozilla"
1070 if test "$withval" = "yes"; then
1071 cat >> confdefs.h <<\EOF
1072 #define MOZILLA_CLIENT 1
1075 MOZILLA_CLIENT=1
1076 else
1077 MOZILLA_CLIENT=
1079 else
1080 if test -n "$MOZILLA_CLIENT"; then
1081 cat >> confdefs.h <<\EOF
1082 #define MOZILLA_CLIENT 1
1089 # Check whether --enable-optimize or --disable-optimize was given.
1090 if test "${enable_optimize+set}" = set; then
1091 enableval="$enable_optimize"
1092 if test "$enableval" != "no"; then
1093 MOZ_OPTIMIZE=1
1094 if test -n "$enableval" -a "$enableval" != "yes"; then
1095 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1096 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
1098 else
1099 MOZ_OPTIMIZE=
1104 # Check whether --enable-debug or --disable-debug was given.
1105 if test "${enable_debug+set}" = set; then
1106 enableval="$enable_debug"
1107 if test "$enableval" != "no"; then
1108 MOZ_DEBUG=1
1109 MOZ_DEBUG_SYMBOLS=1
1110 if test -n "$enableval" -a "$enableval" != "yes"; then
1111 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1112 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1114 else
1115 MOZ_DEBUG=
1117 else
1118 MOZ_DEBUG_SYMBOLS=1
1122 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
1123 if test "${enable_debug_symbols+set}" = set; then
1124 enableval="$enable_debug_symbols"
1125 if test "$enableval" != "no"; then
1126 MOZ_DEBUG_SYMBOLS=1
1127 if test -n "$enableval" -a "$enableval" != "yes"; then
1128 if test -z "$_SAVE_DEBUG_FLAGS"; then
1129 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1130 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1131 else
1132 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
1135 else
1136 MOZ_DEBUG_SYMBOLS=
1141 # Check whether --enable-win32-target or --disable-win32-target was given.
1142 if test "${enable_win32_target+set}" = set; then
1143 enableval="$enable_win32_target"
1144 OS_TARGET=`echo $enableval | tr a-z A-Z`
1148 # Check whether --enable-symbian-target or --disable-symbian-target was given.
1149 if test "${enable_symbian_target+set}" = set; then
1150 enableval="$enable_symbian_target"
1151 OS_TARGET=`echo $enableval | tr a-z A-Z`
1155 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
1156 if test "${enable_debug_rtl+set}" = set; then
1157 enableval="$enable_debug_rtl"
1158 if test "$enableval" = "yes"; then
1159 USE_DEBUG_RTL=1
1164 # Check whether --enable-n32 or --disable-n32 was given.
1165 if test "${enable_n32+set}" = set; then
1166 enableval="$enable_n32"
1167 if test "$enableval" = "yes"; then
1168 USE_N32=1
1169 else if test "$enableval" = "no"; then
1170 USE_N32=
1176 # Check whether --enable-64bit or --disable-64bit was given.
1177 if test "${enable_64bit+set}" = set; then
1178 enableval="$enable_64bit"
1179 if test "$enableval" = "yes"; then
1180 USE_64=1
1185 # Check whether --enable-mdupdate or --disable-mdupdate was given.
1186 if test "${enable_mdupdate+set}" = set; then
1187 enableval="$enable_mdupdate"
1188 if test "$enableval" = "yes"; then
1189 USE_MDUPDATE=1
1194 # Check whether --enable-cplus or --disable-cplus was given.
1195 if test "${enable_cplus+set}" = set; then
1196 enableval="$enable_cplus"
1197 if test "$enableval" = "yes"; then
1198 USE_CPLUS=1
1203 # Check whether --with-arm-kuser or --without-arm-kuser was given.
1204 if test "${with_arm_kuser+set}" = set; then
1205 withval="$with_arm_kuser"
1206 if test "$withval" = "yes"; then
1207 cat >> confdefs.h <<\EOF
1208 #define _PR_ARM_KUSER 1
1215 # Check whether --with-macos-sdk or --without-macos-sdk was given.
1216 if test "${with_macos_sdk+set}" = set; then
1217 withval="$with_macos_sdk"
1218 MACOS_SDK_DIR=$withval
1222 # Check whether --enable-macos-target or --disable-macos-target was given.
1223 if test "${enable_macos_target+set}" = set; then
1224 enableval="$enable_macos_target"
1225 _MACOSX_DEPLOYMENT_TARGET=$enableval
1229 case "$target" in
1231 *-aix*)
1232 case "${target_os}" in
1233 aix3.2*)
1234 USE_NSPR_THREADS=1
1237 USE_PTHREADS=1
1239 esac
1242 esac
1244 if test -z "$CC"; then
1245 case "$target" in
1247 *-aix*)
1248 if test -z "$USE_NSPR_THREADS"; then
1249 CC=xlc_r
1250 else
1251 CC=xlc
1255 *-hpux*)
1256 CC=cc
1259 *-irix*)
1260 CC=cc
1263 *-osf*)
1264 CC=cc
1267 *-solaris*)
1268 CC=cc
1271 esac
1274 if test -z "$CXX"; then
1275 case "$target" in
1277 *-aix*)
1278 if test -z "$USE_NSPR_THREADS"; then
1279 CXX=xlC_r
1280 else
1281 CXX=xlC
1285 *-hpux*)
1286 case "${target_os}" in
1287 hpux10.30)
1288 CXX=aCC
1290 hpux11.*)
1291 CXX=aCC
1294 CXX=CC
1296 esac
1299 *-irix*)
1300 CXX=CC
1303 *-osf*)
1304 CXX=cxx
1307 *-solaris*)
1308 CXX=CC
1311 esac
1314 if test -z "$SKIP_PATH_CHECKS"; then
1315 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1316 set dummy $WHOAMI whoami; ac_word=$2
1317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1318 echo "configure:1319: checking for $ac_word" >&5
1319 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1320 echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322 case "$WHOAMI" in
1324 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1326 ?:/*)
1327 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1331 ac_dummy="$PATH"
1332 for ac_dir in $ac_dummy; do
1333 test -z "$ac_dir" && ac_dir=.
1334 if test -f $ac_dir/$ac_word; then
1335 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1336 break
1338 done
1339 IFS="$ac_save_ifs"
1340 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1342 esac
1344 WHOAMI="$ac_cv_path_WHOAMI"
1345 if test -n "$WHOAMI"; then
1346 echo "$ac_t""$WHOAMI" 1>&6
1347 else
1348 echo "$ac_t""no" 1>&6
1353 if test -n "$MOZ_DEBUG"; then
1354 cat >> confdefs.h <<\EOF
1355 #define DEBUG 1
1358 DEFINES="$DEFINES -UNDEBUG"
1360 case "${target_os}" in
1361 beos*)
1362 DEFINES="$DEFINES -DDEBUG_${USER}"
1364 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1365 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1368 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1370 esac
1371 else
1372 cat >> confdefs.h <<\EOF
1373 #define NDEBUG 1
1376 DEFINES="$DEFINES -UDEBUG"
1379 if test -z "$SKIP_COMPILER_CHECKS"; then
1381 if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
1382 echo "cross compiling from $host to $target"
1383 cross_compiling=yes
1385 _SAVE_CC="$CC"
1386 _SAVE_CFLAGS="$CFLAGS"
1387 _SAVE_LDFLAGS="$LDFLAGS"
1389 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1390 echo "configure:1391: checking for $host compiler" >&5
1391 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1393 # Extract the first word of "$ac_prog", so it can be a program name with args.
1394 set dummy $ac_prog; ac_word=$2
1395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1396 echo "configure:1397: checking for $ac_word" >&5
1397 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1398 echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400 if test -n "$HOST_CC"; then
1401 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1402 else
1403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406 test -z "$ac_dir" && ac_dir=.
1407 if test -f $ac_dir/$ac_word; then
1408 ac_cv_prog_HOST_CC="$ac_prog"
1409 break
1411 done
1412 IFS="$ac_save_ifs"
1415 HOST_CC="$ac_cv_prog_HOST_CC"
1416 if test -n "$HOST_CC"; then
1417 echo "$ac_t""$HOST_CC" 1>&6
1418 else
1419 echo "$ac_t""no" 1>&6
1422 test -n "$HOST_CC" && break
1423 done
1424 test -n "$HOST_CC" || HOST_CC=""""
1426 if test -z "$HOST_CC"; then
1427 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1429 echo "$ac_t""$HOST_CC" 1>&6
1430 if test -z "$HOST_CFLAGS"; then
1431 HOST_CFLAGS="$CFLAGS"
1433 if test -z "$HOST_LDFLAGS"; then
1434 HOST_LDFLAGS="$LDFLAGS"
1437 CC="$HOST_CC"
1438 CFLAGS="$HOST_CFLAGS"
1439 LDFLAGS="$HOST_LDFLAGS"
1441 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1442 echo "configure:1443: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1443 cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1447 int main() {
1448 return 0;
1449 ; return 0; }
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452 rm -rf conftest*
1453 echo "$ac_t""yes" 1>&6
1454 else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1460 rm -f conftest*
1462 CC=$_SAVE_CC
1463 CFLAGS=$_SAVE_CFLAGS
1464 LDFLAGS=$_SAVE_LDFLAGS
1466 case "$build:$target" in
1467 powerpc-apple-darwin8*:i?86-apple-darwin*)
1468 _SAVE_CFLAGS=$CFLAGS
1469 _SAVE_CXXFLAGS=$CXXFLAGS
1470 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1471 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1473 *:arm*-apple-darwin*)
1474 _SAVE_CFLAGS=$CFLAGS
1475 _SAVE_CXXFLAGS=$CXXFLAGS
1476 CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
1477 CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
1479 esac
1481 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1483 # Extract the first word of "$ac_prog", so it can be a program name with args.
1484 set dummy $ac_prog; ac_word=$2
1485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1486 echo "configure:1487: checking for $ac_word" >&5
1487 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1488 echo $ac_n "(cached) $ac_c" 1>&6
1489 else
1490 if test -n "$CC"; then
1491 ac_cv_prog_CC="$CC" # Let the user override the test.
1492 else
1493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1494 ac_dummy="$PATH"
1495 for ac_dir in $ac_dummy; do
1496 test -z "$ac_dir" && ac_dir=.
1497 if test -f $ac_dir/$ac_word; then
1498 ac_cv_prog_CC="$ac_prog"
1499 break
1501 done
1502 IFS="$ac_save_ifs"
1505 CC="$ac_cv_prog_CC"
1506 if test -n "$CC"; then
1507 echo "$ac_t""$CC" 1>&6
1508 else
1509 echo "$ac_t""no" 1>&6
1512 test -n "$CC" && break
1513 done
1514 test -n "$CC" || CC="echo"
1516 unset ac_cv_prog_CC
1517 # Extract the first word of "gcc", so it can be a program name with args.
1518 set dummy gcc; ac_word=$2
1519 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1520 echo "configure:1521: checking for $ac_word" >&5
1521 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1522 echo $ac_n "(cached) $ac_c" 1>&6
1523 else
1524 if test -n "$CC"; then
1525 ac_cv_prog_CC="$CC" # Let the user override the test.
1526 else
1527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530 test -z "$ac_dir" && ac_dir=.
1531 if test -f $ac_dir/$ac_word; then
1532 ac_cv_prog_CC="gcc"
1533 break
1535 done
1536 IFS="$ac_save_ifs"
1539 CC="$ac_cv_prog_CC"
1540 if test -n "$CC"; then
1541 echo "$ac_t""$CC" 1>&6
1542 else
1543 echo "$ac_t""no" 1>&6
1546 if test -z "$CC"; then
1547 # Extract the first word of "cc", so it can be a program name with args.
1548 set dummy cc; ac_word=$2
1549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1550 echo "configure:1551: checking for $ac_word" >&5
1551 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553 else
1554 if test -n "$CC"; then
1555 ac_cv_prog_CC="$CC" # Let the user override the test.
1556 else
1557 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1558 ac_prog_rejected=no
1559 ac_dummy="$PATH"
1560 for ac_dir in $ac_dummy; do
1561 test -z "$ac_dir" && ac_dir=.
1562 if test -f $ac_dir/$ac_word; then
1563 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1564 ac_prog_rejected=yes
1565 continue
1567 ac_cv_prog_CC="cc"
1568 break
1570 done
1571 IFS="$ac_save_ifs"
1572 if test $ac_prog_rejected = yes; then
1573 # We found a bogon in the path, so make sure we never use it.
1574 set dummy $ac_cv_prog_CC
1575 shift
1576 if test $# -gt 0; then
1577 # We chose a different compiler from the bogus one.
1578 # However, it has the same basename, so the bogon will be chosen
1579 # first if we set CC to just the basename; use the full file name.
1580 shift
1581 set dummy "$ac_dir/$ac_word" "$@"
1582 shift
1583 ac_cv_prog_CC="$@"
1588 CC="$ac_cv_prog_CC"
1589 if test -n "$CC"; then
1590 echo "$ac_t""$CC" 1>&6
1591 else
1592 echo "$ac_t""no" 1>&6
1595 if test -z "$CC"; then
1596 case "`uname -s`" in
1597 *win32* | *WIN32*)
1598 # Extract the first word of "cl", so it can be a program name with args.
1599 set dummy cl; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1603 echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605 if test -n "$CC"; then
1606 ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1609 ac_dummy="$PATH"
1610 for ac_dir in $ac_dummy; do
1611 test -z "$ac_dir" && ac_dir=.
1612 if test -f $ac_dir/$ac_word; then
1613 ac_cv_prog_CC="cl"
1614 break
1616 done
1617 IFS="$ac_save_ifs"
1620 CC="$ac_cv_prog_CC"
1621 if test -n "$CC"; then
1622 echo "$ac_t""$CC" 1>&6
1623 else
1624 echo "$ac_t""no" 1>&6
1627 esac
1629 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1632 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1633 echo "configure:1634: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1635 ac_ext=c
1636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1637 ac_cpp='$CPP $CPPFLAGS'
1638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1639 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1640 cross_compiling=$ac_cv_prog_cc_cross
1642 cat > conftest.$ac_ext << EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1647 main(){return(0);}
1649 if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1650 ac_cv_prog_cc_works=yes
1651 # If we can't run a trivial program, we are probably using a cross compiler.
1652 if (./conftest; exit) 2>/dev/null; then
1653 ac_cv_prog_cc_cross=no
1654 else
1655 ac_cv_prog_cc_cross=yes
1657 else
1658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1660 ac_cv_prog_cc_works=no
1662 rm -fr conftest*
1663 ac_ext=c
1664 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1665 ac_cpp='$CPP $CPPFLAGS'
1666 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1667 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1668 cross_compiling=$ac_cv_prog_cc_cross
1670 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1671 if test $ac_cv_prog_cc_works = no; then
1672 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1674 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1675 echo "configure:1676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1676 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1677 cross_compiling=$ac_cv_prog_cc_cross
1679 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1680 echo "configure:1681: checking whether we are using GNU C" >&5
1681 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1682 echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684 cat > conftest.c <<EOF
1685 #ifdef __GNUC__
1686 yes;
1687 #endif
1689 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1690 ac_cv_prog_gcc=yes
1691 else
1692 ac_cv_prog_gcc=no
1696 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1698 if test $ac_cv_prog_gcc = yes; then
1699 GCC=yes
1700 else
1701 GCC=
1704 ac_test_CFLAGS="${CFLAGS+set}"
1705 ac_save_CFLAGS="$CFLAGS"
1706 CFLAGS=
1707 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1708 echo "configure:1709: checking whether ${CC-cc} accepts -g" >&5
1709 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 echo 'void f(){}' > conftest.c
1713 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1714 ac_cv_prog_cc_g=yes
1715 else
1716 ac_cv_prog_cc_g=no
1718 rm -f conftest*
1722 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS="$ac_save_CFLAGS"
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1727 CFLAGS="-g -O2"
1728 else
1729 CFLAGS="-g"
1731 else
1732 if test "$GCC" = yes; then
1733 CFLAGS="-O2"
1734 else
1735 CFLAGS=
1739 if test -n "$USE_CPLUS"; then
1740 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1742 # Extract the first word of "$ac_prog", so it can be a program name with args.
1743 set dummy $ac_prog; ac_word=$2
1744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1745 echo "configure:1746: checking for $ac_word" >&5
1746 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749 if test -n "$CXX"; then
1750 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1751 else
1752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1753 ac_dummy="$PATH"
1754 for ac_dir in $ac_dummy; do
1755 test -z "$ac_dir" && ac_dir=.
1756 if test -f $ac_dir/$ac_word; then
1757 ac_cv_prog_CXX="$ac_prog"
1758 break
1760 done
1761 IFS="$ac_save_ifs"
1764 CXX="$ac_cv_prog_CXX"
1765 if test -n "$CXX"; then
1766 echo "$ac_t""$CXX" 1>&6
1767 else
1768 echo "$ac_t""no" 1>&6
1771 test -n "$CXX" && break
1772 done
1773 test -n "$CXX" || CXX="echo"
1775 unset ac_cv_prog_CXX
1776 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1778 # Extract the first word of "$ac_prog", so it can be a program name with args.
1779 set dummy $ac_prog; ac_word=$2
1780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1781 echo "configure:1782: checking for $ac_word" >&5
1782 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785 if test -n "$CXX"; then
1786 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1787 else
1788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791 test -z "$ac_dir" && ac_dir=.
1792 if test -f $ac_dir/$ac_word; then
1793 ac_cv_prog_CXX="$ac_prog"
1794 break
1796 done
1797 IFS="$ac_save_ifs"
1800 CXX="$ac_cv_prog_CXX"
1801 if test -n "$CXX"; then
1802 echo "$ac_t""$CXX" 1>&6
1803 else
1804 echo "$ac_t""no" 1>&6
1807 test -n "$CXX" && break
1808 done
1809 test -n "$CXX" || CXX="gcc"
1812 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1813 echo "configure:1814: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1815 ac_ext=C
1816 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1817 ac_cpp='$CXXCPP $CPPFLAGS'
1818 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1819 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1820 cross_compiling=$ac_cv_prog_cxx_cross
1822 cat > conftest.$ac_ext << EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1827 int main(){return(0);}
1829 if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1830 ac_cv_prog_cxx_works=yes
1831 # If we can't run a trivial program, we are probably using a cross compiler.
1832 if (./conftest; exit) 2>/dev/null; then
1833 ac_cv_prog_cxx_cross=no
1834 else
1835 ac_cv_prog_cxx_cross=yes
1837 else
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1840 ac_cv_prog_cxx_works=no
1842 rm -fr conftest*
1843 ac_ext=c
1844 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1845 ac_cpp='$CPP $CPPFLAGS'
1846 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1847 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1848 cross_compiling=$ac_cv_prog_cc_cross
1850 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1851 if test $ac_cv_prog_cxx_works = no; then
1852 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1854 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1855 echo "configure:1856: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1856 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1857 cross_compiling=$ac_cv_prog_cxx_cross
1859 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1860 echo "configure:1861: checking whether we are using GNU C++" >&5
1861 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864 cat > conftest.C <<EOF
1865 #ifdef __GNUC__
1866 yes;
1867 #endif
1869 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1870 ac_cv_prog_gxx=yes
1871 else
1872 ac_cv_prog_gxx=no
1876 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1878 if test $ac_cv_prog_gxx = yes; then
1879 GXX=yes
1880 else
1881 GXX=
1884 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1885 ac_save_CXXFLAGS="$CXXFLAGS"
1886 CXXFLAGS=
1887 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1888 echo "configure:1889: checking whether ${CXX-g++} accepts -g" >&5
1889 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892 echo 'void f(){}' > conftest.cc
1893 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1894 ac_cv_prog_cxx_g=yes
1895 else
1896 ac_cv_prog_cxx_g=no
1898 rm -f conftest*
1902 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1903 if test "$ac_test_CXXFLAGS" = set; then
1904 CXXFLAGS="$ac_save_CXXFLAGS"
1905 elif test $ac_cv_prog_cxx_g = yes; then
1906 if test "$GXX" = yes; then
1907 CXXFLAGS="-g -O2"
1908 else
1909 CXXFLAGS="-g"
1911 else
1912 if test "$GXX" = yes; then
1913 CXXFLAGS="-O2"
1914 else
1915 CXXFLAGS=
1921 case "$build:$target" in
1922 powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
1923 CFLAGS=$_SAVE_CFLAGS
1924 CXXFLAGS=$_SAVE_CXXFLAGS
1926 esac
1928 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1930 # Extract the first word of "$ac_prog", so it can be a program name with args.
1931 set dummy $ac_prog; ac_word=$2
1932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1933 echo "configure:1934: checking for $ac_word" >&5
1934 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937 if test -n "$RANLIB"; then
1938 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1939 else
1940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1941 ac_dummy="$PATH"
1942 for ac_dir in $ac_dummy; do
1943 test -z "$ac_dir" && ac_dir=.
1944 if test -f $ac_dir/$ac_word; then
1945 ac_cv_prog_RANLIB="$ac_prog"
1946 break
1948 done
1949 IFS="$ac_save_ifs"
1952 RANLIB="$ac_cv_prog_RANLIB"
1953 if test -n "$RANLIB"; then
1954 echo "$ac_t""$RANLIB" 1>&6
1955 else
1956 echo "$ac_t""no" 1>&6
1959 test -n "$RANLIB" && break
1960 done
1961 test -n "$RANLIB" || RANLIB="echo"
1963 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1965 # Extract the first word of "$ac_prog", so it can be a program name with args.
1966 set dummy $ac_prog; ac_word=$2
1967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1968 echo "configure:1969: checking for $ac_word" >&5
1969 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1970 echo $ac_n "(cached) $ac_c" 1>&6
1971 else
1972 if test -n "$AR"; then
1973 ac_cv_prog_AR="$AR" # Let the user override the test.
1974 else
1975 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1976 ac_dummy="$PATH"
1977 for ac_dir in $ac_dummy; do
1978 test -z "$ac_dir" && ac_dir=.
1979 if test -f $ac_dir/$ac_word; then
1980 ac_cv_prog_AR="$ac_prog"
1981 break
1983 done
1984 IFS="$ac_save_ifs"
1987 AR="$ac_cv_prog_AR"
1988 if test -n "$AR"; then
1989 echo "$ac_t""$AR" 1>&6
1990 else
1991 echo "$ac_t""no" 1>&6
1994 test -n "$AR" && break
1995 done
1996 test -n "$AR" || AR="echo"
1998 for ac_prog in $AS "${target_alias}-as" "${target}-as"
2000 # Extract the first word of "$ac_prog", so it can be a program name with args.
2001 set dummy $ac_prog; ac_word=$2
2002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_word" >&5
2004 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007 if test -n "$AS"; then
2008 ac_cv_prog_AS="$AS" # Let the user override the test.
2009 else
2010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2011 ac_dummy="$PATH"
2012 for ac_dir in $ac_dummy; do
2013 test -z "$ac_dir" && ac_dir=.
2014 if test -f $ac_dir/$ac_word; then
2015 ac_cv_prog_AS="$ac_prog"
2016 break
2018 done
2019 IFS="$ac_save_ifs"
2022 AS="$ac_cv_prog_AS"
2023 if test -n "$AS"; then
2024 echo "$ac_t""$AS" 1>&6
2025 else
2026 echo "$ac_t""no" 1>&6
2029 test -n "$AS" && break
2030 done
2031 test -n "$AS" || AS="echo"
2033 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
2035 # Extract the first word of "$ac_prog", so it can be a program name with args.
2036 set dummy $ac_prog; ac_word=$2
2037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2038 echo "configure:2039: checking for $ac_word" >&5
2039 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042 if test -n "$LD"; then
2043 ac_cv_prog_LD="$LD" # Let the user override the test.
2044 else
2045 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2046 ac_dummy="$PATH"
2047 for ac_dir in $ac_dummy; do
2048 test -z "$ac_dir" && ac_dir=.
2049 if test -f $ac_dir/$ac_word; then
2050 ac_cv_prog_LD="$ac_prog"
2051 break
2053 done
2054 IFS="$ac_save_ifs"
2057 LD="$ac_cv_prog_LD"
2058 if test -n "$LD"; then
2059 echo "$ac_t""$LD" 1>&6
2060 else
2061 echo "$ac_t""no" 1>&6
2064 test -n "$LD" && break
2065 done
2066 test -n "$LD" || LD="echo"
2068 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
2070 # Extract the first word of "$ac_prog", so it can be a program name with args.
2071 set dummy $ac_prog; ac_word=$2
2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2073 echo "configure:2074: checking for $ac_word" >&5
2074 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2076 else
2077 if test -n "$STRIP"; then
2078 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2079 else
2080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2081 ac_dummy="$PATH"
2082 for ac_dir in $ac_dummy; do
2083 test -z "$ac_dir" && ac_dir=.
2084 if test -f $ac_dir/$ac_word; then
2085 ac_cv_prog_STRIP="$ac_prog"
2086 break
2088 done
2089 IFS="$ac_save_ifs"
2092 STRIP="$ac_cv_prog_STRIP"
2093 if test -n "$STRIP"; then
2094 echo "$ac_t""$STRIP" 1>&6
2095 else
2096 echo "$ac_t""no" 1>&6
2099 test -n "$STRIP" && break
2100 done
2101 test -n "$STRIP" || STRIP="echo"
2103 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
2105 # Extract the first word of "$ac_prog", so it can be a program name with args.
2106 set dummy $ac_prog; ac_word=$2
2107 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2108 echo "configure:2109: checking for $ac_word" >&5
2109 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2110 echo $ac_n "(cached) $ac_c" 1>&6
2111 else
2112 if test -n "$WINDRES"; then
2113 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2114 else
2115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2116 ac_dummy="$PATH"
2117 for ac_dir in $ac_dummy; do
2118 test -z "$ac_dir" && ac_dir=.
2119 if test -f $ac_dir/$ac_word; then
2120 ac_cv_prog_WINDRES="$ac_prog"
2121 break
2123 done
2124 IFS="$ac_save_ifs"
2127 WINDRES="$ac_cv_prog_WINDRES"
2128 if test -n "$WINDRES"; then
2129 echo "$ac_t""$WINDRES" 1>&6
2130 else
2131 echo "$ac_t""no" 1>&6
2134 test -n "$WINDRES" && break
2135 done
2136 test -n "$WINDRES" || WINDRES="echo"
2139 else
2140 # Extract the first word of "gcc", so it can be a program name with args.
2141 set dummy gcc; ac_word=$2
2142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2143 echo "configure:2144: checking for $ac_word" >&5
2144 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2145 echo $ac_n "(cached) $ac_c" 1>&6
2146 else
2147 if test -n "$CC"; then
2148 ac_cv_prog_CC="$CC" # Let the user override the test.
2149 else
2150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2151 ac_dummy="$PATH"
2152 for ac_dir in $ac_dummy; do
2153 test -z "$ac_dir" && ac_dir=.
2154 if test -f $ac_dir/$ac_word; then
2155 ac_cv_prog_CC="gcc"
2156 break
2158 done
2159 IFS="$ac_save_ifs"
2162 CC="$ac_cv_prog_CC"
2163 if test -n "$CC"; then
2164 echo "$ac_t""$CC" 1>&6
2165 else
2166 echo "$ac_t""no" 1>&6
2169 if test -z "$CC"; then
2170 # Extract the first word of "cc", so it can be a program name with args.
2171 set dummy cc; ac_word=$2
2172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2173 echo "configure:2174: checking for $ac_word" >&5
2174 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177 if test -n "$CC"; then
2178 ac_cv_prog_CC="$CC" # Let the user override the test.
2179 else
2180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2181 ac_prog_rejected=no
2182 ac_dummy="$PATH"
2183 for ac_dir in $ac_dummy; do
2184 test -z "$ac_dir" && ac_dir=.
2185 if test -f $ac_dir/$ac_word; then
2186 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2187 ac_prog_rejected=yes
2188 continue
2190 ac_cv_prog_CC="cc"
2191 break
2193 done
2194 IFS="$ac_save_ifs"
2195 if test $ac_prog_rejected = yes; then
2196 # We found a bogon in the path, so make sure we never use it.
2197 set dummy $ac_cv_prog_CC
2198 shift
2199 if test $# -gt 0; then
2200 # We chose a different compiler from the bogus one.
2201 # However, it has the same basename, so the bogon will be chosen
2202 # first if we set CC to just the basename; use the full file name.
2203 shift
2204 set dummy "$ac_dir/$ac_word" "$@"
2205 shift
2206 ac_cv_prog_CC="$@"
2211 CC="$ac_cv_prog_CC"
2212 if test -n "$CC"; then
2213 echo "$ac_t""$CC" 1>&6
2214 else
2215 echo "$ac_t""no" 1>&6
2218 if test -z "$CC"; then
2219 case "`uname -s`" in
2220 *win32* | *WIN32*)
2221 # Extract the first word of "cl", so it can be a program name with args.
2222 set dummy cl; ac_word=$2
2223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2224 echo "configure:2225: checking for $ac_word" >&5
2225 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2226 echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228 if test -n "$CC"; then
2229 ac_cv_prog_CC="$CC" # Let the user override the test.
2230 else
2231 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2232 ac_dummy="$PATH"
2233 for ac_dir in $ac_dummy; do
2234 test -z "$ac_dir" && ac_dir=.
2235 if test -f $ac_dir/$ac_word; then
2236 ac_cv_prog_CC="cl"
2237 break
2239 done
2240 IFS="$ac_save_ifs"
2243 CC="$ac_cv_prog_CC"
2244 if test -n "$CC"; then
2245 echo "$ac_t""$CC" 1>&6
2246 else
2247 echo "$ac_t""no" 1>&6
2250 esac
2252 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2255 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2256 echo "configure:2257: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2258 ac_ext=c
2259 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2260 ac_cpp='$CPP $CPPFLAGS'
2261 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2262 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2263 cross_compiling=$ac_cv_prog_cc_cross
2265 cat > conftest.$ac_ext << EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2270 main(){return(0);}
2272 if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2273 ac_cv_prog_cc_works=yes
2274 # If we can't run a trivial program, we are probably using a cross compiler.
2275 if (./conftest; exit) 2>/dev/null; then
2276 ac_cv_prog_cc_cross=no
2277 else
2278 ac_cv_prog_cc_cross=yes
2280 else
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2283 ac_cv_prog_cc_works=no
2285 rm -fr conftest*
2286 ac_ext=c
2287 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2288 ac_cpp='$CPP $CPPFLAGS'
2289 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2290 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2291 cross_compiling=$ac_cv_prog_cc_cross
2293 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2294 if test $ac_cv_prog_cc_works = no; then
2295 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2297 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2298 echo "configure:2299: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2299 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2300 cross_compiling=$ac_cv_prog_cc_cross
2302 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2303 echo "configure:2304: checking whether we are using GNU C" >&5
2304 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307 cat > conftest.c <<EOF
2308 #ifdef __GNUC__
2309 yes;
2310 #endif
2312 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2313 ac_cv_prog_gcc=yes
2314 else
2315 ac_cv_prog_gcc=no
2319 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2321 if test $ac_cv_prog_gcc = yes; then
2322 GCC=yes
2323 else
2324 GCC=
2327 ac_test_CFLAGS="${CFLAGS+set}"
2328 ac_save_CFLAGS="$CFLAGS"
2329 CFLAGS=
2330 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2331 echo "configure:2332: checking whether ${CC-cc} accepts -g" >&5
2332 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2333 echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335 echo 'void f(){}' > conftest.c
2336 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2337 ac_cv_prog_cc_g=yes
2338 else
2339 ac_cv_prog_cc_g=no
2341 rm -f conftest*
2345 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2346 if test "$ac_test_CFLAGS" = set; then
2347 CFLAGS="$ac_save_CFLAGS"
2348 elif test $ac_cv_prog_cc_g = yes; then
2349 if test "$GCC" = yes; then
2350 CFLAGS="-g -O2"
2351 else
2352 CFLAGS="-g"
2354 else
2355 if test "$GCC" = yes; then
2356 CFLAGS="-O2"
2357 else
2358 CFLAGS=
2362 if test -n "$USE_CPLUS"; then
2363 if test "$CC" = "cl" -a -z "$CXX"; then
2364 CXX=$CC
2365 else
2366 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2371 echo "configure:2372: checking for $ac_word" >&5
2372 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 if test -n "$CXX"; then
2376 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2377 else
2378 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2379 ac_dummy="$PATH"
2380 for ac_dir in $ac_dummy; do
2381 test -z "$ac_dir" && ac_dir=.
2382 if test -f $ac_dir/$ac_word; then
2383 ac_cv_prog_CXX="$ac_prog"
2384 break
2386 done
2387 IFS="$ac_save_ifs"
2390 CXX="$ac_cv_prog_CXX"
2391 if test -n "$CXX"; then
2392 echo "$ac_t""$CXX" 1>&6
2393 else
2394 echo "$ac_t""no" 1>&6
2397 test -n "$CXX" && break
2398 done
2399 test -n "$CXX" || CXX="gcc"
2402 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2403 echo "configure:2404: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2405 ac_ext=C
2406 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2407 ac_cpp='$CXXCPP $CPPFLAGS'
2408 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2409 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2410 cross_compiling=$ac_cv_prog_cxx_cross
2412 cat > conftest.$ac_ext << EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2417 int main(){return(0);}
2419 if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2420 ac_cv_prog_cxx_works=yes
2421 # If we can't run a trivial program, we are probably using a cross compiler.
2422 if (./conftest; exit) 2>/dev/null; then
2423 ac_cv_prog_cxx_cross=no
2424 else
2425 ac_cv_prog_cxx_cross=yes
2427 else
2428 echo "configure: failed program was:" >&5
2429 cat conftest.$ac_ext >&5
2430 ac_cv_prog_cxx_works=no
2432 rm -fr conftest*
2433 ac_ext=c
2434 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2435 ac_cpp='$CPP $CPPFLAGS'
2436 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2437 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2438 cross_compiling=$ac_cv_prog_cc_cross
2440 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2441 if test $ac_cv_prog_cxx_works = no; then
2442 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2444 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2445 echo "configure:2446: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2446 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2447 cross_compiling=$ac_cv_prog_cxx_cross
2449 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2450 echo "configure:2451: checking whether we are using GNU C++" >&5
2451 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454 cat > conftest.C <<EOF
2455 #ifdef __GNUC__
2456 yes;
2457 #endif
2459 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2460 ac_cv_prog_gxx=yes
2461 else
2462 ac_cv_prog_gxx=no
2466 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2468 if test $ac_cv_prog_gxx = yes; then
2469 GXX=yes
2470 else
2471 GXX=
2474 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2475 ac_save_CXXFLAGS="$CXXFLAGS"
2476 CXXFLAGS=
2477 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2478 echo "configure:2479: checking whether ${CXX-g++} accepts -g" >&5
2479 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482 echo 'void f(){}' > conftest.cc
2483 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2484 ac_cv_prog_cxx_g=yes
2485 else
2486 ac_cv_prog_cxx_g=no
2488 rm -f conftest*
2492 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2493 if test "$ac_test_CXXFLAGS" = set; then
2494 CXXFLAGS="$ac_save_CXXFLAGS"
2495 elif test $ac_cv_prog_cxx_g = yes; then
2496 if test "$GXX" = yes; then
2497 CXXFLAGS="-g -O2"
2498 else
2499 CXXFLAGS="-g"
2501 else
2502 if test "$GXX" = yes; then
2503 CXXFLAGS="-O2"
2504 else
2505 CXXFLAGS=
2511 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2512 echo "configure:2513: checking how to run the C preprocessor" >&5
2513 # On Suns, sometimes $CPP names a directory.
2514 if test -n "$CPP" && test -d "$CPP"; then
2515 CPP=
2517 if test -z "$CPP"; then
2518 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2519 echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521 # This must be in double quotes, not single quotes, because CPP may get
2522 # substituted into the Makefile and "${CC-cc}" will confuse make.
2523 CPP="${CC-cc} -E"
2524 # On the NeXT, cc -E runs the code through the compiler's parser,
2525 # not just through cpp.
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 #include <assert.h>
2530 Syntax Error
2532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2533 { (eval echo configure:2534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535 if test -z "$ac_err"; then
2537 else
2538 echo "$ac_err" >&5
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 rm -rf conftest*
2542 CPP="${CC-cc} -E -traditional-cpp"
2543 cat > conftest.$ac_ext <<EOF
2544 #line 2545 "configure"
2545 #include "confdefs.h"
2546 #include <assert.h>
2547 Syntax Error
2549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2550 { (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552 if test -z "$ac_err"; then
2554 else
2555 echo "$ac_err" >&5
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -rf conftest*
2559 CPP="${CC-cc} -nologo -E"
2560 cat > conftest.$ac_ext <<EOF
2561 #line 2562 "configure"
2562 #include "confdefs.h"
2563 #include <assert.h>
2564 Syntax Error
2566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2567 { (eval echo configure:2568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2569 if test -z "$ac_err"; then
2571 else
2572 echo "$ac_err" >&5
2573 echo "configure: failed program was:" >&5
2574 cat conftest.$ac_ext >&5
2575 rm -rf conftest*
2576 CPP=/lib/cpp
2578 rm -f conftest*
2580 rm -f conftest*
2582 rm -f conftest*
2583 ac_cv_prog_CPP="$CPP"
2585 CPP="$ac_cv_prog_CPP"
2586 else
2587 ac_cv_prog_CPP="$CPP"
2589 echo "$ac_t""$CPP" 1>&6
2591 # Extract the first word of "ranlib", so it can be a program name with args.
2592 set dummy ranlib; ac_word=$2
2593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_word" >&5
2595 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2596 echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598 if test -n "$RANLIB"; then
2599 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2600 else
2601 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2602 ac_dummy="$PATH"
2603 for ac_dir in $ac_dummy; do
2604 test -z "$ac_dir" && ac_dir=.
2605 if test -f $ac_dir/$ac_word; then
2606 ac_cv_prog_RANLIB="ranlib"
2607 break
2609 done
2610 IFS="$ac_save_ifs"
2611 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2614 RANLIB="$ac_cv_prog_RANLIB"
2615 if test -n "$RANLIB"; then
2616 echo "$ac_t""$RANLIB" 1>&6
2617 else
2618 echo "$ac_t""no" 1>&6
2621 for ac_prog in as
2623 # Extract the first word of "$ac_prog", so it can be a program name with args.
2624 set dummy $ac_prog; ac_word=$2
2625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2626 echo "configure:2627: checking for $ac_word" >&5
2627 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630 case "$AS" in
2632 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2634 ?:/*)
2635 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2639 ac_dummy="$PATH"
2640 for ac_dir in $ac_dummy; do
2641 test -z "$ac_dir" && ac_dir=.
2642 if test -f $ac_dir/$ac_word; then
2643 ac_cv_path_AS="$ac_dir/$ac_word"
2644 break
2646 done
2647 IFS="$ac_save_ifs"
2649 esac
2651 AS="$ac_cv_path_AS"
2652 if test -n "$AS"; then
2653 echo "$ac_t""$AS" 1>&6
2654 else
2655 echo "$ac_t""no" 1>&6
2658 test -n "$AS" && break
2659 done
2660 test -n "$AS" || AS="$CC"
2662 for ac_prog in ar
2664 # Extract the first word of "$ac_prog", so it can be a program name with args.
2665 set dummy $ac_prog; ac_word=$2
2666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2667 echo "configure:2668: checking for $ac_word" >&5
2668 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2669 echo $ac_n "(cached) $ac_c" 1>&6
2670 else
2671 case "$AR" in
2673 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2675 ?:/*)
2676 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2680 ac_dummy="$PATH"
2681 for ac_dir in $ac_dummy; do
2682 test -z "$ac_dir" && ac_dir=.
2683 if test -f $ac_dir/$ac_word; then
2684 ac_cv_path_AR="$ac_dir/$ac_word"
2685 break
2687 done
2688 IFS="$ac_save_ifs"
2690 esac
2692 AR="$ac_cv_path_AR"
2693 if test -n "$AR"; then
2694 echo "$ac_t""$AR" 1>&6
2695 else
2696 echo "$ac_t""no" 1>&6
2699 test -n "$AR" && break
2700 done
2701 test -n "$AR" || AR="echo not_ar"
2703 for ac_prog in ld link
2705 # Extract the first word of "$ac_prog", so it can be a program name with args.
2706 set dummy $ac_prog; ac_word=$2
2707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_word" >&5
2709 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712 case "$LD" in
2714 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2716 ?:/*)
2717 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2721 ac_dummy="$PATH"
2722 for ac_dir in $ac_dummy; do
2723 test -z "$ac_dir" && ac_dir=.
2724 if test -f $ac_dir/$ac_word; then
2725 ac_cv_path_LD="$ac_dir/$ac_word"
2726 break
2728 done
2729 IFS="$ac_save_ifs"
2731 esac
2733 LD="$ac_cv_path_LD"
2734 if test -n "$LD"; then
2735 echo "$ac_t""$LD" 1>&6
2736 else
2737 echo "$ac_t""no" 1>&6
2740 test -n "$LD" && break
2741 done
2742 test -n "$LD" || LD="echo not_ld"
2744 for ac_prog in strip
2746 # Extract the first word of "$ac_prog", so it can be a program name with args.
2747 set dummy $ac_prog; ac_word=$2
2748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2749 echo "configure:2750: checking for $ac_word" >&5
2750 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753 case "$STRIP" in
2755 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2757 ?:/*)
2758 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2762 ac_dummy="$PATH"
2763 for ac_dir in $ac_dummy; do
2764 test -z "$ac_dir" && ac_dir=.
2765 if test -f $ac_dir/$ac_word; then
2766 ac_cv_path_STRIP="$ac_dir/$ac_word"
2767 break
2769 done
2770 IFS="$ac_save_ifs"
2772 esac
2774 STRIP="$ac_cv_path_STRIP"
2775 if test -n "$STRIP"; then
2776 echo "$ac_t""$STRIP" 1>&6
2777 else
2778 echo "$ac_t""no" 1>&6
2781 test -n "$STRIP" && break
2782 done
2783 test -n "$STRIP" || STRIP="echo not_strip"
2785 for ac_prog in windres
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2792 echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794 case "$WINDRES" in
2796 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2798 ?:/*)
2799 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2803 ac_dummy="$PATH"
2804 for ac_dir in $ac_dummy; do
2805 test -z "$ac_dir" && ac_dir=.
2806 if test -f $ac_dir/$ac_word; then
2807 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2808 break
2810 done
2811 IFS="$ac_save_ifs"
2813 esac
2815 WINDRES="$ac_cv_path_WINDRES"
2816 if test -n "$WINDRES"; then
2817 echo "$ac_t""$WINDRES" 1>&6
2818 else
2819 echo "$ac_t""no" 1>&6
2822 test -n "$WINDRES" && break
2823 done
2824 test -n "$WINDRES" || WINDRES="echo not_windres"
2826 if test -z "$HOST_CC"; then
2827 HOST_CC="$CC"
2829 if test -z "$HOST_CFLAGS"; then
2830 HOST_CFLAGS="$CFLAGS"
2834 if test "$GCC" = "yes"; then
2835 GNU_CC=1
2837 if test "$GXX" = "yes"; then
2838 GNU_CXX=1
2840 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2841 GNU_AS=1
2843 rm -f a.out
2845 case "$build:$target" in
2846 i?86-apple-darwin*:powerpc-apple-darwin*)
2847 cross_compiling=yes
2849 esac
2851 if test "$cross_compiling" = "yes"; then
2852 CROSS_COMPILE=1
2853 else
2854 CROSS_COMPILE=
2857 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2858 echo "configure:2859: checking for gcc -pipe support" >&5
2859 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2860 echo '#include <stdio.h>' > dummy-hello.c
2861 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2862 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2863 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2864 if test $? = 0; then
2865 _res_as_stdin="yes"
2866 else
2867 _res_as_stdin="no"
2869 if test "$_res_as_stdin" = "yes"; then
2870 _SAVE_CFLAGS=$CFLAGS
2871 CFLAGS="$CFLAGS -pipe"
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <stdio.h>
2876 int main() {
2877 printf("Hello World\n");
2878 ; return 0; }
2880 if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2881 rm -rf conftest*
2882 _res_gcc_pipe="yes"
2883 else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 _res_gcc_pipe="no"
2889 rm -f conftest*
2890 CFLAGS=$_SAVE_CFLAGS
2892 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2893 _res="yes";
2894 CFLAGS="$CFLAGS -pipe"
2895 CXXFLAGS="$CXXFLAGS -pipe"
2896 else
2897 _res="no"
2899 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2900 echo "$ac_t""$_res" 1>&6
2901 else
2902 echo "$ac_t""no" 1>&6
2906 _SAVE_CFLAGS="$CFLAGS"
2907 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2909 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2910 echo "configure:2911: checking whether C compiler supports -fprofile-generate" >&5
2911 cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2915 int main() {
2916 return 0;
2917 ; return 0; }
2919 if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2920 rm -rf conftest*
2921 PROFILE_GEN_CFLAGS="-fprofile-generate"
2922 result="yes"
2923 else
2924 echo "configure: failed program was:" >&5
2925 cat conftest.$ac_ext >&5
2926 rm -rf conftest*
2927 result="no"
2929 rm -f conftest*
2930 echo "$ac_t""$result" 1>&6
2932 if test $result = "yes"; then
2933 PROFILE_GEN_LDFLAGS="-fprofile-generate"
2934 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
2935 PROFILE_USE_LDFLAGS="-fprofile-use"
2938 CFLAGS="$_SAVE_CFLAGS"
2940 if test "$GNU_CC"; then
2941 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2942 echo "configure:2943: checking for visibility(hidden) attribute" >&5
2943 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2944 echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946 cat > conftest.c <<EOF
2947 int foo __attribute__ ((visibility ("hidden"))) = 1;
2949 ac_cv_visibility_hidden=no
2950 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2951 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2952 ac_cv_visibility_hidden=yes
2955 rm -f conftest.cs
2959 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2960 if test "$ac_cv_visibility_hidden" = "yes"; then
2961 cat >> confdefs.h <<\EOF
2962 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2965 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2966 echo "configure:2967: checking for visibility pragma support" >&5
2967 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2968 echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970 cat > conftest.c <<EOF
2971 #pragma GCC visibility push(hidden)
2972 int foo_hidden = 1;
2973 #pragma GCC visibility push(default)
2974 int foo_default = 1;
2976 ac_cv_visibility_pragma=no
2977 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2978 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2979 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2980 ac_cv_visibility_pragma=yes
2984 rm -f conftest.cs
2988 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2989 if test "$ac_cv_visibility_pragma" = "yes"; then
2990 cat >> confdefs.h <<\EOF
2991 #define HAVE_VISIBILITY_PRAGMA 1
2994 # To work around a build problem on Linux x86-64 (Bugzilla bug
2995 # 293438), we use the -fvisibility=hidden flag. This flag is less
2996 # optimal than #pragma GCC visibility push(hidden) because the flag
2997 # assumes that symbols defined outside the current source file have
2998 # the default visibility. This has the advantage that we don't need
2999 # to wrap system header files, but has the disadvantage that calls
3000 # to hidden symbols defined in other source files cannot be
3001 # optimized by the compiler. The -fvisibility=hidden flag does
3002 # hide and export symbols correctly.
3003 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
3004 #WRAP_SYSTEM_INCLUDES=1
3005 VISIBILITY_FLAGS="-fvisibility=hidden"
3006 WRAP_SYSTEM_INCLUDES=
3009 fi # GNU_CC
3011 fi # SKIP_COMPILER_CHECKS
3013 if test -z "$SKIP_PATH_CHECKS"; then
3014 for ac_prog in perl5 perl
3016 # Extract the first word of "$ac_prog", so it can be a program name with args.
3017 set dummy $ac_prog; ac_word=$2
3018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3019 echo "configure:3020: checking for $ac_word" >&5
3020 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023 case "$PERL" in
3025 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3027 ?:/*)
3028 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
3031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3032 ac_dummy="$PATH"
3033 for ac_dir in $ac_dummy; do
3034 test -z "$ac_dir" && ac_dir=.
3035 if test -f $ac_dir/$ac_word; then
3036 ac_cv_path_PERL="$ac_dir/$ac_word"
3037 break
3039 done
3040 IFS="$ac_save_ifs"
3042 esac
3044 PERL="$ac_cv_path_PERL"
3045 if test -n "$PERL"; then
3046 echo "$ac_t""$PERL" 1>&6
3047 else
3048 echo "$ac_t""no" 1>&6
3051 test -n "$PERL" && break
3052 done
3053 test -n "$PERL" || PERL="echo not_perl"
3055 elif test -z "$PERL"; then
3056 PERL=perl
3059 OBJ_SUFFIX=o
3060 LIB_SUFFIX=a
3061 DLL_SUFFIX=so
3062 ASM_SUFFIX=s
3063 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
3064 PR_MD_ASFILES=
3065 PR_MD_CSRCS=
3066 PR_MD_ARCH_DIR=unix
3067 AR_FLAGS='cr $@'
3068 AS='$(CC)'
3069 ASFLAGS='$(CFLAGS)'
3071 if test -n "$CROSS_COMPILE"; then
3072 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
3073 OS_RELEASE=
3074 OS_TEST="${target_cpu}"
3075 case "${target_os}" in
3076 linux*) OS_ARCH=Linux ;;
3077 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
3078 mingw*) OS_ARCH=WINNT ;;
3079 wince*) OS_ARCH=WINCE ;;
3080 winmo*) OS_ARCH=WINCE ;;
3081 darwin*) OS_ARCH=Darwin ;;
3082 riscos*) OS_ARCH=RISCOS ;;
3083 esac
3084 else
3085 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
3086 OS_RELEASE=`uname -r`
3087 OS_TEST=`uname -m`
3090 if test "$OS_ARCH" = "IRIX64"; then
3091 OS_ARCH=IRIX
3094 if test "$OS_ARCH" = "AIX"; then
3095 OS_RELEASE=`uname -v`.`uname -r`
3098 if test "$OS_ARCH" = "FreeBSD"; then
3099 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3102 if test "$OS_ARCH" = "Linux"; then
3103 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3104 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
3107 #######################################################################
3108 # Master "Core Components" macros for getting the OS target #
3109 #######################################################################
3112 # Note: OS_TARGET should be specified on the command line for gmake.
3113 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
3114 # The difference between the Win95 target and the WinNT target is that
3115 # the WinNT target uses Windows NT specific features not available
3116 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
3117 # at lesser performance (the Win95 target uses threads; the WinNT target
3118 # uses fibers).
3120 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
3121 # cross-compilation.
3125 # The following hack allows one to build on a WIN95 machine (as if
3126 # s/he were cross-compiling on a WINNT host for a WIN95 target).
3127 # It also accomodates for MKS's uname.exe. If you never intend
3128 # to do development on a WIN95 machine, you don't need this hack.
3130 case "$OS_ARCH" in
3131 WIN95)
3132 OS_ARCH=WINNT
3133 OS_TARGET=WIN95
3135 Windows_95)
3136 OS_ARCH=Windows_NT
3137 OS_TARGET=WIN95
3139 Windows_98)
3140 OS_ARCH=Windows_NT
3141 OS_TARGET=WIN95
3143 CYGWIN_9*|CYGWIN_ME*)
3144 OS_ARCH='CYGWIN_NT-4.0'
3145 OS_TARGET=WIN95
3147 OS_2)
3148 OS_ARCH=OS2
3149 OS_TARGET=OS2
3151 esac
3154 # On WIN32, we also define the variable CPU_ARCH.
3157 case "$OS_ARCH" in
3158 WINNT)
3159 CPU_ARCH=`uname -p`
3160 if test "$CPU_ARCH" = "I386"; then
3161 CPU_ARCH=x86
3164 Windows_NT)
3166 # If uname -s returns "Windows_NT", we assume that we are using
3167 # the uname.exe in MKS toolkit.
3169 # The -r option of MKS uname only returns the major version number.
3170 # So we need to use its -v option to get the minor version number.
3171 # Moreover, it doesn't have the -p option, so we need to use uname -m.
3173 OS_ARCH=WINNT
3174 OS_MINOR_RELEASE=`uname -v`
3175 if test "$OS_MINOR_RELEASE" = "00"; then
3176 OS_MINOR_RELEASE=0
3178 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
3179 CPU_ARCH=`uname -m`
3181 # MKS's uname -m returns "586" on a Pentium machine.
3183 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3184 CPU_ARCH=x86
3187 CYGWIN_NT*|MINGW*_NT*)
3189 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
3190 # the uname.exe in the Cygwin tools.
3191 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
3192 # the uname.exe in the MSYS tools.
3194 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
3195 OS_ARCH=WINNT
3196 CPU_ARCH=`uname -m`
3198 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
3200 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3201 CPU_ARCH=x86
3204 esac
3206 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
3207 OS_TARGET=WIN95
3208 if test -n "$MOZ_DEBUG"; then
3209 USE_DEBUG_RTL=1
3212 if test -z "$OS_TARGET"; then
3213 OS_TARGET=$OS_ARCH
3215 if test "$OS_TARGET" = "WIN95"; then
3216 OS_RELEASE="4.0"
3218 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
3220 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
3221 if test "${enable_os2_high_mem+set}" = set; then
3222 enableval="$enable_os2_high_mem"
3223 if test "$enableval" = "no"; then
3224 MOZ_OS2_HIGH_MEMORY=
3225 else
3226 MOZ_OS2_HIGH_MEMORY=1
3232 case "$target" in
3233 arm*-android*|arm*-linuxandroid*)
3234 MOZ_THUMB=yes
3235 MOZ_ARCH=armv7-a
3236 MOZ_FPU=vfp
3237 MOZ_FLOAT_ABI=softfp
3238 MOZ_SOFT_FLOAT=yes
3240 arm*-*)
3241 if test -n "$MOZ_PLATFORM_MAEMO"; then
3242 MOZ_THUMB=no
3243 MOZ_ARCH=armv7-a
3244 MOZ_FLOAT_ABI=softfp
3246 if test "$MOZ_PLATFORM_MAEMO" = 6; then
3247 MOZ_THUMB=yes
3250 esac
3252 # Check whether --enable-thumb2 or --disable-thumb2 was given.
3253 if test "${enable_thumb2+set}" = set; then
3254 enableval="$enable_thumb2"
3255 MOZ_THUMB=$enableval
3259 # Check whether --with-thumb or --without-thumb was given.
3260 if test "${with_thumb+set}" = set; then
3261 withval="$with_thumb"
3262 if test -z "$GNU_CC"; then
3263 { echo "configure: error: --with-thumb is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3265 MOZ_THUMB=$withval
3269 # Check whether --with-thumb-interwork or --without-thumb-interwork was given.
3270 if test "${with_thumb_interwork+set}" = set; then
3271 withval="$with_thumb_interwork"
3272 if test -z "$GNU_CC"; then
3273 { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3275 MOZ_THUMB_INTERWORK=$withval
3279 # Check whether --with-arch or --without-arch was given.
3280 if test "${with_arch+set}" = set; then
3281 withval="$with_arch"
3282 if test -z "$GNU_CC"; then
3283 { echo "configure: error: --with-arch is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3285 MOZ_ARCH=$withval
3289 # Check whether --with-fpu or --without-fpu was given.
3290 if test "${with_fpu+set}" = set; then
3291 withval="$with_fpu"
3292 if test -z "$GNU_CC"; then
3293 { echo "configure: error: --with-fpu is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3295 MOZ_FPU=$withval
3299 # Check whether --with-float-abi or --without-float-abi was given.
3300 if test "${with_float_abi+set}" = set; then
3301 withval="$with_float_abi"
3302 if test -z "$GNU_CC"; then
3303 { echo "configure: error: --with-float-abi is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3305 MOZ_FLOAT_ABI=$withval
3309 # Check whether --with-soft-float or --without-soft-float was given.
3310 if test "${with_soft_float+set}" = set; then
3311 withval="$with_soft_float"
3312 if test -z "$GNU_CC"; then
3313 { echo "configure: error: --with-soft-float is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3315 MOZ_SOFT_FLOAT=$withval
3319 case "$MOZ_ARCH" in
3320 toolchain-default|"")
3321 arch_flag=""
3324 arch_flag="-march=$MOZ_ARCH"
3326 esac
3328 case "$MOZ_THUMB" in
3329 yes)
3330 MOZ_THUMB2=1
3331 thumb_flag="-mthumb"
3334 MOZ_THUMB2=
3335 thumb_flag="-marm"
3338 _SAVE_CFLAGS="$CFLAGS"
3339 CFLAGS="$arch_flag"
3340 cat > conftest.$ac_ext <<EOF
3341 #line 3342 "configure"
3342 #include "confdefs.h"
3344 int main() {
3345 return sizeof(__thumb2__);
3346 ; return 0; }
3348 if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3349 rm -rf conftest*
3350 MOZ_THUMB2=1
3351 else
3352 echo "configure: failed program was:" >&5
3353 cat conftest.$ac_ext >&5
3354 rm -rf conftest*
3355 MOZ_THUMB2=
3357 rm -f conftest*
3358 CFLAGS="$_SAVE_CFLAGS"
3359 thumb_flag=""
3361 esac
3363 case "$MOZ_THUMB_INTERWORK" in
3364 yes)
3365 thumb_interwork_flag="-mthumb-interwork"
3368 thumb_interwork_flag="-mno-thumb-interwork"
3370 *) # toolchain-default
3371 thumb_interwork_flag=""
3373 esac
3375 case "$MOZ_FPU" in
3376 toolchain-default|"")
3377 fpu_flag=""
3380 fpu_flag="-mfpu=$MOZ_FPU"
3382 esac
3384 case "$MOZ_FLOAT_ABI" in
3385 toolchain-default|"")
3386 float_abi_flag=""
3389 float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
3391 esac
3393 case "$MOZ_SOFT_FLOAT" in
3394 yes)
3395 soft_float_flag="-msoft-float"
3398 soft_float_flag="-mno-soft-float"
3400 *) # toolchain-default
3401 soft_float_flag=""
3403 esac
3405 all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
3406 if test -n "$all_flags"; then
3407 _SAVE_CFLAGS="$CFLAGS"
3408 CFLAGS="$all_flags"
3409 echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
3410 echo "configure:3411: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
3411 cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3415 int main() {
3416 return 0;
3417 ; return 0; }
3419 if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3420 rm -rf conftest*
3421 echo "$ac_t""yes" 1>&6
3422 else
3423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3425 rm -rf conftest*
3426 { echo "configure: error: no" 1>&2; exit 1; }
3428 rm -f conftest*
3430 CFLAGS="$_SAVE_CFLAGS $all_flags"
3431 CXXFLAGS="$CXXFLAGS $all_flags"
3432 ASFLAGS="$ASFLAGS $all_flags"
3433 if test -n "$thumb_flag"; then
3434 LDFLAGS="$LDFLAGS $thumb_flag"
3438 case "$host" in
3439 *-mingw*)
3440 NSINSTALL=nsinstall
3442 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
3443 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
3444 if test `echo "${PATH}" | grep -c \;` = 0; then
3445 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
3448 *-beos*)
3449 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
3451 *os2*)
3454 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
3456 esac
3458 case "$target" in
3460 *-aix*)
3461 cat >> confdefs.h <<\EOF
3462 #define XP_UNIX 1
3465 cat >> confdefs.h <<\EOF
3466 #define AIX 1
3469 cat >> confdefs.h <<\EOF
3470 #define SYSV 1
3473 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3474 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3475 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3476 echo "configure:3477: checking for sys/atomic_op.h" >&5
3477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3478 echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480 cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <sys/atomic_op.h>
3485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3486 { (eval echo configure:3487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3488 if test -z "$ac_err"; then
3489 rm -rf conftest*
3490 eval "ac_cv_header_$ac_safe=yes"
3491 else
3492 echo "$ac_err" >&5
3493 echo "configure: failed program was:" >&5
3494 cat conftest.$ac_ext >&5
3495 rm -rf conftest*
3496 eval "ac_cv_header_$ac_safe=no"
3498 rm -f conftest*
3500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3501 echo "$ac_t""yes" 1>&6
3502 cat >> confdefs.h <<\EOF
3503 #define AIX_HAVE_ATOMIC_OP_H 1
3506 else
3507 echo "$ac_t""no" 1>&6
3510 case "${target_os}" in
3511 aix3.2*)
3512 cat >> confdefs.h <<\EOF
3513 #define AIX_RENAME_SELECT 1
3516 cat >> confdefs.h <<\EOF
3517 #define _PR_NO_LARGE_FILES 1
3520 AIX_LINK_OPTS='-bnso -berok'
3521 PR_MD_ASFILES=os_AIX.s
3523 aix4.1*)
3524 cat >> confdefs.h <<\EOF
3525 #define AIX_TIMERS 1
3528 cat >> confdefs.h <<\EOF
3529 #define _PR_NO_LARGE_FILES 1
3532 cat >> confdefs.h <<\EOF
3533 #define AIX4_1 1
3536 MKSHLIB=
3537 DSO_LDOPTS=
3538 AIX_LINK_OPTS='-bnso -berok'
3539 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3540 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3542 aix4.2*)
3543 cat >> confdefs.h <<\EOF
3544 #define AIX_TIMERS 1
3547 cat >> confdefs.h <<\EOF
3548 #define _PR_HAVE_OFF64_T 1
3551 AIX_LINK_OPTS='-brtl -bnso -berok'
3553 aix4.3*)
3554 cat >> confdefs.h <<\EOF
3555 #define AIX_TIMERS 1
3558 cat >> confdefs.h <<\EOF
3559 #define _PR_HAVE_OFF64_T 1
3562 cat >> confdefs.h <<\EOF
3563 #define AIX4_3_PLUS 1
3566 cat >> confdefs.h <<\EOF
3567 #define HAVE_SOCKLEN_T 1
3570 cat >> confdefs.h <<\EOF
3571 #define HAVE_FCNTL_FILE_LOCKING 1
3574 USE_IPV6=1
3575 AIX_LINK_OPTS='-brtl -bnso -berok'
3578 cat >> confdefs.h <<\EOF
3579 #define AIX_TIMERS 1
3582 cat >> confdefs.h <<\EOF
3583 #define _PR_HAVE_OFF64_T 1
3586 cat >> confdefs.h <<\EOF
3587 #define AIX4_3_PLUS 1
3590 cat >> confdefs.h <<\EOF
3591 #define HAVE_SOCKLEN_T 1
3594 cat >> confdefs.h <<\EOF
3595 #define HAVE_FCNTL_FILE_LOCKING 1
3598 USE_IPV6=1
3599 AIX_LINK_OPTS='-brtl -bnso -berok'
3601 esac
3602 CFLAGS="$CFLAGS -qro -qroconst"
3603 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3604 AIX_TMP='./_aix_tmp.o'
3605 if test -n "$USE_64"; then
3606 MDCPUCFG_H=_aix64.cfg
3607 OBJECT_MODE=64
3608 else
3609 MDCPUCFG_H=_aix32.cfg
3611 PR_MD_CSRCS=aix.c
3612 RESOLVE_LINK_SYMBOLS=1
3615 *-beos*)
3616 cat >> confdefs.h <<\EOF
3617 #define XP_BEOS 1
3620 cat >> confdefs.h <<\EOF
3621 #define BeOS 1
3624 cat >> confdefs.h <<\EOF
3625 #define BEOS 1
3628 cat >> confdefs.h <<\EOF
3629 #define _POSIX_SOURCE 1
3632 DSO_LDOPTS=-nostart
3633 MDCPUCFG_H=_beos.cfg
3634 USE_BTHREADS=1
3635 PR_MD_ARCH_DIR=beos
3636 RESOLVE_LINK_SYMBOLS=1
3637 case "${target_cpu}" in
3638 i*86)
3639 _OPTIMIZE_FLAGS=-O2
3640 _DEBUG_FLAGS='-gdwarf-2 -O0'
3641 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3642 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3643 echo "configure:3644: checking for gethostbyaddr in -lbind" >&5
3644 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3645 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648 ac_save_LIBS="$LIBS"
3649 LIBS="-lbind $LIBS"
3650 cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 /* Override any gcc2 internal prototype to avoid an error. */
3654 /* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3656 char gethostbyaddr();
3658 int main() {
3659 gethostbyaddr()
3660 ; return 0; }
3662 if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3663 rm -rf conftest*
3664 eval "ac_cv_lib_$ac_lib_var=yes"
3665 else
3666 echo "configure: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 rm -rf conftest*
3669 eval "ac_cv_lib_$ac_lib_var=no"
3671 rm -f conftest*
3672 LIBS="$ac_save_LIBS"
3675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3676 echo "$ac_t""yes" 1>&6
3677 OS_LIBS="$OS_LIBS -lbind -lsocket"
3678 else
3679 echo "$ac_t""no" 1>&6
3683 powerpc)
3684 CC=mwcc
3685 CCC=mwcc
3686 LD=mwld
3687 DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o'
3688 _OPTIMIZE_FLAGS=-O2
3689 _DEBUG_FLAGS='-g -O0'
3691 esac
3694 *-bsdi*)
3695 cat >> confdefs.h <<\EOF
3696 #define XP_UNIX 1
3699 cat >> confdefs.h <<\EOF
3700 #define BSDI 1
3703 cat >> confdefs.h <<\EOF
3704 #define NEED_BSDREGEX 1
3708 CFLAGS="$CFLAGS -Wall -Wno-format"
3709 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3711 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3712 CPU_ARCH=x86
3713 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3714 CPU_ARCH=sparc
3717 MDCPUCFG_H=_bsdi.cfg
3718 PR_MD_CSRCS=bsdi.c
3720 DSO_LDOPTS=-r
3722 case "$target_os" in
3723 bsdi1.1*)
3724 cat >> confdefs.h <<\EOF
3725 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3728 cat >> confdefs.h <<\EOF
3729 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3732 cat >> confdefs.h <<\EOF
3733 #define _PR_NEED_H_ERRNO 1
3736 MKSHLIB=
3737 DSO_CFLAGS=
3738 DSO_LDOPTS=
3741 bsdi2.1*)
3742 cat >> confdefs.h <<\EOF
3743 #define _PR_TIMESPEC_HAS_TS_SEC 1
3746 cat >> confdefs.h <<\EOF
3747 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3750 cat >> confdefs.h <<\EOF
3751 #define HAVE_DLL 1
3754 cat >> confdefs.h <<\EOF
3755 #define USE_DLFCN 1
3758 cat >> confdefs.h <<\EOF
3759 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3762 PR_MD_ASFILES=os_BSD_OS_386_2.s
3765 bsdi4.* | bsdi5.*)
3766 cat >> confdefs.h <<\EOF
3767 #define _PR_SELECT_CONST_TIMEVAL 1
3770 cat >> confdefs.h <<\EOF
3771 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3774 cat >> confdefs.h <<\EOF
3775 #define HAVE_DLL 1
3778 cat >> confdefs.h <<\EOF
3779 #define USE_DLFCN 1
3782 cat >> confdefs.h <<\EOF
3783 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3786 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3787 DSO_CFLAGS=-fPIC
3788 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3789 STRIP="$STRIP -d"
3790 case "$target_os" in
3791 bsdi4.2* | bsdi4.3* | bsdi5.*)
3792 cat >> confdefs.h <<\EOF
3793 #define _PR_HAVE_GETPROTO_R 1
3796 cat >> confdefs.h <<\EOF
3797 #define _PR_HAVE_GETPROTO_R_POINTER 1
3801 esac
3804 cat >> confdefs.h <<\EOF
3805 #define _PR_SELECT_CONST_TIMEVAL 1
3808 cat >> confdefs.h <<\EOF
3809 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3812 cat >> confdefs.h <<\EOF
3813 #define HAVE_DLL 1
3816 cat >> confdefs.h <<\EOF
3817 #define USE_DLFCN 1
3820 cat >> confdefs.h <<\EOF
3821 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3825 esac
3829 *-darwin*)
3830 cat >> confdefs.h <<\EOF
3831 #define XP_UNIX 1
3834 cat >> confdefs.h <<\EOF
3835 #define DARWIN 1
3838 cat >> confdefs.h <<\EOF
3839 #define HAVE_BSD_FLOCK 1
3842 cat >> confdefs.h <<\EOF
3843 #define HAVE_SOCKLEN_T 1
3846 AS='$(CC) -x assembler-with-cpp'
3847 CFLAGS="$CFLAGS -Wall -fno-common"
3848 case "${target_cpu}" in
3849 arm*)
3850 CPU_ARCH=arm
3852 i*86*)
3853 if test -n "$USE_64"; then
3854 CPU_ARCH=x86_64
3855 else
3856 CPU_ARCH=i386
3859 x86_64)
3860 CPU_ARCH=x86_64
3863 CPU_ARCH=ppc
3865 esac
3866 if test "`echo $CC | grep -c '\-arch '`" = "0"; then
3867 CC="$CC -arch $CPU_ARCH"
3869 ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'`
3870 echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6
3871 echo "configure:3872: checking for crt_externs.h" >&5
3872 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
3874 else
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878 #include <crt_externs.h>
3880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3881 { (eval echo configure:3882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3883 if test -z "$ac_err"; then
3884 rm -rf conftest*
3885 eval "ac_cv_header_$ac_safe=yes"
3886 else
3887 echo "$ac_err" >&5
3888 echo "configure: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3890 rm -rf conftest*
3891 eval "ac_cv_header_$ac_safe=no"
3893 rm -f conftest*
3895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3896 echo "$ac_t""yes" 1>&6
3898 else
3899 echo "$ac_t""no" 1>&6
3902 DSO_CFLAGS=-fPIC
3903 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3904 _OPTIMIZE_FLAGS=-O2
3905 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3906 STRIP="$STRIP -x -S"
3907 DLL_SUFFIX=dylib
3908 USE_PTHREADS=1
3909 MDCPUCFG_H=_darwin.cfg
3910 PR_MD_CSRCS=darwin.c
3911 PR_MD_ASFILES=os_Darwin.s
3913 # Add Mac OS X support for loading CFM & CFBundle plugins
3914 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3915 cat >> confdefs.h <<\EOF
3916 #define XP_MACOSX 1
3919 OS_TARGET=MacOSX
3921 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3922 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3923 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3924 case "${target_cpu}" in
3925 powerpc*)
3926 export MACOSX_DEPLOYMENT_TARGET=10.2
3928 i*86*)
3929 export MACOSX_DEPLOYMENT_TARGET=10.4
3931 esac
3935 if test "$MACOS_SDK_DIR"; then
3937 if test ! -d "$MACOS_SDK_DIR"; then
3938 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3939 specify a valid SDK. SDKs are installed when the optional cross-development
3940 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3944 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3945 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3946 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3948 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3949 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3950 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3951 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3952 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3955 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3957 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3959 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3962 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3964 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3965 MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
3966 else
3967 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3970 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3971 export NEXT_ROOT=$MACOS_SDK_DIR
3973 if test -n "$CROSS_COMPILE" ; then
3974 HOST_CC="NEXT_ROOT= $HOST_CC"
3975 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3977 else
3978 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3980 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3982 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3983 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3984 else
3985 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3992 *-dgux*)
3993 cat >> confdefs.h <<\EOF
3994 #define XP_UNIX 1
3997 cat >> confdefs.h <<\EOF
3998 #define _PR_LOCAL_THREADS_ONLY 1
4001 cat >> confdefs.h <<\EOF
4002 #define SVR4 1
4005 cat >> confdefs.h <<\EOF
4006 #define SYSV 1
4009 cat >> confdefs.h <<\EOF
4010 #define DGUX 1
4013 cat >> confdefs.h <<\EOF
4014 #define _DGUX_SOURCE 1
4017 cat >> confdefs.h <<\EOF
4018 #define _POSIX4A_DRAFT6_SOURCE 1
4021 DSO_LDOPTS=-G
4022 _OPTIMIZE_FLAGS=-O2
4023 _DEBUG_FLAGS=
4024 MDCPUCFG_H=_dgux.cfg
4025 PR_MD_CSRCS=dgux.c
4028 *-freebsd*)
4029 if test -z "$USE_NSPR_THREADS"; then
4030 USE_PTHREADS=1
4032 cat >> confdefs.h <<\EOF
4033 #define XP_UNIX 1
4036 cat >> confdefs.h <<\EOF
4037 #define FREEBSD 1
4040 cat >> confdefs.h <<\EOF
4041 #define HAVE_BSD_FLOCK 1
4044 cat >> confdefs.h <<\EOF
4045 #define HAVE_SOCKLEN_T 1
4048 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
4049 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
4050 if test "$MOZ_OBJFORMAT" = "elf"; then
4051 DLL_SUFFIX=so
4052 else
4053 DLL_SUFFIX=so.1.0
4055 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4056 DSO_CFLAGS=-fPIC
4057 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4058 MDCPUCFG_H=_freebsd.cfg
4059 PR_MD_CSRCS=freebsd.c
4062 *-hpux*)
4063 cat >> confdefs.h <<\EOF
4064 #define XP_UNIX 1
4067 cat >> confdefs.h <<\EOF
4068 #define HPUX 1
4071 cat >> confdefs.h <<\EOF
4072 #define _HPUX_SOURCE 1
4075 # OSF1 and HPUX report the POLLHUP event for a socket when the
4076 # shutdown(SHUT_WR) operation is called for the remote end, even though
4077 # the socket is still writeable. Use select(), instead of poll(), to
4078 # workaround this problem.
4079 cat >> confdefs.h <<\EOF
4080 #define _PR_POLL_WITH_SELECT 1
4083 cat >> confdefs.h <<\EOF
4084 #define _USE_BIG_FDS 1
4087 DSO_LDOPTS='-b +h $(notdir $@)'
4088 PR_MD_CSRCS=hpux.c
4089 if test "$OS_TEST" = "ia64"; then
4090 DLL_SUFFIX=so
4091 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
4092 CPU_ARCH_TAG=_$OS_TEST
4093 if test -z "$USE_64"; then
4094 COMPILER_TAG=_32
4096 PR_MD_ASFILES=os_HPUX_ia64.s
4097 else
4098 cat >> confdefs.h <<\EOF
4099 #define hppa 1
4102 DLL_SUFFIX=sl
4103 PR_MD_ASFILES=os_HPUX.s
4105 if test -n "$USE_64"; then
4106 MDCPUCFG_H=_hpux64.cfg
4107 else
4108 MDCPUCFG_H=_hpux32.cfg
4110 if test -z "$GNU_CC"; then
4111 CC="$CC -Ae"
4112 CXX="$CXX -ext"
4113 DSO_CFLAGS=+Z
4114 else
4115 DSO_CFLAGS=-fPIC
4116 ASFLAGS="$ASFLAGS -x assembler-with-cpp"
4119 if test -n "$MOZILLA_CLIENT"; then
4120 DEFAULT_IMPL_STRATEGY=_EMU
4123 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
4124 cat >> confdefs.h <<\EOF
4125 #define _PR_NEED_H_ERRNO 1
4128 cat >> confdefs.h <<\EOF
4129 #define HPUX9 1
4132 DEFAULT_IMPL_STRATEGY=_EMU
4133 USE_NSPR_THREADS=1
4136 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
4137 cat >> confdefs.h <<\EOF
4138 #define _PR_NO_LARGE_FILES 1
4143 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4144 cat >> confdefs.h <<\EOF
4145 #define _PR_NEED_H_ERRNO 1
4150 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4151 cat >> confdefs.h <<\EOF
4152 #define HAVE_INT_LOCALTIME_R 1
4157 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
4158 cat >> confdefs.h <<\EOF
4159 #define HAVE_POINTER_LOCALTIME_R 1
4164 # HP-UX 11i v2 (B.11.23) or higher
4166 case "$OS_RELEASE" in
4167 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
4168 USE_IPV6=1
4170 esac
4173 if test "$OS_RELEASE" = "B.10.01"; then
4174 cat >> confdefs.h <<\EOF
4175 #define HPUX10 1
4178 DEFAULT_IMPL_STRATEGY=_EMU
4181 if test "$OS_RELEASE" = "B.10.10"; then
4182 cat >> confdefs.h <<\EOF
4183 #define HPUX10 1
4186 cat >> confdefs.h <<\EOF
4187 #define HPUX10_10 1
4190 DEFAULT_IMPL_STRATEGY=_PTH
4193 if test "$OS_RELEASE" = "B.10.20"; then
4194 cat >> confdefs.h <<\EOF
4195 #define HPUX10 1
4198 cat >> confdefs.h <<\EOF
4199 #define HPUX10_20 1
4202 if test -z "$GNU_CC"; then
4203 CFLAGS="$CFLAGS +DAportable +DS1.1"
4204 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4206 DEFAULT_IMPL_STRATEGY=_PTH
4209 if test "$OS_RELEASE" = "B.10.30"; then
4210 cat >> confdefs.h <<\EOF
4211 #define HPUX10 1
4214 cat >> confdefs.h <<\EOF
4215 #define HPUX10_30 1
4218 if test -z "$GNU_CC"; then
4219 CFLAGS="$CFLAGS +DAportable +DS1.1"
4220 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4222 DEFAULT_IMPL_STRATEGY=_PTH
4225 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
4226 cat >> confdefs.h <<\EOF
4227 #define HPUX10 1
4230 cat >> confdefs.h <<\EOF
4231 #define HPUX11 1
4234 cat >> confdefs.h <<\EOF
4235 #define _LARGEFILE64_SOURCE 1
4238 cat >> confdefs.h <<\EOF
4239 #define _PR_HAVE_OFF64_T 1
4242 cat >> confdefs.h <<\EOF
4243 #define HAVE_FCNTL_FILE_LOCKING 1
4246 if test -z "$GNU_CC"; then
4247 if test -z "$USE_64"; then
4248 if test "$OS_TEST" = "ia64"; then
4249 CFLAGS="$CFLAGS +DD32"
4250 CXXFLAGS="$CXXFLAGS +DD32"
4251 else
4252 CFLAGS="$CFLAGS +DAportable +DS2.0"
4253 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
4255 else
4256 if test "$OS_TEST" = "ia64"; then
4257 CFLAGS="$CFLAGS +DD64"
4258 CXXFLAGS="$CXXFLAGS +DD64"
4259 else
4260 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
4261 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
4265 DEFAULT_IMPL_STRATEGY=_PTH
4268 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
4269 USE_NSPR_THREADS=1
4270 USE_PTHREADS=
4271 USE_USER_PTHREADS=
4272 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
4273 USE_PTHREADS=1
4274 if test "$USE_NSPR_THREADS"; then
4275 USE_PTHREADS=
4277 if test "$USE_USER_PTHREADS"; then
4278 USE_PTHREADS=
4283 *-irix*)
4284 cat >> confdefs.h <<\EOF
4285 #define XP_UNIX 1
4288 cat >> confdefs.h <<\EOF
4289 #define IRIX 1
4292 cat >> confdefs.h <<\EOF
4293 #define SVR4 1
4296 cat >> confdefs.h <<\EOF
4297 #define _SGI_MP_SOURCE 1
4300 cat >> confdefs.h <<\EOF
4301 #define HAVE_FCNTL_FILE_LOCKING 1
4304 PR_MD_CSRCS=irix.c
4305 PR_MD_ASFILES=os_Irix.s
4306 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
4307 STRIP="$STRIP -f"
4308 RESOLVE_LINK_SYMBOLS=1
4309 if test -n "$USE_64"; then
4310 MDCPUCFG_H=_irix64.cfg
4311 else
4312 MDCPUCFG_H=_irix32.cfg
4314 case "${target_os}" in
4315 irix6*)
4316 cat >> confdefs.h <<\EOF
4317 #define IRIX6 1
4320 USE_PTHREADS=1
4321 USE_N32=1
4322 COMPILER_TAG=_n32
4323 IMPL_STRATEGY=_PTH
4325 irix5*)
4326 cat >> confdefs.h <<\EOF
4327 #define IRIX5 1
4330 USE_NSPR_THREADS=1
4333 USE_PTHREADS=1
4334 USE_N32=1
4336 esac
4337 if test "$GNU_CC"; then
4338 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
4339 CFLAGS="$CFLAGS -Wall -Wno-format"
4340 _OPTIMIZE_FLAGS="-O6"
4341 else
4342 if test -n "$USE_N32"; then
4343 AS='as -D_ASM $(INCLUDES) -n32'
4344 else
4345 AS='as -D_ASM $(INCLUDES)'
4347 CFLAGS="$CFLAGS -fullwarn -xansi"
4348 if test "$USE_N32"; then
4349 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
4350 else
4351 _OPTIMIZE_FLAGS="-O -Olimit 4000"
4353 if test "$USE_MDUPDATE"; then
4354 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4356 case "${target}" in
4357 *-irix6.*)
4358 CFLAGS="$CFLAGS -multigot"
4359 DSO_LDOPTS="-no_unresolved"
4360 if test "$USE_N32"; then
4361 CFLAGS="$CFLAGS -n32 -woff 1209"
4362 DSO_LDOPTS="$DSO_LDOPTS -n32"
4363 else
4364 if test "$USE_64"; then
4365 CFLAGS="$CFLAGS -64"
4366 else
4367 CFLAGS="$CFLAGS -32"
4372 CFLAGS="$CFLAGS -xgot"
4374 esac
4376 if test "${target_os}" = "irix5.3"; then
4377 cat >> confdefs.h <<\EOF
4378 #define IRIX5_3 1
4382 case "${target_os}" in
4383 irix6.5)
4384 if test -z "$GNU_CC"; then
4385 CFLAGS="$CFLAGS -mips3"
4387 cat >> confdefs.h <<\EOF
4388 #define _PR_HAVE_GETPROTO_R 1
4391 cat >> confdefs.h <<\EOF
4392 #define _PR_HAVE_GETPROTO_R_POINTER 1
4395 cat >> confdefs.h <<\EOF
4396 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4400 irix5*)
4403 cat >> confdefs.h <<\EOF
4404 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4408 esac
4411 *-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
4412 if test -z "$USE_NSPR_THREADS"; then
4413 USE_PTHREADS=1
4414 IMPL_STRATEGY=_PTH
4416 cat >> confdefs.h <<\EOF
4417 #define XP_UNIX 1
4420 cat >> confdefs.h <<\EOF
4421 #define _GNU_SOURCE 1
4424 cat >> confdefs.h <<\EOF
4425 #define HAVE_FCNTL_FILE_LOCKING 1
4428 case "${target}" in
4429 *-android*|*-linuxandroid*)
4430 OS_TARGET=Android
4431 cat >> confdefs.h <<\EOF
4432 #define LINUX 1
4436 *-linux*)
4437 cat >> confdefs.h <<\EOF
4438 #define LINUX 1
4442 esac
4443 CFLAGS="$CFLAGS -Wall"
4444 CXXFLAGS="$CXXFLAGS -Wall"
4445 MDCPUCFG_H=_linux.cfg
4446 PR_MD_CSRCS=linux.c
4447 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4448 DSO_CFLAGS=-fPIC
4449 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4450 _OPTIMIZE_FLAGS=-O2
4451 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4452 # combo is not yet good at debugging inlined
4453 # functions (even when using DWARF2 as the
4454 # debugging format)
4455 COMPILER_TAG=_glibc
4456 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
4457 CPU_ARCH=x86
4458 else
4459 CPU_ARCH=$OS_TEST
4461 CPU_ARCH_TAG=_${CPU_ARCH}
4462 case "${target_cpu}" in
4463 alpha)
4464 cat >> confdefs.h <<\EOF
4465 #define _ALPHA_ 1
4468 cat >> confdefs.h <<\EOF
4469 #define __alpha 1
4472 CFLAGS="$CFLAGS -mieee"
4473 CXXFLAGS="$CXXFLAGS -mieee"
4475 i*86)
4476 cat >> confdefs.h <<\EOF
4477 #define i386 1
4480 PR_MD_ASFILES=os_Linux_x86.s
4482 ia64)
4483 PR_MD_ASFILES=os_Linux_ia64.s
4485 x86_64)
4486 if test -n "$USE_64"; then
4487 PR_MD_ASFILES=os_Linux_x86_64.s
4488 else
4489 cat >> confdefs.h <<\EOF
4490 #define i386 1
4493 PR_MD_ASFILES=os_Linux_x86.s
4494 CC="$CC -m32"
4495 CXX="$CXX -m32"
4498 ppc|powerpc)
4499 PR_MD_ASFILES=os_Linux_ppc.s
4501 powerpc64)
4502 if test -n "$USE_64"; then
4503 CC="$CC -m64"
4504 CXX="$CXX -m64"
4505 else
4506 PR_MD_ASFILES=os_Linux_ppc.s
4509 m68k)
4510 CFLAGS="$CFLAGS -m68020-60"
4511 CXXFLAGS="$CXXFLAGS -m68020-60"
4513 esac
4516 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
4517 cat >> confdefs.h <<\EOF
4518 #define XP_PC 1
4521 cat >> confdefs.h <<\EOF
4522 #define WIN32 1
4525 PR_MD_ARCH_DIR=windows
4526 RESOLVE_LINK_SYMBOLS=1
4528 if test -n "$GNU_CC"; then
4529 CC="$CC -mwindows"
4530 CXX="$CXX -mwindows"
4531 DLL_SUFFIX=dll
4532 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
4533 RC=$WINDRES
4534 # Use temp file for windres (bug 213281)
4535 RCFLAGS='-O coff --use-temp-file'
4536 else
4537 CC=cl
4538 CXX=cl
4539 LD=link
4540 AR='lib -NOLOGO -OUT:"$@"'
4541 AR_FLAGS=
4542 RANLIB='echo not_ranlib'
4543 STRIP='echo not_strip'
4544 RC=rc.exe
4545 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4546 OBJ_SUFFIX=obj
4547 LIB_SUFFIX=lib
4548 DLL_SUFFIX=dll
4550 # Determine compiler version
4552 _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
4554 CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
4555 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
4556 _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
4557 _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
4558 _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
4559 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4561 if test "$_CC_MAJOR_VERSION" -eq "14"; then
4562 if test $_CC_RELEASE -gt 50727; then
4563 _USE_DYNAMICBASE=1
4564 elif test $_CC_BUILD -ge 762; then
4565 _USE_DYNAMICBASE=1
4567 cat >> confdefs.h <<\EOF
4568 #define _CRT_SECURE_NO_DEPRECATE 1
4571 cat >> confdefs.h <<\EOF
4572 #define _CRT_NONSTDC_NO_DEPRECATE 1
4575 elif test $_CC_MAJOR_VERSION -ge 15; then
4576 _USE_DYNAMICBASE=1
4577 cat >> confdefs.h <<\EOF
4578 #define _CRT_SECURE_NO_WARNINGS 1
4581 cat >> confdefs.h <<\EOF
4582 #define _CRT_NONSTDC_NO_WARNINGS 1
4587 if test -n "$_USE_DYNAMICBASE"; then
4588 DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
4591 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4592 # tape manipulation utility (or something else)
4593 if test "$MSC_VER" -ge "1400"; then
4595 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4598 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4599 if test -n "$MSMT_TOOL"; then
4600 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4601 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4602 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4604 MT=mt
4605 unset MSMT_TOOL
4606 else
4607 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4611 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4612 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4613 _DEBUG_FLAGS=-Zi
4614 _OPTIMIZE_FLAGS=-O2
4616 PROFILE_GEN_CFLAGS="-GL"
4617 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
4618 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
4619 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
4621 if test -z "$MOZ_OPTIMIZE"; then
4622 CFLAGS="$CFLAGS -Od"
4625 if test -n "$USE_DEBUG_RTL"; then
4626 CFLAGS="$CFLAGS -MDd"
4627 else
4628 CFLAGS="$CFLAGS -MD"
4631 if test -n "$MOZ_DEBUG"; then
4632 cat >> confdefs.h <<\EOF
4633 #define _DEBUG 1
4636 else
4637 DEFINES="$DEFINES -U_DEBUG"
4640 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4641 if test -n "$MOZ_OPTIMIZE"; then
4642 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4643 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4644 else
4645 DLLFLAGS="$DLLFLAGS -DEBUG"
4646 LDFLAGS="$LDFLAGS -DEBUG"
4650 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4651 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4652 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4655 if test "$OS_TARGET" = "WINNT"; then
4656 CFLAGS="$CFLAGS -GT"
4657 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4658 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4659 else
4660 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4661 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4663 fi # GNU_CC
4665 if test -n "$USE_STATIC_TLS"; then
4666 cat >> confdefs.h <<\EOF
4667 #define _PR_USE_STATIC_TLS 1
4672 if test "$OS_TARGET" = "WINNT"; then
4673 cat >> confdefs.h <<\EOF
4674 #define WINNT 1
4677 else
4678 cat >> confdefs.h <<\EOF
4679 #define WIN95 1
4682 # undefine WINNT as some versions of mingw gcc define it by default
4683 DEFINES="$DEFINES -UWINNT"
4684 cat >> confdefs.h <<\EOF
4685 #define _PR_GLOBAL_THREADS_ONLY 1
4690 if test "$CPU_ARCH" = "x86"; then
4691 CPU_ARCH_TAG=
4692 else
4693 CPU_ARCH_TAG=$CPU_ARCH
4696 if test -n "$USE_DEBUG_RTL"; then
4697 OBJDIR_SUFFIX=OBJD
4700 case "$OS_TARGET" in
4701 WINNT)
4702 MDCPUCFG_H=_winnt.cfg
4704 WIN95)
4705 MDCPUCFG_H=_win95.cfg
4708 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4710 esac
4712 case "$target_cpu" in
4713 i*86)
4714 if test -n "$USE_64"; then
4715 cat >> confdefs.h <<\EOF
4716 #define _AMD64_ 1
4719 else
4720 cat >> confdefs.h <<\EOF
4721 #define _X86_ 1
4726 x86_64)
4727 cat >> confdefs.h <<\EOF
4728 #define _AMD64_ 1
4731 USE_64=1
4733 ia64)
4734 cat >> confdefs.h <<\EOF
4735 #define _IA64_ 1
4738 USE_64=1
4741 cat >> confdefs.h <<\EOF
4742 #define _CPU_ARCH_NOT_DEFINED 1
4746 esac
4749 *-wince*|*-winmo*)
4750 cat >> confdefs.h <<\EOF
4751 #define XP_PC 1
4754 cat >> confdefs.h <<\EOF
4755 #define WIN32 1
4758 cat >> confdefs.h <<\EOF
4759 #define WINCE 1
4762 cat >> confdefs.h <<\EOF
4763 #define _PR_GLOBAL_THREADS_ONLY 1
4767 AR_FLAGS='-NOLOGO -OUT:"$@"'
4769 OBJ_SUFFIX=obj
4770 LIB_SUFFIX=lib
4771 DLL_SUFFIX=dll
4772 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4774 PR_MD_ARCH_DIR=windows
4775 RESOLVE_LINK_SYMBOLS=1
4777 MDCPUCFG_H=_win95.cfg
4778 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4779 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4781 DLLFLAGS='-OUT:"$@"'
4782 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4783 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4784 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4785 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4787 _DEBUG_FLAGS=-Zi
4788 _OPTIMIZE_FLAGS=-O2
4791 *-netbsd*)
4792 cat >> confdefs.h <<\EOF
4793 #define XP_UNIX 1
4796 cat >> confdefs.h <<\EOF
4797 #define NETBSD 1
4800 cat >> confdefs.h <<\EOF
4801 #define HAVE_BSD_FLOCK 1
4804 if test -z "$USE_NSPR_THREADS"; then
4805 USE_PTHREADS=1
4807 MDCPUCFG_H=_netbsd.cfg
4808 PR_MD_CSRCS=netbsd.c
4810 DSO_CFLAGS='-fPIC -DPIC'
4811 CFLAGS="$CFLAGS -ansi -Wall"
4812 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4813 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4815 if test -z "$OBJECT_FMT"; then
4816 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4817 OBJECT_FMT=a.out
4818 DLL_SUFFIX=so.1.0
4819 DSO_LDOPTS='-shared'
4820 else
4821 OBJECT_FMT=ELF
4822 DLL_SUFFIX=so
4823 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4827 if test "$LIBRUNPATH"; then
4828 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4832 *-nto*)
4833 cat >> confdefs.h <<\EOF
4834 #define XP_UNIX 1
4837 cat >> confdefs.h <<\EOF
4838 #define NTO 1
4841 cat >> confdefs.h <<\EOF
4842 #define _QNX_SOURCE 1
4845 cat >> confdefs.h <<\EOF
4846 #define HAVE_POINTER_LOCALTIME_R 1
4849 MDCPUCFG_H=_nto.cfg
4850 PR_MD_CSRCS=nto.c
4851 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4852 DSO_CFLAGS=-fPIC
4853 DSO_LDOPTS=-shared
4854 OS_LIBS="$OS_LIBS -lsocket"
4855 _OPTIMIZE_FLAGS="-O1"
4856 _DEBUG_FLAGS="-gstabs"
4859 *-openbsd*)
4860 cat >> confdefs.h <<\EOF
4861 #define XP_UNIX 1
4864 cat >> confdefs.h <<\EOF
4865 #define OPENBSD 1
4868 cat >> confdefs.h <<\EOF
4869 #define HAVE_BSD_FLOCK 1
4872 cat >> confdefs.h <<\EOF
4873 #define HAVE_SOCKLEN_T 1
4876 CFLAGS="$CFLAGS -ansi -Wall"
4877 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4878 DLL_SUFFIX=so.1.0
4879 DSO_CFLAGS=-fPIC
4880 MDCPUCFG_H=_openbsd.cfg
4881 PR_MD_CSRCS=openbsd.c
4882 OS_LIBS="-lc"
4883 if test -z "$USE_NSPR_THREADS"; then
4884 USE_PTHREADS=1
4886 DSO_LDOPTS='-shared -fPIC'
4887 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4890 *-osf*)
4891 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4892 cat >> confdefs.h <<\EOF
4893 #define XP_UNIX 1
4896 cat >> confdefs.h <<\EOF
4897 #define OSF1 1
4900 cat >> confdefs.h <<\EOF
4901 #define _REENTRANT 1
4904 # OSF1 and HPUX report the POLLHUP event for a socket when the
4905 # shutdown(SHUT_WR) operation is called for the remote end, even though
4906 # the socket is still writeable. Use select(), instead of poll(), to
4907 # workaround this problem.
4908 cat >> confdefs.h <<\EOF
4909 #define _PR_POLL_WITH_SELECT 1
4913 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4914 USE_NSPR_THREADS=1
4917 if test -z "$GNU_CC"; then
4918 CC="$CC -std1 -ieee_with_inexact"
4919 if test "$OS_RELEASE" != "V2.0"; then
4920 CC="$CC -readonly_strings"
4922 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4923 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4924 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4925 echo "configure:4926: checking for machine/builtins.h" >&5
4926 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4927 echo $ac_n "(cached) $ac_c" 1>&6
4928 else
4929 cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932 #include <machine/builtins.h>
4934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4935 { (eval echo configure:4936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4937 if test -z "$ac_err"; then
4938 rm -rf conftest*
4939 eval "ac_cv_header_$ac_safe=yes"
4940 else
4941 echo "$ac_err" >&5
4942 echo "configure: failed program was:" >&5
4943 cat conftest.$ac_ext >&5
4944 rm -rf conftest*
4945 eval "ac_cv_header_$ac_safe=no"
4947 rm -f conftest*
4949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4950 echo "$ac_t""yes" 1>&6
4951 cat >> confdefs.h <<\EOF
4952 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4955 else
4956 echo "$ac_t""no" 1>&6
4959 else
4960 CFLAGS="$CFLAGS -mieee"
4961 CXXFLAGS="$CXXFLAGS -mieee"
4964 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4965 cat >> confdefs.h <<\EOF
4966 #define HAVE_INT_LOCALTIME_R 1
4969 else
4970 cat >> confdefs.h <<\EOF
4971 #define HAVE_FCNTL_FILE_LOCKING 1
4974 cat >> confdefs.h <<\EOF
4975 #define HAVE_POINTER_LOCALTIME_R 1
4979 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4980 cat >> confdefs.h <<\EOF
4981 #define OSF1V4_MAP_PRIVATE_BUG 1
4985 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4986 MDCPUCFG_H=_osf1.cfg
4987 PR_MD_CSRCS=osf1.c
4990 *-qnx*)
4991 cat >> confdefs.h <<\EOF
4992 #define XP_UNIX 1
4995 cat >> confdefs.h <<\EOF
4996 #define QNX 1
4999 cat >> confdefs.h <<\EOF
5000 #define _PR_NEED_H_ERRNO 1
5003 USE_NSPR_THREADS=1
5004 MDCPUCFG_H=_qnx.cfg
5005 PR_MD_CSRCS=qnx.c
5008 *-riscos*)
5009 cat >> confdefs.h <<\EOF
5010 #define XP_UNIX 1
5013 cat >> confdefs.h <<\EOF
5014 #define RISCOS 1
5017 cat >> confdefs.h <<\EOF
5018 #define _PR_NEED_H_ERRNO 1
5021 USE_PTHREADS=1
5022 MDCPUCFG_H=_riscos.cfg
5023 PR_MD_CSRCS=riscos.c
5024 DSO_CFLAGS=-fPIC
5025 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
5026 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5029 *-*-sco*)
5030 cat >> confdefs.h <<\EOF
5031 #define XP_UNIX 1
5034 cat >> confdefs.h <<\EOF
5035 #define SCO 1
5038 cat >> confdefs.h <<\EOF
5039 #define sco 1
5042 cat >> confdefs.h <<\EOF
5043 #define SYSV 1
5046 cat >> confdefs.h <<\EOF
5047 #define _SVID3 1
5050 cat >> confdefs.h <<\EOF
5051 #define _PR_NEED_H_ERRNO 1
5054 CC='cc -b elf -KPIC'
5055 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
5056 USE_NSPR_THREADS=1
5057 CPU_ARCH=x86
5058 DSO_LDOPTS='-b elf -G'
5059 MDCPUCFG_H=_scoos.cfg
5060 PR_MD_SRCS=scoos.c
5063 *-solaris*)
5064 if test -z "$USE_NSPR_THREADS"; then
5065 USE_PTHREADS=1
5067 cat >> confdefs.h <<\EOF
5068 #define XP_UNIX 1
5071 cat >> confdefs.h <<\EOF
5072 #define SVR4 1
5075 cat >> confdefs.h <<\EOF
5076 #define SYSV 1
5079 cat >> confdefs.h <<\EOF
5080 #define __svr4 1
5083 cat >> confdefs.h <<\EOF
5084 #define __svr4__ 1
5087 cat >> confdefs.h <<\EOF
5088 #define SOLARIS 1
5091 cat >> confdefs.h <<\EOF
5092 #define HAVE_FCNTL_FILE_LOCKING 1
5095 CPU_ARCH=`uname -p`
5096 MDCPUCFG_H=_solaris.cfg
5097 PR_MD_CSRCS=solaris.c
5098 LD=/usr/ccs/bin/ld
5099 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5100 RESOLVE_LINK_SYMBOLS=1
5101 case "${OS_RELEASE}" in
5102 5.8|5.9)
5105 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
5106 USE_B_DIRECT=1
5108 esac
5109 if test -n "$GNU_CC"; then
5110 DSO_CFLAGS=-fPIC
5111 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
5112 GCC_USE_GNU_LD=1
5114 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
5115 if test -n "$USE_B_DIRECT"; then
5116 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
5118 else
5119 DSO_CFLAGS=-KPIC
5120 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
5121 if test -n "$USE_B_DIRECT"; then
5122 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5125 if test -n "$GNU_CC"; then
5126 CFLAGS="$CFLAGS -Wall"
5127 CXXFLAGS="$CXXFLAGS -Wall"
5128 if test -n "$USE_MDUPDATE"; then
5129 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
5130 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
5132 GCC_AS=`$CC -print-prog-name=as`
5133 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
5134 GNU_AS=1
5136 else
5137 CFLAGS="$CFLAGS -xstrconst"
5138 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
5139 if test -z "$MOZ_OPTIMIZE"; then
5140 CFLAGS="$CFLAGS -xs"
5141 CXXFLAGS="$CXXFLAGS -xs"
5143 _OPTIMIZE_FLAGS=-xO4
5145 if test -z "$GNU_AS"; then
5146 ASFLAGS="$ASFLAGS -Wa,-P"
5148 if test -n "$USE_64"; then
5149 if test -n "$GNU_CC"; then
5150 CC="$CC -m64"
5151 CXX="$CXX -m64"
5152 else
5153 if test "$OS_TEST" = "i86pc"; then
5154 CC="$CC -xarch=amd64"
5155 CXX="$CXX -xarch=amd64"
5156 else
5157 CC="$CC -xarch=v9"
5158 CXX="$CXX -xarch=v9"
5162 if test "$OS_TEST" = "i86pc"; then
5163 if test -z "$USE_64"; then
5164 cat >> confdefs.h <<\EOF
5165 #define i386 1
5169 CPU_ARCH_TAG=_$OS_TEST
5170 # The default debug format, DWARF (-g), is not supported by gcc
5171 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
5172 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
5173 # If your gcc uses GNU as, you do not need the -Wa,-s option.
5174 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
5175 _DEBUG_FLAGS=-gstabs
5176 if test -z "$GNU_AS"; then
5177 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
5181 case "${target_os}" in
5182 solaris2.3*)
5183 cat >> confdefs.h <<\EOF
5184 #define _PR_NO_LARGE_FILES 1
5188 solaris2.4*)
5189 cat >> confdefs.h <<\EOF
5190 #define _PR_NO_LARGE_FILES 1
5194 solaris2.5*)
5195 cat >> confdefs.h <<\EOF
5196 #define SOLARIS2_5 1
5201 cat >> confdefs.h <<\EOF
5202 #define _PR_HAVE_OFF64_T 1
5205 # The lfcompile64(5) man page on Solaris 2.6 says:
5206 # For applications that do not wish to conform to the POSIX or
5207 # X/Open specifications, the 64-bit transitional interfaces
5208 # are available by default. No compile-time flags need to be
5209 # set.
5210 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
5211 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
5212 if test -n "$GNU_CC"; then
5213 cat >> confdefs.h <<\EOF
5214 #define _LARGEFILE64_SOURCE 1
5219 esac
5220 case "${target_os}" in
5221 solaris2.3*)
5223 solaris2.4*)
5225 solaris2.5*)
5227 solaris2.6*)
5229 solaris2.7*)
5232 # Solaris 8 or higher has IPv6.
5233 cat >> confdefs.h <<\EOF
5234 #define _PR_INET6 1
5238 esac
5239 if test "$CPU_ARCH" = "sparc"; then
5240 # 64-bit Solaris SPARC requires V9 architecture, so the following
5241 # is not needed.
5242 if test -z "$USE_64"; then
5243 ULTRASPARC_LIBRARY=nspr_flt
5246 # Purify requires that binaries linked against nspr also
5247 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
5248 _rev=`uname -r`
5249 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
5250 OS_LIBS="$OS_LIBS $_librt"
5253 *-sco-sysv5*)
5254 cat >> confdefs.h <<\EOF
5255 #define XP_UNIX 1
5258 cat >> confdefs.h <<\EOF
5259 #define UNIXWARE 1
5262 cat >> confdefs.h <<\EOF
5263 #define SVR4 1
5266 cat >> confdefs.h <<\EOF
5267 #define SYSV 1
5270 USE_NSPR_THREADS=1
5271 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
5272 cat >> confdefs.h <<\EOF
5273 #define _PR_NO_LARGE_FILES 1
5276 CC='$(NSDEPTH)/build/hcc cc'
5277 CXX='$(NSDEPTH)/build/hcpp CC'
5278 MDCPUCFG_H=_unixware.cfg
5279 else
5280 cat >> confdefs.h <<\EOF
5281 #define _LARGEFILE64_SOURCE 1
5284 cat >> confdefs.h <<\EOF
5285 #define _PR_HAVE_OFF64_T 1
5288 cat >> confdefs.h <<\EOF
5289 #define _PR_HAVE_SOCKADDR_LEN 1
5292 MDCPUCFG_H=_unixware7.cfg
5294 PR_MD_CSRCS=unixware.c
5295 DSO_LDOPTS=-G
5296 CPU_ARCH=x86
5299 *-symbian*)
5300 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
5301 if test "${with_symbian_sdk+set}" = set; then
5302 withval="$with_symbian_sdk"
5303 SYMBIAN_SDK_DIR=$withval
5307 echo -----------------------------------------------------------------------------
5308 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
5309 echo -----------------------------------------------------------------------------
5311 cat >> confdefs.h <<\EOF
5312 #define XP_UNIX 1
5315 cat >> confdefs.h <<\EOF
5316 #define SYMBIAN 1
5319 cat >> confdefs.h <<\EOF
5320 #define __arm__ 1
5323 cat >> confdefs.h <<\EOF
5324 #define __SYMBIAN32__ 1
5327 cat >> confdefs.h <<\EOF
5328 #define _UNICODE 1
5331 cat >> confdefs.h <<\EOF
5332 #define NDEBUG 1
5335 cat >> confdefs.h <<\EOF
5336 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5339 cat >> confdefs.h <<\EOF
5340 #define MOZ_STDERR_TO_STDOUT 1
5343 cat >> confdefs.h <<\EOF
5344 #define HAVE_FCNTL_FILE_LOCKING 1
5347 cat >> confdefs.h <<\EOF
5348 #define HAVE_SOCKLEN_T 1
5351 USE_PTHREADS=1
5352 LIB_SUFFIX=lib
5353 DLL_SUFFIX=dll
5354 MKSHLIB=
5355 DSO_LDOPTS=
5356 DSO_CFLAGS=
5357 VISIBILITY_FLAGS=
5358 MDCPUCFG_H=_symbian.cfg
5359 PR_MD_CSRCS=symbian.c
5360 NSINSTALL=nsinstall
5361 RANLIB='echo no ranlib '
5362 CPU_ARCH=ARM
5363 OS_ARCH=SYMBIAN
5364 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5365 CFLAGS="$CFLAGS -MD -nostdinc"
5366 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5367 echo -------------------------------------------------------
5368 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5369 echo -------------------------------------------------------
5370 case "$OS_TARGET" in
5371 WINSCW)
5372 CC=mwccsym2.exe
5373 CXX=mwccsym2.exe
5374 LD=mwldsym2.exe
5375 AR=mwldsym2.exe
5376 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5377 CFLAGS="$CFLAGS -O0 -inline off -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -nostderr -gccdep -cwd source -i- -I\$(VPATH)"
5378 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5379 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5380 cat >> confdefs.h <<\EOF
5381 #define _DEBUG 1
5384 cat >> confdefs.h <<\EOF
5385 #define __CW32__ 1
5388 cat >> confdefs.h <<\EOF
5389 #define __WINS__ 1
5392 cat >> confdefs.h <<\EOF
5393 #define __WINSCW__ 1
5396 DEFINES="$DEFINES -U_WIN32"
5398 GCCE)
5399 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5400 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5401 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5402 cat >> confdefs.h <<\EOF
5403 #define __GCCE__ 1
5406 cat >> confdefs.h <<\EOF
5407 #define __EABI__ 1
5410 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5413 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5415 esac
5416 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5419 *-os2*)
5420 cat >> confdefs.h <<\EOF
5421 #define XP_OS2 1
5424 cat >> confdefs.h <<\EOF
5425 #define XP_PC 1
5428 cat >> confdefs.h <<\EOF
5429 #define BSD_SELECT 1
5432 cat >> confdefs.h <<\EOF
5433 #define TCPV40HDRS 1
5436 LIB_SUFFIX=lib
5437 DLL_SUFFIX=dll
5438 RC=rc.exe
5439 PR_MD_ARCH_DIR=os2
5440 PROG_SUFFIX=.exe
5441 NSINSTALL=nsinstall
5442 MDCPUCFG_H=_os2.cfg
5443 RESOLVE_LINK_SYMBOLS=1
5445 cat >> confdefs.h <<\EOF
5446 #define OS2 1
5449 AR=emxomfar
5450 AR_FLAGS='r $@'
5451 CFLAGS="$CFLAGS -Wall -Zomf"
5452 CXXFLAGS="$CFLAGS -Wall -Zomf"
5453 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5454 DSO_CFLAGS=
5455 DSO_LDOPTS='-Zomf -Zdll'
5456 LDFLAGS='-Zmap'
5457 _OPTIMIZE_FLAGS="-O2 -s"
5458 _DEBUG_FLAGS="-g -fno-inline"
5459 if test -n "$MOZ_OPTIMIZE"; then
5460 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5462 IMPLIB='emximp -o'
5463 FILTER='emxexp -o'
5464 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5465 LDFLAGS="$LDFLAGS -Zhigh-mem"
5466 cat >> confdefs.h <<\EOF
5467 #define MOZ_OS2_HIGH_MEMORY 1
5472 # GCC for OS/2 currently predefines these, but we don't want them
5473 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5477 cat >> confdefs.h <<\EOF
5478 #define XP_UNIX 1
5483 esac
5485 if test -z "$SKIP_LIBRARY_CHECKS"; then
5489 case $target in
5490 *-darwin*|*-beos*|*-os2*)
5493 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5494 echo "configure:5495: checking for dlopen in -ldl" >&5
5495 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5496 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5497 echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499 ac_save_LIBS="$LIBS"
5500 LIBS="-ldl $LIBS"
5501 cat > conftest.$ac_ext <<EOF
5502 #line 5503 "configure"
5503 #include "confdefs.h"
5504 /* Override any gcc2 internal prototype to avoid an error. */
5505 /* We use char because int might match the return type of a gcc2
5506 builtin and then its argument prototype would still apply. */
5507 char dlopen();
5509 int main() {
5510 dlopen()
5511 ; return 0; }
5513 if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5514 rm -rf conftest*
5515 eval "ac_cv_lib_$ac_lib_var=yes"
5516 else
5517 echo "configure: failed program was:" >&5
5518 cat conftest.$ac_ext >&5
5519 rm -rf conftest*
5520 eval "ac_cv_lib_$ac_lib_var=no"
5522 rm -f conftest*
5523 LIBS="$ac_save_LIBS"
5526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5527 echo "$ac_t""yes" 1>&6
5528 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5529 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5530 echo "configure:5531: checking for dlfcn.h" >&5
5531 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5532 echo $ac_n "(cached) $ac_c" 1>&6
5533 else
5534 cat > conftest.$ac_ext <<EOF
5535 #line 5536 "configure"
5536 #include "confdefs.h"
5537 #include <dlfcn.h>
5539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5540 { (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5542 if test -z "$ac_err"; then
5543 rm -rf conftest*
5544 eval "ac_cv_header_$ac_safe=yes"
5545 else
5546 echo "$ac_err" >&5
5547 echo "configure: failed program was:" >&5
5548 cat conftest.$ac_ext >&5
5549 rm -rf conftest*
5550 eval "ac_cv_header_$ac_safe=no"
5552 rm -f conftest*
5554 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5555 echo "$ac_t""yes" 1>&6
5556 OS_LIBS="-ldl $OS_LIBS"
5557 else
5558 echo "$ac_t""no" 1>&6
5561 else
5562 echo "$ac_t""no" 1>&6
5566 esac
5571 if test $ac_cv_prog_gcc = yes; then
5572 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5573 echo "configure:5574: checking whether ${CC-cc} needs -traditional" >&5
5574 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5575 echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577 ac_pattern="Autoconf.*'x'"
5578 cat > conftest.$ac_ext <<EOF
5579 #line 5580 "configure"
5580 #include "confdefs.h"
5581 #include <sgtty.h>
5582 Autoconf TIOCGETP
5584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5585 egrep "$ac_pattern" >/dev/null 2>&1; then
5586 rm -rf conftest*
5587 ac_cv_prog_gcc_traditional=yes
5588 else
5589 rm -rf conftest*
5590 ac_cv_prog_gcc_traditional=no
5592 rm -f conftest*
5595 if test $ac_cv_prog_gcc_traditional = no; then
5596 cat > conftest.$ac_ext <<EOF
5597 #line 5598 "configure"
5598 #include "confdefs.h"
5599 #include <termio.h>
5600 Autoconf TCGETA
5602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5603 egrep "$ac_pattern" >/dev/null 2>&1; then
5604 rm -rf conftest*
5605 ac_cv_prog_gcc_traditional=yes
5607 rm -f conftest*
5612 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5613 if test $ac_cv_prog_gcc_traditional = yes; then
5614 CC="$CC -traditional"
5618 _SAVE_LIBS="$LIBS"
5619 LIBS="$LIBS $OS_LIBS"
5620 for ac_func in dladdr gettid lchown setpriority strerror syscall
5622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5623 echo "configure:5624: checking for $ac_func" >&5
5624 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5625 echo $ac_n "(cached) $ac_c" 1>&6
5626 else
5627 cat > conftest.$ac_ext <<EOF
5628 #line 5629 "configure"
5629 #include "confdefs.h"
5630 /* System header to define __stub macros and hopefully few prototypes,
5631 which can conflict with char $ac_func(); below. */
5632 #include <assert.h>
5633 /* Override any gcc2 internal prototype to avoid an error. */
5634 /* We use char because int might match the return type of a gcc2
5635 builtin and then its argument prototype would still apply. */
5636 char $ac_func();
5638 int main() {
5640 /* The GNU C library defines this for functions which it implements
5641 to always fail with ENOSYS. Some functions are actually named
5642 something starting with __ and the normal name is an alias. */
5643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5644 choke me
5645 #else
5646 $ac_func();
5647 #endif
5649 ; return 0; }
5651 if { (eval echo configure:5652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5652 rm -rf conftest*
5653 eval "ac_cv_func_$ac_func=yes"
5654 else
5655 echo "configure: failed program was:" >&5
5656 cat conftest.$ac_ext >&5
5657 rm -rf conftest*
5658 eval "ac_cv_func_$ac_func=no"
5660 rm -f conftest*
5663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5664 echo "$ac_t""yes" 1>&6
5665 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5666 cat >> confdefs.h <<EOF
5667 #define $ac_tr_func 1
5670 else
5671 echo "$ac_t""no" 1>&6
5673 done
5675 LIBS="$_SAVE_LIBS"
5679 # Check whether --with-ccache or --without-ccache was given.
5680 if test "${with_ccache+set}" = set; then
5681 withval="$with_ccache"
5682 CCACHE=$withval
5683 else
5684 CCACHE="no"
5688 if test "$CCACHE" != "no"; then
5689 if test -n "$CCACHE"; then
5690 if test "$CCACHE" = "yes"; then
5691 CCACHE=
5692 else
5693 if test ! -e "$CCACHE"; then
5694 { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
5698 for ac_prog in $CCACHE ccache
5700 # Extract the first word of "$ac_prog", so it can be a program name with args.
5701 set dummy $ac_prog; ac_word=$2
5702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5703 echo "configure:5704: checking for $ac_word" >&5
5704 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707 case "$CCACHE" in
5709 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
5711 ?:/*)
5712 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
5715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5716 ac_dummy="$PATH"
5717 for ac_dir in $ac_dummy; do
5718 test -z "$ac_dir" && ac_dir=.
5719 if test -f $ac_dir/$ac_word; then
5720 ac_cv_path_CCACHE="$ac_dir/$ac_word"
5721 break
5723 done
5724 IFS="$ac_save_ifs"
5726 esac
5728 CCACHE="$ac_cv_path_CCACHE"
5729 if test -n "$CCACHE"; then
5730 echo "$ac_t""$CCACHE" 1>&6
5731 else
5732 echo "$ac_t""no" 1>&6
5735 test -n "$CCACHE" && break
5736 done
5738 if test -z "$CCACHE" -o "$CCACHE" = ":"; then
5739 { echo "configure: error: ccache not found" 1>&2; exit 1; }
5740 elif test -x "$CCACHE"; then
5741 CC="$CCACHE $CC"
5742 CXX="$CCACHE $CXX"
5743 else
5744 { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
5748 # Check whether --enable-strip or --disable-strip was given.
5749 if test "${enable_strip+set}" = set; then
5750 enableval="$enable_strip"
5751 if test "$enableval" = "yes"; then
5752 ENABLE_STRIP=1
5757 case "${target_os}" in
5758 hpux*)
5759 if test -z "$GNU_CC"; then
5761 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5762 echo "configure:5763: checking for +Olit support" >&5
5763 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5764 echo $ac_n "(cached) $ac_c" 1>&6
5765 else
5766 ac_cv_hpux_usable_olit_option=no
5767 rm -f conftest*
5768 echo 'int main() { return 0; }' | cat > conftest.c
5769 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5770 if test $? -eq 0; then
5771 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5772 ac_cv_hpux_usable_olit_option=yes
5775 rm -f conftest*
5779 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5781 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5782 CFLAGS="$CFLAGS +Olit=all"
5783 CXXFLAGS="$CXXFLAGS +Olit=all"
5784 else
5785 CFLAGS="$CFLAGS +ESlit"
5786 CXXFLAGS="$CXXFLAGS +ESlit"
5790 esac
5794 case "$target_os" in
5795 darwin*)
5796 _HAVE_PTHREADS=1
5798 wince*)
5799 _HAVE_PTHREADS=
5803 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5804 echo "configure:5805: checking for pthread_create in -lpthreads" >&5
5805 echo "
5806 #include <pthread.h>
5807 void *foo(void *v) { return v; }
5808 int main() {
5809 pthread_t t;
5810 if (!pthread_create(&t, 0, &foo, 0)) {
5811 pthread_join(t, 0);
5813 return 0;
5814 }" > dummy.c ;
5815 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5816 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5817 _res=$? ;
5818 rm -f dummy.c dummy${ac_exeext} ;
5819 if test "$_res" = "0"; then
5820 echo "$ac_t""yes" 1>&6
5821 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5822 else
5823 echo "$ac_t""no" 1>&6
5825 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5826 echo "configure:5827: checking for pthread_create in -lpthread" >&5
5827 echo "
5828 #include <pthread.h>
5829 void *foo(void *v) { return v; }
5830 int main() {
5831 pthread_t t;
5832 if (!pthread_create(&t, 0, &foo, 0)) {
5833 pthread_join(t, 0);
5835 return 0;
5836 }" > dummy.c ;
5837 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5838 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5839 _res=$? ;
5840 rm -f dummy.c dummy${ac_exeext} ;
5841 if test "$_res" = "0"; then
5842 echo "$ac_t""yes" 1>&6
5843 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5844 else
5845 echo "$ac_t""no" 1>&6
5847 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5848 echo "configure:5849: checking for pthread_create in -lc_r" >&5
5849 echo "
5850 #include <pthread.h>
5851 void *foo(void *v) { return v; }
5852 int main() {
5853 pthread_t t;
5854 if (!pthread_create(&t, 0, &foo, 0)) {
5855 pthread_join(t, 0);
5857 return 0;
5858 }" > dummy.c ;
5859 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5860 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5861 _res=$? ;
5862 rm -f dummy.c dummy${ac_exeext} ;
5863 if test "$_res" = "0"; then
5864 echo "$ac_t""yes" 1>&6
5865 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5866 else
5867 echo "$ac_t""no" 1>&6
5869 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5870 echo "configure:5871: checking for pthread_create in -lc" >&5
5871 echo "
5872 #include <pthread.h>
5873 void *foo(void *v) { return v; }
5874 int main() {
5875 pthread_t t;
5876 if (!pthread_create(&t, 0, &foo, 0)) {
5877 pthread_join(t, 0);
5879 return 0;
5880 }" > dummy.c ;
5881 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5882 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5883 _res=$? ;
5884 rm -f dummy.c dummy${ac_exeext} ;
5885 if test "$_res" = "0"; then
5886 echo "$ac_t""yes" 1>&6
5887 _HAVE_PTHREADS=1
5889 else
5890 echo "$ac_t""no" 1>&6
5904 esac
5906 # Check whether --with-pthreads or --without-pthreads was given.
5907 if test "${with_pthreads+set}" = set; then
5908 withval="$with_pthreads"
5909 if test "$withval" = "yes"; then
5910 if test -n "$_HAVE_PTHREADS"; then
5911 USE_PTHREADS=1
5912 USE_USER_PTHREADS=
5913 USE_NSPR_THREADS=
5914 else
5915 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5917 else
5918 USE_PTHREADS=
5919 _PTHREAD_LDFLAGS=
5921 else
5922 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5923 USE_PTHREADS=1
5924 USE_USER_PTHREADS=
5925 USE_NSPR_THREADS=
5930 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5931 if test "${enable_user_pthreads+set}" = set; then
5932 enableval="$enable_user_pthreads"
5933 if test "$enableval" = "yes"; then
5934 if test -n "$_HAVE_PTHREADS"; then
5935 USE_PTHREADS=
5936 USE_USER_PTHREADS=1
5937 USE_NSPR_THREADS=
5938 else
5939 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5945 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5946 if test "${enable_nspr_threads+set}" = set; then
5947 enableval="$enable_nspr_threads"
5948 if test "$enableval" = "yes"; then
5949 USE_PTHREADS=
5950 USE_USER_PTHREADS=
5951 USE_NSPR_THREADS=1
5956 case "$target" in
5957 *-beos*)
5958 # Check whether --with-bthreads or --without-bthreads was given.
5959 if test "${with_bthreads+set}" = set; then
5960 withval="$with_bthreads"
5961 if test "$withval" = "yes"; then
5962 USE_BTHREADS=1
5963 USE_USER_PTHREADS=
5964 USE_PTHREADS=
5969 esac
5971 fi # SKIP_LIBRARY_CHECKS
5973 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5974 if test "${enable_ipv6+set}" = set; then
5975 enableval="$enable_ipv6"
5976 if test "$enableval" = "yes"; then
5977 USE_IPV6=1
5978 else
5979 USE_IPV6=
5984 if test -n "$USE_PTHREADS"; then
5985 rm -f conftest*
5986 ac_cv_have_dash_pthread=no
5987 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5988 echo "configure:5989: checking whether ${CC-cc} accepts -pthread" >&5
5989 echo 'int main() { return 0; }' | cat > conftest.c
5990 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5991 if test $? -eq 0; then
5992 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5993 ac_cv_have_dash_pthread=yes
5994 case "$target_os" in
5995 freebsd*)
5996 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5999 CFLAGS="$CFLAGS -pthread"
6000 CXXFLAGS="$CXXFLAGS -pthread"
6002 esac
6005 rm -f conftest*
6006 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
6008 ac_cv_have_dash_pthreads=no
6009 if test "$ac_cv_have_dash_pthread" = "no"; then
6010 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
6011 echo "configure:6012: checking whether ${CC-cc} accepts -pthreads" >&5
6012 echo 'int main() { return 0; }' | cat > conftest.c
6013 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
6014 if test $? -eq 0; then
6015 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
6016 ac_cv_have_dash_pthreads=yes
6017 CFLAGS="$CFLAGS -pthreads"
6018 CXXFLAGS="$CXXFLAGS -pthreads"
6021 rm -f conftest*
6022 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
6025 case "$target" in
6026 *-solaris*)
6027 if test "$ac_cv_have_dash_pthreads" = "yes"; then
6028 _PTHREAD_LDFLAGS=
6031 *-freebsd*)
6032 cat >> confdefs.h <<\EOF
6033 #define _REENTRANT 1
6036 cat >> confdefs.h <<\EOF
6037 #define _THREAD_SAFE 1
6040 if test "$ac_cv_have_dash_pthread" = "yes"; then
6041 _PTHREAD_LDFLAGS="-pthread"
6042 else
6043 _PTHREAD_LDFLAGS="-lc_r"
6046 *-netbsd*)
6047 if test "$ac_cv_have_dash_pthread" = "yes"; then
6048 _PTHREAD_LDFLAGS="-pthread"
6051 *-bsdi*)
6052 cat >> confdefs.h <<\EOF
6053 #define _THREAD_SAFE 1
6056 if test "$ac_cv_have_dash_pthread" = "yes"; then
6057 _PTHREAD_LDFLAGS=
6060 *-openbsd*)
6061 if test "$ac_cv_have_dash_pthread" = "yes"; then
6062 _PTHREAD_LDFLAGS=-pthread
6065 *-linux*|*-gnu*|*-k*bsd*-gnu)
6066 cat >> confdefs.h <<\EOF
6067 #define _REENTRANT 1
6071 esac
6073 else
6074 if test -n "$USE_USER_PTHREADS"; then
6075 USE_PTHREADS=
6076 USE_NSPR_THREADS=
6077 else
6078 _PTHREAD_LDFLAGS=
6082 case "$target" in
6083 *-aix*)
6084 if test -n "$USE_NSPR_THREADS"; then
6085 cat >> confdefs.h <<\EOF
6086 #define _PR_LOCAL_THREADS_ONLY 1
6090 case "$target_os" in
6091 aix4.1*)
6092 if test -z "$USE_PTHREADS"; then
6093 cat >> confdefs.h <<\EOF
6094 #define AIX_RENAME_SELECT 1
6099 aix4.2*)
6100 if test -z "$USE_NSPR_THREADS"; then
6101 cat >> confdefs.h <<\EOF
6102 #define HAVE_POINTER_LOCALTIME_R 1
6107 aix4.3*)
6108 if test -z "$USE_NSPR_THREADS"; then
6109 cat >> confdefs.h <<\EOF
6110 #define HAVE_POINTER_LOCALTIME_R 1
6114 if test -n "$USE_PTHREADS"; then
6115 cat >> confdefs.h <<\EOF
6116 #define _PR_HAVE_THREADSAFE_GETHOST 1
6122 if test -z "$USE_NSPR_THREADS"; then
6123 cat >> confdefs.h <<\EOF
6124 #define HAVE_POINTER_LOCALTIME_R 1
6128 if test -n "$USE_PTHREADS"; then
6129 cat >> confdefs.h <<\EOF
6130 #define _PR_HAVE_THREADSAFE_GETHOST 1
6135 esac
6137 *-bsdi*)
6138 if test -n "$USE_PTHREADS"; then
6139 cat >> confdefs.h <<\EOF
6140 #define _PR_NEED_PTHREAD_INIT 1
6145 *-freebsd*)
6146 if test -n "$USE_NSPR_THREADS"; then
6147 cat >> confdefs.h <<\EOF
6148 #define _PR_LOCAL_THREADS_ONLY 1
6153 *-hpux*)
6154 if test -n "$USE_NSPR_THREADS"; then
6155 cat >> confdefs.h <<\EOF
6156 #define _PR_LOCAL_THREADS_ONLY 1
6160 if test "$USE_PTHREADS"; then
6161 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
6162 cat >> confdefs.h <<\EOF
6163 #define _REENTRANT 1
6166 cat >> confdefs.h <<\EOF
6167 #define _PR_DCETHREADS 1
6170 else
6171 cat >> confdefs.h <<EOF
6172 #define _POSIX_C_SOURCE 199506L
6175 cat >> confdefs.h <<\EOF
6176 #define _PR_HAVE_THREADSAFE_GETHOST 1
6181 if test "$USE_USER_PTHREADS"; then
6182 cat >> confdefs.h <<EOF
6183 #define _POSIX_C_SOURCE 199506L
6188 *-irix*)
6189 if test "${target_os}" = "irix6.5"; then
6190 if test -n "$USE_PTHREADS"; then
6191 cat >> confdefs.h <<\EOF
6192 #define _PR_HAVE_GETHOST_R 1
6195 cat >> confdefs.h <<\EOF
6196 #define _PR_HAVE_GETHOST_R_POINTER 1
6202 *-linux*|*-gnu*|*-k*bsd*-gnu)
6203 if test -n "$USE_NSPR_THREADS"; then
6204 cat >> confdefs.h <<\EOF
6205 #define _PR_LOCAL_THREADS_ONLY 1
6210 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
6211 USE_PTHREADS=
6212 _PTHREAD_LDFLAGS=
6213 USE_USER_PTHREADS=
6215 *-netbsd*|*-openbsd*)
6216 if test -n "$USE_NSPR_THREADS"; then
6217 cat >> confdefs.h <<\EOF
6218 #define _PR_LOCAL_THREADS_ONLY 1
6223 *-osf*)
6224 if test -n "$USE_NSPR_THREADS"; then
6225 cat >> confdefs.h <<\EOF
6226 #define _PR_LOCAL_THREADS_ONLY 1
6230 if test -n "$USE_PTHREADS"; then
6231 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
6233 else
6234 cat >> confdefs.h <<\EOF
6235 #define _PR_HAVE_THREADSAFE_GETHOST 1
6241 *-solaris*)
6242 if test -n "$USE_NSPR_THREADS"; then
6243 cat >> confdefs.h <<\EOF
6244 #define _PR_LOCAL_THREADS_ONLY 1
6248 if test -n "$USE_PTHREADS"; then
6249 cat >> confdefs.h <<\EOF
6250 #define _REENTRANT 1
6253 cat >> confdefs.h <<\EOF
6254 #define HAVE_POINTER_LOCALTIME_R 1
6257 if test "$OS_TEST" = "i86pc"; then
6258 if test -n "$USE_64"; then
6259 PR_MD_ASFILES=os_SunOS_x86_64.s
6260 else
6261 PR_MD_ASFILES=os_SunOS_x86.s
6263 else
6264 if test -n "$USE_64"; then
6265 PR_MD_ASFILES=os_SunOS_sparcv9.s
6270 *-nto*)
6271 if test -n "$USE_PTHREADS"; then
6272 cat >> confdefs.h <<\EOF
6273 #define _PR_HAVE_GETHOST_R 1
6276 cat >> confdefs.h <<\EOF
6277 #define _PR_HAVE_GETHOST_R_POINTER 1
6282 esac
6284 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
6286 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
6287 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
6290 if test -n "$_SAVE_DEBUG_FLAGS"; then
6291 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
6294 if test -n "$MOZ_OPTIMIZE"; then
6295 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
6296 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
6299 if test -n "$MOZ_DEBUG_SYMBOLS"; then
6300 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
6301 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
6304 if test -n "$MOZ_OPTIMIZE"; then
6305 OBJDIR_TAG=_OPT
6306 else
6307 OBJDIR_TAG=_DBG
6310 if test -n "$USE_64"; then
6311 COMPILER_TAG=_64
6314 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
6316 case "$target_os" in
6317 cygwin*|msvc*|mks*)
6318 CC="\$(CYGWIN_WRAPPER) $CC"
6319 CXX="\$(CYGWIN_WRAPPER) $CXX"
6320 RC="\$(CYGWIN_WRAPPER) $RC"
6322 esac
6324 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
6325 if test "${enable_wrap_malloc+set}" = set; then
6326 enableval="$enable_wrap_malloc"
6327 if test "$enableval" = "yes"; then
6328 _WRAP_MALLOC=1
6333 if test -n "$_WRAP_MALLOC"; then
6334 if test -n "$GNU_CC"; then
6335 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
6336 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
6337 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
6338 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
6339 else
6340 { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6344 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6345 if test "${with_wrap_malloc+set}" = set; then
6346 withval="$with_wrap_malloc"
6347 WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
6455 MAKEFILES="
6456 Makefile
6457 config/Makefile
6458 config/autoconf.mk
6459 config/nsprincl.mk
6460 config/nsprincl.sh
6461 config/nspr-config
6462 config/nspr.pc
6463 lib/Makefile
6464 lib/ds/Makefile
6465 lib/libc/Makefile
6466 lib/libc/include/Makefile
6467 lib/libc/src/Makefile
6468 lib/tests/Makefile
6469 pkg/Makefile
6470 pr/Makefile
6471 pr/include/Makefile
6472 pr/include/md/Makefile
6473 pr/include/obsolete/Makefile
6474 pr/include/private/Makefile
6475 pr/src/Makefile
6476 pr/src/io/Makefile
6477 pr/src/linking/Makefile
6478 pr/src/malloc/Makefile
6479 pr/src/md/Makefile
6480 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6481 pr/src/memory/Makefile
6482 pr/src/misc/Makefile
6483 pr/src/threads/Makefile
6484 pr/tests/Makefile
6485 pr/tests/dll/Makefile
6488 if test "$OS_TARGET" = "Linux"; then
6489 MAKEFILES="$MAKEFILES
6490 pkg/linux/Makefile
6492 elif test "$OS_TARGET" = "SunOS"; then
6493 MAKEFILES="$MAKEFILES
6494 pkg/solaris/Makefile
6495 pkg/solaris/SUNWpr/Makefile
6496 pkg/solaris/SUNWprd/Makefile
6500 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6501 MAKEFILES="$MAKEFILES
6502 pr/src/threads/combined/Makefile
6504 elif test -n "$USE_PTHREADS"; then
6505 MAKEFILES="$MAKEFILES
6506 pr/src/pthreads/Makefile
6508 elif test -n "$USE_BTHREADS"; then
6509 MAKEFILES="$MAKEFILES
6510 pr/src/bthreads/Makefile
6514 if test -n "$USE_CPLUS"; then
6515 MAKEFILES="$MAKEFILES
6516 pr/src/cplus/Makefile
6517 pr/src/cplus/tests/Makefile
6521 echo $MAKEFILES > unallmakefiles
6523 trap '' 1 2 15
6524 cat > confcache <<\EOF
6525 # This file is a shell script that caches the results of configure
6526 # tests run on this system so they can be shared between configure
6527 # scripts and configure runs. It is not useful on other systems.
6528 # If it contains results you don't want to keep, you may remove or edit it.
6530 # By default, configure uses ./config.cache as the cache file,
6531 # creating it if it does not exist already. You can give configure
6532 # the --cache-file=FILE option to use a different cache file; that is
6533 # what configure does when it calls configure scripts in
6534 # subdirectories, so they share the cache.
6535 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6536 # config.status only pays attention to the cache file if you give it the
6537 # --recheck option to rerun configure.
6540 # The following way of writing the cache mishandles newlines in values,
6541 # but we know of no workaround that is simple, portable, and efficient.
6542 # So, don't put newlines in cache variables' values.
6543 # Ultrix sh set writes to stderr and can't be redirected directly,
6544 # and sets the high bit in the cache file unless we assign to the vars.
6545 (set) 2>&1 |
6546 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6547 *ac_space=\ *)
6548 # `set' does not quote correctly, so add quotes (double-quote substitution
6549 # turns \\\\ into \\, and sed turns \\ into \).
6550 sed -n \
6551 -e "s/'/'\\\\''/g" \
6552 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6555 # `set' quotes correctly as required by POSIX, so do not add quotes.
6556 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6558 esac >> confcache
6559 if cmp -s $cache_file confcache; then
6561 else
6562 if test -w $cache_file; then
6563 echo "updating cache $cache_file"
6564 cat confcache > $cache_file
6565 else
6566 echo "not updating unwritable cache $cache_file"
6569 rm -f confcache
6571 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6573 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6574 # Let make expand exec_prefix.
6575 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6577 # Any assignment to VPATH causes Sun make to only execute
6578 # the first set of double-colon rules, so remove it if not needed.
6579 # If there is a colon in the path, we need to keep it.
6580 if test "x$srcdir" = x.; then
6581 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6584 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6586 # Transform confdefs.h into DEFS.
6587 # Protect against shell expansion while executing Makefile rules.
6588 # Protect against Makefile macro expansion.
6589 cat > conftest.defs <<\EOF
6590 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6591 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6592 s%\[%\\&%g
6593 s%\]%\\&%g
6594 s%\$%$$%g
6596 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
6597 rm -f conftest.defs
6600 # Without the "./", some shells look in PATH for config.status.
6601 : ${CONFIG_STATUS=./config.status}
6603 echo creating $CONFIG_STATUS
6604 rm -f $CONFIG_STATUS
6605 cat > $CONFIG_STATUS <<EOF
6606 #! /bin/sh
6607 # Generated automatically by configure.
6608 # Run this file to recreate the current configuration.
6609 # This directory was configured as follows,
6610 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6612 # $0 $ac_configure_args
6614 # Compiler output produced by configure, useful for debugging
6615 # configure, is in ./config.log if it exists.
6617 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6618 for ac_option
6620 case "\$ac_option" in
6621 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6622 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6623 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6624 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6625 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6626 exit 0 ;;
6627 -help | --help | --hel | --he | --h)
6628 echo "\$ac_cs_usage"; exit 0 ;;
6629 *) echo "\$ac_cs_usage"; exit 1 ;;
6630 esac
6631 done
6633 ac_given_srcdir=$srcdir
6635 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6637 cat >> $CONFIG_STATUS <<EOF
6641 # Protect against being on the right side of a sed subst in config.status.
6642 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6643 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6644 $ac_vpsub
6645 $extrasub
6646 s%@SHELL@%$SHELL%g
6647 s%@CFLAGS@%$CFLAGS%g
6648 s%@CPPFLAGS@%$CPPFLAGS%g
6649 s%@CXXFLAGS@%$CXXFLAGS%g
6650 s%@FFLAGS@%$FFLAGS%g
6651 s%@DEFS@%$DEFS%g
6652 s%@LDFLAGS@%$LDFLAGS%g
6653 s%@LIBS@%$LIBS%g
6654 s%@exec_prefix@%$exec_prefix%g
6655 s%@prefix@%$prefix%g
6656 s%@program_transform_name@%$program_transform_name%g
6657 s%@bindir@%$bindir%g
6658 s%@sbindir@%$sbindir%g
6659 s%@libexecdir@%$libexecdir%g
6660 s%@datadir@%$datadir%g
6661 s%@sysconfdir@%$sysconfdir%g
6662 s%@sharedstatedir@%$sharedstatedir%g
6663 s%@localstatedir@%$localstatedir%g
6664 s%@libdir@%$libdir%g
6665 s%@includedir@%$includedir%g
6666 s%@oldincludedir@%$oldincludedir%g
6667 s%@infodir@%$infodir%g
6668 s%@mandir@%$mandir%g
6669 s%@host@%$host%g
6670 s%@host_alias@%$host_alias%g
6671 s%@host_cpu@%$host_cpu%g
6672 s%@host_vendor@%$host_vendor%g
6673 s%@host_os@%$host_os%g
6674 s%@target@%$target%g
6675 s%@target_alias@%$target_alias%g
6676 s%@target_cpu@%$target_cpu%g
6677 s%@target_vendor@%$target_vendor%g
6678 s%@target_os@%$target_os%g
6679 s%@build@%$build%g
6680 s%@build_alias@%$build_alias%g
6681 s%@build_cpu@%$build_cpu%g
6682 s%@build_vendor@%$build_vendor%g
6683 s%@build_os@%$build_os%g
6684 s%@CC@%$CC%g
6685 s%@dist_prefix@%$dist_prefix%g
6686 s%@dist_bindir@%$dist_bindir%g
6687 s%@dist_includedir@%$dist_includedir%g
6688 s%@dist_libdir@%$dist_libdir%g
6689 s%@WHOAMI@%$WHOAMI%g
6690 s%@HOST_CC@%$HOST_CC%g
6691 s%@CXX@%$CXX%g
6692 s%@RANLIB@%$RANLIB%g
6693 s%@AR@%$AR%g
6694 s%@AS@%$AS%g
6695 s%@LD@%$LD%g
6696 s%@STRIP@%$STRIP%g
6697 s%@WINDRES@%$WINDRES%g
6698 s%@CPP@%$CPP%g
6699 s%@PERL@%$PERL%g
6700 s%@CCACHE@%$CCACHE%g
6701 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6702 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6703 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6704 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6705 s%@GNU_CC@%$GNU_CC%g
6706 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6707 s%@MSC_VER@%$MSC_VER%g
6708 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6709 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6710 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
6711 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
6712 s%@USE_CPLUS@%$USE_CPLUS%g
6713 s%@USE_IPV6@%$USE_IPV6%g
6714 s%@USE_N32@%$USE_N32%g
6715 s%@USE_64@%$USE_64%g
6716 s%@OBJECT_MODE@%$OBJECT_MODE%g
6717 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6718 s%@USE_PTHREADS@%$USE_PTHREADS%g
6719 s%@USE_BTHREADS@%$USE_BTHREADS%g
6720 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6721 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6722 s%@LIBNSPR@%$LIBNSPR%g
6723 s%@LIBPLC@%$LIBPLC%g
6724 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6725 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6726 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6727 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6728 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6729 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6730 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6731 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6732 s%@CPU_ARCH@%$CPU_ARCH%g
6733 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6734 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6735 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6736 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6737 s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
6738 s%@MKSHLIB@%$MKSHLIB%g
6739 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6740 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6741 s%@OS_TARGET@%$OS_TARGET%g
6742 s%@OS_ARCH@%$OS_ARCH%g
6743 s%@OS_RELEASE@%$OS_RELEASE%g
6744 s%@OS_TEST@%$OS_TEST%g
6745 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6746 s%@DEFINES@%$DEFINES%g
6747 s%@AR_FLAGS@%$AR_FLAGS%g
6748 s%@ASFLAGS@%$ASFLAGS%g
6749 s%@FILTER@%$FILTER%g
6750 s%@IMPLIB@%$IMPLIB%g
6751 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
6752 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
6753 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
6754 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
6755 s%@OS_LIBS@%$OS_LIBS%g
6756 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6757 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6758 s%@NOSUCHFILE@%$NOSUCHFILE%g
6759 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6760 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6761 s%@OBJDIR@%$OBJDIR%g
6762 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6763 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6764 s%@NSINSTALL@%$NSINSTALL%g
6765 s%@OPTIMIZER@%$OPTIMIZER%g
6766 s%@RC@%$RC%g
6767 s%@RCFLAGS@%$RCFLAGS%g
6768 s%@DLLFLAGS@%$DLLFLAGS%g
6769 s%@EXEFLAGS@%$EXEFLAGS%g
6770 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6771 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6772 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6773 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6774 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6775 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6776 s%@NEXT_ROOT@%$NEXT_ROOT%g
6777 s%@MT@%$MT%g
6779 CEOF
6782 cat >> $CONFIG_STATUS <<\EOF
6784 # Split the substitutions into bite-sized pieces for seds with
6785 # small command number limits, like on Digital OSF/1 and HP-UX.
6786 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6787 ac_file=1 # Number of current file.
6788 ac_beg=1 # First line for current file.
6789 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6790 ac_more_lines=:
6791 ac_sed_cmds=""
6792 while $ac_more_lines; do
6793 if test $ac_beg -gt 1; then
6794 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6795 else
6796 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6798 if test ! -s conftest.s$ac_file; then
6799 ac_more_lines=false
6800 rm -f conftest.s$ac_file
6801 else
6802 if test -z "$ac_sed_cmds"; then
6803 ac_sed_cmds="sed -f conftest.s$ac_file"
6804 else
6805 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6807 ac_file=`expr $ac_file + 1`
6808 ac_beg=$ac_end
6809 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6811 done
6812 if test -z "$ac_sed_cmds"; then
6813 ac_sed_cmds=cat
6817 cat >> $CONFIG_STATUS <<EOF
6819 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6821 cat >> $CONFIG_STATUS <<\EOF
6822 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6823 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6824 case "$ac_file" in
6825 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6826 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6827 *) ac_file_in="${ac_file}.in" ;;
6828 esac
6830 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6832 # Remove last slash and all that follows it. Not all systems have dirname.
6833 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6834 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6835 # The file is in a subdirectory.
6836 test ! -d "$ac_dir" && mkdir "$ac_dir"
6837 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6838 # A "../" for each directory in $ac_dir_suffix.
6839 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6840 else
6841 ac_dir_suffix= ac_dots=
6844 case "$ac_given_srcdir" in
6845 .) srcdir=.
6846 if test -z "$ac_dots"; then top_srcdir=.
6847 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6848 /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6849 *) # Relative path.
6850 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6851 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6852 esac
6855 echo creating "$ac_file"
6856 rm -f "$ac_file"
6857 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6858 case "$ac_file" in
6859 *Makefile*) ac_comsub="1i\\
6860 # $configure_input" ;;
6861 *) ac_comsub= ;;
6862 esac
6864 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
6865 sed -e "$ac_comsub
6866 s%@configure_input@%$configure_input%g
6867 s%@srcdir@%$srcdir%g
6868 s%@top_srcdir@%$top_srcdir%g
6869 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6870 fi; done
6871 rm -f conftest.s*
6876 cat >> $CONFIG_STATUS <<EOF
6879 cat >> $CONFIG_STATUS <<\EOF
6880 chmod +x config/nspr-config
6881 exit 0
6883 chmod +x $CONFIG_STATUS
6884 rm -fr confdefs* $ac_clean_files
6885 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1