Backed out changeset 3fe07c50c854 (bug 946316) for bustage. a=backout
[gecko.git] / nsprpub / configure
blob433790b993197232f8dd7fac9bf3486179bca868
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-android-ndk=DIR
16 location where the Android NDK can be found"
17 ac_help="$ac_help
18 --with-android-toolchain=DIR
19 location of the Android toolchain"
20 ac_help="$ac_help
21 --with-android-version=VER
22 Android platform version, default 5 for arm, 9 for x86/mips"
23 ac_help="$ac_help
24 --with-android-platform=DIR
25 location of platform dir"
26 ac_help="$ac_help
27 --with-gonk=DIR location of gonk dir"
28 ac_help="$ac_help
29 --with-dist-prefix=DIST_PREFIX
30 place build files in DIST_PREFIX [dist]"
31 ac_help="$ac_help
32 --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]"
33 ac_help="$ac_help
34 --with-dist-includedir=DIR
35 build include files in DIR [DIST_PREFIX/include/nspr]"
36 ac_help="$ac_help
37 --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]"
38 ac_help="$ac_help
39 --with-mozilla Compile NSPR with Mozilla support"
40 ac_help="$ac_help
41 --enable-optimize[=OPT] Enable code optimizations (ie. -O2) "
42 ac_help="$ac_help
43 --enable-debug[=DBG] Enable debugging (using compiler flags DBG)"
44 ac_help="$ac_help
45 --enable-debug-symbols[=DBG] Enable debugging symbols
46 (using compiler flags DBG)"
47 ac_help="$ac_help
48 --enable-win32-target=\$t
49 Specify win32 flavor. (WIN95 or WINNT)"
50 ac_help="$ac_help
51 --enable-symbian-target=\$t
52 Specify symbian flavor. (WINSCW or GCCE)"
53 ac_help="$ac_help
54 --enable-debug-rtl Use the MSVC debug runtime library"
55 ac_help="$ac_help
56 --enable-n32 Enable n32 ABI support (IRIX only)"
57 ac_help="$ac_help
58 --enable-64bit Enable 64-bit support (on certain platforms)"
59 ac_help="$ac_help
60 --enable-mdupdate Enable use of certain compilers' mdupdate feature"
61 ac_help="$ac_help
62 --enable-cplus Enable some c++ api routines"
63 ac_help="$ac_help
64 --with-arm-kuser Use kuser helpers (Linux/ARM only)
65 (Requires kernel 2.6.13 or later)"
66 ac_help="$ac_help
67 --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
68 ac_help="$ac_help
69 --enable-macos-target=VER
70 Set the minimum MacOS version needed at runtime
71 [10.2 for ppc, 10.4 for x86]"
72 ac_help="$ac_help
73 --disable-os2-high-mem Disable high-memory support on OS/2"
74 ac_help="$ac_help
76 ac_help="$ac_help
77 --with-thumb[[=yes|no|toolchain-default]]
78 Use Thumb instruction set (-mthumb)"
79 ac_help="$ac_help
80 --with-thumb-interwork[[=yes|no|toolchain-default]]
81 Use Thumb/ARM instuctions interwork (-mthumb-interwork)"
82 ac_help="$ac_help
83 --with-arch=[[type|toolchain-default]]
84 Use specific CPU features (-march=type)"
85 ac_help="$ac_help
86 --with-fpu=[[type|toolchain-default]]
87 Use specific FPU type (-mfpu=type)"
88 ac_help="$ac_help
89 --with-float-abi=[[type|toolchain-default]]
90 Use specific arm float ABI (-mfloat-abi=type)"
91 ac_help="$ac_help
92 --with-soft-float[[=yes|no|toolchain-default]]
93 Use soft float library (-msoft-float)"
94 ac_help="$ac_help
95 --with-symbian-sdk=SYMBIAN_SDK_DIR
96 The path to the Symbian SDK"
97 ac_help="$ac_help
98 --with-ccache[=path/to/ccache]
99 Enable compiling with ccache"
100 ac_help="$ac_help
101 --enable-strip Enable stripping of shared libs and programs"
102 ac_help="$ac_help
103 --with-pthreads Use system pthreads library as thread subsystem"
104 ac_help="$ac_help
105 --enable-user-pthreads Build using userland pthreads"
106 ac_help="$ac_help
107 --enable-nspr-threads Build using classic nspr threads"
108 ac_help="$ac_help
109 --with-bthreads Use system bthreads library as thread subsystem
110 (BeOS only)"
111 ac_help="$ac_help
112 --enable-ipv6 Compile ipv6 support"
113 ac_help="$ac_help
114 --enable-wrap-malloc Wrap malloc calls (gnu linker only)"
115 ac_help="$ac_help
116 --with-wrap-malloc=SHAREDLIB Location of malloc wrapper library"
118 # Initialize some variables set by options.
119 # The variables have the same names as the options, with
120 # dashes changed to underlines.
121 build=NONE
122 cache_file=./config.cache
123 exec_prefix=NONE
124 host=NONE
125 no_create=
126 nonopt=NONE
127 no_recursion=
128 prefix=NONE
129 program_prefix=NONE
130 program_suffix=NONE
131 program_transform_name=s,x,x,
132 silent=
133 site=
134 srcdir=
135 target=NONE
136 verbose=
137 x_includes=NONE
138 x_libraries=NONE
139 bindir='${exec_prefix}/bin'
140 sbindir='${exec_prefix}/sbin'
141 libexecdir='${exec_prefix}/libexec'
142 datadir='${prefix}/share'
143 sysconfdir='${prefix}/etc'
144 sharedstatedir='${prefix}/com'
145 localstatedir='${prefix}/var'
146 libdir='${exec_prefix}/lib'
147 includedir='${prefix}/include'
148 oldincludedir='/usr/include'
149 infodir='${prefix}/info'
150 mandir='${prefix}/man'
152 # Initialize some other variables.
153 subdirs=
154 MFLAGS= MAKEFLAGS=
155 SHELL=${CONFIG_SHELL-/bin/sh}
156 # Maximum number of lines to put in a shell here document.
157 ac_max_here_lines=12
159 ac_prev=
160 for ac_option
163 # If the previous option needs an argument, assign it.
164 if test -n "$ac_prev"; then
165 eval "$ac_prev=\$ac_option"
166 ac_prev=
167 continue
170 case "$ac_option" in
171 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
172 *) ac_optarg= ;;
173 esac
175 # Accept the important Cygnus configure options, so we can diagnose typos.
177 case "$ac_option" in
179 -bindir | --bindir | --bindi | --bind | --bin | --bi)
180 ac_prev=bindir ;;
181 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
182 bindir="$ac_optarg" ;;
184 -build | --build | --buil | --bui | --bu)
185 ac_prev=build ;;
186 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
187 build="$ac_optarg" ;;
189 -cache-file | --cache-file | --cache-fil | --cache-fi \
190 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
191 ac_prev=cache_file ;;
192 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
193 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
194 cache_file="$ac_optarg" ;;
196 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
197 ac_prev=datadir ;;
198 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
199 | --da=*)
200 datadir="$ac_optarg" ;;
202 -disable-* | --disable-*)
203 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
204 # Reject names that are not valid shell variable names.
205 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
206 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209 eval "enable_${ac_feature}=no" ;;
211 -enable-* | --enable-*)
212 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
213 # Reject names that are not valid shell variable names.
214 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
215 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
217 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218 case "$ac_option" in
219 *=*) ;;
220 *) ac_optarg=yes ;;
221 esac
222 eval "enable_${ac_feature}='$ac_optarg'" ;;
224 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
225 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
226 | --exec | --exe | --ex)
227 ac_prev=exec_prefix ;;
228 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
229 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
230 | --exec=* | --exe=* | --ex=*)
231 exec_prefix="$ac_optarg" ;;
233 -gas | --gas | --ga | --g)
234 # Obsolete; use --with-gas.
235 with_gas=yes ;;
237 -help | --help | --hel | --he)
238 # Omit some internal or obsolete options to make the list less imposing.
239 # This message is too long to be a string in the A/UX 3.1 sh.
240 cat << EOF
241 Usage: configure [options] [host]
242 Options: [defaults in brackets after descriptions]
243 Configuration:
244 --cache-file=FILE cache test results in FILE
245 --help print this message
246 --no-create do not create output files
247 --quiet, --silent do not print \`checking...' messages
248 --version print the version of autoconf that created configure
249 Directory and file names:
250 --prefix=PREFIX install architecture-independent files in PREFIX
251 [$ac_default_prefix]
252 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
253 [same as prefix]
254 --bindir=DIR user executables in DIR [EPREFIX/bin]
255 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
256 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
257 --datadir=DIR read-only architecture-independent data in DIR
258 [PREFIX/share]
259 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
260 --sharedstatedir=DIR modifiable architecture-independent data in DIR
261 [PREFIX/com]
262 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
263 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
264 --includedir=DIR C header files in DIR [PREFIX/include]
265 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
266 --infodir=DIR info documentation in DIR [PREFIX/info]
267 --mandir=DIR man documentation in DIR [PREFIX/man]
268 --srcdir=DIR find the sources in DIR [configure dir or ..]
269 --program-prefix=PREFIX prepend PREFIX to installed program names
270 --program-suffix=SUFFIX append SUFFIX to installed program names
271 --program-transform-name=PROGRAM
272 run sed PROGRAM on installed program names
274 cat << EOF
275 Host type:
276 --build=BUILD configure for building on BUILD [BUILD=HOST]
277 --host=HOST configure for HOST [guessed]
278 --target=TARGET configure for TARGET [TARGET=HOST]
279 Features and packages:
280 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
281 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
282 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
283 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
284 --x-includes=DIR X include files are in DIR
285 --x-libraries=DIR X library files are in DIR
287 if test -n "$ac_help"; then
288 echo "--enable and --with options recognized:$ac_help"
290 exit 0 ;;
292 -host | --host | --hos | --ho)
293 ac_prev=host ;;
294 -host=* | --host=* | --hos=* | --ho=*)
295 host="$ac_optarg" ;;
297 -includedir | --includedir | --includedi | --included | --include \
298 | --includ | --inclu | --incl | --inc)
299 ac_prev=includedir ;;
300 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
301 | --includ=* | --inclu=* | --incl=* | --inc=*)
302 includedir="$ac_optarg" ;;
304 -infodir | --infodir | --infodi | --infod | --info | --inf)
305 ac_prev=infodir ;;
306 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
307 infodir="$ac_optarg" ;;
309 -libdir | --libdir | --libdi | --libd)
310 ac_prev=libdir ;;
311 -libdir=* | --libdir=* | --libdi=* | --libd=*)
312 libdir="$ac_optarg" ;;
314 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
315 | --libexe | --libex | --libe)
316 ac_prev=libexecdir ;;
317 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
318 | --libexe=* | --libex=* | --libe=*)
319 libexecdir="$ac_optarg" ;;
321 -localstatedir | --localstatedir | --localstatedi | --localstated \
322 | --localstate | --localstat | --localsta | --localst \
323 | --locals | --local | --loca | --loc | --lo)
324 ac_prev=localstatedir ;;
325 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
326 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
327 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
328 localstatedir="$ac_optarg" ;;
330 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
331 ac_prev=mandir ;;
332 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
333 mandir="$ac_optarg" ;;
335 -nfp | --nfp | --nf)
336 # Obsolete; use --without-fp.
337 with_fp=no ;;
339 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
340 | --no-cr | --no-c)
341 no_create=yes ;;
343 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
344 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
345 no_recursion=yes ;;
347 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
348 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
349 | --oldin | --oldi | --old | --ol | --o)
350 ac_prev=oldincludedir ;;
351 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
352 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
353 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
354 oldincludedir="$ac_optarg" ;;
356 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
357 ac_prev=prefix ;;
358 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
359 prefix="$ac_optarg" ;;
361 -program-prefix | --program-prefix | --program-prefi | --program-pref \
362 | --program-pre | --program-pr | --program-p)
363 ac_prev=program_prefix ;;
364 -program-prefix=* | --program-prefix=* | --program-prefi=* \
365 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
366 program_prefix="$ac_optarg" ;;
368 -program-suffix | --program-suffix | --program-suffi | --program-suff \
369 | --program-suf | --program-su | --program-s)
370 ac_prev=program_suffix ;;
371 -program-suffix=* | --program-suffix=* | --program-suffi=* \
372 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
373 program_suffix="$ac_optarg" ;;
375 -program-transform-name | --program-transform-name \
376 | --program-transform-nam | --program-transform-na \
377 | --program-transform-n | --program-transform- \
378 | --program-transform | --program-transfor \
379 | --program-transfo | --program-transf \
380 | --program-trans | --program-tran \
381 | --progr-tra | --program-tr | --program-t)
382 ac_prev=program_transform_name ;;
383 -program-transform-name=* | --program-transform-name=* \
384 | --program-transform-nam=* | --program-transform-na=* \
385 | --program-transform-n=* | --program-transform-=* \
386 | --program-transform=* | --program-transfor=* \
387 | --program-transfo=* | --program-transf=* \
388 | --program-trans=* | --program-tran=* \
389 | --progr-tra=* | --program-tr=* | --program-t=*)
390 program_transform_name="$ac_optarg" ;;
392 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
393 | -silent | --silent | --silen | --sile | --sil)
394 silent=yes ;;
396 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
397 ac_prev=sbindir ;;
398 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
399 | --sbi=* | --sb=*)
400 sbindir="$ac_optarg" ;;
402 -sharedstatedir | --sharedstatedir | --sharedstatedi \
403 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
404 | --sharedst | --shareds | --shared | --share | --shar \
405 | --sha | --sh)
406 ac_prev=sharedstatedir ;;
407 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
408 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
409 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
410 | --sha=* | --sh=*)
411 sharedstatedir="$ac_optarg" ;;
413 -site | --site | --sit)
414 ac_prev=site ;;
415 -site=* | --site=* | --sit=*)
416 site="$ac_optarg" ;;
418 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
419 ac_prev=srcdir ;;
420 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
421 srcdir="$ac_optarg" ;;
423 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
424 | --syscon | --sysco | --sysc | --sys | --sy)
425 ac_prev=sysconfdir ;;
426 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
427 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
428 sysconfdir="$ac_optarg" ;;
430 -target | --target | --targe | --targ | --tar | --ta | --t)
431 ac_prev=target ;;
432 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
433 target="$ac_optarg" ;;
435 -v | -verbose | --verbose | --verbos | --verbo | --verb)
436 verbose=yes ;;
438 -version | --version | --versio | --versi | --vers)
439 echo "configure generated by autoconf version 2.13"
440 exit 0 ;;
442 -with-* | --with-*)
443 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
444 # Reject names that are not valid shell variable names.
445 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
446 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
449 case "$ac_option" in
450 *=*) ;;
451 *) ac_optarg=yes ;;
452 esac
453 eval "with_${ac_package}='$ac_optarg'" ;;
455 -without-* | --without-*)
456 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
457 # Reject names that are not valid shell variable names.
458 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
459 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
461 ac_package=`echo $ac_package| sed 's/-/_/g'`
462 eval "with_${ac_package}=no" ;;
464 --x)
465 # Obsolete; use --with-x.
466 with_x=yes ;;
468 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469 | --x-incl | --x-inc | --x-in | --x-i)
470 ac_prev=x_includes ;;
471 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473 x_includes="$ac_optarg" ;;
475 -x-libraries | --x-libraries | --x-librarie | --x-librari \
476 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477 ac_prev=x_libraries ;;
478 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480 x_libraries="$ac_optarg" ;;
482 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
486 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
487 echo "configure: warning: $ac_option: invalid host type" 1>&2
489 if test "x$nonopt" != xNONE; then
490 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
492 nonopt="$ac_option"
495 esac
496 done
498 if test -n "$ac_prev"; then
499 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
502 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
504 # File descriptor usage:
505 # 0 standard input
506 # 1 file creation
507 # 2 errors and warnings
508 # 3 some systems may open it to /dev/tty
509 # 4 used on the Kubota Titan
510 # 6 checking for... messages and results
511 # 5 compiler messages saved in config.log
512 if test "$silent" = yes; then
513 exec 6>/dev/null
514 else
515 exec 6>&1
517 exec 5>./config.log
519 echo "\
520 This file contains any messages produced by compilers while
521 running configure, to aid debugging if configure makes a mistake.
522 " 1>&5
524 # Strip out --no-create and --no-recursion so they do not pile up.
525 # Also quote any args containing shell metacharacters.
526 ac_configure_args=
527 for ac_arg
529 case "$ac_arg" in
530 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
531 | --no-cr | --no-c) ;;
532 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
533 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
534 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
535 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
536 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
537 esac
538 done
540 # NLS nuisances.
541 # Only set these to C if already set. These must not be set unconditionally
542 # because not all systems understand e.g. LANG=C (notably SCO).
543 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
544 # Non-C LC_CTYPE values break the ctype check.
545 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
546 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
547 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
548 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
550 # confdefs.h avoids OS command line length limits that DEFS can exceed.
551 rm -rf conftest* confdefs.h
552 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
553 echo > confdefs.h
555 # A filename unique to this package, relative to the directory that
556 # configure is in, which we can look for to find out if srcdir is correct.
557 ac_unique_file=config/libc_r.h
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561 ac_srcdir_defaulted=yes
562 # Try the directory containing this script, then its parent.
563 ac_prog=$0
564 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
565 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566 srcdir=$ac_confdir
567 if test ! -r $srcdir/$ac_unique_file; then
568 srcdir=..
570 else
571 ac_srcdir_defaulted=no
573 if test ! -r $srcdir/$ac_unique_file; then
574 if test "$ac_srcdir_defaulted" = yes; then
575 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
576 else
577 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
580 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
582 # Prefer explicitly selected file to automatically selected ones.
583 if test -z "$CONFIG_SITE"; then
584 if test "x$prefix" != xNONE; then
585 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
586 else
587 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
590 for ac_site_file in $CONFIG_SITE; do
591 if test -r "$ac_site_file"; then
592 echo "loading site script $ac_site_file"
593 . "$ac_site_file"
595 done
597 if test -r "$cache_file"; then
598 echo "loading cache $cache_file"
599 . $cache_file
600 else
601 echo "creating cache $cache_file"
602 > $cache_file
605 ac_ext=c
606 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
607 ac_cpp='$CPP $CPPFLAGS'
608 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
609 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
610 cross_compiling=$ac_cv_prog_cc_cross
612 ac_exeext=
613 ac_objext=o
614 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
615 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
616 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
617 ac_n= ac_c='
618 ' ac_t=' '
619 else
620 ac_n=-n ac_c= ac_t=
622 else
623 ac_n= ac_c='\c' ac_t=
628 ac_aux_dir=
629 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
630 if test -f $ac_dir/install-sh; then
631 ac_aux_dir=$ac_dir
632 ac_install_sh="$ac_aux_dir/install-sh -c"
633 break
634 elif test -f $ac_dir/install.sh; then
635 ac_aux_dir=$ac_dir
636 ac_install_sh="$ac_aux_dir/install.sh -c"
637 break
639 done
640 if test -z "$ac_aux_dir"; then
641 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
643 ac_config_guess=$ac_aux_dir/config.guess
644 ac_config_sub=$ac_aux_dir/config.sub
645 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
648 # Do some error checking and defaulting for the host and target type.
649 # The inputs are:
650 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
652 # The rules are:
653 # 1. You are not allowed to specify --host, --target, and nonopt at the
654 # same time.
655 # 2. Host defaults to nonopt.
656 # 3. If nonopt is not specified, then host defaults to the current host,
657 # as determined by config.guess.
658 # 4. Target and build default to nonopt.
659 # 5. If nonopt is not specified, then target and build default to host.
661 # The aliases save the names the user supplied, while $host etc.
662 # will get canonicalized.
663 case $host---$target---$nonopt in
664 NONE---*---* | *---NONE---* | *---*---NONE) ;;
665 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
666 esac
669 # Make sure we can run config.sub.
670 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
671 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
674 echo $ac_n "checking host system type""... $ac_c" 1>&6
675 echo "configure:676: checking host system type" >&5
677 host_alias=$host
678 case "$host_alias" in
679 NONE)
680 case $nonopt in
681 NONE)
682 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
683 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684 fi ;;
685 *) host_alias=$nonopt ;;
686 esac ;;
687 esac
689 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
690 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 echo "$ac_t""$host" 1>&6
695 echo $ac_n "checking target system type""... $ac_c" 1>&6
696 echo "configure:697: checking target system type" >&5
698 target_alias=$target
699 case "$target_alias" in
700 NONE)
701 case $nonopt in
702 NONE) target_alias=$host_alias ;;
703 *) target_alias=$nonopt ;;
704 esac ;;
705 esac
707 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
708 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 echo "$ac_t""$target" 1>&6
713 echo $ac_n "checking build system type""... $ac_c" 1>&6
714 echo "configure:715: checking build system type" >&5
716 build_alias=$build
717 case "$build_alias" in
718 NONE)
719 case $nonopt in
720 NONE) build_alias=$host_alias ;;
721 *) build_alias=$nonopt ;;
722 esac ;;
723 esac
725 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
726 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729 echo "$ac_t""$build" 1>&6
731 test "$host_alias" != "$target_alias" &&
732 test "$program_prefix$program_suffix$program_transform_name" = \
733 NONENONEs,x,x, &&
734 program_prefix=${target_alias}-
737 MOD_MAJOR_VERSION=4
738 MOD_MINOR_VERSION=10
739 MOD_PATCH_VERSION=3
740 NSPR_MODNAME=nspr20
741 _HAVE_PTHREADS=
742 USE_PTHREADS=
743 USE_USER_PTHREADS=
744 USE_NSPR_THREADS=
745 USE_N32=
746 USE_64=
747 USE_CPLUS=
748 USE_IPV6=
749 USE_MDUPDATE=
750 _MACOSX_DEPLOYMENT_TARGET=
751 _OPTIMIZE_FLAGS=-O
752 _DEBUG_FLAGS=-g
753 MOZ_DEBUG=1
754 MOZ_OPTIMIZE=
755 OBJDIR='$(OBJDIR_NAME)'
756 OBJDIR_NAME=.
757 OBJDIR_SUFFIX=OBJ
758 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
759 NOSUCHFILE=/no-such-file
760 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
761 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
762 CYGWIN_WRAPPER=
763 MACOS_SDK_DIR=
764 NEXT_ROOT=
766 MOZ_OS2_HIGH_MEMORY=1
767 PROFILE_GEN_CFLAGS=
768 PROFILE_GEN_LDFLAGS=
769 PROFILE_USE_CFLAGS=
770 PROFILE_USE_LDFLAGS=
772 RESOLVE_LINK_SYMBOLS=
774 CFLAGS="${CFLAGS=}"
775 CXXFLAGS="${CXXFLAGS=}"
776 LDFLAGS="${LDFLAGS=}"
777 DLLFLAGS="${DLLFLAGS=}"
778 HOST_CFLAGS="${HOST_CFLAGS=}"
779 HOST_LDFLAGS="${HOST_LDFLAGS=}"
781 case "$target" in
782 *-cygwin*|*-mingw*)
783 # Check to see if we are really running in a msvc environemnt
784 _WIN32_MSVC=
785 for ac_prog in cl
787 # Extract the first word of "$ac_prog", so it can be a program name with args.
788 set dummy $ac_prog; ac_word=$2
789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
790 echo "configure:791: checking for $ac_word" >&5
791 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
792 echo $ac_n "(cached) $ac_c" 1>&6
793 else
794 if test -n "$CC"; then
795 ac_cv_prog_CC="$CC" # Let the user override the test.
796 else
797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
798 ac_dummy="$PATH"
799 for ac_dir in $ac_dummy; do
800 test -z "$ac_dir" && ac_dir=.
801 if test -f $ac_dir/$ac_word; then
802 ac_cv_prog_CC="$ac_prog"
803 break
805 done
806 IFS="$ac_save_ifs"
809 CC="$ac_cv_prog_CC"
810 if test -n "$CC"; then
811 echo "$ac_t""$CC" 1>&6
812 else
813 echo "$ac_t""no" 1>&6
816 test -n "$CC" && break
817 done
819 if test "$CC" = "cl"; then
820 echo 'main() { return 0; }' > dummy.c
821 ${CC} -o dummy dummy.c >/dev/null 2>&1
822 if test $? = 0; then
823 _WIN32_MSVC=1
824 CXX=$CC
825 else
826 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
828 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
831 *-msvc*)
832 _WIN32_MSVC=1
834 *-mks*)
835 _WIN32_MSVC=1
837 esac
839 if test -n "$_WIN32_MSVC"; then
840 SKIP_PATH_CHECKS=1
841 SKIP_COMPILER_CHECKS=1
842 SKIP_LIBRARY_CHECKS=1
846 # Check whether --with-android-ndk or --without-android-ndk was given.
847 if test "${with_android_ndk+set}" = set; then
848 withval="$with_android_ndk"
849 android_ndk=$withval
853 # Check whether --with-android-toolchain or --without-android-toolchain was given.
854 if test "${with_android_toolchain+set}" = set; then
855 withval="$with_android_toolchain"
856 android_toolchain=$withval
860 case "$target_cpu" in
861 arm)
862 android_version=5
864 i?86|mipsel)
865 android_version=9
867 esac
869 # Check whether --with-android-version or --without-android-version was given.
870 if test "${with_android_version+set}" = set; then
871 withval="$with_android_version"
872 android_version=$withval
876 # Check whether --with-android-platform or --without-android-platform was given.
877 if test "${with_android_platform+set}" = set; then
878 withval="$with_android_platform"
879 android_platform=$withval
883 case "$target" in
884 arm-linux*-android*|*-linuxandroid*)
885 android_tool_prefix="arm-linux-androideabi"
887 i?86-*android*)
888 android_tool_prefix="i686-linux-android"
890 mipsel-*android*)
891 android_tool_prefix="mipsel-linux-android"
894 android_tool_prefix="$target_os"
896 esac
899 # Check whether --with-gonk or --without-gonk was given.
900 if test "${with_gonk+set}" = set; then
901 withval="$with_gonk"
902 gonkdir=$withval
906 if test -n "$gonkdir" ; then
908 if test -z "$HOST_CPPFLAGS" ; then
909 HOST_CPPFLAGS=" "
911 if test -z "$HOST_CFLAGS" ; then
912 HOST_CFLAGS=" "
914 if test -z "$HOST_CXXFLAGS" ; then
915 HOST_CXXFLAGS=" "
917 if test -z "$HOST_LDFLAGS" ; then
918 HOST_LDFLAGS=" "
921 cat >> confdefs.h <<\EOF
922 #define ANDROID 1
925 else
926 case "$target" in
927 *-android*|*-linuxandroid*)
928 if test -z "$android_ndk" ; then
929 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
932 if test -z "$android_toolchain" ; then
933 echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
934 echo "configure:935: checking for android toolchain directory" >&5
936 kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
938 case "$target_cpu" in
939 arm)
940 target_name=arm-linux-androideabi-4.4.3
942 i?86)
943 target_name=x86-4.4.3
945 mipsel)
946 target_name=mipsel-linux-android-4.4.3
948 esac
949 android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
951 if test -d "$android_toolchain" ; then
952 echo "$ac_t""$android_toolchain" 1>&6
953 else
954 { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
958 if test -z "$android_platform" ; then
959 echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
960 echo "configure:961: checking for android platform directory" >&5
962 case "$target_cpu" in
963 arm)
964 target_name=arm
966 i?86)
967 target_name=x86
969 mipsel)
970 target_name=mips
972 esac
974 android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
976 if test -d "$android_platform" ; then
977 echo "$ac_t""$android_platform" 1>&6
978 else
979 { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
983 case "$target_cpu" in
984 i?86)
985 if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
986 android_tool_prefix="i686-android-linux"
989 esac
991 AS="$android_toolchain"/bin/"$android_tool_prefix"-as
992 CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
993 CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
994 CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
995 LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
996 AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
997 RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
998 STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
1000 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
1001 CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
1002 CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
1003 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
1005 if test -z "$HOST_CPPFLAGS" ; then
1006 HOST_CPPFLAGS=" "
1008 if test -z "$HOST_CFLAGS" ; then
1009 HOST_CFLAGS=" "
1011 if test -z "$HOST_CXXFLAGS" ; then
1012 HOST_CXXFLAGS=" "
1014 if test -z "$HOST_LDFLAGS" ; then
1015 HOST_LDFLAGS=" "
1018 cat >> confdefs.h <<\EOF
1019 #define ANDROID 1
1023 esac
1026 dist_prefix='${MOD_DEPTH}/dist'
1027 dist_bindir='${dist_prefix}/bin'
1028 dist_includedir='${dist_prefix}/include/nspr'
1029 dist_libdir='${dist_prefix}/lib'
1030 if test "${includedir}" = '${prefix}/include'; then
1031 includedir='${prefix}/include/nspr'
1034 # Check whether --with-dist-prefix or --without-dist-prefix was given.
1035 if test "${with_dist_prefix+set}" = set; then
1036 withval="$with_dist_prefix"
1037 dist_prefix=$withval
1041 # Check whether --with-dist-bindir or --without-dist-bindir was given.
1042 if test "${with_dist_bindir+set}" = set; then
1043 withval="$with_dist_bindir"
1044 dist_bindir=$withval
1048 # Check whether --with-dist-includedir or --without-dist-includedir was given.
1049 if test "${with_dist_includedir+set}" = set; then
1050 withval="$with_dist_includedir"
1051 dist_includedir=$withval
1055 # Check whether --with-dist-libdir or --without-dist-libdir was given.
1056 if test "${with_dist_libdir+set}" = set; then
1057 withval="$with_dist_libdir"
1058 dist_libdir=$withval
1067 # Check whether --with-mozilla or --without-mozilla was given.
1068 if test "${with_mozilla+set}" = set; then
1069 withval="$with_mozilla"
1070 if test "$withval" = "yes"; then
1071 cat >> confdefs.h <<\EOF
1072 #define MOZILLA_CLIENT 1
1075 MOZILLA_CLIENT=1
1076 else
1077 MOZILLA_CLIENT=
1079 else
1080 if test -n "$MOZILLA_CLIENT"; then
1081 cat >> confdefs.h <<\EOF
1082 #define MOZILLA_CLIENT 1
1089 # Check whether --enable-optimize or --disable-optimize was given.
1090 if test "${enable_optimize+set}" = set; then
1091 enableval="$enable_optimize"
1092 if test "$enableval" != "no"; then
1093 MOZ_OPTIMIZE=1
1094 if test -n "$enableval" -a "$enableval" != "yes"; then
1095 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1096 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
1098 else
1099 MOZ_OPTIMIZE=
1104 # Check whether --enable-debug or --disable-debug was given.
1105 if test "${enable_debug+set}" = set; then
1106 enableval="$enable_debug"
1107 if test "$enableval" != "no"; then
1108 MOZ_DEBUG=1
1109 MOZ_DEBUG_SYMBOLS=1
1110 if test -n "$enableval" -a "$enableval" != "yes"; then
1111 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1112 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1114 else
1115 MOZ_DEBUG=
1117 else
1118 MOZ_DEBUG_SYMBOLS=1
1122 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
1123 if test "${enable_debug_symbols+set}" = set; then
1124 enableval="$enable_debug_symbols"
1125 if test "$enableval" != "no"; then
1126 MOZ_DEBUG_SYMBOLS=1
1127 if test -n "$enableval" -a "$enableval" != "yes"; then
1128 if test -z "$_SAVE_DEBUG_FLAGS"; then
1129 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1130 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1131 else
1132 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
1135 else
1136 MOZ_DEBUG_SYMBOLS=
1141 # Check whether --enable-win32-target or --disable-win32-target was given.
1142 if test "${enable_win32_target+set}" = set; then
1143 enableval="$enable_win32_target"
1144 OS_TARGET=`echo $enableval | tr a-z A-Z`
1148 # Check whether --enable-symbian-target or --disable-symbian-target was given.
1149 if test "${enable_symbian_target+set}" = set; then
1150 enableval="$enable_symbian_target"
1151 OS_TARGET=`echo $enableval | tr a-z A-Z`
1155 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
1156 if test "${enable_debug_rtl+set}" = set; then
1157 enableval="$enable_debug_rtl"
1158 if test "$enableval" = "yes"; then
1159 USE_DEBUG_RTL=1
1164 # Check whether --enable-n32 or --disable-n32 was given.
1165 if test "${enable_n32+set}" = set; then
1166 enableval="$enable_n32"
1167 if test "$enableval" = "yes"; then
1168 USE_N32=1
1169 else if test "$enableval" = "no"; then
1170 USE_N32=
1176 # Check whether --enable-64bit or --disable-64bit was given.
1177 if test "${enable_64bit+set}" = set; then
1178 enableval="$enable_64bit"
1179 if test "$enableval" = "yes"; then
1180 USE_64=1
1185 # Check whether --enable-mdupdate or --disable-mdupdate was given.
1186 if test "${enable_mdupdate+set}" = set; then
1187 enableval="$enable_mdupdate"
1188 if test "$enableval" = "yes"; then
1189 USE_MDUPDATE=1
1194 # Check whether --enable-cplus or --disable-cplus was given.
1195 if test "${enable_cplus+set}" = set; then
1196 enableval="$enable_cplus"
1197 if test "$enableval" = "yes"; then
1198 USE_CPLUS=1
1203 # Check whether --with-arm-kuser or --without-arm-kuser was given.
1204 if test "${with_arm_kuser+set}" = set; then
1205 withval="$with_arm_kuser"
1206 if test "$withval" = "yes"; then
1207 cat >> confdefs.h <<\EOF
1208 #define _PR_ARM_KUSER 1
1215 # Check whether --with-macos-sdk or --without-macos-sdk was given.
1216 if test "${with_macos_sdk+set}" = set; then
1217 withval="$with_macos_sdk"
1218 MACOS_SDK_DIR=$withval
1222 # Check whether --enable-macos-target or --disable-macos-target was given.
1223 if test "${enable_macos_target+set}" = set; then
1224 enableval="$enable_macos_target"
1225 _MACOSX_DEPLOYMENT_TARGET=$enableval
1229 case "$target" in
1231 *-aix*)
1232 case "${target_os}" in
1233 aix3.2*)
1234 USE_NSPR_THREADS=1
1237 USE_PTHREADS=1
1239 esac
1242 esac
1244 if test -z "$CC"; then
1245 case "$target" in
1247 *-aix*)
1248 if test -z "$USE_NSPR_THREADS"; then
1249 CC=xlc_r
1250 else
1251 CC=xlc
1255 *-hpux*)
1256 CC=cc
1259 *-irix*)
1260 CC=cc
1263 *-osf*)
1264 CC=cc
1267 *-solaris*)
1268 CC=cc
1271 esac
1274 if test -z "$CXX"; then
1275 case "$target" in
1277 *-aix*)
1278 if test -z "$USE_NSPR_THREADS"; then
1279 CXX=xlC_r
1280 else
1281 CXX=xlC
1285 *-hpux*)
1286 case "${target_os}" in
1287 hpux10.30)
1288 CXX=aCC
1290 hpux11.*)
1291 CXX=aCC
1294 CXX=CC
1296 esac
1299 *-irix*)
1300 CXX=CC
1303 *-osf*)
1304 CXX=cxx
1307 *-solaris*)
1308 CXX=CC
1311 esac
1314 if test -z "$SKIP_PATH_CHECKS"; then
1315 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1316 set dummy $WHOAMI whoami; ac_word=$2
1317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1318 echo "configure:1319: checking for $ac_word" >&5
1319 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1320 echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322 case "$WHOAMI" in
1324 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1326 ?:/*)
1327 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1331 ac_dummy="$PATH"
1332 for ac_dir in $ac_dummy; do
1333 test -z "$ac_dir" && ac_dir=.
1334 if test -f $ac_dir/$ac_word; then
1335 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1336 break
1338 done
1339 IFS="$ac_save_ifs"
1340 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1342 esac
1344 WHOAMI="$ac_cv_path_WHOAMI"
1345 if test -n "$WHOAMI"; then
1346 echo "$ac_t""$WHOAMI" 1>&6
1347 else
1348 echo "$ac_t""no" 1>&6
1353 if test -n "$MOZ_DEBUG"; then
1354 cat >> confdefs.h <<\EOF
1355 #define DEBUG 1
1358 DEFINES="$DEFINES -UNDEBUG"
1360 case "${target_os}" in
1361 beos*)
1362 DEFINES="$DEFINES -DDEBUG_${USER}"
1364 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1365 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1368 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1370 esac
1371 else
1372 cat >> confdefs.h <<\EOF
1373 #define NDEBUG 1
1376 DEFINES="$DEFINES -UDEBUG"
1379 if test -z "$SKIP_COMPILER_CHECKS"; then
1381 if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
1382 echo "cross compiling from $host to $target"
1383 cross_compiling=yes
1385 _SAVE_CC="$CC"
1386 _SAVE_CFLAGS="$CFLAGS"
1387 _SAVE_LDFLAGS="$LDFLAGS"
1389 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1390 echo "configure:1391: checking for $host compiler" >&5
1391 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1393 # Extract the first word of "$ac_prog", so it can be a program name with args.
1394 set dummy $ac_prog; ac_word=$2
1395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1396 echo "configure:1397: checking for $ac_word" >&5
1397 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1398 echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400 if test -n "$HOST_CC"; then
1401 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1402 else
1403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406 test -z "$ac_dir" && ac_dir=.
1407 if test -f $ac_dir/$ac_word; then
1408 ac_cv_prog_HOST_CC="$ac_prog"
1409 break
1411 done
1412 IFS="$ac_save_ifs"
1415 HOST_CC="$ac_cv_prog_HOST_CC"
1416 if test -n "$HOST_CC"; then
1417 echo "$ac_t""$HOST_CC" 1>&6
1418 else
1419 echo "$ac_t""no" 1>&6
1422 test -n "$HOST_CC" && break
1423 done
1424 test -n "$HOST_CC" || HOST_CC=""""
1426 if test -z "$HOST_CC"; then
1427 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1429 echo "$ac_t""$HOST_CC" 1>&6
1430 if test -z "$HOST_CFLAGS"; then
1431 HOST_CFLAGS="$CFLAGS"
1433 if test -z "$HOST_LDFLAGS"; then
1434 HOST_LDFLAGS="$LDFLAGS"
1437 CC="$HOST_CC"
1438 CFLAGS="$HOST_CFLAGS"
1439 LDFLAGS="$HOST_LDFLAGS"
1441 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1442 echo "configure:1443: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1443 cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1447 int main() {
1448 return 0;
1449 ; return 0; }
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452 rm -rf conftest*
1453 echo "$ac_t""yes" 1>&6
1454 else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1460 rm -f conftest*
1462 CC=$_SAVE_CC
1463 CFLAGS=$_SAVE_CFLAGS
1464 LDFLAGS=$_SAVE_LDFLAGS
1466 case "$build:$target" in
1467 powerpc-apple-darwin8*:i?86-apple-darwin*)
1468 _SAVE_CFLAGS=$CFLAGS
1469 _SAVE_CXXFLAGS=$CXXFLAGS
1470 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1471 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1473 *:arm*-apple-darwin*)
1474 _SAVE_CFLAGS=$CFLAGS
1475 _SAVE_CXXFLAGS=$CXXFLAGS
1476 CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
1477 CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
1479 esac
1481 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1483 # Extract the first word of "$ac_prog", so it can be a program name with args.
1484 set dummy $ac_prog; ac_word=$2
1485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1486 echo "configure:1487: checking for $ac_word" >&5
1487 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1488 echo $ac_n "(cached) $ac_c" 1>&6
1489 else
1490 if test -n "$CC"; then
1491 ac_cv_prog_CC="$CC" # Let the user override the test.
1492 else
1493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1494 ac_dummy="$PATH"
1495 for ac_dir in $ac_dummy; do
1496 test -z "$ac_dir" && ac_dir=.
1497 if test -f $ac_dir/$ac_word; then
1498 ac_cv_prog_CC="$ac_prog"
1499 break
1501 done
1502 IFS="$ac_save_ifs"
1505 CC="$ac_cv_prog_CC"
1506 if test -n "$CC"; then
1507 echo "$ac_t""$CC" 1>&6
1508 else
1509 echo "$ac_t""no" 1>&6
1512 test -n "$CC" && break
1513 done
1514 test -n "$CC" || CC="echo"
1516 unset ac_cv_prog_CC
1517 # Extract the first word of "gcc", so it can be a program name with args.
1518 set dummy gcc; ac_word=$2
1519 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1520 echo "configure:1521: checking for $ac_word" >&5
1521 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1522 echo $ac_n "(cached) $ac_c" 1>&6
1523 else
1524 if test -n "$CC"; then
1525 ac_cv_prog_CC="$CC" # Let the user override the test.
1526 else
1527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530 test -z "$ac_dir" && ac_dir=.
1531 if test -f $ac_dir/$ac_word; then
1532 ac_cv_prog_CC="gcc"
1533 break
1535 done
1536 IFS="$ac_save_ifs"
1539 CC="$ac_cv_prog_CC"
1540 if test -n "$CC"; then
1541 echo "$ac_t""$CC" 1>&6
1542 else
1543 echo "$ac_t""no" 1>&6
1546 if test -z "$CC"; then
1547 # Extract the first word of "cc", so it can be a program name with args.
1548 set dummy cc; ac_word=$2
1549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1550 echo "configure:1551: checking for $ac_word" >&5
1551 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553 else
1554 if test -n "$CC"; then
1555 ac_cv_prog_CC="$CC" # Let the user override the test.
1556 else
1557 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1558 ac_prog_rejected=no
1559 ac_dummy="$PATH"
1560 for ac_dir in $ac_dummy; do
1561 test -z "$ac_dir" && ac_dir=.
1562 if test -f $ac_dir/$ac_word; then
1563 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1564 ac_prog_rejected=yes
1565 continue
1567 ac_cv_prog_CC="cc"
1568 break
1570 done
1571 IFS="$ac_save_ifs"
1572 if test $ac_prog_rejected = yes; then
1573 # We found a bogon in the path, so make sure we never use it.
1574 set dummy $ac_cv_prog_CC
1575 shift
1576 if test $# -gt 0; then
1577 # We chose a different compiler from the bogus one.
1578 # However, it has the same basename, so the bogon will be chosen
1579 # first if we set CC to just the basename; use the full file name.
1580 shift
1581 set dummy "$ac_dir/$ac_word" "$@"
1582 shift
1583 ac_cv_prog_CC="$@"
1588 CC="$ac_cv_prog_CC"
1589 if test -n "$CC"; then
1590 echo "$ac_t""$CC" 1>&6
1591 else
1592 echo "$ac_t""no" 1>&6
1595 if test -z "$CC"; then
1596 case "`uname -s`" in
1597 *win32* | *WIN32*)
1598 # Extract the first word of "cl", so it can be a program name with args.
1599 set dummy cl; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1603 echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605 if test -n "$CC"; then
1606 ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1609 ac_dummy="$PATH"
1610 for ac_dir in $ac_dummy; do
1611 test -z "$ac_dir" && ac_dir=.
1612 if test -f $ac_dir/$ac_word; then
1613 ac_cv_prog_CC="cl"
1614 break
1616 done
1617 IFS="$ac_save_ifs"
1620 CC="$ac_cv_prog_CC"
1621 if test -n "$CC"; then
1622 echo "$ac_t""$CC" 1>&6
1623 else
1624 echo "$ac_t""no" 1>&6
1627 esac
1629 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1632 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1633 echo "configure:1634: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1635 ac_ext=c
1636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1637 ac_cpp='$CPP $CPPFLAGS'
1638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1639 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1640 cross_compiling=$ac_cv_prog_cc_cross
1642 cat > conftest.$ac_ext << EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1647 main(){return(0);}
1649 if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1650 ac_cv_prog_cc_works=yes
1651 # If we can't run a trivial program, we are probably using a cross compiler.
1652 if (./conftest; exit) 2>/dev/null; then
1653 ac_cv_prog_cc_cross=no
1654 else
1655 ac_cv_prog_cc_cross=yes
1657 else
1658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1660 ac_cv_prog_cc_works=no
1662 rm -fr conftest*
1663 ac_ext=c
1664 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1665 ac_cpp='$CPP $CPPFLAGS'
1666 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1667 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1668 cross_compiling=$ac_cv_prog_cc_cross
1670 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1671 if test $ac_cv_prog_cc_works = no; then
1672 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1674 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1675 echo "configure:1676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1676 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1677 cross_compiling=$ac_cv_prog_cc_cross
1679 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1680 echo "configure:1681: checking whether we are using GNU C" >&5
1681 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1682 echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684 cat > conftest.c <<EOF
1685 #ifdef __GNUC__
1686 yes;
1687 #endif
1689 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1690 ac_cv_prog_gcc=yes
1691 else
1692 ac_cv_prog_gcc=no
1696 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1698 if test $ac_cv_prog_gcc = yes; then
1699 GCC=yes
1700 else
1701 GCC=
1704 ac_test_CFLAGS="${CFLAGS+set}"
1705 ac_save_CFLAGS="$CFLAGS"
1706 CFLAGS=
1707 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1708 echo "configure:1709: checking whether ${CC-cc} accepts -g" >&5
1709 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 echo 'void f(){}' > conftest.c
1713 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1714 ac_cv_prog_cc_g=yes
1715 else
1716 ac_cv_prog_cc_g=no
1718 rm -f conftest*
1722 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS="$ac_save_CFLAGS"
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1727 CFLAGS="-g -O2"
1728 else
1729 CFLAGS="-g"
1731 else
1732 if test "$GCC" = yes; then
1733 CFLAGS="-O2"
1734 else
1735 CFLAGS=
1739 if test -n "$USE_CPLUS"; then
1740 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1742 # Extract the first word of "$ac_prog", so it can be a program name with args.
1743 set dummy $ac_prog; ac_word=$2
1744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1745 echo "configure:1746: checking for $ac_word" >&5
1746 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749 if test -n "$CXX"; then
1750 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1751 else
1752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1753 ac_dummy="$PATH"
1754 for ac_dir in $ac_dummy; do
1755 test -z "$ac_dir" && ac_dir=.
1756 if test -f $ac_dir/$ac_word; then
1757 ac_cv_prog_CXX="$ac_prog"
1758 break
1760 done
1761 IFS="$ac_save_ifs"
1764 CXX="$ac_cv_prog_CXX"
1765 if test -n "$CXX"; then
1766 echo "$ac_t""$CXX" 1>&6
1767 else
1768 echo "$ac_t""no" 1>&6
1771 test -n "$CXX" && break
1772 done
1773 test -n "$CXX" || CXX="echo"
1775 unset ac_cv_prog_CXX
1776 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1778 # Extract the first word of "$ac_prog", so it can be a program name with args.
1779 set dummy $ac_prog; ac_word=$2
1780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1781 echo "configure:1782: checking for $ac_word" >&5
1782 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785 if test -n "$CXX"; then
1786 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1787 else
1788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791 test -z "$ac_dir" && ac_dir=.
1792 if test -f $ac_dir/$ac_word; then
1793 ac_cv_prog_CXX="$ac_prog"
1794 break
1796 done
1797 IFS="$ac_save_ifs"
1800 CXX="$ac_cv_prog_CXX"
1801 if test -n "$CXX"; then
1802 echo "$ac_t""$CXX" 1>&6
1803 else
1804 echo "$ac_t""no" 1>&6
1807 test -n "$CXX" && break
1808 done
1809 test -n "$CXX" || CXX="gcc"
1812 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1813 echo "configure:1814: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1815 ac_ext=C
1816 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1817 ac_cpp='$CXXCPP $CPPFLAGS'
1818 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1819 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1820 cross_compiling=$ac_cv_prog_cxx_cross
1822 cat > conftest.$ac_ext << EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1827 int main(){return(0);}
1829 if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1830 ac_cv_prog_cxx_works=yes
1831 # If we can't run a trivial program, we are probably using a cross compiler.
1832 if (./conftest; exit) 2>/dev/null; then
1833 ac_cv_prog_cxx_cross=no
1834 else
1835 ac_cv_prog_cxx_cross=yes
1837 else
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1840 ac_cv_prog_cxx_works=no
1842 rm -fr conftest*
1843 ac_ext=c
1844 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1845 ac_cpp='$CPP $CPPFLAGS'
1846 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1847 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1848 cross_compiling=$ac_cv_prog_cc_cross
1850 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1851 if test $ac_cv_prog_cxx_works = no; then
1852 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1854 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1855 echo "configure:1856: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1856 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1857 cross_compiling=$ac_cv_prog_cxx_cross
1859 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1860 echo "configure:1861: checking whether we are using GNU C++" >&5
1861 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864 cat > conftest.C <<EOF
1865 #ifdef __GNUC__
1866 yes;
1867 #endif
1869 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1870 ac_cv_prog_gxx=yes
1871 else
1872 ac_cv_prog_gxx=no
1876 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1878 if test $ac_cv_prog_gxx = yes; then
1879 GXX=yes
1880 else
1881 GXX=
1884 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1885 ac_save_CXXFLAGS="$CXXFLAGS"
1886 CXXFLAGS=
1887 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1888 echo "configure:1889: checking whether ${CXX-g++} accepts -g" >&5
1889 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892 echo 'void f(){}' > conftest.cc
1893 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1894 ac_cv_prog_cxx_g=yes
1895 else
1896 ac_cv_prog_cxx_g=no
1898 rm -f conftest*
1902 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1903 if test "$ac_test_CXXFLAGS" = set; then
1904 CXXFLAGS="$ac_save_CXXFLAGS"
1905 elif test $ac_cv_prog_cxx_g = yes; then
1906 if test "$GXX" = yes; then
1907 CXXFLAGS="-g -O2"
1908 else
1909 CXXFLAGS="-g"
1911 else
1912 if test "$GXX" = yes; then
1913 CXXFLAGS="-O2"
1914 else
1915 CXXFLAGS=
1921 case "$build:$target" in
1922 powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
1923 CFLAGS=$_SAVE_CFLAGS
1924 CXXFLAGS=$_SAVE_CXXFLAGS
1926 esac
1928 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1930 # Extract the first word of "$ac_prog", so it can be a program name with args.
1931 set dummy $ac_prog; ac_word=$2
1932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1933 echo "configure:1934: checking for $ac_word" >&5
1934 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937 if test -n "$RANLIB"; then
1938 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1939 else
1940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1941 ac_dummy="$PATH"
1942 for ac_dir in $ac_dummy; do
1943 test -z "$ac_dir" && ac_dir=.
1944 if test -f $ac_dir/$ac_word; then
1945 ac_cv_prog_RANLIB="$ac_prog"
1946 break
1948 done
1949 IFS="$ac_save_ifs"
1952 RANLIB="$ac_cv_prog_RANLIB"
1953 if test -n "$RANLIB"; then
1954 echo "$ac_t""$RANLIB" 1>&6
1955 else
1956 echo "$ac_t""no" 1>&6
1959 test -n "$RANLIB" && break
1960 done
1961 test -n "$RANLIB" || RANLIB="echo"
1963 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1965 # Extract the first word of "$ac_prog", so it can be a program name with args.
1966 set dummy $ac_prog; ac_word=$2
1967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1968 echo "configure:1969: checking for $ac_word" >&5
1969 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1970 echo $ac_n "(cached) $ac_c" 1>&6
1971 else
1972 if test -n "$AR"; then
1973 ac_cv_prog_AR="$AR" # Let the user override the test.
1974 else
1975 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1976 ac_dummy="$PATH"
1977 for ac_dir in $ac_dummy; do
1978 test -z "$ac_dir" && ac_dir=.
1979 if test -f $ac_dir/$ac_word; then
1980 ac_cv_prog_AR="$ac_prog"
1981 break
1983 done
1984 IFS="$ac_save_ifs"
1987 AR="$ac_cv_prog_AR"
1988 if test -n "$AR"; then
1989 echo "$ac_t""$AR" 1>&6
1990 else
1991 echo "$ac_t""no" 1>&6
1994 test -n "$AR" && break
1995 done
1996 test -n "$AR" || AR="echo"
1998 for ac_prog in $AS "${target_alias}-as" "${target}-as"
2000 # Extract the first word of "$ac_prog", so it can be a program name with args.
2001 set dummy $ac_prog; ac_word=$2
2002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_word" >&5
2004 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007 if test -n "$AS"; then
2008 ac_cv_prog_AS="$AS" # Let the user override the test.
2009 else
2010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2011 ac_dummy="$PATH"
2012 for ac_dir in $ac_dummy; do
2013 test -z "$ac_dir" && ac_dir=.
2014 if test -f $ac_dir/$ac_word; then
2015 ac_cv_prog_AS="$ac_prog"
2016 break
2018 done
2019 IFS="$ac_save_ifs"
2022 AS="$ac_cv_prog_AS"
2023 if test -n "$AS"; then
2024 echo "$ac_t""$AS" 1>&6
2025 else
2026 echo "$ac_t""no" 1>&6
2029 test -n "$AS" && break
2030 done
2031 test -n "$AS" || AS="echo"
2033 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
2035 # Extract the first word of "$ac_prog", so it can be a program name with args.
2036 set dummy $ac_prog; ac_word=$2
2037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2038 echo "configure:2039: checking for $ac_word" >&5
2039 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042 if test -n "$LD"; then
2043 ac_cv_prog_LD="$LD" # Let the user override the test.
2044 else
2045 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2046 ac_dummy="$PATH"
2047 for ac_dir in $ac_dummy; do
2048 test -z "$ac_dir" && ac_dir=.
2049 if test -f $ac_dir/$ac_word; then
2050 ac_cv_prog_LD="$ac_prog"
2051 break
2053 done
2054 IFS="$ac_save_ifs"
2057 LD="$ac_cv_prog_LD"
2058 if test -n "$LD"; then
2059 echo "$ac_t""$LD" 1>&6
2060 else
2061 echo "$ac_t""no" 1>&6
2064 test -n "$LD" && break
2065 done
2066 test -n "$LD" || LD="echo"
2068 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
2070 # Extract the first word of "$ac_prog", so it can be a program name with args.
2071 set dummy $ac_prog; ac_word=$2
2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2073 echo "configure:2074: checking for $ac_word" >&5
2074 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2076 else
2077 if test -n "$STRIP"; then
2078 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2079 else
2080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2081 ac_dummy="$PATH"
2082 for ac_dir in $ac_dummy; do
2083 test -z "$ac_dir" && ac_dir=.
2084 if test -f $ac_dir/$ac_word; then
2085 ac_cv_prog_STRIP="$ac_prog"
2086 break
2088 done
2089 IFS="$ac_save_ifs"
2092 STRIP="$ac_cv_prog_STRIP"
2093 if test -n "$STRIP"; then
2094 echo "$ac_t""$STRIP" 1>&6
2095 else
2096 echo "$ac_t""no" 1>&6
2099 test -n "$STRIP" && break
2100 done
2101 test -n "$STRIP" || STRIP="echo"
2103 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
2105 # Extract the first word of "$ac_prog", so it can be a program name with args.
2106 set dummy $ac_prog; ac_word=$2
2107 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2108 echo "configure:2109: checking for $ac_word" >&5
2109 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2110 echo $ac_n "(cached) $ac_c" 1>&6
2111 else
2112 if test -n "$WINDRES"; then
2113 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2114 else
2115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2116 ac_dummy="$PATH"
2117 for ac_dir in $ac_dummy; do
2118 test -z "$ac_dir" && ac_dir=.
2119 if test -f $ac_dir/$ac_word; then
2120 ac_cv_prog_WINDRES="$ac_prog"
2121 break
2123 done
2124 IFS="$ac_save_ifs"
2127 WINDRES="$ac_cv_prog_WINDRES"
2128 if test -n "$WINDRES"; then
2129 echo "$ac_t""$WINDRES" 1>&6
2130 else
2131 echo "$ac_t""no" 1>&6
2134 test -n "$WINDRES" && break
2135 done
2136 test -n "$WINDRES" || WINDRES="echo"
2139 else
2140 # Extract the first word of "gcc", so it can be a program name with args.
2141 set dummy gcc; ac_word=$2
2142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2143 echo "configure:2144: checking for $ac_word" >&5
2144 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2145 echo $ac_n "(cached) $ac_c" 1>&6
2146 else
2147 if test -n "$CC"; then
2148 ac_cv_prog_CC="$CC" # Let the user override the test.
2149 else
2150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2151 ac_dummy="$PATH"
2152 for ac_dir in $ac_dummy; do
2153 test -z "$ac_dir" && ac_dir=.
2154 if test -f $ac_dir/$ac_word; then
2155 ac_cv_prog_CC="gcc"
2156 break
2158 done
2159 IFS="$ac_save_ifs"
2162 CC="$ac_cv_prog_CC"
2163 if test -n "$CC"; then
2164 echo "$ac_t""$CC" 1>&6
2165 else
2166 echo "$ac_t""no" 1>&6
2169 if test -z "$CC"; then
2170 # Extract the first word of "cc", so it can be a program name with args.
2171 set dummy cc; ac_word=$2
2172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2173 echo "configure:2174: checking for $ac_word" >&5
2174 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177 if test -n "$CC"; then
2178 ac_cv_prog_CC="$CC" # Let the user override the test.
2179 else
2180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2181 ac_prog_rejected=no
2182 ac_dummy="$PATH"
2183 for ac_dir in $ac_dummy; do
2184 test -z "$ac_dir" && ac_dir=.
2185 if test -f $ac_dir/$ac_word; then
2186 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2187 ac_prog_rejected=yes
2188 continue
2190 ac_cv_prog_CC="cc"
2191 break
2193 done
2194 IFS="$ac_save_ifs"
2195 if test $ac_prog_rejected = yes; then
2196 # We found a bogon in the path, so make sure we never use it.
2197 set dummy $ac_cv_prog_CC
2198 shift
2199 if test $# -gt 0; then
2200 # We chose a different compiler from the bogus one.
2201 # However, it has the same basename, so the bogon will be chosen
2202 # first if we set CC to just the basename; use the full file name.
2203 shift
2204 set dummy "$ac_dir/$ac_word" "$@"
2205 shift
2206 ac_cv_prog_CC="$@"
2211 CC="$ac_cv_prog_CC"
2212 if test -n "$CC"; then
2213 echo "$ac_t""$CC" 1>&6
2214 else
2215 echo "$ac_t""no" 1>&6
2218 if test -z "$CC"; then
2219 case "`uname -s`" in
2220 *win32* | *WIN32*)
2221 # Extract the first word of "cl", so it can be a program name with args.
2222 set dummy cl; ac_word=$2
2223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2224 echo "configure:2225: checking for $ac_word" >&5
2225 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2226 echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228 if test -n "$CC"; then
2229 ac_cv_prog_CC="$CC" # Let the user override the test.
2230 else
2231 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2232 ac_dummy="$PATH"
2233 for ac_dir in $ac_dummy; do
2234 test -z "$ac_dir" && ac_dir=.
2235 if test -f $ac_dir/$ac_word; then
2236 ac_cv_prog_CC="cl"
2237 break
2239 done
2240 IFS="$ac_save_ifs"
2243 CC="$ac_cv_prog_CC"
2244 if test -n "$CC"; then
2245 echo "$ac_t""$CC" 1>&6
2246 else
2247 echo "$ac_t""no" 1>&6
2250 esac
2252 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2255 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2256 echo "configure:2257: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2258 ac_ext=c
2259 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2260 ac_cpp='$CPP $CPPFLAGS'
2261 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2262 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2263 cross_compiling=$ac_cv_prog_cc_cross
2265 cat > conftest.$ac_ext << EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2270 main(){return(0);}
2272 if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2273 ac_cv_prog_cc_works=yes
2274 # If we can't run a trivial program, we are probably using a cross compiler.
2275 if (./conftest; exit) 2>/dev/null; then
2276 ac_cv_prog_cc_cross=no
2277 else
2278 ac_cv_prog_cc_cross=yes
2280 else
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2283 ac_cv_prog_cc_works=no
2285 rm -fr conftest*
2286 ac_ext=c
2287 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2288 ac_cpp='$CPP $CPPFLAGS'
2289 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2290 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2291 cross_compiling=$ac_cv_prog_cc_cross
2293 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2294 if test $ac_cv_prog_cc_works = no; then
2295 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2297 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2298 echo "configure:2299: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2299 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2300 cross_compiling=$ac_cv_prog_cc_cross
2302 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2303 echo "configure:2304: checking whether we are using GNU C" >&5
2304 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307 cat > conftest.c <<EOF
2308 #ifdef __GNUC__
2309 yes;
2310 #endif
2312 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2313 ac_cv_prog_gcc=yes
2314 else
2315 ac_cv_prog_gcc=no
2319 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2321 if test $ac_cv_prog_gcc = yes; then
2322 GCC=yes
2323 else
2324 GCC=
2327 ac_test_CFLAGS="${CFLAGS+set}"
2328 ac_save_CFLAGS="$CFLAGS"
2329 CFLAGS=
2330 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2331 echo "configure:2332: checking whether ${CC-cc} accepts -g" >&5
2332 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2333 echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335 echo 'void f(){}' > conftest.c
2336 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2337 ac_cv_prog_cc_g=yes
2338 else
2339 ac_cv_prog_cc_g=no
2341 rm -f conftest*
2345 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2346 if test "$ac_test_CFLAGS" = set; then
2347 CFLAGS="$ac_save_CFLAGS"
2348 elif test $ac_cv_prog_cc_g = yes; then
2349 if test "$GCC" = yes; then
2350 CFLAGS="-g -O2"
2351 else
2352 CFLAGS="-g"
2354 else
2355 if test "$GCC" = yes; then
2356 CFLAGS="-O2"
2357 else
2358 CFLAGS=
2362 if test -n "$USE_CPLUS"; then
2363 if test "$CC" = "cl" -a -z "$CXX"; then
2364 CXX=$CC
2365 else
2366 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2371 echo "configure:2372: checking for $ac_word" >&5
2372 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 if test -n "$CXX"; then
2376 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2377 else
2378 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2379 ac_dummy="$PATH"
2380 for ac_dir in $ac_dummy; do
2381 test -z "$ac_dir" && ac_dir=.
2382 if test -f $ac_dir/$ac_word; then
2383 ac_cv_prog_CXX="$ac_prog"
2384 break
2386 done
2387 IFS="$ac_save_ifs"
2390 CXX="$ac_cv_prog_CXX"
2391 if test -n "$CXX"; then
2392 echo "$ac_t""$CXX" 1>&6
2393 else
2394 echo "$ac_t""no" 1>&6
2397 test -n "$CXX" && break
2398 done
2399 test -n "$CXX" || CXX="gcc"
2402 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2403 echo "configure:2404: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2405 ac_ext=C
2406 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2407 ac_cpp='$CXXCPP $CPPFLAGS'
2408 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2409 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2410 cross_compiling=$ac_cv_prog_cxx_cross
2412 cat > conftest.$ac_ext << EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2417 int main(){return(0);}
2419 if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2420 ac_cv_prog_cxx_works=yes
2421 # If we can't run a trivial program, we are probably using a cross compiler.
2422 if (./conftest; exit) 2>/dev/null; then
2423 ac_cv_prog_cxx_cross=no
2424 else
2425 ac_cv_prog_cxx_cross=yes
2427 else
2428 echo "configure: failed program was:" >&5
2429 cat conftest.$ac_ext >&5
2430 ac_cv_prog_cxx_works=no
2432 rm -fr conftest*
2433 ac_ext=c
2434 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2435 ac_cpp='$CPP $CPPFLAGS'
2436 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2437 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2438 cross_compiling=$ac_cv_prog_cc_cross
2440 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2441 if test $ac_cv_prog_cxx_works = no; then
2442 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2444 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2445 echo "configure:2446: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2446 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2447 cross_compiling=$ac_cv_prog_cxx_cross
2449 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2450 echo "configure:2451: checking whether we are using GNU C++" >&5
2451 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454 cat > conftest.C <<EOF
2455 #ifdef __GNUC__
2456 yes;
2457 #endif
2459 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2460 ac_cv_prog_gxx=yes
2461 else
2462 ac_cv_prog_gxx=no
2466 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2468 if test $ac_cv_prog_gxx = yes; then
2469 GXX=yes
2470 else
2471 GXX=
2474 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2475 ac_save_CXXFLAGS="$CXXFLAGS"
2476 CXXFLAGS=
2477 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2478 echo "configure:2479: checking whether ${CXX-g++} accepts -g" >&5
2479 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482 echo 'void f(){}' > conftest.cc
2483 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2484 ac_cv_prog_cxx_g=yes
2485 else
2486 ac_cv_prog_cxx_g=no
2488 rm -f conftest*
2492 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2493 if test "$ac_test_CXXFLAGS" = set; then
2494 CXXFLAGS="$ac_save_CXXFLAGS"
2495 elif test $ac_cv_prog_cxx_g = yes; then
2496 if test "$GXX" = yes; then
2497 CXXFLAGS="-g -O2"
2498 else
2499 CXXFLAGS="-g"
2501 else
2502 if test "$GXX" = yes; then
2503 CXXFLAGS="-O2"
2504 else
2505 CXXFLAGS=
2511 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2512 echo "configure:2513: checking how to run the C preprocessor" >&5
2513 # On Suns, sometimes $CPP names a directory.
2514 if test -n "$CPP" && test -d "$CPP"; then
2515 CPP=
2517 if test -z "$CPP"; then
2518 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2519 echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521 # This must be in double quotes, not single quotes, because CPP may get
2522 # substituted into the Makefile and "${CC-cc}" will confuse make.
2523 CPP="${CC-cc} -E"
2524 # On the NeXT, cc -E runs the code through the compiler's parser,
2525 # not just through cpp.
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 #include <assert.h>
2530 Syntax Error
2532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2533 { (eval echo configure:2534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535 if test -z "$ac_err"; then
2537 else
2538 echo "$ac_err" >&5
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 rm -rf conftest*
2542 CPP="${CC-cc} -E -traditional-cpp"
2543 cat > conftest.$ac_ext <<EOF
2544 #line 2545 "configure"
2545 #include "confdefs.h"
2546 #include <assert.h>
2547 Syntax Error
2549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2550 { (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552 if test -z "$ac_err"; then
2554 else
2555 echo "$ac_err" >&5
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -rf conftest*
2559 CPP="${CC-cc} -nologo -E"
2560 cat > conftest.$ac_ext <<EOF
2561 #line 2562 "configure"
2562 #include "confdefs.h"
2563 #include <assert.h>
2564 Syntax Error
2566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2567 { (eval echo configure:2568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2569 if test -z "$ac_err"; then
2571 else
2572 echo "$ac_err" >&5
2573 echo "configure: failed program was:" >&5
2574 cat conftest.$ac_ext >&5
2575 rm -rf conftest*
2576 CPP=/lib/cpp
2578 rm -f conftest*
2580 rm -f conftest*
2582 rm -f conftest*
2583 ac_cv_prog_CPP="$CPP"
2585 CPP="$ac_cv_prog_CPP"
2586 else
2587 ac_cv_prog_CPP="$CPP"
2589 echo "$ac_t""$CPP" 1>&6
2591 # Extract the first word of "ranlib", so it can be a program name with args.
2592 set dummy ranlib; ac_word=$2
2593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_word" >&5
2595 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2596 echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598 if test -n "$RANLIB"; then
2599 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2600 else
2601 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2602 ac_dummy="$PATH"
2603 for ac_dir in $ac_dummy; do
2604 test -z "$ac_dir" && ac_dir=.
2605 if test -f $ac_dir/$ac_word; then
2606 ac_cv_prog_RANLIB="ranlib"
2607 break
2609 done
2610 IFS="$ac_save_ifs"
2611 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2614 RANLIB="$ac_cv_prog_RANLIB"
2615 if test -n "$RANLIB"; then
2616 echo "$ac_t""$RANLIB" 1>&6
2617 else
2618 echo "$ac_t""no" 1>&6
2621 for ac_prog in as
2623 # Extract the first word of "$ac_prog", so it can be a program name with args.
2624 set dummy $ac_prog; ac_word=$2
2625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2626 echo "configure:2627: checking for $ac_word" >&5
2627 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630 case "$AS" in
2632 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2634 ?:/*)
2635 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2639 ac_dummy="$PATH"
2640 for ac_dir in $ac_dummy; do
2641 test -z "$ac_dir" && ac_dir=.
2642 if test -f $ac_dir/$ac_word; then
2643 ac_cv_path_AS="$ac_dir/$ac_word"
2644 break
2646 done
2647 IFS="$ac_save_ifs"
2649 esac
2651 AS="$ac_cv_path_AS"
2652 if test -n "$AS"; then
2653 echo "$ac_t""$AS" 1>&6
2654 else
2655 echo "$ac_t""no" 1>&6
2658 test -n "$AS" && break
2659 done
2660 test -n "$AS" || AS="$CC"
2662 for ac_prog in ar
2664 # Extract the first word of "$ac_prog", so it can be a program name with args.
2665 set dummy $ac_prog; ac_word=$2
2666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2667 echo "configure:2668: checking for $ac_word" >&5
2668 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2669 echo $ac_n "(cached) $ac_c" 1>&6
2670 else
2671 case "$AR" in
2673 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2675 ?:/*)
2676 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2680 ac_dummy="$PATH"
2681 for ac_dir in $ac_dummy; do
2682 test -z "$ac_dir" && ac_dir=.
2683 if test -f $ac_dir/$ac_word; then
2684 ac_cv_path_AR="$ac_dir/$ac_word"
2685 break
2687 done
2688 IFS="$ac_save_ifs"
2690 esac
2692 AR="$ac_cv_path_AR"
2693 if test -n "$AR"; then
2694 echo "$ac_t""$AR" 1>&6
2695 else
2696 echo "$ac_t""no" 1>&6
2699 test -n "$AR" && break
2700 done
2701 test -n "$AR" || AR="echo not_ar"
2703 for ac_prog in ld link
2705 # Extract the first word of "$ac_prog", so it can be a program name with args.
2706 set dummy $ac_prog; ac_word=$2
2707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_word" >&5
2709 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712 case "$LD" in
2714 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2716 ?:/*)
2717 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2721 ac_dummy="$PATH"
2722 for ac_dir in $ac_dummy; do
2723 test -z "$ac_dir" && ac_dir=.
2724 if test -f $ac_dir/$ac_word; then
2725 ac_cv_path_LD="$ac_dir/$ac_word"
2726 break
2728 done
2729 IFS="$ac_save_ifs"
2731 esac
2733 LD="$ac_cv_path_LD"
2734 if test -n "$LD"; then
2735 echo "$ac_t""$LD" 1>&6
2736 else
2737 echo "$ac_t""no" 1>&6
2740 test -n "$LD" && break
2741 done
2742 test -n "$LD" || LD="echo not_ld"
2744 for ac_prog in strip
2746 # Extract the first word of "$ac_prog", so it can be a program name with args.
2747 set dummy $ac_prog; ac_word=$2
2748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2749 echo "configure:2750: checking for $ac_word" >&5
2750 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753 case "$STRIP" in
2755 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2757 ?:/*)
2758 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2762 ac_dummy="$PATH"
2763 for ac_dir in $ac_dummy; do
2764 test -z "$ac_dir" && ac_dir=.
2765 if test -f $ac_dir/$ac_word; then
2766 ac_cv_path_STRIP="$ac_dir/$ac_word"
2767 break
2769 done
2770 IFS="$ac_save_ifs"
2772 esac
2774 STRIP="$ac_cv_path_STRIP"
2775 if test -n "$STRIP"; then
2776 echo "$ac_t""$STRIP" 1>&6
2777 else
2778 echo "$ac_t""no" 1>&6
2781 test -n "$STRIP" && break
2782 done
2783 test -n "$STRIP" || STRIP="echo not_strip"
2785 for ac_prog in windres
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2792 echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794 case "$WINDRES" in
2796 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2798 ?:/*)
2799 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2803 ac_dummy="$PATH"
2804 for ac_dir in $ac_dummy; do
2805 test -z "$ac_dir" && ac_dir=.
2806 if test -f $ac_dir/$ac_word; then
2807 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2808 break
2810 done
2811 IFS="$ac_save_ifs"
2813 esac
2815 WINDRES="$ac_cv_path_WINDRES"
2816 if test -n "$WINDRES"; then
2817 echo "$ac_t""$WINDRES" 1>&6
2818 else
2819 echo "$ac_t""no" 1>&6
2822 test -n "$WINDRES" && break
2823 done
2824 test -n "$WINDRES" || WINDRES="echo not_windres"
2826 if test -z "$HOST_CC"; then
2827 HOST_CC="$CC"
2829 if test -z "$HOST_CFLAGS"; then
2830 HOST_CFLAGS="$CFLAGS"
2834 if test "$GCC" = "yes"; then
2835 GNU_CC=1
2837 if test "$GXX" = "yes"; then
2838 GNU_CXX=1
2840 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2841 GNU_AS=1
2843 rm -f a.out
2845 case "$build:$target" in
2846 i?86-apple-darwin*:powerpc-apple-darwin*)
2847 cross_compiling=yes
2849 esac
2851 if test "$cross_compiling" = "yes"; then
2852 CROSS_COMPILE=1
2853 else
2854 CROSS_COMPILE=
2857 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2858 echo "configure:2859: checking for gcc -pipe support" >&5
2859 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2860 echo '#include <stdio.h>' > dummy-hello.c
2861 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2862 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2863 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2864 if test $? = 0; then
2865 _res_as_stdin="yes"
2866 else
2867 _res_as_stdin="no"
2869 if test "$_res_as_stdin" = "yes"; then
2870 _SAVE_CFLAGS=$CFLAGS
2871 CFLAGS="$CFLAGS -pipe"
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <stdio.h>
2876 int main() {
2877 printf("Hello World\n");
2878 ; return 0; }
2880 if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2881 rm -rf conftest*
2882 _res_gcc_pipe="yes"
2883 else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 _res_gcc_pipe="no"
2889 rm -f conftest*
2890 CFLAGS=$_SAVE_CFLAGS
2892 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2893 _res="yes";
2894 CFLAGS="$CFLAGS -pipe"
2895 CXXFLAGS="$CXXFLAGS -pipe"
2896 else
2897 _res="no"
2899 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2900 echo "$ac_t""$_res" 1>&6
2901 else
2902 echo "$ac_t""no" 1>&6
2906 _SAVE_CFLAGS="$CFLAGS"
2907 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2909 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2910 echo "configure:2911: checking whether C compiler supports -fprofile-generate" >&5
2911 cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2915 int main() {
2916 return 0;
2917 ; return 0; }
2919 if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2920 rm -rf conftest*
2921 PROFILE_GEN_CFLAGS="-fprofile-generate"
2922 result="yes"
2923 else
2924 echo "configure: failed program was:" >&5
2925 cat conftest.$ac_ext >&5
2926 rm -rf conftest*
2927 result="no"
2929 rm -f conftest*
2930 echo "$ac_t""$result" 1>&6
2932 if test $result = "yes"; then
2933 PROFILE_GEN_LDFLAGS="-fprofile-generate"
2934 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
2935 PROFILE_USE_LDFLAGS="-fprofile-use"
2938 CFLAGS="$_SAVE_CFLAGS"
2940 if test "$GNU_CC"; then
2941 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2942 echo "configure:2943: checking for visibility(hidden) attribute" >&5
2943 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2944 echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946 cat > conftest.c <<EOF
2947 int foo __attribute__ ((visibility ("hidden"))) = 1;
2949 ac_cv_visibility_hidden=no
2950 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2951 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2952 ac_cv_visibility_hidden=yes
2955 rm -f conftest.cs
2959 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2960 if test "$ac_cv_visibility_hidden" = "yes"; then
2961 cat >> confdefs.h <<\EOF
2962 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2965 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2966 echo "configure:2967: checking for visibility pragma support" >&5
2967 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2968 echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970 cat > conftest.c <<EOF
2971 #pragma GCC visibility push(hidden)
2972 int foo_hidden = 1;
2973 #pragma GCC visibility push(default)
2974 int foo_default = 1;
2976 ac_cv_visibility_pragma=no
2977 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2978 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2979 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2980 ac_cv_visibility_pragma=yes
2984 rm -f conftest.cs
2988 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2989 if test "$ac_cv_visibility_pragma" = "yes"; then
2990 cat >> confdefs.h <<\EOF
2991 #define HAVE_VISIBILITY_PRAGMA 1
2994 # To work around a build problem on Linux x86-64 (Bugzilla bug
2995 # 293438), we use the -fvisibility=hidden flag. This flag is less
2996 # optimal than #pragma GCC visibility push(hidden) because the flag
2997 # assumes that symbols defined outside the current source file have
2998 # the default visibility. This has the advantage that we don't need
2999 # to wrap system header files, but has the disadvantage that calls
3000 # to hidden symbols defined in other source files cannot be
3001 # optimized by the compiler. The -fvisibility=hidden flag does
3002 # hide and export symbols correctly.
3003 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
3004 #WRAP_SYSTEM_INCLUDES=1
3005 VISIBILITY_FLAGS="-fvisibility=hidden"
3006 WRAP_SYSTEM_INCLUDES=
3009 fi # GNU_CC
3011 fi # SKIP_COMPILER_CHECKS
3013 if test -z "$SKIP_PATH_CHECKS"; then
3014 for ac_prog in perl5 perl
3016 # Extract the first word of "$ac_prog", so it can be a program name with args.
3017 set dummy $ac_prog; ac_word=$2
3018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3019 echo "configure:3020: checking for $ac_word" >&5
3020 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023 case "$PERL" in
3025 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3027 ?:/*)
3028 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
3031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3032 ac_dummy="$PATH"
3033 for ac_dir in $ac_dummy; do
3034 test -z "$ac_dir" && ac_dir=.
3035 if test -f $ac_dir/$ac_word; then
3036 ac_cv_path_PERL="$ac_dir/$ac_word"
3037 break
3039 done
3040 IFS="$ac_save_ifs"
3042 esac
3044 PERL="$ac_cv_path_PERL"
3045 if test -n "$PERL"; then
3046 echo "$ac_t""$PERL" 1>&6
3047 else
3048 echo "$ac_t""no" 1>&6
3051 test -n "$PERL" && break
3052 done
3053 test -n "$PERL" || PERL="echo not_perl"
3055 elif test -z "$PERL"; then
3056 PERL=perl
3059 OBJ_SUFFIX=o
3060 LIB_SUFFIX=a
3061 DLL_SUFFIX=so
3062 ASM_SUFFIX=s
3063 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
3064 PR_MD_ASFILES=
3065 PR_MD_CSRCS=
3066 PR_MD_ARCH_DIR=unix
3067 AR_FLAGS='cr $@'
3068 AS='$(CC)'
3069 ASFLAGS='$(CFLAGS)'
3071 if test -n "$CROSS_COMPILE"; then
3072 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
3073 OS_RELEASE=
3074 OS_TEST="${target_cpu}"
3075 case "${target_os}" in
3076 linux*) OS_ARCH=Linux ;;
3077 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
3078 mingw*) OS_ARCH=WINNT ;;
3079 wince*) OS_ARCH=WINCE ;;
3080 winmo*) OS_ARCH=WINCE ;;
3081 darwin*) OS_ARCH=Darwin ;;
3082 riscos*) OS_ARCH=RISCOS ;;
3083 esac
3084 else
3085 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
3086 OS_RELEASE=`uname -r`
3087 OS_TEST=`uname -m`
3090 if test "$OS_ARCH" = "IRIX64"; then
3091 OS_ARCH=IRIX
3094 if test "$OS_ARCH" = "AIX"; then
3095 OS_RELEASE=`uname -v`.`uname -r`
3098 if test "$OS_ARCH" = "FreeBSD"; then
3099 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3102 if test "$OS_ARCH" = "Linux"; then
3103 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3104 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
3107 #######################################################################
3108 # Master "Core Components" macros for getting the OS target #
3109 #######################################################################
3112 # Note: OS_TARGET should be specified on the command line for gmake.
3113 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
3114 # The difference between the Win95 target and the WinNT target is that
3115 # the WinNT target uses Windows NT specific features not available
3116 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
3117 # at lesser performance (the Win95 target uses threads; the WinNT target
3118 # uses fibers).
3120 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
3121 # cross-compilation.
3125 # The following hack allows one to build on a WIN95 machine (as if
3126 # s/he were cross-compiling on a WINNT host for a WIN95 target).
3127 # It also accomodates for MKS's uname.exe. If you never intend
3128 # to do development on a WIN95 machine, you don't need this hack.
3130 case "$OS_ARCH" in
3131 WIN95)
3132 OS_ARCH=WINNT
3133 OS_TARGET=WIN95
3135 Windows_95)
3136 OS_ARCH=Windows_NT
3137 OS_TARGET=WIN95
3139 Windows_98)
3140 OS_ARCH=Windows_NT
3141 OS_TARGET=WIN95
3143 CYGWIN_9*|CYGWIN_ME*)
3144 OS_ARCH='CYGWIN_NT-4.0'
3145 OS_TARGET=WIN95
3147 OS_2)
3148 OS_ARCH=OS2
3149 OS_TARGET=OS2
3151 esac
3154 # On WIN32, we also define the variable CPU_ARCH.
3157 case "$OS_ARCH" in
3158 WINNT)
3159 CPU_ARCH=`uname -p`
3160 if test "$CPU_ARCH" = "I386"; then
3161 CPU_ARCH=x86
3164 Windows_NT)
3166 # If uname -s returns "Windows_NT", we assume that we are using
3167 # the uname.exe in MKS toolkit.
3169 # The -r option of MKS uname only returns the major version number.
3170 # So we need to use its -v option to get the minor version number.
3171 # Moreover, it doesn't have the -p option, so we need to use uname -m.
3173 OS_ARCH=WINNT
3174 OS_MINOR_RELEASE=`uname -v`
3175 if test "$OS_MINOR_RELEASE" = "00"; then
3176 OS_MINOR_RELEASE=0
3178 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
3179 CPU_ARCH=`uname -m`
3181 # MKS's uname -m returns "586" on a Pentium machine.
3183 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3184 CPU_ARCH=x86
3187 CYGWIN_NT*|MINGW*_NT*)
3189 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
3190 # the uname.exe in the Cygwin tools.
3191 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
3192 # the uname.exe in the MSYS tools.
3194 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
3195 OS_ARCH=WINNT
3196 CPU_ARCH=`uname -m`
3198 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
3200 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3201 CPU_ARCH=x86
3204 esac
3206 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
3207 OS_TARGET=WIN95
3208 if test -n "$MOZ_DEBUG"; then
3209 USE_DEBUG_RTL=1
3212 if test -z "$OS_TARGET"; then
3213 OS_TARGET=$OS_ARCH
3215 if test "$OS_TARGET" = "WIN95"; then
3216 OS_RELEASE="4.0"
3218 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
3220 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
3221 if test "${enable_os2_high_mem+set}" = set; then
3222 enableval="$enable_os2_high_mem"
3223 if test "$enableval" = "no"; then
3224 MOZ_OS2_HIGH_MEMORY=
3225 else
3226 MOZ_OS2_HIGH_MEMORY=1
3232 MOZ_ALIGN=toolchain-default
3234 case "$target" in
3235 arm*-android*|arm*-linuxandroid*)
3236 MOZ_THUMB=yes
3237 MOZ_ARCH=armv7-a
3238 MOZ_FPU=vfp
3239 MOZ_FLOAT_ABI=softfp
3240 MOZ_SOFT_FLOAT=yes
3241 MOZ_ALIGN=no
3243 arm*-*)
3244 if test -n "$MOZ_PLATFORM_MAEMO"; then
3245 MOZ_THUMB=no
3246 MOZ_ARCH=armv7-a
3247 MOZ_FLOAT_ABI=softfp
3249 if test "$MOZ_PLATFORM_MAEMO" = 6; then
3250 MOZ_THUMB=yes
3253 esac
3255 # Check whether --enable-thumb2 or --disable-thumb2 was given.
3256 if test "${enable_thumb2+set}" = set; then
3257 enableval="$enable_thumb2"
3258 MOZ_THUMB=$enableval
3262 # Check whether --with-thumb or --without-thumb was given.
3263 if test "${with_thumb+set}" = set; then
3264 withval="$with_thumb"
3265 if test -z "$GNU_CC"; then
3266 { echo "configure: error: --with-thumb is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3268 MOZ_THUMB=$withval
3272 # Check whether --with-thumb-interwork or --without-thumb-interwork was given.
3273 if test "${with_thumb_interwork+set}" = set; then
3274 withval="$with_thumb_interwork"
3275 if test -z "$GNU_CC"; then
3276 { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3278 MOZ_THUMB_INTERWORK=$withval
3282 # Check whether --with-arch or --without-arch was given.
3283 if test "${with_arch+set}" = set; then
3284 withval="$with_arch"
3285 if test -z "$GNU_CC"; then
3286 { echo "configure: error: --with-arch is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3288 MOZ_ARCH=$withval
3292 # Check whether --with-fpu or --without-fpu was given.
3293 if test "${with_fpu+set}" = set; then
3294 withval="$with_fpu"
3295 if test -z "$GNU_CC"; then
3296 { echo "configure: error: --with-fpu is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3298 MOZ_FPU=$withval
3302 # Check whether --with-float-abi or --without-float-abi was given.
3303 if test "${with_float_abi+set}" = set; then
3304 withval="$with_float_abi"
3305 if test -z "$GNU_CC"; then
3306 { echo "configure: error: --with-float-abi is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3308 MOZ_FLOAT_ABI=$withval
3312 # Check whether --with-soft-float or --without-soft-float was given.
3313 if test "${with_soft_float+set}" = set; then
3314 withval="$with_soft_float"
3315 if test -z "$GNU_CC"; then
3316 { echo "configure: error: --with-soft-float is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3318 MOZ_SOFT_FLOAT=$withval
3322 case "$MOZ_ARCH" in
3323 toolchain-default|"")
3324 arch_flag=""
3327 arch_flag="-march=$MOZ_ARCH"
3329 esac
3331 case "$MOZ_THUMB" in
3332 yes)
3333 MOZ_THUMB2=1
3334 thumb_flag="-mthumb"
3337 MOZ_THUMB2=
3338 thumb_flag="-marm"
3341 _SAVE_CFLAGS="$CFLAGS"
3342 CFLAGS="$arch_flag"
3343 cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3347 int main() {
3348 return sizeof(__thumb2__);
3349 ; return 0; }
3351 if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3352 rm -rf conftest*
3353 MOZ_THUMB2=1
3354 else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 rm -rf conftest*
3358 MOZ_THUMB2=
3360 rm -f conftest*
3361 CFLAGS="$_SAVE_CFLAGS"
3362 thumb_flag=""
3364 esac
3366 case "$MOZ_THUMB_INTERWORK" in
3367 yes)
3368 thumb_interwork_flag="-mthumb-interwork"
3371 thumb_interwork_flag="-mno-thumb-interwork"
3373 *) # toolchain-default
3374 thumb_interwork_flag=""
3376 esac
3378 case "$MOZ_FPU" in
3379 toolchain-default|"")
3380 fpu_flag=""
3383 fpu_flag="-mfpu=$MOZ_FPU"
3385 esac
3387 case "$MOZ_FLOAT_ABI" in
3388 toolchain-default|"")
3389 float_abi_flag=""
3392 float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
3394 esac
3396 case "$MOZ_SOFT_FLOAT" in
3397 yes)
3398 soft_float_flag="-msoft-float"
3401 soft_float_flag="-mno-soft-float"
3403 *) # toolchain-default
3404 soft_float_flag=""
3406 esac
3408 case "$MOZ_ALIGN" in
3409 toolchain-default|"")
3410 align_flag=""
3413 align_flag="-mno-unaligned-access"
3415 yes)
3416 align_flag="-munaligned-access"
3419 align_flag=""
3421 esac
3423 if test -n "$align_flag"; then
3424 _SAVE_CFLAGS="$CFLAGS"
3425 CFLAGS="$CFLAGS $align_flag"
3426 echo $ac_n "checking whether alignment flag ($align_flag) is supported""... $ac_c" 1>&6
3427 echo "configure:3428: checking whether alignment flag ($align_flag) is supported" >&5
3428 cat > conftest.$ac_ext <<EOF
3429 #line 3430 "configure"
3430 #include "confdefs.h"
3432 int main() {
3434 ; return 0; }
3436 if { (eval echo configure:3437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3438 else
3439 echo "configure: failed program was:" >&5
3440 cat conftest.$ac_ext >&5
3441 rm -rf conftest*
3442 align_flag=""
3444 rm -f conftest*
3445 CFLAGS="$_SAVE_CFLAGS"
3448 all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag $align_flag`
3449 if test -n "$all_flags"; then
3450 _SAVE_CFLAGS="$CFLAGS"
3451 CFLAGS="$all_flags"
3452 echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
3453 echo "configure:3454: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
3454 cat > conftest.$ac_ext <<EOF
3455 #line 3456 "configure"
3456 #include "confdefs.h"
3458 int main() {
3459 return 0;
3460 ; return 0; }
3462 if { (eval echo configure:3463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3463 rm -rf conftest*
3464 echo "$ac_t""yes" 1>&6
3465 else
3466 echo "configure: failed program was:" >&5
3467 cat conftest.$ac_ext >&5
3468 rm -rf conftest*
3469 { echo "configure: error: no" 1>&2; exit 1; }
3471 rm -f conftest*
3473 CFLAGS="$_SAVE_CFLAGS $all_flags"
3474 CXXFLAGS="$CXXFLAGS $all_flags"
3475 ASFLAGS="$ASFLAGS $all_flags"
3476 if test -n "$thumb_flag"; then
3477 LDFLAGS="$LDFLAGS $thumb_flag"
3481 case "$host" in
3482 *-mingw*)
3483 NSINSTALL=nsinstall
3485 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
3486 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
3487 if test `echo "${PATH}" | grep -c \;` = 0; then
3488 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
3491 *-beos*)
3492 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
3494 *os2*)
3497 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
3499 esac
3501 case "$target" in
3503 *-aix*)
3504 cat >> confdefs.h <<\EOF
3505 #define XP_UNIX 1
3508 cat >> confdefs.h <<\EOF
3509 #define AIX 1
3512 cat >> confdefs.h <<\EOF
3513 #define SYSV 1
3516 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3517 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3518 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3519 echo "configure:3520: checking for sys/atomic_op.h" >&5
3520 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523 cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 #include <sys/atomic_op.h>
3528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3529 { (eval echo configure:3530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3531 if test -z "$ac_err"; then
3532 rm -rf conftest*
3533 eval "ac_cv_header_$ac_safe=yes"
3534 else
3535 echo "$ac_err" >&5
3536 echo "configure: failed program was:" >&5
3537 cat conftest.$ac_ext >&5
3538 rm -rf conftest*
3539 eval "ac_cv_header_$ac_safe=no"
3541 rm -f conftest*
3543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3544 echo "$ac_t""yes" 1>&6
3545 cat >> confdefs.h <<\EOF
3546 #define AIX_HAVE_ATOMIC_OP_H 1
3549 else
3550 echo "$ac_t""no" 1>&6
3553 case "${target_os}" in
3554 aix3.2*)
3555 cat >> confdefs.h <<\EOF
3556 #define AIX_RENAME_SELECT 1
3559 cat >> confdefs.h <<\EOF
3560 #define _PR_NO_LARGE_FILES 1
3563 AIX_LINK_OPTS='-bnso -berok'
3564 PR_MD_ASFILES=os_AIX.s
3566 aix4.1*)
3567 cat >> confdefs.h <<\EOF
3568 #define AIX_TIMERS 1
3571 cat >> confdefs.h <<\EOF
3572 #define _PR_NO_LARGE_FILES 1
3575 cat >> confdefs.h <<\EOF
3576 #define AIX4_1 1
3579 MKSHLIB=
3580 DSO_LDOPTS=
3581 AIX_LINK_OPTS='-bnso -berok'
3582 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3583 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3585 aix4.2*)
3586 cat >> confdefs.h <<\EOF
3587 #define AIX_TIMERS 1
3590 cat >> confdefs.h <<\EOF
3591 #define _PR_HAVE_OFF64_T 1
3594 AIX_LINK_OPTS='-brtl -bnso -berok'
3596 aix4.3*)
3597 cat >> confdefs.h <<\EOF
3598 #define AIX_TIMERS 1
3601 cat >> confdefs.h <<\EOF
3602 #define _PR_HAVE_OFF64_T 1
3605 cat >> confdefs.h <<\EOF
3606 #define AIX4_3_PLUS 1
3609 cat >> confdefs.h <<\EOF
3610 #define HAVE_SOCKLEN_T 1
3613 cat >> confdefs.h <<\EOF
3614 #define HAVE_FCNTL_FILE_LOCKING 1
3617 USE_IPV6=1
3618 AIX_LINK_OPTS='-brtl -bnso -berok'
3621 cat >> confdefs.h <<\EOF
3622 #define AIX_TIMERS 1
3625 cat >> confdefs.h <<\EOF
3626 #define _PR_HAVE_OFF64_T 1
3629 cat >> confdefs.h <<\EOF
3630 #define AIX4_3_PLUS 1
3633 cat >> confdefs.h <<\EOF
3634 #define HAVE_SOCKLEN_T 1
3637 cat >> confdefs.h <<\EOF
3638 #define HAVE_FCNTL_FILE_LOCKING 1
3641 USE_IPV6=1
3642 AIX_LINK_OPTS='-brtl -bnso -berok'
3644 esac
3645 CFLAGS="$CFLAGS -qro -qroconst"
3646 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3647 AIX_TMP='./_aix_tmp.o'
3648 if test -n "$USE_64"; then
3649 MDCPUCFG_H=_aix64.cfg
3650 OBJECT_MODE=64
3651 else
3652 MDCPUCFG_H=_aix32.cfg
3654 PR_MD_CSRCS=aix.c
3655 RESOLVE_LINK_SYMBOLS=1
3658 *-beos*)
3659 cat >> confdefs.h <<\EOF
3660 #define XP_BEOS 1
3663 cat >> confdefs.h <<\EOF
3664 #define BeOS 1
3667 cat >> confdefs.h <<\EOF
3668 #define BEOS 1
3671 cat >> confdefs.h <<\EOF
3672 #define _POSIX_SOURCE 1
3675 DSO_LDOPTS=-nostart
3676 MDCPUCFG_H=_beos.cfg
3677 USE_BTHREADS=1
3678 PR_MD_ARCH_DIR=beos
3679 RESOLVE_LINK_SYMBOLS=1
3680 case "${target_cpu}" in
3681 i*86)
3682 _OPTIMIZE_FLAGS=-O2
3683 _DEBUG_FLAGS='-gdwarf-2 -O0'
3684 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3685 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3686 echo "configure:3687: checking for gethostbyaddr in -lbind" >&5
3687 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3689 echo $ac_n "(cached) $ac_c" 1>&6
3690 else
3691 ac_save_LIBS="$LIBS"
3692 LIBS="-lbind $LIBS"
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 /* Override any gcc2 internal prototype to avoid an error. */
3697 /* We use char because int might match the return type of a gcc2
3698 builtin and then its argument prototype would still apply. */
3699 char gethostbyaddr();
3701 int main() {
3702 gethostbyaddr()
3703 ; return 0; }
3705 if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3706 rm -rf conftest*
3707 eval "ac_cv_lib_$ac_lib_var=yes"
3708 else
3709 echo "configure: failed program was:" >&5
3710 cat conftest.$ac_ext >&5
3711 rm -rf conftest*
3712 eval "ac_cv_lib_$ac_lib_var=no"
3714 rm -f conftest*
3715 LIBS="$ac_save_LIBS"
3718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3719 echo "$ac_t""yes" 1>&6
3720 OS_LIBS="$OS_LIBS -lbind -lsocket"
3721 else
3722 echo "$ac_t""no" 1>&6
3726 powerpc)
3727 CC=mwcc
3728 CCC=mwcc
3729 LD=mwld
3730 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'
3731 _OPTIMIZE_FLAGS=-O2
3732 _DEBUG_FLAGS='-g -O0'
3734 esac
3737 *-bsdi*)
3738 cat >> confdefs.h <<\EOF
3739 #define XP_UNIX 1
3742 cat >> confdefs.h <<\EOF
3743 #define BSDI 1
3746 cat >> confdefs.h <<\EOF
3747 #define NEED_BSDREGEX 1
3751 CFLAGS="$CFLAGS -Wall -Wno-format"
3752 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3754 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3755 CPU_ARCH=x86
3756 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3757 CPU_ARCH=sparc
3760 MDCPUCFG_H=_bsdi.cfg
3761 PR_MD_CSRCS=bsdi.c
3763 DSO_LDOPTS=-r
3765 case "$target_os" in
3766 bsdi1.1*)
3767 cat >> confdefs.h <<\EOF
3768 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3771 cat >> confdefs.h <<\EOF
3772 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3775 cat >> confdefs.h <<\EOF
3776 #define _PR_NEED_H_ERRNO 1
3779 MKSHLIB=
3780 DSO_CFLAGS=
3781 DSO_LDOPTS=
3784 bsdi2.1*)
3785 cat >> confdefs.h <<\EOF
3786 #define _PR_TIMESPEC_HAS_TS_SEC 1
3789 cat >> confdefs.h <<\EOF
3790 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3793 cat >> confdefs.h <<\EOF
3794 #define HAVE_DLL 1
3797 cat >> confdefs.h <<\EOF
3798 #define USE_DLFCN 1
3801 cat >> confdefs.h <<\EOF
3802 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3805 PR_MD_ASFILES=os_BSD_OS_386_2.s
3808 bsdi4.* | bsdi5.*)
3809 cat >> confdefs.h <<\EOF
3810 #define _PR_SELECT_CONST_TIMEVAL 1
3813 cat >> confdefs.h <<\EOF
3814 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3817 cat >> confdefs.h <<\EOF
3818 #define HAVE_DLL 1
3821 cat >> confdefs.h <<\EOF
3822 #define USE_DLFCN 1
3825 cat >> confdefs.h <<\EOF
3826 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3829 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3830 DSO_CFLAGS=-fPIC
3831 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3832 STRIP="$STRIP -d"
3833 case "$target_os" in
3834 bsdi4.2* | bsdi4.3* | bsdi5.*)
3835 cat >> confdefs.h <<\EOF
3836 #define _PR_HAVE_GETPROTO_R 1
3839 cat >> confdefs.h <<\EOF
3840 #define _PR_HAVE_GETPROTO_R_POINTER 1
3844 esac
3847 cat >> confdefs.h <<\EOF
3848 #define _PR_SELECT_CONST_TIMEVAL 1
3851 cat >> confdefs.h <<\EOF
3852 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3855 cat >> confdefs.h <<\EOF
3856 #define HAVE_DLL 1
3859 cat >> confdefs.h <<\EOF
3860 #define USE_DLFCN 1
3863 cat >> confdefs.h <<\EOF
3864 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3868 esac
3872 *-darwin*)
3873 cat >> confdefs.h <<\EOF
3874 #define XP_UNIX 1
3877 cat >> confdefs.h <<\EOF
3878 #define DARWIN 1
3881 cat >> confdefs.h <<\EOF
3882 #define HAVE_BSD_FLOCK 1
3885 cat >> confdefs.h <<\EOF
3886 #define HAVE_SOCKLEN_T 1
3889 AS='$(CC) -x assembler-with-cpp'
3890 CFLAGS="$CFLAGS -Wall -fno-common"
3891 case "${target_cpu}" in
3892 arm*)
3893 CPU_ARCH=arm
3895 i*86*)
3896 if test -n "$USE_64"; then
3897 CPU_ARCH=x86_64
3898 else
3899 CPU_ARCH=i386
3902 x86_64)
3903 CPU_ARCH=x86_64
3906 CPU_ARCH=ppc
3908 esac
3909 if test "`echo $CC | grep -c '\-arch '`" = "0"; then
3910 CC="$CC -arch $CPU_ARCH"
3912 ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'`
3913 echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6
3914 echo "configure:3915: checking for crt_externs.h" >&5
3915 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3916 echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 #include <crt_externs.h>
3923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3924 { (eval echo configure:3925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3926 if test -z "$ac_err"; then
3927 rm -rf conftest*
3928 eval "ac_cv_header_$ac_safe=yes"
3929 else
3930 echo "$ac_err" >&5
3931 echo "configure: failed program was:" >&5
3932 cat conftest.$ac_ext >&5
3933 rm -rf conftest*
3934 eval "ac_cv_header_$ac_safe=no"
3936 rm -f conftest*
3938 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3939 echo "$ac_t""yes" 1>&6
3941 else
3942 echo "$ac_t""no" 1>&6
3945 DSO_CFLAGS=-fPIC
3946 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3947 _OPTIMIZE_FLAGS=-O2
3948 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3949 STRIP="$STRIP -x -S"
3950 DLL_SUFFIX=dylib
3951 USE_PTHREADS=1
3952 MDCPUCFG_H=_darwin.cfg
3953 PR_MD_CSRCS=darwin.c
3954 PR_MD_ASFILES=os_Darwin.s
3956 # Add Mac OS X support for loading CFM & CFBundle plugins
3957 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3958 cat >> confdefs.h <<\EOF
3959 #define XP_MACOSX 1
3962 OS_TARGET=MacOSX
3964 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3965 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3966 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3967 case "${target_cpu}" in
3968 powerpc*)
3969 export MACOSX_DEPLOYMENT_TARGET=10.2
3971 i*86*)
3972 export MACOSX_DEPLOYMENT_TARGET=10.4
3974 esac
3978 if test "$MACOS_SDK_DIR"; then
3980 if test ! -d "$MACOS_SDK_DIR"; then
3981 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3982 specify a valid SDK. SDKs are installed when the optional cross-development
3983 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3987 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3988 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3989 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3991 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3992 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3993 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3994 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3995 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3998 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
4000 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
4002 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
4005 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
4007 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
4008 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}"
4009 else
4010 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
4013 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
4014 export NEXT_ROOT=$MACOS_SDK_DIR
4016 if test -n "$CROSS_COMPILE" ; then
4017 HOST_CC="NEXT_ROOT= $HOST_CC"
4018 HOST_CXX="NEXT_ROOT= $HOST_CXX"
4020 else
4021 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
4023 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
4025 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
4026 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
4027 else
4028 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
4035 *-dgux*)
4036 cat >> confdefs.h <<\EOF
4037 #define XP_UNIX 1
4040 cat >> confdefs.h <<\EOF
4041 #define _PR_LOCAL_THREADS_ONLY 1
4044 cat >> confdefs.h <<\EOF
4045 #define SVR4 1
4048 cat >> confdefs.h <<\EOF
4049 #define SYSV 1
4052 cat >> confdefs.h <<\EOF
4053 #define DGUX 1
4056 cat >> confdefs.h <<\EOF
4057 #define _DGUX_SOURCE 1
4060 cat >> confdefs.h <<\EOF
4061 #define _POSIX4A_DRAFT6_SOURCE 1
4064 DSO_LDOPTS=-G
4065 _OPTIMIZE_FLAGS=-O2
4066 _DEBUG_FLAGS=
4067 MDCPUCFG_H=_dgux.cfg
4068 PR_MD_CSRCS=dgux.c
4071 *-freebsd*)
4072 if test -z "$USE_NSPR_THREADS"; then
4073 USE_PTHREADS=1
4075 cat >> confdefs.h <<\EOF
4076 #define XP_UNIX 1
4079 cat >> confdefs.h <<\EOF
4080 #define FREEBSD 1
4083 cat >> confdefs.h <<\EOF
4084 #define HAVE_BSD_FLOCK 1
4087 cat >> confdefs.h <<\EOF
4088 #define HAVE_SOCKLEN_T 1
4091 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
4092 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
4093 if test "$MOZ_OBJFORMAT" = "elf"; then
4094 DLL_SUFFIX=so
4095 else
4096 DLL_SUFFIX=so.1.0
4098 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4099 DSO_CFLAGS=-fPIC
4100 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4101 MDCPUCFG_H=_freebsd.cfg
4102 PR_MD_CSRCS=freebsd.c
4105 *-hpux*)
4106 cat >> confdefs.h <<\EOF
4107 #define XP_UNIX 1
4110 cat >> confdefs.h <<\EOF
4111 #define HPUX 1
4114 cat >> confdefs.h <<\EOF
4115 #define _HPUX_SOURCE 1
4118 # OSF1 and HPUX report the POLLHUP event for a socket when the
4119 # shutdown(SHUT_WR) operation is called for the remote end, even though
4120 # the socket is still writeable. Use select(), instead of poll(), to
4121 # workaround this problem.
4122 cat >> confdefs.h <<\EOF
4123 #define _PR_POLL_WITH_SELECT 1
4126 cat >> confdefs.h <<\EOF
4127 #define _USE_BIG_FDS 1
4130 DSO_LDOPTS='-b +h $(notdir $@)'
4131 PR_MD_CSRCS=hpux.c
4132 if test "$OS_TEST" = "ia64"; then
4133 DLL_SUFFIX=so
4134 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
4135 CPU_ARCH_TAG=_$OS_TEST
4136 if test -z "$USE_64"; then
4137 COMPILER_TAG=_32
4139 PR_MD_ASFILES=os_HPUX_ia64.s
4140 else
4141 cat >> confdefs.h <<\EOF
4142 #define hppa 1
4145 DLL_SUFFIX=sl
4146 PR_MD_ASFILES=os_HPUX.s
4148 if test -n "$USE_64"; then
4149 MDCPUCFG_H=_hpux64.cfg
4150 else
4151 MDCPUCFG_H=_hpux32.cfg
4153 if test -z "$GNU_CC"; then
4154 CC="$CC -Ae"
4155 CXX="$CXX -ext"
4156 DSO_CFLAGS=+Z
4157 else
4158 DSO_CFLAGS=-fPIC
4159 ASFLAGS="$ASFLAGS -x assembler-with-cpp"
4162 if test -n "$MOZILLA_CLIENT"; then
4163 DEFAULT_IMPL_STRATEGY=_EMU
4166 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
4167 cat >> confdefs.h <<\EOF
4168 #define _PR_NEED_H_ERRNO 1
4171 cat >> confdefs.h <<\EOF
4172 #define HPUX9 1
4175 DEFAULT_IMPL_STRATEGY=_EMU
4176 USE_NSPR_THREADS=1
4179 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
4180 cat >> confdefs.h <<\EOF
4181 #define _PR_NO_LARGE_FILES 1
4186 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4187 cat >> confdefs.h <<\EOF
4188 #define _PR_NEED_H_ERRNO 1
4193 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4194 cat >> confdefs.h <<\EOF
4195 #define HAVE_INT_LOCALTIME_R 1
4200 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
4201 cat >> confdefs.h <<\EOF
4202 #define HAVE_POINTER_LOCALTIME_R 1
4207 # HP-UX 11i v2 (B.11.23) or higher
4209 case "$OS_RELEASE" in
4210 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
4211 USE_IPV6=1
4213 esac
4216 if test "$OS_RELEASE" = "B.10.01"; then
4217 cat >> confdefs.h <<\EOF
4218 #define HPUX10 1
4221 DEFAULT_IMPL_STRATEGY=_EMU
4224 if test "$OS_RELEASE" = "B.10.10"; then
4225 cat >> confdefs.h <<\EOF
4226 #define HPUX10 1
4229 cat >> confdefs.h <<\EOF
4230 #define HPUX10_10 1
4233 DEFAULT_IMPL_STRATEGY=_PTH
4236 if test "$OS_RELEASE" = "B.10.20"; then
4237 cat >> confdefs.h <<\EOF
4238 #define HPUX10 1
4241 cat >> confdefs.h <<\EOF
4242 #define HPUX10_20 1
4245 if test -z "$GNU_CC"; then
4246 CFLAGS="$CFLAGS +DAportable +DS1.1"
4247 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4249 DEFAULT_IMPL_STRATEGY=_PTH
4252 if test "$OS_RELEASE" = "B.10.30"; then
4253 cat >> confdefs.h <<\EOF
4254 #define HPUX10 1
4257 cat >> confdefs.h <<\EOF
4258 #define HPUX10_30 1
4261 if test -z "$GNU_CC"; then
4262 CFLAGS="$CFLAGS +DAportable +DS1.1"
4263 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4265 DEFAULT_IMPL_STRATEGY=_PTH
4268 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
4269 cat >> confdefs.h <<\EOF
4270 #define HPUX10 1
4273 cat >> confdefs.h <<\EOF
4274 #define HPUX11 1
4277 cat >> confdefs.h <<\EOF
4278 #define _LARGEFILE64_SOURCE 1
4281 cat >> confdefs.h <<\EOF
4282 #define _PR_HAVE_OFF64_T 1
4285 cat >> confdefs.h <<\EOF
4286 #define HAVE_FCNTL_FILE_LOCKING 1
4289 if test -z "$GNU_CC"; then
4290 if test -z "$USE_64"; then
4291 if test "$OS_TEST" = "ia64"; then
4292 CFLAGS="$CFLAGS +DD32"
4293 CXXFLAGS="$CXXFLAGS +DD32"
4294 else
4295 CFLAGS="$CFLAGS +DAportable +DS2.0"
4296 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
4298 else
4299 if test "$OS_TEST" = "ia64"; then
4300 CFLAGS="$CFLAGS +DD64"
4301 CXXFLAGS="$CXXFLAGS +DD64"
4302 else
4303 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
4304 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
4308 DEFAULT_IMPL_STRATEGY=_PTH
4311 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
4312 USE_NSPR_THREADS=1
4313 USE_PTHREADS=
4314 USE_USER_PTHREADS=
4315 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
4316 USE_PTHREADS=1
4317 if test "$USE_NSPR_THREADS"; then
4318 USE_PTHREADS=
4320 if test "$USE_USER_PTHREADS"; then
4321 USE_PTHREADS=
4326 *-irix*)
4327 cat >> confdefs.h <<\EOF
4328 #define XP_UNIX 1
4331 cat >> confdefs.h <<\EOF
4332 #define IRIX 1
4335 cat >> confdefs.h <<\EOF
4336 #define SVR4 1
4339 cat >> confdefs.h <<\EOF
4340 #define _SGI_MP_SOURCE 1
4343 cat >> confdefs.h <<\EOF
4344 #define HAVE_FCNTL_FILE_LOCKING 1
4347 PR_MD_CSRCS=irix.c
4348 PR_MD_ASFILES=os_Irix.s
4349 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
4350 STRIP="$STRIP -f"
4351 RESOLVE_LINK_SYMBOLS=1
4352 if test -n "$USE_64"; then
4353 MDCPUCFG_H=_irix64.cfg
4354 else
4355 MDCPUCFG_H=_irix32.cfg
4357 case "${target_os}" in
4358 irix6*)
4359 cat >> confdefs.h <<\EOF
4360 #define IRIX6 1
4363 USE_PTHREADS=1
4364 USE_N32=1
4365 COMPILER_TAG=_n32
4366 IMPL_STRATEGY=_PTH
4368 irix5*)
4369 cat >> confdefs.h <<\EOF
4370 #define IRIX5 1
4373 USE_NSPR_THREADS=1
4376 USE_PTHREADS=1
4377 USE_N32=1
4379 esac
4380 if test "$GNU_CC"; then
4381 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
4382 CFLAGS="$CFLAGS -Wall -Wno-format"
4383 _OPTIMIZE_FLAGS="-O6"
4384 else
4385 if test -n "$USE_N32"; then
4386 AS='as -D_ASM $(INCLUDES) -n32'
4387 else
4388 AS='as -D_ASM $(INCLUDES)'
4390 CFLAGS="$CFLAGS -fullwarn -xansi"
4391 if test "$USE_N32"; then
4392 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
4393 else
4394 _OPTIMIZE_FLAGS="-O -Olimit 4000"
4396 if test "$USE_MDUPDATE"; then
4397 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4399 case "${target}" in
4400 *-irix6.*)
4401 CFLAGS="$CFLAGS -multigot"
4402 DSO_LDOPTS="-no_unresolved"
4403 if test "$USE_N32"; then
4404 CFLAGS="$CFLAGS -n32 -woff 1209"
4405 DSO_LDOPTS="$DSO_LDOPTS -n32"
4406 else
4407 if test "$USE_64"; then
4408 CFLAGS="$CFLAGS -64"
4409 else
4410 CFLAGS="$CFLAGS -32"
4415 CFLAGS="$CFLAGS -xgot"
4417 esac
4419 if test "${target_os}" = "irix5.3"; then
4420 cat >> confdefs.h <<\EOF
4421 #define IRIX5_3 1
4425 case "${target_os}" in
4426 irix6.5)
4427 if test -z "$GNU_CC"; then
4428 CFLAGS="$CFLAGS -mips3"
4430 cat >> confdefs.h <<\EOF
4431 #define _PR_HAVE_GETPROTO_R 1
4434 cat >> confdefs.h <<\EOF
4435 #define _PR_HAVE_GETPROTO_R_POINTER 1
4438 cat >> confdefs.h <<\EOF
4439 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4443 irix5*)
4446 cat >> confdefs.h <<\EOF
4447 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4451 esac
4454 *-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
4455 if test -z "$USE_NSPR_THREADS"; then
4456 USE_PTHREADS=1
4457 IMPL_STRATEGY=_PTH
4459 cat >> confdefs.h <<\EOF
4460 #define XP_UNIX 1
4463 cat >> confdefs.h <<\EOF
4464 #define _GNU_SOURCE 1
4467 cat >> confdefs.h <<\EOF
4468 #define HAVE_FCNTL_FILE_LOCKING 1
4471 case "${target}" in
4472 *-android*|*-linuxandroid*)
4473 OS_TARGET=Android
4474 cat >> confdefs.h <<\EOF
4475 #define LINUX 1
4479 *-linux*)
4480 cat >> confdefs.h <<\EOF
4481 #define LINUX 1
4485 esac
4486 CFLAGS="$CFLAGS -Wall"
4487 CXXFLAGS="$CXXFLAGS -Wall"
4488 MDCPUCFG_H=_linux.cfg
4489 PR_MD_CSRCS=linux.c
4490 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4491 DSO_CFLAGS=-fPIC
4492 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4493 _OPTIMIZE_FLAGS=-O2
4494 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4495 # combo is not yet good at debugging inlined
4496 # functions (even when using DWARF2 as the
4497 # debugging format)
4498 COMPILER_TAG=_glibc
4499 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
4500 CPU_ARCH=x86
4501 else
4502 CPU_ARCH=$OS_TEST
4504 CPU_ARCH_TAG=_${CPU_ARCH}
4505 case "${target_cpu}" in
4506 alpha)
4507 cat >> confdefs.h <<\EOF
4508 #define _ALPHA_ 1
4511 cat >> confdefs.h <<\EOF
4512 #define __alpha 1
4515 CFLAGS="$CFLAGS -mieee"
4516 CXXFLAGS="$CXXFLAGS -mieee"
4518 i*86)
4519 cat >> confdefs.h <<\EOF
4520 #define i386 1
4523 PR_MD_ASFILES=os_Linux_x86.s
4525 ia64)
4526 PR_MD_ASFILES=os_Linux_ia64.s
4528 x86_64)
4529 if test -n "$USE_64"; then
4530 PR_MD_ASFILES=os_Linux_x86_64.s
4531 else
4532 cat >> confdefs.h <<\EOF
4533 #define i386 1
4536 PR_MD_ASFILES=os_Linux_x86.s
4537 CC="$CC -m32"
4538 CXX="$CXX -m32"
4541 ppc|powerpc)
4542 PR_MD_ASFILES=os_Linux_ppc.s
4544 powerpc64)
4545 if test -n "$USE_64"; then
4546 CC="$CC -m64"
4547 CXX="$CXX -m64"
4548 else
4549 PR_MD_ASFILES=os_Linux_ppc.s
4552 m68k)
4553 CFLAGS="$CFLAGS -m68020-60"
4554 CXXFLAGS="$CXXFLAGS -m68020-60"
4556 esac
4559 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
4560 cat >> confdefs.h <<\EOF
4561 #define XP_PC 1
4564 cat >> confdefs.h <<\EOF
4565 #define WIN32 1
4568 PR_MD_ARCH_DIR=windows
4569 RESOLVE_LINK_SYMBOLS=1
4571 if test -n "$GNU_CC"; then
4572 CC="$CC -mwindows"
4573 CXX="$CXX -mwindows"
4574 DLL_SUFFIX=dll
4575 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
4576 RC=$WINDRES
4577 # Use temp file for windres (bug 213281)
4578 RCFLAGS='-O coff --use-temp-file'
4579 else
4580 CC=cl
4581 CXX=cl
4582 LD=link
4583 AR='lib -NOLOGO -OUT:"$@"'
4584 AR_FLAGS=
4585 RANLIB='echo not_ranlib'
4586 STRIP='echo not_strip'
4587 RC=rc.exe
4588 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4589 OBJ_SUFFIX=obj
4590 LIB_SUFFIX=lib
4591 DLL_SUFFIX=dll
4593 # Determine compiler version
4595 _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
4597 CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
4598 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
4599 _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
4600 _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
4601 _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
4602 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4604 if test "$_CC_MAJOR_VERSION" -eq "14"; then
4605 if test $_CC_RELEASE -gt 50727; then
4606 _USE_DYNAMICBASE=1
4607 elif test $_CC_BUILD -ge 762; then
4608 _USE_DYNAMICBASE=1
4610 cat >> confdefs.h <<\EOF
4611 #define _CRT_SECURE_NO_DEPRECATE 1
4614 cat >> confdefs.h <<\EOF
4615 #define _CRT_NONSTDC_NO_DEPRECATE 1
4618 elif test $_CC_MAJOR_VERSION -ge 15; then
4619 _USE_DYNAMICBASE=1
4620 cat >> confdefs.h <<\EOF
4621 #define _CRT_SECURE_NO_WARNINGS 1
4624 cat >> confdefs.h <<\EOF
4625 #define _CRT_NONSTDC_NO_WARNINGS 1
4630 if test -n "$_USE_DYNAMICBASE"; then
4631 DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
4634 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4635 # tape manipulation utility (or something else)
4636 if test "$MSC_VER" -ge "1400"; then
4638 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4641 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4642 if test -n "$MSMT_TOOL"; then
4643 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4644 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4645 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4647 MT=mt
4648 unset MSMT_TOOL
4649 else
4650 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4654 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4655 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4656 _DEBUG_FLAGS=-Zi
4657 _OPTIMIZE_FLAGS=-O2
4659 PROFILE_GEN_CFLAGS="-GL"
4660 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
4661 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
4662 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
4664 if test "$MSC_VER" -ge "1800"; then
4665 CFLAGS="$CFLAGS -FS"
4666 PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
4667 PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw"
4670 if test -z "$MOZ_OPTIMIZE"; then
4671 CFLAGS="$CFLAGS -Od"
4674 if test -n "$USE_DEBUG_RTL"; then
4675 CFLAGS="$CFLAGS -MDd"
4676 else
4677 CFLAGS="$CFLAGS -MD"
4680 if test -n "$MOZ_DEBUG"; then
4681 cat >> confdefs.h <<\EOF
4682 #define _DEBUG 1
4685 else
4686 DEFINES="$DEFINES -U_DEBUG"
4689 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4690 if test -n "$MOZ_OPTIMIZE"; then
4691 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4692 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4693 else
4694 DLLFLAGS="$DLLFLAGS -DEBUG"
4695 LDFLAGS="$LDFLAGS -DEBUG"
4699 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4700 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4701 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4704 if test "$OS_TARGET" = "WINNT"; then
4705 CFLAGS="$CFLAGS -GT"
4706 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4707 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4708 else
4709 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4710 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4712 fi # GNU_CC
4714 if test -n "$USE_STATIC_TLS"; then
4715 cat >> confdefs.h <<\EOF
4716 #define _PR_USE_STATIC_TLS 1
4721 if test "$OS_TARGET" = "WINNT"; then
4722 cat >> confdefs.h <<\EOF
4723 #define WINNT 1
4726 else
4727 cat >> confdefs.h <<\EOF
4728 #define WIN95 1
4731 # undefine WINNT as some versions of mingw gcc define it by default
4732 DEFINES="$DEFINES -UWINNT"
4733 cat >> confdefs.h <<\EOF
4734 #define _PR_GLOBAL_THREADS_ONLY 1
4739 if test "$CPU_ARCH" = "x86"; then
4740 CPU_ARCH_TAG=
4741 else
4742 CPU_ARCH_TAG=$CPU_ARCH
4745 if test -n "$USE_DEBUG_RTL"; then
4746 OBJDIR_SUFFIX=OBJD
4749 case "$OS_TARGET" in
4750 WINNT)
4751 MDCPUCFG_H=_winnt.cfg
4753 WIN95)
4754 MDCPUCFG_H=_win95.cfg
4757 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4759 esac
4761 case "$target_cpu" in
4762 i*86)
4763 if test -n "$USE_64"; then
4764 cat >> confdefs.h <<\EOF
4765 #define _AMD64_ 1
4768 else
4769 cat >> confdefs.h <<\EOF
4770 #define _X86_ 1
4775 x86_64)
4776 cat >> confdefs.h <<\EOF
4777 #define _AMD64_ 1
4780 USE_64=1
4782 ia64)
4783 cat >> confdefs.h <<\EOF
4784 #define _IA64_ 1
4787 USE_64=1
4790 cat >> confdefs.h <<\EOF
4791 #define _CPU_ARCH_NOT_DEFINED 1
4795 esac
4798 *-wince*|*-winmo*)
4799 cat >> confdefs.h <<\EOF
4800 #define XP_PC 1
4803 cat >> confdefs.h <<\EOF
4804 #define WIN32 1
4807 cat >> confdefs.h <<\EOF
4808 #define WINCE 1
4811 cat >> confdefs.h <<\EOF
4812 #define _PR_GLOBAL_THREADS_ONLY 1
4816 AR_FLAGS='-NOLOGO -OUT:"$@"'
4818 OBJ_SUFFIX=obj
4819 LIB_SUFFIX=lib
4820 DLL_SUFFIX=dll
4821 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4823 PR_MD_ARCH_DIR=windows
4824 RESOLVE_LINK_SYMBOLS=1
4826 MDCPUCFG_H=_win95.cfg
4827 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4828 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4830 DLLFLAGS='-OUT:"$@"'
4831 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4832 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4833 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4834 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4836 _DEBUG_FLAGS=-Zi
4837 _OPTIMIZE_FLAGS=-O2
4840 *-netbsd*)
4841 cat >> confdefs.h <<\EOF
4842 #define XP_UNIX 1
4845 cat >> confdefs.h <<\EOF
4846 #define NETBSD 1
4849 cat >> confdefs.h <<\EOF
4850 #define HAVE_BSD_FLOCK 1
4853 if test -z "$USE_NSPR_THREADS"; then
4854 USE_PTHREADS=1
4856 MDCPUCFG_H=_netbsd.cfg
4857 PR_MD_CSRCS=netbsd.c
4859 DSO_CFLAGS='-fPIC -DPIC'
4860 CFLAGS="$CFLAGS -ansi -Wall"
4861 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4862 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4864 if test -z "$OBJECT_FMT"; then
4865 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4866 OBJECT_FMT=a.out
4867 DLL_SUFFIX=so.1.0
4868 DSO_LDOPTS='-shared'
4869 else
4870 OBJECT_FMT=ELF
4871 DLL_SUFFIX=so
4872 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4876 if test "$LIBRUNPATH"; then
4877 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4881 *-nto*)
4882 cat >> confdefs.h <<\EOF
4883 #define XP_UNIX 1
4886 cat >> confdefs.h <<\EOF
4887 #define NTO 1
4890 cat >> confdefs.h <<\EOF
4891 #define _QNX_SOURCE 1
4894 cat >> confdefs.h <<\EOF
4895 #define HAVE_POINTER_LOCALTIME_R 1
4898 MDCPUCFG_H=_nto.cfg
4899 PR_MD_CSRCS=nto.c
4900 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4901 DSO_CFLAGS=-fPIC
4902 DSO_LDOPTS=-shared
4903 OS_LIBS="$OS_LIBS -lsocket"
4904 _OPTIMIZE_FLAGS="-O1"
4905 _DEBUG_FLAGS="-gstabs"
4908 *-openbsd*)
4909 cat >> confdefs.h <<\EOF
4910 #define XP_UNIX 1
4913 cat >> confdefs.h <<\EOF
4914 #define OPENBSD 1
4917 cat >> confdefs.h <<\EOF
4918 #define HAVE_BSD_FLOCK 1
4921 cat >> confdefs.h <<\EOF
4922 #define HAVE_SOCKLEN_T 1
4925 CFLAGS="$CFLAGS -ansi -Wall"
4926 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4927 DLL_SUFFIX=so.1.0
4928 DSO_CFLAGS=-fPIC
4929 MDCPUCFG_H=_openbsd.cfg
4930 PR_MD_CSRCS=openbsd.c
4931 OS_LIBS="-lc"
4932 if test -z "$USE_NSPR_THREADS"; then
4933 USE_PTHREADS=1
4935 DSO_LDOPTS='-shared -fPIC'
4936 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4939 *-osf*)
4940 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4941 cat >> confdefs.h <<\EOF
4942 #define XP_UNIX 1
4945 cat >> confdefs.h <<\EOF
4946 #define OSF1 1
4949 cat >> confdefs.h <<\EOF
4950 #define _REENTRANT 1
4953 # OSF1 and HPUX report the POLLHUP event for a socket when the
4954 # shutdown(SHUT_WR) operation is called for the remote end, even though
4955 # the socket is still writeable. Use select(), instead of poll(), to
4956 # workaround this problem.
4957 cat >> confdefs.h <<\EOF
4958 #define _PR_POLL_WITH_SELECT 1
4962 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4963 USE_NSPR_THREADS=1
4966 if test -z "$GNU_CC"; then
4967 CC="$CC -std1 -ieee_with_inexact"
4968 if test "$OS_RELEASE" != "V2.0"; then
4969 CC="$CC -readonly_strings"
4971 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4972 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4973 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4974 echo "configure:4975: checking for machine/builtins.h" >&5
4975 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4976 echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978 cat > conftest.$ac_ext <<EOF
4979 #line 4980 "configure"
4980 #include "confdefs.h"
4981 #include <machine/builtins.h>
4983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4984 { (eval echo configure:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4986 if test -z "$ac_err"; then
4987 rm -rf conftest*
4988 eval "ac_cv_header_$ac_safe=yes"
4989 else
4990 echo "$ac_err" >&5
4991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
4993 rm -rf conftest*
4994 eval "ac_cv_header_$ac_safe=no"
4996 rm -f conftest*
4998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4999 echo "$ac_t""yes" 1>&6
5000 cat >> confdefs.h <<\EOF
5001 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
5004 else
5005 echo "$ac_t""no" 1>&6
5008 else
5009 CFLAGS="$CFLAGS -mieee"
5010 CXXFLAGS="$CXXFLAGS -mieee"
5013 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
5014 cat >> confdefs.h <<\EOF
5015 #define HAVE_INT_LOCALTIME_R 1
5018 else
5019 cat >> confdefs.h <<\EOF
5020 #define HAVE_FCNTL_FILE_LOCKING 1
5023 cat >> confdefs.h <<\EOF
5024 #define HAVE_POINTER_LOCALTIME_R 1
5028 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
5029 cat >> confdefs.h <<\EOF
5030 #define OSF1V4_MAP_PRIVATE_BUG 1
5034 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
5035 MDCPUCFG_H=_osf1.cfg
5036 PR_MD_CSRCS=osf1.c
5039 *-qnx*)
5040 cat >> confdefs.h <<\EOF
5041 #define XP_UNIX 1
5044 cat >> confdefs.h <<\EOF
5045 #define QNX 1
5048 cat >> confdefs.h <<\EOF
5049 #define _PR_NEED_H_ERRNO 1
5052 USE_NSPR_THREADS=1
5053 MDCPUCFG_H=_qnx.cfg
5054 PR_MD_CSRCS=qnx.c
5057 *-riscos*)
5058 cat >> confdefs.h <<\EOF
5059 #define XP_UNIX 1
5062 cat >> confdefs.h <<\EOF
5063 #define RISCOS 1
5066 cat >> confdefs.h <<\EOF
5067 #define _PR_NEED_H_ERRNO 1
5070 USE_PTHREADS=1
5071 MDCPUCFG_H=_riscos.cfg
5072 PR_MD_CSRCS=riscos.c
5073 DSO_CFLAGS=-fPIC
5074 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
5075 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5078 *-*-sco*)
5079 cat >> confdefs.h <<\EOF
5080 #define XP_UNIX 1
5083 cat >> confdefs.h <<\EOF
5084 #define SCO 1
5087 cat >> confdefs.h <<\EOF
5088 #define sco 1
5091 cat >> confdefs.h <<\EOF
5092 #define SYSV 1
5095 cat >> confdefs.h <<\EOF
5096 #define _SVID3 1
5099 cat >> confdefs.h <<\EOF
5100 #define _PR_NEED_H_ERRNO 1
5103 CC='cc -b elf -KPIC'
5104 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
5105 USE_NSPR_THREADS=1
5106 CPU_ARCH=x86
5107 DSO_LDOPTS='-b elf -G'
5108 MDCPUCFG_H=_scoos.cfg
5109 PR_MD_SRCS=scoos.c
5112 *-solaris*)
5113 if test -z "$USE_NSPR_THREADS"; then
5114 USE_PTHREADS=1
5116 cat >> confdefs.h <<\EOF
5117 #define XP_UNIX 1
5120 cat >> confdefs.h <<\EOF
5121 #define SVR4 1
5124 cat >> confdefs.h <<\EOF
5125 #define SYSV 1
5128 cat >> confdefs.h <<\EOF
5129 #define __svr4 1
5132 cat >> confdefs.h <<\EOF
5133 #define __svr4__ 1
5136 cat >> confdefs.h <<\EOF
5137 #define SOLARIS 1
5140 cat >> confdefs.h <<\EOF
5141 #define HAVE_FCNTL_FILE_LOCKING 1
5144 CPU_ARCH=`uname -p`
5145 MDCPUCFG_H=_solaris.cfg
5146 PR_MD_CSRCS=solaris.c
5147 LD=/usr/ccs/bin/ld
5148 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5149 RESOLVE_LINK_SYMBOLS=1
5150 case "${OS_RELEASE}" in
5151 5.8|5.9)
5154 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
5155 USE_B_DIRECT=1
5157 esac
5158 if test -n "$GNU_CC"; then
5159 DSO_CFLAGS=-fPIC
5160 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
5161 GCC_USE_GNU_LD=1
5163 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
5164 if test -n "$USE_B_DIRECT"; then
5165 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
5167 else
5168 DSO_CFLAGS=-KPIC
5169 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
5170 if test -n "$USE_B_DIRECT"; then
5171 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5174 if test -n "$GNU_CC"; then
5175 CFLAGS="$CFLAGS -Wall"
5176 CXXFLAGS="$CXXFLAGS -Wall"
5177 if test -n "$USE_MDUPDATE"; then
5178 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
5179 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
5181 GCC_AS=`$CC -print-prog-name=as`
5182 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
5183 GNU_AS=1
5185 else
5186 CFLAGS="$CFLAGS -xstrconst"
5187 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
5188 if test -z "$MOZ_OPTIMIZE"; then
5189 CFLAGS="$CFLAGS -xs"
5190 CXXFLAGS="$CXXFLAGS -xs"
5192 _OPTIMIZE_FLAGS=-xO4
5194 if test -z "$GNU_AS"; then
5195 ASFLAGS="$ASFLAGS -Wa,-P"
5197 if test -n "$USE_64"; then
5198 if test -n "$GNU_CC"; then
5199 CC="$CC -m64"
5200 CXX="$CXX -m64"
5201 else
5202 if test "$OS_TEST" = "i86pc"; then
5203 CC="$CC -xarch=amd64"
5204 CXX="$CXX -xarch=amd64"
5205 else
5206 CC="$CC -xarch=v9"
5207 CXX="$CXX -xarch=v9"
5211 if test "$OS_TEST" = "i86pc"; then
5212 if test -z "$USE_64"; then
5213 cat >> confdefs.h <<\EOF
5214 #define i386 1
5218 CPU_ARCH_TAG=_$OS_TEST
5219 # The default debug format, DWARF (-g), is not supported by gcc
5220 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
5221 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
5222 # If your gcc uses GNU as, you do not need the -Wa,-s option.
5223 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
5224 _DEBUG_FLAGS=-gstabs
5225 if test -z "$GNU_AS"; then
5226 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
5230 case "${target_os}" in
5231 solaris2.3*)
5232 cat >> confdefs.h <<\EOF
5233 #define _PR_NO_LARGE_FILES 1
5237 solaris2.4*)
5238 cat >> confdefs.h <<\EOF
5239 #define _PR_NO_LARGE_FILES 1
5243 solaris2.5*)
5244 cat >> confdefs.h <<\EOF
5245 #define SOLARIS2_5 1
5250 cat >> confdefs.h <<\EOF
5251 #define _PR_HAVE_OFF64_T 1
5254 # The lfcompile64(5) man page on Solaris 2.6 says:
5255 # For applications that do not wish to conform to the POSIX or
5256 # X/Open specifications, the 64-bit transitional interfaces
5257 # are available by default. No compile-time flags need to be
5258 # set.
5259 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
5260 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
5261 if test -n "$GNU_CC"; then
5262 cat >> confdefs.h <<\EOF
5263 #define _LARGEFILE64_SOURCE 1
5268 esac
5269 case "${target_os}" in
5270 solaris2.3*)
5272 solaris2.4*)
5274 solaris2.5*)
5276 solaris2.6*)
5278 solaris2.7*)
5281 # Solaris 8 or higher has IPv6.
5282 cat >> confdefs.h <<\EOF
5283 #define _PR_INET6 1
5287 esac
5288 if test "$CPU_ARCH" = "sparc"; then
5289 # 64-bit Solaris SPARC requires V9 architecture, so the following
5290 # is not needed.
5291 if test -z "$USE_64"; then
5292 ULTRASPARC_LIBRARY=nspr_flt
5295 # Purify requires that binaries linked against nspr also
5296 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
5297 _rev=`uname -r`
5298 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
5299 OS_LIBS="$OS_LIBS $_librt"
5302 *-sco-sysv5*)
5303 cat >> confdefs.h <<\EOF
5304 #define XP_UNIX 1
5307 cat >> confdefs.h <<\EOF
5308 #define UNIXWARE 1
5311 cat >> confdefs.h <<\EOF
5312 #define SVR4 1
5315 cat >> confdefs.h <<\EOF
5316 #define SYSV 1
5319 USE_NSPR_THREADS=1
5320 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
5321 cat >> confdefs.h <<\EOF
5322 #define _PR_NO_LARGE_FILES 1
5325 CC='$(NSDEPTH)/build/hcc cc'
5326 CXX='$(NSDEPTH)/build/hcpp CC'
5327 MDCPUCFG_H=_unixware.cfg
5328 else
5329 cat >> confdefs.h <<\EOF
5330 #define _LARGEFILE64_SOURCE 1
5333 cat >> confdefs.h <<\EOF
5334 #define _PR_HAVE_OFF64_T 1
5337 cat >> confdefs.h <<\EOF
5338 #define _PR_HAVE_SOCKADDR_LEN 1
5341 MDCPUCFG_H=_unixware7.cfg
5343 PR_MD_CSRCS=unixware.c
5344 DSO_LDOPTS=-G
5345 CPU_ARCH=x86
5348 *-symbian*)
5349 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
5350 if test "${with_symbian_sdk+set}" = set; then
5351 withval="$with_symbian_sdk"
5352 SYMBIAN_SDK_DIR=$withval
5356 echo -----------------------------------------------------------------------------
5357 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
5358 echo -----------------------------------------------------------------------------
5360 cat >> confdefs.h <<\EOF
5361 #define XP_UNIX 1
5364 cat >> confdefs.h <<\EOF
5365 #define SYMBIAN 1
5368 cat >> confdefs.h <<\EOF
5369 #define __arm__ 1
5372 cat >> confdefs.h <<\EOF
5373 #define __SYMBIAN32__ 1
5376 cat >> confdefs.h <<\EOF
5377 #define _UNICODE 1
5380 cat >> confdefs.h <<\EOF
5381 #define NDEBUG 1
5384 cat >> confdefs.h <<\EOF
5385 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5388 cat >> confdefs.h <<\EOF
5389 #define MOZ_STDERR_TO_STDOUT 1
5392 cat >> confdefs.h <<\EOF
5393 #define HAVE_FCNTL_FILE_LOCKING 1
5396 cat >> confdefs.h <<\EOF
5397 #define HAVE_SOCKLEN_T 1
5400 USE_PTHREADS=1
5401 LIB_SUFFIX=lib
5402 DLL_SUFFIX=dll
5403 MKSHLIB=
5404 DSO_LDOPTS=
5405 DSO_CFLAGS=
5406 VISIBILITY_FLAGS=
5407 MDCPUCFG_H=_symbian.cfg
5408 PR_MD_CSRCS=symbian.c
5409 NSINSTALL=nsinstall
5410 RANLIB='echo no ranlib '
5411 CPU_ARCH=ARM
5412 OS_ARCH=SYMBIAN
5413 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5414 CFLAGS="$CFLAGS -MD -nostdinc"
5415 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5416 echo -------------------------------------------------------
5417 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5418 echo -------------------------------------------------------
5419 case "$OS_TARGET" in
5420 WINSCW)
5421 CC=mwccsym2.exe
5422 CXX=mwccsym2.exe
5423 LD=mwldsym2.exe
5424 AR=mwldsym2.exe
5425 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5426 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)"
5427 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5428 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5429 cat >> confdefs.h <<\EOF
5430 #define _DEBUG 1
5433 cat >> confdefs.h <<\EOF
5434 #define __CW32__ 1
5437 cat >> confdefs.h <<\EOF
5438 #define __WINS__ 1
5441 cat >> confdefs.h <<\EOF
5442 #define __WINSCW__ 1
5445 DEFINES="$DEFINES -U_WIN32"
5447 GCCE)
5448 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5449 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5450 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5451 cat >> confdefs.h <<\EOF
5452 #define __GCCE__ 1
5455 cat >> confdefs.h <<\EOF
5456 #define __EABI__ 1
5459 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5462 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5464 esac
5465 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5468 *-os2*)
5469 cat >> confdefs.h <<\EOF
5470 #define XP_OS2 1
5473 cat >> confdefs.h <<\EOF
5474 #define XP_PC 1
5477 cat >> confdefs.h <<\EOF
5478 #define BSD_SELECT 1
5481 cat >> confdefs.h <<\EOF
5482 #define TCPV40HDRS 1
5485 LIB_SUFFIX=lib
5486 DLL_SUFFIX=dll
5487 RC=rc.exe
5488 PR_MD_ARCH_DIR=os2
5489 PROG_SUFFIX=.exe
5490 NSINSTALL=nsinstall
5491 MDCPUCFG_H=_os2.cfg
5492 RESOLVE_LINK_SYMBOLS=1
5494 cat >> confdefs.h <<\EOF
5495 #define OS2 1
5498 AR=emxomfar
5499 AR_FLAGS='r $@'
5500 CFLAGS="$CFLAGS -Wall -Zomf"
5501 CXXFLAGS="$CFLAGS -Wall -Zomf"
5502 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5503 DSO_CFLAGS=
5504 DSO_LDOPTS='-Zomf -Zdll'
5505 LDFLAGS='-Zmap'
5506 _OPTIMIZE_FLAGS="-O2 -s"
5507 _DEBUG_FLAGS="-g -fno-inline"
5508 if test -n "$MOZ_OPTIMIZE"; then
5509 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5511 IMPLIB='emximp -o'
5512 FILTER='emxexp -o'
5513 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5514 LDFLAGS="$LDFLAGS -Zhigh-mem"
5515 cat >> confdefs.h <<\EOF
5516 #define MOZ_OS2_HIGH_MEMORY 1
5521 # GCC for OS/2 currently predefines these, but we don't want them
5522 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5526 cat >> confdefs.h <<\EOF
5527 #define XP_UNIX 1
5532 esac
5534 if test -z "$SKIP_LIBRARY_CHECKS"; then
5538 case $target in
5539 *-darwin*|*-beos*|*-os2*)
5542 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5543 echo "configure:5544: checking for dlopen in -ldl" >&5
5544 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5545 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5546 echo $ac_n "(cached) $ac_c" 1>&6
5547 else
5548 ac_save_LIBS="$LIBS"
5549 LIBS="-ldl $LIBS"
5550 cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553 /* Override any gcc2 internal prototype to avoid an error. */
5554 /* We use char because int might match the return type of a gcc2
5555 builtin and then its argument prototype would still apply. */
5556 char dlopen();
5558 int main() {
5559 dlopen()
5560 ; return 0; }
5562 if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5563 rm -rf conftest*
5564 eval "ac_cv_lib_$ac_lib_var=yes"
5565 else
5566 echo "configure: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5568 rm -rf conftest*
5569 eval "ac_cv_lib_$ac_lib_var=no"
5571 rm -f conftest*
5572 LIBS="$ac_save_LIBS"
5575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5576 echo "$ac_t""yes" 1>&6
5577 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5578 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5579 echo "configure:5580: checking for dlfcn.h" >&5
5580 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5581 echo $ac_n "(cached) $ac_c" 1>&6
5582 else
5583 cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586 #include <dlfcn.h>
5588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5589 { (eval echo configure:5590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5591 if test -z "$ac_err"; then
5592 rm -rf conftest*
5593 eval "ac_cv_header_$ac_safe=yes"
5594 else
5595 echo "$ac_err" >&5
5596 echo "configure: failed program was:" >&5
5597 cat conftest.$ac_ext >&5
5598 rm -rf conftest*
5599 eval "ac_cv_header_$ac_safe=no"
5601 rm -f conftest*
5603 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5604 echo "$ac_t""yes" 1>&6
5605 OS_LIBS="-ldl $OS_LIBS"
5606 else
5607 echo "$ac_t""no" 1>&6
5610 else
5611 echo "$ac_t""no" 1>&6
5615 esac
5620 if test $ac_cv_prog_gcc = yes; then
5621 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5622 echo "configure:5623: checking whether ${CC-cc} needs -traditional" >&5
5623 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5624 echo $ac_n "(cached) $ac_c" 1>&6
5625 else
5626 ac_pattern="Autoconf.*'x'"
5627 cat > conftest.$ac_ext <<EOF
5628 #line 5629 "configure"
5629 #include "confdefs.h"
5630 #include <sgtty.h>
5631 Autoconf TIOCGETP
5633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5634 egrep "$ac_pattern" >/dev/null 2>&1; then
5635 rm -rf conftest*
5636 ac_cv_prog_gcc_traditional=yes
5637 else
5638 rm -rf conftest*
5639 ac_cv_prog_gcc_traditional=no
5641 rm -f conftest*
5644 if test $ac_cv_prog_gcc_traditional = no; then
5645 cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648 #include <termio.h>
5649 Autoconf TCGETA
5651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5652 egrep "$ac_pattern" >/dev/null 2>&1; then
5653 rm -rf conftest*
5654 ac_cv_prog_gcc_traditional=yes
5656 rm -f conftest*
5661 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5662 if test $ac_cv_prog_gcc_traditional = yes; then
5663 CC="$CC -traditional"
5667 _SAVE_LIBS="$LIBS"
5668 LIBS="$LIBS $OS_LIBS"
5669 for ac_func in dladdr gettid lchown setpriority strerror syscall
5671 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5672 echo "configure:5673: checking for $ac_func" >&5
5673 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5674 echo $ac_n "(cached) $ac_c" 1>&6
5675 else
5676 cat > conftest.$ac_ext <<EOF
5677 #line 5678 "configure"
5678 #include "confdefs.h"
5679 /* System header to define __stub macros and hopefully few prototypes,
5680 which can conflict with char $ac_func(); below. */
5681 #include <assert.h>
5682 /* Override any gcc2 internal prototype to avoid an error. */
5683 /* We use char because int might match the return type of a gcc2
5684 builtin and then its argument prototype would still apply. */
5685 char $ac_func();
5687 int main() {
5689 /* The GNU C library defines this for functions which it implements
5690 to always fail with ENOSYS. Some functions are actually named
5691 something starting with __ and the normal name is an alias. */
5692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5693 choke me
5694 #else
5695 $ac_func();
5696 #endif
5698 ; return 0; }
5700 if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5701 rm -rf conftest*
5702 eval "ac_cv_func_$ac_func=yes"
5703 else
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5706 rm -rf conftest*
5707 eval "ac_cv_func_$ac_func=no"
5709 rm -f conftest*
5712 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5713 echo "$ac_t""yes" 1>&6
5714 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5715 cat >> confdefs.h <<EOF
5716 #define $ac_tr_func 1
5719 else
5720 echo "$ac_t""no" 1>&6
5722 done
5724 LIBS="$_SAVE_LIBS"
5728 # Check whether --with-ccache or --without-ccache was given.
5729 if test "${with_ccache+set}" = set; then
5730 withval="$with_ccache"
5731 CCACHE=$withval
5732 else
5733 CCACHE="no"
5737 if test "$CCACHE" != "no"; then
5738 if test -n "$CCACHE"; then
5739 if test "$CCACHE" = "yes"; then
5740 CCACHE=
5741 else
5742 if test ! -e "$CCACHE"; then
5743 { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
5747 for ac_prog in $CCACHE ccache
5749 # Extract the first word of "$ac_prog", so it can be a program name with args.
5750 set dummy $ac_prog; ac_word=$2
5751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5752 echo "configure:5753: checking for $ac_word" >&5
5753 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755 else
5756 case "$CCACHE" in
5758 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
5760 ?:/*)
5761 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
5764 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5765 ac_dummy="$PATH"
5766 for ac_dir in $ac_dummy; do
5767 test -z "$ac_dir" && ac_dir=.
5768 if test -f $ac_dir/$ac_word; then
5769 ac_cv_path_CCACHE="$ac_dir/$ac_word"
5770 break
5772 done
5773 IFS="$ac_save_ifs"
5775 esac
5777 CCACHE="$ac_cv_path_CCACHE"
5778 if test -n "$CCACHE"; then
5779 echo "$ac_t""$CCACHE" 1>&6
5780 else
5781 echo "$ac_t""no" 1>&6
5784 test -n "$CCACHE" && break
5785 done
5787 if test -z "$CCACHE" -o "$CCACHE" = ":"; then
5788 { echo "configure: error: ccache not found" 1>&2; exit 1; }
5789 elif test -x "$CCACHE"; then
5790 CC="$CCACHE $CC"
5791 CXX="$CCACHE $CXX"
5792 else
5793 { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
5797 # Check whether --enable-strip or --disable-strip was given.
5798 if test "${enable_strip+set}" = set; then
5799 enableval="$enable_strip"
5800 if test "$enableval" = "yes"; then
5801 ENABLE_STRIP=1
5806 case "${target_os}" in
5807 hpux*)
5808 if test -z "$GNU_CC"; then
5810 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5811 echo "configure:5812: checking for +Olit support" >&5
5812 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5813 echo $ac_n "(cached) $ac_c" 1>&6
5814 else
5815 ac_cv_hpux_usable_olit_option=no
5816 rm -f conftest*
5817 echo 'int main() { return 0; }' | cat > conftest.c
5818 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5819 if test $? -eq 0; then
5820 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5821 ac_cv_hpux_usable_olit_option=yes
5824 rm -f conftest*
5828 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5830 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5831 CFLAGS="$CFLAGS +Olit=all"
5832 CXXFLAGS="$CXXFLAGS +Olit=all"
5833 else
5834 CFLAGS="$CFLAGS +ESlit"
5835 CXXFLAGS="$CXXFLAGS +ESlit"
5839 esac
5843 case "$target_os" in
5844 darwin*)
5845 _HAVE_PTHREADS=1
5847 wince*)
5848 _HAVE_PTHREADS=
5852 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5853 echo "configure:5854: checking for pthread_create in -lpthreads" >&5
5854 echo "
5855 #include <pthread.h>
5856 void *foo(void *v) { return v; }
5857 int main() {
5858 pthread_t t;
5859 if (!pthread_create(&t, 0, &foo, 0)) {
5860 pthread_join(t, 0);
5862 return 0;
5863 }" > dummy.c ;
5864 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5865 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5866 _res=$? ;
5867 rm -f dummy.c dummy${ac_exeext} ;
5868 if test "$_res" = "0"; then
5869 echo "$ac_t""yes" 1>&6
5870 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5871 else
5872 echo "$ac_t""no" 1>&6
5874 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5875 echo "configure:5876: checking for pthread_create in -lpthread" >&5
5876 echo "
5877 #include <pthread.h>
5878 void *foo(void *v) { return v; }
5879 int main() {
5880 pthread_t t;
5881 if (!pthread_create(&t, 0, &foo, 0)) {
5882 pthread_join(t, 0);
5884 return 0;
5885 }" > dummy.c ;
5886 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5887 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5888 _res=$? ;
5889 rm -f dummy.c dummy${ac_exeext} ;
5890 if test "$_res" = "0"; then
5891 echo "$ac_t""yes" 1>&6
5892 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5893 else
5894 echo "$ac_t""no" 1>&6
5896 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5897 echo "configure:5898: checking for pthread_create in -lc_r" >&5
5898 echo "
5899 #include <pthread.h>
5900 void *foo(void *v) { return v; }
5901 int main() {
5902 pthread_t t;
5903 if (!pthread_create(&t, 0, &foo, 0)) {
5904 pthread_join(t, 0);
5906 return 0;
5907 }" > dummy.c ;
5908 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5909 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5910 _res=$? ;
5911 rm -f dummy.c dummy${ac_exeext} ;
5912 if test "$_res" = "0"; then
5913 echo "$ac_t""yes" 1>&6
5914 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5915 else
5916 echo "$ac_t""no" 1>&6
5918 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5919 echo "configure:5920: checking for pthread_create in -lc" >&5
5920 echo "
5921 #include <pthread.h>
5922 void *foo(void *v) { return v; }
5923 int main() {
5924 pthread_t t;
5925 if (!pthread_create(&t, 0, &foo, 0)) {
5926 pthread_join(t, 0);
5928 return 0;
5929 }" > dummy.c ;
5930 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5931 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5932 _res=$? ;
5933 rm -f dummy.c dummy${ac_exeext} ;
5934 if test "$_res" = "0"; then
5935 echo "$ac_t""yes" 1>&6
5936 _HAVE_PTHREADS=1
5938 else
5939 echo "$ac_t""no" 1>&6
5953 esac
5955 # Check whether --with-pthreads or --without-pthreads was given.
5956 if test "${with_pthreads+set}" = set; then
5957 withval="$with_pthreads"
5958 if test "$withval" = "yes"; then
5959 if test -n "$_HAVE_PTHREADS"; then
5960 USE_PTHREADS=1
5961 USE_USER_PTHREADS=
5962 USE_NSPR_THREADS=
5963 else
5964 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5966 else
5967 USE_PTHREADS=
5968 _PTHREAD_LDFLAGS=
5970 else
5971 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5972 USE_PTHREADS=1
5973 USE_USER_PTHREADS=
5974 USE_NSPR_THREADS=
5979 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5980 if test "${enable_user_pthreads+set}" = set; then
5981 enableval="$enable_user_pthreads"
5982 if test "$enableval" = "yes"; then
5983 if test -n "$_HAVE_PTHREADS"; then
5984 USE_PTHREADS=
5985 USE_USER_PTHREADS=1
5986 USE_NSPR_THREADS=
5987 else
5988 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5994 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5995 if test "${enable_nspr_threads+set}" = set; then
5996 enableval="$enable_nspr_threads"
5997 if test "$enableval" = "yes"; then
5998 USE_PTHREADS=
5999 USE_USER_PTHREADS=
6000 USE_NSPR_THREADS=1
6005 case "$target" in
6006 *-beos*)
6007 # Check whether --with-bthreads or --without-bthreads was given.
6008 if test "${with_bthreads+set}" = set; then
6009 withval="$with_bthreads"
6010 if test "$withval" = "yes"; then
6011 USE_BTHREADS=1
6012 USE_USER_PTHREADS=
6013 USE_PTHREADS=
6018 esac
6020 fi # SKIP_LIBRARY_CHECKS
6022 # Check whether --enable-ipv6 or --disable-ipv6 was given.
6023 if test "${enable_ipv6+set}" = set; then
6024 enableval="$enable_ipv6"
6025 if test "$enableval" = "yes"; then
6026 USE_IPV6=1
6027 else
6028 USE_IPV6=
6033 if test -n "$USE_PTHREADS"; then
6034 rm -f conftest*
6035 ac_cv_have_dash_pthread=no
6036 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
6037 echo "configure:6038: checking whether ${CC-cc} accepts -pthread" >&5
6038 echo 'int main() { return 0; }' | cat > conftest.c
6039 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
6040 if test $? -eq 0; then
6041 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
6042 ac_cv_have_dash_pthread=yes
6043 case "$target_os" in
6044 freebsd*)
6045 # Freebsd doesn't use -pthread for compiles, it uses them for linking
6048 CFLAGS="$CFLAGS -pthread"
6049 CXXFLAGS="$CXXFLAGS -pthread"
6051 esac
6054 rm -f conftest*
6055 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
6057 ac_cv_have_dash_pthreads=no
6058 if test "$ac_cv_have_dash_pthread" = "no"; then
6059 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
6060 echo "configure:6061: checking whether ${CC-cc} accepts -pthreads" >&5
6061 echo 'int main() { return 0; }' | cat > conftest.c
6062 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
6063 if test $? -eq 0; then
6064 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
6065 ac_cv_have_dash_pthreads=yes
6066 CFLAGS="$CFLAGS -pthreads"
6067 CXXFLAGS="$CXXFLAGS -pthreads"
6070 rm -f conftest*
6071 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
6074 case "$target" in
6075 *-solaris*)
6076 if test "$ac_cv_have_dash_pthreads" = "yes"; then
6077 _PTHREAD_LDFLAGS=
6080 *-freebsd*)
6081 cat >> confdefs.h <<\EOF
6082 #define _REENTRANT 1
6085 cat >> confdefs.h <<\EOF
6086 #define _THREAD_SAFE 1
6089 if test "$ac_cv_have_dash_pthread" = "yes"; then
6090 _PTHREAD_LDFLAGS="-pthread"
6091 else
6092 _PTHREAD_LDFLAGS="-lc_r"
6095 *-netbsd*)
6096 if test "$ac_cv_have_dash_pthread" = "yes"; then
6097 _PTHREAD_LDFLAGS="-pthread"
6100 *-bsdi*)
6101 cat >> confdefs.h <<\EOF
6102 #define _THREAD_SAFE 1
6105 if test "$ac_cv_have_dash_pthread" = "yes"; then
6106 _PTHREAD_LDFLAGS=
6109 *-openbsd*)
6110 if test "$ac_cv_have_dash_pthread" = "yes"; then
6111 _PTHREAD_LDFLAGS=-pthread
6114 *-linux*|*-gnu*|*-k*bsd*-gnu)
6115 cat >> confdefs.h <<\EOF
6116 #define _REENTRANT 1
6120 esac
6122 else
6123 if test -n "$USE_USER_PTHREADS"; then
6124 USE_PTHREADS=
6125 USE_NSPR_THREADS=
6126 else
6127 _PTHREAD_LDFLAGS=
6131 case "$target" in
6132 *-aix*)
6133 if test -n "$USE_NSPR_THREADS"; then
6134 cat >> confdefs.h <<\EOF
6135 #define _PR_LOCAL_THREADS_ONLY 1
6139 case "$target_os" in
6140 aix4.1*)
6141 if test -z "$USE_PTHREADS"; then
6142 cat >> confdefs.h <<\EOF
6143 #define AIX_RENAME_SELECT 1
6148 aix4.2*)
6149 if test -z "$USE_NSPR_THREADS"; then
6150 cat >> confdefs.h <<\EOF
6151 #define HAVE_POINTER_LOCALTIME_R 1
6156 aix4.3*)
6157 if test -z "$USE_NSPR_THREADS"; then
6158 cat >> confdefs.h <<\EOF
6159 #define HAVE_POINTER_LOCALTIME_R 1
6163 if test -n "$USE_PTHREADS"; then
6164 cat >> confdefs.h <<\EOF
6165 #define _PR_HAVE_THREADSAFE_GETHOST 1
6171 if test -z "$USE_NSPR_THREADS"; then
6172 cat >> confdefs.h <<\EOF
6173 #define HAVE_POINTER_LOCALTIME_R 1
6177 if test -n "$USE_PTHREADS"; then
6178 cat >> confdefs.h <<\EOF
6179 #define _PR_HAVE_THREADSAFE_GETHOST 1
6184 esac
6186 *-bsdi*)
6187 if test -n "$USE_PTHREADS"; then
6188 cat >> confdefs.h <<\EOF
6189 #define _PR_NEED_PTHREAD_INIT 1
6194 *-freebsd*)
6195 if test -n "$USE_NSPR_THREADS"; then
6196 cat >> confdefs.h <<\EOF
6197 #define _PR_LOCAL_THREADS_ONLY 1
6202 *-hpux*)
6203 if test -n "$USE_NSPR_THREADS"; then
6204 cat >> confdefs.h <<\EOF
6205 #define _PR_LOCAL_THREADS_ONLY 1
6209 if test "$USE_PTHREADS"; then
6210 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
6211 cat >> confdefs.h <<\EOF
6212 #define _REENTRANT 1
6215 cat >> confdefs.h <<\EOF
6216 #define _PR_DCETHREADS 1
6219 else
6220 cat >> confdefs.h <<EOF
6221 #define _POSIX_C_SOURCE 199506L
6224 cat >> confdefs.h <<\EOF
6225 #define _PR_HAVE_THREADSAFE_GETHOST 1
6230 if test "$USE_USER_PTHREADS"; then
6231 cat >> confdefs.h <<EOF
6232 #define _POSIX_C_SOURCE 199506L
6237 *-irix*)
6238 if test "${target_os}" = "irix6.5"; then
6239 if test -n "$USE_PTHREADS"; then
6240 cat >> confdefs.h <<\EOF
6241 #define _PR_HAVE_GETHOST_R 1
6244 cat >> confdefs.h <<\EOF
6245 #define _PR_HAVE_GETHOST_R_POINTER 1
6251 *-linux*|*-gnu*|*-k*bsd*-gnu)
6252 if test -n "$USE_NSPR_THREADS"; then
6253 cat >> confdefs.h <<\EOF
6254 #define _PR_LOCAL_THREADS_ONLY 1
6259 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
6260 USE_PTHREADS=
6261 _PTHREAD_LDFLAGS=
6262 USE_USER_PTHREADS=
6264 *-netbsd*|*-openbsd*)
6265 if test -n "$USE_NSPR_THREADS"; then
6266 cat >> confdefs.h <<\EOF
6267 #define _PR_LOCAL_THREADS_ONLY 1
6272 *-osf*)
6273 if test -n "$USE_NSPR_THREADS"; then
6274 cat >> confdefs.h <<\EOF
6275 #define _PR_LOCAL_THREADS_ONLY 1
6279 if test -n "$USE_PTHREADS"; then
6280 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
6282 else
6283 cat >> confdefs.h <<\EOF
6284 #define _PR_HAVE_THREADSAFE_GETHOST 1
6290 *-solaris*)
6291 if test -n "$USE_NSPR_THREADS"; then
6292 cat >> confdefs.h <<\EOF
6293 #define _PR_LOCAL_THREADS_ONLY 1
6297 if test -n "$USE_PTHREADS"; then
6298 cat >> confdefs.h <<\EOF
6299 #define _REENTRANT 1
6302 cat >> confdefs.h <<\EOF
6303 #define HAVE_POINTER_LOCALTIME_R 1
6306 if test "$OS_TEST" = "i86pc"; then
6307 if test -n "$USE_64"; then
6308 PR_MD_ASFILES=os_SunOS_x86_64.s
6309 else
6310 PR_MD_ASFILES=os_SunOS_x86.s
6312 else
6313 if test -n "$USE_64"; then
6314 PR_MD_ASFILES=os_SunOS_sparcv9.s
6319 *-nto*)
6320 if test -n "$USE_PTHREADS"; then
6321 cat >> confdefs.h <<\EOF
6322 #define _PR_HAVE_GETHOST_R 1
6325 cat >> confdefs.h <<\EOF
6326 #define _PR_HAVE_GETHOST_R_POINTER 1
6331 esac
6333 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
6335 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
6336 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
6339 if test -n "$_SAVE_DEBUG_FLAGS"; then
6340 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
6343 if test -n "$MOZ_OPTIMIZE"; then
6344 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
6345 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
6348 if test -n "$MOZ_DEBUG_SYMBOLS"; then
6349 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
6350 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
6353 if test -n "$MOZ_OPTIMIZE"; then
6354 OBJDIR_TAG=_OPT
6355 else
6356 OBJDIR_TAG=_DBG
6359 if test -n "$USE_64"; then
6360 COMPILER_TAG=_64
6363 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
6365 case "$target_os" in
6366 cygwin*|msvc*|mks*)
6367 CC="\$(CYGWIN_WRAPPER) $CC"
6368 CXX="\$(CYGWIN_WRAPPER) $CXX"
6369 RC="\$(CYGWIN_WRAPPER) $RC"
6371 esac
6373 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
6374 if test "${enable_wrap_malloc+set}" = set; then
6375 enableval="$enable_wrap_malloc"
6376 if test "$enableval" = "yes"; then
6377 _WRAP_MALLOC=1
6382 if test -n "$_WRAP_MALLOC"; then
6383 if test -n "$GNU_CC"; then
6384 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
6385 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
6386 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
6387 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
6388 else
6389 { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6393 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6394 if test "${with_wrap_malloc+set}" = set; then
6395 withval="$with_wrap_malloc"
6396 WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
6504 MAKEFILES="
6505 Makefile
6506 config/Makefile
6507 config/autoconf.mk
6508 config/nsprincl.mk
6509 config/nsprincl.sh
6510 config/nspr-config
6511 config/nspr.pc
6512 lib/Makefile
6513 lib/ds/Makefile
6514 lib/libc/Makefile
6515 lib/libc/include/Makefile
6516 lib/libc/src/Makefile
6517 lib/tests/Makefile
6518 pkg/Makefile
6519 pr/Makefile
6520 pr/include/Makefile
6521 pr/include/md/Makefile
6522 pr/include/obsolete/Makefile
6523 pr/include/private/Makefile
6524 pr/src/Makefile
6525 pr/src/io/Makefile
6526 pr/src/linking/Makefile
6527 pr/src/malloc/Makefile
6528 pr/src/md/Makefile
6529 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6530 pr/src/memory/Makefile
6531 pr/src/misc/Makefile
6532 pr/src/threads/Makefile
6533 pr/tests/Makefile
6534 pr/tests/dll/Makefile
6537 if test "$OS_TARGET" = "Linux"; then
6538 MAKEFILES="$MAKEFILES
6539 pkg/linux/Makefile
6541 elif test "$OS_TARGET" = "SunOS"; then
6542 MAKEFILES="$MAKEFILES
6543 pkg/solaris/Makefile
6544 pkg/solaris/SUNWpr/Makefile
6545 pkg/solaris/SUNWprd/Makefile
6549 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6550 MAKEFILES="$MAKEFILES
6551 pr/src/threads/combined/Makefile
6553 elif test -n "$USE_PTHREADS"; then
6554 MAKEFILES="$MAKEFILES
6555 pr/src/pthreads/Makefile
6557 elif test -n "$USE_BTHREADS"; then
6558 MAKEFILES="$MAKEFILES
6559 pr/src/bthreads/Makefile
6563 if test -n "$USE_CPLUS"; then
6564 MAKEFILES="$MAKEFILES
6565 pr/src/cplus/Makefile
6566 pr/src/cplus/tests/Makefile
6570 echo $MAKEFILES > unallmakefiles
6572 trap '' 1 2 15
6573 cat > confcache <<\EOF
6574 # This file is a shell script that caches the results of configure
6575 # tests run on this system so they can be shared between configure
6576 # scripts and configure runs. It is not useful on other systems.
6577 # If it contains results you don't want to keep, you may remove or edit it.
6579 # By default, configure uses ./config.cache as the cache file,
6580 # creating it if it does not exist already. You can give configure
6581 # the --cache-file=FILE option to use a different cache file; that is
6582 # what configure does when it calls configure scripts in
6583 # subdirectories, so they share the cache.
6584 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6585 # config.status only pays attention to the cache file if you give it the
6586 # --recheck option to rerun configure.
6589 # The following way of writing the cache mishandles newlines in values,
6590 # but we know of no workaround that is simple, portable, and efficient.
6591 # So, don't put newlines in cache variables' values.
6592 # Ultrix sh set writes to stderr and can't be redirected directly,
6593 # and sets the high bit in the cache file unless we assign to the vars.
6594 (set) 2>&1 |
6595 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6596 *ac_space=\ *)
6597 # `set' does not quote correctly, so add quotes (double-quote substitution
6598 # turns \\\\ into \\, and sed turns \\ into \).
6599 sed -n \
6600 -e "s/'/'\\\\''/g" \
6601 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6604 # `set' quotes correctly as required by POSIX, so do not add quotes.
6605 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6607 esac >> confcache
6608 if cmp -s $cache_file confcache; then
6610 else
6611 if test -w $cache_file; then
6612 echo "updating cache $cache_file"
6613 cat confcache > $cache_file
6614 else
6615 echo "not updating unwritable cache $cache_file"
6618 rm -f confcache
6620 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6622 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6623 # Let make expand exec_prefix.
6624 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6626 # Any assignment to VPATH causes Sun make to only execute
6627 # the first set of double-colon rules, so remove it if not needed.
6628 # If there is a colon in the path, we need to keep it.
6629 if test "x$srcdir" = x.; then
6630 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6633 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6635 # Transform confdefs.h into DEFS.
6636 # Protect against shell expansion while executing Makefile rules.
6637 # Protect against Makefile macro expansion.
6638 cat > conftest.defs <<\EOF
6639 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6640 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6641 s%\[%\\&%g
6642 s%\]%\\&%g
6643 s%\$%$$%g
6645 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
6646 rm -f conftest.defs
6649 # Without the "./", some shells look in PATH for config.status.
6650 : ${CONFIG_STATUS=./config.status}
6652 echo creating $CONFIG_STATUS
6653 rm -f $CONFIG_STATUS
6654 cat > $CONFIG_STATUS <<EOF
6655 #! /bin/sh
6656 # Generated automatically by configure.
6657 # Run this file to recreate the current configuration.
6658 # This directory was configured as follows,
6659 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6661 # $0 $ac_configure_args
6663 # Compiler output produced by configure, useful for debugging
6664 # configure, is in ./config.log if it exists.
6666 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6667 for ac_option
6669 case "\$ac_option" in
6670 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6671 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6672 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6673 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6674 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6675 exit 0 ;;
6676 -help | --help | --hel | --he | --h)
6677 echo "\$ac_cs_usage"; exit 0 ;;
6678 *) echo "\$ac_cs_usage"; exit 1 ;;
6679 esac
6680 done
6682 ac_given_srcdir=$srcdir
6684 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6686 cat >> $CONFIG_STATUS <<EOF
6690 # Protect against being on the right side of a sed subst in config.status.
6691 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6692 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6693 $ac_vpsub
6694 $extrasub
6695 s%@SHELL@%$SHELL%g
6696 s%@CFLAGS@%$CFLAGS%g
6697 s%@CPPFLAGS@%$CPPFLAGS%g
6698 s%@CXXFLAGS@%$CXXFLAGS%g
6699 s%@FFLAGS@%$FFLAGS%g
6700 s%@DEFS@%$DEFS%g
6701 s%@LDFLAGS@%$LDFLAGS%g
6702 s%@LIBS@%$LIBS%g
6703 s%@exec_prefix@%$exec_prefix%g
6704 s%@prefix@%$prefix%g
6705 s%@program_transform_name@%$program_transform_name%g
6706 s%@bindir@%$bindir%g
6707 s%@sbindir@%$sbindir%g
6708 s%@libexecdir@%$libexecdir%g
6709 s%@datadir@%$datadir%g
6710 s%@sysconfdir@%$sysconfdir%g
6711 s%@sharedstatedir@%$sharedstatedir%g
6712 s%@localstatedir@%$localstatedir%g
6713 s%@libdir@%$libdir%g
6714 s%@includedir@%$includedir%g
6715 s%@oldincludedir@%$oldincludedir%g
6716 s%@infodir@%$infodir%g
6717 s%@mandir@%$mandir%g
6718 s%@host@%$host%g
6719 s%@host_alias@%$host_alias%g
6720 s%@host_cpu@%$host_cpu%g
6721 s%@host_vendor@%$host_vendor%g
6722 s%@host_os@%$host_os%g
6723 s%@target@%$target%g
6724 s%@target_alias@%$target_alias%g
6725 s%@target_cpu@%$target_cpu%g
6726 s%@target_vendor@%$target_vendor%g
6727 s%@target_os@%$target_os%g
6728 s%@build@%$build%g
6729 s%@build_alias@%$build_alias%g
6730 s%@build_cpu@%$build_cpu%g
6731 s%@build_vendor@%$build_vendor%g
6732 s%@build_os@%$build_os%g
6733 s%@CC@%$CC%g
6734 s%@dist_prefix@%$dist_prefix%g
6735 s%@dist_bindir@%$dist_bindir%g
6736 s%@dist_includedir@%$dist_includedir%g
6737 s%@dist_libdir@%$dist_libdir%g
6738 s%@WHOAMI@%$WHOAMI%g
6739 s%@HOST_CC@%$HOST_CC%g
6740 s%@CXX@%$CXX%g
6741 s%@RANLIB@%$RANLIB%g
6742 s%@AR@%$AR%g
6743 s%@AS@%$AS%g
6744 s%@LD@%$LD%g
6745 s%@STRIP@%$STRIP%g
6746 s%@WINDRES@%$WINDRES%g
6747 s%@CPP@%$CPP%g
6748 s%@PERL@%$PERL%g
6749 s%@CCACHE@%$CCACHE%g
6750 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6751 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6752 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6753 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6754 s%@GNU_CC@%$GNU_CC%g
6755 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6756 s%@MSC_VER@%$MSC_VER%g
6757 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6758 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6759 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
6760 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
6761 s%@USE_CPLUS@%$USE_CPLUS%g
6762 s%@USE_IPV6@%$USE_IPV6%g
6763 s%@USE_N32@%$USE_N32%g
6764 s%@USE_64@%$USE_64%g
6765 s%@OBJECT_MODE@%$OBJECT_MODE%g
6766 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6767 s%@USE_PTHREADS@%$USE_PTHREADS%g
6768 s%@USE_BTHREADS@%$USE_BTHREADS%g
6769 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6770 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6771 s%@LIBNSPR@%$LIBNSPR%g
6772 s%@LIBPLC@%$LIBPLC%g
6773 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6774 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6775 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6776 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6777 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6778 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6779 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6780 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6781 s%@CPU_ARCH@%$CPU_ARCH%g
6782 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6783 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6784 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6785 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6786 s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
6787 s%@MKSHLIB@%$MKSHLIB%g
6788 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6789 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6790 s%@OS_TARGET@%$OS_TARGET%g
6791 s%@OS_ARCH@%$OS_ARCH%g
6792 s%@OS_RELEASE@%$OS_RELEASE%g
6793 s%@OS_TEST@%$OS_TEST%g
6794 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6795 s%@DEFINES@%$DEFINES%g
6796 s%@AR_FLAGS@%$AR_FLAGS%g
6797 s%@ASFLAGS@%$ASFLAGS%g
6798 s%@FILTER@%$FILTER%g
6799 s%@IMPLIB@%$IMPLIB%g
6800 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
6801 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
6802 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
6803 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
6804 s%@OS_LIBS@%$OS_LIBS%g
6805 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6806 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6807 s%@NOSUCHFILE@%$NOSUCHFILE%g
6808 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6809 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6810 s%@OBJDIR@%$OBJDIR%g
6811 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6812 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6813 s%@NSINSTALL@%$NSINSTALL%g
6814 s%@OPTIMIZER@%$OPTIMIZER%g
6815 s%@RC@%$RC%g
6816 s%@RCFLAGS@%$RCFLAGS%g
6817 s%@DLLFLAGS@%$DLLFLAGS%g
6818 s%@EXEFLAGS@%$EXEFLAGS%g
6819 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6820 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6821 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6822 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6823 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6824 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6825 s%@NEXT_ROOT@%$NEXT_ROOT%g
6826 s%@MT@%$MT%g
6828 CEOF
6831 cat >> $CONFIG_STATUS <<\EOF
6833 # Split the substitutions into bite-sized pieces for seds with
6834 # small command number limits, like on Digital OSF/1 and HP-UX.
6835 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6836 ac_file=1 # Number of current file.
6837 ac_beg=1 # First line for current file.
6838 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6839 ac_more_lines=:
6840 ac_sed_cmds=""
6841 while $ac_more_lines; do
6842 if test $ac_beg -gt 1; then
6843 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6844 else
6845 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6847 if test ! -s conftest.s$ac_file; then
6848 ac_more_lines=false
6849 rm -f conftest.s$ac_file
6850 else
6851 if test -z "$ac_sed_cmds"; then
6852 ac_sed_cmds="sed -f conftest.s$ac_file"
6853 else
6854 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6856 ac_file=`expr $ac_file + 1`
6857 ac_beg=$ac_end
6858 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6860 done
6861 if test -z "$ac_sed_cmds"; then
6862 ac_sed_cmds=cat
6866 cat >> $CONFIG_STATUS <<EOF
6868 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6870 cat >> $CONFIG_STATUS <<\EOF
6871 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6872 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6873 case "$ac_file" in
6874 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6875 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6876 *) ac_file_in="${ac_file}.in" ;;
6877 esac
6879 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6881 # Remove last slash and all that follows it. Not all systems have dirname.
6882 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6883 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6884 # The file is in a subdirectory.
6885 test ! -d "$ac_dir" && mkdir "$ac_dir"
6886 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6887 # A "../" for each directory in $ac_dir_suffix.
6888 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6889 else
6890 ac_dir_suffix= ac_dots=
6893 case "$ac_given_srcdir" in
6894 .) srcdir=.
6895 if test -z "$ac_dots"; then top_srcdir=.
6896 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6897 /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6898 *) # Relative path.
6899 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6900 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6901 esac
6904 echo creating "$ac_file"
6905 rm -f "$ac_file"
6906 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6907 case "$ac_file" in
6908 *Makefile*) ac_comsub="1i\\
6909 # $configure_input" ;;
6910 *) ac_comsub= ;;
6911 esac
6913 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
6914 sed -e "$ac_comsub
6915 s%@configure_input@%$configure_input%g
6916 s%@srcdir@%$srcdir%g
6917 s%@top_srcdir@%$top_srcdir%g
6918 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6919 fi; done
6920 rm -f conftest.s*
6925 cat >> $CONFIG_STATUS <<EOF
6928 cat >> $CONFIG_STATUS <<\EOF
6929 chmod +x config/nspr-config
6930 exit 0
6932 chmod +x $CONFIG_STATUS
6933 rm -fr confdefs* $ac_clean_files
6934 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1