bug 839193 - test for corresponding bug r=bent
[gecko.git] / nsprpub / configure
blob5348f5c0bb891fec3aa967c327b63dbdd436d73f
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"
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=9
739 MOD_PATCH_VERSION=5
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 # Check whether --with-android-version or --without-android-version was given.
861 if test "${with_android_version+set}" = set; then
862 withval="$with_android_version"
863 android_version=$withval
864 else
865 android_version=5
869 # Check whether --with-android-platform or --without-android-platform was given.
870 if test "${with_android_platform+set}" = set; then
871 withval="$with_android_platform"
872 android_platform=$withval
876 case "$target" in
877 arm-linux*-android*|*-linuxandroid*)
878 android_tool_prefix="arm-linux-androideabi"
880 i?86-*android*)
881 android_tool_prefix="i686-linux-android"
883 mipsel-*android*)
884 android_tool_prefix="mipsel-linux-android"
887 android_tool_prefix="$target_os"
889 esac
892 # Check whether --with-gonk or --without-gonk was given.
893 if test "${with_gonk+set}" = set; then
894 withval="$with_gonk"
895 gonkdir=$withval
899 if test -n "$gonkdir" ; then
901 if test -z "$HOST_CPPFLAGS" ; then
902 HOST_CPPFLAGS=" "
904 if test -z "$HOST_CFLAGS" ; then
905 HOST_CFLAGS=" "
907 if test -z "$HOST_CXXFLAGS" ; then
908 HOST_CXXFLAGS=" "
910 if test -z "$HOST_LDFLAGS" ; then
911 HOST_LDFLAGS=" "
914 cat >> confdefs.h <<\EOF
915 #define ANDROID 1
918 else
919 case "$target" in
920 *-android*|*-linuxandroid*)
921 if test -z "$android_ndk" ; then
922 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
925 if test -z "$android_toolchain" ; then
926 echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
927 echo "configure:928: checking for android toolchain directory" >&5
929 kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
931 case "$target_cpu" in
932 arm)
933 target_name=arm-linux-androideabi-4.4.3
935 i?86)
936 target_name=x86-4.4.3
938 mipsel)
939 target_name=mipsel-linux-android-4.4.3
941 esac
942 android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
944 if test -d "$android_toolchain" ; then
945 echo "$ac_t""$android_toolchain" 1>&6
946 else
947 { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
951 if test -z "$android_platform" ; then
952 echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
953 echo "configure:954: checking for android platform directory" >&5
955 case "$target_cpu" in
956 arm)
957 target_name=arm
959 i?86)
960 target_name=x86
962 mipsel)
963 target_name=mips
965 esac
967 android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
969 if test -d "$android_platform" ; then
970 echo "$ac_t""$android_platform" 1>&6
971 else
972 { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
976 case "$target_cpu" in
977 i?86)
978 if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
979 android_tool_prefix="i686-android-linux"
982 esac
984 AS="$android_toolchain"/bin/"$android_tool_prefix"-as
985 CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
986 CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
987 CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
988 LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
989 AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
990 RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
991 STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
993 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
994 CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
995 CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
996 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
998 if test -z "$HOST_CPPFLAGS" ; then
999 HOST_CPPFLAGS=" "
1001 if test -z "$HOST_CFLAGS" ; then
1002 HOST_CFLAGS=" "
1004 if test -z "$HOST_CXXFLAGS" ; then
1005 HOST_CXXFLAGS=" "
1007 if test -z "$HOST_LDFLAGS" ; then
1008 HOST_LDFLAGS=" "
1011 cat >> confdefs.h <<\EOF
1012 #define ANDROID 1
1015 cat >> confdefs.h <<EOF
1016 #define ANDROID_VERSION $android_version
1020 esac
1023 dist_prefix='${MOD_DEPTH}/dist'
1024 dist_bindir='${dist_prefix}/bin'
1025 dist_includedir='${dist_prefix}/include/nspr'
1026 dist_libdir='${dist_prefix}/lib'
1027 if test "${includedir}" = '${prefix}/include'; then
1028 includedir='${prefix}/include/nspr'
1031 # Check whether --with-dist-prefix or --without-dist-prefix was given.
1032 if test "${with_dist_prefix+set}" = set; then
1033 withval="$with_dist_prefix"
1034 dist_prefix=$withval
1038 # Check whether --with-dist-bindir or --without-dist-bindir was given.
1039 if test "${with_dist_bindir+set}" = set; then
1040 withval="$with_dist_bindir"
1041 dist_bindir=$withval
1045 # Check whether --with-dist-includedir or --without-dist-includedir was given.
1046 if test "${with_dist_includedir+set}" = set; then
1047 withval="$with_dist_includedir"
1048 dist_includedir=$withval
1052 # Check whether --with-dist-libdir or --without-dist-libdir was given.
1053 if test "${with_dist_libdir+set}" = set; then
1054 withval="$with_dist_libdir"
1055 dist_libdir=$withval
1064 # Check whether --with-mozilla or --without-mozilla was given.
1065 if test "${with_mozilla+set}" = set; then
1066 withval="$with_mozilla"
1067 if test "$withval" = "yes"; then
1068 cat >> confdefs.h <<\EOF
1069 #define MOZILLA_CLIENT 1
1072 MOZILLA_CLIENT=1
1073 else
1074 MOZILLA_CLIENT=
1076 else
1077 if test -n "$MOZILLA_CLIENT"; then
1078 cat >> confdefs.h <<\EOF
1079 #define MOZILLA_CLIENT 1
1086 # Check whether --enable-optimize or --disable-optimize was given.
1087 if test "${enable_optimize+set}" = set; then
1088 enableval="$enable_optimize"
1089 if test "$enableval" != "no"; then
1090 MOZ_OPTIMIZE=1
1091 if test -n "$enableval" -a "$enableval" != "yes"; then
1092 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1093 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
1095 else
1096 MOZ_OPTIMIZE=
1101 # Check whether --enable-debug or --disable-debug was given.
1102 if test "${enable_debug+set}" = set; then
1103 enableval="$enable_debug"
1104 if test "$enableval" != "no"; then
1105 MOZ_DEBUG=1
1106 MOZ_DEBUG_SYMBOLS=1
1107 if test -n "$enableval" -a "$enableval" != "yes"; then
1108 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1109 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1111 else
1112 MOZ_DEBUG=
1114 else
1115 MOZ_DEBUG_SYMBOLS=1
1119 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
1120 if test "${enable_debug_symbols+set}" = set; then
1121 enableval="$enable_debug_symbols"
1122 if test "$enableval" != "no"; then
1123 MOZ_DEBUG_SYMBOLS=1
1124 if test -n "$enableval" -a "$enableval" != "yes"; then
1125 if test -z "$_SAVE_DEBUG_FLAGS"; then
1126 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1127 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1128 else
1129 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
1132 else
1133 MOZ_DEBUG_SYMBOLS=
1138 # Check whether --enable-win32-target or --disable-win32-target was given.
1139 if test "${enable_win32_target+set}" = set; then
1140 enableval="$enable_win32_target"
1141 OS_TARGET=`echo $enableval | tr a-z A-Z`
1145 # Check whether --enable-symbian-target or --disable-symbian-target was given.
1146 if test "${enable_symbian_target+set}" = set; then
1147 enableval="$enable_symbian_target"
1148 OS_TARGET=`echo $enableval | tr a-z A-Z`
1152 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
1153 if test "${enable_debug_rtl+set}" = set; then
1154 enableval="$enable_debug_rtl"
1155 if test "$enableval" = "yes"; then
1156 USE_DEBUG_RTL=1
1161 # Check whether --enable-n32 or --disable-n32 was given.
1162 if test "${enable_n32+set}" = set; then
1163 enableval="$enable_n32"
1164 if test "$enableval" = "yes"; then
1165 USE_N32=1
1166 else if test "$enableval" = "no"; then
1167 USE_N32=
1173 # Check whether --enable-64bit or --disable-64bit was given.
1174 if test "${enable_64bit+set}" = set; then
1175 enableval="$enable_64bit"
1176 if test "$enableval" = "yes"; then
1177 USE_64=1
1182 # Check whether --enable-mdupdate or --disable-mdupdate was given.
1183 if test "${enable_mdupdate+set}" = set; then
1184 enableval="$enable_mdupdate"
1185 if test "$enableval" = "yes"; then
1186 USE_MDUPDATE=1
1191 # Check whether --enable-cplus or --disable-cplus was given.
1192 if test "${enable_cplus+set}" = set; then
1193 enableval="$enable_cplus"
1194 if test "$enableval" = "yes"; then
1195 USE_CPLUS=1
1200 # Check whether --with-arm-kuser or --without-arm-kuser was given.
1201 if test "${with_arm_kuser+set}" = set; then
1202 withval="$with_arm_kuser"
1203 if test "$withval" = "yes"; then
1204 cat >> confdefs.h <<\EOF
1205 #define _PR_ARM_KUSER 1
1212 # Check whether --with-macos-sdk or --without-macos-sdk was given.
1213 if test "${with_macos_sdk+set}" = set; then
1214 withval="$with_macos_sdk"
1215 MACOS_SDK_DIR=$withval
1219 # Check whether --enable-macos-target or --disable-macos-target was given.
1220 if test "${enable_macos_target+set}" = set; then
1221 enableval="$enable_macos_target"
1222 _MACOSX_DEPLOYMENT_TARGET=$enableval
1226 case "$target" in
1228 *-aix*)
1229 case "${target_os}" in
1230 aix3.2*)
1231 USE_NSPR_THREADS=1
1234 USE_PTHREADS=1
1236 esac
1239 esac
1241 if test -z "$CC"; then
1242 case "$target" in
1244 *-aix*)
1245 if test -z "$USE_NSPR_THREADS"; then
1246 CC=xlc_r
1247 else
1248 CC=xlc
1252 *-hpux*)
1253 CC=cc
1256 *-irix*)
1257 CC=cc
1260 *-osf*)
1261 CC=cc
1264 *-solaris*)
1265 CC=cc
1268 esac
1271 if test -z "$CXX"; then
1272 case "$target" in
1274 *-aix*)
1275 if test -z "$USE_NSPR_THREADS"; then
1276 CXX=xlC_r
1277 else
1278 CXX=xlC
1282 *-hpux*)
1283 case "${target_os}" in
1284 hpux10.30)
1285 CXX=aCC
1287 hpux11.*)
1288 CXX=aCC
1291 CXX=CC
1293 esac
1296 *-irix*)
1297 CXX=CC
1300 *-osf*)
1301 CXX=cxx
1304 *-solaris*)
1305 CXX=CC
1308 esac
1311 if test -z "$SKIP_PATH_CHECKS"; then
1312 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1313 set dummy $WHOAMI whoami; ac_word=$2
1314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1315 echo "configure:1316: checking for $ac_word" >&5
1316 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1317 echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319 case "$WHOAMI" in
1321 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1323 ?:/*)
1324 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1327 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1328 ac_dummy="$PATH"
1329 for ac_dir in $ac_dummy; do
1330 test -z "$ac_dir" && ac_dir=.
1331 if test -f $ac_dir/$ac_word; then
1332 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1333 break
1335 done
1336 IFS="$ac_save_ifs"
1337 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1339 esac
1341 WHOAMI="$ac_cv_path_WHOAMI"
1342 if test -n "$WHOAMI"; then
1343 echo "$ac_t""$WHOAMI" 1>&6
1344 else
1345 echo "$ac_t""no" 1>&6
1350 if test -n "$MOZ_DEBUG"; then
1351 cat >> confdefs.h <<\EOF
1352 #define DEBUG 1
1355 DEFINES="$DEFINES -UNDEBUG"
1357 case "${target_os}" in
1358 beos*)
1359 DEFINES="$DEFINES -DDEBUG_${USER}"
1361 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1362 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1365 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1367 esac
1368 else
1369 cat >> confdefs.h <<\EOF
1370 #define NDEBUG 1
1373 DEFINES="$DEFINES -UDEBUG"
1376 if test -z "$SKIP_COMPILER_CHECKS"; then
1378 if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
1379 echo "cross compiling from $host to $target"
1380 cross_compiling=yes
1382 _SAVE_CC="$CC"
1383 _SAVE_CFLAGS="$CFLAGS"
1384 _SAVE_LDFLAGS="$LDFLAGS"
1386 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1387 echo "configure:1388: checking for $host compiler" >&5
1388 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1390 # Extract the first word of "$ac_prog", so it can be a program name with args.
1391 set dummy $ac_prog; ac_word=$2
1392 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1393 echo "configure:1394: checking for $ac_word" >&5
1394 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1395 echo $ac_n "(cached) $ac_c" 1>&6
1396 else
1397 if test -n "$HOST_CC"; then
1398 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1399 else
1400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1401 ac_dummy="$PATH"
1402 for ac_dir in $ac_dummy; do
1403 test -z "$ac_dir" && ac_dir=.
1404 if test -f $ac_dir/$ac_word; then
1405 ac_cv_prog_HOST_CC="$ac_prog"
1406 break
1408 done
1409 IFS="$ac_save_ifs"
1412 HOST_CC="$ac_cv_prog_HOST_CC"
1413 if test -n "$HOST_CC"; then
1414 echo "$ac_t""$HOST_CC" 1>&6
1415 else
1416 echo "$ac_t""no" 1>&6
1419 test -n "$HOST_CC" && break
1420 done
1421 test -n "$HOST_CC" || HOST_CC=""""
1423 if test -z "$HOST_CC"; then
1424 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1426 echo "$ac_t""$HOST_CC" 1>&6
1427 if test -z "$HOST_CFLAGS"; then
1428 HOST_CFLAGS="$CFLAGS"
1430 if test -z "$HOST_LDFLAGS"; then
1431 HOST_LDFLAGS="$LDFLAGS"
1434 CC="$HOST_CC"
1435 CFLAGS="$HOST_CFLAGS"
1436 LDFLAGS="$HOST_LDFLAGS"
1438 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1439 echo "configure:1440: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1440 cat > conftest.$ac_ext <<EOF
1441 #line 1442 "configure"
1442 #include "confdefs.h"
1444 int main() {
1445 return(0);
1446 ; return 0; }
1448 if { (eval echo configure:1449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1449 rm -rf conftest*
1450 ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1451 else
1452 echo "configure: failed program was:" >&5
1453 cat conftest.$ac_ext >&5
1454 rm -rf conftest*
1455 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1457 rm -f conftest*
1459 CC=$_SAVE_CC
1460 CFLAGS=$_SAVE_CFLAGS
1461 LDFLAGS=$_SAVE_LDFLAGS
1463 case "$build:$target" in
1464 powerpc-apple-darwin8*:i?86-apple-darwin*)
1465 _SAVE_CFLAGS=$CFLAGS
1466 _SAVE_CXXFLAGS=$CXXFLAGS
1467 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1468 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1470 *:arm*-apple-darwin*)
1471 _SAVE_CFLAGS=$CFLAGS
1472 _SAVE_CXXFLAGS=$CXXFLAGS
1473 CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
1474 CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
1476 esac
1478 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1480 # Extract the first word of "$ac_prog", so it can be a program name with args.
1481 set dummy $ac_prog; ac_word=$2
1482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1483 echo "configure:1484: checking for $ac_word" >&5
1484 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1485 echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487 if test -n "$CC"; then
1488 ac_cv_prog_CC="$CC" # Let the user override the test.
1489 else
1490 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1491 ac_dummy="$PATH"
1492 for ac_dir in $ac_dummy; do
1493 test -z "$ac_dir" && ac_dir=.
1494 if test -f $ac_dir/$ac_word; then
1495 ac_cv_prog_CC="$ac_prog"
1496 break
1498 done
1499 IFS="$ac_save_ifs"
1502 CC="$ac_cv_prog_CC"
1503 if test -n "$CC"; then
1504 echo "$ac_t""$CC" 1>&6
1505 else
1506 echo "$ac_t""no" 1>&6
1509 test -n "$CC" && break
1510 done
1511 test -n "$CC" || CC="echo"
1513 unset ac_cv_prog_CC
1514 # Extract the first word of "gcc", so it can be a program name with args.
1515 set dummy gcc; ac_word=$2
1516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1517 echo "configure:1518: checking for $ac_word" >&5
1518 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1519 echo $ac_n "(cached) $ac_c" 1>&6
1520 else
1521 if test -n "$CC"; then
1522 ac_cv_prog_CC="$CC" # Let the user override the test.
1523 else
1524 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1525 ac_dummy="$PATH"
1526 for ac_dir in $ac_dummy; do
1527 test -z "$ac_dir" && ac_dir=.
1528 if test -f $ac_dir/$ac_word; then
1529 ac_cv_prog_CC="gcc"
1530 break
1532 done
1533 IFS="$ac_save_ifs"
1536 CC="$ac_cv_prog_CC"
1537 if test -n "$CC"; then
1538 echo "$ac_t""$CC" 1>&6
1539 else
1540 echo "$ac_t""no" 1>&6
1543 if test -z "$CC"; then
1544 # Extract the first word of "cc", so it can be a program name with args.
1545 set dummy cc; ac_word=$2
1546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1547 echo "configure:1548: checking for $ac_word" >&5
1548 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1549 echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551 if test -n "$CC"; then
1552 ac_cv_prog_CC="$CC" # Let the user override the test.
1553 else
1554 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1555 ac_prog_rejected=no
1556 ac_dummy="$PATH"
1557 for ac_dir in $ac_dummy; do
1558 test -z "$ac_dir" && ac_dir=.
1559 if test -f $ac_dir/$ac_word; then
1560 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1561 ac_prog_rejected=yes
1562 continue
1564 ac_cv_prog_CC="cc"
1565 break
1567 done
1568 IFS="$ac_save_ifs"
1569 if test $ac_prog_rejected = yes; then
1570 # We found a bogon in the path, so make sure we never use it.
1571 set dummy $ac_cv_prog_CC
1572 shift
1573 if test $# -gt 0; then
1574 # We chose a different compiler from the bogus one.
1575 # However, it has the same basename, so the bogon will be chosen
1576 # first if we set CC to just the basename; use the full file name.
1577 shift
1578 set dummy "$ac_dir/$ac_word" "$@"
1579 shift
1580 ac_cv_prog_CC="$@"
1585 CC="$ac_cv_prog_CC"
1586 if test -n "$CC"; then
1587 echo "$ac_t""$CC" 1>&6
1588 else
1589 echo "$ac_t""no" 1>&6
1592 if test -z "$CC"; then
1593 case "`uname -s`" in
1594 *win32* | *WIN32*)
1595 # Extract the first word of "cl", so it can be a program name with args.
1596 set dummy cl; ac_word=$2
1597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1598 echo "configure:1599: checking for $ac_word" >&5
1599 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1600 echo $ac_n "(cached) $ac_c" 1>&6
1601 else
1602 if test -n "$CC"; then
1603 ac_cv_prog_CC="$CC" # Let the user override the test.
1604 else
1605 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1606 ac_dummy="$PATH"
1607 for ac_dir in $ac_dummy; do
1608 test -z "$ac_dir" && ac_dir=.
1609 if test -f $ac_dir/$ac_word; then
1610 ac_cv_prog_CC="cl"
1611 break
1613 done
1614 IFS="$ac_save_ifs"
1617 CC="$ac_cv_prog_CC"
1618 if test -n "$CC"; then
1619 echo "$ac_t""$CC" 1>&6
1620 else
1621 echo "$ac_t""no" 1>&6
1624 esac
1626 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1629 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1630 echo "configure:1631: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1632 ac_ext=c
1633 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1634 ac_cpp='$CPP $CPPFLAGS'
1635 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1636 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1637 cross_compiling=$ac_cv_prog_cc_cross
1639 cat > conftest.$ac_ext << EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1644 main(){return(0);}
1646 if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1647 ac_cv_prog_cc_works=yes
1648 # If we can't run a trivial program, we are probably using a cross compiler.
1649 if (./conftest; exit) 2>/dev/null; then
1650 ac_cv_prog_cc_cross=no
1651 else
1652 ac_cv_prog_cc_cross=yes
1654 else
1655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1657 ac_cv_prog_cc_works=no
1659 rm -fr conftest*
1660 ac_ext=c
1661 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1662 ac_cpp='$CPP $CPPFLAGS'
1663 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1664 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1665 cross_compiling=$ac_cv_prog_cc_cross
1667 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1668 if test $ac_cv_prog_cc_works = no; then
1669 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1671 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1672 echo "configure:1673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1673 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1674 cross_compiling=$ac_cv_prog_cc_cross
1676 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1677 echo "configure:1678: checking whether we are using GNU C" >&5
1678 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1679 echo $ac_n "(cached) $ac_c" 1>&6
1680 else
1681 cat > conftest.c <<EOF
1682 #ifdef __GNUC__
1683 yes;
1684 #endif
1686 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1687 ac_cv_prog_gcc=yes
1688 else
1689 ac_cv_prog_gcc=no
1693 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1695 if test $ac_cv_prog_gcc = yes; then
1696 GCC=yes
1697 else
1698 GCC=
1701 ac_test_CFLAGS="${CFLAGS+set}"
1702 ac_save_CFLAGS="$CFLAGS"
1703 CFLAGS=
1704 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1705 echo "configure:1706: checking whether ${CC-cc} accepts -g" >&5
1706 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1707 echo $ac_n "(cached) $ac_c" 1>&6
1708 else
1709 echo 'void f(){}' > conftest.c
1710 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1711 ac_cv_prog_cc_g=yes
1712 else
1713 ac_cv_prog_cc_g=no
1715 rm -f conftest*
1719 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1720 if test "$ac_test_CFLAGS" = set; then
1721 CFLAGS="$ac_save_CFLAGS"
1722 elif test $ac_cv_prog_cc_g = yes; then
1723 if test "$GCC" = yes; then
1724 CFLAGS="-g -O2"
1725 else
1726 CFLAGS="-g"
1728 else
1729 if test "$GCC" = yes; then
1730 CFLAGS="-O2"
1731 else
1732 CFLAGS=
1736 if test -n "$USE_CPLUS"; then
1737 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1739 # Extract the first word of "$ac_prog", so it can be a program name with args.
1740 set dummy $ac_prog; ac_word=$2
1741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1742 echo "configure:1743: checking for $ac_word" >&5
1743 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1744 echo $ac_n "(cached) $ac_c" 1>&6
1745 else
1746 if test -n "$CXX"; then
1747 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1748 else
1749 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1750 ac_dummy="$PATH"
1751 for ac_dir in $ac_dummy; do
1752 test -z "$ac_dir" && ac_dir=.
1753 if test -f $ac_dir/$ac_word; then
1754 ac_cv_prog_CXX="$ac_prog"
1755 break
1757 done
1758 IFS="$ac_save_ifs"
1761 CXX="$ac_cv_prog_CXX"
1762 if test -n "$CXX"; then
1763 echo "$ac_t""$CXX" 1>&6
1764 else
1765 echo "$ac_t""no" 1>&6
1768 test -n "$CXX" && break
1769 done
1770 test -n "$CXX" || CXX="echo"
1772 unset ac_cv_prog_CXX
1773 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1775 # Extract the first word of "$ac_prog", so it can be a program name with args.
1776 set dummy $ac_prog; ac_word=$2
1777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1778 echo "configure:1779: checking for $ac_word" >&5
1779 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1780 echo $ac_n "(cached) $ac_c" 1>&6
1781 else
1782 if test -n "$CXX"; then
1783 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1784 else
1785 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1786 ac_dummy="$PATH"
1787 for ac_dir in $ac_dummy; do
1788 test -z "$ac_dir" && ac_dir=.
1789 if test -f $ac_dir/$ac_word; then
1790 ac_cv_prog_CXX="$ac_prog"
1791 break
1793 done
1794 IFS="$ac_save_ifs"
1797 CXX="$ac_cv_prog_CXX"
1798 if test -n "$CXX"; then
1799 echo "$ac_t""$CXX" 1>&6
1800 else
1801 echo "$ac_t""no" 1>&6
1804 test -n "$CXX" && break
1805 done
1806 test -n "$CXX" || CXX="gcc"
1809 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1810 echo "configure:1811: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1812 ac_ext=C
1813 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1814 ac_cpp='$CXXCPP $CPPFLAGS'
1815 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1816 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1817 cross_compiling=$ac_cv_prog_cxx_cross
1819 cat > conftest.$ac_ext << EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1824 int main(){return(0);}
1826 if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1827 ac_cv_prog_cxx_works=yes
1828 # If we can't run a trivial program, we are probably using a cross compiler.
1829 if (./conftest; exit) 2>/dev/null; then
1830 ac_cv_prog_cxx_cross=no
1831 else
1832 ac_cv_prog_cxx_cross=yes
1834 else
1835 echo "configure: failed program was:" >&5
1836 cat conftest.$ac_ext >&5
1837 ac_cv_prog_cxx_works=no
1839 rm -fr conftest*
1840 ac_ext=c
1841 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1842 ac_cpp='$CPP $CPPFLAGS'
1843 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1844 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1845 cross_compiling=$ac_cv_prog_cc_cross
1847 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1848 if test $ac_cv_prog_cxx_works = no; then
1849 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1851 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1852 echo "configure:1853: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1853 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1854 cross_compiling=$ac_cv_prog_cxx_cross
1856 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1857 echo "configure:1858: checking whether we are using GNU C++" >&5
1858 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1859 echo $ac_n "(cached) $ac_c" 1>&6
1860 else
1861 cat > conftest.C <<EOF
1862 #ifdef __GNUC__
1863 yes;
1864 #endif
1866 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1867 ac_cv_prog_gxx=yes
1868 else
1869 ac_cv_prog_gxx=no
1873 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1875 if test $ac_cv_prog_gxx = yes; then
1876 GXX=yes
1877 else
1878 GXX=
1881 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1882 ac_save_CXXFLAGS="$CXXFLAGS"
1883 CXXFLAGS=
1884 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1885 echo "configure:1886: checking whether ${CXX-g++} accepts -g" >&5
1886 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1887 echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889 echo 'void f(){}' > conftest.cc
1890 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1891 ac_cv_prog_cxx_g=yes
1892 else
1893 ac_cv_prog_cxx_g=no
1895 rm -f conftest*
1899 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1900 if test "$ac_test_CXXFLAGS" = set; then
1901 CXXFLAGS="$ac_save_CXXFLAGS"
1902 elif test $ac_cv_prog_cxx_g = yes; then
1903 if test "$GXX" = yes; then
1904 CXXFLAGS="-g -O2"
1905 else
1906 CXXFLAGS="-g"
1908 else
1909 if test "$GXX" = yes; then
1910 CXXFLAGS="-O2"
1911 else
1912 CXXFLAGS=
1918 case "$build:$target" in
1919 powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
1920 CFLAGS=$_SAVE_CFLAGS
1921 CXXFLAGS=$_SAVE_CXXFLAGS
1923 esac
1925 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1927 # Extract the first word of "$ac_prog", so it can be a program name with args.
1928 set dummy $ac_prog; ac_word=$2
1929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1930 echo "configure:1931: checking for $ac_word" >&5
1931 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1932 echo $ac_n "(cached) $ac_c" 1>&6
1933 else
1934 if test -n "$RANLIB"; then
1935 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1936 else
1937 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1938 ac_dummy="$PATH"
1939 for ac_dir in $ac_dummy; do
1940 test -z "$ac_dir" && ac_dir=.
1941 if test -f $ac_dir/$ac_word; then
1942 ac_cv_prog_RANLIB="$ac_prog"
1943 break
1945 done
1946 IFS="$ac_save_ifs"
1949 RANLIB="$ac_cv_prog_RANLIB"
1950 if test -n "$RANLIB"; then
1951 echo "$ac_t""$RANLIB" 1>&6
1952 else
1953 echo "$ac_t""no" 1>&6
1956 test -n "$RANLIB" && break
1957 done
1958 test -n "$RANLIB" || RANLIB="echo"
1960 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1962 # Extract the first word of "$ac_prog", so it can be a program name with args.
1963 set dummy $ac_prog; ac_word=$2
1964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1965 echo "configure:1966: checking for $ac_word" >&5
1966 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1967 echo $ac_n "(cached) $ac_c" 1>&6
1968 else
1969 if test -n "$AR"; then
1970 ac_cv_prog_AR="$AR" # Let the user override the test.
1971 else
1972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1973 ac_dummy="$PATH"
1974 for ac_dir in $ac_dummy; do
1975 test -z "$ac_dir" && ac_dir=.
1976 if test -f $ac_dir/$ac_word; then
1977 ac_cv_prog_AR="$ac_prog"
1978 break
1980 done
1981 IFS="$ac_save_ifs"
1984 AR="$ac_cv_prog_AR"
1985 if test -n "$AR"; then
1986 echo "$ac_t""$AR" 1>&6
1987 else
1988 echo "$ac_t""no" 1>&6
1991 test -n "$AR" && break
1992 done
1993 test -n "$AR" || AR="echo"
1995 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1997 # Extract the first word of "$ac_prog", so it can be a program name with args.
1998 set dummy $ac_prog; ac_word=$2
1999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2000 echo "configure:2001: checking for $ac_word" >&5
2001 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2003 else
2004 if test -n "$AS"; then
2005 ac_cv_prog_AS="$AS" # Let the user override the test.
2006 else
2007 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2008 ac_dummy="$PATH"
2009 for ac_dir in $ac_dummy; do
2010 test -z "$ac_dir" && ac_dir=.
2011 if test -f $ac_dir/$ac_word; then
2012 ac_cv_prog_AS="$ac_prog"
2013 break
2015 done
2016 IFS="$ac_save_ifs"
2019 AS="$ac_cv_prog_AS"
2020 if test -n "$AS"; then
2021 echo "$ac_t""$AS" 1>&6
2022 else
2023 echo "$ac_t""no" 1>&6
2026 test -n "$AS" && break
2027 done
2028 test -n "$AS" || AS="echo"
2030 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
2032 # Extract the first word of "$ac_prog", so it can be a program name with args.
2033 set dummy $ac_prog; ac_word=$2
2034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2035 echo "configure:2036: checking for $ac_word" >&5
2036 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
2037 echo $ac_n "(cached) $ac_c" 1>&6
2038 else
2039 if test -n "$LD"; then
2040 ac_cv_prog_LD="$LD" # Let the user override the test.
2041 else
2042 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2043 ac_dummy="$PATH"
2044 for ac_dir in $ac_dummy; do
2045 test -z "$ac_dir" && ac_dir=.
2046 if test -f $ac_dir/$ac_word; then
2047 ac_cv_prog_LD="$ac_prog"
2048 break
2050 done
2051 IFS="$ac_save_ifs"
2054 LD="$ac_cv_prog_LD"
2055 if test -n "$LD"; then
2056 echo "$ac_t""$LD" 1>&6
2057 else
2058 echo "$ac_t""no" 1>&6
2061 test -n "$LD" && break
2062 done
2063 test -n "$LD" || LD="echo"
2065 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
2067 # Extract the first word of "$ac_prog", so it can be a program name with args.
2068 set dummy $ac_prog; ac_word=$2
2069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2070 echo "configure:2071: checking for $ac_word" >&5
2071 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2072 echo $ac_n "(cached) $ac_c" 1>&6
2073 else
2074 if test -n "$STRIP"; then
2075 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2076 else
2077 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2078 ac_dummy="$PATH"
2079 for ac_dir in $ac_dummy; do
2080 test -z "$ac_dir" && ac_dir=.
2081 if test -f $ac_dir/$ac_word; then
2082 ac_cv_prog_STRIP="$ac_prog"
2083 break
2085 done
2086 IFS="$ac_save_ifs"
2089 STRIP="$ac_cv_prog_STRIP"
2090 if test -n "$STRIP"; then
2091 echo "$ac_t""$STRIP" 1>&6
2092 else
2093 echo "$ac_t""no" 1>&6
2096 test -n "$STRIP" && break
2097 done
2098 test -n "$STRIP" || STRIP="echo"
2100 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
2102 # Extract the first word of "$ac_prog", so it can be a program name with args.
2103 set dummy $ac_prog; ac_word=$2
2104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2105 echo "configure:2106: checking for $ac_word" >&5
2106 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2107 echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109 if test -n "$WINDRES"; then
2110 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2111 else
2112 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2113 ac_dummy="$PATH"
2114 for ac_dir in $ac_dummy; do
2115 test -z "$ac_dir" && ac_dir=.
2116 if test -f $ac_dir/$ac_word; then
2117 ac_cv_prog_WINDRES="$ac_prog"
2118 break
2120 done
2121 IFS="$ac_save_ifs"
2124 WINDRES="$ac_cv_prog_WINDRES"
2125 if test -n "$WINDRES"; then
2126 echo "$ac_t""$WINDRES" 1>&6
2127 else
2128 echo "$ac_t""no" 1>&6
2131 test -n "$WINDRES" && break
2132 done
2133 test -n "$WINDRES" || WINDRES="echo"
2136 else
2137 # Extract the first word of "gcc", so it can be a program name with args.
2138 set dummy gcc; ac_word=$2
2139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2140 echo "configure:2141: checking for $ac_word" >&5
2141 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2142 echo $ac_n "(cached) $ac_c" 1>&6
2143 else
2144 if test -n "$CC"; then
2145 ac_cv_prog_CC="$CC" # Let the user override the test.
2146 else
2147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2148 ac_dummy="$PATH"
2149 for ac_dir in $ac_dummy; do
2150 test -z "$ac_dir" && ac_dir=.
2151 if test -f $ac_dir/$ac_word; then
2152 ac_cv_prog_CC="gcc"
2153 break
2155 done
2156 IFS="$ac_save_ifs"
2159 CC="$ac_cv_prog_CC"
2160 if test -n "$CC"; then
2161 echo "$ac_t""$CC" 1>&6
2162 else
2163 echo "$ac_t""no" 1>&6
2166 if test -z "$CC"; then
2167 # Extract the first word of "cc", so it can be a program name with args.
2168 set dummy cc; ac_word=$2
2169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2170 echo "configure:2171: checking for $ac_word" >&5
2171 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2172 echo $ac_n "(cached) $ac_c" 1>&6
2173 else
2174 if test -n "$CC"; then
2175 ac_cv_prog_CC="$CC" # Let the user override the test.
2176 else
2177 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2178 ac_prog_rejected=no
2179 ac_dummy="$PATH"
2180 for ac_dir in $ac_dummy; do
2181 test -z "$ac_dir" && ac_dir=.
2182 if test -f $ac_dir/$ac_word; then
2183 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2184 ac_prog_rejected=yes
2185 continue
2187 ac_cv_prog_CC="cc"
2188 break
2190 done
2191 IFS="$ac_save_ifs"
2192 if test $ac_prog_rejected = yes; then
2193 # We found a bogon in the path, so make sure we never use it.
2194 set dummy $ac_cv_prog_CC
2195 shift
2196 if test $# -gt 0; then
2197 # We chose a different compiler from the bogus one.
2198 # However, it has the same basename, so the bogon will be chosen
2199 # first if we set CC to just the basename; use the full file name.
2200 shift
2201 set dummy "$ac_dir/$ac_word" "$@"
2202 shift
2203 ac_cv_prog_CC="$@"
2208 CC="$ac_cv_prog_CC"
2209 if test -n "$CC"; then
2210 echo "$ac_t""$CC" 1>&6
2211 else
2212 echo "$ac_t""no" 1>&6
2215 if test -z "$CC"; then
2216 case "`uname -s`" in
2217 *win32* | *WIN32*)
2218 # Extract the first word of "cl", so it can be a program name with args.
2219 set dummy cl; ac_word=$2
2220 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2221 echo "configure:2222: checking for $ac_word" >&5
2222 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2223 echo $ac_n "(cached) $ac_c" 1>&6
2224 else
2225 if test -n "$CC"; then
2226 ac_cv_prog_CC="$CC" # Let the user override the test.
2227 else
2228 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2229 ac_dummy="$PATH"
2230 for ac_dir in $ac_dummy; do
2231 test -z "$ac_dir" && ac_dir=.
2232 if test -f $ac_dir/$ac_word; then
2233 ac_cv_prog_CC="cl"
2234 break
2236 done
2237 IFS="$ac_save_ifs"
2240 CC="$ac_cv_prog_CC"
2241 if test -n "$CC"; then
2242 echo "$ac_t""$CC" 1>&6
2243 else
2244 echo "$ac_t""no" 1>&6
2247 esac
2249 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2252 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2253 echo "configure:2254: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2255 ac_ext=c
2256 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2259 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2260 cross_compiling=$ac_cv_prog_cc_cross
2262 cat > conftest.$ac_ext << EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2267 main(){return(0);}
2269 if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2270 ac_cv_prog_cc_works=yes
2271 # If we can't run a trivial program, we are probably using a cross compiler.
2272 if (./conftest; exit) 2>/dev/null; then
2273 ac_cv_prog_cc_cross=no
2274 else
2275 ac_cv_prog_cc_cross=yes
2277 else
2278 echo "configure: failed program was:" >&5
2279 cat conftest.$ac_ext >&5
2280 ac_cv_prog_cc_works=no
2282 rm -fr conftest*
2283 ac_ext=c
2284 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2285 ac_cpp='$CPP $CPPFLAGS'
2286 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2287 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2288 cross_compiling=$ac_cv_prog_cc_cross
2290 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2291 if test $ac_cv_prog_cc_works = no; then
2292 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2294 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2295 echo "configure:2296: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2296 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2297 cross_compiling=$ac_cv_prog_cc_cross
2299 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2300 echo "configure:2301: checking whether we are using GNU C" >&5
2301 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2302 echo $ac_n "(cached) $ac_c" 1>&6
2303 else
2304 cat > conftest.c <<EOF
2305 #ifdef __GNUC__
2306 yes;
2307 #endif
2309 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2310 ac_cv_prog_gcc=yes
2311 else
2312 ac_cv_prog_gcc=no
2316 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2318 if test $ac_cv_prog_gcc = yes; then
2319 GCC=yes
2320 else
2321 GCC=
2324 ac_test_CFLAGS="${CFLAGS+set}"
2325 ac_save_CFLAGS="$CFLAGS"
2326 CFLAGS=
2327 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2328 echo "configure:2329: checking whether ${CC-cc} accepts -g" >&5
2329 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2330 echo $ac_n "(cached) $ac_c" 1>&6
2331 else
2332 echo 'void f(){}' > conftest.c
2333 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2334 ac_cv_prog_cc_g=yes
2335 else
2336 ac_cv_prog_cc_g=no
2338 rm -f conftest*
2342 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2343 if test "$ac_test_CFLAGS" = set; then
2344 CFLAGS="$ac_save_CFLAGS"
2345 elif test $ac_cv_prog_cc_g = yes; then
2346 if test "$GCC" = yes; then
2347 CFLAGS="-g -O2"
2348 else
2349 CFLAGS="-g"
2351 else
2352 if test "$GCC" = yes; then
2353 CFLAGS="-O2"
2354 else
2355 CFLAGS=
2359 if test -n "$USE_CPLUS"; then
2360 if test "$CC" = "cl" -a -z "$CXX"; then
2361 CXX=$CC
2362 else
2363 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2365 # Extract the first word of "$ac_prog", so it can be a program name with args.
2366 set dummy $ac_prog; ac_word=$2
2367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2368 echo "configure:2369: checking for $ac_word" >&5
2369 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2370 echo $ac_n "(cached) $ac_c" 1>&6
2371 else
2372 if test -n "$CXX"; then
2373 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2374 else
2375 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2376 ac_dummy="$PATH"
2377 for ac_dir in $ac_dummy; do
2378 test -z "$ac_dir" && ac_dir=.
2379 if test -f $ac_dir/$ac_word; then
2380 ac_cv_prog_CXX="$ac_prog"
2381 break
2383 done
2384 IFS="$ac_save_ifs"
2387 CXX="$ac_cv_prog_CXX"
2388 if test -n "$CXX"; then
2389 echo "$ac_t""$CXX" 1>&6
2390 else
2391 echo "$ac_t""no" 1>&6
2394 test -n "$CXX" && break
2395 done
2396 test -n "$CXX" || CXX="gcc"
2399 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2400 echo "configure:2401: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2402 ac_ext=C
2403 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2404 ac_cpp='$CXXCPP $CPPFLAGS'
2405 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2406 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2407 cross_compiling=$ac_cv_prog_cxx_cross
2409 cat > conftest.$ac_ext << EOF
2411 #line 2412 "configure"
2412 #include "confdefs.h"
2414 int main(){return(0);}
2416 if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2417 ac_cv_prog_cxx_works=yes
2418 # If we can't run a trivial program, we are probably using a cross compiler.
2419 if (./conftest; exit) 2>/dev/null; then
2420 ac_cv_prog_cxx_cross=no
2421 else
2422 ac_cv_prog_cxx_cross=yes
2424 else
2425 echo "configure: failed program was:" >&5
2426 cat conftest.$ac_ext >&5
2427 ac_cv_prog_cxx_works=no
2429 rm -fr conftest*
2430 ac_ext=c
2431 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2432 ac_cpp='$CPP $CPPFLAGS'
2433 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2434 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2435 cross_compiling=$ac_cv_prog_cc_cross
2437 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2438 if test $ac_cv_prog_cxx_works = no; then
2439 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2441 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2442 echo "configure:2443: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2443 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2444 cross_compiling=$ac_cv_prog_cxx_cross
2446 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2447 echo "configure:2448: checking whether we are using GNU C++" >&5
2448 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2449 echo $ac_n "(cached) $ac_c" 1>&6
2450 else
2451 cat > conftest.C <<EOF
2452 #ifdef __GNUC__
2453 yes;
2454 #endif
2456 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2457 ac_cv_prog_gxx=yes
2458 else
2459 ac_cv_prog_gxx=no
2463 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2465 if test $ac_cv_prog_gxx = yes; then
2466 GXX=yes
2467 else
2468 GXX=
2471 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2472 ac_save_CXXFLAGS="$CXXFLAGS"
2473 CXXFLAGS=
2474 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2475 echo "configure:2476: checking whether ${CXX-g++} accepts -g" >&5
2476 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2477 echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479 echo 'void f(){}' > conftest.cc
2480 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2481 ac_cv_prog_cxx_g=yes
2482 else
2483 ac_cv_prog_cxx_g=no
2485 rm -f conftest*
2489 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2490 if test "$ac_test_CXXFLAGS" = set; then
2491 CXXFLAGS="$ac_save_CXXFLAGS"
2492 elif test $ac_cv_prog_cxx_g = yes; then
2493 if test "$GXX" = yes; then
2494 CXXFLAGS="-g -O2"
2495 else
2496 CXXFLAGS="-g"
2498 else
2499 if test "$GXX" = yes; then
2500 CXXFLAGS="-O2"
2501 else
2502 CXXFLAGS=
2508 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2509 echo "configure:2510: checking how to run the C preprocessor" >&5
2510 # On Suns, sometimes $CPP names a directory.
2511 if test -n "$CPP" && test -d "$CPP"; then
2512 CPP=
2514 if test -z "$CPP"; then
2515 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2516 echo $ac_n "(cached) $ac_c" 1>&6
2517 else
2518 # This must be in double quotes, not single quotes, because CPP may get
2519 # substituted into the Makefile and "${CC-cc}" will confuse make.
2520 CPP="${CC-cc} -E"
2521 # On the NeXT, cc -E runs the code through the compiler's parser,
2522 # not just through cpp.
2523 cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <assert.h>
2527 Syntax Error
2529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2530 { (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2532 if test -z "$ac_err"; then
2534 else
2535 echo "$ac_err" >&5
2536 echo "configure: failed program was:" >&5
2537 cat conftest.$ac_ext >&5
2538 rm -rf conftest*
2539 CPP="${CC-cc} -E -traditional-cpp"
2540 cat > conftest.$ac_ext <<EOF
2541 #line 2542 "configure"
2542 #include "confdefs.h"
2543 #include <assert.h>
2544 Syntax Error
2546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2547 { (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2549 if test -z "$ac_err"; then
2551 else
2552 echo "$ac_err" >&5
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 rm -rf conftest*
2556 CPP="${CC-cc} -nologo -E"
2557 cat > conftest.$ac_ext <<EOF
2558 #line 2559 "configure"
2559 #include "confdefs.h"
2560 #include <assert.h>
2561 Syntax Error
2563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2564 { (eval echo configure:2565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2566 if test -z "$ac_err"; then
2568 else
2569 echo "$ac_err" >&5
2570 echo "configure: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 rm -rf conftest*
2573 CPP=/lib/cpp
2575 rm -f conftest*
2577 rm -f conftest*
2579 rm -f conftest*
2580 ac_cv_prog_CPP="$CPP"
2582 CPP="$ac_cv_prog_CPP"
2583 else
2584 ac_cv_prog_CPP="$CPP"
2586 echo "$ac_t""$CPP" 1>&6
2588 # Extract the first word of "ranlib", so it can be a program name with args.
2589 set dummy ranlib; ac_word=$2
2590 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2591 echo "configure:2592: checking for $ac_word" >&5
2592 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595 if test -n "$RANLIB"; then
2596 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2597 else
2598 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2599 ac_dummy="$PATH"
2600 for ac_dir in $ac_dummy; do
2601 test -z "$ac_dir" && ac_dir=.
2602 if test -f $ac_dir/$ac_word; then
2603 ac_cv_prog_RANLIB="ranlib"
2604 break
2606 done
2607 IFS="$ac_save_ifs"
2608 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2611 RANLIB="$ac_cv_prog_RANLIB"
2612 if test -n "$RANLIB"; then
2613 echo "$ac_t""$RANLIB" 1>&6
2614 else
2615 echo "$ac_t""no" 1>&6
2618 for ac_prog in as
2620 # Extract the first word of "$ac_prog", so it can be a program name with args.
2621 set dummy $ac_prog; ac_word=$2
2622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2623 echo "configure:2624: checking for $ac_word" >&5
2624 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2625 echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627 case "$AS" in
2629 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2631 ?:/*)
2632 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2636 ac_dummy="$PATH"
2637 for ac_dir in $ac_dummy; do
2638 test -z "$ac_dir" && ac_dir=.
2639 if test -f $ac_dir/$ac_word; then
2640 ac_cv_path_AS="$ac_dir/$ac_word"
2641 break
2643 done
2644 IFS="$ac_save_ifs"
2646 esac
2648 AS="$ac_cv_path_AS"
2649 if test -n "$AS"; then
2650 echo "$ac_t""$AS" 1>&6
2651 else
2652 echo "$ac_t""no" 1>&6
2655 test -n "$AS" && break
2656 done
2657 test -n "$AS" || AS="$CC"
2659 for ac_prog in ar
2661 # Extract the first word of "$ac_prog", so it can be a program name with args.
2662 set dummy $ac_prog; ac_word=$2
2663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2664 echo "configure:2665: checking for $ac_word" >&5
2665 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2666 echo $ac_n "(cached) $ac_c" 1>&6
2667 else
2668 case "$AR" in
2670 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2672 ?:/*)
2673 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2677 ac_dummy="$PATH"
2678 for ac_dir in $ac_dummy; do
2679 test -z "$ac_dir" && ac_dir=.
2680 if test -f $ac_dir/$ac_word; then
2681 ac_cv_path_AR="$ac_dir/$ac_word"
2682 break
2684 done
2685 IFS="$ac_save_ifs"
2687 esac
2689 AR="$ac_cv_path_AR"
2690 if test -n "$AR"; then
2691 echo "$ac_t""$AR" 1>&6
2692 else
2693 echo "$ac_t""no" 1>&6
2696 test -n "$AR" && break
2697 done
2698 test -n "$AR" || AR="echo not_ar"
2700 for ac_prog in ld link
2702 # Extract the first word of "$ac_prog", so it can be a program name with args.
2703 set dummy $ac_prog; ac_word=$2
2704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2705 echo "configure:2706: checking for $ac_word" >&5
2706 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2707 echo $ac_n "(cached) $ac_c" 1>&6
2708 else
2709 case "$LD" in
2711 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2713 ?:/*)
2714 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2717 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2718 ac_dummy="$PATH"
2719 for ac_dir in $ac_dummy; do
2720 test -z "$ac_dir" && ac_dir=.
2721 if test -f $ac_dir/$ac_word; then
2722 ac_cv_path_LD="$ac_dir/$ac_word"
2723 break
2725 done
2726 IFS="$ac_save_ifs"
2728 esac
2730 LD="$ac_cv_path_LD"
2731 if test -n "$LD"; then
2732 echo "$ac_t""$LD" 1>&6
2733 else
2734 echo "$ac_t""no" 1>&6
2737 test -n "$LD" && break
2738 done
2739 test -n "$LD" || LD="echo not_ld"
2741 for ac_prog in strip
2743 # Extract the first word of "$ac_prog", so it can be a program name with args.
2744 set dummy $ac_prog; ac_word=$2
2745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2746 echo "configure:2747: checking for $ac_word" >&5
2747 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750 case "$STRIP" in
2752 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2754 ?:/*)
2755 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2758 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2759 ac_dummy="$PATH"
2760 for ac_dir in $ac_dummy; do
2761 test -z "$ac_dir" && ac_dir=.
2762 if test -f $ac_dir/$ac_word; then
2763 ac_cv_path_STRIP="$ac_dir/$ac_word"
2764 break
2766 done
2767 IFS="$ac_save_ifs"
2769 esac
2771 STRIP="$ac_cv_path_STRIP"
2772 if test -n "$STRIP"; then
2773 echo "$ac_t""$STRIP" 1>&6
2774 else
2775 echo "$ac_t""no" 1>&6
2778 test -n "$STRIP" && break
2779 done
2780 test -n "$STRIP" || STRIP="echo not_strip"
2782 for ac_prog in windres
2784 # Extract the first word of "$ac_prog", so it can be a program name with args.
2785 set dummy $ac_prog; ac_word=$2
2786 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2787 echo "configure:2788: checking for $ac_word" >&5
2788 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2789 echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791 case "$WINDRES" in
2793 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2795 ?:/*)
2796 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2799 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2800 ac_dummy="$PATH"
2801 for ac_dir in $ac_dummy; do
2802 test -z "$ac_dir" && ac_dir=.
2803 if test -f $ac_dir/$ac_word; then
2804 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2805 break
2807 done
2808 IFS="$ac_save_ifs"
2810 esac
2812 WINDRES="$ac_cv_path_WINDRES"
2813 if test -n "$WINDRES"; then
2814 echo "$ac_t""$WINDRES" 1>&6
2815 else
2816 echo "$ac_t""no" 1>&6
2819 test -n "$WINDRES" && break
2820 done
2821 test -n "$WINDRES" || WINDRES="echo not_windres"
2823 if test -z "$HOST_CC"; then
2824 HOST_CC="$CC"
2826 if test -z "$HOST_CFLAGS"; then
2827 HOST_CFLAGS="$CFLAGS"
2831 if test "$GCC" = "yes"; then
2832 GNU_CC=1
2834 if test "$GXX" = "yes"; then
2835 GNU_CXX=1
2837 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2838 GNU_AS=1
2840 rm -f a.out
2842 case "$build:$target" in
2843 i?86-apple-darwin*:powerpc-apple-darwin*)
2844 cross_compiling=yes
2846 esac
2848 if test "$cross_compiling" = "yes"; then
2849 CROSS_COMPILE=1
2850 else
2851 CROSS_COMPILE=
2854 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2855 echo "configure:2856: checking for gcc -pipe support" >&5
2856 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2857 echo '#include <stdio.h>' > dummy-hello.c
2858 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2859 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2860 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2861 if test $? = 0; then
2862 _res_as_stdin="yes"
2863 else
2864 _res_as_stdin="no"
2866 if test "$_res_as_stdin" = "yes"; then
2867 _SAVE_CFLAGS=$CFLAGS
2868 CFLAGS="$CFLAGS -pipe"
2869 cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <stdio.h>
2873 int main() {
2874 printf("Hello World\n");
2875 ; return 0; }
2877 if { (eval echo configure:2878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2878 rm -rf conftest*
2879 _res_gcc_pipe="yes"
2880 else
2881 echo "configure: failed program was:" >&5
2882 cat conftest.$ac_ext >&5
2883 rm -rf conftest*
2884 _res_gcc_pipe="no"
2886 rm -f conftest*
2887 CFLAGS=$_SAVE_CFLAGS
2889 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2890 _res="yes";
2891 CFLAGS="$CFLAGS -pipe"
2892 CXXFLAGS="$CXXFLAGS -pipe"
2893 else
2894 _res="no"
2896 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2897 echo "$ac_t""$_res" 1>&6
2898 else
2899 echo "$ac_t""no" 1>&6
2903 _SAVE_CFLAGS="$CFLAGS"
2904 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2906 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2907 echo "configure:2908: checking whether C compiler supports -fprofile-generate" >&5
2908 cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2912 int main() {
2913 return 0;
2914 ; return 0; }
2916 if { (eval echo configure:2917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2917 rm -rf conftest*
2918 PROFILE_GEN_CFLAGS="-fprofile-generate"
2919 result="yes"
2920 else
2921 echo "configure: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2923 rm -rf conftest*
2924 result="no"
2926 rm -f conftest*
2927 echo "$ac_t""$result" 1>&6
2929 if test $result = "yes"; then
2930 PROFILE_GEN_LDFLAGS="-fprofile-generate"
2931 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
2932 PROFILE_USE_LDFLAGS="-fprofile-use"
2935 CFLAGS="$_SAVE_CFLAGS"
2937 if test "$GNU_CC"; then
2938 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2939 echo "configure:2940: checking for visibility(hidden) attribute" >&5
2940 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2941 echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943 cat > conftest.c <<EOF
2944 int foo __attribute__ ((visibility ("hidden"))) = 1;
2946 ac_cv_visibility_hidden=no
2947 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2948 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2949 ac_cv_visibility_hidden=yes
2952 rm -f conftest.cs
2956 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2957 if test "$ac_cv_visibility_hidden" = "yes"; then
2958 cat >> confdefs.h <<\EOF
2959 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2962 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2963 echo "configure:2964: checking for visibility pragma support" >&5
2964 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2965 echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967 cat > conftest.c <<EOF
2968 #pragma GCC visibility push(hidden)
2969 int foo_hidden = 1;
2970 #pragma GCC visibility push(default)
2971 int foo_default = 1;
2973 ac_cv_visibility_pragma=no
2974 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2975 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2976 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2977 ac_cv_visibility_pragma=yes
2981 rm -f conftest.cs
2985 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2986 if test "$ac_cv_visibility_pragma" = "yes"; then
2987 cat >> confdefs.h <<\EOF
2988 #define HAVE_VISIBILITY_PRAGMA 1
2991 # To work around a build problem on Linux x86-64 (Bugzilla bug
2992 # 293438), we use the -fvisibility=hidden flag. This flag is less
2993 # optimal than #pragma GCC visibility push(hidden) because the flag
2994 # assumes that symbols defined outside the current source file have
2995 # the default visibility. This has the advantage that we don't need
2996 # to wrap system header files, but has the disadvantage that calls
2997 # to hidden symbols defined in other source files cannot be
2998 # optimized by the compiler. The -fvisibility=hidden flag does
2999 # hide and export symbols correctly.
3000 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
3001 #WRAP_SYSTEM_INCLUDES=1
3002 VISIBILITY_FLAGS="-fvisibility=hidden"
3003 WRAP_SYSTEM_INCLUDES=
3006 fi # GNU_CC
3008 fi # SKIP_COMPILER_CHECKS
3010 if test -z "$SKIP_PATH_CHECKS"; then
3011 for ac_prog in perl5 perl
3013 # Extract the first word of "$ac_prog", so it can be a program name with args.
3014 set dummy $ac_prog; ac_word=$2
3015 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3016 echo "configure:3017: checking for $ac_word" >&5
3017 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3018 echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020 case "$PERL" in
3022 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3024 ?:/*)
3025 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
3028 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3029 ac_dummy="$PATH"
3030 for ac_dir in $ac_dummy; do
3031 test -z "$ac_dir" && ac_dir=.
3032 if test -f $ac_dir/$ac_word; then
3033 ac_cv_path_PERL="$ac_dir/$ac_word"
3034 break
3036 done
3037 IFS="$ac_save_ifs"
3039 esac
3041 PERL="$ac_cv_path_PERL"
3042 if test -n "$PERL"; then
3043 echo "$ac_t""$PERL" 1>&6
3044 else
3045 echo "$ac_t""no" 1>&6
3048 test -n "$PERL" && break
3049 done
3050 test -n "$PERL" || PERL="echo not_perl"
3052 elif test -z "$PERL"; then
3053 PERL=perl
3056 OBJ_SUFFIX=o
3057 LIB_SUFFIX=a
3058 DLL_SUFFIX=so
3059 ASM_SUFFIX=s
3060 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
3061 PR_MD_ASFILES=
3062 PR_MD_CSRCS=
3063 PR_MD_ARCH_DIR=unix
3064 AR_FLAGS='cr $@'
3065 AS='$(CC)'
3066 ASFLAGS='$(CFLAGS)'
3068 if test -n "$CROSS_COMPILE"; then
3069 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
3070 OS_RELEASE=
3071 OS_TEST="${target_cpu}"
3072 case "${target_os}" in
3073 linux*) OS_ARCH=Linux ;;
3074 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
3075 mingw*) OS_ARCH=WINNT ;;
3076 wince*) OS_ARCH=WINCE ;;
3077 winmo*) OS_ARCH=WINCE ;;
3078 darwin*) OS_ARCH=Darwin ;;
3079 riscos*) OS_ARCH=RISCOS ;;
3080 esac
3081 else
3082 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
3083 OS_RELEASE=`uname -r`
3084 OS_TEST=`uname -m`
3087 if test "$OS_ARCH" = "IRIX64"; then
3088 OS_ARCH=IRIX
3091 if test "$OS_ARCH" = "AIX"; then
3092 OS_RELEASE=`uname -v`.`uname -r`
3095 if test "$OS_ARCH" = "FreeBSD"; then
3096 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3099 if test "$OS_ARCH" = "Linux"; then
3100 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3101 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
3104 #######################################################################
3105 # Master "Core Components" macros for getting the OS target #
3106 #######################################################################
3109 # Note: OS_TARGET should be specified on the command line for gmake.
3110 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
3111 # The difference between the Win95 target and the WinNT target is that
3112 # the WinNT target uses Windows NT specific features not available
3113 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
3114 # at lesser performance (the Win95 target uses threads; the WinNT target
3115 # uses fibers).
3117 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
3118 # cross-compilation.
3122 # The following hack allows one to build on a WIN95 machine (as if
3123 # s/he were cross-compiling on a WINNT host for a WIN95 target).
3124 # It also accomodates for MKS's uname.exe. If you never intend
3125 # to do development on a WIN95 machine, you don't need this hack.
3127 case "$OS_ARCH" in
3128 WIN95)
3129 OS_ARCH=WINNT
3130 OS_TARGET=WIN95
3132 Windows_95)
3133 OS_ARCH=Windows_NT
3134 OS_TARGET=WIN95
3136 Windows_98)
3137 OS_ARCH=Windows_NT
3138 OS_TARGET=WIN95
3140 CYGWIN_9*|CYGWIN_ME*)
3141 OS_ARCH='CYGWIN_NT-4.0'
3142 OS_TARGET=WIN95
3144 OS_2)
3145 OS_ARCH=OS2
3146 OS_TARGET=OS2
3148 esac
3151 # On WIN32, we also define the variable CPU_ARCH.
3154 case "$OS_ARCH" in
3155 WINNT)
3156 CPU_ARCH=`uname -p`
3157 if test "$CPU_ARCH" = "I386"; then
3158 CPU_ARCH=x86
3161 Windows_NT)
3163 # If uname -s returns "Windows_NT", we assume that we are using
3164 # the uname.exe in MKS toolkit.
3166 # The -r option of MKS uname only returns the major version number.
3167 # So we need to use its -v option to get the minor version number.
3168 # Moreover, it doesn't have the -p option, so we need to use uname -m.
3170 OS_ARCH=WINNT
3171 OS_MINOR_RELEASE=`uname -v`
3172 if test "$OS_MINOR_RELEASE" = "00"; then
3173 OS_MINOR_RELEASE=0
3175 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
3176 CPU_ARCH=`uname -m`
3178 # MKS's uname -m returns "586" on a Pentium machine.
3180 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3181 CPU_ARCH=x86
3184 CYGWIN_NT*|MINGW*_NT*)
3186 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
3187 # the uname.exe in the Cygwin tools.
3188 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
3189 # the uname.exe in the MSYS tools.
3191 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
3192 OS_ARCH=WINNT
3193 CPU_ARCH=`uname -m`
3195 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
3197 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3198 CPU_ARCH=x86
3201 esac
3203 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
3204 OS_TARGET=WIN95
3205 if test -n "$MOZ_DEBUG"; then
3206 USE_DEBUG_RTL=1
3209 if test -z "$OS_TARGET"; then
3210 OS_TARGET=$OS_ARCH
3212 if test "$OS_TARGET" = "WIN95"; then
3213 OS_RELEASE="4.0"
3215 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
3217 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
3218 if test "${enable_os2_high_mem+set}" = set; then
3219 enableval="$enable_os2_high_mem"
3220 if test "$enableval" = "no"; then
3221 MOZ_OS2_HIGH_MEMORY=
3222 else
3223 MOZ_OS2_HIGH_MEMORY=1
3229 case "$target" in
3230 arm*-android*|arm*-linuxandroid*)
3231 MOZ_THUMB=yes
3232 MOZ_ARCH=armv7-a
3233 MOZ_FPU=vfp
3234 MOZ_FLOAT_ABI=softfp
3235 MOZ_SOFT_FLOAT=yes
3237 arm*-*)
3238 if test -n "$MOZ_PLATFORM_MAEMO"; then
3239 MOZ_THUMB=no
3240 MOZ_ARCH=armv7-a
3241 MOZ_FLOAT_ABI=softfp
3243 if test "$MOZ_PLATFORM_MAEMO" = 6; then
3244 MOZ_THUMB=yes
3247 esac
3249 # Check whether --enable-thumb2 or --disable-thumb2 was given.
3250 if test "${enable_thumb2+set}" = set; then
3251 enableval="$enable_thumb2"
3252 MOZ_THUMB=$enableval
3256 # Check whether --with-thumb or --without-thumb was given.
3257 if test "${with_thumb+set}" = set; then
3258 withval="$with_thumb"
3259 if test -z "$GNU_CC"; then
3260 { echo "configure: error: --with-thumb is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3262 MOZ_THUMB=$withval
3266 # Check whether --with-thumb-interwork or --without-thumb-interwork was given.
3267 if test "${with_thumb_interwork+set}" = set; then
3268 withval="$with_thumb_interwork"
3269 if test -z "$GNU_CC"; then
3270 { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3272 MOZ_THUMB_INTERWORK=$withval
3276 # Check whether --with-arch or --without-arch was given.
3277 if test "${with_arch+set}" = set; then
3278 withval="$with_arch"
3279 if test -z "$GNU_CC"; then
3280 { echo "configure: error: --with-arch is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3282 MOZ_ARCH=$withval
3286 # Check whether --with-fpu or --without-fpu was given.
3287 if test "${with_fpu+set}" = set; then
3288 withval="$with_fpu"
3289 if test -z "$GNU_CC"; then
3290 { echo "configure: error: --with-fpu is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3292 MOZ_FPU=$withval
3296 # Check whether --with-float-abi or --without-float-abi was given.
3297 if test "${with_float_abi+set}" = set; then
3298 withval="$with_float_abi"
3299 if test -z "$GNU_CC"; then
3300 { echo "configure: error: --with-float-abi is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3302 MOZ_FLOAT_ABI=$withval
3306 # Check whether --with-soft-float or --without-soft-float was given.
3307 if test "${with_soft_float+set}" = set; then
3308 withval="$with_soft_float"
3309 if test -z "$GNU_CC"; then
3310 { echo "configure: error: --with-soft-float is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3312 MOZ_SOFT_FLOAT=$withval
3316 case "$MOZ_ARCH" in
3317 toolchain-default|"")
3318 arch_flag=""
3321 arch_flag="-march=$MOZ_ARCH"
3323 esac
3325 case "$MOZ_THUMB" in
3326 yes)
3327 MOZ_THUMB2=1
3328 thumb_flag="-mthumb"
3331 MOZ_THUMB2=
3332 thumb_flag="-marm"
3335 _SAVE_CFLAGS="$CFLAGS"
3336 CFLAGS="$arch_flag"
3337 cat > conftest.$ac_ext <<EOF
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3341 int main() {
3342 return sizeof(__thumb2__);
3343 ; return 0; }
3345 if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3346 rm -rf conftest*
3347 MOZ_THUMB2=1
3348 else
3349 echo "configure: failed program was:" >&5
3350 cat conftest.$ac_ext >&5
3351 rm -rf conftest*
3352 MOZ_THUMB2=
3354 rm -f conftest*
3355 CFLAGS="$_SAVE_CFLAGS"
3356 thumb_flag=""
3358 esac
3360 case "$MOZ_THUMB_INTERWORK" in
3361 yes)
3362 thumb_interwork_flag="-mthumb-interwork"
3365 thumb_interwork_flag="-mno-thumb-interwork"
3367 *) # toolchain-default
3368 thumb_interwork_flag=""
3370 esac
3372 case "$MOZ_FPU" in
3373 toolchain-default|"")
3374 fpu_flag=""
3377 fpu_flag="-mfpu=$MOZ_FPU"
3379 esac
3381 case "$MOZ_FLOAT_ABI" in
3382 toolchain-default|"")
3383 float_abi_flag=""
3386 float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
3388 esac
3390 case "$MOZ_SOFT_FLOAT" in
3391 yes)
3392 soft_float_flag="-msoft-float"
3395 soft_float_flag="-mno-soft-float"
3397 *) # toolchain-default
3398 soft_float_flag=""
3400 esac
3402 all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
3403 if test -n "$all_flags"; then
3404 _SAVE_CFLAGS="$CFLAGS"
3405 CFLAGS="$all_flags"
3406 echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
3407 echo "configure:3408: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
3408 cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3412 int main() {
3413 return 0;
3414 ; return 0; }
3416 if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3417 rm -rf conftest*
3418 echo "$ac_t""yes" 1>&6
3419 else
3420 echo "configure: failed program was:" >&5
3421 cat conftest.$ac_ext >&5
3422 rm -rf conftest*
3423 { echo "configure: error: no" 1>&2; exit 1; }
3425 rm -f conftest*
3427 CFLAGS="$_SAVE_CFLAGS $all_flags"
3428 CXXFLAGS="$CXXFLAGS $all_flags"
3429 ASFLAGS="$ASFLAGS $all_flags"
3430 if test -n "$thumb_flag"; then
3431 LDFLAGS="$LDFLAGS $thumb_flag"
3435 case "$host" in
3436 *-mingw*)
3437 NSINSTALL=nsinstall
3439 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
3440 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
3441 if test `echo "${PATH}" | grep -c \;` = 0; then
3442 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
3445 *-beos*)
3446 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
3448 *os2*)
3451 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
3453 esac
3455 case "$target" in
3457 *-aix*)
3458 cat >> confdefs.h <<\EOF
3459 #define XP_UNIX 1
3462 cat >> confdefs.h <<\EOF
3463 #define AIX 1
3466 cat >> confdefs.h <<\EOF
3467 #define SYSV 1
3470 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3471 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3472 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3473 echo "configure:3474: checking for sys/atomic_op.h" >&5
3474 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3475 echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477 cat > conftest.$ac_ext <<EOF
3478 #line 3479 "configure"
3479 #include "confdefs.h"
3480 #include <sys/atomic_op.h>
3482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3483 { (eval echo configure:3484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3485 if test -z "$ac_err"; then
3486 rm -rf conftest*
3487 eval "ac_cv_header_$ac_safe=yes"
3488 else
3489 echo "$ac_err" >&5
3490 echo "configure: failed program was:" >&5
3491 cat conftest.$ac_ext >&5
3492 rm -rf conftest*
3493 eval "ac_cv_header_$ac_safe=no"
3495 rm -f conftest*
3497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3498 echo "$ac_t""yes" 1>&6
3499 cat >> confdefs.h <<\EOF
3500 #define AIX_HAVE_ATOMIC_OP_H 1
3503 else
3504 echo "$ac_t""no" 1>&6
3507 case "${target_os}" in
3508 aix3.2*)
3509 cat >> confdefs.h <<\EOF
3510 #define AIX_RENAME_SELECT 1
3513 cat >> confdefs.h <<\EOF
3514 #define _PR_NO_LARGE_FILES 1
3517 AIX_LINK_OPTS='-bnso -berok'
3518 PR_MD_ASFILES=os_AIX.s
3520 aix4.1*)
3521 cat >> confdefs.h <<\EOF
3522 #define AIX_TIMERS 1
3525 cat >> confdefs.h <<\EOF
3526 #define _PR_NO_LARGE_FILES 1
3529 cat >> confdefs.h <<\EOF
3530 #define AIX4_1 1
3533 MKSHLIB=
3534 DSO_LDOPTS=
3535 AIX_LINK_OPTS='-bnso -berok'
3536 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3537 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3539 aix4.2*)
3540 cat >> confdefs.h <<\EOF
3541 #define AIX_TIMERS 1
3544 cat >> confdefs.h <<\EOF
3545 #define _PR_HAVE_OFF64_T 1
3548 AIX_LINK_OPTS='-brtl -bnso -berok'
3550 aix4.3*)
3551 cat >> confdefs.h <<\EOF
3552 #define AIX_TIMERS 1
3555 cat >> confdefs.h <<\EOF
3556 #define _PR_HAVE_OFF64_T 1
3559 cat >> confdefs.h <<\EOF
3560 #define AIX4_3_PLUS 1
3563 cat >> confdefs.h <<\EOF
3564 #define HAVE_SOCKLEN_T 1
3567 cat >> confdefs.h <<\EOF
3568 #define HAVE_FCNTL_FILE_LOCKING 1
3571 USE_IPV6=1
3572 AIX_LINK_OPTS='-brtl -bnso -berok'
3575 cat >> confdefs.h <<\EOF
3576 #define AIX_TIMERS 1
3579 cat >> confdefs.h <<\EOF
3580 #define _PR_HAVE_OFF64_T 1
3583 cat >> confdefs.h <<\EOF
3584 #define AIX4_3_PLUS 1
3587 cat >> confdefs.h <<\EOF
3588 #define HAVE_SOCKLEN_T 1
3591 cat >> confdefs.h <<\EOF
3592 #define HAVE_FCNTL_FILE_LOCKING 1
3595 USE_IPV6=1
3596 AIX_LINK_OPTS='-brtl -bnso -berok'
3598 esac
3599 CFLAGS="$CFLAGS -qro -qroconst"
3600 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3601 AIX_TMP='./_aix_tmp.o'
3602 if test -n "$USE_64"; then
3603 MDCPUCFG_H=_aix64.cfg
3604 OBJECT_MODE=64
3605 else
3606 MDCPUCFG_H=_aix32.cfg
3608 PR_MD_CSRCS=aix.c
3609 RESOLVE_LINK_SYMBOLS=1
3612 *-beos*)
3613 cat >> confdefs.h <<\EOF
3614 #define XP_BEOS 1
3617 cat >> confdefs.h <<\EOF
3618 #define BeOS 1
3621 cat >> confdefs.h <<\EOF
3622 #define BEOS 1
3625 cat >> confdefs.h <<\EOF
3626 #define _POSIX_SOURCE 1
3629 DSO_LDOPTS=-nostart
3630 MDCPUCFG_H=_beos.cfg
3631 USE_BTHREADS=1
3632 PR_MD_ARCH_DIR=beos
3633 RESOLVE_LINK_SYMBOLS=1
3634 case "${target_cpu}" in
3635 i*86)
3636 _OPTIMIZE_FLAGS=-O2
3637 _DEBUG_FLAGS='-gdwarf-2 -O0'
3638 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3639 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3640 echo "configure:3641: checking for gethostbyaddr in -lbind" >&5
3641 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3642 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3643 echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645 ac_save_LIBS="$LIBS"
3646 LIBS="-lbind $LIBS"
3647 cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 /* Override any gcc2 internal prototype to avoid an error. */
3651 /* We use char because int might match the return type of a gcc2
3652 builtin and then its argument prototype would still apply. */
3653 char gethostbyaddr();
3655 int main() {
3656 gethostbyaddr()
3657 ; return 0; }
3659 if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3660 rm -rf conftest*
3661 eval "ac_cv_lib_$ac_lib_var=yes"
3662 else
3663 echo "configure: failed program was:" >&5
3664 cat conftest.$ac_ext >&5
3665 rm -rf conftest*
3666 eval "ac_cv_lib_$ac_lib_var=no"
3668 rm -f conftest*
3669 LIBS="$ac_save_LIBS"
3672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3673 echo "$ac_t""yes" 1>&6
3674 OS_LIBS="$OS_LIBS -lbind -lsocket"
3675 else
3676 echo "$ac_t""no" 1>&6
3680 powerpc)
3681 CC=mwcc
3682 CCC=mwcc
3683 LD=mwld
3684 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'
3685 _OPTIMIZE_FLAGS=-O2
3686 _DEBUG_FLAGS='-g -O0'
3688 esac
3691 *-bsdi*)
3692 cat >> confdefs.h <<\EOF
3693 #define XP_UNIX 1
3696 cat >> confdefs.h <<\EOF
3697 #define BSDI 1
3700 cat >> confdefs.h <<\EOF
3701 #define NEED_BSDREGEX 1
3705 CFLAGS="$CFLAGS -Wall -Wno-format"
3706 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3708 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3709 CPU_ARCH=x86
3710 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3711 CPU_ARCH=sparc
3714 MDCPUCFG_H=_bsdi.cfg
3715 PR_MD_CSRCS=bsdi.c
3717 DSO_LDOPTS=-r
3719 case "$target_os" in
3720 bsdi1.1*)
3721 cat >> confdefs.h <<\EOF
3722 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3725 cat >> confdefs.h <<\EOF
3726 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3729 cat >> confdefs.h <<\EOF
3730 #define _PR_NEED_H_ERRNO 1
3733 MKSHLIB=
3734 DSO_CFLAGS=
3735 DSO_LDOPTS=
3738 bsdi2.1*)
3739 cat >> confdefs.h <<\EOF
3740 #define _PR_TIMESPEC_HAS_TS_SEC 1
3743 cat >> confdefs.h <<\EOF
3744 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3747 cat >> confdefs.h <<\EOF
3748 #define HAVE_DLL 1
3751 cat >> confdefs.h <<\EOF
3752 #define USE_DLFCN 1
3755 cat >> confdefs.h <<\EOF
3756 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3759 PR_MD_ASFILES=os_BSD_OS_386_2.s
3762 bsdi4.* | bsdi5.*)
3763 cat >> confdefs.h <<\EOF
3764 #define _PR_SELECT_CONST_TIMEVAL 1
3767 cat >> confdefs.h <<\EOF
3768 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3771 cat >> confdefs.h <<\EOF
3772 #define HAVE_DLL 1
3775 cat >> confdefs.h <<\EOF
3776 #define USE_DLFCN 1
3779 cat >> confdefs.h <<\EOF
3780 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3783 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3784 DSO_CFLAGS=-fPIC
3785 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3786 STRIP="$STRIP -d"
3787 case "$target_os" in
3788 bsdi4.2* | bsdi4.3* | bsdi5.*)
3789 cat >> confdefs.h <<\EOF
3790 #define _PR_HAVE_GETPROTO_R 1
3793 cat >> confdefs.h <<\EOF
3794 #define _PR_HAVE_GETPROTO_R_POINTER 1
3798 esac
3801 cat >> confdefs.h <<\EOF
3802 #define _PR_SELECT_CONST_TIMEVAL 1
3805 cat >> confdefs.h <<\EOF
3806 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3809 cat >> confdefs.h <<\EOF
3810 #define HAVE_DLL 1
3813 cat >> confdefs.h <<\EOF
3814 #define USE_DLFCN 1
3817 cat >> confdefs.h <<\EOF
3818 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3822 esac
3826 *-darwin*)
3827 cat >> confdefs.h <<\EOF
3828 #define XP_UNIX 1
3831 cat >> confdefs.h <<\EOF
3832 #define DARWIN 1
3835 cat >> confdefs.h <<\EOF
3836 #define HAVE_BSD_FLOCK 1
3839 cat >> confdefs.h <<\EOF
3840 #define HAVE_SOCKLEN_T 1
3843 AS='$(CC) -x assembler-with-cpp'
3844 CFLAGS="$CFLAGS -Wall -fno-common"
3845 case "${target_cpu}" in
3846 arm*)
3847 CPU_ARCH=arm
3849 i*86*)
3850 if test -n "$USE_64"; then
3851 CPU_ARCH=x86_64
3852 else
3853 CPU_ARCH=i386
3856 x86_64)
3857 CPU_ARCH=x86_64
3860 CPU_ARCH=ppc
3862 esac
3863 if test "`echo $CC | grep -c '\-arch '`" = "0"; then
3864 CC="$CC -arch $CPU_ARCH"
3866 ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'`
3867 echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6
3868 echo "configure:3869: checking for crt_externs.h" >&5
3869 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3870 echo $ac_n "(cached) $ac_c" 1>&6
3871 else
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 #include <crt_externs.h>
3877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3878 { (eval echo configure:3879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3880 if test -z "$ac_err"; then
3881 rm -rf conftest*
3882 eval "ac_cv_header_$ac_safe=yes"
3883 else
3884 echo "$ac_err" >&5
3885 echo "configure: failed program was:" >&5
3886 cat conftest.$ac_ext >&5
3887 rm -rf conftest*
3888 eval "ac_cv_header_$ac_safe=no"
3890 rm -f conftest*
3892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3893 echo "$ac_t""yes" 1>&6
3895 else
3896 echo "$ac_t""no" 1>&6
3899 DSO_CFLAGS=-fPIC
3900 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3901 _OPTIMIZE_FLAGS=-O2
3902 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3903 STRIP="$STRIP -x -S"
3904 DLL_SUFFIX=dylib
3905 USE_PTHREADS=1
3906 MDCPUCFG_H=_darwin.cfg
3907 PR_MD_CSRCS=darwin.c
3908 PR_MD_ASFILES=os_Darwin.s
3910 # Add Mac OS X support for loading CFM & CFBundle plugins
3911 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3912 cat >> confdefs.h <<\EOF
3913 #define XP_MACOSX 1
3916 OS_TARGET=MacOSX
3918 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3919 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3920 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3921 case "${target_cpu}" in
3922 powerpc*)
3923 export MACOSX_DEPLOYMENT_TARGET=10.2
3925 i*86*)
3926 export MACOSX_DEPLOYMENT_TARGET=10.4
3928 esac
3932 if test "$MACOS_SDK_DIR"; then
3934 if test ! -d "$MACOS_SDK_DIR"; then
3935 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3936 specify a valid SDK. SDKs are installed when the optional cross-development
3937 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3941 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3942 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3943 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3945 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3946 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3947 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3948 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3949 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3952 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3954 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3956 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3959 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3961 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3962 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}"
3963 else
3964 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3967 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3968 export NEXT_ROOT=$MACOS_SDK_DIR
3970 if test -n "$CROSS_COMPILE" ; then
3971 HOST_CC="NEXT_ROOT= $HOST_CC"
3972 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3974 else
3975 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3977 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3979 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3980 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3981 else
3982 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3989 *-dgux*)
3990 cat >> confdefs.h <<\EOF
3991 #define XP_UNIX 1
3994 cat >> confdefs.h <<\EOF
3995 #define _PR_LOCAL_THREADS_ONLY 1
3998 cat >> confdefs.h <<\EOF
3999 #define SVR4 1
4002 cat >> confdefs.h <<\EOF
4003 #define SYSV 1
4006 cat >> confdefs.h <<\EOF
4007 #define DGUX 1
4010 cat >> confdefs.h <<\EOF
4011 #define _DGUX_SOURCE 1
4014 cat >> confdefs.h <<\EOF
4015 #define _POSIX4A_DRAFT6_SOURCE 1
4018 DSO_LDOPTS=-G
4019 _OPTIMIZE_FLAGS=-O2
4020 _DEBUG_FLAGS=
4021 MDCPUCFG_H=_dgux.cfg
4022 PR_MD_CSRCS=dgux.c
4025 *-freebsd*)
4026 if test -z "$USE_NSPR_THREADS"; then
4027 USE_PTHREADS=1
4029 cat >> confdefs.h <<\EOF
4030 #define XP_UNIX 1
4033 cat >> confdefs.h <<\EOF
4034 #define FREEBSD 1
4037 cat >> confdefs.h <<\EOF
4038 #define HAVE_BSD_FLOCK 1
4041 cat >> confdefs.h <<\EOF
4042 #define HAVE_SOCKLEN_T 1
4045 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
4046 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
4047 if test "$MOZ_OBJFORMAT" = "elf"; then
4048 DLL_SUFFIX=so
4049 else
4050 DLL_SUFFIX=so.1.0
4052 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4053 DSO_CFLAGS=-fPIC
4054 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4055 MDCPUCFG_H=_freebsd.cfg
4056 PR_MD_CSRCS=freebsd.c
4059 *-hpux*)
4060 cat >> confdefs.h <<\EOF
4061 #define XP_UNIX 1
4064 cat >> confdefs.h <<\EOF
4065 #define HPUX 1
4068 cat >> confdefs.h <<\EOF
4069 #define _HPUX_SOURCE 1
4072 # OSF1 and HPUX report the POLLHUP event for a socket when the
4073 # shutdown(SHUT_WR) operation is called for the remote end, even though
4074 # the socket is still writeable. Use select(), instead of poll(), to
4075 # workaround this problem.
4076 cat >> confdefs.h <<\EOF
4077 #define _PR_POLL_WITH_SELECT 1
4080 cat >> confdefs.h <<\EOF
4081 #define _USE_BIG_FDS 1
4084 DSO_LDOPTS='-b +h $(notdir $@)'
4085 PR_MD_CSRCS=hpux.c
4086 if test "$OS_TEST" = "ia64"; then
4087 DLL_SUFFIX=so
4088 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
4089 CPU_ARCH_TAG=_$OS_TEST
4090 if test -z "$USE_64"; then
4091 COMPILER_TAG=_32
4093 PR_MD_ASFILES=os_HPUX_ia64.s
4094 else
4095 cat >> confdefs.h <<\EOF
4096 #define hppa 1
4099 DLL_SUFFIX=sl
4100 PR_MD_ASFILES=os_HPUX.s
4102 if test -n "$USE_64"; then
4103 MDCPUCFG_H=_hpux64.cfg
4104 else
4105 MDCPUCFG_H=_hpux32.cfg
4107 if test -z "$GNU_CC"; then
4108 CC="$CC -Ae"
4109 CXX="$CXX -ext"
4110 DSO_CFLAGS=+Z
4111 else
4112 DSO_CFLAGS=-fPIC
4113 ASFLAGS="$ASFLAGS -x assembler-with-cpp"
4116 if test -n "$MOZILLA_CLIENT"; then
4117 DEFAULT_IMPL_STRATEGY=_EMU
4120 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
4121 cat >> confdefs.h <<\EOF
4122 #define _PR_NEED_H_ERRNO 1
4125 cat >> confdefs.h <<\EOF
4126 #define HPUX9 1
4129 DEFAULT_IMPL_STRATEGY=_EMU
4130 USE_NSPR_THREADS=1
4133 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
4134 cat >> confdefs.h <<\EOF
4135 #define _PR_NO_LARGE_FILES 1
4140 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4141 cat >> confdefs.h <<\EOF
4142 #define _PR_NEED_H_ERRNO 1
4147 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4148 cat >> confdefs.h <<\EOF
4149 #define HAVE_INT_LOCALTIME_R 1
4154 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
4155 cat >> confdefs.h <<\EOF
4156 #define HAVE_POINTER_LOCALTIME_R 1
4161 # HP-UX 11i v2 (B.11.23) or higher
4163 case "$OS_RELEASE" in
4164 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
4165 USE_IPV6=1
4167 esac
4170 if test "$OS_RELEASE" = "B.10.01"; then
4171 cat >> confdefs.h <<\EOF
4172 #define HPUX10 1
4175 DEFAULT_IMPL_STRATEGY=_EMU
4178 if test "$OS_RELEASE" = "B.10.10"; then
4179 cat >> confdefs.h <<\EOF
4180 #define HPUX10 1
4183 cat >> confdefs.h <<\EOF
4184 #define HPUX10_10 1
4187 DEFAULT_IMPL_STRATEGY=_PTH
4190 if test "$OS_RELEASE" = "B.10.20"; then
4191 cat >> confdefs.h <<\EOF
4192 #define HPUX10 1
4195 cat >> confdefs.h <<\EOF
4196 #define HPUX10_20 1
4199 if test -z "$GNU_CC"; then
4200 CFLAGS="$CFLAGS +DAportable +DS1.1"
4201 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4203 DEFAULT_IMPL_STRATEGY=_PTH
4206 if test "$OS_RELEASE" = "B.10.30"; then
4207 cat >> confdefs.h <<\EOF
4208 #define HPUX10 1
4211 cat >> confdefs.h <<\EOF
4212 #define HPUX10_30 1
4215 if test -z "$GNU_CC"; then
4216 CFLAGS="$CFLAGS +DAportable +DS1.1"
4217 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4219 DEFAULT_IMPL_STRATEGY=_PTH
4222 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
4223 cat >> confdefs.h <<\EOF
4224 #define HPUX10 1
4227 cat >> confdefs.h <<\EOF
4228 #define HPUX11 1
4231 cat >> confdefs.h <<\EOF
4232 #define _LARGEFILE64_SOURCE 1
4235 cat >> confdefs.h <<\EOF
4236 #define _PR_HAVE_OFF64_T 1
4239 cat >> confdefs.h <<\EOF
4240 #define HAVE_FCNTL_FILE_LOCKING 1
4243 if test -z "$GNU_CC"; then
4244 if test -z "$USE_64"; then
4245 if test "$OS_TEST" = "ia64"; then
4246 CFLAGS="$CFLAGS +DD32"
4247 CXXFLAGS="$CXXFLAGS +DD32"
4248 else
4249 CFLAGS="$CFLAGS +DAportable +DS2.0"
4250 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
4252 else
4253 if test "$OS_TEST" = "ia64"; then
4254 CFLAGS="$CFLAGS +DD64"
4255 CXXFLAGS="$CXXFLAGS +DD64"
4256 else
4257 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
4258 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
4262 DEFAULT_IMPL_STRATEGY=_PTH
4265 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
4266 USE_NSPR_THREADS=1
4267 USE_PTHREADS=
4268 USE_USER_PTHREADS=
4269 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
4270 USE_PTHREADS=1
4271 if test "$USE_NSPR_THREADS"; then
4272 USE_PTHREADS=
4274 if test "$USE_USER_PTHREADS"; then
4275 USE_PTHREADS=
4280 *-irix*)
4281 cat >> confdefs.h <<\EOF
4282 #define XP_UNIX 1
4285 cat >> confdefs.h <<\EOF
4286 #define IRIX 1
4289 cat >> confdefs.h <<\EOF
4290 #define SVR4 1
4293 cat >> confdefs.h <<\EOF
4294 #define _SGI_MP_SOURCE 1
4297 cat >> confdefs.h <<\EOF
4298 #define HAVE_FCNTL_FILE_LOCKING 1
4301 PR_MD_CSRCS=irix.c
4302 PR_MD_ASFILES=os_Irix.s
4303 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
4304 STRIP="$STRIP -f"
4305 RESOLVE_LINK_SYMBOLS=1
4306 if test -n "$USE_64"; then
4307 MDCPUCFG_H=_irix64.cfg
4308 else
4309 MDCPUCFG_H=_irix32.cfg
4311 case "${target_os}" in
4312 irix6*)
4313 cat >> confdefs.h <<\EOF
4314 #define IRIX6 1
4317 USE_PTHREADS=1
4318 USE_N32=1
4319 COMPILER_TAG=_n32
4320 IMPL_STRATEGY=_PTH
4322 irix5*)
4323 cat >> confdefs.h <<\EOF
4324 #define IRIX5 1
4327 USE_NSPR_THREADS=1
4330 USE_PTHREADS=1
4331 USE_N32=1
4333 esac
4334 if test "$GNU_CC"; then
4335 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
4336 CFLAGS="$CFLAGS -Wall -Wno-format"
4337 _OPTIMIZE_FLAGS="-O6"
4338 else
4339 if test -n "$USE_N32"; then
4340 AS='as -D_ASM $(INCLUDES) -n32'
4341 else
4342 AS='as -D_ASM $(INCLUDES)'
4344 CFLAGS="$CFLAGS -fullwarn -xansi"
4345 if test "$USE_N32"; then
4346 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
4347 else
4348 _OPTIMIZE_FLAGS="-O -Olimit 4000"
4350 if test "$USE_MDUPDATE"; then
4351 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4353 case "${target}" in
4354 *-irix6.*)
4355 CFLAGS="$CFLAGS -multigot"
4356 DSO_LDOPTS="-no_unresolved"
4357 if test "$USE_N32"; then
4358 CFLAGS="$CFLAGS -n32 -woff 1209"
4359 DSO_LDOPTS="$DSO_LDOPTS -n32"
4360 else
4361 if test "$USE_64"; then
4362 CFLAGS="$CFLAGS -64"
4363 else
4364 CFLAGS="$CFLAGS -32"
4369 CFLAGS="$CFLAGS -xgot"
4371 esac
4373 if test "${target_os}" = "irix5.3"; then
4374 cat >> confdefs.h <<\EOF
4375 #define IRIX5_3 1
4379 case "${target_os}" in
4380 irix6.5)
4381 if test -z "$GNU_CC"; then
4382 CFLAGS="$CFLAGS -mips3"
4384 cat >> confdefs.h <<\EOF
4385 #define _PR_HAVE_GETPROTO_R 1
4388 cat >> confdefs.h <<\EOF
4389 #define _PR_HAVE_GETPROTO_R_POINTER 1
4392 cat >> confdefs.h <<\EOF
4393 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4397 irix5*)
4400 cat >> confdefs.h <<\EOF
4401 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4405 esac
4408 *-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
4409 if test -z "$USE_NSPR_THREADS"; then
4410 USE_PTHREADS=1
4411 IMPL_STRATEGY=_PTH
4413 cat >> confdefs.h <<\EOF
4414 #define XP_UNIX 1
4417 cat >> confdefs.h <<\EOF
4418 #define _GNU_SOURCE 1
4421 cat >> confdefs.h <<\EOF
4422 #define HAVE_FCNTL_FILE_LOCKING 1
4425 case "${target}" in
4426 *-android*|*-linuxandroid*)
4427 OS_TARGET=Android
4428 cat >> confdefs.h <<\EOF
4429 #define LINUX 1
4433 *-linux*)
4434 cat >> confdefs.h <<\EOF
4435 #define LINUX 1
4439 esac
4440 CFLAGS="$CFLAGS -Wall"
4441 CXXFLAGS="$CXXFLAGS -Wall"
4442 MDCPUCFG_H=_linux.cfg
4443 PR_MD_CSRCS=linux.c
4444 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4445 DSO_CFLAGS=-fPIC
4446 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4447 _OPTIMIZE_FLAGS=-O2
4448 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4449 # combo is not yet good at debugging inlined
4450 # functions (even when using DWARF2 as the
4451 # debugging format)
4452 COMPILER_TAG=_glibc
4453 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
4454 CPU_ARCH=x86
4455 else
4456 CPU_ARCH=$OS_TEST
4458 CPU_ARCH_TAG=_${CPU_ARCH}
4459 case "${target_cpu}" in
4460 alpha)
4461 cat >> confdefs.h <<\EOF
4462 #define _ALPHA_ 1
4465 cat >> confdefs.h <<\EOF
4466 #define __alpha 1
4469 CFLAGS="$CFLAGS -mieee"
4470 CXXFLAGS="$CXXFLAGS -mieee"
4472 i*86)
4473 cat >> confdefs.h <<\EOF
4474 #define i386 1
4477 PR_MD_ASFILES=os_Linux_x86.s
4479 ia64)
4480 PR_MD_ASFILES=os_Linux_ia64.s
4482 x86_64)
4483 if test -n "$USE_64"; then
4484 PR_MD_ASFILES=os_Linux_x86_64.s
4485 else
4486 cat >> confdefs.h <<\EOF
4487 #define i386 1
4490 PR_MD_ASFILES=os_Linux_x86.s
4491 CC="$CC -m32"
4492 CXX="$CXX -m32"
4495 ppc|powerpc)
4496 PR_MD_ASFILES=os_Linux_ppc.s
4498 powerpc64)
4499 if test -n "$USE_64"; then
4500 CC="$CC -m64"
4501 CXX="$CXX -m64"
4502 else
4503 PR_MD_ASFILES=os_Linux_ppc.s
4506 m68k)
4507 CFLAGS="$CFLAGS -m68020-60"
4508 CXXFLAGS="$CXXFLAGS -m68020-60"
4510 esac
4513 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
4514 cat >> confdefs.h <<\EOF
4515 #define XP_PC 1
4518 cat >> confdefs.h <<\EOF
4519 #define WIN32 1
4522 PR_MD_ARCH_DIR=windows
4523 RESOLVE_LINK_SYMBOLS=1
4525 if test -n "$GNU_CC"; then
4526 CC="$CC -mwindows"
4527 CXX="$CXX -mwindows"
4528 DLL_SUFFIX=dll
4529 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
4530 RC=$WINDRES
4531 # Use temp file for windres (bug 213281)
4532 RCFLAGS='-O coff --use-temp-file'
4533 else
4534 CC=cl
4535 CXX=cl
4536 LD=link
4537 AR='lib -NOLOGO -OUT:"$@"'
4538 AR_FLAGS=
4539 RANLIB='echo not_ranlib'
4540 STRIP='echo not_strip'
4541 RC=rc.exe
4542 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4543 OBJ_SUFFIX=obj
4544 LIB_SUFFIX=lib
4545 DLL_SUFFIX=dll
4547 # Determine compiler version
4549 _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
4551 CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
4552 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
4553 _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
4554 _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
4555 _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
4556 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4558 if test "$_CC_MAJOR_VERSION" -eq "14"; then
4559 if test $_CC_RELEASE -gt 50727; then
4560 _USE_DYNAMICBASE=1
4561 elif test $_CC_BUILD -ge 762; then
4562 _USE_DYNAMICBASE=1
4564 cat >> confdefs.h <<\EOF
4565 #define _CRT_SECURE_NO_DEPRECATE 1
4568 cat >> confdefs.h <<\EOF
4569 #define _CRT_NONSTDC_NO_DEPRECATE 1
4572 elif test $_CC_MAJOR_VERSION -ge 15; then
4573 _USE_DYNAMICBASE=1
4574 cat >> confdefs.h <<\EOF
4575 #define _CRT_SECURE_NO_WARNINGS 1
4578 cat >> confdefs.h <<\EOF
4579 #define _CRT_NONSTDC_NO_WARNINGS 1
4584 if test -n "$_USE_DYNAMICBASE"; then
4585 DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
4588 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4589 # tape manipulation utility (or something else)
4590 if test "$MSC_VER" -ge "1400"; then
4592 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4595 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4596 if test -n "$MSMT_TOOL"; then
4597 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4598 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4599 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4601 MT=mt
4602 unset MSMT_TOOL
4603 else
4604 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4608 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4609 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4610 _DEBUG_FLAGS=-Zi
4611 _OPTIMIZE_FLAGS=-O2
4613 PROFILE_GEN_CFLAGS="-GL"
4614 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
4615 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
4616 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
4618 if test -z "$MOZ_OPTIMIZE"; then
4619 CFLAGS="$CFLAGS -Od"
4622 if test -n "$USE_DEBUG_RTL"; then
4623 CFLAGS="$CFLAGS -MDd"
4624 else
4625 CFLAGS="$CFLAGS -MD"
4628 if test -n "$MOZ_DEBUG"; then
4629 cat >> confdefs.h <<\EOF
4630 #define _DEBUG 1
4633 else
4634 DEFINES="$DEFINES -U_DEBUG"
4637 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4638 if test -n "$MOZ_OPTIMIZE"; then
4639 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4640 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4641 else
4642 DLLFLAGS="$DLLFLAGS -DEBUG"
4643 LDFLAGS="$LDFLAGS -DEBUG"
4647 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4648 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4649 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4652 if test "$OS_TARGET" = "WINNT"; then
4653 CFLAGS="$CFLAGS -GT"
4654 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4655 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4656 else
4657 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4658 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4660 fi # GNU_CC
4662 if test -n "$USE_STATIC_TLS"; then
4663 cat >> confdefs.h <<\EOF
4664 #define _PR_USE_STATIC_TLS 1
4669 if test "$OS_TARGET" = "WINNT"; then
4670 cat >> confdefs.h <<\EOF
4671 #define WINNT 1
4674 else
4675 cat >> confdefs.h <<\EOF
4676 #define WIN95 1
4679 # undefine WINNT as some versions of mingw gcc define it by default
4680 DEFINES="$DEFINES -UWINNT"
4681 cat >> confdefs.h <<\EOF
4682 #define _PR_GLOBAL_THREADS_ONLY 1
4687 if test "$CPU_ARCH" = "x86"; then
4688 CPU_ARCH_TAG=
4689 else
4690 CPU_ARCH_TAG=$CPU_ARCH
4693 if test -n "$USE_DEBUG_RTL"; then
4694 OBJDIR_SUFFIX=OBJD
4697 case "$OS_TARGET" in
4698 WINNT)
4699 MDCPUCFG_H=_winnt.cfg
4701 WIN95)
4702 MDCPUCFG_H=_win95.cfg
4705 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4707 esac
4709 case "$target_cpu" in
4710 i*86)
4711 if test -n "$USE_64"; then
4712 cat >> confdefs.h <<\EOF
4713 #define _AMD64_ 1
4716 else
4717 cat >> confdefs.h <<\EOF
4718 #define _X86_ 1
4723 x86_64)
4724 cat >> confdefs.h <<\EOF
4725 #define _AMD64_ 1
4728 USE_64=1
4730 ia64)
4731 cat >> confdefs.h <<\EOF
4732 #define _IA64_ 1
4735 USE_64=1
4738 cat >> confdefs.h <<\EOF
4739 #define _CPU_ARCH_NOT_DEFINED 1
4743 esac
4746 *-wince*|*-winmo*)
4747 cat >> confdefs.h <<\EOF
4748 #define XP_PC 1
4751 cat >> confdefs.h <<\EOF
4752 #define WIN32 1
4755 cat >> confdefs.h <<\EOF
4756 #define WINCE 1
4759 cat >> confdefs.h <<\EOF
4760 #define _PR_GLOBAL_THREADS_ONLY 1
4764 AR_FLAGS='-NOLOGO -OUT:"$@"'
4766 OBJ_SUFFIX=obj
4767 LIB_SUFFIX=lib
4768 DLL_SUFFIX=dll
4769 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4771 PR_MD_ARCH_DIR=windows
4772 RESOLVE_LINK_SYMBOLS=1
4774 MDCPUCFG_H=_win95.cfg
4775 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4776 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4778 DLLFLAGS='-OUT:"$@"'
4779 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4780 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4781 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4782 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4784 _DEBUG_FLAGS=-Zi
4785 _OPTIMIZE_FLAGS=-O2
4788 *-netbsd*)
4789 cat >> confdefs.h <<\EOF
4790 #define XP_UNIX 1
4793 cat >> confdefs.h <<\EOF
4794 #define NETBSD 1
4797 cat >> confdefs.h <<\EOF
4798 #define HAVE_BSD_FLOCK 1
4801 if test -z "$USE_NSPR_THREADS"; then
4802 USE_PTHREADS=1
4804 MDCPUCFG_H=_netbsd.cfg
4805 PR_MD_CSRCS=netbsd.c
4807 DSO_CFLAGS='-fPIC -DPIC'
4808 CFLAGS="$CFLAGS -ansi -Wall"
4809 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4810 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4812 if test -z "$OBJECT_FMT"; then
4813 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4814 OBJECT_FMT=a.out
4815 DLL_SUFFIX=so.1.0
4816 DSO_LDOPTS='-shared'
4817 else
4818 OBJECT_FMT=ELF
4819 DLL_SUFFIX=so
4820 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4824 if test "$LIBRUNPATH"; then
4825 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4829 *-nto*)
4830 cat >> confdefs.h <<\EOF
4831 #define XP_UNIX 1
4834 cat >> confdefs.h <<\EOF
4835 #define NTO 1
4838 cat >> confdefs.h <<\EOF
4839 #define _QNX_SOURCE 1
4842 cat >> confdefs.h <<\EOF
4843 #define HAVE_POINTER_LOCALTIME_R 1
4846 MDCPUCFG_H=_nto.cfg
4847 PR_MD_CSRCS=nto.c
4848 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4849 DSO_CFLAGS=-fPIC
4850 DSO_LDOPTS=-shared
4851 OS_LIBS="$OS_LIBS -lsocket"
4852 _OPTIMIZE_FLAGS="-O1"
4853 _DEBUG_FLAGS="-gstabs"
4856 *-openbsd*)
4857 cat >> confdefs.h <<\EOF
4858 #define XP_UNIX 1
4861 cat >> confdefs.h <<\EOF
4862 #define OPENBSD 1
4865 cat >> confdefs.h <<\EOF
4866 #define HAVE_BSD_FLOCK 1
4869 cat >> confdefs.h <<\EOF
4870 #define HAVE_SOCKLEN_T 1
4873 CFLAGS="$CFLAGS -ansi -Wall"
4874 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4875 DLL_SUFFIX=so.1.0
4876 DSO_CFLAGS=-fPIC
4877 MDCPUCFG_H=_openbsd.cfg
4878 PR_MD_CSRCS=openbsd.c
4879 OS_LIBS="-lc"
4880 if test -z "$USE_NSPR_THREADS"; then
4881 USE_PTHREADS=1
4883 DSO_LDOPTS='-shared -fPIC'
4884 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4887 *-osf*)
4888 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4889 cat >> confdefs.h <<\EOF
4890 #define XP_UNIX 1
4893 cat >> confdefs.h <<\EOF
4894 #define OSF1 1
4897 cat >> confdefs.h <<\EOF
4898 #define _REENTRANT 1
4901 # OSF1 and HPUX report the POLLHUP event for a socket when the
4902 # shutdown(SHUT_WR) operation is called for the remote end, even though
4903 # the socket is still writeable. Use select(), instead of poll(), to
4904 # workaround this problem.
4905 cat >> confdefs.h <<\EOF
4906 #define _PR_POLL_WITH_SELECT 1
4910 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4911 USE_NSPR_THREADS=1
4914 if test -z "$GNU_CC"; then
4915 CC="$CC -std1 -ieee_with_inexact"
4916 if test "$OS_RELEASE" != "V2.0"; then
4917 CC="$CC -readonly_strings"
4919 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4920 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4921 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4922 echo "configure:4923: checking for machine/builtins.h" >&5
4923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4924 echo $ac_n "(cached) $ac_c" 1>&6
4925 else
4926 cat > conftest.$ac_ext <<EOF
4927 #line 4928 "configure"
4928 #include "confdefs.h"
4929 #include <machine/builtins.h>
4931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4932 { (eval echo configure:4933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4934 if test -z "$ac_err"; then
4935 rm -rf conftest*
4936 eval "ac_cv_header_$ac_safe=yes"
4937 else
4938 echo "$ac_err" >&5
4939 echo "configure: failed program was:" >&5
4940 cat conftest.$ac_ext >&5
4941 rm -rf conftest*
4942 eval "ac_cv_header_$ac_safe=no"
4944 rm -f conftest*
4946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4947 echo "$ac_t""yes" 1>&6
4948 cat >> confdefs.h <<\EOF
4949 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4952 else
4953 echo "$ac_t""no" 1>&6
4956 else
4957 CFLAGS="$CFLAGS -mieee"
4958 CXXFLAGS="$CXXFLAGS -mieee"
4961 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4962 cat >> confdefs.h <<\EOF
4963 #define HAVE_INT_LOCALTIME_R 1
4966 else
4967 cat >> confdefs.h <<\EOF
4968 #define HAVE_FCNTL_FILE_LOCKING 1
4971 cat >> confdefs.h <<\EOF
4972 #define HAVE_POINTER_LOCALTIME_R 1
4976 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4977 cat >> confdefs.h <<\EOF
4978 #define OSF1V4_MAP_PRIVATE_BUG 1
4982 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4983 MDCPUCFG_H=_osf1.cfg
4984 PR_MD_CSRCS=osf1.c
4987 *-qnx*)
4988 cat >> confdefs.h <<\EOF
4989 #define XP_UNIX 1
4992 cat >> confdefs.h <<\EOF
4993 #define QNX 1
4996 cat >> confdefs.h <<\EOF
4997 #define _PR_NEED_H_ERRNO 1
5000 USE_NSPR_THREADS=1
5001 MDCPUCFG_H=_qnx.cfg
5002 PR_MD_CSRCS=qnx.c
5005 *-riscos*)
5006 cat >> confdefs.h <<\EOF
5007 #define XP_UNIX 1
5010 cat >> confdefs.h <<\EOF
5011 #define RISCOS 1
5014 cat >> confdefs.h <<\EOF
5015 #define _PR_NEED_H_ERRNO 1
5018 USE_PTHREADS=1
5019 MDCPUCFG_H=_riscos.cfg
5020 PR_MD_CSRCS=riscos.c
5021 DSO_CFLAGS=-fPIC
5022 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
5023 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5026 *-*-sco*)
5027 cat >> confdefs.h <<\EOF
5028 #define XP_UNIX 1
5031 cat >> confdefs.h <<\EOF
5032 #define SCO 1
5035 cat >> confdefs.h <<\EOF
5036 #define sco 1
5039 cat >> confdefs.h <<\EOF
5040 #define SYSV 1
5043 cat >> confdefs.h <<\EOF
5044 #define _SVID3 1
5047 cat >> confdefs.h <<\EOF
5048 #define _PR_NEED_H_ERRNO 1
5051 CC='cc -b elf -KPIC'
5052 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
5053 USE_NSPR_THREADS=1
5054 CPU_ARCH=x86
5055 DSO_LDOPTS='-b elf -G'
5056 MDCPUCFG_H=_scoos.cfg
5057 PR_MD_SRCS=scoos.c
5060 *-solaris*)
5061 if test -z "$USE_NSPR_THREADS"; then
5062 USE_PTHREADS=1
5064 cat >> confdefs.h <<\EOF
5065 #define XP_UNIX 1
5068 cat >> confdefs.h <<\EOF
5069 #define SVR4 1
5072 cat >> confdefs.h <<\EOF
5073 #define SYSV 1
5076 cat >> confdefs.h <<\EOF
5077 #define __svr4 1
5080 cat >> confdefs.h <<\EOF
5081 #define __svr4__ 1
5084 cat >> confdefs.h <<\EOF
5085 #define SOLARIS 1
5088 cat >> confdefs.h <<\EOF
5089 #define HAVE_FCNTL_FILE_LOCKING 1
5092 CPU_ARCH=`uname -p`
5093 MDCPUCFG_H=_solaris.cfg
5094 PR_MD_CSRCS=solaris.c
5095 LD=/usr/ccs/bin/ld
5096 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5097 RESOLVE_LINK_SYMBOLS=1
5098 case "${OS_RELEASE}" in
5099 5.8|5.9)
5102 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
5103 USE_B_DIRECT=1
5105 esac
5106 if test -n "$GNU_CC"; then
5107 DSO_CFLAGS=-fPIC
5108 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
5109 GCC_USE_GNU_LD=1
5111 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
5112 if test -n "$USE_B_DIRECT"; then
5113 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
5115 else
5116 DSO_CFLAGS=-KPIC
5117 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
5118 if test -n "$USE_B_DIRECT"; then
5119 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5122 if test -n "$GNU_CC"; then
5123 CFLAGS="$CFLAGS -Wall"
5124 CXXFLAGS="$CXXFLAGS -Wall"
5125 if test -n "$USE_MDUPDATE"; then
5126 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
5127 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
5129 GCC_AS=`$CC -print-prog-name=as`
5130 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
5131 GNU_AS=1
5133 else
5134 CFLAGS="$CFLAGS -xstrconst"
5135 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
5136 if test -z "$MOZ_OPTIMIZE"; then
5137 CFLAGS="$CFLAGS -xs"
5138 CXXFLAGS="$CXXFLAGS -xs"
5140 _OPTIMIZE_FLAGS=-xO4
5142 if test -z "$GNU_AS"; then
5143 ASFLAGS="$ASFLAGS -Wa,-P"
5145 if test -n "$USE_64"; then
5146 if test -n "$GNU_CC"; then
5147 CC="$CC -m64"
5148 CXX="$CXX -m64"
5149 else
5150 if test "$OS_TEST" = "i86pc"; then
5151 CC="$CC -xarch=amd64"
5152 CXX="$CXX -xarch=amd64"
5153 else
5154 CC="$CC -xarch=v9"
5155 CXX="$CXX -xarch=v9"
5159 if test "$OS_TEST" = "i86pc"; then
5160 if test -z "$USE_64"; then
5161 cat >> confdefs.h <<\EOF
5162 #define i386 1
5166 CPU_ARCH_TAG=_$OS_TEST
5167 # The default debug format, DWARF (-g), is not supported by gcc
5168 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
5169 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
5170 # If your gcc uses GNU as, you do not need the -Wa,-s option.
5171 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
5172 _DEBUG_FLAGS=-gstabs
5173 if test -z "$GNU_AS"; then
5174 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
5178 case "${target_os}" in
5179 solaris2.3*)
5180 cat >> confdefs.h <<\EOF
5181 #define _PR_NO_LARGE_FILES 1
5185 solaris2.4*)
5186 cat >> confdefs.h <<\EOF
5187 #define _PR_NO_LARGE_FILES 1
5191 solaris2.5*)
5192 cat >> confdefs.h <<\EOF
5193 #define SOLARIS2_5 1
5198 cat >> confdefs.h <<\EOF
5199 #define _PR_HAVE_OFF64_T 1
5202 # The lfcompile64(5) man page on Solaris 2.6 says:
5203 # For applications that do not wish to conform to the POSIX or
5204 # X/Open specifications, the 64-bit transitional interfaces
5205 # are available by default. No compile-time flags need to be
5206 # set.
5207 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
5208 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
5209 if test -n "$GNU_CC"; then
5210 cat >> confdefs.h <<\EOF
5211 #define _LARGEFILE64_SOURCE 1
5216 esac
5217 case "${target_os}" in
5218 solaris2.3*)
5220 solaris2.4*)
5222 solaris2.5*)
5224 solaris2.6*)
5226 solaris2.7*)
5229 # Solaris 8 or higher has IPv6.
5230 cat >> confdefs.h <<\EOF
5231 #define _PR_INET6 1
5235 esac
5236 if test "$CPU_ARCH" = "sparc"; then
5237 # 64-bit Solaris SPARC requires V9 architecture, so the following
5238 # is not needed.
5239 if test -z "$USE_64"; then
5240 ULTRASPARC_LIBRARY=nspr_flt
5243 # Purify requires that binaries linked against nspr also
5244 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
5245 _rev=`uname -r`
5246 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
5247 OS_LIBS="$OS_LIBS $_librt"
5250 *-sco-sysv5*)
5251 cat >> confdefs.h <<\EOF
5252 #define XP_UNIX 1
5255 cat >> confdefs.h <<\EOF
5256 #define UNIXWARE 1
5259 cat >> confdefs.h <<\EOF
5260 #define SVR4 1
5263 cat >> confdefs.h <<\EOF
5264 #define SYSV 1
5267 USE_NSPR_THREADS=1
5268 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
5269 cat >> confdefs.h <<\EOF
5270 #define _PR_NO_LARGE_FILES 1
5273 CC='$(NSDEPTH)/build/hcc cc'
5274 CXX='$(NSDEPTH)/build/hcpp CC'
5275 MDCPUCFG_H=_unixware.cfg
5276 else
5277 cat >> confdefs.h <<\EOF
5278 #define _LARGEFILE64_SOURCE 1
5281 cat >> confdefs.h <<\EOF
5282 #define _PR_HAVE_OFF64_T 1
5285 cat >> confdefs.h <<\EOF
5286 #define _PR_HAVE_SOCKADDR_LEN 1
5289 MDCPUCFG_H=_unixware7.cfg
5291 PR_MD_CSRCS=unixware.c
5292 DSO_LDOPTS=-G
5293 CPU_ARCH=x86
5296 *-symbian*)
5297 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
5298 if test "${with_symbian_sdk+set}" = set; then
5299 withval="$with_symbian_sdk"
5300 SYMBIAN_SDK_DIR=$withval
5304 echo -----------------------------------------------------------------------------
5305 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
5306 echo -----------------------------------------------------------------------------
5308 cat >> confdefs.h <<\EOF
5309 #define XP_UNIX 1
5312 cat >> confdefs.h <<\EOF
5313 #define SYMBIAN 1
5316 cat >> confdefs.h <<\EOF
5317 #define __arm__ 1
5320 cat >> confdefs.h <<\EOF
5321 #define __SYMBIAN32__ 1
5324 cat >> confdefs.h <<\EOF
5325 #define _UNICODE 1
5328 cat >> confdefs.h <<\EOF
5329 #define NDEBUG 1
5332 cat >> confdefs.h <<\EOF
5333 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5336 cat >> confdefs.h <<\EOF
5337 #define MOZ_STDERR_TO_STDOUT 1
5340 cat >> confdefs.h <<\EOF
5341 #define HAVE_FCNTL_FILE_LOCKING 1
5344 cat >> confdefs.h <<\EOF
5345 #define HAVE_SOCKLEN_T 1
5348 USE_PTHREADS=1
5349 LIB_SUFFIX=lib
5350 DLL_SUFFIX=dll
5351 MKSHLIB=
5352 DSO_LDOPTS=
5353 DSO_CFLAGS=
5354 VISIBILITY_FLAGS=
5355 MDCPUCFG_H=_symbian.cfg
5356 PR_MD_CSRCS=symbian.c
5357 NSINSTALL=nsinstall
5358 RANLIB='echo no ranlib '
5359 CPU_ARCH=ARM
5360 OS_ARCH=SYMBIAN
5361 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5362 CFLAGS="$CFLAGS -MD -nostdinc"
5363 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5364 echo -------------------------------------------------------
5365 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5366 echo -------------------------------------------------------
5367 case "$OS_TARGET" in
5368 WINSCW)
5369 CC=mwccsym2.exe
5370 CXX=mwccsym2.exe
5371 LD=mwldsym2.exe
5372 AR=mwldsym2.exe
5373 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5374 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)"
5375 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5376 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5377 cat >> confdefs.h <<\EOF
5378 #define _DEBUG 1
5381 cat >> confdefs.h <<\EOF
5382 #define __CW32__ 1
5385 cat >> confdefs.h <<\EOF
5386 #define __WINS__ 1
5389 cat >> confdefs.h <<\EOF
5390 #define __WINSCW__ 1
5393 DEFINES="$DEFINES -U_WIN32"
5395 GCCE)
5396 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5397 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5398 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5399 cat >> confdefs.h <<\EOF
5400 #define __GCCE__ 1
5403 cat >> confdefs.h <<\EOF
5404 #define __EABI__ 1
5407 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5410 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5412 esac
5413 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5416 *-os2*)
5417 cat >> confdefs.h <<\EOF
5418 #define XP_OS2 1
5421 cat >> confdefs.h <<\EOF
5422 #define XP_PC 1
5425 cat >> confdefs.h <<\EOF
5426 #define BSD_SELECT 1
5429 cat >> confdefs.h <<\EOF
5430 #define TCPV40HDRS 1
5433 LIB_SUFFIX=lib
5434 DLL_SUFFIX=dll
5435 RC=rc.exe
5436 PR_MD_ARCH_DIR=os2
5437 PROG_SUFFIX=.exe
5438 NSINSTALL=nsinstall
5439 MDCPUCFG_H=_os2.cfg
5440 RESOLVE_LINK_SYMBOLS=1
5442 cat >> confdefs.h <<\EOF
5443 #define OS2 1
5446 AR=emxomfar
5447 AR_FLAGS='r $@'
5448 CFLAGS="$CFLAGS -Wall -Zomf"
5449 CXXFLAGS="$CFLAGS -Wall -Zomf"
5450 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5451 DSO_CFLAGS=
5452 DSO_LDOPTS='-Zomf -Zdll'
5453 LDFLAGS='-Zmap'
5454 _OPTIMIZE_FLAGS="-O2 -s"
5455 _DEBUG_FLAGS="-g -fno-inline"
5456 if test -n "$MOZ_OPTIMIZE"; then
5457 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5459 IMPLIB='emximp -o'
5460 FILTER='emxexp -o'
5461 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5462 LDFLAGS="$LDFLAGS -Zhigh-mem"
5463 cat >> confdefs.h <<\EOF
5464 #define MOZ_OS2_HIGH_MEMORY 1
5469 # GCC for OS/2 currently predefines these, but we don't want them
5470 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5474 cat >> confdefs.h <<\EOF
5475 #define XP_UNIX 1
5480 esac
5482 if test -z "$SKIP_LIBRARY_CHECKS"; then
5486 case $target in
5487 *-darwin*|*-beos*|*-os2*)
5490 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5491 echo "configure:5492: checking for dlopen in -ldl" >&5
5492 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5493 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5494 echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496 ac_save_LIBS="$LIBS"
5497 LIBS="-ldl $LIBS"
5498 cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 /* Override any gcc2 internal prototype to avoid an error. */
5502 /* We use char because int might match the return type of a gcc2
5503 builtin and then its argument prototype would still apply. */
5504 char dlopen();
5506 int main() {
5507 dlopen()
5508 ; return 0; }
5510 if { (eval echo configure:5511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5511 rm -rf conftest*
5512 eval "ac_cv_lib_$ac_lib_var=yes"
5513 else
5514 echo "configure: failed program was:" >&5
5515 cat conftest.$ac_ext >&5
5516 rm -rf conftest*
5517 eval "ac_cv_lib_$ac_lib_var=no"
5519 rm -f conftest*
5520 LIBS="$ac_save_LIBS"
5523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5524 echo "$ac_t""yes" 1>&6
5525 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5526 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5527 echo "configure:5528: checking for dlfcn.h" >&5
5528 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5529 echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531 cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 #include <dlfcn.h>
5536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5537 { (eval echo configure:5538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5539 if test -z "$ac_err"; then
5540 rm -rf conftest*
5541 eval "ac_cv_header_$ac_safe=yes"
5542 else
5543 echo "$ac_err" >&5
5544 echo "configure: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 rm -rf conftest*
5547 eval "ac_cv_header_$ac_safe=no"
5549 rm -f conftest*
5551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5552 echo "$ac_t""yes" 1>&6
5553 OS_LIBS="-ldl $OS_LIBS"
5554 else
5555 echo "$ac_t""no" 1>&6
5558 else
5559 echo "$ac_t""no" 1>&6
5563 esac
5568 if test $ac_cv_prog_gcc = yes; then
5569 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5570 echo "configure:5571: checking whether ${CC-cc} needs -traditional" >&5
5571 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5572 echo $ac_n "(cached) $ac_c" 1>&6
5573 else
5574 ac_pattern="Autoconf.*'x'"
5575 cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 #include <sgtty.h>
5579 Autoconf TIOCGETP
5581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5582 egrep "$ac_pattern" >/dev/null 2>&1; then
5583 rm -rf conftest*
5584 ac_cv_prog_gcc_traditional=yes
5585 else
5586 rm -rf conftest*
5587 ac_cv_prog_gcc_traditional=no
5589 rm -f conftest*
5592 if test $ac_cv_prog_gcc_traditional = no; then
5593 cat > conftest.$ac_ext <<EOF
5594 #line 5595 "configure"
5595 #include "confdefs.h"
5596 #include <termio.h>
5597 Autoconf TCGETA
5599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5600 egrep "$ac_pattern" >/dev/null 2>&1; then
5601 rm -rf conftest*
5602 ac_cv_prog_gcc_traditional=yes
5604 rm -f conftest*
5609 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5610 if test $ac_cv_prog_gcc_traditional = yes; then
5611 CC="$CC -traditional"
5615 _SAVE_LIBS="$LIBS"
5616 LIBS="$LIBS $OS_LIBS"
5617 for ac_func in lchown strerror dladdr
5619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5620 echo "configure:5621: checking for $ac_func" >&5
5621 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5622 echo $ac_n "(cached) $ac_c" 1>&6
5623 else
5624 cat > conftest.$ac_ext <<EOF
5625 #line 5626 "configure"
5626 #include "confdefs.h"
5627 /* System header to define __stub macros and hopefully few prototypes,
5628 which can conflict with char $ac_func(); below. */
5629 #include <assert.h>
5630 /* Override any gcc2 internal prototype to avoid an error. */
5631 /* We use char because int might match the return type of a gcc2
5632 builtin and then its argument prototype would still apply. */
5633 char $ac_func();
5635 int main() {
5637 /* The GNU C library defines this for functions which it implements
5638 to always fail with ENOSYS. Some functions are actually named
5639 something starting with __ and the normal name is an alias. */
5640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5641 choke me
5642 #else
5643 $ac_func();
5644 #endif
5646 ; return 0; }
5648 if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5649 rm -rf conftest*
5650 eval "ac_cv_func_$ac_func=yes"
5651 else
5652 echo "configure: failed program was:" >&5
5653 cat conftest.$ac_ext >&5
5654 rm -rf conftest*
5655 eval "ac_cv_func_$ac_func=no"
5657 rm -f conftest*
5660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5661 echo "$ac_t""yes" 1>&6
5662 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5663 cat >> confdefs.h <<EOF
5664 #define $ac_tr_func 1
5667 else
5668 echo "$ac_t""no" 1>&6
5670 done
5672 LIBS="$_SAVE_LIBS"
5676 # Check whether --with-ccache or --without-ccache was given.
5677 if test "${with_ccache+set}" = set; then
5678 withval="$with_ccache"
5679 CCACHE=$withval
5680 else
5681 CCACHE="no"
5685 if test "$CCACHE" != "no"; then
5686 if test -n "$CCACHE"; then
5687 if test "$CCACHE" = "yes"; then
5688 CCACHE=
5689 else
5690 if test ! -e "$CCACHE"; then
5691 { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
5695 for ac_prog in $CCACHE ccache
5697 # Extract the first word of "$ac_prog", so it can be a program name with args.
5698 set dummy $ac_prog; ac_word=$2
5699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5700 echo "configure:5701: checking for $ac_word" >&5
5701 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
5702 echo $ac_n "(cached) $ac_c" 1>&6
5703 else
5704 case "$CCACHE" in
5706 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
5708 ?:/*)
5709 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
5712 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5713 ac_dummy="$PATH"
5714 for ac_dir in $ac_dummy; do
5715 test -z "$ac_dir" && ac_dir=.
5716 if test -f $ac_dir/$ac_word; then
5717 ac_cv_path_CCACHE="$ac_dir/$ac_word"
5718 break
5720 done
5721 IFS="$ac_save_ifs"
5723 esac
5725 CCACHE="$ac_cv_path_CCACHE"
5726 if test -n "$CCACHE"; then
5727 echo "$ac_t""$CCACHE" 1>&6
5728 else
5729 echo "$ac_t""no" 1>&6
5732 test -n "$CCACHE" && break
5733 done
5735 if test -z "$CCACHE" -o "$CCACHE" = ":"; then
5736 { echo "configure: error: ccache not found" 1>&2; exit 1; }
5737 elif test -x "$CCACHE"; then
5738 CC="$CCACHE $CC"
5739 CXX="$CCACHE $CXX"
5740 else
5741 { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
5745 # Check whether --enable-strip or --disable-strip was given.
5746 if test "${enable_strip+set}" = set; then
5747 enableval="$enable_strip"
5748 if test "$enableval" = "yes"; then
5749 ENABLE_STRIP=1
5754 case "${target_os}" in
5755 hpux*)
5756 if test -z "$GNU_CC"; then
5758 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5759 echo "configure:5760: checking for +Olit support" >&5
5760 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5761 echo $ac_n "(cached) $ac_c" 1>&6
5762 else
5763 ac_cv_hpux_usable_olit_option=no
5764 rm -f conftest*
5765 echo 'int main() { return 0; }' | cat > conftest.c
5766 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5767 if test $? -eq 0; then
5768 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5769 ac_cv_hpux_usable_olit_option=yes
5772 rm -f conftest*
5776 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5778 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5779 CFLAGS="$CFLAGS +Olit=all"
5780 CXXFLAGS="$CXXFLAGS +Olit=all"
5781 else
5782 CFLAGS="$CFLAGS +ESlit"
5783 CXXFLAGS="$CXXFLAGS +ESlit"
5787 esac
5791 case "$target_os" in
5792 darwin*)
5793 _HAVE_PTHREADS=1
5795 wince*)
5796 _HAVE_PTHREADS=
5800 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5801 echo "configure:5802: checking for pthread_create in -lpthreads" >&5
5802 echo "
5803 #include <pthread.h>
5804 void *foo(void *v) { return v; }
5805 int main() {
5806 pthread_t t;
5807 if (!pthread_create(&t, 0, &foo, 0)) {
5808 pthread_join(t, 0);
5810 return 0;
5811 }" > dummy.c ;
5812 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5813 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5814 _res=$? ;
5815 rm -f dummy.c dummy${ac_exeext} ;
5816 if test "$_res" = "0"; then
5817 echo "$ac_t""yes" 1>&6
5818 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5819 else
5820 echo "$ac_t""no" 1>&6
5822 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5823 echo "configure:5824: checking for pthread_create in -lpthread" >&5
5824 echo "
5825 #include <pthread.h>
5826 void *foo(void *v) { return v; }
5827 int main() {
5828 pthread_t t;
5829 if (!pthread_create(&t, 0, &foo, 0)) {
5830 pthread_join(t, 0);
5832 return 0;
5833 }" > dummy.c ;
5834 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5835 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5836 _res=$? ;
5837 rm -f dummy.c dummy${ac_exeext} ;
5838 if test "$_res" = "0"; then
5839 echo "$ac_t""yes" 1>&6
5840 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5841 else
5842 echo "$ac_t""no" 1>&6
5844 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5845 echo "configure:5846: checking for pthread_create in -lc_r" >&5
5846 echo "
5847 #include <pthread.h>
5848 void *foo(void *v) { return v; }
5849 int main() {
5850 pthread_t t;
5851 if (!pthread_create(&t, 0, &foo, 0)) {
5852 pthread_join(t, 0);
5854 return 0;
5855 }" > dummy.c ;
5856 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5857 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5858 _res=$? ;
5859 rm -f dummy.c dummy${ac_exeext} ;
5860 if test "$_res" = "0"; then
5861 echo "$ac_t""yes" 1>&6
5862 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5863 else
5864 echo "$ac_t""no" 1>&6
5866 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5867 echo "configure:5868: checking for pthread_create in -lc" >&5
5868 echo "
5869 #include <pthread.h>
5870 void *foo(void *v) { return v; }
5871 int main() {
5872 pthread_t t;
5873 if (!pthread_create(&t, 0, &foo, 0)) {
5874 pthread_join(t, 0);
5876 return 0;
5877 }" > dummy.c ;
5878 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5879 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5880 _res=$? ;
5881 rm -f dummy.c dummy${ac_exeext} ;
5882 if test "$_res" = "0"; then
5883 echo "$ac_t""yes" 1>&6
5884 _HAVE_PTHREADS=1
5886 else
5887 echo "$ac_t""no" 1>&6
5901 esac
5903 # Check whether --with-pthreads or --without-pthreads was given.
5904 if test "${with_pthreads+set}" = set; then
5905 withval="$with_pthreads"
5906 if test "$withval" = "yes"; then
5907 if test -n "$_HAVE_PTHREADS"; then
5908 USE_PTHREADS=1
5909 USE_USER_PTHREADS=
5910 USE_NSPR_THREADS=
5911 else
5912 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5914 else
5915 USE_PTHREADS=
5916 _PTHREAD_LDFLAGS=
5918 else
5919 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5920 USE_PTHREADS=1
5921 USE_USER_PTHREADS=
5922 USE_NSPR_THREADS=
5927 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5928 if test "${enable_user_pthreads+set}" = set; then
5929 enableval="$enable_user_pthreads"
5930 if test "$enableval" = "yes"; then
5931 if test -n "$_HAVE_PTHREADS"; then
5932 USE_PTHREADS=
5933 USE_USER_PTHREADS=1
5934 USE_NSPR_THREADS=
5935 else
5936 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5942 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5943 if test "${enable_nspr_threads+set}" = set; then
5944 enableval="$enable_nspr_threads"
5945 if test "$enableval" = "yes"; then
5946 USE_PTHREADS=
5947 USE_USER_PTHREADS=
5948 USE_NSPR_THREADS=1
5953 case "$target" in
5954 *-beos*)
5955 # Check whether --with-bthreads or --without-bthreads was given.
5956 if test "${with_bthreads+set}" = set; then
5957 withval="$with_bthreads"
5958 if test "$withval" = "yes"; then
5959 USE_BTHREADS=1
5960 USE_USER_PTHREADS=
5961 USE_PTHREADS=
5966 esac
5968 fi # SKIP_LIBRARY_CHECKS
5970 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5971 if test "${enable_ipv6+set}" = set; then
5972 enableval="$enable_ipv6"
5973 if test "$enableval" = "yes"; then
5974 USE_IPV6=1
5975 else
5976 USE_IPV6=
5981 if test -n "$USE_PTHREADS"; then
5982 rm -f conftest*
5983 ac_cv_have_dash_pthread=no
5984 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5985 echo "configure:5986: checking whether ${CC-cc} accepts -pthread" >&5
5986 echo 'int main() { return 0; }' | cat > conftest.c
5987 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5988 if test $? -eq 0; then
5989 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5990 ac_cv_have_dash_pthread=yes
5991 case "$target_os" in
5992 freebsd*)
5993 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5996 CFLAGS="$CFLAGS -pthread"
5997 CXXFLAGS="$CXXFLAGS -pthread"
5999 esac
6002 rm -f conftest*
6003 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
6005 ac_cv_have_dash_pthreads=no
6006 if test "$ac_cv_have_dash_pthread" = "no"; then
6007 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
6008 echo "configure:6009: checking whether ${CC-cc} accepts -pthreads" >&5
6009 echo 'int main() { return 0; }' | cat > conftest.c
6010 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
6011 if test $? -eq 0; then
6012 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
6013 ac_cv_have_dash_pthreads=yes
6014 CFLAGS="$CFLAGS -pthreads"
6015 CXXFLAGS="$CXXFLAGS -pthreads"
6018 rm -f conftest*
6019 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
6022 case "$target" in
6023 *-solaris*)
6024 if test "$ac_cv_have_dash_pthreads" = "yes"; then
6025 _PTHREAD_LDFLAGS=
6028 *-freebsd*)
6029 cat >> confdefs.h <<\EOF
6030 #define _REENTRANT 1
6033 cat >> confdefs.h <<\EOF
6034 #define _THREAD_SAFE 1
6037 if test "$ac_cv_have_dash_pthread" = "yes"; then
6038 _PTHREAD_LDFLAGS="-pthread"
6039 else
6040 _PTHREAD_LDFLAGS="-lc_r"
6043 *-netbsd*)
6044 if test "$ac_cv_have_dash_pthread" = "yes"; then
6045 _PTHREAD_LDFLAGS="-pthread"
6048 *-bsdi*)
6049 cat >> confdefs.h <<\EOF
6050 #define _THREAD_SAFE 1
6053 if test "$ac_cv_have_dash_pthread" = "yes"; then
6054 _PTHREAD_LDFLAGS=
6057 *-openbsd*)
6058 if test "$ac_cv_have_dash_pthread" = "yes"; then
6059 _PTHREAD_LDFLAGS=-pthread
6062 *-linux*|*-gnu*|*-k*bsd*-gnu)
6063 cat >> confdefs.h <<\EOF
6064 #define _REENTRANT 1
6068 esac
6070 else
6071 if test -n "$USE_USER_PTHREADS"; then
6072 USE_PTHREADS=
6073 USE_NSPR_THREADS=
6074 else
6075 _PTHREAD_LDFLAGS=
6079 case "$target" in
6080 *-aix*)
6081 if test -n "$USE_NSPR_THREADS"; then
6082 cat >> confdefs.h <<\EOF
6083 #define _PR_LOCAL_THREADS_ONLY 1
6087 case "$target_os" in
6088 aix4.1*)
6089 if test -z "$USE_PTHREADS"; then
6090 cat >> confdefs.h <<\EOF
6091 #define AIX_RENAME_SELECT 1
6096 aix4.2*)
6097 if test -z "$USE_NSPR_THREADS"; then
6098 cat >> confdefs.h <<\EOF
6099 #define HAVE_POINTER_LOCALTIME_R 1
6104 aix4.3*)
6105 if test -z "$USE_NSPR_THREADS"; then
6106 cat >> confdefs.h <<\EOF
6107 #define HAVE_POINTER_LOCALTIME_R 1
6111 if test -n "$USE_PTHREADS"; then
6112 cat >> confdefs.h <<\EOF
6113 #define _PR_HAVE_THREADSAFE_GETHOST 1
6119 if test -z "$USE_NSPR_THREADS"; then
6120 cat >> confdefs.h <<\EOF
6121 #define HAVE_POINTER_LOCALTIME_R 1
6125 if test -n "$USE_PTHREADS"; then
6126 cat >> confdefs.h <<\EOF
6127 #define _PR_HAVE_THREADSAFE_GETHOST 1
6132 esac
6134 *-bsdi*)
6135 if test -n "$USE_PTHREADS"; then
6136 cat >> confdefs.h <<\EOF
6137 #define _PR_NEED_PTHREAD_INIT 1
6142 *-freebsd*)
6143 if test -n "$USE_NSPR_THREADS"; then
6144 cat >> confdefs.h <<\EOF
6145 #define _PR_LOCAL_THREADS_ONLY 1
6150 *-hpux*)
6151 if test -n "$USE_NSPR_THREADS"; then
6152 cat >> confdefs.h <<\EOF
6153 #define _PR_LOCAL_THREADS_ONLY 1
6157 if test "$USE_PTHREADS"; then
6158 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
6159 cat >> confdefs.h <<\EOF
6160 #define _REENTRANT 1
6163 cat >> confdefs.h <<\EOF
6164 #define _PR_DCETHREADS 1
6167 else
6168 cat >> confdefs.h <<EOF
6169 #define _POSIX_C_SOURCE 199506L
6172 cat >> confdefs.h <<\EOF
6173 #define _PR_HAVE_THREADSAFE_GETHOST 1
6178 if test "$USE_USER_PTHREADS"; then
6179 cat >> confdefs.h <<EOF
6180 #define _POSIX_C_SOURCE 199506L
6185 *-irix*)
6186 if test "${target_os}" = "irix6.5"; then
6187 if test -n "$USE_PTHREADS"; then
6188 cat >> confdefs.h <<\EOF
6189 #define _PR_HAVE_GETHOST_R 1
6192 cat >> confdefs.h <<\EOF
6193 #define _PR_HAVE_GETHOST_R_POINTER 1
6199 *-linux*|*-gnu*|*-k*bsd*-gnu)
6200 if test -n "$USE_NSPR_THREADS"; then
6201 cat >> confdefs.h <<\EOF
6202 #define _PR_LOCAL_THREADS_ONLY 1
6207 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
6208 USE_PTHREADS=
6209 _PTHREAD_LDFLAGS=
6210 USE_USER_PTHREADS=
6212 *-netbsd*|*-openbsd*)
6213 if test -n "$USE_NSPR_THREADS"; then
6214 cat >> confdefs.h <<\EOF
6215 #define _PR_LOCAL_THREADS_ONLY 1
6220 *-osf*)
6221 if test -n "$USE_NSPR_THREADS"; then
6222 cat >> confdefs.h <<\EOF
6223 #define _PR_LOCAL_THREADS_ONLY 1
6227 if test -n "$USE_PTHREADS"; then
6228 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
6230 else
6231 cat >> confdefs.h <<\EOF
6232 #define _PR_HAVE_THREADSAFE_GETHOST 1
6238 *-solaris*)
6239 if test -n "$USE_NSPR_THREADS"; then
6240 cat >> confdefs.h <<\EOF
6241 #define _PR_LOCAL_THREADS_ONLY 1
6245 if test -n "$USE_PTHREADS"; then
6246 cat >> confdefs.h <<\EOF
6247 #define _REENTRANT 1
6250 cat >> confdefs.h <<\EOF
6251 #define HAVE_POINTER_LOCALTIME_R 1
6254 if test "$OS_TEST" = "i86pc"; then
6255 if test -n "$USE_64"; then
6256 PR_MD_ASFILES=os_SunOS_x86_64.s
6257 else
6258 PR_MD_ASFILES=os_SunOS_x86.s
6260 else
6261 if test -n "$USE_64"; then
6262 PR_MD_ASFILES=os_SunOS_sparcv9.s
6267 *-nto*)
6268 if test -n "$USE_PTHREADS"; then
6269 cat >> confdefs.h <<\EOF
6270 #define _PR_HAVE_GETHOST_R 1
6273 cat >> confdefs.h <<\EOF
6274 #define _PR_HAVE_GETHOST_R_POINTER 1
6279 esac
6281 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
6283 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
6284 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
6287 if test -n "$_SAVE_DEBUG_FLAGS"; then
6288 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
6291 if test -n "$MOZ_OPTIMIZE"; then
6292 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
6293 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
6296 if test -n "$MOZ_DEBUG_SYMBOLS"; then
6297 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
6298 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
6301 if test -n "$MOZ_OPTIMIZE"; then
6302 OBJDIR_TAG=_OPT
6303 else
6304 OBJDIR_TAG=_DBG
6307 if test -n "$USE_64"; then
6308 COMPILER_TAG=_64
6311 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
6313 case "$target_os" in
6314 cygwin*|msvc*|mks*)
6315 CC="\$(CYGWIN_WRAPPER) $CC"
6316 CXX="\$(CYGWIN_WRAPPER) $CXX"
6317 RC="\$(CYGWIN_WRAPPER) $RC"
6319 esac
6321 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
6322 if test "${enable_wrap_malloc+set}" = set; then
6323 enableval="$enable_wrap_malloc"
6324 if test "$enableval" = "yes"; then
6325 _WRAP_MALLOC=1
6330 if test -n "$_WRAP_MALLOC"; then
6331 if test -n "$GNU_CC"; then
6332 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
6333 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
6334 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
6335 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
6336 else
6337 { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6341 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6342 if test "${with_wrap_malloc+set}" = set; then
6343 withval="$with_wrap_malloc"
6344 WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
6452 MAKEFILES="
6453 Makefile
6454 config/Makefile
6455 config/autoconf.mk
6456 config/nsprincl.mk
6457 config/nsprincl.sh
6458 config/nspr-config
6459 config/nspr.pc
6460 lib/Makefile
6461 lib/ds/Makefile
6462 lib/libc/Makefile
6463 lib/libc/include/Makefile
6464 lib/libc/src/Makefile
6465 lib/tests/Makefile
6466 pkg/Makefile
6467 pr/Makefile
6468 pr/include/Makefile
6469 pr/include/md/Makefile
6470 pr/include/obsolete/Makefile
6471 pr/include/private/Makefile
6472 pr/src/Makefile
6473 pr/src/io/Makefile
6474 pr/src/linking/Makefile
6475 pr/src/malloc/Makefile
6476 pr/src/md/Makefile
6477 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6478 pr/src/memory/Makefile
6479 pr/src/misc/Makefile
6480 pr/src/threads/Makefile
6481 pr/tests/Makefile
6482 pr/tests/dll/Makefile
6485 if test "$OS_TARGET" = "Linux"; then
6486 MAKEFILES="$MAKEFILES
6487 pkg/linux/Makefile
6489 elif test "$OS_TARGET" = "SunOS"; then
6490 MAKEFILES="$MAKEFILES
6491 pkg/solaris/Makefile
6492 pkg/solaris/SUNWpr/Makefile
6493 pkg/solaris/SUNWprd/Makefile
6497 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6498 MAKEFILES="$MAKEFILES
6499 pr/src/threads/combined/Makefile
6501 elif test -n "$USE_PTHREADS"; then
6502 MAKEFILES="$MAKEFILES
6503 pr/src/pthreads/Makefile
6505 elif test -n "$USE_BTHREADS"; then
6506 MAKEFILES="$MAKEFILES
6507 pr/src/bthreads/Makefile
6511 if test -n "$USE_CPLUS"; then
6512 MAKEFILES="$MAKEFILES
6513 pr/src/cplus/Makefile
6514 pr/src/cplus/tests/Makefile
6518 echo $MAKEFILES > unallmakefiles
6520 trap '' 1 2 15
6521 cat > confcache <<\EOF
6522 # This file is a shell script that caches the results of configure
6523 # tests run on this system so they can be shared between configure
6524 # scripts and configure runs. It is not useful on other systems.
6525 # If it contains results you don't want to keep, you may remove or edit it.
6527 # By default, configure uses ./config.cache as the cache file,
6528 # creating it if it does not exist already. You can give configure
6529 # the --cache-file=FILE option to use a different cache file; that is
6530 # what configure does when it calls configure scripts in
6531 # subdirectories, so they share the cache.
6532 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6533 # config.status only pays attention to the cache file if you give it the
6534 # --recheck option to rerun configure.
6537 # The following way of writing the cache mishandles newlines in values,
6538 # but we know of no workaround that is simple, portable, and efficient.
6539 # So, don't put newlines in cache variables' values.
6540 # Ultrix sh set writes to stderr and can't be redirected directly,
6541 # and sets the high bit in the cache file unless we assign to the vars.
6542 (set) 2>&1 |
6543 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6544 *ac_space=\ *)
6545 # `set' does not quote correctly, so add quotes (double-quote substitution
6546 # turns \\\\ into \\, and sed turns \\ into \).
6547 sed -n \
6548 -e "s/'/'\\\\''/g" \
6549 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6552 # `set' quotes correctly as required by POSIX, so do not add quotes.
6553 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6555 esac >> confcache
6556 if cmp -s $cache_file confcache; then
6558 else
6559 if test -w $cache_file; then
6560 echo "updating cache $cache_file"
6561 cat confcache > $cache_file
6562 else
6563 echo "not updating unwritable cache $cache_file"
6566 rm -f confcache
6568 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6570 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6571 # Let make expand exec_prefix.
6572 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6574 # Any assignment to VPATH causes Sun make to only execute
6575 # the first set of double-colon rules, so remove it if not needed.
6576 # If there is a colon in the path, we need to keep it.
6577 if test "x$srcdir" = x.; then
6578 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6581 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6583 # Transform confdefs.h into DEFS.
6584 # Protect against shell expansion while executing Makefile rules.
6585 # Protect against Makefile macro expansion.
6586 cat > conftest.defs <<\EOF
6587 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6588 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6589 s%\[%\\&%g
6590 s%\]%\\&%g
6591 s%\$%$$%g
6593 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
6594 rm -f conftest.defs
6597 # Without the "./", some shells look in PATH for config.status.
6598 : ${CONFIG_STATUS=./config.status}
6600 echo creating $CONFIG_STATUS
6601 rm -f $CONFIG_STATUS
6602 cat > $CONFIG_STATUS <<EOF
6603 #! /bin/sh
6604 # Generated automatically by configure.
6605 # Run this file to recreate the current configuration.
6606 # This directory was configured as follows,
6607 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6609 # $0 $ac_configure_args
6611 # Compiler output produced by configure, useful for debugging
6612 # configure, is in ./config.log if it exists.
6614 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6615 for ac_option
6617 case "\$ac_option" in
6618 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6619 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6620 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6621 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6622 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6623 exit 0 ;;
6624 -help | --help | --hel | --he | --h)
6625 echo "\$ac_cs_usage"; exit 0 ;;
6626 *) echo "\$ac_cs_usage"; exit 1 ;;
6627 esac
6628 done
6630 ac_given_srcdir=$srcdir
6632 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6634 cat >> $CONFIG_STATUS <<EOF
6638 # Protect against being on the right side of a sed subst in config.status.
6639 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6640 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6641 $ac_vpsub
6642 $extrasub
6643 s%@SHELL@%$SHELL%g
6644 s%@CFLAGS@%$CFLAGS%g
6645 s%@CPPFLAGS@%$CPPFLAGS%g
6646 s%@CXXFLAGS@%$CXXFLAGS%g
6647 s%@FFLAGS@%$FFLAGS%g
6648 s%@DEFS@%$DEFS%g
6649 s%@LDFLAGS@%$LDFLAGS%g
6650 s%@LIBS@%$LIBS%g
6651 s%@exec_prefix@%$exec_prefix%g
6652 s%@prefix@%$prefix%g
6653 s%@program_transform_name@%$program_transform_name%g
6654 s%@bindir@%$bindir%g
6655 s%@sbindir@%$sbindir%g
6656 s%@libexecdir@%$libexecdir%g
6657 s%@datadir@%$datadir%g
6658 s%@sysconfdir@%$sysconfdir%g
6659 s%@sharedstatedir@%$sharedstatedir%g
6660 s%@localstatedir@%$localstatedir%g
6661 s%@libdir@%$libdir%g
6662 s%@includedir@%$includedir%g
6663 s%@oldincludedir@%$oldincludedir%g
6664 s%@infodir@%$infodir%g
6665 s%@mandir@%$mandir%g
6666 s%@host@%$host%g
6667 s%@host_alias@%$host_alias%g
6668 s%@host_cpu@%$host_cpu%g
6669 s%@host_vendor@%$host_vendor%g
6670 s%@host_os@%$host_os%g
6671 s%@target@%$target%g
6672 s%@target_alias@%$target_alias%g
6673 s%@target_cpu@%$target_cpu%g
6674 s%@target_vendor@%$target_vendor%g
6675 s%@target_os@%$target_os%g
6676 s%@build@%$build%g
6677 s%@build_alias@%$build_alias%g
6678 s%@build_cpu@%$build_cpu%g
6679 s%@build_vendor@%$build_vendor%g
6680 s%@build_os@%$build_os%g
6681 s%@CC@%$CC%g
6682 s%@dist_prefix@%$dist_prefix%g
6683 s%@dist_bindir@%$dist_bindir%g
6684 s%@dist_includedir@%$dist_includedir%g
6685 s%@dist_libdir@%$dist_libdir%g
6686 s%@WHOAMI@%$WHOAMI%g
6687 s%@HOST_CC@%$HOST_CC%g
6688 s%@CXX@%$CXX%g
6689 s%@RANLIB@%$RANLIB%g
6690 s%@AR@%$AR%g
6691 s%@AS@%$AS%g
6692 s%@LD@%$LD%g
6693 s%@STRIP@%$STRIP%g
6694 s%@WINDRES@%$WINDRES%g
6695 s%@CPP@%$CPP%g
6696 s%@PERL@%$PERL%g
6697 s%@CCACHE@%$CCACHE%g
6698 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6699 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6700 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6701 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6702 s%@GNU_CC@%$GNU_CC%g
6703 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6704 s%@MSC_VER@%$MSC_VER%g
6705 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6706 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6707 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
6708 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
6709 s%@USE_CPLUS@%$USE_CPLUS%g
6710 s%@USE_IPV6@%$USE_IPV6%g
6711 s%@USE_N32@%$USE_N32%g
6712 s%@USE_64@%$USE_64%g
6713 s%@OBJECT_MODE@%$OBJECT_MODE%g
6714 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6715 s%@USE_PTHREADS@%$USE_PTHREADS%g
6716 s%@USE_BTHREADS@%$USE_BTHREADS%g
6717 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6718 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6719 s%@LIBNSPR@%$LIBNSPR%g
6720 s%@LIBPLC@%$LIBPLC%g
6721 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6722 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6723 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6724 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6725 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6726 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6727 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6728 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6729 s%@CPU_ARCH@%$CPU_ARCH%g
6730 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6731 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6732 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6733 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6734 s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
6735 s%@MKSHLIB@%$MKSHLIB%g
6736 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6737 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6738 s%@OS_TARGET@%$OS_TARGET%g
6739 s%@OS_ARCH@%$OS_ARCH%g
6740 s%@OS_RELEASE@%$OS_RELEASE%g
6741 s%@OS_TEST@%$OS_TEST%g
6742 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6743 s%@DEFINES@%$DEFINES%g
6744 s%@AR_FLAGS@%$AR_FLAGS%g
6745 s%@ASFLAGS@%$ASFLAGS%g
6746 s%@FILTER@%$FILTER%g
6747 s%@IMPLIB@%$IMPLIB%g
6748 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
6749 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
6750 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
6751 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
6752 s%@OS_LIBS@%$OS_LIBS%g
6753 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6754 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6755 s%@NOSUCHFILE@%$NOSUCHFILE%g
6756 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6757 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6758 s%@OBJDIR@%$OBJDIR%g
6759 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6760 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6761 s%@NSINSTALL@%$NSINSTALL%g
6762 s%@OPTIMIZER@%$OPTIMIZER%g
6763 s%@RC@%$RC%g
6764 s%@RCFLAGS@%$RCFLAGS%g
6765 s%@DLLFLAGS@%$DLLFLAGS%g
6766 s%@EXEFLAGS@%$EXEFLAGS%g
6767 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6768 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6769 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6770 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6771 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6772 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6773 s%@NEXT_ROOT@%$NEXT_ROOT%g
6774 s%@MT@%$MT%g
6776 CEOF
6779 cat >> $CONFIG_STATUS <<\EOF
6781 # Split the substitutions into bite-sized pieces for seds with
6782 # small command number limits, like on Digital OSF/1 and HP-UX.
6783 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6784 ac_file=1 # Number of current file.
6785 ac_beg=1 # First line for current file.
6786 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6787 ac_more_lines=:
6788 ac_sed_cmds=""
6789 while $ac_more_lines; do
6790 if test $ac_beg -gt 1; then
6791 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6792 else
6793 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6795 if test ! -s conftest.s$ac_file; then
6796 ac_more_lines=false
6797 rm -f conftest.s$ac_file
6798 else
6799 if test -z "$ac_sed_cmds"; then
6800 ac_sed_cmds="sed -f conftest.s$ac_file"
6801 else
6802 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6804 ac_file=`expr $ac_file + 1`
6805 ac_beg=$ac_end
6806 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6808 done
6809 if test -z "$ac_sed_cmds"; then
6810 ac_sed_cmds=cat
6814 cat >> $CONFIG_STATUS <<EOF
6816 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6818 cat >> $CONFIG_STATUS <<\EOF
6819 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6820 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6821 case "$ac_file" in
6822 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6823 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6824 *) ac_file_in="${ac_file}.in" ;;
6825 esac
6827 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6829 # Remove last slash and all that follows it. Not all systems have dirname.
6830 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6831 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6832 # The file is in a subdirectory.
6833 test ! -d "$ac_dir" && mkdir "$ac_dir"
6834 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6835 # A "../" for each directory in $ac_dir_suffix.
6836 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6837 else
6838 ac_dir_suffix= ac_dots=
6841 case "$ac_given_srcdir" in
6842 .) srcdir=.
6843 if test -z "$ac_dots"; then top_srcdir=.
6844 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6845 /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6846 *) # Relative path.
6847 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6848 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6849 esac
6852 echo creating "$ac_file"
6853 rm -f "$ac_file"
6854 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6855 case "$ac_file" in
6856 *Makefile*) ac_comsub="1i\\
6857 # $configure_input" ;;
6858 *) ac_comsub= ;;
6859 esac
6861 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
6862 sed -e "$ac_comsub
6863 s%@configure_input@%$configure_input%g
6864 s%@srcdir@%$srcdir%g
6865 s%@top_srcdir@%$top_srcdir%g
6866 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6867 fi; done
6868 rm -f conftest.s*
6873 cat >> $CONFIG_STATUS <<EOF
6876 cat >> $CONFIG_STATUS <<\EOF
6877 chmod +x config/nspr-config
6878 exit 0
6880 chmod +x $CONFIG_STATUS
6881 rm -fr confdefs* $ac_clean_files
6882 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1