Bug 932076 - Add check for MediaExtractor creation failure. r=doublec
[gecko.git] / nsprpub / configure
blob484a15a7d15f72ef3fdc261560f2b2b1ed3945ae
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=2
740 NSPR_MODNAME=nspr20
741 _HAVE_PTHREADS=
742 USE_PTHREADS=
743 USE_USER_PTHREADS=
744 USE_NSPR_THREADS=
745 USE_N32=
746 USE_64=
747 USE_CPLUS=
748 USE_IPV6=
749 USE_MDUPDATE=
750 _MACOSX_DEPLOYMENT_TARGET=
751 _OPTIMIZE_FLAGS=-O
752 _DEBUG_FLAGS=-g
753 MOZ_DEBUG=1
754 MOZ_OPTIMIZE=
755 OBJDIR='$(OBJDIR_NAME)'
756 OBJDIR_NAME=.
757 OBJDIR_SUFFIX=OBJ
758 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
759 NOSUCHFILE=/no-such-file
760 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
761 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
762 CYGWIN_WRAPPER=
763 MACOS_SDK_DIR=
764 NEXT_ROOT=
766 MOZ_OS2_HIGH_MEMORY=1
767 PROFILE_GEN_CFLAGS=
768 PROFILE_GEN_LDFLAGS=
769 PROFILE_USE_CFLAGS=
770 PROFILE_USE_LDFLAGS=
772 RESOLVE_LINK_SYMBOLS=
774 CFLAGS="${CFLAGS=}"
775 CXXFLAGS="${CXXFLAGS=}"
776 LDFLAGS="${LDFLAGS=}"
777 DLLFLAGS="${DLLFLAGS=}"
778 HOST_CFLAGS="${HOST_CFLAGS=}"
779 HOST_LDFLAGS="${HOST_LDFLAGS=}"
781 case "$target" in
782 *-cygwin*|*-mingw*)
783 # Check to see if we are really running in a msvc environemnt
784 _WIN32_MSVC=
785 for ac_prog in cl
787 # Extract the first word of "$ac_prog", so it can be a program name with args.
788 set dummy $ac_prog; ac_word=$2
789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
790 echo "configure:791: checking for $ac_word" >&5
791 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
792 echo $ac_n "(cached) $ac_c" 1>&6
793 else
794 if test -n "$CC"; then
795 ac_cv_prog_CC="$CC" # Let the user override the test.
796 else
797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
798 ac_dummy="$PATH"
799 for ac_dir in $ac_dummy; do
800 test -z "$ac_dir" && ac_dir=.
801 if test -f $ac_dir/$ac_word; then
802 ac_cv_prog_CC="$ac_prog"
803 break
805 done
806 IFS="$ac_save_ifs"
809 CC="$ac_cv_prog_CC"
810 if test -n "$CC"; then
811 echo "$ac_t""$CC" 1>&6
812 else
813 echo "$ac_t""no" 1>&6
816 test -n "$CC" && break
817 done
819 if test "$CC" = "cl"; then
820 echo 'main() { return 0; }' > dummy.c
821 ${CC} -o dummy dummy.c >/dev/null 2>&1
822 if test $? = 0; then
823 _WIN32_MSVC=1
824 CXX=$CC
825 else
826 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
828 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
831 *-msvc*)
832 _WIN32_MSVC=1
834 *-mks*)
835 _WIN32_MSVC=1
837 esac
839 if test -n "$_WIN32_MSVC"; then
840 SKIP_PATH_CHECKS=1
841 SKIP_COMPILER_CHECKS=1
842 SKIP_LIBRARY_CHECKS=1
846 # Check whether --with-android-ndk or --without-android-ndk was given.
847 if test "${with_android_ndk+set}" = set; then
848 withval="$with_android_ndk"
849 android_ndk=$withval
853 # Check whether --with-android-toolchain or --without-android-toolchain was given.
854 if test "${with_android_toolchain+set}" = set; then
855 withval="$with_android_toolchain"
856 android_toolchain=$withval
860 case "$target_cpu" in
861 arm)
862 android_version=5
864 i?86|mipsel)
865 android_version=9
867 esac
869 # Check whether --with-android-version or --without-android-version was given.
870 if test "${with_android_version+set}" = set; then
871 withval="$with_android_version"
872 android_version=$withval
876 # Check whether --with-android-platform or --without-android-platform was given.
877 if test "${with_android_platform+set}" = set; then
878 withval="$with_android_platform"
879 android_platform=$withval
883 case "$target" in
884 arm-linux*-android*|*-linuxandroid*)
885 android_tool_prefix="arm-linux-androideabi"
887 i?86-*android*)
888 android_tool_prefix="i686-linux-android"
890 mipsel-*android*)
891 android_tool_prefix="mipsel-linux-android"
894 android_tool_prefix="$target_os"
896 esac
899 # Check whether --with-gonk or --without-gonk was given.
900 if test "${with_gonk+set}" = set; then
901 withval="$with_gonk"
902 gonkdir=$withval
906 if test -n "$gonkdir" ; then
908 if test -z "$HOST_CPPFLAGS" ; then
909 HOST_CPPFLAGS=" "
911 if test -z "$HOST_CFLAGS" ; then
912 HOST_CFLAGS=" "
914 if test -z "$HOST_CXXFLAGS" ; then
915 HOST_CXXFLAGS=" "
917 if test -z "$HOST_LDFLAGS" ; then
918 HOST_LDFLAGS=" "
921 cat >> confdefs.h <<\EOF
922 #define ANDROID 1
925 else
926 case "$target" in
927 *-android*|*-linuxandroid*)
928 if test -z "$android_ndk" ; then
929 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
932 if test -z "$android_toolchain" ; then
933 echo $ac_n "checking for android toolchain directory""... $ac_c" 1>&6
934 echo "configure:935: checking for android toolchain directory" >&5
936 kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
938 case "$target_cpu" in
939 arm)
940 target_name=arm-linux-androideabi-4.4.3
942 i?86)
943 target_name=x86-4.4.3
945 mipsel)
946 target_name=mipsel-linux-android-4.4.3
948 esac
949 android_toolchain="$android_ndk"/toolchains/$target_name/prebuilt/$kernel_name-x86
951 if test -d "$android_toolchain" ; then
952 echo "$ac_t""$android_toolchain" 1>&6
953 else
954 { echo "configure: error: not found. You have to specify --with-android-toolchain=/path/to/ndk/toolchain." 1>&2; exit 1; }
958 if test -z "$android_platform" ; then
959 echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
960 echo "configure:961: checking for android platform directory" >&5
962 case "$target_cpu" in
963 arm)
964 target_name=arm
966 i?86)
967 target_name=x86
969 mipsel)
970 target_name=mips
972 esac
974 android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"
976 if test -d "$android_platform" ; then
977 echo "$ac_t""$android_platform" 1>&6
978 else
979 { echo "configure: error: not found. You have to specify --with-android-platform=/path/to/ndk/platform." 1>&2; exit 1; }
983 case "$target_cpu" in
984 i?86)
985 if ! test -e "$android_toolchain"/bin/"$android_tool_prefix"-gcc; then
986 android_tool_prefix="i686-android-linux"
989 esac
991 AS="$android_toolchain"/bin/"$android_tool_prefix"-as
992 CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
993 CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
994 CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
995 LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
996 AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
997 RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
998 STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
1000 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
1001 CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
1002 CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
1003 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
1005 if test -z "$HOST_CPPFLAGS" ; then
1006 HOST_CPPFLAGS=" "
1008 if test -z "$HOST_CFLAGS" ; then
1009 HOST_CFLAGS=" "
1011 if test -z "$HOST_CXXFLAGS" ; then
1012 HOST_CXXFLAGS=" "
1014 if test -z "$HOST_LDFLAGS" ; then
1015 HOST_LDFLAGS=" "
1018 cat >> confdefs.h <<\EOF
1019 #define ANDROID 1
1023 esac
1026 dist_prefix='${MOD_DEPTH}/dist'
1027 dist_bindir='${dist_prefix}/bin'
1028 dist_includedir='${dist_prefix}/include/nspr'
1029 dist_libdir='${dist_prefix}/lib'
1030 if test "${includedir}" = '${prefix}/include'; then
1031 includedir='${prefix}/include/nspr'
1034 # Check whether --with-dist-prefix or --without-dist-prefix was given.
1035 if test "${with_dist_prefix+set}" = set; then
1036 withval="$with_dist_prefix"
1037 dist_prefix=$withval
1041 # Check whether --with-dist-bindir or --without-dist-bindir was given.
1042 if test "${with_dist_bindir+set}" = set; then
1043 withval="$with_dist_bindir"
1044 dist_bindir=$withval
1048 # Check whether --with-dist-includedir or --without-dist-includedir was given.
1049 if test "${with_dist_includedir+set}" = set; then
1050 withval="$with_dist_includedir"
1051 dist_includedir=$withval
1055 # Check whether --with-dist-libdir or --without-dist-libdir was given.
1056 if test "${with_dist_libdir+set}" = set; then
1057 withval="$with_dist_libdir"
1058 dist_libdir=$withval
1067 # Check whether --with-mozilla or --without-mozilla was given.
1068 if test "${with_mozilla+set}" = set; then
1069 withval="$with_mozilla"
1070 if test "$withval" = "yes"; then
1071 cat >> confdefs.h <<\EOF
1072 #define MOZILLA_CLIENT 1
1075 MOZILLA_CLIENT=1
1076 else
1077 MOZILLA_CLIENT=
1079 else
1080 if test -n "$MOZILLA_CLIENT"; then
1081 cat >> confdefs.h <<\EOF
1082 #define MOZILLA_CLIENT 1
1089 # Check whether --enable-optimize or --disable-optimize was given.
1090 if test "${enable_optimize+set}" = set; then
1091 enableval="$enable_optimize"
1092 if test "$enableval" != "no"; then
1093 MOZ_OPTIMIZE=1
1094 if test -n "$enableval" -a "$enableval" != "yes"; then
1095 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1096 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
1098 else
1099 MOZ_OPTIMIZE=
1104 # Check whether --enable-debug or --disable-debug was given.
1105 if test "${enable_debug+set}" = set; then
1106 enableval="$enable_debug"
1107 if test "$enableval" != "no"; then
1108 MOZ_DEBUG=1
1109 MOZ_DEBUG_SYMBOLS=1
1110 if test -n "$enableval" -a "$enableval" != "yes"; then
1111 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1112 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1114 else
1115 MOZ_DEBUG=
1117 else
1118 MOZ_DEBUG_SYMBOLS=1
1122 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
1123 if test "${enable_debug_symbols+set}" = set; then
1124 enableval="$enable_debug_symbols"
1125 if test "$enableval" != "no"; then
1126 MOZ_DEBUG_SYMBOLS=1
1127 if test -n "$enableval" -a "$enableval" != "yes"; then
1128 if test -z "$_SAVE_DEBUG_FLAGS"; then
1129 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
1130 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
1131 else
1132 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
1135 else
1136 MOZ_DEBUG_SYMBOLS=
1141 # Check whether --enable-win32-target or --disable-win32-target was given.
1142 if test "${enable_win32_target+set}" = set; then
1143 enableval="$enable_win32_target"
1144 OS_TARGET=`echo $enableval | tr a-z A-Z`
1148 # Check whether --enable-symbian-target or --disable-symbian-target was given.
1149 if test "${enable_symbian_target+set}" = set; then
1150 enableval="$enable_symbian_target"
1151 OS_TARGET=`echo $enableval | tr a-z A-Z`
1155 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
1156 if test "${enable_debug_rtl+set}" = set; then
1157 enableval="$enable_debug_rtl"
1158 if test "$enableval" = "yes"; then
1159 USE_DEBUG_RTL=1
1164 # Check whether --enable-n32 or --disable-n32 was given.
1165 if test "${enable_n32+set}" = set; then
1166 enableval="$enable_n32"
1167 if test "$enableval" = "yes"; then
1168 USE_N32=1
1169 else if test "$enableval" = "no"; then
1170 USE_N32=
1176 # Check whether --enable-64bit or --disable-64bit was given.
1177 if test "${enable_64bit+set}" = set; then
1178 enableval="$enable_64bit"
1179 if test "$enableval" = "yes"; then
1180 USE_64=1
1185 # Check whether --enable-mdupdate or --disable-mdupdate was given.
1186 if test "${enable_mdupdate+set}" = set; then
1187 enableval="$enable_mdupdate"
1188 if test "$enableval" = "yes"; then
1189 USE_MDUPDATE=1
1194 # Check whether --enable-cplus or --disable-cplus was given.
1195 if test "${enable_cplus+set}" = set; then
1196 enableval="$enable_cplus"
1197 if test "$enableval" = "yes"; then
1198 USE_CPLUS=1
1203 # Check whether --with-arm-kuser or --without-arm-kuser was given.
1204 if test "${with_arm_kuser+set}" = set; then
1205 withval="$with_arm_kuser"
1206 if test "$withval" = "yes"; then
1207 cat >> confdefs.h <<\EOF
1208 #define _PR_ARM_KUSER 1
1215 # Check whether --with-macos-sdk or --without-macos-sdk was given.
1216 if test "${with_macos_sdk+set}" = set; then
1217 withval="$with_macos_sdk"
1218 MACOS_SDK_DIR=$withval
1222 # Check whether --enable-macos-target or --disable-macos-target was given.
1223 if test "${enable_macos_target+set}" = set; then
1224 enableval="$enable_macos_target"
1225 _MACOSX_DEPLOYMENT_TARGET=$enableval
1229 case "$target" in
1231 *-aix*)
1232 case "${target_os}" in
1233 aix3.2*)
1234 USE_NSPR_THREADS=1
1237 USE_PTHREADS=1
1239 esac
1242 esac
1244 if test -z "$CC"; then
1245 case "$target" in
1247 *-aix*)
1248 if test -z "$USE_NSPR_THREADS"; then
1249 CC=xlc_r
1250 else
1251 CC=xlc
1255 *-hpux*)
1256 CC=cc
1259 *-irix*)
1260 CC=cc
1263 *-osf*)
1264 CC=cc
1267 *-solaris*)
1268 CC=cc
1271 esac
1274 if test -z "$CXX"; then
1275 case "$target" in
1277 *-aix*)
1278 if test -z "$USE_NSPR_THREADS"; then
1279 CXX=xlC_r
1280 else
1281 CXX=xlC
1285 *-hpux*)
1286 case "${target_os}" in
1287 hpux10.30)
1288 CXX=aCC
1290 hpux11.*)
1291 CXX=aCC
1294 CXX=CC
1296 esac
1299 *-irix*)
1300 CXX=CC
1303 *-osf*)
1304 CXX=cxx
1307 *-solaris*)
1308 CXX=CC
1311 esac
1314 if test -z "$SKIP_PATH_CHECKS"; then
1315 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1316 set dummy $WHOAMI whoami; ac_word=$2
1317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1318 echo "configure:1319: checking for $ac_word" >&5
1319 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1320 echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322 case "$WHOAMI" in
1324 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1326 ?:/*)
1327 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1331 ac_dummy="$PATH"
1332 for ac_dir in $ac_dummy; do
1333 test -z "$ac_dir" && ac_dir=.
1334 if test -f $ac_dir/$ac_word; then
1335 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1336 break
1338 done
1339 IFS="$ac_save_ifs"
1340 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1342 esac
1344 WHOAMI="$ac_cv_path_WHOAMI"
1345 if test -n "$WHOAMI"; then
1346 echo "$ac_t""$WHOAMI" 1>&6
1347 else
1348 echo "$ac_t""no" 1>&6
1353 if test -n "$MOZ_DEBUG"; then
1354 cat >> confdefs.h <<\EOF
1355 #define DEBUG 1
1358 DEFINES="$DEFINES -UNDEBUG"
1360 case "${target_os}" in
1361 beos*)
1362 DEFINES="$DEFINES -DDEBUG_${USER}"
1364 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1365 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1368 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1370 esac
1371 else
1372 cat >> confdefs.h <<\EOF
1373 #define NDEBUG 1
1376 DEFINES="$DEFINES -UDEBUG"
1379 if test -z "$SKIP_COMPILER_CHECKS"; then
1381 if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
1382 echo "cross compiling from $host to $target"
1383 cross_compiling=yes
1385 _SAVE_CC="$CC"
1386 _SAVE_CFLAGS="$CFLAGS"
1387 _SAVE_LDFLAGS="$LDFLAGS"
1389 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1390 echo "configure:1391: checking for $host compiler" >&5
1391 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1393 # Extract the first word of "$ac_prog", so it can be a program name with args.
1394 set dummy $ac_prog; ac_word=$2
1395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1396 echo "configure:1397: checking for $ac_word" >&5
1397 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1398 echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400 if test -n "$HOST_CC"; then
1401 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1402 else
1403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406 test -z "$ac_dir" && ac_dir=.
1407 if test -f $ac_dir/$ac_word; then
1408 ac_cv_prog_HOST_CC="$ac_prog"
1409 break
1411 done
1412 IFS="$ac_save_ifs"
1415 HOST_CC="$ac_cv_prog_HOST_CC"
1416 if test -n "$HOST_CC"; then
1417 echo "$ac_t""$HOST_CC" 1>&6
1418 else
1419 echo "$ac_t""no" 1>&6
1422 test -n "$HOST_CC" && break
1423 done
1424 test -n "$HOST_CC" || HOST_CC=""""
1426 if test -z "$HOST_CC"; then
1427 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1429 echo "$ac_t""$HOST_CC" 1>&6
1430 if test -z "$HOST_CFLAGS"; then
1431 HOST_CFLAGS="$CFLAGS"
1433 if test -z "$HOST_LDFLAGS"; then
1434 HOST_LDFLAGS="$LDFLAGS"
1437 CC="$HOST_CC"
1438 CFLAGS="$HOST_CFLAGS"
1439 LDFLAGS="$HOST_LDFLAGS"
1441 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1442 echo "configure:1443: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1443 cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1447 int main() {
1448 return 0;
1449 ; return 0; }
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452 rm -rf conftest*
1453 echo "$ac_t""yes" 1>&6
1454 else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1460 rm -f conftest*
1462 CC=$_SAVE_CC
1463 CFLAGS=$_SAVE_CFLAGS
1464 LDFLAGS=$_SAVE_LDFLAGS
1466 case "$build:$target" in
1467 powerpc-apple-darwin8*:i?86-apple-darwin*)
1468 _SAVE_CFLAGS=$CFLAGS
1469 _SAVE_CXXFLAGS=$CXXFLAGS
1470 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1471 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1473 *:arm*-apple-darwin*)
1474 _SAVE_CFLAGS=$CFLAGS
1475 _SAVE_CXXFLAGS=$CXXFLAGS
1476 CFLAGS="-isysroot $MACOS_SDK_DIR $CFLAGS"
1477 CXXFLAGS="-isysroot $MACOS_SDK_DIR $CXXFLAGS"
1479 esac
1481 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1483 # Extract the first word of "$ac_prog", so it can be a program name with args.
1484 set dummy $ac_prog; ac_word=$2
1485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1486 echo "configure:1487: checking for $ac_word" >&5
1487 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1488 echo $ac_n "(cached) $ac_c" 1>&6
1489 else
1490 if test -n "$CC"; then
1491 ac_cv_prog_CC="$CC" # Let the user override the test.
1492 else
1493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1494 ac_dummy="$PATH"
1495 for ac_dir in $ac_dummy; do
1496 test -z "$ac_dir" && ac_dir=.
1497 if test -f $ac_dir/$ac_word; then
1498 ac_cv_prog_CC="$ac_prog"
1499 break
1501 done
1502 IFS="$ac_save_ifs"
1505 CC="$ac_cv_prog_CC"
1506 if test -n "$CC"; then
1507 echo "$ac_t""$CC" 1>&6
1508 else
1509 echo "$ac_t""no" 1>&6
1512 test -n "$CC" && break
1513 done
1514 test -n "$CC" || CC="echo"
1516 unset ac_cv_prog_CC
1517 # Extract the first word of "gcc", so it can be a program name with args.
1518 set dummy gcc; ac_word=$2
1519 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1520 echo "configure:1521: checking for $ac_word" >&5
1521 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1522 echo $ac_n "(cached) $ac_c" 1>&6
1523 else
1524 if test -n "$CC"; then
1525 ac_cv_prog_CC="$CC" # Let the user override the test.
1526 else
1527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530 test -z "$ac_dir" && ac_dir=.
1531 if test -f $ac_dir/$ac_word; then
1532 ac_cv_prog_CC="gcc"
1533 break
1535 done
1536 IFS="$ac_save_ifs"
1539 CC="$ac_cv_prog_CC"
1540 if test -n "$CC"; then
1541 echo "$ac_t""$CC" 1>&6
1542 else
1543 echo "$ac_t""no" 1>&6
1546 if test -z "$CC"; then
1547 # Extract the first word of "cc", so it can be a program name with args.
1548 set dummy cc; ac_word=$2
1549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1550 echo "configure:1551: checking for $ac_word" >&5
1551 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553 else
1554 if test -n "$CC"; then
1555 ac_cv_prog_CC="$CC" # Let the user override the test.
1556 else
1557 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1558 ac_prog_rejected=no
1559 ac_dummy="$PATH"
1560 for ac_dir in $ac_dummy; do
1561 test -z "$ac_dir" && ac_dir=.
1562 if test -f $ac_dir/$ac_word; then
1563 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1564 ac_prog_rejected=yes
1565 continue
1567 ac_cv_prog_CC="cc"
1568 break
1570 done
1571 IFS="$ac_save_ifs"
1572 if test $ac_prog_rejected = yes; then
1573 # We found a bogon in the path, so make sure we never use it.
1574 set dummy $ac_cv_prog_CC
1575 shift
1576 if test $# -gt 0; then
1577 # We chose a different compiler from the bogus one.
1578 # However, it has the same basename, so the bogon will be chosen
1579 # first if we set CC to just the basename; use the full file name.
1580 shift
1581 set dummy "$ac_dir/$ac_word" "$@"
1582 shift
1583 ac_cv_prog_CC="$@"
1588 CC="$ac_cv_prog_CC"
1589 if test -n "$CC"; then
1590 echo "$ac_t""$CC" 1>&6
1591 else
1592 echo "$ac_t""no" 1>&6
1595 if test -z "$CC"; then
1596 case "`uname -s`" in
1597 *win32* | *WIN32*)
1598 # Extract the first word of "cl", so it can be a program name with args.
1599 set dummy cl; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1603 echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605 if test -n "$CC"; then
1606 ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1609 ac_dummy="$PATH"
1610 for ac_dir in $ac_dummy; do
1611 test -z "$ac_dir" && ac_dir=.
1612 if test -f $ac_dir/$ac_word; then
1613 ac_cv_prog_CC="cl"
1614 break
1616 done
1617 IFS="$ac_save_ifs"
1620 CC="$ac_cv_prog_CC"
1621 if test -n "$CC"; then
1622 echo "$ac_t""$CC" 1>&6
1623 else
1624 echo "$ac_t""no" 1>&6
1627 esac
1629 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1632 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1633 echo "configure:1634: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1635 ac_ext=c
1636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1637 ac_cpp='$CPP $CPPFLAGS'
1638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1639 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1640 cross_compiling=$ac_cv_prog_cc_cross
1642 cat > conftest.$ac_ext << EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1647 main(){return(0);}
1649 if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1650 ac_cv_prog_cc_works=yes
1651 # If we can't run a trivial program, we are probably using a cross compiler.
1652 if (./conftest; exit) 2>/dev/null; then
1653 ac_cv_prog_cc_cross=no
1654 else
1655 ac_cv_prog_cc_cross=yes
1657 else
1658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1660 ac_cv_prog_cc_works=no
1662 rm -fr conftest*
1663 ac_ext=c
1664 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1665 ac_cpp='$CPP $CPPFLAGS'
1666 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1667 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1668 cross_compiling=$ac_cv_prog_cc_cross
1670 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1671 if test $ac_cv_prog_cc_works = no; then
1672 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1674 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1675 echo "configure:1676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1676 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1677 cross_compiling=$ac_cv_prog_cc_cross
1679 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1680 echo "configure:1681: checking whether we are using GNU C" >&5
1681 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1682 echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684 cat > conftest.c <<EOF
1685 #ifdef __GNUC__
1686 yes;
1687 #endif
1689 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1690 ac_cv_prog_gcc=yes
1691 else
1692 ac_cv_prog_gcc=no
1696 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1698 if test $ac_cv_prog_gcc = yes; then
1699 GCC=yes
1700 else
1701 GCC=
1704 ac_test_CFLAGS="${CFLAGS+set}"
1705 ac_save_CFLAGS="$CFLAGS"
1706 CFLAGS=
1707 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1708 echo "configure:1709: checking whether ${CC-cc} accepts -g" >&5
1709 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 echo 'void f(){}' > conftest.c
1713 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1714 ac_cv_prog_cc_g=yes
1715 else
1716 ac_cv_prog_cc_g=no
1718 rm -f conftest*
1722 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS="$ac_save_CFLAGS"
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1727 CFLAGS="-g -O2"
1728 else
1729 CFLAGS="-g"
1731 else
1732 if test "$GCC" = yes; then
1733 CFLAGS="-O2"
1734 else
1735 CFLAGS=
1739 if test -n "$USE_CPLUS"; then
1740 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1742 # Extract the first word of "$ac_prog", so it can be a program name with args.
1743 set dummy $ac_prog; ac_word=$2
1744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1745 echo "configure:1746: checking for $ac_word" >&5
1746 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749 if test -n "$CXX"; then
1750 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1751 else
1752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1753 ac_dummy="$PATH"
1754 for ac_dir in $ac_dummy; do
1755 test -z "$ac_dir" && ac_dir=.
1756 if test -f $ac_dir/$ac_word; then
1757 ac_cv_prog_CXX="$ac_prog"
1758 break
1760 done
1761 IFS="$ac_save_ifs"
1764 CXX="$ac_cv_prog_CXX"
1765 if test -n "$CXX"; then
1766 echo "$ac_t""$CXX" 1>&6
1767 else
1768 echo "$ac_t""no" 1>&6
1771 test -n "$CXX" && break
1772 done
1773 test -n "$CXX" || CXX="echo"
1775 unset ac_cv_prog_CXX
1776 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1778 # Extract the first word of "$ac_prog", so it can be a program name with args.
1779 set dummy $ac_prog; ac_word=$2
1780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1781 echo "configure:1782: checking for $ac_word" >&5
1782 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785 if test -n "$CXX"; then
1786 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1787 else
1788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791 test -z "$ac_dir" && ac_dir=.
1792 if test -f $ac_dir/$ac_word; then
1793 ac_cv_prog_CXX="$ac_prog"
1794 break
1796 done
1797 IFS="$ac_save_ifs"
1800 CXX="$ac_cv_prog_CXX"
1801 if test -n "$CXX"; then
1802 echo "$ac_t""$CXX" 1>&6
1803 else
1804 echo "$ac_t""no" 1>&6
1807 test -n "$CXX" && break
1808 done
1809 test -n "$CXX" || CXX="gcc"
1812 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1813 echo "configure:1814: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1815 ac_ext=C
1816 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1817 ac_cpp='$CXXCPP $CPPFLAGS'
1818 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1819 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1820 cross_compiling=$ac_cv_prog_cxx_cross
1822 cat > conftest.$ac_ext << EOF
1824 #line 1825 "configure"
1825 #include "confdefs.h"
1827 int main(){return(0);}
1829 if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1830 ac_cv_prog_cxx_works=yes
1831 # If we can't run a trivial program, we are probably using a cross compiler.
1832 if (./conftest; exit) 2>/dev/null; then
1833 ac_cv_prog_cxx_cross=no
1834 else
1835 ac_cv_prog_cxx_cross=yes
1837 else
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1840 ac_cv_prog_cxx_works=no
1842 rm -fr conftest*
1843 ac_ext=c
1844 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1845 ac_cpp='$CPP $CPPFLAGS'
1846 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1847 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1848 cross_compiling=$ac_cv_prog_cc_cross
1850 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1851 if test $ac_cv_prog_cxx_works = no; then
1852 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1854 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1855 echo "configure:1856: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1856 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1857 cross_compiling=$ac_cv_prog_cxx_cross
1859 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1860 echo "configure:1861: checking whether we are using GNU C++" >&5
1861 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864 cat > conftest.C <<EOF
1865 #ifdef __GNUC__
1866 yes;
1867 #endif
1869 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1870 ac_cv_prog_gxx=yes
1871 else
1872 ac_cv_prog_gxx=no
1876 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1878 if test $ac_cv_prog_gxx = yes; then
1879 GXX=yes
1880 else
1881 GXX=
1884 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1885 ac_save_CXXFLAGS="$CXXFLAGS"
1886 CXXFLAGS=
1887 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1888 echo "configure:1889: checking whether ${CXX-g++} accepts -g" >&5
1889 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892 echo 'void f(){}' > conftest.cc
1893 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1894 ac_cv_prog_cxx_g=yes
1895 else
1896 ac_cv_prog_cxx_g=no
1898 rm -f conftest*
1902 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1903 if test "$ac_test_CXXFLAGS" = set; then
1904 CXXFLAGS="$ac_save_CXXFLAGS"
1905 elif test $ac_cv_prog_cxx_g = yes; then
1906 if test "$GXX" = yes; then
1907 CXXFLAGS="-g -O2"
1908 else
1909 CXXFLAGS="-g"
1911 else
1912 if test "$GXX" = yes; then
1913 CXXFLAGS="-O2"
1914 else
1915 CXXFLAGS=
1921 case "$build:$target" in
1922 powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)
1923 CFLAGS=$_SAVE_CFLAGS
1924 CXXFLAGS=$_SAVE_CXXFLAGS
1926 esac
1928 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1930 # Extract the first word of "$ac_prog", so it can be a program name with args.
1931 set dummy $ac_prog; ac_word=$2
1932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1933 echo "configure:1934: checking for $ac_word" >&5
1934 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937 if test -n "$RANLIB"; then
1938 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1939 else
1940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1941 ac_dummy="$PATH"
1942 for ac_dir in $ac_dummy; do
1943 test -z "$ac_dir" && ac_dir=.
1944 if test -f $ac_dir/$ac_word; then
1945 ac_cv_prog_RANLIB="$ac_prog"
1946 break
1948 done
1949 IFS="$ac_save_ifs"
1952 RANLIB="$ac_cv_prog_RANLIB"
1953 if test -n "$RANLIB"; then
1954 echo "$ac_t""$RANLIB" 1>&6
1955 else
1956 echo "$ac_t""no" 1>&6
1959 test -n "$RANLIB" && break
1960 done
1961 test -n "$RANLIB" || RANLIB="echo"
1963 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1965 # Extract the first word of "$ac_prog", so it can be a program name with args.
1966 set dummy $ac_prog; ac_word=$2
1967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1968 echo "configure:1969: checking for $ac_word" >&5
1969 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1970 echo $ac_n "(cached) $ac_c" 1>&6
1971 else
1972 if test -n "$AR"; then
1973 ac_cv_prog_AR="$AR" # Let the user override the test.
1974 else
1975 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1976 ac_dummy="$PATH"
1977 for ac_dir in $ac_dummy; do
1978 test -z "$ac_dir" && ac_dir=.
1979 if test -f $ac_dir/$ac_word; then
1980 ac_cv_prog_AR="$ac_prog"
1981 break
1983 done
1984 IFS="$ac_save_ifs"
1987 AR="$ac_cv_prog_AR"
1988 if test -n "$AR"; then
1989 echo "$ac_t""$AR" 1>&6
1990 else
1991 echo "$ac_t""no" 1>&6
1994 test -n "$AR" && break
1995 done
1996 test -n "$AR" || AR="echo"
1998 for ac_prog in $AS "${target_alias}-as" "${target}-as"
2000 # Extract the first word of "$ac_prog", so it can be a program name with args.
2001 set dummy $ac_prog; ac_word=$2
2002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_word" >&5
2004 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007 if test -n "$AS"; then
2008 ac_cv_prog_AS="$AS" # Let the user override the test.
2009 else
2010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2011 ac_dummy="$PATH"
2012 for ac_dir in $ac_dummy; do
2013 test -z "$ac_dir" && ac_dir=.
2014 if test -f $ac_dir/$ac_word; then
2015 ac_cv_prog_AS="$ac_prog"
2016 break
2018 done
2019 IFS="$ac_save_ifs"
2022 AS="$ac_cv_prog_AS"
2023 if test -n "$AS"; then
2024 echo "$ac_t""$AS" 1>&6
2025 else
2026 echo "$ac_t""no" 1>&6
2029 test -n "$AS" && break
2030 done
2031 test -n "$AS" || AS="echo"
2033 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
2035 # Extract the first word of "$ac_prog", so it can be a program name with args.
2036 set dummy $ac_prog; ac_word=$2
2037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2038 echo "configure:2039: checking for $ac_word" >&5
2039 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042 if test -n "$LD"; then
2043 ac_cv_prog_LD="$LD" # Let the user override the test.
2044 else
2045 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2046 ac_dummy="$PATH"
2047 for ac_dir in $ac_dummy; do
2048 test -z "$ac_dir" && ac_dir=.
2049 if test -f $ac_dir/$ac_word; then
2050 ac_cv_prog_LD="$ac_prog"
2051 break
2053 done
2054 IFS="$ac_save_ifs"
2057 LD="$ac_cv_prog_LD"
2058 if test -n "$LD"; then
2059 echo "$ac_t""$LD" 1>&6
2060 else
2061 echo "$ac_t""no" 1>&6
2064 test -n "$LD" && break
2065 done
2066 test -n "$LD" || LD="echo"
2068 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
2070 # Extract the first word of "$ac_prog", so it can be a program name with args.
2071 set dummy $ac_prog; ac_word=$2
2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2073 echo "configure:2074: checking for $ac_word" >&5
2074 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2076 else
2077 if test -n "$STRIP"; then
2078 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2079 else
2080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2081 ac_dummy="$PATH"
2082 for ac_dir in $ac_dummy; do
2083 test -z "$ac_dir" && ac_dir=.
2084 if test -f $ac_dir/$ac_word; then
2085 ac_cv_prog_STRIP="$ac_prog"
2086 break
2088 done
2089 IFS="$ac_save_ifs"
2092 STRIP="$ac_cv_prog_STRIP"
2093 if test -n "$STRIP"; then
2094 echo "$ac_t""$STRIP" 1>&6
2095 else
2096 echo "$ac_t""no" 1>&6
2099 test -n "$STRIP" && break
2100 done
2101 test -n "$STRIP" || STRIP="echo"
2103 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
2105 # Extract the first word of "$ac_prog", so it can be a program name with args.
2106 set dummy $ac_prog; ac_word=$2
2107 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2108 echo "configure:2109: checking for $ac_word" >&5
2109 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
2110 echo $ac_n "(cached) $ac_c" 1>&6
2111 else
2112 if test -n "$WINDRES"; then
2113 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
2114 else
2115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2116 ac_dummy="$PATH"
2117 for ac_dir in $ac_dummy; do
2118 test -z "$ac_dir" && ac_dir=.
2119 if test -f $ac_dir/$ac_word; then
2120 ac_cv_prog_WINDRES="$ac_prog"
2121 break
2123 done
2124 IFS="$ac_save_ifs"
2127 WINDRES="$ac_cv_prog_WINDRES"
2128 if test -n "$WINDRES"; then
2129 echo "$ac_t""$WINDRES" 1>&6
2130 else
2131 echo "$ac_t""no" 1>&6
2134 test -n "$WINDRES" && break
2135 done
2136 test -n "$WINDRES" || WINDRES="echo"
2139 else
2140 # Extract the first word of "gcc", so it can be a program name with args.
2141 set dummy gcc; ac_word=$2
2142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2143 echo "configure:2144: checking for $ac_word" >&5
2144 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2145 echo $ac_n "(cached) $ac_c" 1>&6
2146 else
2147 if test -n "$CC"; then
2148 ac_cv_prog_CC="$CC" # Let the user override the test.
2149 else
2150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2151 ac_dummy="$PATH"
2152 for ac_dir in $ac_dummy; do
2153 test -z "$ac_dir" && ac_dir=.
2154 if test -f $ac_dir/$ac_word; then
2155 ac_cv_prog_CC="gcc"
2156 break
2158 done
2159 IFS="$ac_save_ifs"
2162 CC="$ac_cv_prog_CC"
2163 if test -n "$CC"; then
2164 echo "$ac_t""$CC" 1>&6
2165 else
2166 echo "$ac_t""no" 1>&6
2169 if test -z "$CC"; then
2170 # Extract the first word of "cc", so it can be a program name with args.
2171 set dummy cc; ac_word=$2
2172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2173 echo "configure:2174: checking for $ac_word" >&5
2174 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177 if test -n "$CC"; then
2178 ac_cv_prog_CC="$CC" # Let the user override the test.
2179 else
2180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2181 ac_prog_rejected=no
2182 ac_dummy="$PATH"
2183 for ac_dir in $ac_dummy; do
2184 test -z "$ac_dir" && ac_dir=.
2185 if test -f $ac_dir/$ac_word; then
2186 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2187 ac_prog_rejected=yes
2188 continue
2190 ac_cv_prog_CC="cc"
2191 break
2193 done
2194 IFS="$ac_save_ifs"
2195 if test $ac_prog_rejected = yes; then
2196 # We found a bogon in the path, so make sure we never use it.
2197 set dummy $ac_cv_prog_CC
2198 shift
2199 if test $# -gt 0; then
2200 # We chose a different compiler from the bogus one.
2201 # However, it has the same basename, so the bogon will be chosen
2202 # first if we set CC to just the basename; use the full file name.
2203 shift
2204 set dummy "$ac_dir/$ac_word" "$@"
2205 shift
2206 ac_cv_prog_CC="$@"
2211 CC="$ac_cv_prog_CC"
2212 if test -n "$CC"; then
2213 echo "$ac_t""$CC" 1>&6
2214 else
2215 echo "$ac_t""no" 1>&6
2218 if test -z "$CC"; then
2219 case "`uname -s`" in
2220 *win32* | *WIN32*)
2221 # Extract the first word of "cl", so it can be a program name with args.
2222 set dummy cl; ac_word=$2
2223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2224 echo "configure:2225: checking for $ac_word" >&5
2225 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2226 echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228 if test -n "$CC"; then
2229 ac_cv_prog_CC="$CC" # Let the user override the test.
2230 else
2231 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2232 ac_dummy="$PATH"
2233 for ac_dir in $ac_dummy; do
2234 test -z "$ac_dir" && ac_dir=.
2235 if test -f $ac_dir/$ac_word; then
2236 ac_cv_prog_CC="cl"
2237 break
2239 done
2240 IFS="$ac_save_ifs"
2243 CC="$ac_cv_prog_CC"
2244 if test -n "$CC"; then
2245 echo "$ac_t""$CC" 1>&6
2246 else
2247 echo "$ac_t""no" 1>&6
2250 esac
2252 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2255 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2256 echo "configure:2257: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2258 ac_ext=c
2259 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2260 ac_cpp='$CPP $CPPFLAGS'
2261 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2262 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2263 cross_compiling=$ac_cv_prog_cc_cross
2265 cat > conftest.$ac_ext << EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2270 main(){return(0);}
2272 if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2273 ac_cv_prog_cc_works=yes
2274 # If we can't run a trivial program, we are probably using a cross compiler.
2275 if (./conftest; exit) 2>/dev/null; then
2276 ac_cv_prog_cc_cross=no
2277 else
2278 ac_cv_prog_cc_cross=yes
2280 else
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2283 ac_cv_prog_cc_works=no
2285 rm -fr conftest*
2286 ac_ext=c
2287 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2288 ac_cpp='$CPP $CPPFLAGS'
2289 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2290 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2291 cross_compiling=$ac_cv_prog_cc_cross
2293 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2294 if test $ac_cv_prog_cc_works = no; then
2295 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2297 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2298 echo "configure:2299: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2299 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2300 cross_compiling=$ac_cv_prog_cc_cross
2302 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2303 echo "configure:2304: checking whether we are using GNU C" >&5
2304 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307 cat > conftest.c <<EOF
2308 #ifdef __GNUC__
2309 yes;
2310 #endif
2312 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2313 ac_cv_prog_gcc=yes
2314 else
2315 ac_cv_prog_gcc=no
2319 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2321 if test $ac_cv_prog_gcc = yes; then
2322 GCC=yes
2323 else
2324 GCC=
2327 ac_test_CFLAGS="${CFLAGS+set}"
2328 ac_save_CFLAGS="$CFLAGS"
2329 CFLAGS=
2330 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2331 echo "configure:2332: checking whether ${CC-cc} accepts -g" >&5
2332 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2333 echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335 echo 'void f(){}' > conftest.c
2336 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2337 ac_cv_prog_cc_g=yes
2338 else
2339 ac_cv_prog_cc_g=no
2341 rm -f conftest*
2345 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2346 if test "$ac_test_CFLAGS" = set; then
2347 CFLAGS="$ac_save_CFLAGS"
2348 elif test $ac_cv_prog_cc_g = yes; then
2349 if test "$GCC" = yes; then
2350 CFLAGS="-g -O2"
2351 else
2352 CFLAGS="-g"
2354 else
2355 if test "$GCC" = yes; then
2356 CFLAGS="-O2"
2357 else
2358 CFLAGS=
2362 if test -n "$USE_CPLUS"; then
2363 if test "$CC" = "cl" -a -z "$CXX"; then
2364 CXX=$CC
2365 else
2366 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2371 echo "configure:2372: checking for $ac_word" >&5
2372 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 if test -n "$CXX"; then
2376 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2377 else
2378 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2379 ac_dummy="$PATH"
2380 for ac_dir in $ac_dummy; do
2381 test -z "$ac_dir" && ac_dir=.
2382 if test -f $ac_dir/$ac_word; then
2383 ac_cv_prog_CXX="$ac_prog"
2384 break
2386 done
2387 IFS="$ac_save_ifs"
2390 CXX="$ac_cv_prog_CXX"
2391 if test -n "$CXX"; then
2392 echo "$ac_t""$CXX" 1>&6
2393 else
2394 echo "$ac_t""no" 1>&6
2397 test -n "$CXX" && break
2398 done
2399 test -n "$CXX" || CXX="gcc"
2402 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2403 echo "configure:2404: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2405 ac_ext=C
2406 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2407 ac_cpp='$CXXCPP $CPPFLAGS'
2408 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2409 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2410 cross_compiling=$ac_cv_prog_cxx_cross
2412 cat > conftest.$ac_ext << EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2417 int main(){return(0);}
2419 if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2420 ac_cv_prog_cxx_works=yes
2421 # If we can't run a trivial program, we are probably using a cross compiler.
2422 if (./conftest; exit) 2>/dev/null; then
2423 ac_cv_prog_cxx_cross=no
2424 else
2425 ac_cv_prog_cxx_cross=yes
2427 else
2428 echo "configure: failed program was:" >&5
2429 cat conftest.$ac_ext >&5
2430 ac_cv_prog_cxx_works=no
2432 rm -fr conftest*
2433 ac_ext=c
2434 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2435 ac_cpp='$CPP $CPPFLAGS'
2436 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2437 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2438 cross_compiling=$ac_cv_prog_cc_cross
2440 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2441 if test $ac_cv_prog_cxx_works = no; then
2442 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2444 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2445 echo "configure:2446: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2446 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2447 cross_compiling=$ac_cv_prog_cxx_cross
2449 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2450 echo "configure:2451: checking whether we are using GNU C++" >&5
2451 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454 cat > conftest.C <<EOF
2455 #ifdef __GNUC__
2456 yes;
2457 #endif
2459 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2460 ac_cv_prog_gxx=yes
2461 else
2462 ac_cv_prog_gxx=no
2466 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2468 if test $ac_cv_prog_gxx = yes; then
2469 GXX=yes
2470 else
2471 GXX=
2474 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2475 ac_save_CXXFLAGS="$CXXFLAGS"
2476 CXXFLAGS=
2477 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2478 echo "configure:2479: checking whether ${CXX-g++} accepts -g" >&5
2479 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482 echo 'void f(){}' > conftest.cc
2483 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2484 ac_cv_prog_cxx_g=yes
2485 else
2486 ac_cv_prog_cxx_g=no
2488 rm -f conftest*
2492 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2493 if test "$ac_test_CXXFLAGS" = set; then
2494 CXXFLAGS="$ac_save_CXXFLAGS"
2495 elif test $ac_cv_prog_cxx_g = yes; then
2496 if test "$GXX" = yes; then
2497 CXXFLAGS="-g -O2"
2498 else
2499 CXXFLAGS="-g"
2501 else
2502 if test "$GXX" = yes; then
2503 CXXFLAGS="-O2"
2504 else
2505 CXXFLAGS=
2511 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2512 echo "configure:2513: checking how to run the C preprocessor" >&5
2513 # On Suns, sometimes $CPP names a directory.
2514 if test -n "$CPP" && test -d "$CPP"; then
2515 CPP=
2517 if test -z "$CPP"; then
2518 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2519 echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521 # This must be in double quotes, not single quotes, because CPP may get
2522 # substituted into the Makefile and "${CC-cc}" will confuse make.
2523 CPP="${CC-cc} -E"
2524 # On the NeXT, cc -E runs the code through the compiler's parser,
2525 # not just through cpp.
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 #include <assert.h>
2530 Syntax Error
2532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2533 { (eval echo configure:2534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535 if test -z "$ac_err"; then
2537 else
2538 echo "$ac_err" >&5
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 rm -rf conftest*
2542 CPP="${CC-cc} -E -traditional-cpp"
2543 cat > conftest.$ac_ext <<EOF
2544 #line 2545 "configure"
2545 #include "confdefs.h"
2546 #include <assert.h>
2547 Syntax Error
2549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2550 { (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552 if test -z "$ac_err"; then
2554 else
2555 echo "$ac_err" >&5
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -rf conftest*
2559 CPP="${CC-cc} -nologo -E"
2560 cat > conftest.$ac_ext <<EOF
2561 #line 2562 "configure"
2562 #include "confdefs.h"
2563 #include <assert.h>
2564 Syntax Error
2566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2567 { (eval echo configure:2568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2569 if test -z "$ac_err"; then
2571 else
2572 echo "$ac_err" >&5
2573 echo "configure: failed program was:" >&5
2574 cat conftest.$ac_ext >&5
2575 rm -rf conftest*
2576 CPP=/lib/cpp
2578 rm -f conftest*
2580 rm -f conftest*
2582 rm -f conftest*
2583 ac_cv_prog_CPP="$CPP"
2585 CPP="$ac_cv_prog_CPP"
2586 else
2587 ac_cv_prog_CPP="$CPP"
2589 echo "$ac_t""$CPP" 1>&6
2591 # Extract the first word of "ranlib", so it can be a program name with args.
2592 set dummy ranlib; ac_word=$2
2593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_word" >&5
2595 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2596 echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598 if test -n "$RANLIB"; then
2599 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2600 else
2601 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2602 ac_dummy="$PATH"
2603 for ac_dir in $ac_dummy; do
2604 test -z "$ac_dir" && ac_dir=.
2605 if test -f $ac_dir/$ac_word; then
2606 ac_cv_prog_RANLIB="ranlib"
2607 break
2609 done
2610 IFS="$ac_save_ifs"
2611 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2614 RANLIB="$ac_cv_prog_RANLIB"
2615 if test -n "$RANLIB"; then
2616 echo "$ac_t""$RANLIB" 1>&6
2617 else
2618 echo "$ac_t""no" 1>&6
2621 for ac_prog in as
2623 # Extract the first word of "$ac_prog", so it can be a program name with args.
2624 set dummy $ac_prog; ac_word=$2
2625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2626 echo "configure:2627: checking for $ac_word" >&5
2627 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630 case "$AS" in
2632 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2634 ?:/*)
2635 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2639 ac_dummy="$PATH"
2640 for ac_dir in $ac_dummy; do
2641 test -z "$ac_dir" && ac_dir=.
2642 if test -f $ac_dir/$ac_word; then
2643 ac_cv_path_AS="$ac_dir/$ac_word"
2644 break
2646 done
2647 IFS="$ac_save_ifs"
2649 esac
2651 AS="$ac_cv_path_AS"
2652 if test -n "$AS"; then
2653 echo "$ac_t""$AS" 1>&6
2654 else
2655 echo "$ac_t""no" 1>&6
2658 test -n "$AS" && break
2659 done
2660 test -n "$AS" || AS="$CC"
2662 for ac_prog in ar
2664 # Extract the first word of "$ac_prog", so it can be a program name with args.
2665 set dummy $ac_prog; ac_word=$2
2666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2667 echo "configure:2668: checking for $ac_word" >&5
2668 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2669 echo $ac_n "(cached) $ac_c" 1>&6
2670 else
2671 case "$AR" in
2673 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2675 ?:/*)
2676 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2680 ac_dummy="$PATH"
2681 for ac_dir in $ac_dummy; do
2682 test -z "$ac_dir" && ac_dir=.
2683 if test -f $ac_dir/$ac_word; then
2684 ac_cv_path_AR="$ac_dir/$ac_word"
2685 break
2687 done
2688 IFS="$ac_save_ifs"
2690 esac
2692 AR="$ac_cv_path_AR"
2693 if test -n "$AR"; then
2694 echo "$ac_t""$AR" 1>&6
2695 else
2696 echo "$ac_t""no" 1>&6
2699 test -n "$AR" && break
2700 done
2701 test -n "$AR" || AR="echo not_ar"
2703 for ac_prog in ld link
2705 # Extract the first word of "$ac_prog", so it can be a program name with args.
2706 set dummy $ac_prog; ac_word=$2
2707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_word" >&5
2709 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712 case "$LD" in
2714 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2716 ?:/*)
2717 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2721 ac_dummy="$PATH"
2722 for ac_dir in $ac_dummy; do
2723 test -z "$ac_dir" && ac_dir=.
2724 if test -f $ac_dir/$ac_word; then
2725 ac_cv_path_LD="$ac_dir/$ac_word"
2726 break
2728 done
2729 IFS="$ac_save_ifs"
2731 esac
2733 LD="$ac_cv_path_LD"
2734 if test -n "$LD"; then
2735 echo "$ac_t""$LD" 1>&6
2736 else
2737 echo "$ac_t""no" 1>&6
2740 test -n "$LD" && break
2741 done
2742 test -n "$LD" || LD="echo not_ld"
2744 for ac_prog in strip
2746 # Extract the first word of "$ac_prog", so it can be a program name with args.
2747 set dummy $ac_prog; ac_word=$2
2748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2749 echo "configure:2750: checking for $ac_word" >&5
2750 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753 case "$STRIP" in
2755 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2757 ?:/*)
2758 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2762 ac_dummy="$PATH"
2763 for ac_dir in $ac_dummy; do
2764 test -z "$ac_dir" && ac_dir=.
2765 if test -f $ac_dir/$ac_word; then
2766 ac_cv_path_STRIP="$ac_dir/$ac_word"
2767 break
2769 done
2770 IFS="$ac_save_ifs"
2772 esac
2774 STRIP="$ac_cv_path_STRIP"
2775 if test -n "$STRIP"; then
2776 echo "$ac_t""$STRIP" 1>&6
2777 else
2778 echo "$ac_t""no" 1>&6
2781 test -n "$STRIP" && break
2782 done
2783 test -n "$STRIP" || STRIP="echo not_strip"
2785 for ac_prog in windres
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2792 echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794 case "$WINDRES" in
2796 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2798 ?:/*)
2799 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2803 ac_dummy="$PATH"
2804 for ac_dir in $ac_dummy; do
2805 test -z "$ac_dir" && ac_dir=.
2806 if test -f $ac_dir/$ac_word; then
2807 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2808 break
2810 done
2811 IFS="$ac_save_ifs"
2813 esac
2815 WINDRES="$ac_cv_path_WINDRES"
2816 if test -n "$WINDRES"; then
2817 echo "$ac_t""$WINDRES" 1>&6
2818 else
2819 echo "$ac_t""no" 1>&6
2822 test -n "$WINDRES" && break
2823 done
2824 test -n "$WINDRES" || WINDRES="echo not_windres"
2826 if test -z "$HOST_CC"; then
2827 HOST_CC="$CC"
2829 if test -z "$HOST_CFLAGS"; then
2830 HOST_CFLAGS="$CFLAGS"
2834 if test "$GCC" = "yes"; then
2835 GNU_CC=1
2837 if test "$GXX" = "yes"; then
2838 GNU_CXX=1
2840 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2841 GNU_AS=1
2843 rm -f a.out
2845 case "$build:$target" in
2846 i?86-apple-darwin*:powerpc-apple-darwin*)
2847 cross_compiling=yes
2849 esac
2851 if test "$cross_compiling" = "yes"; then
2852 CROSS_COMPILE=1
2853 else
2854 CROSS_COMPILE=
2857 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2858 echo "configure:2859: checking for gcc -pipe support" >&5
2859 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2860 echo '#include <stdio.h>' > dummy-hello.c
2861 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2862 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2863 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2864 if test $? = 0; then
2865 _res_as_stdin="yes"
2866 else
2867 _res_as_stdin="no"
2869 if test "$_res_as_stdin" = "yes"; then
2870 _SAVE_CFLAGS=$CFLAGS
2871 CFLAGS="$CFLAGS -pipe"
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <stdio.h>
2876 int main() {
2877 printf("Hello World\n");
2878 ; return 0; }
2880 if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2881 rm -rf conftest*
2882 _res_gcc_pipe="yes"
2883 else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 _res_gcc_pipe="no"
2889 rm -f conftest*
2890 CFLAGS=$_SAVE_CFLAGS
2892 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2893 _res="yes";
2894 CFLAGS="$CFLAGS -pipe"
2895 CXXFLAGS="$CXXFLAGS -pipe"
2896 else
2897 _res="no"
2899 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2900 echo "$ac_t""$_res" 1>&6
2901 else
2902 echo "$ac_t""no" 1>&6
2906 _SAVE_CFLAGS="$CFLAGS"
2907 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2909 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2910 echo "configure:2911: checking whether C compiler supports -fprofile-generate" >&5
2911 cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2915 int main() {
2916 return 0;
2917 ; return 0; }
2919 if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2920 rm -rf conftest*
2921 PROFILE_GEN_CFLAGS="-fprofile-generate"
2922 result="yes"
2923 else
2924 echo "configure: failed program was:" >&5
2925 cat conftest.$ac_ext >&5
2926 rm -rf conftest*
2927 result="no"
2929 rm -f conftest*
2930 echo "$ac_t""$result" 1>&6
2932 if test $result = "yes"; then
2933 PROFILE_GEN_LDFLAGS="-fprofile-generate"
2934 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
2935 PROFILE_USE_LDFLAGS="-fprofile-use"
2938 CFLAGS="$_SAVE_CFLAGS"
2940 if test "$GNU_CC"; then
2941 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2942 echo "configure:2943: checking for visibility(hidden) attribute" >&5
2943 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2944 echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946 cat > conftest.c <<EOF
2947 int foo __attribute__ ((visibility ("hidden"))) = 1;
2949 ac_cv_visibility_hidden=no
2950 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2951 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2952 ac_cv_visibility_hidden=yes
2955 rm -f conftest.cs
2959 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2960 if test "$ac_cv_visibility_hidden" = "yes"; then
2961 cat >> confdefs.h <<\EOF
2962 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2965 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2966 echo "configure:2967: checking for visibility pragma support" >&5
2967 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2968 echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970 cat > conftest.c <<EOF
2971 #pragma GCC visibility push(hidden)
2972 int foo_hidden = 1;
2973 #pragma GCC visibility push(default)
2974 int foo_default = 1;
2976 ac_cv_visibility_pragma=no
2977 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2978 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2979 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2980 ac_cv_visibility_pragma=yes
2984 rm -f conftest.cs
2988 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2989 if test "$ac_cv_visibility_pragma" = "yes"; then
2990 cat >> confdefs.h <<\EOF
2991 #define HAVE_VISIBILITY_PRAGMA 1
2994 # To work around a build problem on Linux x86-64 (Bugzilla bug
2995 # 293438), we use the -fvisibility=hidden flag. This flag is less
2996 # optimal than #pragma GCC visibility push(hidden) because the flag
2997 # assumes that symbols defined outside the current source file have
2998 # the default visibility. This has the advantage that we don't need
2999 # to wrap system header files, but has the disadvantage that calls
3000 # to hidden symbols defined in other source files cannot be
3001 # optimized by the compiler. The -fvisibility=hidden flag does
3002 # hide and export symbols correctly.
3003 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
3004 #WRAP_SYSTEM_INCLUDES=1
3005 VISIBILITY_FLAGS="-fvisibility=hidden"
3006 WRAP_SYSTEM_INCLUDES=
3009 fi # GNU_CC
3011 fi # SKIP_COMPILER_CHECKS
3013 if test -z "$SKIP_PATH_CHECKS"; then
3014 for ac_prog in perl5 perl
3016 # Extract the first word of "$ac_prog", so it can be a program name with args.
3017 set dummy $ac_prog; ac_word=$2
3018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3019 echo "configure:3020: checking for $ac_word" >&5
3020 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3021 echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023 case "$PERL" in
3025 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3027 ?:/*)
3028 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
3031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3032 ac_dummy="$PATH"
3033 for ac_dir in $ac_dummy; do
3034 test -z "$ac_dir" && ac_dir=.
3035 if test -f $ac_dir/$ac_word; then
3036 ac_cv_path_PERL="$ac_dir/$ac_word"
3037 break
3039 done
3040 IFS="$ac_save_ifs"
3042 esac
3044 PERL="$ac_cv_path_PERL"
3045 if test -n "$PERL"; then
3046 echo "$ac_t""$PERL" 1>&6
3047 else
3048 echo "$ac_t""no" 1>&6
3051 test -n "$PERL" && break
3052 done
3053 test -n "$PERL" || PERL="echo not_perl"
3055 elif test -z "$PERL"; then
3056 PERL=perl
3059 OBJ_SUFFIX=o
3060 LIB_SUFFIX=a
3061 DLL_SUFFIX=so
3062 ASM_SUFFIX=s
3063 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
3064 PR_MD_ASFILES=
3065 PR_MD_CSRCS=
3066 PR_MD_ARCH_DIR=unix
3067 AR_FLAGS='cr $@'
3068 AS='$(CC)'
3069 ASFLAGS='$(CFLAGS)'
3071 if test -n "$CROSS_COMPILE"; then
3072 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
3073 OS_RELEASE=
3074 OS_TEST="${target_cpu}"
3075 case "${target_os}" in
3076 linux*) OS_ARCH=Linux ;;
3077 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
3078 mingw*) OS_ARCH=WINNT ;;
3079 wince*) OS_ARCH=WINCE ;;
3080 winmo*) OS_ARCH=WINCE ;;
3081 darwin*) OS_ARCH=Darwin ;;
3082 riscos*) OS_ARCH=RISCOS ;;
3083 esac
3084 else
3085 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
3086 OS_RELEASE=`uname -r`
3087 OS_TEST=`uname -m`
3090 if test "$OS_ARCH" = "IRIX64"; then
3091 OS_ARCH=IRIX
3094 if test "$OS_ARCH" = "AIX"; then
3095 OS_RELEASE=`uname -v`.`uname -r`
3098 if test "$OS_ARCH" = "FreeBSD"; then
3099 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3102 if test "$OS_ARCH" = "Linux"; then
3103 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
3104 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
3107 #######################################################################
3108 # Master "Core Components" macros for getting the OS target #
3109 #######################################################################
3112 # Note: OS_TARGET should be specified on the command line for gmake.
3113 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
3114 # The difference between the Win95 target and the WinNT target is that
3115 # the WinNT target uses Windows NT specific features not available
3116 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
3117 # at lesser performance (the Win95 target uses threads; the WinNT target
3118 # uses fibers).
3120 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
3121 # cross-compilation.
3125 # The following hack allows one to build on a WIN95 machine (as if
3126 # s/he were cross-compiling on a WINNT host for a WIN95 target).
3127 # It also accomodates for MKS's uname.exe. If you never intend
3128 # to do development on a WIN95 machine, you don't need this hack.
3130 case "$OS_ARCH" in
3131 WIN95)
3132 OS_ARCH=WINNT
3133 OS_TARGET=WIN95
3135 Windows_95)
3136 OS_ARCH=Windows_NT
3137 OS_TARGET=WIN95
3139 Windows_98)
3140 OS_ARCH=Windows_NT
3141 OS_TARGET=WIN95
3143 CYGWIN_9*|CYGWIN_ME*)
3144 OS_ARCH='CYGWIN_NT-4.0'
3145 OS_TARGET=WIN95
3147 OS_2)
3148 OS_ARCH=OS2
3149 OS_TARGET=OS2
3151 esac
3154 # On WIN32, we also define the variable CPU_ARCH.
3157 case "$OS_ARCH" in
3158 WINNT)
3159 CPU_ARCH=`uname -p`
3160 if test "$CPU_ARCH" = "I386"; then
3161 CPU_ARCH=x86
3164 Windows_NT)
3166 # If uname -s returns "Windows_NT", we assume that we are using
3167 # the uname.exe in MKS toolkit.
3169 # The -r option of MKS uname only returns the major version number.
3170 # So we need to use its -v option to get the minor version number.
3171 # Moreover, it doesn't have the -p option, so we need to use uname -m.
3173 OS_ARCH=WINNT
3174 OS_MINOR_RELEASE=`uname -v`
3175 if test "$OS_MINOR_RELEASE" = "00"; then
3176 OS_MINOR_RELEASE=0
3178 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
3179 CPU_ARCH=`uname -m`
3181 # MKS's uname -m returns "586" on a Pentium machine.
3183 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3184 CPU_ARCH=x86
3187 CYGWIN_NT*|MINGW*_NT*)
3189 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
3190 # the uname.exe in the Cygwin tools.
3191 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
3192 # the uname.exe in the MSYS tools.
3194 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
3195 OS_ARCH=WINNT
3196 CPU_ARCH=`uname -m`
3198 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
3200 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3201 CPU_ARCH=x86
3204 esac
3206 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
3207 OS_TARGET=WIN95
3208 if test -n "$MOZ_DEBUG"; then
3209 USE_DEBUG_RTL=1
3212 if test -z "$OS_TARGET"; then
3213 OS_TARGET=$OS_ARCH
3215 if test "$OS_TARGET" = "WIN95"; then
3216 OS_RELEASE="4.0"
3218 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
3220 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
3221 if test "${enable_os2_high_mem+set}" = set; then
3222 enableval="$enable_os2_high_mem"
3223 if test "$enableval" = "no"; then
3224 MOZ_OS2_HIGH_MEMORY=
3225 else
3226 MOZ_OS2_HIGH_MEMORY=1
3232 case "$target" in
3233 arm*-android*|arm*-linuxandroid*)
3234 MOZ_THUMB=yes
3235 MOZ_ARCH=armv7-a
3236 MOZ_FPU=vfp
3237 MOZ_FLOAT_ABI=softfp
3238 MOZ_SOFT_FLOAT=yes
3240 arm*-*)
3241 if test -n "$MOZ_PLATFORM_MAEMO"; then
3242 MOZ_THUMB=no
3243 MOZ_ARCH=armv7-a
3244 MOZ_FLOAT_ABI=softfp
3246 if test "$MOZ_PLATFORM_MAEMO" = 6; then
3247 MOZ_THUMB=yes
3250 esac
3252 # Check whether --enable-thumb2 or --disable-thumb2 was given.
3253 if test "${enable_thumb2+set}" = set; then
3254 enableval="$enable_thumb2"
3255 MOZ_THUMB=$enableval
3259 # Check whether --with-thumb or --without-thumb was given.
3260 if test "${with_thumb+set}" = set; then
3261 withval="$with_thumb"
3262 if test -z "$GNU_CC"; then
3263 { echo "configure: error: --with-thumb is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3265 MOZ_THUMB=$withval
3269 # Check whether --with-thumb-interwork or --without-thumb-interwork was given.
3270 if test "${with_thumb_interwork+set}" = set; then
3271 withval="$with_thumb_interwork"
3272 if test -z "$GNU_CC"; then
3273 { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3275 MOZ_THUMB_INTERWORK=$withval
3279 # Check whether --with-arch or --without-arch was given.
3280 if test "${with_arch+set}" = set; then
3281 withval="$with_arch"
3282 if test -z "$GNU_CC"; then
3283 { echo "configure: error: --with-arch is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3285 MOZ_ARCH=$withval
3289 # Check whether --with-fpu or --without-fpu was given.
3290 if test "${with_fpu+set}" = set; then
3291 withval="$with_fpu"
3292 if test -z "$GNU_CC"; then
3293 { echo "configure: error: --with-fpu is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3295 MOZ_FPU=$withval
3299 # Check whether --with-float-abi or --without-float-abi was given.
3300 if test "${with_float_abi+set}" = set; then
3301 withval="$with_float_abi"
3302 if test -z "$GNU_CC"; then
3303 { echo "configure: error: --with-float-abi is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3305 MOZ_FLOAT_ABI=$withval
3309 # Check whether --with-soft-float or --without-soft-float was given.
3310 if test "${with_soft_float+set}" = set; then
3311 withval="$with_soft_float"
3312 if test -z "$GNU_CC"; then
3313 { echo "configure: error: --with-soft-float is not supported on non-GNU toolchain-defaults" 1>&2; exit 1; }
3315 MOZ_SOFT_FLOAT=$withval
3319 case "$MOZ_ARCH" in
3320 toolchain-default|"")
3321 arch_flag=""
3324 arch_flag="-march=$MOZ_ARCH"
3326 esac
3328 case "$MOZ_THUMB" in
3329 yes)
3330 MOZ_THUMB2=1
3331 thumb_flag="-mthumb"
3334 MOZ_THUMB2=
3335 thumb_flag="-marm"
3338 _SAVE_CFLAGS="$CFLAGS"
3339 CFLAGS="$arch_flag"
3340 cat > conftest.$ac_ext <<EOF
3341 #line 3342 "configure"
3342 #include "confdefs.h"
3344 int main() {
3345 return sizeof(__thumb2__);
3346 ; return 0; }
3348 if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3349 rm -rf conftest*
3350 MOZ_THUMB2=1
3351 else
3352 echo "configure: failed program was:" >&5
3353 cat conftest.$ac_ext >&5
3354 rm -rf conftest*
3355 MOZ_THUMB2=
3357 rm -f conftest*
3358 CFLAGS="$_SAVE_CFLAGS"
3359 thumb_flag=""
3361 esac
3363 case "$MOZ_THUMB_INTERWORK" in
3364 yes)
3365 thumb_interwork_flag="-mthumb-interwork"
3368 thumb_interwork_flag="-mno-thumb-interwork"
3370 *) # toolchain-default
3371 thumb_interwork_flag=""
3373 esac
3375 case "$MOZ_FPU" in
3376 toolchain-default|"")
3377 fpu_flag=""
3380 fpu_flag="-mfpu=$MOZ_FPU"
3382 esac
3384 case "$MOZ_FLOAT_ABI" in
3385 toolchain-default|"")
3386 float_abi_flag=""
3389 float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
3391 esac
3393 case "$MOZ_SOFT_FLOAT" in
3394 yes)
3395 soft_float_flag="-msoft-float"
3398 soft_float_flag="-mno-soft-float"
3400 *) # toolchain-default
3401 soft_float_flag=""
3403 esac
3405 all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
3406 if test -n "$all_flags"; then
3407 _SAVE_CFLAGS="$CFLAGS"
3408 CFLAGS="$all_flags"
3409 echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
3410 echo "configure:3411: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
3411 cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3415 int main() {
3416 return 0;
3417 ; return 0; }
3419 if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3420 rm -rf conftest*
3421 echo "$ac_t""yes" 1>&6
3422 else
3423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3425 rm -rf conftest*
3426 { echo "configure: error: no" 1>&2; exit 1; }
3428 rm -f conftest*
3430 CFLAGS="$_SAVE_CFLAGS $all_flags"
3431 CXXFLAGS="$CXXFLAGS $all_flags"
3432 ASFLAGS="$ASFLAGS $all_flags"
3433 if test -n "$thumb_flag"; then
3434 LDFLAGS="$LDFLAGS $thumb_flag"
3438 case "$host" in
3439 *-mingw*)
3440 NSINSTALL=nsinstall
3442 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
3443 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
3444 if test `echo "${PATH}" | grep -c \;` = 0; then
3445 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
3448 *-beos*)
3449 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
3451 *os2*)
3454 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
3456 esac
3458 case "$target" in
3460 *-aix*)
3461 cat >> confdefs.h <<\EOF
3462 #define XP_UNIX 1
3465 cat >> confdefs.h <<\EOF
3466 #define AIX 1
3469 cat >> confdefs.h <<\EOF
3470 #define SYSV 1
3473 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3474 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3475 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3476 echo "configure:3477: checking for sys/atomic_op.h" >&5
3477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3478 echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480 cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <sys/atomic_op.h>
3485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3486 { (eval echo configure:3487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3488 if test -z "$ac_err"; then
3489 rm -rf conftest*
3490 eval "ac_cv_header_$ac_safe=yes"
3491 else
3492 echo "$ac_err" >&5
3493 echo "configure: failed program was:" >&5
3494 cat conftest.$ac_ext >&5
3495 rm -rf conftest*
3496 eval "ac_cv_header_$ac_safe=no"
3498 rm -f conftest*
3500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3501 echo "$ac_t""yes" 1>&6
3502 cat >> confdefs.h <<\EOF
3503 #define AIX_HAVE_ATOMIC_OP_H 1
3506 else
3507 echo "$ac_t""no" 1>&6
3510 case "${target_os}" in
3511 aix3.2*)
3512 cat >> confdefs.h <<\EOF
3513 #define AIX_RENAME_SELECT 1
3516 cat >> confdefs.h <<\EOF
3517 #define _PR_NO_LARGE_FILES 1
3520 AIX_LINK_OPTS='-bnso -berok'
3521 PR_MD_ASFILES=os_AIX.s
3523 aix4.1*)
3524 cat >> confdefs.h <<\EOF
3525 #define AIX_TIMERS 1
3528 cat >> confdefs.h <<\EOF
3529 #define _PR_NO_LARGE_FILES 1
3532 cat >> confdefs.h <<\EOF
3533 #define AIX4_1 1
3536 MKSHLIB=
3537 DSO_LDOPTS=
3538 AIX_LINK_OPTS='-bnso -berok'
3539 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3540 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3542 aix4.2*)
3543 cat >> confdefs.h <<\EOF
3544 #define AIX_TIMERS 1
3547 cat >> confdefs.h <<\EOF
3548 #define _PR_HAVE_OFF64_T 1
3551 AIX_LINK_OPTS='-brtl -bnso -berok'
3553 aix4.3*)
3554 cat >> confdefs.h <<\EOF
3555 #define AIX_TIMERS 1
3558 cat >> confdefs.h <<\EOF
3559 #define _PR_HAVE_OFF64_T 1
3562 cat >> confdefs.h <<\EOF
3563 #define AIX4_3_PLUS 1
3566 cat >> confdefs.h <<\EOF
3567 #define HAVE_SOCKLEN_T 1
3570 cat >> confdefs.h <<\EOF
3571 #define HAVE_FCNTL_FILE_LOCKING 1
3574 USE_IPV6=1
3575 AIX_LINK_OPTS='-brtl -bnso -berok'
3578 cat >> confdefs.h <<\EOF
3579 #define AIX_TIMERS 1
3582 cat >> confdefs.h <<\EOF
3583 #define _PR_HAVE_OFF64_T 1
3586 cat >> confdefs.h <<\EOF
3587 #define AIX4_3_PLUS 1
3590 cat >> confdefs.h <<\EOF
3591 #define HAVE_SOCKLEN_T 1
3594 cat >> confdefs.h <<\EOF
3595 #define HAVE_FCNTL_FILE_LOCKING 1
3598 USE_IPV6=1
3599 AIX_LINK_OPTS='-brtl -bnso -berok'
3601 esac
3602 CFLAGS="$CFLAGS -qro -qroconst"
3603 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3604 AIX_TMP='./_aix_tmp.o'
3605 if test -n "$USE_64"; then
3606 MDCPUCFG_H=_aix64.cfg
3607 OBJECT_MODE=64
3608 else
3609 MDCPUCFG_H=_aix32.cfg
3611 PR_MD_CSRCS=aix.c
3612 RESOLVE_LINK_SYMBOLS=1
3615 *-beos*)
3616 cat >> confdefs.h <<\EOF
3617 #define XP_BEOS 1
3620 cat >> confdefs.h <<\EOF
3621 #define BeOS 1
3624 cat >> confdefs.h <<\EOF
3625 #define BEOS 1
3628 cat >> confdefs.h <<\EOF
3629 #define _POSIX_SOURCE 1
3632 DSO_LDOPTS=-nostart
3633 MDCPUCFG_H=_beos.cfg
3634 USE_BTHREADS=1
3635 PR_MD_ARCH_DIR=beos
3636 RESOLVE_LINK_SYMBOLS=1
3637 case "${target_cpu}" in
3638 i*86)
3639 _OPTIMIZE_FLAGS=-O2
3640 _DEBUG_FLAGS='-gdwarf-2 -O0'
3641 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3642 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3643 echo "configure:3644: checking for gethostbyaddr in -lbind" >&5
3644 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3645 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648 ac_save_LIBS="$LIBS"
3649 LIBS="-lbind $LIBS"
3650 cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 /* Override any gcc2 internal prototype to avoid an error. */
3654 /* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3656 char gethostbyaddr();
3658 int main() {
3659 gethostbyaddr()
3660 ; return 0; }
3662 if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3663 rm -rf conftest*
3664 eval "ac_cv_lib_$ac_lib_var=yes"
3665 else
3666 echo "configure: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 rm -rf conftest*
3669 eval "ac_cv_lib_$ac_lib_var=no"
3671 rm -f conftest*
3672 LIBS="$ac_save_LIBS"
3675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3676 echo "$ac_t""yes" 1>&6
3677 OS_LIBS="$OS_LIBS -lbind -lsocket"
3678 else
3679 echo "$ac_t""no" 1>&6
3683 powerpc)
3684 CC=mwcc
3685 CCC=mwcc
3686 LD=mwld
3687 DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o'
3688 _OPTIMIZE_FLAGS=-O2
3689 _DEBUG_FLAGS='-g -O0'
3691 esac
3694 *-bsdi*)
3695 cat >> confdefs.h <<\EOF
3696 #define XP_UNIX 1
3699 cat >> confdefs.h <<\EOF
3700 #define BSDI 1
3703 cat >> confdefs.h <<\EOF
3704 #define NEED_BSDREGEX 1
3708 CFLAGS="$CFLAGS -Wall -Wno-format"
3709 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3711 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3712 CPU_ARCH=x86
3713 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3714 CPU_ARCH=sparc
3717 MDCPUCFG_H=_bsdi.cfg
3718 PR_MD_CSRCS=bsdi.c
3720 DSO_LDOPTS=-r
3722 case "$target_os" in
3723 bsdi1.1*)
3724 cat >> confdefs.h <<\EOF
3725 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3728 cat >> confdefs.h <<\EOF
3729 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3732 cat >> confdefs.h <<\EOF
3733 #define _PR_NEED_H_ERRNO 1
3736 MKSHLIB=
3737 DSO_CFLAGS=
3738 DSO_LDOPTS=
3741 bsdi2.1*)
3742 cat >> confdefs.h <<\EOF
3743 #define _PR_TIMESPEC_HAS_TS_SEC 1
3746 cat >> confdefs.h <<\EOF
3747 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3750 cat >> confdefs.h <<\EOF
3751 #define HAVE_DLL 1
3754 cat >> confdefs.h <<\EOF
3755 #define USE_DLFCN 1
3758 cat >> confdefs.h <<\EOF
3759 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3762 PR_MD_ASFILES=os_BSD_OS_386_2.s
3765 bsdi4.* | bsdi5.*)
3766 cat >> confdefs.h <<\EOF
3767 #define _PR_SELECT_CONST_TIMEVAL 1
3770 cat >> confdefs.h <<\EOF
3771 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3774 cat >> confdefs.h <<\EOF
3775 #define HAVE_DLL 1
3778 cat >> confdefs.h <<\EOF
3779 #define USE_DLFCN 1
3782 cat >> confdefs.h <<\EOF
3783 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3786 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3787 DSO_CFLAGS=-fPIC
3788 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3789 STRIP="$STRIP -d"
3790 case "$target_os" in
3791 bsdi4.2* | bsdi4.3* | bsdi5.*)
3792 cat >> confdefs.h <<\EOF
3793 #define _PR_HAVE_GETPROTO_R 1
3796 cat >> confdefs.h <<\EOF
3797 #define _PR_HAVE_GETPROTO_R_POINTER 1
3801 esac
3804 cat >> confdefs.h <<\EOF
3805 #define _PR_SELECT_CONST_TIMEVAL 1
3808 cat >> confdefs.h <<\EOF
3809 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3812 cat >> confdefs.h <<\EOF
3813 #define HAVE_DLL 1
3816 cat >> confdefs.h <<\EOF
3817 #define USE_DLFCN 1
3820 cat >> confdefs.h <<\EOF
3821 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3825 esac
3829 *-darwin*)
3830 cat >> confdefs.h <<\EOF
3831 #define XP_UNIX 1
3834 cat >> confdefs.h <<\EOF
3835 #define DARWIN 1
3838 cat >> confdefs.h <<\EOF
3839 #define HAVE_BSD_FLOCK 1
3842 cat >> confdefs.h <<\EOF
3843 #define HAVE_SOCKLEN_T 1
3846 AS='$(CC) -x assembler-with-cpp'
3847 CFLAGS="$CFLAGS -Wall -fno-common"
3848 case "${target_cpu}" in
3849 arm*)
3850 CPU_ARCH=arm
3852 i*86*)
3853 if test -n "$USE_64"; then
3854 CPU_ARCH=x86_64
3855 else
3856 CPU_ARCH=i386
3859 x86_64)
3860 CPU_ARCH=x86_64
3863 CPU_ARCH=ppc
3865 esac
3866 if test "`echo $CC | grep -c '\-arch '`" = "0"; then
3867 CC="$CC -arch $CPU_ARCH"
3869 ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'`
3870 echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6
3871 echo "configure:3872: checking for crt_externs.h" >&5
3872 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
3874 else
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3878 #include <crt_externs.h>
3880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3881 { (eval echo configure:3882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3883 if test -z "$ac_err"; then
3884 rm -rf conftest*
3885 eval "ac_cv_header_$ac_safe=yes"
3886 else
3887 echo "$ac_err" >&5
3888 echo "configure: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3890 rm -rf conftest*
3891 eval "ac_cv_header_$ac_safe=no"
3893 rm -f conftest*
3895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3896 echo "$ac_t""yes" 1>&6
3898 else
3899 echo "$ac_t""no" 1>&6
3902 DSO_CFLAGS=-fPIC
3903 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3904 _OPTIMIZE_FLAGS=-O2
3905 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3906 STRIP="$STRIP -x -S"
3907 DLL_SUFFIX=dylib
3908 USE_PTHREADS=1
3909 MDCPUCFG_H=_darwin.cfg
3910 PR_MD_CSRCS=darwin.c
3911 PR_MD_ASFILES=os_Darwin.s
3913 # Add Mac OS X support for loading CFM & CFBundle plugins
3914 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3915 cat >> confdefs.h <<\EOF
3916 #define XP_MACOSX 1
3919 OS_TARGET=MacOSX
3921 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3922 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3923 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3924 case "${target_cpu}" in
3925 powerpc*)
3926 export MACOSX_DEPLOYMENT_TARGET=10.2
3928 i*86*)
3929 export MACOSX_DEPLOYMENT_TARGET=10.4
3931 esac
3935 if test "$MACOS_SDK_DIR"; then
3937 if test ! -d "$MACOS_SDK_DIR"; then
3938 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3939 specify a valid SDK. SDKs are installed when the optional cross-development
3940 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3944 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3945 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3946 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3948 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3949 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3950 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3951 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3952 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3955 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3957 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3959 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3962 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3964 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3965 MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
3966 else
3967 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3970 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3971 export NEXT_ROOT=$MACOS_SDK_DIR
3973 if test -n "$CROSS_COMPILE" ; then
3974 HOST_CC="NEXT_ROOT= $HOST_CC"
3975 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3977 else
3978 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3980 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3982 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3983 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3984 else
3985 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3992 *-dgux*)
3993 cat >> confdefs.h <<\EOF
3994 #define XP_UNIX 1
3997 cat >> confdefs.h <<\EOF
3998 #define _PR_LOCAL_THREADS_ONLY 1
4001 cat >> confdefs.h <<\EOF
4002 #define SVR4 1
4005 cat >> confdefs.h <<\EOF
4006 #define SYSV 1
4009 cat >> confdefs.h <<\EOF
4010 #define DGUX 1
4013 cat >> confdefs.h <<\EOF
4014 #define _DGUX_SOURCE 1
4017 cat >> confdefs.h <<\EOF
4018 #define _POSIX4A_DRAFT6_SOURCE 1
4021 DSO_LDOPTS=-G
4022 _OPTIMIZE_FLAGS=-O2
4023 _DEBUG_FLAGS=
4024 MDCPUCFG_H=_dgux.cfg
4025 PR_MD_CSRCS=dgux.c
4028 *-freebsd*)
4029 if test -z "$USE_NSPR_THREADS"; then
4030 USE_PTHREADS=1
4032 cat >> confdefs.h <<\EOF
4033 #define XP_UNIX 1
4036 cat >> confdefs.h <<\EOF
4037 #define FREEBSD 1
4040 cat >> confdefs.h <<\EOF
4041 #define HAVE_BSD_FLOCK 1
4044 cat >> confdefs.h <<\EOF
4045 #define HAVE_SOCKLEN_T 1
4048 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
4049 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
4050 if test "$MOZ_OBJFORMAT" = "elf"; then
4051 DLL_SUFFIX=so
4052 else
4053 DLL_SUFFIX=so.1.0
4055 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4056 DSO_CFLAGS=-fPIC
4057 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4058 MDCPUCFG_H=_freebsd.cfg
4059 PR_MD_CSRCS=freebsd.c
4062 *-hpux*)
4063 cat >> confdefs.h <<\EOF
4064 #define XP_UNIX 1
4067 cat >> confdefs.h <<\EOF
4068 #define HPUX 1
4071 cat >> confdefs.h <<\EOF
4072 #define _HPUX_SOURCE 1
4075 # OSF1 and HPUX report the POLLHUP event for a socket when the
4076 # shutdown(SHUT_WR) operation is called for the remote end, even though
4077 # the socket is still writeable. Use select(), instead of poll(), to
4078 # workaround this problem.
4079 cat >> confdefs.h <<\EOF
4080 #define _PR_POLL_WITH_SELECT 1
4083 cat >> confdefs.h <<\EOF
4084 #define _USE_BIG_FDS 1
4087 DSO_LDOPTS='-b +h $(notdir $@)'
4088 PR_MD_CSRCS=hpux.c
4089 if test "$OS_TEST" = "ia64"; then
4090 DLL_SUFFIX=so
4091 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
4092 CPU_ARCH_TAG=_$OS_TEST
4093 if test -z "$USE_64"; then
4094 COMPILER_TAG=_32
4096 PR_MD_ASFILES=os_HPUX_ia64.s
4097 else
4098 cat >> confdefs.h <<\EOF
4099 #define hppa 1
4102 DLL_SUFFIX=sl
4103 PR_MD_ASFILES=os_HPUX.s
4105 if test -n "$USE_64"; then
4106 MDCPUCFG_H=_hpux64.cfg
4107 else
4108 MDCPUCFG_H=_hpux32.cfg
4110 if test -z "$GNU_CC"; then
4111 CC="$CC -Ae"
4112 CXX="$CXX -ext"
4113 DSO_CFLAGS=+Z
4114 else
4115 DSO_CFLAGS=-fPIC
4116 ASFLAGS="$ASFLAGS -x assembler-with-cpp"
4119 if test -n "$MOZILLA_CLIENT"; then
4120 DEFAULT_IMPL_STRATEGY=_EMU
4123 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
4124 cat >> confdefs.h <<\EOF
4125 #define _PR_NEED_H_ERRNO 1
4128 cat >> confdefs.h <<\EOF
4129 #define HPUX9 1
4132 DEFAULT_IMPL_STRATEGY=_EMU
4133 USE_NSPR_THREADS=1
4136 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
4137 cat >> confdefs.h <<\EOF
4138 #define _PR_NO_LARGE_FILES 1
4143 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4144 cat >> confdefs.h <<\EOF
4145 #define _PR_NEED_H_ERRNO 1
4150 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
4151 cat >> confdefs.h <<\EOF
4152 #define HAVE_INT_LOCALTIME_R 1
4157 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
4158 cat >> confdefs.h <<\EOF
4159 #define HAVE_POINTER_LOCALTIME_R 1
4164 # HP-UX 11i v2 (B.11.23) or higher
4166 case "$OS_RELEASE" in
4167 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
4168 USE_IPV6=1
4170 esac
4173 if test "$OS_RELEASE" = "B.10.01"; then
4174 cat >> confdefs.h <<\EOF
4175 #define HPUX10 1
4178 DEFAULT_IMPL_STRATEGY=_EMU
4181 if test "$OS_RELEASE" = "B.10.10"; then
4182 cat >> confdefs.h <<\EOF
4183 #define HPUX10 1
4186 cat >> confdefs.h <<\EOF
4187 #define HPUX10_10 1
4190 DEFAULT_IMPL_STRATEGY=_PTH
4193 if test "$OS_RELEASE" = "B.10.20"; then
4194 cat >> confdefs.h <<\EOF
4195 #define HPUX10 1
4198 cat >> confdefs.h <<\EOF
4199 #define HPUX10_20 1
4202 if test -z "$GNU_CC"; then
4203 CFLAGS="$CFLAGS +DAportable +DS1.1"
4204 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4206 DEFAULT_IMPL_STRATEGY=_PTH
4209 if test "$OS_RELEASE" = "B.10.30"; then
4210 cat >> confdefs.h <<\EOF
4211 #define HPUX10 1
4214 cat >> confdefs.h <<\EOF
4215 #define HPUX10_30 1
4218 if test -z "$GNU_CC"; then
4219 CFLAGS="$CFLAGS +DAportable +DS1.1"
4220 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
4222 DEFAULT_IMPL_STRATEGY=_PTH
4225 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
4226 cat >> confdefs.h <<\EOF
4227 #define HPUX10 1
4230 cat >> confdefs.h <<\EOF
4231 #define HPUX11 1
4234 cat >> confdefs.h <<\EOF
4235 #define _LARGEFILE64_SOURCE 1
4238 cat >> confdefs.h <<\EOF
4239 #define _PR_HAVE_OFF64_T 1
4242 cat >> confdefs.h <<\EOF
4243 #define HAVE_FCNTL_FILE_LOCKING 1
4246 if test -z "$GNU_CC"; then
4247 if test -z "$USE_64"; then
4248 if test "$OS_TEST" = "ia64"; then
4249 CFLAGS="$CFLAGS +DD32"
4250 CXXFLAGS="$CXXFLAGS +DD32"
4251 else
4252 CFLAGS="$CFLAGS +DAportable +DS2.0"
4253 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
4255 else
4256 if test "$OS_TEST" = "ia64"; then
4257 CFLAGS="$CFLAGS +DD64"
4258 CXXFLAGS="$CXXFLAGS +DD64"
4259 else
4260 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
4261 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
4265 DEFAULT_IMPL_STRATEGY=_PTH
4268 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
4269 USE_NSPR_THREADS=1
4270 USE_PTHREADS=
4271 USE_USER_PTHREADS=
4272 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
4273 USE_PTHREADS=1
4274 if test "$USE_NSPR_THREADS"; then
4275 USE_PTHREADS=
4277 if test "$USE_USER_PTHREADS"; then
4278 USE_PTHREADS=
4283 *-irix*)
4284 cat >> confdefs.h <<\EOF
4285 #define XP_UNIX 1
4288 cat >> confdefs.h <<\EOF
4289 #define IRIX 1
4292 cat >> confdefs.h <<\EOF
4293 #define SVR4 1
4296 cat >> confdefs.h <<\EOF
4297 #define _SGI_MP_SOURCE 1
4300 cat >> confdefs.h <<\EOF
4301 #define HAVE_FCNTL_FILE_LOCKING 1
4304 PR_MD_CSRCS=irix.c
4305 PR_MD_ASFILES=os_Irix.s
4306 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
4307 STRIP="$STRIP -f"
4308 RESOLVE_LINK_SYMBOLS=1
4309 if test -n "$USE_64"; then
4310 MDCPUCFG_H=_irix64.cfg
4311 else
4312 MDCPUCFG_H=_irix32.cfg
4314 case "${target_os}" in
4315 irix6*)
4316 cat >> confdefs.h <<\EOF
4317 #define IRIX6 1
4320 USE_PTHREADS=1
4321 USE_N32=1
4322 COMPILER_TAG=_n32
4323 IMPL_STRATEGY=_PTH
4325 irix5*)
4326 cat >> confdefs.h <<\EOF
4327 #define IRIX5 1
4330 USE_NSPR_THREADS=1
4333 USE_PTHREADS=1
4334 USE_N32=1
4336 esac
4337 if test "$GNU_CC"; then
4338 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
4339 CFLAGS="$CFLAGS -Wall -Wno-format"
4340 _OPTIMIZE_FLAGS="-O6"
4341 else
4342 if test -n "$USE_N32"; then
4343 AS='as -D_ASM $(INCLUDES) -n32'
4344 else
4345 AS='as -D_ASM $(INCLUDES)'
4347 CFLAGS="$CFLAGS -fullwarn -xansi"
4348 if test "$USE_N32"; then
4349 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
4350 else
4351 _OPTIMIZE_FLAGS="-O -Olimit 4000"
4353 if test "$USE_MDUPDATE"; then
4354 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4356 case "${target}" in
4357 *-irix6.*)
4358 CFLAGS="$CFLAGS -multigot"
4359 DSO_LDOPTS="-no_unresolved"
4360 if test "$USE_N32"; then
4361 CFLAGS="$CFLAGS -n32 -woff 1209"
4362 DSO_LDOPTS="$DSO_LDOPTS -n32"
4363 else
4364 if test "$USE_64"; then
4365 CFLAGS="$CFLAGS -64"
4366 else
4367 CFLAGS="$CFLAGS -32"
4372 CFLAGS="$CFLAGS -xgot"
4374 esac
4376 if test "${target_os}" = "irix5.3"; then
4377 cat >> confdefs.h <<\EOF
4378 #define IRIX5_3 1
4382 case "${target_os}" in
4383 irix6.5)
4384 if test -z "$GNU_CC"; then
4385 CFLAGS="$CFLAGS -mips3"
4387 cat >> confdefs.h <<\EOF
4388 #define _PR_HAVE_GETPROTO_R 1
4391 cat >> confdefs.h <<\EOF
4392 #define _PR_HAVE_GETPROTO_R_POINTER 1
4395 cat >> confdefs.h <<\EOF
4396 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4400 irix5*)
4403 cat >> confdefs.h <<\EOF
4404 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4408 esac
4411 *-linux*|*-gnu*|*-k*bsd*-gnu|*-android*|*-linuxandroid*)
4412 if test -z "$USE_NSPR_THREADS"; then
4413 USE_PTHREADS=1
4414 IMPL_STRATEGY=_PTH
4416 cat >> confdefs.h <<\EOF
4417 #define XP_UNIX 1
4420 cat >> confdefs.h <<\EOF
4421 #define _GNU_SOURCE 1
4424 cat >> confdefs.h <<\EOF
4425 #define HAVE_FCNTL_FILE_LOCKING 1
4428 case "${target}" in
4429 *-android*|*-linuxandroid*)
4430 OS_TARGET=Android
4431 cat >> confdefs.h <<\EOF
4432 #define LINUX 1
4436 *-linux*)
4437 cat >> confdefs.h <<\EOF
4438 #define LINUX 1
4442 esac
4443 CFLAGS="$CFLAGS -Wall"
4444 CXXFLAGS="$CXXFLAGS -Wall"
4445 MDCPUCFG_H=_linux.cfg
4446 PR_MD_CSRCS=linux.c
4447 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4448 DSO_CFLAGS=-fPIC
4449 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4450 _OPTIMIZE_FLAGS=-O2
4451 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4452 # combo is not yet good at debugging inlined
4453 # functions (even when using DWARF2 as the
4454 # debugging format)
4455 COMPILER_TAG=_glibc
4456 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
4457 CPU_ARCH=x86
4458 else
4459 CPU_ARCH=$OS_TEST
4461 CPU_ARCH_TAG=_${CPU_ARCH}
4462 case "${target_cpu}" in
4463 alpha)
4464 cat >> confdefs.h <<\EOF
4465 #define _ALPHA_ 1
4468 cat >> confdefs.h <<\EOF
4469 #define __alpha 1
4472 CFLAGS="$CFLAGS -mieee"
4473 CXXFLAGS="$CXXFLAGS -mieee"
4475 i*86)
4476 cat >> confdefs.h <<\EOF
4477 #define i386 1
4480 PR_MD_ASFILES=os_Linux_x86.s
4482 ia64)
4483 PR_MD_ASFILES=os_Linux_ia64.s
4485 x86_64)
4486 if test -n "$USE_64"; then
4487 PR_MD_ASFILES=os_Linux_x86_64.s
4488 else
4489 cat >> confdefs.h <<\EOF
4490 #define i386 1
4493 PR_MD_ASFILES=os_Linux_x86.s
4494 CC="$CC -m32"
4495 CXX="$CXX -m32"
4498 ppc|powerpc)
4499 PR_MD_ASFILES=os_Linux_ppc.s
4501 powerpc64)
4502 if test -n "$USE_64"; then
4503 CC="$CC -m64"
4504 CXX="$CXX -m64"
4505 else
4506 PR_MD_ASFILES=os_Linux_ppc.s
4509 m68k)
4510 CFLAGS="$CFLAGS -m68020-60"
4511 CXXFLAGS="$CXXFLAGS -m68020-60"
4513 esac
4516 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
4517 cat >> confdefs.h <<\EOF
4518 #define XP_PC 1
4521 cat >> confdefs.h <<\EOF
4522 #define WIN32 1
4525 PR_MD_ARCH_DIR=windows
4526 RESOLVE_LINK_SYMBOLS=1
4528 if test -n "$GNU_CC"; then
4529 CC="$CC -mwindows"
4530 CXX="$CXX -mwindows"
4531 DLL_SUFFIX=dll
4532 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
4533 RC=$WINDRES
4534 # Use temp file for windres (bug 213281)
4535 RCFLAGS='-O coff --use-temp-file'
4536 else
4537 CC=cl
4538 CXX=cl
4539 LD=link
4540 AR='lib -NOLOGO -OUT:"$@"'
4541 AR_FLAGS=
4542 RANLIB='echo not_ranlib'
4543 STRIP='echo not_strip'
4544 RC=rc.exe
4545 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4546 OBJ_SUFFIX=obj
4547 LIB_SUFFIX=lib
4548 DLL_SUFFIX=dll
4550 # Determine compiler version
4552 _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
4554 CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
4555 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
4556 _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
4557 _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
4558 _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
4559 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4561 if test "$_CC_MAJOR_VERSION" -eq "14"; then
4562 if test $_CC_RELEASE -gt 50727; then
4563 _USE_DYNAMICBASE=1
4564 elif test $_CC_BUILD -ge 762; then
4565 _USE_DYNAMICBASE=1
4567 cat >> confdefs.h <<\EOF
4568 #define _CRT_SECURE_NO_DEPRECATE 1
4571 cat >> confdefs.h <<\EOF
4572 #define _CRT_NONSTDC_NO_DEPRECATE 1
4575 elif test $_CC_MAJOR_VERSION -ge 15; then
4576 _USE_DYNAMICBASE=1
4577 cat >> confdefs.h <<\EOF
4578 #define _CRT_SECURE_NO_WARNINGS 1
4581 cat >> confdefs.h <<\EOF
4582 #define _CRT_NONSTDC_NO_WARNINGS 1
4587 if test -n "$_USE_DYNAMICBASE"; then
4588 DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
4591 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4592 # tape manipulation utility (or something else)
4593 if test "$MSC_VER" -ge "1400"; then
4595 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4598 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4599 if test -n "$MSMT_TOOL"; then
4600 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4601 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4602 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4604 MT=mt
4605 unset MSMT_TOOL
4606 else
4607 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4611 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4612 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4613 _DEBUG_FLAGS=-Zi
4614 _OPTIMIZE_FLAGS=-O2
4616 PROFILE_GEN_CFLAGS="-GL"
4617 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
4618 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
4619 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
4621 if test "$MSC_VER" -ge "1800"; then
4622 CFLAGS="$CFLAGS -FS"
4623 PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
4624 PROFILE_USE_CFLAGS="$PROFILE_USE_CFLAGS -Gw"
4627 if test -z "$MOZ_OPTIMIZE"; then
4628 CFLAGS="$CFLAGS -Od"
4631 if test -n "$USE_DEBUG_RTL"; then
4632 CFLAGS="$CFLAGS -MDd"
4633 else
4634 CFLAGS="$CFLAGS -MD"
4637 if test -n "$MOZ_DEBUG"; then
4638 cat >> confdefs.h <<\EOF
4639 #define _DEBUG 1
4642 else
4643 DEFINES="$DEFINES -U_DEBUG"
4646 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4647 if test -n "$MOZ_OPTIMIZE"; then
4648 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4649 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4650 else
4651 DLLFLAGS="$DLLFLAGS -DEBUG"
4652 LDFLAGS="$LDFLAGS -DEBUG"
4656 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4657 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4658 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4661 if test "$OS_TARGET" = "WINNT"; then
4662 CFLAGS="$CFLAGS -GT"
4663 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4664 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4665 else
4666 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4667 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4669 fi # GNU_CC
4671 if test -n "$USE_STATIC_TLS"; then
4672 cat >> confdefs.h <<\EOF
4673 #define _PR_USE_STATIC_TLS 1
4678 if test "$OS_TARGET" = "WINNT"; then
4679 cat >> confdefs.h <<\EOF
4680 #define WINNT 1
4683 else
4684 cat >> confdefs.h <<\EOF
4685 #define WIN95 1
4688 # undefine WINNT as some versions of mingw gcc define it by default
4689 DEFINES="$DEFINES -UWINNT"
4690 cat >> confdefs.h <<\EOF
4691 #define _PR_GLOBAL_THREADS_ONLY 1
4696 if test "$CPU_ARCH" = "x86"; then
4697 CPU_ARCH_TAG=
4698 else
4699 CPU_ARCH_TAG=$CPU_ARCH
4702 if test -n "$USE_DEBUG_RTL"; then
4703 OBJDIR_SUFFIX=OBJD
4706 case "$OS_TARGET" in
4707 WINNT)
4708 MDCPUCFG_H=_winnt.cfg
4710 WIN95)
4711 MDCPUCFG_H=_win95.cfg
4714 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4716 esac
4718 case "$target_cpu" in
4719 i*86)
4720 if test -n "$USE_64"; then
4721 cat >> confdefs.h <<\EOF
4722 #define _AMD64_ 1
4725 else
4726 cat >> confdefs.h <<\EOF
4727 #define _X86_ 1
4732 x86_64)
4733 cat >> confdefs.h <<\EOF
4734 #define _AMD64_ 1
4737 USE_64=1
4739 ia64)
4740 cat >> confdefs.h <<\EOF
4741 #define _IA64_ 1
4744 USE_64=1
4747 cat >> confdefs.h <<\EOF
4748 #define _CPU_ARCH_NOT_DEFINED 1
4752 esac
4755 *-wince*|*-winmo*)
4756 cat >> confdefs.h <<\EOF
4757 #define XP_PC 1
4760 cat >> confdefs.h <<\EOF
4761 #define WIN32 1
4764 cat >> confdefs.h <<\EOF
4765 #define WINCE 1
4768 cat >> confdefs.h <<\EOF
4769 #define _PR_GLOBAL_THREADS_ONLY 1
4773 AR_FLAGS='-NOLOGO -OUT:"$@"'
4775 OBJ_SUFFIX=obj
4776 LIB_SUFFIX=lib
4777 DLL_SUFFIX=dll
4778 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4780 PR_MD_ARCH_DIR=windows
4781 RESOLVE_LINK_SYMBOLS=1
4783 MDCPUCFG_H=_win95.cfg
4784 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4785 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4787 DLLFLAGS='-OUT:"$@"'
4788 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4789 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4790 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4791 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4793 _DEBUG_FLAGS=-Zi
4794 _OPTIMIZE_FLAGS=-O2
4797 *-netbsd*)
4798 cat >> confdefs.h <<\EOF
4799 #define XP_UNIX 1
4802 cat >> confdefs.h <<\EOF
4803 #define NETBSD 1
4806 cat >> confdefs.h <<\EOF
4807 #define HAVE_BSD_FLOCK 1
4810 if test -z "$USE_NSPR_THREADS"; then
4811 USE_PTHREADS=1
4813 MDCPUCFG_H=_netbsd.cfg
4814 PR_MD_CSRCS=netbsd.c
4816 DSO_CFLAGS='-fPIC -DPIC'
4817 CFLAGS="$CFLAGS -ansi -Wall"
4818 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4819 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4821 if test -z "$OBJECT_FMT"; then
4822 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4823 OBJECT_FMT=a.out
4824 DLL_SUFFIX=so.1.0
4825 DSO_LDOPTS='-shared'
4826 else
4827 OBJECT_FMT=ELF
4828 DLL_SUFFIX=so
4829 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4833 if test "$LIBRUNPATH"; then
4834 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4838 *-nto*)
4839 cat >> confdefs.h <<\EOF
4840 #define XP_UNIX 1
4843 cat >> confdefs.h <<\EOF
4844 #define NTO 1
4847 cat >> confdefs.h <<\EOF
4848 #define _QNX_SOURCE 1
4851 cat >> confdefs.h <<\EOF
4852 #define HAVE_POINTER_LOCALTIME_R 1
4855 MDCPUCFG_H=_nto.cfg
4856 PR_MD_CSRCS=nto.c
4857 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4858 DSO_CFLAGS=-fPIC
4859 DSO_LDOPTS=-shared
4860 OS_LIBS="$OS_LIBS -lsocket"
4861 _OPTIMIZE_FLAGS="-O1"
4862 _DEBUG_FLAGS="-gstabs"
4865 *-openbsd*)
4866 cat >> confdefs.h <<\EOF
4867 #define XP_UNIX 1
4870 cat >> confdefs.h <<\EOF
4871 #define OPENBSD 1
4874 cat >> confdefs.h <<\EOF
4875 #define HAVE_BSD_FLOCK 1
4878 cat >> confdefs.h <<\EOF
4879 #define HAVE_SOCKLEN_T 1
4882 CFLAGS="$CFLAGS -ansi -Wall"
4883 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4884 DLL_SUFFIX=so.1.0
4885 DSO_CFLAGS=-fPIC
4886 MDCPUCFG_H=_openbsd.cfg
4887 PR_MD_CSRCS=openbsd.c
4888 OS_LIBS="-lc"
4889 if test -z "$USE_NSPR_THREADS"; then
4890 USE_PTHREADS=1
4892 DSO_LDOPTS='-shared -fPIC'
4893 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4896 *-osf*)
4897 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4898 cat >> confdefs.h <<\EOF
4899 #define XP_UNIX 1
4902 cat >> confdefs.h <<\EOF
4903 #define OSF1 1
4906 cat >> confdefs.h <<\EOF
4907 #define _REENTRANT 1
4910 # OSF1 and HPUX report the POLLHUP event for a socket when the
4911 # shutdown(SHUT_WR) operation is called for the remote end, even though
4912 # the socket is still writeable. Use select(), instead of poll(), to
4913 # workaround this problem.
4914 cat >> confdefs.h <<\EOF
4915 #define _PR_POLL_WITH_SELECT 1
4919 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4920 USE_NSPR_THREADS=1
4923 if test -z "$GNU_CC"; then
4924 CC="$CC -std1 -ieee_with_inexact"
4925 if test "$OS_RELEASE" != "V2.0"; then
4926 CC="$CC -readonly_strings"
4928 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4929 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4930 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4931 echo "configure:4932: checking for machine/builtins.h" >&5
4932 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4933 echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938 #include <machine/builtins.h>
4940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4941 { (eval echo configure:4942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4943 if test -z "$ac_err"; then
4944 rm -rf conftest*
4945 eval "ac_cv_header_$ac_safe=yes"
4946 else
4947 echo "$ac_err" >&5
4948 echo "configure: failed program was:" >&5
4949 cat conftest.$ac_ext >&5
4950 rm -rf conftest*
4951 eval "ac_cv_header_$ac_safe=no"
4953 rm -f conftest*
4955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4956 echo "$ac_t""yes" 1>&6
4957 cat >> confdefs.h <<\EOF
4958 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4961 else
4962 echo "$ac_t""no" 1>&6
4965 else
4966 CFLAGS="$CFLAGS -mieee"
4967 CXXFLAGS="$CXXFLAGS -mieee"
4970 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4971 cat >> confdefs.h <<\EOF
4972 #define HAVE_INT_LOCALTIME_R 1
4975 else
4976 cat >> confdefs.h <<\EOF
4977 #define HAVE_FCNTL_FILE_LOCKING 1
4980 cat >> confdefs.h <<\EOF
4981 #define HAVE_POINTER_LOCALTIME_R 1
4985 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4986 cat >> confdefs.h <<\EOF
4987 #define OSF1V4_MAP_PRIVATE_BUG 1
4991 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4992 MDCPUCFG_H=_osf1.cfg
4993 PR_MD_CSRCS=osf1.c
4996 *-qnx*)
4997 cat >> confdefs.h <<\EOF
4998 #define XP_UNIX 1
5001 cat >> confdefs.h <<\EOF
5002 #define QNX 1
5005 cat >> confdefs.h <<\EOF
5006 #define _PR_NEED_H_ERRNO 1
5009 USE_NSPR_THREADS=1
5010 MDCPUCFG_H=_qnx.cfg
5011 PR_MD_CSRCS=qnx.c
5014 *-riscos*)
5015 cat >> confdefs.h <<\EOF
5016 #define XP_UNIX 1
5019 cat >> confdefs.h <<\EOF
5020 #define RISCOS 1
5023 cat >> confdefs.h <<\EOF
5024 #define _PR_NEED_H_ERRNO 1
5027 USE_PTHREADS=1
5028 MDCPUCFG_H=_riscos.cfg
5029 PR_MD_CSRCS=riscos.c
5030 DSO_CFLAGS=-fPIC
5031 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
5032 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5035 *-*-sco*)
5036 cat >> confdefs.h <<\EOF
5037 #define XP_UNIX 1
5040 cat >> confdefs.h <<\EOF
5041 #define SCO 1
5044 cat >> confdefs.h <<\EOF
5045 #define sco 1
5048 cat >> confdefs.h <<\EOF
5049 #define SYSV 1
5052 cat >> confdefs.h <<\EOF
5053 #define _SVID3 1
5056 cat >> confdefs.h <<\EOF
5057 #define _PR_NEED_H_ERRNO 1
5060 CC='cc -b elf -KPIC'
5061 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
5062 USE_NSPR_THREADS=1
5063 CPU_ARCH=x86
5064 DSO_LDOPTS='-b elf -G'
5065 MDCPUCFG_H=_scoos.cfg
5066 PR_MD_SRCS=scoos.c
5069 *-solaris*)
5070 if test -z "$USE_NSPR_THREADS"; then
5071 USE_PTHREADS=1
5073 cat >> confdefs.h <<\EOF
5074 #define XP_UNIX 1
5077 cat >> confdefs.h <<\EOF
5078 #define SVR4 1
5081 cat >> confdefs.h <<\EOF
5082 #define SYSV 1
5085 cat >> confdefs.h <<\EOF
5086 #define __svr4 1
5089 cat >> confdefs.h <<\EOF
5090 #define __svr4__ 1
5093 cat >> confdefs.h <<\EOF
5094 #define SOLARIS 1
5097 cat >> confdefs.h <<\EOF
5098 #define HAVE_FCNTL_FILE_LOCKING 1
5101 CPU_ARCH=`uname -p`
5102 MDCPUCFG_H=_solaris.cfg
5103 PR_MD_CSRCS=solaris.c
5104 LD=/usr/ccs/bin/ld
5105 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5106 RESOLVE_LINK_SYMBOLS=1
5107 case "${OS_RELEASE}" in
5108 5.8|5.9)
5111 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
5112 USE_B_DIRECT=1
5114 esac
5115 if test -n "$GNU_CC"; then
5116 DSO_CFLAGS=-fPIC
5117 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
5118 GCC_USE_GNU_LD=1
5120 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
5121 if test -n "$USE_B_DIRECT"; then
5122 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
5124 else
5125 DSO_CFLAGS=-KPIC
5126 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
5127 if test -n "$USE_B_DIRECT"; then
5128 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5131 if test -n "$GNU_CC"; then
5132 CFLAGS="$CFLAGS -Wall"
5133 CXXFLAGS="$CXXFLAGS -Wall"
5134 if test -n "$USE_MDUPDATE"; then
5135 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
5136 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
5138 GCC_AS=`$CC -print-prog-name=as`
5139 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
5140 GNU_AS=1
5142 else
5143 CFLAGS="$CFLAGS -xstrconst"
5144 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
5145 if test -z "$MOZ_OPTIMIZE"; then
5146 CFLAGS="$CFLAGS -xs"
5147 CXXFLAGS="$CXXFLAGS -xs"
5149 _OPTIMIZE_FLAGS=-xO4
5151 if test -z "$GNU_AS"; then
5152 ASFLAGS="$ASFLAGS -Wa,-P"
5154 if test -n "$USE_64"; then
5155 if test -n "$GNU_CC"; then
5156 CC="$CC -m64"
5157 CXX="$CXX -m64"
5158 else
5159 if test "$OS_TEST" = "i86pc"; then
5160 CC="$CC -xarch=amd64"
5161 CXX="$CXX -xarch=amd64"
5162 else
5163 CC="$CC -xarch=v9"
5164 CXX="$CXX -xarch=v9"
5168 if test "$OS_TEST" = "i86pc"; then
5169 if test -z "$USE_64"; then
5170 cat >> confdefs.h <<\EOF
5171 #define i386 1
5175 CPU_ARCH_TAG=_$OS_TEST
5176 # The default debug format, DWARF (-g), is not supported by gcc
5177 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
5178 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
5179 # If your gcc uses GNU as, you do not need the -Wa,-s option.
5180 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
5181 _DEBUG_FLAGS=-gstabs
5182 if test -z "$GNU_AS"; then
5183 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
5187 case "${target_os}" in
5188 solaris2.3*)
5189 cat >> confdefs.h <<\EOF
5190 #define _PR_NO_LARGE_FILES 1
5194 solaris2.4*)
5195 cat >> confdefs.h <<\EOF
5196 #define _PR_NO_LARGE_FILES 1
5200 solaris2.5*)
5201 cat >> confdefs.h <<\EOF
5202 #define SOLARIS2_5 1
5207 cat >> confdefs.h <<\EOF
5208 #define _PR_HAVE_OFF64_T 1
5211 # The lfcompile64(5) man page on Solaris 2.6 says:
5212 # For applications that do not wish to conform to the POSIX or
5213 # X/Open specifications, the 64-bit transitional interfaces
5214 # are available by default. No compile-time flags need to be
5215 # set.
5216 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
5217 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
5218 if test -n "$GNU_CC"; then
5219 cat >> confdefs.h <<\EOF
5220 #define _LARGEFILE64_SOURCE 1
5225 esac
5226 case "${target_os}" in
5227 solaris2.3*)
5229 solaris2.4*)
5231 solaris2.5*)
5233 solaris2.6*)
5235 solaris2.7*)
5238 # Solaris 8 or higher has IPv6.
5239 cat >> confdefs.h <<\EOF
5240 #define _PR_INET6 1
5244 esac
5245 if test "$CPU_ARCH" = "sparc"; then
5246 # 64-bit Solaris SPARC requires V9 architecture, so the following
5247 # is not needed.
5248 if test -z "$USE_64"; then
5249 ULTRASPARC_LIBRARY=nspr_flt
5252 # Purify requires that binaries linked against nspr also
5253 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
5254 _rev=`uname -r`
5255 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
5256 OS_LIBS="$OS_LIBS $_librt"
5259 *-sco-sysv5*)
5260 cat >> confdefs.h <<\EOF
5261 #define XP_UNIX 1
5264 cat >> confdefs.h <<\EOF
5265 #define UNIXWARE 1
5268 cat >> confdefs.h <<\EOF
5269 #define SVR4 1
5272 cat >> confdefs.h <<\EOF
5273 #define SYSV 1
5276 USE_NSPR_THREADS=1
5277 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
5278 cat >> confdefs.h <<\EOF
5279 #define _PR_NO_LARGE_FILES 1
5282 CC='$(NSDEPTH)/build/hcc cc'
5283 CXX='$(NSDEPTH)/build/hcpp CC'
5284 MDCPUCFG_H=_unixware.cfg
5285 else
5286 cat >> confdefs.h <<\EOF
5287 #define _LARGEFILE64_SOURCE 1
5290 cat >> confdefs.h <<\EOF
5291 #define _PR_HAVE_OFF64_T 1
5294 cat >> confdefs.h <<\EOF
5295 #define _PR_HAVE_SOCKADDR_LEN 1
5298 MDCPUCFG_H=_unixware7.cfg
5300 PR_MD_CSRCS=unixware.c
5301 DSO_LDOPTS=-G
5302 CPU_ARCH=x86
5305 *-symbian*)
5306 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
5307 if test "${with_symbian_sdk+set}" = set; then
5308 withval="$with_symbian_sdk"
5309 SYMBIAN_SDK_DIR=$withval
5313 echo -----------------------------------------------------------------------------
5314 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
5315 echo -----------------------------------------------------------------------------
5317 cat >> confdefs.h <<\EOF
5318 #define XP_UNIX 1
5321 cat >> confdefs.h <<\EOF
5322 #define SYMBIAN 1
5325 cat >> confdefs.h <<\EOF
5326 #define __arm__ 1
5329 cat >> confdefs.h <<\EOF
5330 #define __SYMBIAN32__ 1
5333 cat >> confdefs.h <<\EOF
5334 #define _UNICODE 1
5337 cat >> confdefs.h <<\EOF
5338 #define NDEBUG 1
5341 cat >> confdefs.h <<\EOF
5342 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5345 cat >> confdefs.h <<\EOF
5346 #define MOZ_STDERR_TO_STDOUT 1
5349 cat >> confdefs.h <<\EOF
5350 #define HAVE_FCNTL_FILE_LOCKING 1
5353 cat >> confdefs.h <<\EOF
5354 #define HAVE_SOCKLEN_T 1
5357 USE_PTHREADS=1
5358 LIB_SUFFIX=lib
5359 DLL_SUFFIX=dll
5360 MKSHLIB=
5361 DSO_LDOPTS=
5362 DSO_CFLAGS=
5363 VISIBILITY_FLAGS=
5364 MDCPUCFG_H=_symbian.cfg
5365 PR_MD_CSRCS=symbian.c
5366 NSINSTALL=nsinstall
5367 RANLIB='echo no ranlib '
5368 CPU_ARCH=ARM
5369 OS_ARCH=SYMBIAN
5370 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5371 CFLAGS="$CFLAGS -MD -nostdinc"
5372 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5373 echo -------------------------------------------------------
5374 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5375 echo -------------------------------------------------------
5376 case "$OS_TARGET" in
5377 WINSCW)
5378 CC=mwccsym2.exe
5379 CXX=mwccsym2.exe
5380 LD=mwldsym2.exe
5381 AR=mwldsym2.exe
5382 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5383 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)"
5384 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5385 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5386 cat >> confdefs.h <<\EOF
5387 #define _DEBUG 1
5390 cat >> confdefs.h <<\EOF
5391 #define __CW32__ 1
5394 cat >> confdefs.h <<\EOF
5395 #define __WINS__ 1
5398 cat >> confdefs.h <<\EOF
5399 #define __WINSCW__ 1
5402 DEFINES="$DEFINES -U_WIN32"
5404 GCCE)
5405 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5406 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5407 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5408 cat >> confdefs.h <<\EOF
5409 #define __GCCE__ 1
5412 cat >> confdefs.h <<\EOF
5413 #define __EABI__ 1
5416 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5419 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5421 esac
5422 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5425 *-os2*)
5426 cat >> confdefs.h <<\EOF
5427 #define XP_OS2 1
5430 cat >> confdefs.h <<\EOF
5431 #define XP_PC 1
5434 cat >> confdefs.h <<\EOF
5435 #define BSD_SELECT 1
5438 cat >> confdefs.h <<\EOF
5439 #define TCPV40HDRS 1
5442 LIB_SUFFIX=lib
5443 DLL_SUFFIX=dll
5444 RC=rc.exe
5445 PR_MD_ARCH_DIR=os2
5446 PROG_SUFFIX=.exe
5447 NSINSTALL=nsinstall
5448 MDCPUCFG_H=_os2.cfg
5449 RESOLVE_LINK_SYMBOLS=1
5451 cat >> confdefs.h <<\EOF
5452 #define OS2 1
5455 AR=emxomfar
5456 AR_FLAGS='r $@'
5457 CFLAGS="$CFLAGS -Wall -Zomf"
5458 CXXFLAGS="$CFLAGS -Wall -Zomf"
5459 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5460 DSO_CFLAGS=
5461 DSO_LDOPTS='-Zomf -Zdll'
5462 LDFLAGS='-Zmap'
5463 _OPTIMIZE_FLAGS="-O2 -s"
5464 _DEBUG_FLAGS="-g -fno-inline"
5465 if test -n "$MOZ_OPTIMIZE"; then
5466 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5468 IMPLIB='emximp -o'
5469 FILTER='emxexp -o'
5470 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5471 LDFLAGS="$LDFLAGS -Zhigh-mem"
5472 cat >> confdefs.h <<\EOF
5473 #define MOZ_OS2_HIGH_MEMORY 1
5478 # GCC for OS/2 currently predefines these, but we don't want them
5479 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5483 cat >> confdefs.h <<\EOF
5484 #define XP_UNIX 1
5489 esac
5491 if test -z "$SKIP_LIBRARY_CHECKS"; then
5495 case $target in
5496 *-darwin*|*-beos*|*-os2*)
5499 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5500 echo "configure:5501: checking for dlopen in -ldl" >&5
5501 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5502 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5503 echo $ac_n "(cached) $ac_c" 1>&6
5504 else
5505 ac_save_LIBS="$LIBS"
5506 LIBS="-ldl $LIBS"
5507 cat > conftest.$ac_ext <<EOF
5508 #line 5509 "configure"
5509 #include "confdefs.h"
5510 /* Override any gcc2 internal prototype to avoid an error. */
5511 /* We use char because int might match the return type of a gcc2
5512 builtin and then its argument prototype would still apply. */
5513 char dlopen();
5515 int main() {
5516 dlopen()
5517 ; return 0; }
5519 if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5520 rm -rf conftest*
5521 eval "ac_cv_lib_$ac_lib_var=yes"
5522 else
5523 echo "configure: failed program was:" >&5
5524 cat conftest.$ac_ext >&5
5525 rm -rf conftest*
5526 eval "ac_cv_lib_$ac_lib_var=no"
5528 rm -f conftest*
5529 LIBS="$ac_save_LIBS"
5532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5533 echo "$ac_t""yes" 1>&6
5534 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5535 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5536 echo "configure:5537: checking for dlfcn.h" >&5
5537 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5538 echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540 cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 #include <dlfcn.h>
5545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5546 { (eval echo configure:5547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5548 if test -z "$ac_err"; then
5549 rm -rf conftest*
5550 eval "ac_cv_header_$ac_safe=yes"
5551 else
5552 echo "$ac_err" >&5
5553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5555 rm -rf conftest*
5556 eval "ac_cv_header_$ac_safe=no"
5558 rm -f conftest*
5560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5561 echo "$ac_t""yes" 1>&6
5562 OS_LIBS="-ldl $OS_LIBS"
5563 else
5564 echo "$ac_t""no" 1>&6
5567 else
5568 echo "$ac_t""no" 1>&6
5572 esac
5577 if test $ac_cv_prog_gcc = yes; then
5578 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5579 echo "configure:5580: checking whether ${CC-cc} needs -traditional" >&5
5580 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5581 echo $ac_n "(cached) $ac_c" 1>&6
5582 else
5583 ac_pattern="Autoconf.*'x'"
5584 cat > conftest.$ac_ext <<EOF
5585 #line 5586 "configure"
5586 #include "confdefs.h"
5587 #include <sgtty.h>
5588 Autoconf TIOCGETP
5590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5591 egrep "$ac_pattern" >/dev/null 2>&1; then
5592 rm -rf conftest*
5593 ac_cv_prog_gcc_traditional=yes
5594 else
5595 rm -rf conftest*
5596 ac_cv_prog_gcc_traditional=no
5598 rm -f conftest*
5601 if test $ac_cv_prog_gcc_traditional = no; then
5602 cat > conftest.$ac_ext <<EOF
5603 #line 5604 "configure"
5604 #include "confdefs.h"
5605 #include <termio.h>
5606 Autoconf TCGETA
5608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5609 egrep "$ac_pattern" >/dev/null 2>&1; then
5610 rm -rf conftest*
5611 ac_cv_prog_gcc_traditional=yes
5613 rm -f conftest*
5618 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5619 if test $ac_cv_prog_gcc_traditional = yes; then
5620 CC="$CC -traditional"
5624 _SAVE_LIBS="$LIBS"
5625 LIBS="$LIBS $OS_LIBS"
5626 for ac_func in dladdr gettid lchown setpriority strerror syscall
5628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5629 echo "configure:5630: checking for $ac_func" >&5
5630 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5631 echo $ac_n "(cached) $ac_c" 1>&6
5632 else
5633 cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636 /* System header to define __stub macros and hopefully few prototypes,
5637 which can conflict with char $ac_func(); below. */
5638 #include <assert.h>
5639 /* Override any gcc2 internal prototype to avoid an error. */
5640 /* We use char because int might match the return type of a gcc2
5641 builtin and then its argument prototype would still apply. */
5642 char $ac_func();
5644 int main() {
5646 /* The GNU C library defines this for functions which it implements
5647 to always fail with ENOSYS. Some functions are actually named
5648 something starting with __ and the normal name is an alias. */
5649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5650 choke me
5651 #else
5652 $ac_func();
5653 #endif
5655 ; return 0; }
5657 if { (eval echo configure:5658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5658 rm -rf conftest*
5659 eval "ac_cv_func_$ac_func=yes"
5660 else
5661 echo "configure: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 rm -rf conftest*
5664 eval "ac_cv_func_$ac_func=no"
5666 rm -f conftest*
5669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5670 echo "$ac_t""yes" 1>&6
5671 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5672 cat >> confdefs.h <<EOF
5673 #define $ac_tr_func 1
5676 else
5677 echo "$ac_t""no" 1>&6
5679 done
5681 LIBS="$_SAVE_LIBS"
5685 # Check whether --with-ccache or --without-ccache was given.
5686 if test "${with_ccache+set}" = set; then
5687 withval="$with_ccache"
5688 CCACHE=$withval
5689 else
5690 CCACHE="no"
5694 if test "$CCACHE" != "no"; then
5695 if test -n "$CCACHE"; then
5696 if test "$CCACHE" = "yes"; then
5697 CCACHE=
5698 else
5699 if test ! -e "$CCACHE"; then
5700 { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
5704 for ac_prog in $CCACHE ccache
5706 # Extract the first word of "$ac_prog", so it can be a program name with args.
5707 set dummy $ac_prog; ac_word=$2
5708 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5709 echo "configure:5710: checking for $ac_word" >&5
5710 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
5711 echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713 case "$CCACHE" in
5715 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
5717 ?:/*)
5718 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
5721 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5722 ac_dummy="$PATH"
5723 for ac_dir in $ac_dummy; do
5724 test -z "$ac_dir" && ac_dir=.
5725 if test -f $ac_dir/$ac_word; then
5726 ac_cv_path_CCACHE="$ac_dir/$ac_word"
5727 break
5729 done
5730 IFS="$ac_save_ifs"
5732 esac
5734 CCACHE="$ac_cv_path_CCACHE"
5735 if test -n "$CCACHE"; then
5736 echo "$ac_t""$CCACHE" 1>&6
5737 else
5738 echo "$ac_t""no" 1>&6
5741 test -n "$CCACHE" && break
5742 done
5744 if test -z "$CCACHE" -o "$CCACHE" = ":"; then
5745 { echo "configure: error: ccache not found" 1>&2; exit 1; }
5746 elif test -x "$CCACHE"; then
5747 CC="$CCACHE $CC"
5748 CXX="$CCACHE $CXX"
5749 else
5750 { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
5754 # Check whether --enable-strip or --disable-strip was given.
5755 if test "${enable_strip+set}" = set; then
5756 enableval="$enable_strip"
5757 if test "$enableval" = "yes"; then
5758 ENABLE_STRIP=1
5763 case "${target_os}" in
5764 hpux*)
5765 if test -z "$GNU_CC"; then
5767 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5768 echo "configure:5769: checking for +Olit support" >&5
5769 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5770 echo $ac_n "(cached) $ac_c" 1>&6
5771 else
5772 ac_cv_hpux_usable_olit_option=no
5773 rm -f conftest*
5774 echo 'int main() { return 0; }' | cat > conftest.c
5775 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5776 if test $? -eq 0; then
5777 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5778 ac_cv_hpux_usable_olit_option=yes
5781 rm -f conftest*
5785 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5787 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5788 CFLAGS="$CFLAGS +Olit=all"
5789 CXXFLAGS="$CXXFLAGS +Olit=all"
5790 else
5791 CFLAGS="$CFLAGS +ESlit"
5792 CXXFLAGS="$CXXFLAGS +ESlit"
5796 esac
5800 case "$target_os" in
5801 darwin*)
5802 _HAVE_PTHREADS=1
5804 wince*)
5805 _HAVE_PTHREADS=
5809 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5810 echo "configure:5811: checking for pthread_create in -lpthreads" >&5
5811 echo "
5812 #include <pthread.h>
5813 void *foo(void *v) { return v; }
5814 int main() {
5815 pthread_t t;
5816 if (!pthread_create(&t, 0, &foo, 0)) {
5817 pthread_join(t, 0);
5819 return 0;
5820 }" > dummy.c ;
5821 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5822 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5823 _res=$? ;
5824 rm -f dummy.c dummy${ac_exeext} ;
5825 if test "$_res" = "0"; then
5826 echo "$ac_t""yes" 1>&6
5827 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5828 else
5829 echo "$ac_t""no" 1>&6
5831 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5832 echo "configure:5833: checking for pthread_create in -lpthread" >&5
5833 echo "
5834 #include <pthread.h>
5835 void *foo(void *v) { return v; }
5836 int main() {
5837 pthread_t t;
5838 if (!pthread_create(&t, 0, &foo, 0)) {
5839 pthread_join(t, 0);
5841 return 0;
5842 }" > dummy.c ;
5843 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5844 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5845 _res=$? ;
5846 rm -f dummy.c dummy${ac_exeext} ;
5847 if test "$_res" = "0"; then
5848 echo "$ac_t""yes" 1>&6
5849 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5850 else
5851 echo "$ac_t""no" 1>&6
5853 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5854 echo "configure:5855: checking for pthread_create in -lc_r" >&5
5855 echo "
5856 #include <pthread.h>
5857 void *foo(void *v) { return v; }
5858 int main() {
5859 pthread_t t;
5860 if (!pthread_create(&t, 0, &foo, 0)) {
5861 pthread_join(t, 0);
5863 return 0;
5864 }" > dummy.c ;
5865 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5866 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5867 _res=$? ;
5868 rm -f dummy.c dummy${ac_exeext} ;
5869 if test "$_res" = "0"; then
5870 echo "$ac_t""yes" 1>&6
5871 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5872 else
5873 echo "$ac_t""no" 1>&6
5875 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5876 echo "configure:5877: checking for pthread_create in -lc" >&5
5877 echo "
5878 #include <pthread.h>
5879 void *foo(void *v) { return v; }
5880 int main() {
5881 pthread_t t;
5882 if (!pthread_create(&t, 0, &foo, 0)) {
5883 pthread_join(t, 0);
5885 return 0;
5886 }" > dummy.c ;
5887 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5888 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5889 _res=$? ;
5890 rm -f dummy.c dummy${ac_exeext} ;
5891 if test "$_res" = "0"; then
5892 echo "$ac_t""yes" 1>&6
5893 _HAVE_PTHREADS=1
5895 else
5896 echo "$ac_t""no" 1>&6
5910 esac
5912 # Check whether --with-pthreads or --without-pthreads was given.
5913 if test "${with_pthreads+set}" = set; then
5914 withval="$with_pthreads"
5915 if test "$withval" = "yes"; then
5916 if test -n "$_HAVE_PTHREADS"; then
5917 USE_PTHREADS=1
5918 USE_USER_PTHREADS=
5919 USE_NSPR_THREADS=
5920 else
5921 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5923 else
5924 USE_PTHREADS=
5925 _PTHREAD_LDFLAGS=
5927 else
5928 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5929 USE_PTHREADS=1
5930 USE_USER_PTHREADS=
5931 USE_NSPR_THREADS=
5936 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5937 if test "${enable_user_pthreads+set}" = set; then
5938 enableval="$enable_user_pthreads"
5939 if test "$enableval" = "yes"; then
5940 if test -n "$_HAVE_PTHREADS"; then
5941 USE_PTHREADS=
5942 USE_USER_PTHREADS=1
5943 USE_NSPR_THREADS=
5944 else
5945 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5951 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5952 if test "${enable_nspr_threads+set}" = set; then
5953 enableval="$enable_nspr_threads"
5954 if test "$enableval" = "yes"; then
5955 USE_PTHREADS=
5956 USE_USER_PTHREADS=
5957 USE_NSPR_THREADS=1
5962 case "$target" in
5963 *-beos*)
5964 # Check whether --with-bthreads or --without-bthreads was given.
5965 if test "${with_bthreads+set}" = set; then
5966 withval="$with_bthreads"
5967 if test "$withval" = "yes"; then
5968 USE_BTHREADS=1
5969 USE_USER_PTHREADS=
5970 USE_PTHREADS=
5975 esac
5977 fi # SKIP_LIBRARY_CHECKS
5979 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5980 if test "${enable_ipv6+set}" = set; then
5981 enableval="$enable_ipv6"
5982 if test "$enableval" = "yes"; then
5983 USE_IPV6=1
5984 else
5985 USE_IPV6=
5990 if test -n "$USE_PTHREADS"; then
5991 rm -f conftest*
5992 ac_cv_have_dash_pthread=no
5993 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5994 echo "configure:5995: checking whether ${CC-cc} accepts -pthread" >&5
5995 echo 'int main() { return 0; }' | cat > conftest.c
5996 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5997 if test $? -eq 0; then
5998 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5999 ac_cv_have_dash_pthread=yes
6000 case "$target_os" in
6001 freebsd*)
6002 # Freebsd doesn't use -pthread for compiles, it uses them for linking
6005 CFLAGS="$CFLAGS -pthread"
6006 CXXFLAGS="$CXXFLAGS -pthread"
6008 esac
6011 rm -f conftest*
6012 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
6014 ac_cv_have_dash_pthreads=no
6015 if test "$ac_cv_have_dash_pthread" = "no"; then
6016 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
6017 echo "configure:6018: checking whether ${CC-cc} accepts -pthreads" >&5
6018 echo 'int main() { return 0; }' | cat > conftest.c
6019 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
6020 if test $? -eq 0; then
6021 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
6022 ac_cv_have_dash_pthreads=yes
6023 CFLAGS="$CFLAGS -pthreads"
6024 CXXFLAGS="$CXXFLAGS -pthreads"
6027 rm -f conftest*
6028 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
6031 case "$target" in
6032 *-solaris*)
6033 if test "$ac_cv_have_dash_pthreads" = "yes"; then
6034 _PTHREAD_LDFLAGS=
6037 *-freebsd*)
6038 cat >> confdefs.h <<\EOF
6039 #define _REENTRANT 1
6042 cat >> confdefs.h <<\EOF
6043 #define _THREAD_SAFE 1
6046 if test "$ac_cv_have_dash_pthread" = "yes"; then
6047 _PTHREAD_LDFLAGS="-pthread"
6048 else
6049 _PTHREAD_LDFLAGS="-lc_r"
6052 *-netbsd*)
6053 if test "$ac_cv_have_dash_pthread" = "yes"; then
6054 _PTHREAD_LDFLAGS="-pthread"
6057 *-bsdi*)
6058 cat >> confdefs.h <<\EOF
6059 #define _THREAD_SAFE 1
6062 if test "$ac_cv_have_dash_pthread" = "yes"; then
6063 _PTHREAD_LDFLAGS=
6066 *-openbsd*)
6067 if test "$ac_cv_have_dash_pthread" = "yes"; then
6068 _PTHREAD_LDFLAGS=-pthread
6071 *-linux*|*-gnu*|*-k*bsd*-gnu)
6072 cat >> confdefs.h <<\EOF
6073 #define _REENTRANT 1
6077 esac
6079 else
6080 if test -n "$USE_USER_PTHREADS"; then
6081 USE_PTHREADS=
6082 USE_NSPR_THREADS=
6083 else
6084 _PTHREAD_LDFLAGS=
6088 case "$target" in
6089 *-aix*)
6090 if test -n "$USE_NSPR_THREADS"; then
6091 cat >> confdefs.h <<\EOF
6092 #define _PR_LOCAL_THREADS_ONLY 1
6096 case "$target_os" in
6097 aix4.1*)
6098 if test -z "$USE_PTHREADS"; then
6099 cat >> confdefs.h <<\EOF
6100 #define AIX_RENAME_SELECT 1
6105 aix4.2*)
6106 if test -z "$USE_NSPR_THREADS"; then
6107 cat >> confdefs.h <<\EOF
6108 #define HAVE_POINTER_LOCALTIME_R 1
6113 aix4.3*)
6114 if test -z "$USE_NSPR_THREADS"; then
6115 cat >> confdefs.h <<\EOF
6116 #define HAVE_POINTER_LOCALTIME_R 1
6120 if test -n "$USE_PTHREADS"; then
6121 cat >> confdefs.h <<\EOF
6122 #define _PR_HAVE_THREADSAFE_GETHOST 1
6128 if test -z "$USE_NSPR_THREADS"; then
6129 cat >> confdefs.h <<\EOF
6130 #define HAVE_POINTER_LOCALTIME_R 1
6134 if test -n "$USE_PTHREADS"; then
6135 cat >> confdefs.h <<\EOF
6136 #define _PR_HAVE_THREADSAFE_GETHOST 1
6141 esac
6143 *-bsdi*)
6144 if test -n "$USE_PTHREADS"; then
6145 cat >> confdefs.h <<\EOF
6146 #define _PR_NEED_PTHREAD_INIT 1
6151 *-freebsd*)
6152 if test -n "$USE_NSPR_THREADS"; then
6153 cat >> confdefs.h <<\EOF
6154 #define _PR_LOCAL_THREADS_ONLY 1
6159 *-hpux*)
6160 if test -n "$USE_NSPR_THREADS"; then
6161 cat >> confdefs.h <<\EOF
6162 #define _PR_LOCAL_THREADS_ONLY 1
6166 if test "$USE_PTHREADS"; then
6167 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
6168 cat >> confdefs.h <<\EOF
6169 #define _REENTRANT 1
6172 cat >> confdefs.h <<\EOF
6173 #define _PR_DCETHREADS 1
6176 else
6177 cat >> confdefs.h <<EOF
6178 #define _POSIX_C_SOURCE 199506L
6181 cat >> confdefs.h <<\EOF
6182 #define _PR_HAVE_THREADSAFE_GETHOST 1
6187 if test "$USE_USER_PTHREADS"; then
6188 cat >> confdefs.h <<EOF
6189 #define _POSIX_C_SOURCE 199506L
6194 *-irix*)
6195 if test "${target_os}" = "irix6.5"; then
6196 if test -n "$USE_PTHREADS"; then
6197 cat >> confdefs.h <<\EOF
6198 #define _PR_HAVE_GETHOST_R 1
6201 cat >> confdefs.h <<\EOF
6202 #define _PR_HAVE_GETHOST_R_POINTER 1
6208 *-linux*|*-gnu*|*-k*bsd*-gnu)
6209 if test -n "$USE_NSPR_THREADS"; then
6210 cat >> confdefs.h <<\EOF
6211 #define _PR_LOCAL_THREADS_ONLY 1
6216 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
6217 USE_PTHREADS=
6218 _PTHREAD_LDFLAGS=
6219 USE_USER_PTHREADS=
6221 *-netbsd*|*-openbsd*)
6222 if test -n "$USE_NSPR_THREADS"; then
6223 cat >> confdefs.h <<\EOF
6224 #define _PR_LOCAL_THREADS_ONLY 1
6229 *-osf*)
6230 if test -n "$USE_NSPR_THREADS"; then
6231 cat >> confdefs.h <<\EOF
6232 #define _PR_LOCAL_THREADS_ONLY 1
6236 if test -n "$USE_PTHREADS"; then
6237 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
6239 else
6240 cat >> confdefs.h <<\EOF
6241 #define _PR_HAVE_THREADSAFE_GETHOST 1
6247 *-solaris*)
6248 if test -n "$USE_NSPR_THREADS"; then
6249 cat >> confdefs.h <<\EOF
6250 #define _PR_LOCAL_THREADS_ONLY 1
6254 if test -n "$USE_PTHREADS"; then
6255 cat >> confdefs.h <<\EOF
6256 #define _REENTRANT 1
6259 cat >> confdefs.h <<\EOF
6260 #define HAVE_POINTER_LOCALTIME_R 1
6263 if test "$OS_TEST" = "i86pc"; then
6264 if test -n "$USE_64"; then
6265 PR_MD_ASFILES=os_SunOS_x86_64.s
6266 else
6267 PR_MD_ASFILES=os_SunOS_x86.s
6269 else
6270 if test -n "$USE_64"; then
6271 PR_MD_ASFILES=os_SunOS_sparcv9.s
6276 *-nto*)
6277 if test -n "$USE_PTHREADS"; then
6278 cat >> confdefs.h <<\EOF
6279 #define _PR_HAVE_GETHOST_R 1
6282 cat >> confdefs.h <<\EOF
6283 #define _PR_HAVE_GETHOST_R_POINTER 1
6288 esac
6290 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
6292 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
6293 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
6296 if test -n "$_SAVE_DEBUG_FLAGS"; then
6297 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
6300 if test -n "$MOZ_OPTIMIZE"; then
6301 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
6302 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
6305 if test -n "$MOZ_DEBUG_SYMBOLS"; then
6306 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
6307 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
6310 if test -n "$MOZ_OPTIMIZE"; then
6311 OBJDIR_TAG=_OPT
6312 else
6313 OBJDIR_TAG=_DBG
6316 if test -n "$USE_64"; then
6317 COMPILER_TAG=_64
6320 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
6322 case "$target_os" in
6323 cygwin*|msvc*|mks*)
6324 CC="\$(CYGWIN_WRAPPER) $CC"
6325 CXX="\$(CYGWIN_WRAPPER) $CXX"
6326 RC="\$(CYGWIN_WRAPPER) $RC"
6328 esac
6330 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
6331 if test "${enable_wrap_malloc+set}" = set; then
6332 enableval="$enable_wrap_malloc"
6333 if test "$enableval" = "yes"; then
6334 _WRAP_MALLOC=1
6339 if test -n "$_WRAP_MALLOC"; then
6340 if test -n "$GNU_CC"; then
6341 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=malloc,--wrap=calloc,--wrap=valloc,--wrap=free,--wrap=realloc,--wrap=memalign"
6342 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=__builtin_new,--wrap=__builtin_vec_new,--wrap=__builtin_delete,--wrap=__builtin_vec_delete"
6343 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=strdup,--wrap=strndup"
6344 WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=posix_memalign,--wrap=malloc_usable_size"
6345 else
6346 { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6350 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6351 if test "${with_wrap_malloc+set}" = set; then
6352 withval="$with_wrap_malloc"
6353 WRAP_LDFLAGS="${WRAP_LDFLAGS} $withval"
6461 MAKEFILES="
6462 Makefile
6463 config/Makefile
6464 config/autoconf.mk
6465 config/nsprincl.mk
6466 config/nsprincl.sh
6467 config/nspr-config
6468 config/nspr.pc
6469 lib/Makefile
6470 lib/ds/Makefile
6471 lib/libc/Makefile
6472 lib/libc/include/Makefile
6473 lib/libc/src/Makefile
6474 lib/tests/Makefile
6475 pkg/Makefile
6476 pr/Makefile
6477 pr/include/Makefile
6478 pr/include/md/Makefile
6479 pr/include/obsolete/Makefile
6480 pr/include/private/Makefile
6481 pr/src/Makefile
6482 pr/src/io/Makefile
6483 pr/src/linking/Makefile
6484 pr/src/malloc/Makefile
6485 pr/src/md/Makefile
6486 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6487 pr/src/memory/Makefile
6488 pr/src/misc/Makefile
6489 pr/src/threads/Makefile
6490 pr/tests/Makefile
6491 pr/tests/dll/Makefile
6494 if test "$OS_TARGET" = "Linux"; then
6495 MAKEFILES="$MAKEFILES
6496 pkg/linux/Makefile
6498 elif test "$OS_TARGET" = "SunOS"; then
6499 MAKEFILES="$MAKEFILES
6500 pkg/solaris/Makefile
6501 pkg/solaris/SUNWpr/Makefile
6502 pkg/solaris/SUNWprd/Makefile
6506 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6507 MAKEFILES="$MAKEFILES
6508 pr/src/threads/combined/Makefile
6510 elif test -n "$USE_PTHREADS"; then
6511 MAKEFILES="$MAKEFILES
6512 pr/src/pthreads/Makefile
6514 elif test -n "$USE_BTHREADS"; then
6515 MAKEFILES="$MAKEFILES
6516 pr/src/bthreads/Makefile
6520 if test -n "$USE_CPLUS"; then
6521 MAKEFILES="$MAKEFILES
6522 pr/src/cplus/Makefile
6523 pr/src/cplus/tests/Makefile
6527 echo $MAKEFILES > unallmakefiles
6529 trap '' 1 2 15
6530 cat > confcache <<\EOF
6531 # This file is a shell script that caches the results of configure
6532 # tests run on this system so they can be shared between configure
6533 # scripts and configure runs. It is not useful on other systems.
6534 # If it contains results you don't want to keep, you may remove or edit it.
6536 # By default, configure uses ./config.cache as the cache file,
6537 # creating it if it does not exist already. You can give configure
6538 # the --cache-file=FILE option to use a different cache file; that is
6539 # what configure does when it calls configure scripts in
6540 # subdirectories, so they share the cache.
6541 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6542 # config.status only pays attention to the cache file if you give it the
6543 # --recheck option to rerun configure.
6546 # The following way of writing the cache mishandles newlines in values,
6547 # but we know of no workaround that is simple, portable, and efficient.
6548 # So, don't put newlines in cache variables' values.
6549 # Ultrix sh set writes to stderr and can't be redirected directly,
6550 # and sets the high bit in the cache file unless we assign to the vars.
6551 (set) 2>&1 |
6552 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6553 *ac_space=\ *)
6554 # `set' does not quote correctly, so add quotes (double-quote substitution
6555 # turns \\\\ into \\, and sed turns \\ into \).
6556 sed -n \
6557 -e "s/'/'\\\\''/g" \
6558 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6561 # `set' quotes correctly as required by POSIX, so do not add quotes.
6562 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6564 esac >> confcache
6565 if cmp -s $cache_file confcache; then
6567 else
6568 if test -w $cache_file; then
6569 echo "updating cache $cache_file"
6570 cat confcache > $cache_file
6571 else
6572 echo "not updating unwritable cache $cache_file"
6575 rm -f confcache
6577 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6579 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6580 # Let make expand exec_prefix.
6581 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6583 # Any assignment to VPATH causes Sun make to only execute
6584 # the first set of double-colon rules, so remove it if not needed.
6585 # If there is a colon in the path, we need to keep it.
6586 if test "x$srcdir" = x.; then
6587 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6590 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6592 # Transform confdefs.h into DEFS.
6593 # Protect against shell expansion while executing Makefile rules.
6594 # Protect against Makefile macro expansion.
6595 cat > conftest.defs <<\EOF
6596 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6597 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6598 s%\[%\\&%g
6599 s%\]%\\&%g
6600 s%\$%$$%g
6602 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
6603 rm -f conftest.defs
6606 # Without the "./", some shells look in PATH for config.status.
6607 : ${CONFIG_STATUS=./config.status}
6609 echo creating $CONFIG_STATUS
6610 rm -f $CONFIG_STATUS
6611 cat > $CONFIG_STATUS <<EOF
6612 #! /bin/sh
6613 # Generated automatically by configure.
6614 # Run this file to recreate the current configuration.
6615 # This directory was configured as follows,
6616 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6618 # $0 $ac_configure_args
6620 # Compiler output produced by configure, useful for debugging
6621 # configure, is in ./config.log if it exists.
6623 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6624 for ac_option
6626 case "\$ac_option" in
6627 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6628 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6629 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6630 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6631 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6632 exit 0 ;;
6633 -help | --help | --hel | --he | --h)
6634 echo "\$ac_cs_usage"; exit 0 ;;
6635 *) echo "\$ac_cs_usage"; exit 1 ;;
6636 esac
6637 done
6639 ac_given_srcdir=$srcdir
6641 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6643 cat >> $CONFIG_STATUS <<EOF
6647 # Protect against being on the right side of a sed subst in config.status.
6648 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6649 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6650 $ac_vpsub
6651 $extrasub
6652 s%@SHELL@%$SHELL%g
6653 s%@CFLAGS@%$CFLAGS%g
6654 s%@CPPFLAGS@%$CPPFLAGS%g
6655 s%@CXXFLAGS@%$CXXFLAGS%g
6656 s%@FFLAGS@%$FFLAGS%g
6657 s%@DEFS@%$DEFS%g
6658 s%@LDFLAGS@%$LDFLAGS%g
6659 s%@LIBS@%$LIBS%g
6660 s%@exec_prefix@%$exec_prefix%g
6661 s%@prefix@%$prefix%g
6662 s%@program_transform_name@%$program_transform_name%g
6663 s%@bindir@%$bindir%g
6664 s%@sbindir@%$sbindir%g
6665 s%@libexecdir@%$libexecdir%g
6666 s%@datadir@%$datadir%g
6667 s%@sysconfdir@%$sysconfdir%g
6668 s%@sharedstatedir@%$sharedstatedir%g
6669 s%@localstatedir@%$localstatedir%g
6670 s%@libdir@%$libdir%g
6671 s%@includedir@%$includedir%g
6672 s%@oldincludedir@%$oldincludedir%g
6673 s%@infodir@%$infodir%g
6674 s%@mandir@%$mandir%g
6675 s%@host@%$host%g
6676 s%@host_alias@%$host_alias%g
6677 s%@host_cpu@%$host_cpu%g
6678 s%@host_vendor@%$host_vendor%g
6679 s%@host_os@%$host_os%g
6680 s%@target@%$target%g
6681 s%@target_alias@%$target_alias%g
6682 s%@target_cpu@%$target_cpu%g
6683 s%@target_vendor@%$target_vendor%g
6684 s%@target_os@%$target_os%g
6685 s%@build@%$build%g
6686 s%@build_alias@%$build_alias%g
6687 s%@build_cpu@%$build_cpu%g
6688 s%@build_vendor@%$build_vendor%g
6689 s%@build_os@%$build_os%g
6690 s%@CC@%$CC%g
6691 s%@dist_prefix@%$dist_prefix%g
6692 s%@dist_bindir@%$dist_bindir%g
6693 s%@dist_includedir@%$dist_includedir%g
6694 s%@dist_libdir@%$dist_libdir%g
6695 s%@WHOAMI@%$WHOAMI%g
6696 s%@HOST_CC@%$HOST_CC%g
6697 s%@CXX@%$CXX%g
6698 s%@RANLIB@%$RANLIB%g
6699 s%@AR@%$AR%g
6700 s%@AS@%$AS%g
6701 s%@LD@%$LD%g
6702 s%@STRIP@%$STRIP%g
6703 s%@WINDRES@%$WINDRES%g
6704 s%@CPP@%$CPP%g
6705 s%@PERL@%$PERL%g
6706 s%@CCACHE@%$CCACHE%g
6707 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6708 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6709 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6710 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6711 s%@GNU_CC@%$GNU_CC%g
6712 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6713 s%@MSC_VER@%$MSC_VER%g
6714 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6715 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6716 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
6717 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
6718 s%@USE_CPLUS@%$USE_CPLUS%g
6719 s%@USE_IPV6@%$USE_IPV6%g
6720 s%@USE_N32@%$USE_N32%g
6721 s%@USE_64@%$USE_64%g
6722 s%@OBJECT_MODE@%$OBJECT_MODE%g
6723 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6724 s%@USE_PTHREADS@%$USE_PTHREADS%g
6725 s%@USE_BTHREADS@%$USE_BTHREADS%g
6726 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6727 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6728 s%@LIBNSPR@%$LIBNSPR%g
6729 s%@LIBPLC@%$LIBPLC%g
6730 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6731 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6732 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6733 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6734 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6735 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6736 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6737 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6738 s%@CPU_ARCH@%$CPU_ARCH%g
6739 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6740 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6741 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6742 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6743 s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
6744 s%@MKSHLIB@%$MKSHLIB%g
6745 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6746 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6747 s%@OS_TARGET@%$OS_TARGET%g
6748 s%@OS_ARCH@%$OS_ARCH%g
6749 s%@OS_RELEASE@%$OS_RELEASE%g
6750 s%@OS_TEST@%$OS_TEST%g
6751 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6752 s%@DEFINES@%$DEFINES%g
6753 s%@AR_FLAGS@%$AR_FLAGS%g
6754 s%@ASFLAGS@%$ASFLAGS%g
6755 s%@FILTER@%$FILTER%g
6756 s%@IMPLIB@%$IMPLIB%g
6757 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
6758 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
6759 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
6760 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
6761 s%@OS_LIBS@%$OS_LIBS%g
6762 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6763 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6764 s%@NOSUCHFILE@%$NOSUCHFILE%g
6765 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6766 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6767 s%@OBJDIR@%$OBJDIR%g
6768 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6769 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6770 s%@NSINSTALL@%$NSINSTALL%g
6771 s%@OPTIMIZER@%$OPTIMIZER%g
6772 s%@RC@%$RC%g
6773 s%@RCFLAGS@%$RCFLAGS%g
6774 s%@DLLFLAGS@%$DLLFLAGS%g
6775 s%@EXEFLAGS@%$EXEFLAGS%g
6776 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6777 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6778 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6779 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6780 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6781 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6782 s%@NEXT_ROOT@%$NEXT_ROOT%g
6783 s%@MT@%$MT%g
6785 CEOF
6788 cat >> $CONFIG_STATUS <<\EOF
6790 # Split the substitutions into bite-sized pieces for seds with
6791 # small command number limits, like on Digital OSF/1 and HP-UX.
6792 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6793 ac_file=1 # Number of current file.
6794 ac_beg=1 # First line for current file.
6795 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6796 ac_more_lines=:
6797 ac_sed_cmds=""
6798 while $ac_more_lines; do
6799 if test $ac_beg -gt 1; then
6800 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6801 else
6802 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6804 if test ! -s conftest.s$ac_file; then
6805 ac_more_lines=false
6806 rm -f conftest.s$ac_file
6807 else
6808 if test -z "$ac_sed_cmds"; then
6809 ac_sed_cmds="sed -f conftest.s$ac_file"
6810 else
6811 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6813 ac_file=`expr $ac_file + 1`
6814 ac_beg=$ac_end
6815 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6817 done
6818 if test -z "$ac_sed_cmds"; then
6819 ac_sed_cmds=cat
6823 cat >> $CONFIG_STATUS <<EOF
6825 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6827 cat >> $CONFIG_STATUS <<\EOF
6828 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6829 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6830 case "$ac_file" in
6831 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6832 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6833 *) ac_file_in="${ac_file}.in" ;;
6834 esac
6836 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6838 # Remove last slash and all that follows it. Not all systems have dirname.
6839 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6840 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6841 # The file is in a subdirectory.
6842 test ! -d "$ac_dir" && mkdir "$ac_dir"
6843 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6844 # A "../" for each directory in $ac_dir_suffix.
6845 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6846 else
6847 ac_dir_suffix= ac_dots=
6850 case "$ac_given_srcdir" in
6851 .) srcdir=.
6852 if test -z "$ac_dots"; then top_srcdir=.
6853 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6854 /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6855 *) # Relative path.
6856 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6857 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6858 esac
6861 echo creating "$ac_file"
6862 rm -f "$ac_file"
6863 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6864 case "$ac_file" in
6865 *Makefile*) ac_comsub="1i\\
6866 # $configure_input" ;;
6867 *) ac_comsub= ;;
6868 esac
6870 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
6871 sed -e "$ac_comsub
6872 s%@configure_input@%$configure_input%g
6873 s%@srcdir@%$srcdir%g
6874 s%@top_srcdir@%$top_srcdir%g
6875 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6876 fi; done
6877 rm -f conftest.s*
6882 cat >> $CONFIG_STATUS <<EOF
6885 cat >> $CONFIG_STATUS <<\EOF
6886 chmod +x config/nspr-config
6887 exit 0
6889 chmod +x $CONFIG_STATUS
6890 rm -fr confdefs* $ac_clean_files
6891 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1