Bug 502696 - js_CompareAndSwap on sparc should not use PRLock(); (Cv1) Clean up misse...
[mozilla-central.git] / nsprpub / configure
blob8f7fa364a23cc83e7e93c62987e6e3995ade10aa
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-dist-prefix=DIST_PREFIX
16 place build files in DIST_PREFIX [dist]"
17 ac_help="$ac_help
18 --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]"
19 ac_help="$ac_help
20 --with-dist-includedir=DIR
21 build include files in DIR [DIST_PREFIX/include/nspr]"
22 ac_help="$ac_help
23 --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]"
24 ac_help="$ac_help
25 --with-mozilla Compile NSPR with Mozilla support"
26 ac_help="$ac_help
27 --enable-optimize(=val) Enable code optimizations (val, ie. -O2) "
28 ac_help="$ac_help
29 --disable-debug Do not compile in debugging symbols
30 --enable-debug(=val) Enable debugging (debug flags val)"
31 ac_help="$ac_help
32 --enable-win32-target=\$t
33 Specify win32 flavor. (WIN95 or WINNT)"
34 ac_help="$ac_help
35 --enable-symbian-target=\$t
36 Specify symbian flavor. (WINSCW or GCCE)"
37 ac_help="$ac_help
38 --enable-debug-rtl Use the MSVC debug runtime library"
39 ac_help="$ac_help
40 --enable-n32 Enable n32 ABI support (IRIX only)"
41 ac_help="$ac_help
42 --enable-64bit Enable 64-bit support (on certain platforms)"
43 ac_help="$ac_help
44 --enable-mdupdate Enable use of certain compilers' mdupdate feature"
45 ac_help="$ac_help
46 --enable-cplus Enable some c++ api routines"
47 ac_help="$ac_help
48 --with-arm-kuser Use kuser helpers (Linux/ARM only)
49 (Requires kernel 2.6.13 or later)"
50 ac_help="$ac_help
51 --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
52 ac_help="$ac_help
53 --enable-macos-target=VER
54 Set the minimum MacOS version needed at runtime
55 [10.2 for ppc, 10.4 for x86]"
56 ac_help="$ac_help
57 --disable-os2-high-mem Disable high-memory support on OS/2"
58 ac_help="$ac_help
59 --with-symbian-sdk=SYMBIAN_SDK_DIR
60 The path to the Symbian SDK"
61 ac_help="$ac_help
62 --enable-strip Enable stripping of shared libs and programs"
63 ac_help="$ac_help
64 --with-pthreads Use system pthreads library as thread subsystem"
65 ac_help="$ac_help
66 --enable-user-pthreads Build using userland pthreads"
67 ac_help="$ac_help
68 --enable-nspr-threads Build using classic nspr threads"
69 ac_help="$ac_help
70 --with-bthreads Use system bthreads library as thread subsystem
71 (BeOS only)"
72 ac_help="$ac_help
73 --enable-ipv6 Compile ipv6 support"
74 ac_help="$ac_help
75 --enable-boehm Enable the Boehm Garbage Collector"
77 # Initialize some variables set by options.
78 # The variables have the same names as the options, with
79 # dashes changed to underlines.
80 build=NONE
81 cache_file=./config.cache
82 exec_prefix=NONE
83 host=NONE
84 no_create=
85 nonopt=NONE
86 no_recursion=
87 prefix=NONE
88 program_prefix=NONE
89 program_suffix=NONE
90 program_transform_name=s,x,x,
91 silent=
92 site=
93 srcdir=
94 target=NONE
95 verbose=
96 x_includes=NONE
97 x_libraries=NONE
98 bindir='${exec_prefix}/bin'
99 sbindir='${exec_prefix}/sbin'
100 libexecdir='${exec_prefix}/libexec'
101 datadir='${prefix}/share'
102 sysconfdir='${prefix}/etc'
103 sharedstatedir='${prefix}/com'
104 localstatedir='${prefix}/var'
105 libdir='${exec_prefix}/lib'
106 includedir='${prefix}/include'
107 oldincludedir='/usr/include'
108 infodir='${prefix}/info'
109 mandir='${prefix}/man'
111 # Initialize some other variables.
112 subdirs=
113 MFLAGS= MAKEFLAGS=
114 SHELL=${CONFIG_SHELL-/bin/sh}
115 # Maximum number of lines to put in a shell here document.
116 ac_max_here_lines=12
118 ac_prev=
119 for ac_option
122 # If the previous option needs an argument, assign it.
123 if test -n "$ac_prev"; then
124 eval "$ac_prev=\$ac_option"
125 ac_prev=
126 continue
129 case "$ac_option" in
130 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
131 *) ac_optarg= ;;
132 esac
134 # Accept the important Cygnus configure options, so we can diagnose typos.
136 case "$ac_option" in
138 -bindir | --bindir | --bindi | --bind | --bin | --bi)
139 ac_prev=bindir ;;
140 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
141 bindir="$ac_optarg" ;;
143 -build | --build | --buil | --bui | --bu)
144 ac_prev=build ;;
145 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
146 build="$ac_optarg" ;;
148 -cache-file | --cache-file | --cache-fil | --cache-fi \
149 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
150 ac_prev=cache_file ;;
151 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
152 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
153 cache_file="$ac_optarg" ;;
155 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
156 ac_prev=datadir ;;
157 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
158 | --da=*)
159 datadir="$ac_optarg" ;;
161 -disable-* | --disable-*)
162 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
163 # Reject names that are not valid shell variable names.
164 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
165 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
168 eval "enable_${ac_feature}=no" ;;
170 -enable-* | --enable-*)
171 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
172 # Reject names that are not valid shell variable names.
173 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
174 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
176 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177 case "$ac_option" in
178 *=*) ;;
179 *) ac_optarg=yes ;;
180 esac
181 eval "enable_${ac_feature}='$ac_optarg'" ;;
183 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
184 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
185 | --exec | --exe | --ex)
186 ac_prev=exec_prefix ;;
187 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
188 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
189 | --exec=* | --exe=* | --ex=*)
190 exec_prefix="$ac_optarg" ;;
192 -gas | --gas | --ga | --g)
193 # Obsolete; use --with-gas.
194 with_gas=yes ;;
196 -help | --help | --hel | --he)
197 # Omit some internal or obsolete options to make the list less imposing.
198 # This message is too long to be a string in the A/UX 3.1 sh.
199 cat << EOF
200 Usage: configure [options] [host]
201 Options: [defaults in brackets after descriptions]
202 Configuration:
203 --cache-file=FILE cache test results in FILE
204 --help print this message
205 --no-create do not create output files
206 --quiet, --silent do not print \`checking...' messages
207 --version print the version of autoconf that created configure
208 Directory and file names:
209 --prefix=PREFIX install architecture-independent files in PREFIX
210 [$ac_default_prefix]
211 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
212 [same as prefix]
213 --bindir=DIR user executables in DIR [EPREFIX/bin]
214 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
215 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
216 --datadir=DIR read-only architecture-independent data in DIR
217 [PREFIX/share]
218 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
219 --sharedstatedir=DIR modifiable architecture-independent data in DIR
220 [PREFIX/com]
221 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
222 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
223 --includedir=DIR C header files in DIR [PREFIX/include]
224 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
225 --infodir=DIR info documentation in DIR [PREFIX/info]
226 --mandir=DIR man documentation in DIR [PREFIX/man]
227 --srcdir=DIR find the sources in DIR [configure dir or ..]
228 --program-prefix=PREFIX prepend PREFIX to installed program names
229 --program-suffix=SUFFIX append SUFFIX to installed program names
230 --program-transform-name=PROGRAM
231 run sed PROGRAM on installed program names
233 cat << EOF
234 Host type:
235 --build=BUILD configure for building on BUILD [BUILD=HOST]
236 --host=HOST configure for HOST [guessed]
237 --target=TARGET configure for TARGET [TARGET=HOST]
238 Features and packages:
239 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
240 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
241 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
242 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
243 --x-includes=DIR X include files are in DIR
244 --x-libraries=DIR X library files are in DIR
246 if test -n "$ac_help"; then
247 echo "--enable and --with options recognized:$ac_help"
249 exit 0 ;;
251 -host | --host | --hos | --ho)
252 ac_prev=host ;;
253 -host=* | --host=* | --hos=* | --ho=*)
254 host="$ac_optarg" ;;
256 -includedir | --includedir | --includedi | --included | --include \
257 | --includ | --inclu | --incl | --inc)
258 ac_prev=includedir ;;
259 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
260 | --includ=* | --inclu=* | --incl=* | --inc=*)
261 includedir="$ac_optarg" ;;
263 -infodir | --infodir | --infodi | --infod | --info | --inf)
264 ac_prev=infodir ;;
265 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
266 infodir="$ac_optarg" ;;
268 -libdir | --libdir | --libdi | --libd)
269 ac_prev=libdir ;;
270 -libdir=* | --libdir=* | --libdi=* | --libd=*)
271 libdir="$ac_optarg" ;;
273 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
274 | --libexe | --libex | --libe)
275 ac_prev=libexecdir ;;
276 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
277 | --libexe=* | --libex=* | --libe=*)
278 libexecdir="$ac_optarg" ;;
280 -localstatedir | --localstatedir | --localstatedi | --localstated \
281 | --localstate | --localstat | --localsta | --localst \
282 | --locals | --local | --loca | --loc | --lo)
283 ac_prev=localstatedir ;;
284 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
285 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
286 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
287 localstatedir="$ac_optarg" ;;
289 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
290 ac_prev=mandir ;;
291 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
292 mandir="$ac_optarg" ;;
294 -nfp | --nfp | --nf)
295 # Obsolete; use --without-fp.
296 with_fp=no ;;
298 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
299 | --no-cr | --no-c)
300 no_create=yes ;;
302 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
303 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
304 no_recursion=yes ;;
306 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
307 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
308 | --oldin | --oldi | --old | --ol | --o)
309 ac_prev=oldincludedir ;;
310 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
311 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
312 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
313 oldincludedir="$ac_optarg" ;;
315 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
316 ac_prev=prefix ;;
317 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
318 prefix="$ac_optarg" ;;
320 -program-prefix | --program-prefix | --program-prefi | --program-pref \
321 | --program-pre | --program-pr | --program-p)
322 ac_prev=program_prefix ;;
323 -program-prefix=* | --program-prefix=* | --program-prefi=* \
324 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
325 program_prefix="$ac_optarg" ;;
327 -program-suffix | --program-suffix | --program-suffi | --program-suff \
328 | --program-suf | --program-su | --program-s)
329 ac_prev=program_suffix ;;
330 -program-suffix=* | --program-suffix=* | --program-suffi=* \
331 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
332 program_suffix="$ac_optarg" ;;
334 -program-transform-name | --program-transform-name \
335 | --program-transform-nam | --program-transform-na \
336 | --program-transform-n | --program-transform- \
337 | --program-transform | --program-transfor \
338 | --program-transfo | --program-transf \
339 | --program-trans | --program-tran \
340 | --progr-tra | --program-tr | --program-t)
341 ac_prev=program_transform_name ;;
342 -program-transform-name=* | --program-transform-name=* \
343 | --program-transform-nam=* | --program-transform-na=* \
344 | --program-transform-n=* | --program-transform-=* \
345 | --program-transform=* | --program-transfor=* \
346 | --program-transfo=* | --program-transf=* \
347 | --program-trans=* | --program-tran=* \
348 | --progr-tra=* | --program-tr=* | --program-t=*)
349 program_transform_name="$ac_optarg" ;;
351 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
352 | -silent | --silent | --silen | --sile | --sil)
353 silent=yes ;;
355 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
356 ac_prev=sbindir ;;
357 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
358 | --sbi=* | --sb=*)
359 sbindir="$ac_optarg" ;;
361 -sharedstatedir | --sharedstatedir | --sharedstatedi \
362 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
363 | --sharedst | --shareds | --shared | --share | --shar \
364 | --sha | --sh)
365 ac_prev=sharedstatedir ;;
366 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
367 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
368 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
369 | --sha=* | --sh=*)
370 sharedstatedir="$ac_optarg" ;;
372 -site | --site | --sit)
373 ac_prev=site ;;
374 -site=* | --site=* | --sit=*)
375 site="$ac_optarg" ;;
377 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
378 ac_prev=srcdir ;;
379 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
380 srcdir="$ac_optarg" ;;
382 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
383 | --syscon | --sysco | --sysc | --sys | --sy)
384 ac_prev=sysconfdir ;;
385 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
386 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
387 sysconfdir="$ac_optarg" ;;
389 -target | --target | --targe | --targ | --tar | --ta | --t)
390 ac_prev=target ;;
391 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
392 target="$ac_optarg" ;;
394 -v | -verbose | --verbose | --verbos | --verbo | --verb)
395 verbose=yes ;;
397 -version | --version | --versio | --versi | --vers)
398 echo "configure generated by autoconf version 2.13"
399 exit 0 ;;
401 -with-* | --with-*)
402 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
403 # Reject names that are not valid shell variable names.
404 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
405 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
407 ac_package=`echo $ac_package| sed 's/-/_/g'`
408 case "$ac_option" in
409 *=*) ;;
410 *) ac_optarg=yes ;;
411 esac
412 eval "with_${ac_package}='$ac_optarg'" ;;
414 -without-* | --without-*)
415 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
416 # Reject names that are not valid shell variable names.
417 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
418 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
420 ac_package=`echo $ac_package| sed 's/-/_/g'`
421 eval "with_${ac_package}=no" ;;
423 --x)
424 # Obsolete; use --with-x.
425 with_x=yes ;;
427 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
428 | --x-incl | --x-inc | --x-in | --x-i)
429 ac_prev=x_includes ;;
430 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
431 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
432 x_includes="$ac_optarg" ;;
434 -x-libraries | --x-libraries | --x-librarie | --x-librari \
435 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
436 ac_prev=x_libraries ;;
437 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
438 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
439 x_libraries="$ac_optarg" ;;
441 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
445 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
446 echo "configure: warning: $ac_option: invalid host type" 1>&2
448 if test "x$nonopt" != xNONE; then
449 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
451 nonopt="$ac_option"
454 esac
455 done
457 if test -n "$ac_prev"; then
458 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
461 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
463 # File descriptor usage:
464 # 0 standard input
465 # 1 file creation
466 # 2 errors and warnings
467 # 3 some systems may open it to /dev/tty
468 # 4 used on the Kubota Titan
469 # 6 checking for... messages and results
470 # 5 compiler messages saved in config.log
471 if test "$silent" = yes; then
472 exec 6>/dev/null
473 else
474 exec 6>&1
476 exec 5>./config.log
478 echo "\
479 This file contains any messages produced by compilers while
480 running configure, to aid debugging if configure makes a mistake.
481 " 1>&5
483 # Strip out --no-create and --no-recursion so they do not pile up.
484 # Also quote any args containing shell metacharacters.
485 ac_configure_args=
486 for ac_arg
488 case "$ac_arg" in
489 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490 | --no-cr | --no-c) ;;
491 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
492 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
493 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
494 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
495 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
496 esac
497 done
499 # NLS nuisances.
500 # Only set these to C if already set. These must not be set unconditionally
501 # because not all systems understand e.g. LANG=C (notably SCO).
502 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
503 # Non-C LC_CTYPE values break the ctype check.
504 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
505 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
506 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
507 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
509 # confdefs.h avoids OS command line length limits that DEFS can exceed.
510 rm -rf conftest* confdefs.h
511 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
512 echo > confdefs.h
514 # A filename unique to this package, relative to the directory that
515 # configure is in, which we can look for to find out if srcdir is correct.
516 ac_unique_file=config/libc_r.h
518 # Find the source files, if location was not specified.
519 if test -z "$srcdir"; then
520 ac_srcdir_defaulted=yes
521 # Try the directory containing this script, then its parent.
522 ac_prog=$0
523 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
524 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
525 srcdir=$ac_confdir
526 if test ! -r $srcdir/$ac_unique_file; then
527 srcdir=..
529 else
530 ac_srcdir_defaulted=no
532 if test ! -r $srcdir/$ac_unique_file; then
533 if test "$ac_srcdir_defaulted" = yes; then
534 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
535 else
536 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
539 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
541 # Prefer explicitly selected file to automatically selected ones.
542 if test -z "$CONFIG_SITE"; then
543 if test "x$prefix" != xNONE; then
544 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
545 else
546 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
549 for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
554 done
556 if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559 else
560 echo "creating cache $cache_file"
561 > $cache_file
564 ac_ext=c
565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566 ac_cpp='$CPP $CPPFLAGS'
567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569 cross_compiling=$ac_cv_prog_cc_cross
571 ac_exeext=
572 ac_objext=o
573 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577 ' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
581 else
582 ac_n= ac_c='\c' ac_t=
587 ac_aux_dir=
588 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
589 if test -f $ac_dir/install-sh; then
590 ac_aux_dir=$ac_dir
591 ac_install_sh="$ac_aux_dir/install-sh -c"
592 break
593 elif test -f $ac_dir/install.sh; then
594 ac_aux_dir=$ac_dir
595 ac_install_sh="$ac_aux_dir/install.sh -c"
596 break
598 done
599 if test -z "$ac_aux_dir"; then
600 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
602 ac_config_guess=$ac_aux_dir/config.guess
603 ac_config_sub=$ac_aux_dir/config.sub
604 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
607 # Do some error checking and defaulting for the host and target type.
608 # The inputs are:
609 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
611 # The rules are:
612 # 1. You are not allowed to specify --host, --target, and nonopt at the
613 # same time.
614 # 2. Host defaults to nonopt.
615 # 3. If nonopt is not specified, then host defaults to the current host,
616 # as determined by config.guess.
617 # 4. Target and build default to nonopt.
618 # 5. If nonopt is not specified, then target and build default to host.
620 # The aliases save the names the user supplied, while $host etc.
621 # will get canonicalized.
622 case $host---$target---$nonopt in
623 NONE---*---* | *---NONE---* | *---*---NONE) ;;
624 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
625 esac
628 # Make sure we can run config.sub.
629 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
630 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
633 echo $ac_n "checking host system type""... $ac_c" 1>&6
634 echo "configure:635: checking host system type" >&5
636 host_alias=$host
637 case "$host_alias" in
638 NONE)
639 case $nonopt in
640 NONE)
641 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
642 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
643 fi ;;
644 *) host_alias=$nonopt ;;
645 esac ;;
646 esac
648 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
649 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
650 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
651 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
652 echo "$ac_t""$host" 1>&6
654 echo $ac_n "checking target system type""... $ac_c" 1>&6
655 echo "configure:656: checking target system type" >&5
657 target_alias=$target
658 case "$target_alias" in
659 NONE)
660 case $nonopt in
661 NONE) target_alias=$host_alias ;;
662 *) target_alias=$nonopt ;;
663 esac ;;
664 esac
666 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
667 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
668 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
669 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
670 echo "$ac_t""$target" 1>&6
672 echo $ac_n "checking build system type""... $ac_c" 1>&6
673 echo "configure:674: checking build system type" >&5
675 build_alias=$build
676 case "$build_alias" in
677 NONE)
678 case $nonopt in
679 NONE) build_alias=$host_alias ;;
680 *) build_alias=$nonopt ;;
681 esac ;;
682 esac
684 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
685 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
686 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
687 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
688 echo "$ac_t""$build" 1>&6
690 test "$host_alias" != "$target_alias" &&
691 test "$program_prefix$program_suffix$program_transform_name" = \
692 NONENONEs,x,x, &&
693 program_prefix=${target_alias}-
696 MOD_MAJOR_VERSION=4
697 MOD_MINOR_VERSION=8
698 MOD_PATCH_VERSION=4
699 NSPR_MODNAME=nspr20
700 _HAVE_PTHREADS=
701 USE_PTHREADS=
702 USE_USER_PTHREADS=
703 USE_NSPR_THREADS=
704 USE_N32=
705 USE_64=
706 USE_CPLUS=
707 USE_IPV6=
708 USE_MDUPDATE=
709 _MACOSX_DEPLOYMENT_TARGET=
710 _OPTIMIZE_FLAGS=-O
711 _DEBUG_FLAGS=-g
712 MOZ_DEBUG=1
713 MOZ_OPTIMIZE=
714 OBJDIR='$(OBJDIR_NAME)'
715 OBJDIR_NAME=.
716 OBJDIR_SUFFIX=OBJ
717 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
718 NOSUCHFILE=/no-such-file
719 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
720 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
721 CYGWIN_WRAPPER=
722 MACOS_SDK_DIR=
723 NEXT_ROOT=
725 MOZ_OS2_HIGH_MEMORY=1
727 RESOLVE_LINK_SYMBOLS=
729 CFLAGS="${CFLAGS=}"
730 CXXFLAGS="${CXXFLAGS=}"
731 LDFLAGS="${LDFLAGS=}"
732 DLLFLAGS="${DLLFLAGS=}"
733 HOST_CFLAGS="${HOST_CFLAGS=}"
734 HOST_LDFLAGS="${HOST_LDFLAGS=}"
736 case "$target" in
737 *-cygwin*|*-mingw*)
738 # Check to see if we are really running in a msvc environemnt
739 _WIN32_MSVC=
740 for ac_prog in cl
742 # Extract the first word of "$ac_prog", so it can be a program name with args.
743 set dummy $ac_prog; ac_word=$2
744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
745 echo "configure:746: checking for $ac_word" >&5
746 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
747 echo $ac_n "(cached) $ac_c" 1>&6
748 else
749 if test -n "$CC"; then
750 ac_cv_prog_CC="$CC" # Let the user override the test.
751 else
752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
753 ac_dummy="$PATH"
754 for ac_dir in $ac_dummy; do
755 test -z "$ac_dir" && ac_dir=.
756 if test -f $ac_dir/$ac_word; then
757 ac_cv_prog_CC="$ac_prog"
758 break
760 done
761 IFS="$ac_save_ifs"
764 CC="$ac_cv_prog_CC"
765 if test -n "$CC"; then
766 echo "$ac_t""$CC" 1>&6
767 else
768 echo "$ac_t""no" 1>&6
771 test -n "$CC" && break
772 done
774 if test "$CC" = "cl"; then
775 echo 'main() { return 0; }' > dummy.c
776 ${CC} -o dummy dummy.c >/dev/null 2>&1
777 if test $? = 0; then
778 _WIN32_MSVC=1
779 CXX=$CC
780 else
781 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
783 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
786 *-msvc*)
787 _WIN32_MSVC=1
789 *-mks*)
790 _WIN32_MSVC=1
792 esac
794 if test -n "$_WIN32_MSVC"; then
795 SKIP_PATH_CHECKS=1
796 SKIP_COMPILER_CHECKS=1
797 SKIP_LIBRARY_CHECKS=1
800 dist_prefix='${MOD_DEPTH}/dist'
801 dist_bindir='${dist_prefix}/bin'
802 dist_includedir='${dist_prefix}/include/nspr'
803 dist_libdir='${dist_prefix}/lib'
804 if test "${includedir}" = '${prefix}/include'; then
805 includedir='${prefix}/include/nspr'
808 # Check whether --with-dist-prefix or --without-dist-prefix was given.
809 if test "${with_dist_prefix+set}" = set; then
810 withval="$with_dist_prefix"
811 dist_prefix=$withval
815 # Check whether --with-dist-bindir or --without-dist-bindir was given.
816 if test "${with_dist_bindir+set}" = set; then
817 withval="$with_dist_bindir"
818 dist_bindir=$withval
822 # Check whether --with-dist-includedir or --without-dist-includedir was given.
823 if test "${with_dist_includedir+set}" = set; then
824 withval="$with_dist_includedir"
825 dist_includedir=$withval
829 # Check whether --with-dist-libdir or --without-dist-libdir was given.
830 if test "${with_dist_libdir+set}" = set; then
831 withval="$with_dist_libdir"
832 dist_libdir=$withval
841 # Check whether --with-mozilla or --without-mozilla was given.
842 if test "${with_mozilla+set}" = set; then
843 withval="$with_mozilla"
844 if test "$withval" = "yes"; then
845 cat >> confdefs.h <<\EOF
846 #define MOZILLA_CLIENT 1
849 MOZILLA_CLIENT=1
850 else
851 MOZILLA_CLIENT=
853 else
854 if test -n "$MOZILLA_CLIENT"; then
855 cat >> confdefs.h <<\EOF
856 #define MOZILLA_CLIENT 1
863 # Check whether --enable-optimize or --disable-optimize was given.
864 if test "${enable_optimize+set}" = set; then
865 enableval="$enable_optimize"
866 if test "$enableval" != "no"; then
867 MOZ_OPTIMIZE=1
868 if test -n "$enableval" && test "$enableval" != "yes"; then
869 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
870 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
872 else
873 MOZ_OPTIMIZE=
878 # Check whether --enable-debug or --disable-debug was given.
879 if test "${enable_debug+set}" = set; then
880 enableval="$enable_debug"
881 if test "$enableval" = "no"; then
882 MOZ_DEBUG=
883 else
884 MOZ_DEBUG=1
885 if test -n "$enableval" && test "$enableval" != "yes"; then
886 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
887 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
893 # Check whether --enable-win32-target or --disable-win32-target was given.
894 if test "${enable_win32_target+set}" = set; then
895 enableval="$enable_win32_target"
896 OS_TARGET=`echo $enableval | tr a-z A-Z`
900 # Check whether --enable-symbian-target or --disable-symbian-target was given.
901 if test "${enable_symbian_target+set}" = set; then
902 enableval="$enable_symbian_target"
903 OS_TARGET=`echo $enableval | tr a-z A-Z`
907 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
908 if test "${enable_debug_rtl+set}" = set; then
909 enableval="$enable_debug_rtl"
910 if test "$enableval" = "yes"; then
911 USE_DEBUG_RTL=1
916 # Check whether --enable-n32 or --disable-n32 was given.
917 if test "${enable_n32+set}" = set; then
918 enableval="$enable_n32"
919 if test "$enableval" = "yes"; then
920 USE_N32=1
921 else if test "$enableval" = "no"; then
922 USE_N32=
928 # Check whether --enable-64bit or --disable-64bit was given.
929 if test "${enable_64bit+set}" = set; then
930 enableval="$enable_64bit"
931 if test "$enableval" = "yes"; then
932 USE_64=1
937 # Check whether --enable-mdupdate or --disable-mdupdate was given.
938 if test "${enable_mdupdate+set}" = set; then
939 enableval="$enable_mdupdate"
940 if test "$enableval" = "yes"; then
941 USE_MDUPDATE=1
946 # Check whether --enable-cplus or --disable-cplus was given.
947 if test "${enable_cplus+set}" = set; then
948 enableval="$enable_cplus"
949 if test "$enableval" = "yes"; then
950 USE_CPLUS=1
955 # Check whether --with-arm-kuser or --without-arm-kuser was given.
956 if test "${with_arm_kuser+set}" = set; then
957 withval="$with_arm_kuser"
958 if test "$withval" = "yes"; then
959 cat >> confdefs.h <<\EOF
960 #define _PR_ARM_KUSER 1
967 # Check whether --with-macos-sdk or --without-macos-sdk was given.
968 if test "${with_macos_sdk+set}" = set; then
969 withval="$with_macos_sdk"
970 MACOS_SDK_DIR=$withval
974 # Check whether --enable-macos-target or --disable-macos-target was given.
975 if test "${enable_macos_target+set}" = set; then
976 enableval="$enable_macos_target"
977 _MACOSX_DEPLOYMENT_TARGET=$enableval
981 case "$target" in
983 *-aix*)
984 case "${target_os}" in
985 aix3.2*)
986 USE_NSPR_THREADS=1
989 USE_PTHREADS=1
991 esac
994 esac
996 if test -z "$CC"; then
997 case "$target" in
999 *-aix*)
1000 if test -z "$USE_NSPR_THREADS"; then
1001 CC=xlc_r
1002 else
1003 CC=xlc
1007 *-hpux*)
1008 CC=cc
1011 *-irix*)
1012 CC=cc
1015 *-osf*)
1016 CC=cc
1019 *-solaris*)
1020 CC=cc
1023 esac
1026 if test -z "$CXX"; then
1027 case "$target" in
1029 *-aix*)
1030 if test -z "$USE_NSPR_THREADS"; then
1031 CXX=xlC_r
1032 else
1033 CXX=xlC
1037 *-hpux*)
1038 case "${target_os}" in
1039 hpux10.30)
1040 CXX=aCC
1042 hpux11.*)
1043 CXX=aCC
1046 CXX=CC
1048 esac
1051 *-irix*)
1052 CXX=CC
1055 *-osf*)
1056 CXX=cxx
1059 *-solaris*)
1060 CXX=CC
1063 esac
1066 if test -z "$SKIP_PATH_CHECKS"; then
1067 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1068 set dummy $WHOAMI whoami; ac_word=$2
1069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1070 echo "configure:1071: checking for $ac_word" >&5
1071 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074 case "$WHOAMI" in
1076 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1078 ?:/*)
1079 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1083 ac_dummy="$PATH"
1084 for ac_dir in $ac_dummy; do
1085 test -z "$ac_dir" && ac_dir=.
1086 if test -f $ac_dir/$ac_word; then
1087 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1088 break
1090 done
1091 IFS="$ac_save_ifs"
1092 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1094 esac
1096 WHOAMI="$ac_cv_path_WHOAMI"
1097 if test -n "$WHOAMI"; then
1098 echo "$ac_t""$WHOAMI" 1>&6
1099 else
1100 echo "$ac_t""no" 1>&6
1105 if test -n "$MOZ_DEBUG"; then
1106 cat >> confdefs.h <<\EOF
1107 #define DEBUG 1
1110 DEFINES="$DEFINES -UNDEBUG"
1112 case "${target_os}" in
1113 beos*)
1114 DEFINES="$DEFINES -DDEBUG_${USER}"
1116 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1117 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1120 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1122 esac
1123 else
1124 cat >> confdefs.h <<\EOF
1125 #define NDEBUG 1
1128 DEFINES="$DEFINES -UDEBUG"
1131 if test -z "$SKIP_COMPILER_CHECKS"; then
1132 if test "$target" != "$host"; then
1133 echo "cross compiling from $host to $target"
1134 cross_compiling=yes
1136 _SAVE_CC="$CC"
1137 _SAVE_CFLAGS="$CFLAGS"
1138 _SAVE_LDFLAGS="$LDFLAGS"
1140 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1141 echo "configure:1142: checking for $host compiler" >&5
1142 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1144 # Extract the first word of "$ac_prog", so it can be a program name with args.
1145 set dummy $ac_prog; ac_word=$2
1146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1147 echo "configure:1148: checking for $ac_word" >&5
1148 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1149 echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151 if test -n "$HOST_CC"; then
1152 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1153 else
1154 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1155 ac_dummy="$PATH"
1156 for ac_dir in $ac_dummy; do
1157 test -z "$ac_dir" && ac_dir=.
1158 if test -f $ac_dir/$ac_word; then
1159 ac_cv_prog_HOST_CC="$ac_prog"
1160 break
1162 done
1163 IFS="$ac_save_ifs"
1166 HOST_CC="$ac_cv_prog_HOST_CC"
1167 if test -n "$HOST_CC"; then
1168 echo "$ac_t""$HOST_CC" 1>&6
1169 else
1170 echo "$ac_t""no" 1>&6
1173 test -n "$HOST_CC" && break
1174 done
1175 test -n "$HOST_CC" || HOST_CC=""""
1177 if test -z "$HOST_CC"; then
1178 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1180 echo "$ac_t""$HOST_CC" 1>&6
1181 if test -z "$HOST_CFLAGS"; then
1182 HOST_CFLAGS="$CFLAGS"
1184 if test -z "$HOST_LDFLAGS"; then
1185 HOST_LDFLAGS="$LDFLAGS"
1188 CC="$HOST_CC"
1189 CFLAGS="$HOST_CFLAGS"
1190 LDFLAGS="$HOST_LDFLAGS"
1192 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1194 cat > conftest.$ac_ext <<EOF
1195 #line 1196 "configure"
1196 #include "confdefs.h"
1198 int main() {
1199 return(0);
1200 ; return 0; }
1202 if { (eval echo configure:1203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1203 rm -rf conftest*
1204 ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1205 else
1206 echo "configure: failed program was:" >&5
1207 cat conftest.$ac_ext >&5
1208 rm -rf conftest*
1209 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1211 rm -f conftest*
1213 CC=$_SAVE_CC
1214 CFLAGS=$_SAVE_CFLAGS
1215 LDFLAGS=$_SAVE_LDFLAGS
1217 case "$build:$target" in
1218 powerpc-apple-darwin8*:i?86-apple-darwin*)
1219 _SAVE_CFLAGS=$CFLAGS
1220 _SAVE_CXXFLAGS=$CXXLAGS
1221 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1222 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1224 esac
1226 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1228 # Extract the first word of "$ac_prog", so it can be a program name with args.
1229 set dummy $ac_prog; ac_word=$2
1230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231 echo "configure:1232: checking for $ac_word" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235 if test -n "$CC"; then
1236 ac_cv_prog_CC="$CC" # Let the user override the test.
1237 else
1238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1239 ac_dummy="$PATH"
1240 for ac_dir in $ac_dummy; do
1241 test -z "$ac_dir" && ac_dir=.
1242 if test -f $ac_dir/$ac_word; then
1243 ac_cv_prog_CC="$ac_prog"
1244 break
1246 done
1247 IFS="$ac_save_ifs"
1250 CC="$ac_cv_prog_CC"
1251 if test -n "$CC"; then
1252 echo "$ac_t""$CC" 1>&6
1253 else
1254 echo "$ac_t""no" 1>&6
1257 test -n "$CC" && break
1258 done
1259 test -n "$CC" || CC="echo"
1261 unset ac_cv_prog_CC
1262 # Extract the first word of "gcc", so it can be a program name with args.
1263 set dummy gcc; ac_word=$2
1264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1265 echo "configure:1266: checking for $ac_word" >&5
1266 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269 if test -n "$CC"; then
1270 ac_cv_prog_CC="$CC" # Let the user override the test.
1271 else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_CC="gcc"
1278 break
1280 done
1281 IFS="$ac_save_ifs"
1284 CC="$ac_cv_prog_CC"
1285 if test -n "$CC"; then
1286 echo "$ac_t""$CC" 1>&6
1287 else
1288 echo "$ac_t""no" 1>&6
1291 if test -z "$CC"; then
1292 # Extract the first word of "cc", so it can be a program name with args.
1293 set dummy cc; ac_word=$2
1294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1295 echo "configure:1296: checking for $ac_word" >&5
1296 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1297 echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299 if test -n "$CC"; then
1300 ac_cv_prog_CC="$CC" # Let the user override the test.
1301 else
1302 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1303 ac_prog_rejected=no
1304 ac_dummy="$PATH"
1305 for ac_dir in $ac_dummy; do
1306 test -z "$ac_dir" && ac_dir=.
1307 if test -f $ac_dir/$ac_word; then
1308 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1309 ac_prog_rejected=yes
1310 continue
1312 ac_cv_prog_CC="cc"
1313 break
1315 done
1316 IFS="$ac_save_ifs"
1317 if test $ac_prog_rejected = yes; then
1318 # We found a bogon in the path, so make sure we never use it.
1319 set dummy $ac_cv_prog_CC
1320 shift
1321 if test $# -gt 0; then
1322 # We chose a different compiler from the bogus one.
1323 # However, it has the same basename, so the bogon will be chosen
1324 # first if we set CC to just the basename; use the full file name.
1325 shift
1326 set dummy "$ac_dir/$ac_word" "$@"
1327 shift
1328 ac_cv_prog_CC="$@"
1333 CC="$ac_cv_prog_CC"
1334 if test -n "$CC"; then
1335 echo "$ac_t""$CC" 1>&6
1336 else
1337 echo "$ac_t""no" 1>&6
1340 if test -z "$CC"; then
1341 case "`uname -s`" in
1342 *win32* | *WIN32*)
1343 # Extract the first word of "cl", so it can be a program name with args.
1344 set dummy cl; ac_word=$2
1345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1346 echo "configure:1347: checking for $ac_word" >&5
1347 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1348 echo $ac_n "(cached) $ac_c" 1>&6
1349 else
1350 if test -n "$CC"; then
1351 ac_cv_prog_CC="$CC" # Let the user override the test.
1352 else
1353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1354 ac_dummy="$PATH"
1355 for ac_dir in $ac_dummy; do
1356 test -z "$ac_dir" && ac_dir=.
1357 if test -f $ac_dir/$ac_word; then
1358 ac_cv_prog_CC="cl"
1359 break
1361 done
1362 IFS="$ac_save_ifs"
1365 CC="$ac_cv_prog_CC"
1366 if test -n "$CC"; then
1367 echo "$ac_t""$CC" 1>&6
1368 else
1369 echo "$ac_t""no" 1>&6
1372 esac
1374 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1377 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1378 echo "configure:1379: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1380 ac_ext=c
1381 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1382 ac_cpp='$CPP $CPPFLAGS'
1383 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1384 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1385 cross_compiling=$ac_cv_prog_cc_cross
1387 cat > conftest.$ac_ext << EOF
1389 #line 1390 "configure"
1390 #include "confdefs.h"
1392 main(){return(0);}
1394 if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1395 ac_cv_prog_cc_works=yes
1396 # If we can't run a trivial program, we are probably using a cross compiler.
1397 if (./conftest; exit) 2>/dev/null; then
1398 ac_cv_prog_cc_cross=no
1399 else
1400 ac_cv_prog_cc_cross=yes
1402 else
1403 echo "configure: failed program was:" >&5
1404 cat conftest.$ac_ext >&5
1405 ac_cv_prog_cc_works=no
1407 rm -fr conftest*
1408 ac_ext=c
1409 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1410 ac_cpp='$CPP $CPPFLAGS'
1411 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1412 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1413 cross_compiling=$ac_cv_prog_cc_cross
1415 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1416 if test $ac_cv_prog_cc_works = no; then
1417 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1419 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1420 echo "configure:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1421 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1422 cross_compiling=$ac_cv_prog_cc_cross
1424 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1425 echo "configure:1426: checking whether we are using GNU C" >&5
1426 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1427 echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429 cat > conftest.c <<EOF
1430 #ifdef __GNUC__
1431 yes;
1432 #endif
1434 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1435 ac_cv_prog_gcc=yes
1436 else
1437 ac_cv_prog_gcc=no
1441 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1443 if test $ac_cv_prog_gcc = yes; then
1444 GCC=yes
1445 else
1446 GCC=
1449 ac_test_CFLAGS="${CFLAGS+set}"
1450 ac_save_CFLAGS="$CFLAGS"
1451 CFLAGS=
1452 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1453 echo "configure:1454: checking whether ${CC-cc} accepts -g" >&5
1454 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1455 echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457 echo 'void f(){}' > conftest.c
1458 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1459 ac_cv_prog_cc_g=yes
1460 else
1461 ac_cv_prog_cc_g=no
1463 rm -f conftest*
1467 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1468 if test "$ac_test_CFLAGS" = set; then
1469 CFLAGS="$ac_save_CFLAGS"
1470 elif test $ac_cv_prog_cc_g = yes; then
1471 if test "$GCC" = yes; then
1472 CFLAGS="-g -O2"
1473 else
1474 CFLAGS="-g"
1476 else
1477 if test "$GCC" = yes; then
1478 CFLAGS="-O2"
1479 else
1480 CFLAGS=
1484 if test -n "$USE_CPLUS"; then
1485 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1487 # Extract the first word of "$ac_prog", so it can be a program name with args.
1488 set dummy $ac_prog; ac_word=$2
1489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1490 echo "configure:1491: checking for $ac_word" >&5
1491 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494 if test -n "$CXX"; then
1495 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1496 else
1497 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500 test -z "$ac_dir" && ac_dir=.
1501 if test -f $ac_dir/$ac_word; then
1502 ac_cv_prog_CXX="$ac_prog"
1503 break
1505 done
1506 IFS="$ac_save_ifs"
1509 CXX="$ac_cv_prog_CXX"
1510 if test -n "$CXX"; then
1511 echo "$ac_t""$CXX" 1>&6
1512 else
1513 echo "$ac_t""no" 1>&6
1516 test -n "$CXX" && break
1517 done
1518 test -n "$CXX" || CXX="echo"
1520 unset ac_cv_prog_CXX
1521 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1523 # Extract the first word of "$ac_prog", so it can be a program name with args.
1524 set dummy $ac_prog; ac_word=$2
1525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1526 echo "configure:1527: checking for $ac_word" >&5
1527 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1528 echo $ac_n "(cached) $ac_c" 1>&6
1529 else
1530 if test -n "$CXX"; then
1531 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1532 else
1533 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1534 ac_dummy="$PATH"
1535 for ac_dir in $ac_dummy; do
1536 test -z "$ac_dir" && ac_dir=.
1537 if test -f $ac_dir/$ac_word; then
1538 ac_cv_prog_CXX="$ac_prog"
1539 break
1541 done
1542 IFS="$ac_save_ifs"
1545 CXX="$ac_cv_prog_CXX"
1546 if test -n "$CXX"; then
1547 echo "$ac_t""$CXX" 1>&6
1548 else
1549 echo "$ac_t""no" 1>&6
1552 test -n "$CXX" && break
1553 done
1554 test -n "$CXX" || CXX="gcc"
1557 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1558 echo "configure:1559: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1560 ac_ext=C
1561 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1562 ac_cpp='$CXXCPP $CPPFLAGS'
1563 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1564 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1565 cross_compiling=$ac_cv_prog_cxx_cross
1567 cat > conftest.$ac_ext << EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1572 int main(){return(0);}
1574 if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1575 ac_cv_prog_cxx_works=yes
1576 # If we can't run a trivial program, we are probably using a cross compiler.
1577 if (./conftest; exit) 2>/dev/null; then
1578 ac_cv_prog_cxx_cross=no
1579 else
1580 ac_cv_prog_cxx_cross=yes
1582 else
1583 echo "configure: failed program was:" >&5
1584 cat conftest.$ac_ext >&5
1585 ac_cv_prog_cxx_works=no
1587 rm -fr conftest*
1588 ac_ext=c
1589 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1590 ac_cpp='$CPP $CPPFLAGS'
1591 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1592 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1593 cross_compiling=$ac_cv_prog_cc_cross
1595 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1596 if test $ac_cv_prog_cxx_works = no; then
1597 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1599 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1600 echo "configure:1601: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1601 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1602 cross_compiling=$ac_cv_prog_cxx_cross
1604 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1605 echo "configure:1606: checking whether we are using GNU C++" >&5
1606 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1607 echo $ac_n "(cached) $ac_c" 1>&6
1608 else
1609 cat > conftest.C <<EOF
1610 #ifdef __GNUC__
1611 yes;
1612 #endif
1614 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1615 ac_cv_prog_gxx=yes
1616 else
1617 ac_cv_prog_gxx=no
1621 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1623 if test $ac_cv_prog_gxx = yes; then
1624 GXX=yes
1625 else
1626 GXX=
1629 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1630 ac_save_CXXFLAGS="$CXXFLAGS"
1631 CXXFLAGS=
1632 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1633 echo "configure:1634: checking whether ${CXX-g++} accepts -g" >&5
1634 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1635 echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637 echo 'void f(){}' > conftest.cc
1638 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1639 ac_cv_prog_cxx_g=yes
1640 else
1641 ac_cv_prog_cxx_g=no
1643 rm -f conftest*
1647 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1648 if test "$ac_test_CXXFLAGS" = set; then
1649 CXXFLAGS="$ac_save_CXXFLAGS"
1650 elif test $ac_cv_prog_cxx_g = yes; then
1651 if test "$GXX" = yes; then
1652 CXXFLAGS="-g -O2"
1653 else
1654 CXXFLAGS="-g"
1656 else
1657 if test "$GXX" = yes; then
1658 CXXFLAGS="-O2"
1659 else
1660 CXXFLAGS=
1666 case "$build:$target" in
1667 powerpc-apple-darwin8*:i?86-apple-darwin*)
1668 CFLAGS=$_SAVE_CFLAGS
1669 CXXFLAGS=$_SAVE_CXXFLAGS
1671 esac
1673 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1675 # Extract the first word of "$ac_prog", so it can be a program name with args.
1676 set dummy $ac_prog; ac_word=$2
1677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1678 echo "configure:1679: checking for $ac_word" >&5
1679 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1682 if test -n "$RANLIB"; then
1683 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1684 else
1685 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1686 ac_dummy="$PATH"
1687 for ac_dir in $ac_dummy; do
1688 test -z "$ac_dir" && ac_dir=.
1689 if test -f $ac_dir/$ac_word; then
1690 ac_cv_prog_RANLIB="$ac_prog"
1691 break
1693 done
1694 IFS="$ac_save_ifs"
1697 RANLIB="$ac_cv_prog_RANLIB"
1698 if test -n "$RANLIB"; then
1699 echo "$ac_t""$RANLIB" 1>&6
1700 else
1701 echo "$ac_t""no" 1>&6
1704 test -n "$RANLIB" && break
1705 done
1706 test -n "$RANLIB" || RANLIB="echo"
1708 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1710 # Extract the first word of "$ac_prog", so it can be a program name with args.
1711 set dummy $ac_prog; ac_word=$2
1712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1713 echo "configure:1714: checking for $ac_word" >&5
1714 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1715 echo $ac_n "(cached) $ac_c" 1>&6
1716 else
1717 if test -n "$AR"; then
1718 ac_cv_prog_AR="$AR" # Let the user override the test.
1719 else
1720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1721 ac_dummy="$PATH"
1722 for ac_dir in $ac_dummy; do
1723 test -z "$ac_dir" && ac_dir=.
1724 if test -f $ac_dir/$ac_word; then
1725 ac_cv_prog_AR="$ac_prog"
1726 break
1728 done
1729 IFS="$ac_save_ifs"
1732 AR="$ac_cv_prog_AR"
1733 if test -n "$AR"; then
1734 echo "$ac_t""$AR" 1>&6
1735 else
1736 echo "$ac_t""no" 1>&6
1739 test -n "$AR" && break
1740 done
1741 test -n "$AR" || AR="echo"
1743 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1745 # Extract the first word of "$ac_prog", so it can be a program name with args.
1746 set dummy $ac_prog; ac_word=$2
1747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1748 echo "configure:1749: checking for $ac_word" >&5
1749 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1750 echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752 if test -n "$AS"; then
1753 ac_cv_prog_AS="$AS" # Let the user override the test.
1754 else
1755 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1756 ac_dummy="$PATH"
1757 for ac_dir in $ac_dummy; do
1758 test -z "$ac_dir" && ac_dir=.
1759 if test -f $ac_dir/$ac_word; then
1760 ac_cv_prog_AS="$ac_prog"
1761 break
1763 done
1764 IFS="$ac_save_ifs"
1767 AS="$ac_cv_prog_AS"
1768 if test -n "$AS"; then
1769 echo "$ac_t""$AS" 1>&6
1770 else
1771 echo "$ac_t""no" 1>&6
1774 test -n "$AS" && break
1775 done
1776 test -n "$AS" || AS="echo"
1778 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
1780 # Extract the first word of "$ac_prog", so it can be a program name with args.
1781 set dummy $ac_prog; ac_word=$2
1782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1783 echo "configure:1784: checking for $ac_word" >&5
1784 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1785 echo $ac_n "(cached) $ac_c" 1>&6
1786 else
1787 if test -n "$LD"; then
1788 ac_cv_prog_LD="$LD" # Let the user override the test.
1789 else
1790 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1791 ac_dummy="$PATH"
1792 for ac_dir in $ac_dummy; do
1793 test -z "$ac_dir" && ac_dir=.
1794 if test -f $ac_dir/$ac_word; then
1795 ac_cv_prog_LD="$ac_prog"
1796 break
1798 done
1799 IFS="$ac_save_ifs"
1802 LD="$ac_cv_prog_LD"
1803 if test -n "$LD"; then
1804 echo "$ac_t""$LD" 1>&6
1805 else
1806 echo "$ac_t""no" 1>&6
1809 test -n "$LD" && break
1810 done
1811 test -n "$LD" || LD="echo"
1813 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
1815 # Extract the first word of "$ac_prog", so it can be a program name with args.
1816 set dummy $ac_prog; ac_word=$2
1817 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1818 echo "configure:1819: checking for $ac_word" >&5
1819 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1820 echo $ac_n "(cached) $ac_c" 1>&6
1821 else
1822 if test -n "$STRIP"; then
1823 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1824 else
1825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1826 ac_dummy="$PATH"
1827 for ac_dir in $ac_dummy; do
1828 test -z "$ac_dir" && ac_dir=.
1829 if test -f $ac_dir/$ac_word; then
1830 ac_cv_prog_STRIP="$ac_prog"
1831 break
1833 done
1834 IFS="$ac_save_ifs"
1837 STRIP="$ac_cv_prog_STRIP"
1838 if test -n "$STRIP"; then
1839 echo "$ac_t""$STRIP" 1>&6
1840 else
1841 echo "$ac_t""no" 1>&6
1844 test -n "$STRIP" && break
1845 done
1846 test -n "$STRIP" || STRIP="echo"
1848 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
1850 # Extract the first word of "$ac_prog", so it can be a program name with args.
1851 set dummy $ac_prog; ac_word=$2
1852 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1853 echo "configure:1854: checking for $ac_word" >&5
1854 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
1855 echo $ac_n "(cached) $ac_c" 1>&6
1856 else
1857 if test -n "$WINDRES"; then
1858 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
1859 else
1860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1861 ac_dummy="$PATH"
1862 for ac_dir in $ac_dummy; do
1863 test -z "$ac_dir" && ac_dir=.
1864 if test -f $ac_dir/$ac_word; then
1865 ac_cv_prog_WINDRES="$ac_prog"
1866 break
1868 done
1869 IFS="$ac_save_ifs"
1872 WINDRES="$ac_cv_prog_WINDRES"
1873 if test -n "$WINDRES"; then
1874 echo "$ac_t""$WINDRES" 1>&6
1875 else
1876 echo "$ac_t""no" 1>&6
1879 test -n "$WINDRES" && break
1880 done
1881 test -n "$WINDRES" || WINDRES="echo"
1884 else
1885 # Extract the first word of "gcc", so it can be a program name with args.
1886 set dummy gcc; ac_word=$2
1887 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1888 echo "configure:1889: checking for $ac_word" >&5
1889 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892 if test -n "$CC"; then
1893 ac_cv_prog_CC="$CC" # Let the user override the test.
1894 else
1895 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1896 ac_dummy="$PATH"
1897 for ac_dir in $ac_dummy; do
1898 test -z "$ac_dir" && ac_dir=.
1899 if test -f $ac_dir/$ac_word; then
1900 ac_cv_prog_CC="gcc"
1901 break
1903 done
1904 IFS="$ac_save_ifs"
1907 CC="$ac_cv_prog_CC"
1908 if test -n "$CC"; then
1909 echo "$ac_t""$CC" 1>&6
1910 else
1911 echo "$ac_t""no" 1>&6
1914 if test -z "$CC"; then
1915 # Extract the first word of "cc", so it can be a program name with args.
1916 set dummy cc; ac_word=$2
1917 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1918 echo "configure:1919: checking for $ac_word" >&5
1919 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1920 echo $ac_n "(cached) $ac_c" 1>&6
1921 else
1922 if test -n "$CC"; then
1923 ac_cv_prog_CC="$CC" # Let the user override the test.
1924 else
1925 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1926 ac_prog_rejected=no
1927 ac_dummy="$PATH"
1928 for ac_dir in $ac_dummy; do
1929 test -z "$ac_dir" && ac_dir=.
1930 if test -f $ac_dir/$ac_word; then
1931 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1932 ac_prog_rejected=yes
1933 continue
1935 ac_cv_prog_CC="cc"
1936 break
1938 done
1939 IFS="$ac_save_ifs"
1940 if test $ac_prog_rejected = yes; then
1941 # We found a bogon in the path, so make sure we never use it.
1942 set dummy $ac_cv_prog_CC
1943 shift
1944 if test $# -gt 0; then
1945 # We chose a different compiler from the bogus one.
1946 # However, it has the same basename, so the bogon will be chosen
1947 # first if we set CC to just the basename; use the full file name.
1948 shift
1949 set dummy "$ac_dir/$ac_word" "$@"
1950 shift
1951 ac_cv_prog_CC="$@"
1956 CC="$ac_cv_prog_CC"
1957 if test -n "$CC"; then
1958 echo "$ac_t""$CC" 1>&6
1959 else
1960 echo "$ac_t""no" 1>&6
1963 if test -z "$CC"; then
1964 case "`uname -s`" in
1965 *win32* | *WIN32*)
1966 # Extract the first word of "cl", so it can be a program name with args.
1967 set dummy cl; ac_word=$2
1968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1969 echo "configure:1970: checking for $ac_word" >&5
1970 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1971 echo $ac_n "(cached) $ac_c" 1>&6
1972 else
1973 if test -n "$CC"; then
1974 ac_cv_prog_CC="$CC" # Let the user override the test.
1975 else
1976 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1977 ac_dummy="$PATH"
1978 for ac_dir in $ac_dummy; do
1979 test -z "$ac_dir" && ac_dir=.
1980 if test -f $ac_dir/$ac_word; then
1981 ac_cv_prog_CC="cl"
1982 break
1984 done
1985 IFS="$ac_save_ifs"
1988 CC="$ac_cv_prog_CC"
1989 if test -n "$CC"; then
1990 echo "$ac_t""$CC" 1>&6
1991 else
1992 echo "$ac_t""no" 1>&6
1995 esac
1997 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2000 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2003 ac_ext=c
2004 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2005 ac_cpp='$CPP $CPPFLAGS'
2006 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2007 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2008 cross_compiling=$ac_cv_prog_cc_cross
2010 cat > conftest.$ac_ext << EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2015 main(){return(0);}
2017 if { (eval echo configure:2018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2018 ac_cv_prog_cc_works=yes
2019 # If we can't run a trivial program, we are probably using a cross compiler.
2020 if (./conftest; exit) 2>/dev/null; then
2021 ac_cv_prog_cc_cross=no
2022 else
2023 ac_cv_prog_cc_cross=yes
2025 else
2026 echo "configure: failed program was:" >&5
2027 cat conftest.$ac_ext >&5
2028 ac_cv_prog_cc_works=no
2030 rm -fr conftest*
2031 ac_ext=c
2032 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2033 ac_cpp='$CPP $CPPFLAGS'
2034 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2035 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2036 cross_compiling=$ac_cv_prog_cc_cross
2038 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2039 if test $ac_cv_prog_cc_works = no; then
2040 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2042 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2043 echo "configure:2044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2044 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2045 cross_compiling=$ac_cv_prog_cc_cross
2047 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2048 echo "configure:2049: checking whether we are using GNU C" >&5
2049 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2050 echo $ac_n "(cached) $ac_c" 1>&6
2051 else
2052 cat > conftest.c <<EOF
2053 #ifdef __GNUC__
2054 yes;
2055 #endif
2057 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2058 ac_cv_prog_gcc=yes
2059 else
2060 ac_cv_prog_gcc=no
2064 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2066 if test $ac_cv_prog_gcc = yes; then
2067 GCC=yes
2068 else
2069 GCC=
2072 ac_test_CFLAGS="${CFLAGS+set}"
2073 ac_save_CFLAGS="$CFLAGS"
2074 CFLAGS=
2075 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2076 echo "configure:2077: checking whether ${CC-cc} accepts -g" >&5
2077 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
2079 else
2080 echo 'void f(){}' > conftest.c
2081 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2082 ac_cv_prog_cc_g=yes
2083 else
2084 ac_cv_prog_cc_g=no
2086 rm -f conftest*
2090 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2091 if test "$ac_test_CFLAGS" = set; then
2092 CFLAGS="$ac_save_CFLAGS"
2093 elif test $ac_cv_prog_cc_g = yes; then
2094 if test "$GCC" = yes; then
2095 CFLAGS="-g -O2"
2096 else
2097 CFLAGS="-g"
2099 else
2100 if test "$GCC" = yes; then
2101 CFLAGS="-O2"
2102 else
2103 CFLAGS=
2107 if test -n "$USE_CPLUS"; then
2108 if test "$CC" = "cl" -a -z "$CXX"; then
2109 CXX=$CC
2110 else
2111 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2113 # Extract the first word of "$ac_prog", so it can be a program name with args.
2114 set dummy $ac_prog; ac_word=$2
2115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2116 echo "configure:2117: checking for $ac_word" >&5
2117 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2118 echo $ac_n "(cached) $ac_c" 1>&6
2119 else
2120 if test -n "$CXX"; then
2121 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2122 else
2123 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2124 ac_dummy="$PATH"
2125 for ac_dir in $ac_dummy; do
2126 test -z "$ac_dir" && ac_dir=.
2127 if test -f $ac_dir/$ac_word; then
2128 ac_cv_prog_CXX="$ac_prog"
2129 break
2131 done
2132 IFS="$ac_save_ifs"
2135 CXX="$ac_cv_prog_CXX"
2136 if test -n "$CXX"; then
2137 echo "$ac_t""$CXX" 1>&6
2138 else
2139 echo "$ac_t""no" 1>&6
2142 test -n "$CXX" && break
2143 done
2144 test -n "$CXX" || CXX="gcc"
2147 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2148 echo "configure:2149: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2150 ac_ext=C
2151 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2152 ac_cpp='$CXXCPP $CPPFLAGS'
2153 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2154 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2155 cross_compiling=$ac_cv_prog_cxx_cross
2157 cat > conftest.$ac_ext << EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2162 int main(){return(0);}
2164 if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2165 ac_cv_prog_cxx_works=yes
2166 # If we can't run a trivial program, we are probably using a cross compiler.
2167 if (./conftest; exit) 2>/dev/null; then
2168 ac_cv_prog_cxx_cross=no
2169 else
2170 ac_cv_prog_cxx_cross=yes
2172 else
2173 echo "configure: failed program was:" >&5
2174 cat conftest.$ac_ext >&5
2175 ac_cv_prog_cxx_works=no
2177 rm -fr conftest*
2178 ac_ext=c
2179 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2180 ac_cpp='$CPP $CPPFLAGS'
2181 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2182 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2183 cross_compiling=$ac_cv_prog_cc_cross
2185 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2186 if test $ac_cv_prog_cxx_works = no; then
2187 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2189 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2190 echo "configure:2191: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2191 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2192 cross_compiling=$ac_cv_prog_cxx_cross
2194 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2195 echo "configure:2196: checking whether we are using GNU C++" >&5
2196 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2197 echo $ac_n "(cached) $ac_c" 1>&6
2198 else
2199 cat > conftest.C <<EOF
2200 #ifdef __GNUC__
2201 yes;
2202 #endif
2204 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2205 ac_cv_prog_gxx=yes
2206 else
2207 ac_cv_prog_gxx=no
2211 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2213 if test $ac_cv_prog_gxx = yes; then
2214 GXX=yes
2215 else
2216 GXX=
2219 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2220 ac_save_CXXFLAGS="$CXXFLAGS"
2221 CXXFLAGS=
2222 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2223 echo "configure:2224: checking whether ${CXX-g++} accepts -g" >&5
2224 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227 echo 'void f(){}' > conftest.cc
2228 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2229 ac_cv_prog_cxx_g=yes
2230 else
2231 ac_cv_prog_cxx_g=no
2233 rm -f conftest*
2237 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2238 if test "$ac_test_CXXFLAGS" = set; then
2239 CXXFLAGS="$ac_save_CXXFLAGS"
2240 elif test $ac_cv_prog_cxx_g = yes; then
2241 if test "$GXX" = yes; then
2242 CXXFLAGS="-g -O2"
2243 else
2244 CXXFLAGS="-g"
2246 else
2247 if test "$GXX" = yes; then
2248 CXXFLAGS="-O2"
2249 else
2250 CXXFLAGS=
2256 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2257 echo "configure:2258: checking how to run the C preprocessor" >&5
2258 # On Suns, sometimes $CPP names a directory.
2259 if test -n "$CPP" && test -d "$CPP"; then
2260 CPP=
2262 if test -z "$CPP"; then
2263 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2264 echo $ac_n "(cached) $ac_c" 1>&6
2265 else
2266 # This must be in double quotes, not single quotes, because CPP may get
2267 # substituted into the Makefile and "${CC-cc}" will confuse make.
2268 CPP="${CC-cc} -E"
2269 # On the NeXT, cc -E runs the code through the compiler's parser,
2270 # not just through cpp.
2271 cat > conftest.$ac_ext <<EOF
2272 #line 2273 "configure"
2273 #include "confdefs.h"
2274 #include <assert.h>
2275 Syntax Error
2277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2278 { (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2280 if test -z "$ac_err"; then
2282 else
2283 echo "$ac_err" >&5
2284 echo "configure: failed program was:" >&5
2285 cat conftest.$ac_ext >&5
2286 rm -rf conftest*
2287 CPP="${CC-cc} -E -traditional-cpp"
2288 cat > conftest.$ac_ext <<EOF
2289 #line 2290 "configure"
2290 #include "confdefs.h"
2291 #include <assert.h>
2292 Syntax Error
2294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2295 { (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2297 if test -z "$ac_err"; then
2299 else
2300 echo "$ac_err" >&5
2301 echo "configure: failed program was:" >&5
2302 cat conftest.$ac_ext >&5
2303 rm -rf conftest*
2304 CPP="${CC-cc} -nologo -E"
2305 cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309 Syntax Error
2311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2312 { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2314 if test -z "$ac_err"; then
2316 else
2317 echo "$ac_err" >&5
2318 echo "configure: failed program was:" >&5
2319 cat conftest.$ac_ext >&5
2320 rm -rf conftest*
2321 CPP=/lib/cpp
2323 rm -f conftest*
2325 rm -f conftest*
2327 rm -f conftest*
2328 ac_cv_prog_CPP="$CPP"
2330 CPP="$ac_cv_prog_CPP"
2331 else
2332 ac_cv_prog_CPP="$CPP"
2334 echo "$ac_t""$CPP" 1>&6
2336 # Extract the first word of "ranlib", so it can be a program name with args.
2337 set dummy ranlib; ac_word=$2
2338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2339 echo "configure:2340: checking for $ac_word" >&5
2340 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2341 echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343 if test -n "$RANLIB"; then
2344 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2345 else
2346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2347 ac_dummy="$PATH"
2348 for ac_dir in $ac_dummy; do
2349 test -z "$ac_dir" && ac_dir=.
2350 if test -f $ac_dir/$ac_word; then
2351 ac_cv_prog_RANLIB="ranlib"
2352 break
2354 done
2355 IFS="$ac_save_ifs"
2356 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2359 RANLIB="$ac_cv_prog_RANLIB"
2360 if test -n "$RANLIB"; then
2361 echo "$ac_t""$RANLIB" 1>&6
2362 else
2363 echo "$ac_t""no" 1>&6
2366 for ac_prog in as
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_path_AS'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 case "$AS" in
2377 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2379 ?:/*)
2380 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2383 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2384 ac_dummy="$PATH"
2385 for ac_dir in $ac_dummy; do
2386 test -z "$ac_dir" && ac_dir=.
2387 if test -f $ac_dir/$ac_word; then
2388 ac_cv_path_AS="$ac_dir/$ac_word"
2389 break
2391 done
2392 IFS="$ac_save_ifs"
2394 esac
2396 AS="$ac_cv_path_AS"
2397 if test -n "$AS"; then
2398 echo "$ac_t""$AS" 1>&6
2399 else
2400 echo "$ac_t""no" 1>&6
2403 test -n "$AS" && break
2404 done
2405 test -n "$AS" || AS="$CC"
2407 for ac_prog in ar
2409 # Extract the first word of "$ac_prog", so it can be a program name with args.
2410 set dummy $ac_prog; ac_word=$2
2411 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2412 echo "configure:2413: checking for $ac_word" >&5
2413 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2414 echo $ac_n "(cached) $ac_c" 1>&6
2415 else
2416 case "$AR" in
2418 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2420 ?:/*)
2421 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2424 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2425 ac_dummy="$PATH"
2426 for ac_dir in $ac_dummy; do
2427 test -z "$ac_dir" && ac_dir=.
2428 if test -f $ac_dir/$ac_word; then
2429 ac_cv_path_AR="$ac_dir/$ac_word"
2430 break
2432 done
2433 IFS="$ac_save_ifs"
2435 esac
2437 AR="$ac_cv_path_AR"
2438 if test -n "$AR"; then
2439 echo "$ac_t""$AR" 1>&6
2440 else
2441 echo "$ac_t""no" 1>&6
2444 test -n "$AR" && break
2445 done
2446 test -n "$AR" || AR="echo not_ar"
2448 for ac_prog in ld link
2450 # Extract the first word of "$ac_prog", so it can be a program name with args.
2451 set dummy $ac_prog; ac_word=$2
2452 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2453 echo "configure:2454: checking for $ac_word" >&5
2454 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2455 echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457 case "$LD" in
2459 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2461 ?:/*)
2462 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2466 ac_dummy="$PATH"
2467 for ac_dir in $ac_dummy; do
2468 test -z "$ac_dir" && ac_dir=.
2469 if test -f $ac_dir/$ac_word; then
2470 ac_cv_path_LD="$ac_dir/$ac_word"
2471 break
2473 done
2474 IFS="$ac_save_ifs"
2476 esac
2478 LD="$ac_cv_path_LD"
2479 if test -n "$LD"; then
2480 echo "$ac_t""$LD" 1>&6
2481 else
2482 echo "$ac_t""no" 1>&6
2485 test -n "$LD" && break
2486 done
2487 test -n "$LD" || LD="echo not_ld"
2489 for ac_prog in strip
2491 # Extract the first word of "$ac_prog", so it can be a program name with args.
2492 set dummy $ac_prog; ac_word=$2
2493 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2494 echo "configure:2495: checking for $ac_word" >&5
2495 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2496 echo $ac_n "(cached) $ac_c" 1>&6
2497 else
2498 case "$STRIP" in
2500 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2502 ?:/*)
2503 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2506 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2507 ac_dummy="$PATH"
2508 for ac_dir in $ac_dummy; do
2509 test -z "$ac_dir" && ac_dir=.
2510 if test -f $ac_dir/$ac_word; then
2511 ac_cv_path_STRIP="$ac_dir/$ac_word"
2512 break
2514 done
2515 IFS="$ac_save_ifs"
2517 esac
2519 STRIP="$ac_cv_path_STRIP"
2520 if test -n "$STRIP"; then
2521 echo "$ac_t""$STRIP" 1>&6
2522 else
2523 echo "$ac_t""no" 1>&6
2526 test -n "$STRIP" && break
2527 done
2528 test -n "$STRIP" || STRIP="echo not_strip"
2530 for ac_prog in windres
2532 # Extract the first word of "$ac_prog", so it can be a program name with args.
2533 set dummy $ac_prog; ac_word=$2
2534 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2535 echo "configure:2536: checking for $ac_word" >&5
2536 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539 case "$WINDRES" in
2541 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2543 ?:/*)
2544 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2548 ac_dummy="$PATH"
2549 for ac_dir in $ac_dummy; do
2550 test -z "$ac_dir" && ac_dir=.
2551 if test -f $ac_dir/$ac_word; then
2552 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2553 break
2555 done
2556 IFS="$ac_save_ifs"
2558 esac
2560 WINDRES="$ac_cv_path_WINDRES"
2561 if test -n "$WINDRES"; then
2562 echo "$ac_t""$WINDRES" 1>&6
2563 else
2564 echo "$ac_t""no" 1>&6
2567 test -n "$WINDRES" && break
2568 done
2569 test -n "$WINDRES" || WINDRES="echo not_windres"
2571 if test -z "$HOST_CC"; then
2572 HOST_CC="$CC"
2574 if test -z "$HOST_CFLAGS"; then
2575 HOST_CFLAGS="$CFLAGS"
2579 if test "$GCC" = "yes"; then
2580 GNU_CC=1
2582 if test "$GXX" = "yes"; then
2583 GNU_CXX=1
2585 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2586 GNU_AS=1
2588 rm -f a.out
2590 case "$build:$target" in
2591 i?86-apple-darwin*:powerpc-apple-darwin*)
2592 cross_compiling=yes
2594 esac
2596 if test "$cross_compiling" = "yes"; then
2597 CROSS_COMPILE=1
2598 else
2599 CROSS_COMPILE=
2602 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2603 echo "configure:2604: checking for gcc -pipe support" >&5
2604 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2605 echo '#include <stdio.h>' > dummy-hello.c
2606 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2607 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2608 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2609 if test $? = 0; then
2610 _res_as_stdin="yes"
2611 else
2612 _res_as_stdin="no"
2614 if test "$_res_as_stdin" = "yes"; then
2615 _SAVE_CFLAGS=$CFLAGS
2616 CFLAGS="$CFLAGS -pipe"
2617 cat > conftest.$ac_ext <<EOF
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620 #include <stdio.h>
2621 int main() {
2622 printf("Hello World\n");
2623 ; return 0; }
2625 if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2626 rm -rf conftest*
2627 _res_gcc_pipe="yes"
2628 else
2629 echo "configure: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 rm -rf conftest*
2632 _res_gcc_pipe="no"
2634 rm -f conftest*
2635 CFLAGS=$_SAVE_CFLAGS
2637 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2638 _res="yes";
2639 CFLAGS="$CFLAGS -pipe"
2640 CXXFLAGS="$CXXFLAGS -pipe"
2641 else
2642 _res="no"
2644 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2645 echo "$ac_t""$_res" 1>&6
2646 else
2647 echo "$ac_t""no" 1>&6
2650 if test "$GNU_CC"; then
2651 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2652 echo "configure:2653: checking for visibility(hidden) attribute" >&5
2653 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656 cat > conftest.c <<EOF
2657 int foo __attribute__ ((visibility ("hidden"))) = 1;
2659 ac_cv_visibility_hidden=no
2660 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2661 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2662 ac_cv_visibility_hidden=yes
2665 rm -f conftest.cs
2669 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2670 if test "$ac_cv_visibility_hidden" = "yes"; then
2671 cat >> confdefs.h <<\EOF
2672 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2675 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2676 echo "configure:2677: checking for visibility pragma support" >&5
2677 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2678 echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680 cat > conftest.c <<EOF
2681 #pragma GCC visibility push(hidden)
2682 int foo_hidden = 1;
2683 #pragma GCC visibility push(default)
2684 int foo_default = 1;
2686 ac_cv_visibility_pragma=no
2687 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2688 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2689 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2690 ac_cv_visibility_pragma=yes
2694 rm -f conftest.cs
2698 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2699 if test "$ac_cv_visibility_pragma" = "yes"; then
2700 cat >> confdefs.h <<\EOF
2701 #define HAVE_VISIBILITY_PRAGMA 1
2704 # To work around a build problem on Linux x86-64 (Bugzilla bug
2705 # 293438), we use the -fvisibility=hidden flag. This flag is less
2706 # optimal than #pragma GCC visibility push(hidden) because the flag
2707 # assumes that symbols defined outside the current source file have
2708 # the default visibility. This has the advantage that we don't need
2709 # to wrap system header files, but has the disadvantage that calls
2710 # to hidden symbols defined in other source files cannot be
2711 # optimized by the compiler. The -fvisibility=hidden flag does
2712 # hide and export symbols correctly.
2713 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
2714 #WRAP_SYSTEM_INCLUDES=1
2715 VISIBILITY_FLAGS="-fvisibility=hidden"
2716 WRAP_SYSTEM_INCLUDES=
2719 fi # GNU_CC
2721 fi # SKIP_COMPILER_CHECKS
2723 if test -z "$SKIP_PATH_CHECKS"; then
2724 for ac_prog in perl5 perl
2726 # Extract the first word of "$ac_prog", so it can be a program name with args.
2727 set dummy $ac_prog; ac_word=$2
2728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2729 echo "configure:2730: checking for $ac_word" >&5
2730 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2731 echo $ac_n "(cached) $ac_c" 1>&6
2732 else
2733 case "$PERL" in
2735 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2737 ?:/*)
2738 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2742 ac_dummy="$PATH"
2743 for ac_dir in $ac_dummy; do
2744 test -z "$ac_dir" && ac_dir=.
2745 if test -f $ac_dir/$ac_word; then
2746 ac_cv_path_PERL="$ac_dir/$ac_word"
2747 break
2749 done
2750 IFS="$ac_save_ifs"
2752 esac
2754 PERL="$ac_cv_path_PERL"
2755 if test -n "$PERL"; then
2756 echo "$ac_t""$PERL" 1>&6
2757 else
2758 echo "$ac_t""no" 1>&6
2761 test -n "$PERL" && break
2762 done
2763 test -n "$PERL" || PERL="echo not_perl"
2765 elif test -z "$PERL"; then
2766 PERL=perl
2769 OBJ_SUFFIX=o
2770 LIB_SUFFIX=a
2771 DLL_SUFFIX=so
2772 ASM_SUFFIX=s
2773 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
2774 PR_MD_ASFILES=
2775 PR_MD_CSRCS=
2776 PR_MD_ARCH_DIR=unix
2777 AR_FLAGS='cr $@'
2778 AS='$(CC)'
2779 ASFLAGS='$(CFLAGS)'
2781 if test -n "$CROSS_COMPILE"; then
2782 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2783 OS_RELEASE=
2784 OS_TEST="${target_cpu}"
2785 case "${target_os}" in
2786 linux*) OS_ARCH=Linux ;;
2787 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2788 mingw*) OS_ARCH=WINNT ;;
2789 wince*) OS_ARCH=WINCE ;;
2790 winmo*) OS_ARCH=WINCE ;;
2791 darwin*) OS_ARCH=Darwin ;;
2792 riscos*) OS_ARCH=RISCOS ;;
2793 esac
2794 else
2795 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2796 OS_RELEASE=`uname -r`
2797 OS_TEST=`uname -m`
2800 if test "$OS_ARCH" = "IRIX64"; then
2801 OS_ARCH=IRIX
2804 if test "$OS_ARCH" = "AIX"; then
2805 OS_RELEASE=`uname -v`.`uname -r`
2808 if test "$OS_ARCH" = "FreeBSD"; then
2809 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2812 if test "$OS_ARCH" = "Linux"; then
2813 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2814 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
2817 #######################################################################
2818 # Master "Core Components" macros for getting the OS target #
2819 #######################################################################
2822 # Note: OS_TARGET should be specified on the command line for gmake.
2823 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
2824 # The difference between the Win95 target and the WinNT target is that
2825 # the WinNT target uses Windows NT specific features not available
2826 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
2827 # at lesser performance (the Win95 target uses threads; the WinNT target
2828 # uses fibers).
2830 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
2831 # cross-compilation.
2835 # The following hack allows one to build on a WIN95 machine (as if
2836 # s/he were cross-compiling on a WINNT host for a WIN95 target).
2837 # It also accomodates for MKS's uname.exe. If you never intend
2838 # to do development on a WIN95 machine, you don't need this hack.
2840 case "$OS_ARCH" in
2841 WIN95)
2842 OS_ARCH=WINNT
2843 OS_TARGET=WIN95
2845 Windows_95)
2846 OS_ARCH=Windows_NT
2847 OS_TARGET=WIN95
2849 Windows_98)
2850 OS_ARCH=Windows_NT
2851 OS_TARGET=WIN95
2853 CYGWIN_9*|CYGWIN_ME*)
2854 OS_ARCH='CYGWIN_NT-4.0'
2855 OS_TARGET=WIN95
2857 OS_2)
2858 OS_ARCH=OS2
2859 OS_TARGET=OS2
2861 esac
2864 # On WIN32, we also define the variable CPU_ARCH.
2867 case "$OS_ARCH" in
2868 WINNT)
2869 CPU_ARCH=`uname -p`
2870 if test "$CPU_ARCH" = "I386"; then
2871 CPU_ARCH=x86
2874 Windows_NT)
2876 # If uname -s returns "Windows_NT", we assume that we are using
2877 # the uname.exe in MKS toolkit.
2879 # The -r option of MKS uname only returns the major version number.
2880 # So we need to use its -v option to get the minor version number.
2881 # Moreover, it doesn't have the -p option, so we need to use uname -m.
2883 OS_ARCH=WINNT
2884 OS_MINOR_RELEASE=`uname -v`
2885 if test "$OS_MINOR_RELEASE" = "00"; then
2886 OS_MINOR_RELEASE=0
2888 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
2889 CPU_ARCH=`uname -m`
2891 # MKS's uname -m returns "586" on a Pentium machine.
2893 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2894 CPU_ARCH=x86
2897 CYGWIN_NT*|MINGW*_NT*)
2899 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
2900 # the uname.exe in the Cygwin tools.
2901 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
2902 # the uname.exe in the MSYS tools.
2904 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
2905 OS_ARCH=WINNT
2906 CPU_ARCH=`uname -m`
2908 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
2910 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2911 CPU_ARCH=x86
2914 esac
2916 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
2917 OS_TARGET=WIN95
2918 if test -n "$MOZ_DEBUG"; then
2919 USE_DEBUG_RTL=1
2922 if test -z "$OS_TARGET"; then
2923 OS_TARGET=$OS_ARCH
2925 if test "$OS_TARGET" = "WIN95"; then
2926 OS_RELEASE="4.0"
2928 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
2930 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
2931 if test "${enable_os2_high_mem+set}" = set; then
2932 enableval="$enable_os2_high_mem"
2933 if test "$enableval" = "no"; then
2934 MOZ_OS2_HIGH_MEMORY=
2935 else
2936 MOZ_OS2_HIGH_MEMORY=1
2941 case "$host" in
2942 *-mingw*)
2943 NSINSTALL=nsinstall
2945 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
2946 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
2947 if test `echo "${PATH}" | grep -c \;` = 0; then
2948 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
2951 *-beos*)
2952 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
2954 *os2*)
2957 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
2959 esac
2961 case "$target" in
2963 *-aix*)
2964 cat >> confdefs.h <<\EOF
2965 #define XP_UNIX 1
2968 cat >> confdefs.h <<\EOF
2969 #define AIX 1
2972 cat >> confdefs.h <<\EOF
2973 #define SYSV 1
2976 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
2977 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
2978 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
2979 echo "configure:2980: checking for sys/atomic_op.h" >&5
2980 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2981 echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 #include <sys/atomic_op.h>
2988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2989 { (eval echo configure:2990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2991 if test -z "$ac_err"; then
2992 rm -rf conftest*
2993 eval "ac_cv_header_$ac_safe=yes"
2994 else
2995 echo "$ac_err" >&5
2996 echo "configure: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
2998 rm -rf conftest*
2999 eval "ac_cv_header_$ac_safe=no"
3001 rm -f conftest*
3003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3004 echo "$ac_t""yes" 1>&6
3005 cat >> confdefs.h <<\EOF
3006 #define AIX_HAVE_ATOMIC_OP_H 1
3009 else
3010 echo "$ac_t""no" 1>&6
3013 case "${target_os}" in
3014 aix3.2*)
3015 cat >> confdefs.h <<\EOF
3016 #define AIX_RENAME_SELECT 1
3019 cat >> confdefs.h <<\EOF
3020 #define _PR_NO_LARGE_FILES 1
3023 AIX_LINK_OPTS='-bnso -berok'
3024 PR_MD_ASFILES=os_AIX.s
3026 aix4.1*)
3027 cat >> confdefs.h <<\EOF
3028 #define AIX_TIMERS 1
3031 cat >> confdefs.h <<\EOF
3032 #define _PR_NO_LARGE_FILES 1
3035 cat >> confdefs.h <<\EOF
3036 #define AIX4_1 1
3039 MKSHLIB=
3040 DSO_LDOPTS=
3041 AIX_LINK_OPTS='-bnso -berok'
3042 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3043 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3045 aix4.2*)
3046 cat >> confdefs.h <<\EOF
3047 #define AIX_TIMERS 1
3050 cat >> confdefs.h <<\EOF
3051 #define _PR_HAVE_OFF64_T 1
3054 AIX_LINK_OPTS='-brtl -bnso -berok'
3056 aix4.3*)
3057 cat >> confdefs.h <<\EOF
3058 #define AIX_TIMERS 1
3061 cat >> confdefs.h <<\EOF
3062 #define _PR_HAVE_OFF64_T 1
3065 cat >> confdefs.h <<\EOF
3066 #define AIX4_3_PLUS 1
3069 cat >> confdefs.h <<\EOF
3070 #define HAVE_SOCKLEN_T 1
3073 cat >> confdefs.h <<\EOF
3074 #define HAVE_FCNTL_FILE_LOCKING 1
3077 USE_IPV6=1
3078 AIX_LINK_OPTS='-brtl -bnso -berok'
3081 cat >> confdefs.h <<\EOF
3082 #define AIX_TIMERS 1
3085 cat >> confdefs.h <<\EOF
3086 #define _PR_HAVE_OFF64_T 1
3089 cat >> confdefs.h <<\EOF
3090 #define AIX4_3_PLUS 1
3093 cat >> confdefs.h <<\EOF
3094 #define HAVE_SOCKLEN_T 1
3097 cat >> confdefs.h <<\EOF
3098 #define HAVE_FCNTL_FILE_LOCKING 1
3101 USE_IPV6=1
3102 AIX_LINK_OPTS='-brtl -bnso -berok'
3104 esac
3105 CFLAGS="$CFLAGS -qro -qroconst"
3106 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3107 AIX_TMP='./_aix_tmp.o'
3108 if test -n "$USE_64"; then
3109 MDCPUCFG_H=_aix64.cfg
3110 OBJECT_MODE=64
3111 else
3112 MDCPUCFG_H=_aix32.cfg
3114 PR_MD_CSRCS=aix.c
3115 RESOLVE_LINK_SYMBOLS=1
3118 *-beos*)
3119 cat >> confdefs.h <<\EOF
3120 #define XP_BEOS 1
3123 cat >> confdefs.h <<\EOF
3124 #define BeOS 1
3127 cat >> confdefs.h <<\EOF
3128 #define BEOS 1
3131 cat >> confdefs.h <<\EOF
3132 #define _POSIX_SOURCE 1
3135 DSO_LDOPTS=-nostart
3136 MDCPUCFG_H=_beos.cfg
3137 USE_BTHREADS=1
3138 PR_MD_ARCH_DIR=beos
3139 RESOLVE_LINK_SYMBOLS=1
3140 case "${target_cpu}" in
3141 i*86)
3142 _OPTIMIZE_FLAGS=-O2
3143 _DEBUG_FLAGS='-gdwarf-2 -O0'
3144 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3145 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3146 echo "configure:3147: checking for gethostbyaddr in -lbind" >&5
3147 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3148 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3149 echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151 ac_save_LIBS="$LIBS"
3152 LIBS="-lbind $LIBS"
3153 cat > conftest.$ac_ext <<EOF
3154 #line 3155 "configure"
3155 #include "confdefs.h"
3156 /* Override any gcc2 internal prototype to avoid an error. */
3157 /* We use char because int might match the return type of a gcc2
3158 builtin and then its argument prototype would still apply. */
3159 char gethostbyaddr();
3161 int main() {
3162 gethostbyaddr()
3163 ; return 0; }
3165 if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3166 rm -rf conftest*
3167 eval "ac_cv_lib_$ac_lib_var=yes"
3168 else
3169 echo "configure: failed program was:" >&5
3170 cat conftest.$ac_ext >&5
3171 rm -rf conftest*
3172 eval "ac_cv_lib_$ac_lib_var=no"
3174 rm -f conftest*
3175 LIBS="$ac_save_LIBS"
3178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3179 echo "$ac_t""yes" 1>&6
3180 OS_LIBS="$OS_LIBS -lbind -lsocket"
3181 else
3182 echo "$ac_t""no" 1>&6
3186 powerpc)
3187 CC=mwcc
3188 CCC=mwcc
3189 LD=mwld
3190 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'
3191 _OPTIMIZE_FLAGS=-O2
3192 _DEBUG_FLAGS='-g -O0'
3194 esac
3197 *-bsdi*)
3198 cat >> confdefs.h <<\EOF
3199 #define XP_UNIX 1
3202 cat >> confdefs.h <<\EOF
3203 #define BSDI 1
3206 cat >> confdefs.h <<\EOF
3207 #define NEED_BSDREGEX 1
3211 CFLAGS="$CFLAGS -Wall -Wno-format"
3212 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3214 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3215 CPU_ARCH=x86
3216 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3217 CPU_ARCH=sparc
3220 MDCPUCFG_H=_bsdi.cfg
3221 PR_MD_CSRCS=bsdi.c
3223 DSO_LDOPTS=-r
3225 case "$target_os" in
3226 bsdi1.1*)
3227 cat >> confdefs.h <<\EOF
3228 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3231 cat >> confdefs.h <<\EOF
3232 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3235 cat >> confdefs.h <<\EOF
3236 #define _PR_NEED_H_ERRNO 1
3239 MKSHLIB=
3240 DSO_CFLAGS=
3241 DSO_LDOPTS=
3244 bsdi2.1*)
3245 cat >> confdefs.h <<\EOF
3246 #define _PR_TIMESPEC_HAS_TS_SEC 1
3249 cat >> confdefs.h <<\EOF
3250 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3253 cat >> confdefs.h <<\EOF
3254 #define HAVE_DLL 1
3257 cat >> confdefs.h <<\EOF
3258 #define USE_DLFCN 1
3261 cat >> confdefs.h <<\EOF
3262 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3265 PR_MD_ASFILES=os_BSD_OS_386_2.s
3268 bsdi4.* | bsdi5.*)
3269 cat >> confdefs.h <<\EOF
3270 #define _PR_SELECT_CONST_TIMEVAL 1
3273 cat >> confdefs.h <<\EOF
3274 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3277 cat >> confdefs.h <<\EOF
3278 #define HAVE_DLL 1
3281 cat >> confdefs.h <<\EOF
3282 #define USE_DLFCN 1
3285 cat >> confdefs.h <<\EOF
3286 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3289 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3290 DSO_CFLAGS=-fPIC
3291 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3292 STRIP="$STRIP -d"
3293 case "$target_os" in
3294 bsdi4.2* | bsdi4.3* | bsdi5.*)
3295 cat >> confdefs.h <<\EOF
3296 #define _PR_HAVE_GETPROTO_R 1
3299 cat >> confdefs.h <<\EOF
3300 #define _PR_HAVE_GETPROTO_R_POINTER 1
3304 esac
3307 cat >> confdefs.h <<\EOF
3308 #define _PR_SELECT_CONST_TIMEVAL 1
3311 cat >> confdefs.h <<\EOF
3312 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3315 cat >> confdefs.h <<\EOF
3316 #define HAVE_DLL 1
3319 cat >> confdefs.h <<\EOF
3320 #define USE_DLFCN 1
3323 cat >> confdefs.h <<\EOF
3324 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3328 esac
3332 *-darwin*)
3333 cat >> confdefs.h <<\EOF
3334 #define XP_UNIX 1
3337 cat >> confdefs.h <<\EOF
3338 #define DARWIN 1
3341 cat >> confdefs.h <<\EOF
3342 #define HAVE_BSD_FLOCK 1
3345 cat >> confdefs.h <<\EOF
3346 #define HAVE_SOCKLEN_T 1
3349 AS='$(CC) -x assembler-with-cpp'
3350 CFLAGS="$CFLAGS -Wall -fno-common"
3351 case "${target_cpu}" in
3352 i*86*)
3353 if test -n "$USE_64"; then
3354 CPU_ARCH=x86_64
3355 CC="$CC -arch x86_64"
3356 else
3357 CPU_ARCH=i386
3361 CPU_ARCH=ppc
3363 esac
3364 DSO_CFLAGS=-fPIC
3365 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3366 _OPTIMIZE_FLAGS=-O2
3367 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3368 STRIP="$STRIP -x -S"
3369 DLL_SUFFIX=dylib
3370 USE_PTHREADS=1
3371 MDCPUCFG_H=_darwin.cfg
3372 PR_MD_CSRCS=darwin.c
3373 PR_MD_ASFILES=os_Darwin.s
3375 # Add Mac OS X support for loading CFM & CFBundle plugins
3376 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3377 cat >> confdefs.h <<\EOF
3378 #define XP_MACOSX 1
3381 OS_TARGET=MacOSX
3383 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3384 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3385 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3386 case "${target_cpu}" in
3387 powerpc*)
3388 export MACOSX_DEPLOYMENT_TARGET=10.2
3390 i*86*)
3391 export MACOSX_DEPLOYMENT_TARGET=10.4
3393 esac
3397 if test "$MACOS_SDK_DIR"; then
3399 if test ! -d "$MACOS_SDK_DIR"; then
3400 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3401 specify a valid SDK. SDKs are installed when the optional cross-development
3402 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3406 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3407 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3408 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3410 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3411 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3412 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3413 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3414 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3417 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3419 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3421 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3424 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3426 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3427 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}"
3428 else
3429 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3432 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3433 export NEXT_ROOT=$MACOS_SDK_DIR
3435 if test -n "$CROSS_COMPILE" ; then
3436 HOST_CC="NEXT_ROOT= $HOST_CC"
3437 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3439 else
3440 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3442 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3444 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3445 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3446 else
3447 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3454 *-dgux*)
3455 cat >> confdefs.h <<\EOF
3456 #define XP_UNIX 1
3459 cat >> confdefs.h <<\EOF
3460 #define _PR_LOCAL_THREADS_ONLY 1
3463 cat >> confdefs.h <<\EOF
3464 #define SVR4 1
3467 cat >> confdefs.h <<\EOF
3468 #define SYSV 1
3471 cat >> confdefs.h <<\EOF
3472 #define DGUX 1
3475 cat >> confdefs.h <<\EOF
3476 #define _DGUX_SOURCE 1
3479 cat >> confdefs.h <<\EOF
3480 #define _POSIX4A_DRAFT6_SOURCE 1
3483 DSO_LDOPTS=-G
3484 _OPTIMIZE_FLAGS=-O2
3485 _DEBUG_FLAGS=
3486 MDCPUCFG_H=_dgux.cfg
3487 PR_MD_CSRCS=dgux.c
3490 *-freebsd*)
3491 if test -z "$USE_NSPR_THREADS"; then
3492 USE_PTHREADS=1
3494 cat >> confdefs.h <<\EOF
3495 #define XP_UNIX 1
3498 cat >> confdefs.h <<\EOF
3499 #define FREEBSD 1
3502 cat >> confdefs.h <<\EOF
3503 #define HAVE_BSD_FLOCK 1
3506 cat >> confdefs.h <<\EOF
3507 #define HAVE_SOCKLEN_T 1
3510 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3511 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
3512 if test "$MOZ_OBJFORMAT" = "elf"; then
3513 DLL_SUFFIX=so
3514 else
3515 DLL_SUFFIX=so.1.0
3517 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3518 DSO_CFLAGS=-fPIC
3519 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3520 MDCPUCFG_H=_freebsd.cfg
3521 PR_MD_CSRCS=freebsd.c
3524 *-hpux*)
3525 cat >> confdefs.h <<\EOF
3526 #define XP_UNIX 1
3529 cat >> confdefs.h <<\EOF
3530 #define HPUX 1
3533 cat >> confdefs.h <<\EOF
3534 #define _HPUX_SOURCE 1
3537 # OSF1 and HPUX report the POLLHUP event for a socket when the
3538 # shutdown(SHUT_WR) operation is called for the remote end, even though
3539 # the socket is still writeable. Use select(), instead of poll(), to
3540 # workaround this problem.
3541 cat >> confdefs.h <<\EOF
3542 #define _PR_POLL_WITH_SELECT 1
3545 cat >> confdefs.h <<\EOF
3546 #define _USE_BIG_FDS 1
3549 DSO_LDOPTS='-b +h $(notdir $@)'
3550 PR_MD_CSRCS=hpux.c
3551 if test "$OS_TEST" = "ia64"; then
3552 DLL_SUFFIX=so
3553 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
3554 CPU_ARCH_TAG=_$OS_TEST
3555 if test -z "$USE_64"; then
3556 COMPILER_TAG=_32
3558 PR_MD_ASFILES=os_HPUX_ia64.s
3559 else
3560 cat >> confdefs.h <<\EOF
3561 #define hppa 1
3564 DLL_SUFFIX=sl
3565 PR_MD_ASFILES=os_HPUX.s
3567 if test -n "$USE_64"; then
3568 MDCPUCFG_H=_hpux64.cfg
3569 else
3570 MDCPUCFG_H=_hpux32.cfg
3572 if test -z "$GNU_CC"; then
3573 CC="$CC -Ae"
3574 CXX="$CXX -ext"
3575 DSO_CFLAGS=+Z
3576 else
3577 DSO_CFLAGS=-fPIC
3580 if test -n "$MOZILLA_CLIENT"; then
3581 DEFAULT_IMPL_STRATEGY=_EMU
3584 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
3585 cat >> confdefs.h <<\EOF
3586 #define _PR_NEED_H_ERRNO 1
3589 cat >> confdefs.h <<\EOF
3590 #define HPUX9 1
3593 DEFAULT_IMPL_STRATEGY=_EMU
3594 USE_NSPR_THREADS=1
3597 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
3598 cat >> confdefs.h <<\EOF
3599 #define _PR_NO_LARGE_FILES 1
3604 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3605 cat >> confdefs.h <<\EOF
3606 #define _PR_NEED_H_ERRNO 1
3611 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3612 cat >> confdefs.h <<\EOF
3613 #define HAVE_INT_LOCALTIME_R 1
3618 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
3619 cat >> confdefs.h <<\EOF
3620 #define HAVE_POINTER_LOCALTIME_R 1
3625 # HP-UX 11i v2 (B.11.23) or higher
3627 case "$OS_RELEASE" in
3628 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
3629 USE_IPV6=1
3631 esac
3634 if test "$OS_RELEASE" = "B.10.01"; then
3635 cat >> confdefs.h <<\EOF
3636 #define HPUX10 1
3639 DEFAULT_IMPL_STRATEGY=_EMU
3642 if test "$OS_RELEASE" = "B.10.10"; then
3643 cat >> confdefs.h <<\EOF
3644 #define HPUX10 1
3647 cat >> confdefs.h <<\EOF
3648 #define HPUX10_10 1
3651 DEFAULT_IMPL_STRATEGY=_PTH
3654 if test "$OS_RELEASE" = "B.10.20"; then
3655 cat >> confdefs.h <<\EOF
3656 #define HPUX10 1
3659 cat >> confdefs.h <<\EOF
3660 #define HPUX10_20 1
3663 if test -z "$GNU_CC"; then
3664 CFLAGS="$CFLAGS +DAportable +DS1.1"
3665 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3667 DEFAULT_IMPL_STRATEGY=_PTH
3670 if test "$OS_RELEASE" = "B.10.30"; then
3671 cat >> confdefs.h <<\EOF
3672 #define HPUX10 1
3675 cat >> confdefs.h <<\EOF
3676 #define HPUX10_30 1
3679 if test -z "$GNU_CC"; then
3680 CFLAGS="$CFLAGS +DAportable +DS1.1"
3681 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3683 DEFAULT_IMPL_STRATEGY=_PTH
3686 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
3687 cat >> confdefs.h <<\EOF
3688 #define HPUX10 1
3691 cat >> confdefs.h <<\EOF
3692 #define HPUX11 1
3695 cat >> confdefs.h <<\EOF
3696 #define _LARGEFILE64_SOURCE 1
3699 cat >> confdefs.h <<\EOF
3700 #define _PR_HAVE_OFF64_T 1
3703 cat >> confdefs.h <<\EOF
3704 #define HAVE_FCNTL_FILE_LOCKING 1
3707 if test -z "$GNU_CC"; then
3708 if test -z "$USE_64"; then
3709 if test "$OS_TEST" = "ia64"; then
3710 CFLAGS="$CFLAGS +DD32"
3711 CXXFLAGS="$CXXFLAGS +DD32"
3712 else
3713 CFLAGS="$CFLAGS +DAportable +DS2.0"
3714 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
3716 else
3717 if test "$OS_TEST" = "ia64"; then
3718 CFLAGS="$CFLAGS +DD64"
3719 CXXFLAGS="$CXXFLAGS +DD64"
3720 else
3721 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
3722 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
3726 DEFAULT_IMPL_STRATEGY=_PTH
3729 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
3730 USE_NSPR_THREADS=1
3731 USE_PTHREADS=
3732 USE_USER_PTHREADS=
3733 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
3734 USE_PTHREADS=1
3735 if test "$USE_NSPR_THREADS"; then
3736 USE_PTHREADS=
3738 if test "$USE_USER_PTHREADS"; then
3739 USE_PTHREADS=
3744 *-irix*)
3745 cat >> confdefs.h <<\EOF
3746 #define XP_UNIX 1
3749 cat >> confdefs.h <<\EOF
3750 #define IRIX 1
3753 cat >> confdefs.h <<\EOF
3754 #define SVR4 1
3757 cat >> confdefs.h <<\EOF
3758 #define _SGI_MP_SOURCE 1
3761 cat >> confdefs.h <<\EOF
3762 #define HAVE_FCNTL_FILE_LOCKING 1
3765 PR_MD_CSRCS=irix.c
3766 PR_MD_ASFILES=os_Irix.s
3767 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
3768 STRIP="$STRIP -f"
3769 RESOLVE_LINK_SYMBOLS=1
3770 if test -n "$USE_64"; then
3771 MDCPUCFG_H=_irix64.cfg
3772 else
3773 MDCPUCFG_H=_irix32.cfg
3775 case "${target_os}" in
3776 irix6*)
3777 cat >> confdefs.h <<\EOF
3778 #define IRIX6 1
3781 USE_PTHREADS=1
3782 USE_N32=1
3783 COMPILER_TAG=_n32
3784 IMPL_STRATEGY=_PTH
3786 irix5*)
3787 cat >> confdefs.h <<\EOF
3788 #define IRIX5 1
3791 USE_NSPR_THREADS=1
3794 USE_PTHREADS=1
3795 USE_N32=1
3797 esac
3798 if test "$GNU_CC"; then
3799 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
3800 CFLAGS="$CFLAGS -Wall -Wno-format"
3801 _OPTIMIZE_FLAGS="-O6"
3802 else
3803 if test -n "$USE_N32"; then
3804 AS='as -D_ASM $(INCLUDES) -n32'
3805 else
3806 AS='as -D_ASM $(INCLUDES)'
3808 CFLAGS="$CFLAGS -fullwarn -xansi"
3809 if test "$USE_N32"; then
3810 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
3811 else
3812 _OPTIMIZE_FLAGS="-O -Olimit 4000"
3814 if test "$USE_MDUPDATE"; then
3815 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
3817 case "${target}" in
3818 *-irix6.*)
3819 CFLAGS="$CFLAGS -multigot"
3820 DSO_LDOPTS="-no_unresolved"
3821 if test "$USE_N32"; then
3822 CFLAGS="$CFLAGS -n32 -woff 1209"
3823 DSO_LDOPTS="$DSO_LDOPTS -n32"
3824 else
3825 if test "$USE_64"; then
3826 CFLAGS="$CFLAGS -64"
3827 else
3828 CFLAGS="$CFLAGS -32"
3833 CFLAGS="$CFLAGS -xgot"
3835 esac
3837 if test "${target_os}" = "irix5.3"; then
3838 cat >> confdefs.h <<\EOF
3839 #define IRIX5_3 1
3843 case "${target_os}" in
3844 irix6.5)
3845 if test -z "$GNU_CC"; then
3846 CFLAGS="$CFLAGS -mips3"
3848 cat >> confdefs.h <<\EOF
3849 #define _PR_HAVE_GETPROTO_R 1
3852 cat >> confdefs.h <<\EOF
3853 #define _PR_HAVE_GETPROTO_R_POINTER 1
3856 cat >> confdefs.h <<\EOF
3857 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
3861 irix5*)
3864 cat >> confdefs.h <<\EOF
3865 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
3869 esac
3872 *-linux*|*-gnu*|*-k*bsd*-gnu)
3873 if test -z "$USE_NSPR_THREADS"; then
3874 USE_PTHREADS=1
3875 IMPL_STRATEGY=_PTH
3877 cat >> confdefs.h <<\EOF
3878 #define XP_UNIX 1
3881 cat >> confdefs.h <<\EOF
3882 #define _GNU_SOURCE 1
3885 cat >> confdefs.h <<\EOF
3886 #define HAVE_FCNTL_FILE_LOCKING 1
3889 case "${target_os}" in
3890 linux*)
3891 cat >> confdefs.h <<\EOF
3892 #define LINUX 1
3896 esac
3897 CFLAGS="$CFLAGS -Wall"
3898 CXXFLAGS="$CXXFLAGS -Wall"
3899 MDCPUCFG_H=_linux.cfg
3900 PR_MD_CSRCS=linux.c
3901 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3902 DSO_CFLAGS=-fPIC
3903 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3904 _OPTIMIZE_FLAGS=-O2
3905 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
3906 # combo is not yet good at debugging inlined
3907 # functions (even when using DWARF2 as the
3908 # debugging format)
3909 COMPILER_TAG=_glibc
3910 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3911 CPU_ARCH=x86
3912 else
3913 CPU_ARCH=$OS_TEST
3915 CPU_ARCH_TAG=_${CPU_ARCH}
3916 case "${target_cpu}" in
3917 alpha)
3918 cat >> confdefs.h <<\EOF
3919 #define _ALPHA_ 1
3922 cat >> confdefs.h <<\EOF
3923 #define __alpha 1
3926 CFLAGS="$CFLAGS -mieee"
3927 CXXFLAGS="$CXXFLAGS -mieee"
3929 i*86)
3930 cat >> confdefs.h <<\EOF
3931 #define i386 1
3934 PR_MD_ASFILES=os_Linux_x86.s
3936 ia64)
3937 PR_MD_ASFILES=os_Linux_ia64.s
3939 x86_64)
3940 if test -n "$USE_64"; then
3941 PR_MD_ASFILES=os_Linux_x86_64.s
3942 else
3943 cat >> confdefs.h <<\EOF
3944 #define i386 1
3947 PR_MD_ASFILES=os_Linux_x86.s
3948 CC="$CC -m32"
3949 CXX="$CXX -m32"
3952 ppc|powerpc)
3953 PR_MD_ASFILES=os_Linux_ppc.s
3955 powerpc64)
3956 if test -n "$USE_64"; then
3957 CC="$CC -m64"
3958 CXX="$CXX -m64"
3959 else
3960 PR_MD_ASFILES=os_Linux_ppc.s
3963 m68k)
3964 CFLAGS="$CFLAGS -m68020-60"
3965 CXXFLAGS="$CXXFLAGS -m68020-60"
3967 esac
3970 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
3971 cat >> confdefs.h <<\EOF
3972 #define XP_PC 1
3975 cat >> confdefs.h <<\EOF
3976 #define WIN32 1
3979 PR_MD_ARCH_DIR=windows
3980 RESOLVE_LINK_SYMBOLS=1
3982 if test -n "$GNU_CC"; then
3983 CC="$CC -mno-cygwin"
3984 CXX="$CXX -mno-cygwin"
3985 DLL_SUFFIX=dll
3986 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
3987 RC=$WINDRES
3988 # Use temp file for windres (bug 213281)
3989 RCFLAGS='-O coff --use-temp-file'
3990 else
3991 CC=cl
3992 CXX=cl
3993 LD=link
3994 AR='lib -NOLOGO -OUT:"$@"'
3995 AR_FLAGS=
3996 RANLIB='echo not_ranlib'
3997 STRIP='echo not_strip'
3998 RC=rc.exe
3999 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4000 OBJ_SUFFIX=obj
4001 LIB_SUFFIX=lib
4002 DLL_SUFFIX=dll
4004 # Determine compiler version
4005 CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
4006 _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
4007 _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
4008 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4010 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4011 # tape manipulation utility (or something else)
4012 if test "$MSC_VER" -ge "1400"; then
4014 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4017 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4018 if test -n "$MSMT_TOOL"; then
4019 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4020 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4021 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4023 MT=mt
4024 unset MSMT_TOOL
4025 else
4026 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4030 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4031 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4032 _DEBUG_FLAGS=-Z7
4033 _OPTIMIZE_FLAGS=-O2
4034 if test -z "$MOZ_OPTIMIZE"; then
4035 CFLAGS="$CFLAGS -Od"
4038 if test -n "$USE_DEBUG_RTL"; then
4039 CFLAGS="$CFLAGS -MDd"
4040 else
4041 CFLAGS="$CFLAGS -MD"
4044 if test -n "$MOZ_DEBUG"; then
4045 cat >> confdefs.h <<\EOF
4046 #define _DEBUG 1
4049 else
4050 DEFINES="$DEFINES -U_DEBUG"
4053 if test -n "$MOZ_OPTIMIZE"; then
4054 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4055 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
4056 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4057 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4061 if test -n "$MOZ_DEBUG"; then
4062 DLLFLAGS="$DLLFLAGS -DEBUG"
4063 LDFLAGS="$LDFLAGS -DEBUG"
4066 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4067 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4068 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4071 if test "$OS_TARGET" = "WINNT"; then
4072 CFLAGS="$CFLAGS -GT"
4073 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4074 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4075 else
4076 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4077 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4079 fi # GNU_CC
4081 if test -n "$USE_STATIC_TLS"; then
4082 cat >> confdefs.h <<\EOF
4083 #define _PR_USE_STATIC_TLS 1
4088 if test "$OS_TARGET" = "WINNT"; then
4089 cat >> confdefs.h <<\EOF
4090 #define WINNT 1
4093 else
4094 cat >> confdefs.h <<\EOF
4095 #define WIN95 1
4098 # undefine WINNT as some versions of mingw gcc define it by default
4099 DEFINES="$DEFINES -UWINNT"
4100 cat >> confdefs.h <<\EOF
4101 #define _PR_GLOBAL_THREADS_ONLY 1
4106 if test "$CPU_ARCH" = "x86"; then
4107 CPU_ARCH_TAG=
4108 else
4109 CPU_ARCH_TAG=$CPU_ARCH
4112 if test -n "$USE_DEBUG_RTL"; then
4113 OBJDIR_SUFFIX=OBJD
4116 case "$OS_TARGET" in
4117 WINNT)
4118 MDCPUCFG_H=_winnt.cfg
4120 WIN95)
4121 MDCPUCFG_H=_win95.cfg
4124 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4126 esac
4128 case "$target_cpu" in
4129 i*86)
4130 if test -n "$USE_64"; then
4131 cat >> confdefs.h <<\EOF
4132 #define _AMD64_ 1
4135 else
4136 cat >> confdefs.h <<\EOF
4137 #define _X86_ 1
4142 x86_64)
4143 cat >> confdefs.h <<\EOF
4144 #define _AMD64_ 1
4147 USE_64=1
4149 ia64)
4150 cat >> confdefs.h <<\EOF
4151 #define _IA64_ 1
4154 USE_64=1
4157 cat >> confdefs.h <<\EOF
4158 #define _CPU_ARCH_NOT_DEFINED 1
4162 esac
4165 *-wince*|*-winmo*)
4166 cat >> confdefs.h <<\EOF
4167 #define XP_PC 1
4170 cat >> confdefs.h <<\EOF
4171 #define WIN32 1
4174 cat >> confdefs.h <<\EOF
4175 #define WINCE 1
4178 cat >> confdefs.h <<\EOF
4179 #define _PR_GLOBAL_THREADS_ONLY 1
4183 AR='lib -NOLOGO -OUT:"$@"'
4184 AR_FLAGS=
4186 OBJ_SUFFIX=obj
4187 LIB_SUFFIX=lib
4188 DLL_SUFFIX=dll
4189 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4191 PR_MD_ARCH_DIR=windows
4192 RESOLVE_LINK_SYMBOLS=1
4194 MDCPUCFG_H=_win95.cfg
4195 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4196 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4198 DLLFLAGS='-OUT:"$@"'
4199 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4200 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4201 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4202 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4204 _DEBUG_FLAGS=-Zi
4205 _OPTIMIZE_FLAGS=-O2
4208 *-ncr-sysv*)
4209 cat >> confdefs.h <<\EOF
4210 #define XP_UNIX 1
4213 cat >> confdefs.h <<\EOF
4214 #define SVR4 1
4217 cat >> confdefs.h <<\EOF
4218 #define SYSV 1
4221 cat >> confdefs.h <<\EOF
4222 #define NCR 1
4225 USE_NSPR_THREADS=1
4226 if test "$OS_RELEASE" = "2.03"; then
4227 cat >> confdefs.h <<\EOF
4228 #define _PR_STAT_HAS_ST_ATIM 1
4231 else
4232 cat >> confdefs.h <<\EOF
4233 #define _PR_STAT_HAS_ST_ATIM_UNION 1
4238 if test -z "$GNU_CC"; then
4239 CFLAGS="$CFLAGS -Hnocopyr"
4240 CXXFLAGS="$CXXFLAGS -Hnocopyr"
4241 else
4242 CFLAGS="$CFLAGS -fPIC -Wall"
4243 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
4244 DSO_LDOPTS=-G
4246 MDCPUCFG_H=_ncr.cfg
4247 PR_MD_CSRCS=ncr.c
4250 mips-nec-sysv*)
4251 cat >> confdefs.h <<\EOF
4252 #define XP_UNIX 1
4255 cat >> confdefs.h <<\EOF
4256 #define SVR4 1
4259 cat >> confdefs.h <<\EOF
4260 #define __SVR4 1
4263 cat >> confdefs.h <<\EOF
4264 #define NEC 1
4267 cat >> confdefs.h <<\EOF
4268 #define nec_ews 1
4271 USE_NSPR_THREADS=1
4272 if test -z "$GNU_CC"; then
4273 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
4274 CXX=g++
4276 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
4277 DSO_LDOPTS=-G
4278 MDCPUCFG_H=_nec.cfg
4279 PR_MD_CSRCS=nec.c
4282 *-netbsd*)
4283 cat >> confdefs.h <<\EOF
4284 #define XP_UNIX 1
4287 cat >> confdefs.h <<\EOF
4288 #define NETBSD 1
4291 cat >> confdefs.h <<\EOF
4292 #define HAVE_BSD_FLOCK 1
4295 if test -z "$USE_NSPR_THREADS"; then
4296 USE_PTHREADS=1
4298 MDCPUCFG_H=_netbsd.cfg
4299 PR_MD_CSRCS=netbsd.c
4301 DSO_CFLAGS='-fPIC -DPIC'
4302 CFLAGS="$CFLAGS -ansi -Wall"
4303 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4304 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4306 if test -z "$OBJECT_FMT"; then
4307 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4308 OBJECT_FMT=a.out
4309 DLL_SUFFIX=so.1.0
4310 DSO_LDOPTS='-shared'
4311 else
4312 OBJECT_FMT=ELF
4313 DLL_SUFFIX=so
4314 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4318 if test "$LIBRUNPATH"; then
4319 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4323 mips-sony-newsos*)
4324 cat >> confdefs.h <<\EOF
4325 #define XP_UNIX 1
4328 cat >> confdefs.h <<\EOF
4329 #define SONY 1
4332 cat >> confdefs.h <<\EOF
4333 #define SYSV 1
4336 cat >> confdefs.h <<\EOF
4337 #define SVR4 1
4340 cat >> confdefs.h <<\EOF
4341 #define __svr4 1
4344 cat >> confdefs.h <<\EOF
4345 #define __svr4__ 1
4348 cat >> confdefs.h <<\EOF
4349 #define HAVE_SVID_GETTOD 1
4352 USE_NSPR_THREADS=1
4353 CFLAGS="$CFLAGS -Xa -fullwarn"
4354 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4355 DSO_LDOPTS=-G
4356 MDCPUCFG_H=_sony.cfg
4357 PR_MD_CSRCS=sony.c
4360 *-nextstep*|*-openstep*)
4361 cat >> confdefs.h <<\EOF
4362 #define XP_UNIX 1
4365 cat >> confdefs.h <<\EOF
4366 #define NEXTSTEP 1
4369 cat >> confdefs.h <<\EOF
4370 #define HAVE_BSD_FLOCK 1
4373 cat >> confdefs.h <<\EOF
4374 #define _POSIX_SOURCE 1
4377 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4378 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4379 USE_NSPR_THREADS=1
4380 DLL_SUFFIX=dylib
4381 MDCPUCFG_H=_nextstep.cfg
4382 PR_MD_CSRCS=nextstep.c
4386 *-nto*)
4387 cat >> confdefs.h <<\EOF
4388 #define XP_UNIX 1
4391 cat >> confdefs.h <<\EOF
4392 #define NTO 1
4395 cat >> confdefs.h <<\EOF
4396 #define _QNX_SOURCE 1
4399 cat >> confdefs.h <<\EOF
4400 #define HAVE_POINTER_LOCALTIME_R 1
4403 MDCPUCFG_H=_nto.cfg
4404 PR_MD_CSRCS=nto.c
4405 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4406 DSO_CFLAGS=-fPIC
4407 DSO_LDOPTS=-shared
4408 OS_LIBS="$OS_LIBS -lsocket"
4409 _OPTIMIZE_FLAGS="-O1"
4410 _DEBUG_FLAGS="-gstabs"
4413 *-openbsd*)
4414 cat >> confdefs.h <<\EOF
4415 #define XP_UNIX 1
4418 cat >> confdefs.h <<\EOF
4419 #define OPENBSD 1
4422 cat >> confdefs.h <<\EOF
4423 #define HAVE_BSD_FLOCK 1
4426 cat >> confdefs.h <<\EOF
4427 #define HAVE_SOCKLEN_T 1
4430 CFLAGS="$CFLAGS -ansi -Wall"
4431 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4432 DLL_SUFFIX=so.1.0
4433 DSO_CFLAGS=-fPIC
4434 MDCPUCFG_H=_openbsd.cfg
4435 PR_MD_CSRCS=openbsd.c
4436 OS_LIBS="-lc"
4437 if test -z "$USE_NSPR_THREADS"; then
4438 USE_PTHREADS=1
4440 DSO_LDOPTS='-shared -fPIC'
4441 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4444 *-osf*)
4445 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4446 cat >> confdefs.h <<\EOF
4447 #define XP_UNIX 1
4450 cat >> confdefs.h <<\EOF
4451 #define OSF1 1
4454 cat >> confdefs.h <<\EOF
4455 #define _REENTRANT 1
4458 # OSF1 and HPUX report the POLLHUP event for a socket when the
4459 # shutdown(SHUT_WR) operation is called for the remote end, even though
4460 # the socket is still writeable. Use select(), instead of poll(), to
4461 # workaround this problem.
4462 cat >> confdefs.h <<\EOF
4463 #define _PR_POLL_WITH_SELECT 1
4467 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4468 USE_NSPR_THREADS=1
4471 if test -z "$GNU_CC"; then
4472 CC="$CC -std1 -ieee_with_inexact"
4473 if test "$OS_RELEASE" != "V2.0"; then
4474 CC="$CC -readonly_strings"
4476 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4477 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4478 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4479 echo "configure:4480: checking for machine/builtins.h" >&5
4480 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4481 echo $ac_n "(cached) $ac_c" 1>&6
4482 else
4483 cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4486 #include <machine/builtins.h>
4488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4489 { (eval echo configure:4490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4491 if test -z "$ac_err"; then
4492 rm -rf conftest*
4493 eval "ac_cv_header_$ac_safe=yes"
4494 else
4495 echo "$ac_err" >&5
4496 echo "configure: failed program was:" >&5
4497 cat conftest.$ac_ext >&5
4498 rm -rf conftest*
4499 eval "ac_cv_header_$ac_safe=no"
4501 rm -f conftest*
4503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4504 echo "$ac_t""yes" 1>&6
4505 cat >> confdefs.h <<\EOF
4506 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4509 else
4510 echo "$ac_t""no" 1>&6
4513 else
4514 CFLAGS="$CFLAGS -mieee"
4515 CXXFLAGS="$CXXFLAGS -mieee"
4518 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4519 cat >> confdefs.h <<\EOF
4520 #define HAVE_INT_LOCALTIME_R 1
4523 else
4524 cat >> confdefs.h <<\EOF
4525 #define HAVE_FCNTL_FILE_LOCKING 1
4528 cat >> confdefs.h <<\EOF
4529 #define HAVE_POINTER_LOCALTIME_R 1
4533 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4534 cat >> confdefs.h <<\EOF
4535 #define OSF1V4_MAP_PRIVATE_BUG 1
4539 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4540 MDCPUCFG_H=_osf1.cfg
4541 PR_MD_CSRCS=osf1.c
4544 *-qnx*)
4545 cat >> confdefs.h <<\EOF
4546 #define XP_UNIX 1
4549 cat >> confdefs.h <<\EOF
4550 #define QNX 1
4553 cat >> confdefs.h <<\EOF
4554 #define _PR_NEED_H_ERRNO 1
4557 USE_NSPR_THREADS=1
4558 MDCPUCFG_H=_qnx.cfg
4559 PR_MD_CSRCS=qnx.c
4562 *-riscos*)
4563 cat >> confdefs.h <<\EOF
4564 #define XP_UNIX 1
4567 cat >> confdefs.h <<\EOF
4568 #define RISCOS 1
4571 cat >> confdefs.h <<\EOF
4572 #define _PR_NEED_H_ERRNO 1
4575 USE_PTHREADS=1
4576 MDCPUCFG_H=_riscos.cfg
4577 PR_MD_CSRCS=riscos.c
4578 DSO_CFLAGS=-fPIC
4579 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4580 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4583 *-*-sco*)
4584 cat >> confdefs.h <<\EOF
4585 #define XP_UNIX 1
4588 cat >> confdefs.h <<\EOF
4589 #define SCO 1
4592 cat >> confdefs.h <<\EOF
4593 #define sco 1
4596 cat >> confdefs.h <<\EOF
4597 #define SYSV 1
4600 cat >> confdefs.h <<\EOF
4601 #define _SVID3 1
4604 cat >> confdefs.h <<\EOF
4605 #define _PR_NEED_H_ERRNO 1
4608 CC='cc -b elf -KPIC'
4609 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4610 USE_NSPR_THREADS=1
4611 CPU_ARCH=x86
4612 DSO_LDOPTS='-b elf -G'
4613 MDCPUCFG_H=_scoos.cfg
4614 PR_MD_SRCS=scoos.c
4617 *-sinix*)
4618 cat >> confdefs.h <<\EOF
4619 #define XP_UNIX 1
4622 cat >> confdefs.h <<\EOF
4623 #define SVR4 1
4626 cat >> confdefs.h <<\EOF
4627 #define SNI 1
4630 cat >> confdefs.h <<\EOF
4631 #define RELIANTUNIX 1
4634 cat >> confdefs.h <<\EOF
4635 #define sinix 1
4638 cat >> confdefs.h <<\EOF
4639 #define HAVE_SVID_GETTOD 1
4642 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4643 cat >> confdefs.h <<\EOF
4644 #define i386 1
4647 CPU_ARCH=x86
4648 else
4649 CPU_ARCH=mips
4652 if test "$GNU_CC"; then
4653 AS='$(CC) -x assembler-with-cpp'
4654 if test "$CPU_ARCH" = "mips"; then
4655 LD=gld
4657 CFLAGS="$CFLAGS -Wall -Wno-format"
4658 else
4659 AS='/usr/bin/cc'
4660 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4663 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4665 if test "$OS_RELEASE" = "5.43"; then
4666 cat >> confdefs.h <<\EOF
4667 #define IP_MULTICAST 1
4672 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4673 USE_NSPR_THREADS=1
4674 MDCPUCFG_H=_reliantunix.cfg
4675 PR_MD_CSRCS=reliantunix.c
4676 if test "${OS_ARCH}" = "mips"; then
4677 PR_MD_ASFILES=os_ReliantUNIX.s
4681 *-sunos*)
4682 cat >> confdefs.h <<\EOF
4683 #define XP_UNIX 1
4686 cat >> confdefs.h <<\EOF
4687 #define SUNOS4 1
4690 CFLAGS="$CFLAGS -Wall -Wno-format"
4691 if test "$USE_MDUPDATE"; then
4692 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4694 CPU_ARCH=sparc
4695 DLL_SUFFIX=so.1.0
4696 DSO_LDOPTS=
4697 DSO_CFLAGS=-fPIC
4698 USE_NSPR_THREADS=1
4699 if test "$OS_RELEASE" = "4.1.3_U1"; then
4700 _OPTIMIZE_FLAGS=
4701 OS_LIBS="$OS_LIBS -lm"
4703 MDCPUCFG_H=_sunos4.cfg
4704 PR_MD_CSRCS=sunos4.c
4707 *-solaris*)
4708 if test -z "$USE_NSPR_THREADS"; then
4709 USE_PTHREADS=1
4711 cat >> confdefs.h <<\EOF
4712 #define XP_UNIX 1
4715 cat >> confdefs.h <<\EOF
4716 #define SVR4 1
4719 cat >> confdefs.h <<\EOF
4720 #define SYSV 1
4723 cat >> confdefs.h <<\EOF
4724 #define __svr4 1
4727 cat >> confdefs.h <<\EOF
4728 #define __svr4__ 1
4731 cat >> confdefs.h <<\EOF
4732 #define SOLARIS 1
4735 cat >> confdefs.h <<\EOF
4736 #define HAVE_FCNTL_FILE_LOCKING 1
4739 CPU_ARCH=`uname -p`
4740 MDCPUCFG_H=_solaris.cfg
4741 PR_MD_CSRCS=solaris.c
4742 LD=/usr/ccs/bin/ld
4743 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4744 RESOLVE_LINK_SYMBOLS=1
4745 case "${OS_RELEASE}" in
4746 5.8|5.9)
4749 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
4750 USE_B_DIRECT=1
4752 esac
4753 if test -n "$GNU_CC"; then
4754 DSO_CFLAGS=-fPIC
4755 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
4756 GCC_USE_GNU_LD=1
4758 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
4759 if test -n "$USE_B_DIRECT"; then
4760 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
4762 else
4763 DSO_CFLAGS=-KPIC
4764 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
4765 if test -n "$USE_B_DIRECT"; then
4766 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
4769 if test -n "$GNU_CC"; then
4770 CFLAGS="$CFLAGS -Wall"
4771 CXXFLAGS="$CXXFLAGS -Wall"
4772 if test -n "$USE_MDUPDATE"; then
4773 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4774 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
4776 GCC_AS=`$CC -print-prog-name=as`
4777 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
4778 GNU_AS=1
4780 else
4781 CFLAGS="$CFLAGS -xstrconst"
4782 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
4783 if test -z "$MOZ_OPTIMIZE"; then
4784 CFLAGS="$CFLAGS -xs"
4785 CXXFLAGS="$CXXFLAGS -xs"
4787 _OPTIMIZE_FLAGS=-xO4
4789 if test -z "$GNU_AS"; then
4790 ASFLAGS="$ASFLAGS -Wa,-P"
4792 if test -n "$USE_64"; then
4793 if test -n "$GNU_CC"; then
4794 CC="$CC -m64"
4795 CXX="$CXX -m64"
4796 else
4797 if test "$OS_TEST" = "i86pc"; then
4798 CC="$CC -xarch=amd64"
4799 CXX="$CXX -xarch=amd64"
4800 else
4801 CC="$CC -xarch=v9"
4802 CXX="$CXX -xarch=v9"
4806 if test "$OS_TEST" = "i86pc"; then
4807 if test -z "$USE_64"; then
4808 cat >> confdefs.h <<\EOF
4809 #define i386 1
4813 CPU_ARCH_TAG=_$OS_TEST
4814 # The default debug format, DWARF (-g), is not supported by gcc
4815 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
4816 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
4817 # If your gcc uses GNU as, you do not need the -Wa,-s option.
4818 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
4819 _DEBUG_FLAGS=-gstabs
4820 if test -z "$GNU_AS"; then
4821 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
4825 case "${target_os}" in
4826 solaris2.3*)
4827 cat >> confdefs.h <<\EOF
4828 #define _PR_NO_LARGE_FILES 1
4832 solaris2.4*)
4833 cat >> confdefs.h <<\EOF
4834 #define _PR_NO_LARGE_FILES 1
4838 solaris2.5*)
4839 cat >> confdefs.h <<\EOF
4840 #define SOLARIS2_5 1
4845 cat >> confdefs.h <<\EOF
4846 #define _PR_HAVE_OFF64_T 1
4849 # The lfcompile64(5) man page on Solaris 2.6 says:
4850 # For applications that do not wish to conform to the POSIX or
4851 # X/Open specifications, the 64-bit transitional interfaces
4852 # are available by default. No compile-time flags need to be
4853 # set.
4854 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
4855 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
4856 if test -n "$GNU_CC"; then
4857 cat >> confdefs.h <<\EOF
4858 #define _LARGEFILE64_SOURCE 1
4863 esac
4864 case "${target_os}" in
4865 solaris2.3*)
4867 solaris2.4*)
4869 solaris2.5*)
4871 solaris2.6*)
4873 solaris2.7*)
4876 # Solaris 8 or higher has IPv6.
4877 cat >> confdefs.h <<\EOF
4878 #define _PR_INET6 1
4882 esac
4883 if test "$CPU_ARCH" = "sparc"; then
4884 # 64-bit Solaris SPARC requires V9 architecture, so the following
4885 # is not needed.
4886 if test -z "$USE_64"; then
4887 ULTRASPARC_LIBRARY=nspr_flt
4890 # Purify requires that binaries linked against nspr also
4891 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
4892 _rev=`uname -r`
4893 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
4894 OS_LIBS="$OS_LIBS $_librt"
4897 *-sco-sysv5*)
4898 cat >> confdefs.h <<\EOF
4899 #define XP_UNIX 1
4902 cat >> confdefs.h <<\EOF
4903 #define UNIXWARE 1
4906 cat >> confdefs.h <<\EOF
4907 #define SVR4 1
4910 cat >> confdefs.h <<\EOF
4911 #define SYSV 1
4914 USE_NSPR_THREADS=1
4915 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
4916 cat >> confdefs.h <<\EOF
4917 #define _PR_NO_LARGE_FILES 1
4920 CC='$(NSDEPTH)/build/hcc cc'
4921 CXX='$(NSDEPTH)/build/hcpp CC'
4922 MDCPUCFG_H=_unixware.cfg
4923 else
4924 cat >> confdefs.h <<\EOF
4925 #define _LARGEFILE64_SOURCE 1
4928 cat >> confdefs.h <<\EOF
4929 #define _PR_HAVE_OFF64_T 1
4932 cat >> confdefs.h <<\EOF
4933 #define _PR_HAVE_SOCKADDR_LEN 1
4936 MDCPUCFG_H=_unixware7.cfg
4938 PR_MD_CSRCS=unixware.c
4939 DSO_LDOPTS=-G
4940 CPU_ARCH=x86
4943 *-symbian*)
4944 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
4945 if test "${with_symbian_sdk+set}" = set; then
4946 withval="$with_symbian_sdk"
4947 SYMBIAN_SDK_DIR=$withval
4951 echo -----------------------------------------------------------------------------
4952 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
4953 echo -----------------------------------------------------------------------------
4955 cat >> confdefs.h <<\EOF
4956 #define XP_UNIX 1
4959 cat >> confdefs.h <<\EOF
4960 #define SYMBIAN 1
4963 cat >> confdefs.h <<\EOF
4964 #define __arm__ 1
4967 cat >> confdefs.h <<\EOF
4968 #define __SYMBIAN32__ 1
4971 cat >> confdefs.h <<\EOF
4972 #define _UNICODE 1
4975 cat >> confdefs.h <<\EOF
4976 #define NDEBUG 1
4979 cat >> confdefs.h <<\EOF
4980 #define __SUPPORT_CPP_EXCEPTIONS__ 1
4983 cat >> confdefs.h <<\EOF
4984 #define MOZ_STDERR_TO_STDOUT 1
4987 cat >> confdefs.h <<\EOF
4988 #define HAVE_FCNTL_FILE_LOCKING 1
4991 cat >> confdefs.h <<\EOF
4992 #define HAVE_SOCKLEN_T 1
4995 USE_PTHREADS=1
4996 LIB_SUFFIX=lib
4997 DLL_SUFFIX=dll
4998 MKSHLIB=
4999 DSO_LDOPTS=
5000 DSO_CFLAGS=
5001 VISIBILITY_FLAGS=
5002 MDCPUCFG_H=_symbian.cfg
5003 PR_MD_CSRCS=symbian.c
5004 NSINSTALL=nsinstall
5005 RANLIB='echo no ranlib '
5006 CPU_ARCH=ARM
5007 OS_ARCH=SYMBIAN
5008 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5009 CFLAGS="$CFLAGS -MD -nostdinc"
5010 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5011 echo -------------------------------------------------------
5012 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5013 echo -------------------------------------------------------
5014 case "$OS_TARGET" in
5015 WINSCW)
5016 CC=mwccsym2.exe
5017 CXX=mwccsym2.exe
5018 LD=mwldsym2.exe
5019 AR=mwldsym2.exe
5020 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5021 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)"
5022 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5023 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5024 cat >> confdefs.h <<\EOF
5025 #define _DEBUG 1
5028 cat >> confdefs.h <<\EOF
5029 #define __CW32__ 1
5032 cat >> confdefs.h <<\EOF
5033 #define __WINS__ 1
5036 cat >> confdefs.h <<\EOF
5037 #define __WINSCW__ 1
5040 DEFINES="$DEFINES -U_WIN32"
5042 GCCE)
5043 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5044 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5045 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5046 cat >> confdefs.h <<\EOF
5047 #define __GCCE__ 1
5050 cat >> confdefs.h <<\EOF
5051 #define __EABI__ 1
5054 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5057 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5059 esac
5060 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5063 *-os2*)
5064 cat >> confdefs.h <<\EOF
5065 #define XP_OS2 1
5068 cat >> confdefs.h <<\EOF
5069 #define XP_PC 1
5072 cat >> confdefs.h <<\EOF
5073 #define BSD_SELECT 1
5076 cat >> confdefs.h <<\EOF
5077 #define TCPV40HDRS 1
5080 LIB_SUFFIX=lib
5081 DLL_SUFFIX=dll
5082 RC=rc.exe
5083 PR_MD_ARCH_DIR=os2
5084 PROG_SUFFIX=.exe
5085 NSINSTALL=nsinstall
5086 MDCPUCFG_H=_os2.cfg
5087 RESOLVE_LINK_SYMBOLS=1
5089 cat >> confdefs.h <<\EOF
5090 #define OS2 1
5093 AR=emxomfar
5094 AR_FLAGS='r $@'
5095 CFLAGS="$CFLAGS -Wall -Zomf"
5096 CXXFLAGS="$CFLAGS -Wall -Zomf"
5097 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5098 DSO_CFLAGS=
5099 DSO_LDOPTS='-Zomf -Zdll'
5100 LDFLAGS='-Zmap'
5101 _OPTIMIZE_FLAGS="-O2 -s"
5102 _DEBUG_FLAGS="-g -fno-inline"
5103 if test -n "$MOZ_OPTIMIZE"; then
5104 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5106 IMPLIB='emximp -o'
5107 FILTER='emxexp -o'
5108 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5109 LDFLAGS="$LDFLAGS -Zhigh-mem"
5110 cat >> confdefs.h <<\EOF
5111 #define MOZ_OS2_HIGH_MEMORY 1
5116 # GCC for OS/2 currently predefines these, but we don't want them
5117 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5121 cat >> confdefs.h <<\EOF
5122 #define XP_UNIX 1
5127 esac
5129 if test -z "$SKIP_LIBRARY_CHECKS"; then
5133 case $target in
5134 *-darwin*|*-beos*|*-os2*)
5137 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5138 echo "configure:5139: checking for dlopen in -ldl" >&5
5139 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5140 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5141 echo $ac_n "(cached) $ac_c" 1>&6
5142 else
5143 ac_save_LIBS="$LIBS"
5144 LIBS="-ldl $LIBS"
5145 cat > conftest.$ac_ext <<EOF
5146 #line 5147 "configure"
5147 #include "confdefs.h"
5148 /* Override any gcc2 internal prototype to avoid an error. */
5149 /* We use char because int might match the return type of a gcc2
5150 builtin and then its argument prototype would still apply. */
5151 char dlopen();
5153 int main() {
5154 dlopen()
5155 ; return 0; }
5157 if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5158 rm -rf conftest*
5159 eval "ac_cv_lib_$ac_lib_var=yes"
5160 else
5161 echo "configure: failed program was:" >&5
5162 cat conftest.$ac_ext >&5
5163 rm -rf conftest*
5164 eval "ac_cv_lib_$ac_lib_var=no"
5166 rm -f conftest*
5167 LIBS="$ac_save_LIBS"
5170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5171 echo "$ac_t""yes" 1>&6
5172 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5173 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5174 echo "configure:5175: checking for dlfcn.h" >&5
5175 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5176 echo $ac_n "(cached) $ac_c" 1>&6
5177 else
5178 cat > conftest.$ac_ext <<EOF
5179 #line 5180 "configure"
5180 #include "confdefs.h"
5181 #include <dlfcn.h>
5183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5184 { (eval echo configure:5185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5186 if test -z "$ac_err"; then
5187 rm -rf conftest*
5188 eval "ac_cv_header_$ac_safe=yes"
5189 else
5190 echo "$ac_err" >&5
5191 echo "configure: failed program was:" >&5
5192 cat conftest.$ac_ext >&5
5193 rm -rf conftest*
5194 eval "ac_cv_header_$ac_safe=no"
5196 rm -f conftest*
5198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5199 echo "$ac_t""yes" 1>&6
5200 OS_LIBS="-ldl $OS_LIBS"
5201 else
5202 echo "$ac_t""no" 1>&6
5205 else
5206 echo "$ac_t""no" 1>&6
5210 esac
5215 if test $ac_cv_prog_gcc = yes; then
5216 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5217 echo "configure:5218: checking whether ${CC-cc} needs -traditional" >&5
5218 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5219 echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221 ac_pattern="Autoconf.*'x'"
5222 cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225 #include <sgtty.h>
5226 Autoconf TIOCGETP
5228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5229 egrep "$ac_pattern" >/dev/null 2>&1; then
5230 rm -rf conftest*
5231 ac_cv_prog_gcc_traditional=yes
5232 else
5233 rm -rf conftest*
5234 ac_cv_prog_gcc_traditional=no
5236 rm -f conftest*
5239 if test $ac_cv_prog_gcc_traditional = no; then
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 #include <termio.h>
5244 Autoconf TCGETA
5246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5247 egrep "$ac_pattern" >/dev/null 2>&1; then
5248 rm -rf conftest*
5249 ac_cv_prog_gcc_traditional=yes
5251 rm -f conftest*
5256 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5257 if test $ac_cv_prog_gcc_traditional = yes; then
5258 CC="$CC -traditional"
5262 for ac_func in lchown strerror
5264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5265 echo "configure:5266: checking for $ac_func" >&5
5266 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5267 echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269 cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 /* System header to define __stub macros and hopefully few prototypes,
5273 which can conflict with char $ac_func(); below. */
5274 #include <assert.h>
5275 /* Override any gcc2 internal prototype to avoid an error. */
5276 /* We use char because int might match the return type of a gcc2
5277 builtin and then its argument prototype would still apply. */
5278 char $ac_func();
5280 int main() {
5282 /* The GNU C library defines this for functions which it implements
5283 to always fail with ENOSYS. Some functions are actually named
5284 something starting with __ and the normal name is an alias. */
5285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5286 choke me
5287 #else
5288 $ac_func();
5289 #endif
5291 ; return 0; }
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294 rm -rf conftest*
5295 eval "ac_cv_func_$ac_func=yes"
5296 else
5297 echo "configure: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 rm -rf conftest*
5300 eval "ac_cv_func_$ac_func=no"
5302 rm -f conftest*
5305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5306 echo "$ac_t""yes" 1>&6
5307 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5308 cat >> confdefs.h <<EOF
5309 #define $ac_tr_func 1
5312 else
5313 echo "$ac_t""no" 1>&6
5315 done
5320 # Check whether --enable-strip or --disable-strip was given.
5321 if test "${enable_strip+set}" = set; then
5322 enableval="$enable_strip"
5323 if test "$enableval" = "yes"; then
5324 ENABLE_STRIP=1
5329 case "${target_os}" in
5330 hpux*)
5331 if test -z "$GNU_CC"; then
5333 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5334 echo "configure:5335: checking for +Olit support" >&5
5335 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5336 echo $ac_n "(cached) $ac_c" 1>&6
5337 else
5338 ac_cv_hpux_usable_olit_option=no
5339 rm -f conftest*
5340 echo 'int main() { return 0; }' | cat > conftest.c
5341 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5342 if test $? -eq 0; then
5343 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5344 ac_cv_hpux_usable_olit_option=yes
5347 rm -f conftest*
5351 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5353 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5354 CFLAGS="$CFLAGS +Olit=all"
5355 CXXFLAGS="$CXXFLAGS +Olit=all"
5356 else
5357 CFLAGS="$CFLAGS +ESlit"
5358 CXXFLAGS="$CXXFLAGS +ESlit"
5362 esac
5366 case "$target_os" in
5367 darwin*)
5368 _HAVE_PTHREADS=1
5372 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5373 echo "configure:5374: checking for pthread_create in -lpthreads" >&5
5374 echo "
5375 #include <pthread.h>
5376 void *foo(void *v) { return v; }
5377 int main() {
5378 pthread_t t;
5379 if (!pthread_create(&t, 0, &foo, 0)) {
5380 pthread_join(t, 0);
5382 return 0;
5383 }" > dummy.c ;
5384 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5385 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5386 _res=$? ;
5387 rm -f dummy.c dummy${ac_exeext} ;
5388 if test "$_res" = "0"; then
5389 echo "$ac_t""yes" 1>&6
5390 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5391 else
5392 echo "$ac_t""no" 1>&6
5394 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5395 echo "configure:5396: checking for pthread_create in -lpthread" >&5
5396 echo "
5397 #include <pthread.h>
5398 void *foo(void *v) { return v; }
5399 int main() {
5400 pthread_t t;
5401 if (!pthread_create(&t, 0, &foo, 0)) {
5402 pthread_join(t, 0);
5404 return 0;
5405 }" > dummy.c ;
5406 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5407 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5408 _res=$? ;
5409 rm -f dummy.c dummy${ac_exeext} ;
5410 if test "$_res" = "0"; then
5411 echo "$ac_t""yes" 1>&6
5412 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5413 else
5414 echo "$ac_t""no" 1>&6
5416 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5417 echo "configure:5418: checking for pthread_create in -lc_r" >&5
5418 echo "
5419 #include <pthread.h>
5420 void *foo(void *v) { return v; }
5421 int main() {
5422 pthread_t t;
5423 if (!pthread_create(&t, 0, &foo, 0)) {
5424 pthread_join(t, 0);
5426 return 0;
5427 }" > dummy.c ;
5428 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5429 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5430 _res=$? ;
5431 rm -f dummy.c dummy${ac_exeext} ;
5432 if test "$_res" = "0"; then
5433 echo "$ac_t""yes" 1>&6
5434 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5435 else
5436 echo "$ac_t""no" 1>&6
5438 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5439 echo "configure:5440: checking for pthread_create in -lc" >&5
5440 echo "
5441 #include <pthread.h>
5442 void *foo(void *v) { return v; }
5443 int main() {
5444 pthread_t t;
5445 if (!pthread_create(&t, 0, &foo, 0)) {
5446 pthread_join(t, 0);
5448 return 0;
5449 }" > dummy.c ;
5450 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5451 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5452 _res=$? ;
5453 rm -f dummy.c dummy${ac_exeext} ;
5454 if test "$_res" = "0"; then
5455 echo "$ac_t""yes" 1>&6
5456 _HAVE_PTHREADS=1
5458 else
5459 echo "$ac_t""no" 1>&6
5473 esac
5475 # Check whether --with-pthreads or --without-pthreads was given.
5476 if test "${with_pthreads+set}" = set; then
5477 withval="$with_pthreads"
5478 if test "$withval" = "yes"; then
5479 if test -n "$_HAVE_PTHREADS"; then
5480 USE_PTHREADS=1
5481 USE_USER_PTHREADS=
5482 USE_NSPR_THREADS=
5483 else
5484 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5486 else
5487 USE_PTHREADS=
5488 _PTHREAD_LDFLAGS=
5490 else
5491 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5492 USE_PTHREADS=1
5493 USE_USER_PTHREADS=
5494 USE_NSPR_THREADS=
5499 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5500 if test "${enable_user_pthreads+set}" = set; then
5501 enableval="$enable_user_pthreads"
5502 if test "$enableval" = "yes"; then
5503 if test -n "$_HAVE_PTHREADS"; then
5504 USE_PTHREADS=
5505 USE_USER_PTHREADS=1
5506 USE_NSPR_THREADS=
5507 else
5508 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5514 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5515 if test "${enable_nspr_threads+set}" = set; then
5516 enableval="$enable_nspr_threads"
5517 if test "$enableval" = "yes"; then
5518 USE_PTHREADS=
5519 USE_USER_PTHREADS=
5520 USE_NSPR_THREADS=1
5525 case "$target" in
5526 *-beos*)
5527 # Check whether --with-bthreads or --without-bthreads was given.
5528 if test "${with_bthreads+set}" = set; then
5529 withval="$with_bthreads"
5530 if test "$withval" = "yes"; then
5531 USE_BTHREADS=1
5532 USE_USER_PTHREADS=
5533 USE_PTHREADS=
5538 esac
5540 fi # SKIP_LIBRARY_CHECKS
5542 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5543 if test "${enable_ipv6+set}" = set; then
5544 enableval="$enable_ipv6"
5545 if test "$enableval" = "yes"; then
5546 USE_IPV6=1
5547 else
5548 USE_IPV6=
5554 # Check whether --enable-boehm or --disable-boehm was given.
5555 if test "${enable_boehm+set}" = set; then
5556 enableval="$enable_boehm"
5557 if test "$enableval" = "yes"; then
5558 cat >> confdefs.h <<\EOF
5559 #define GC_LEAK_DETECTOR 1
5562 GC_LEAK_DETECTOR=1
5567 if test -n "$USE_PTHREADS"; then
5568 rm -f conftest*
5569 ac_cv_have_dash_pthread=no
5570 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5571 echo "configure:5572: checking whether ${CC-cc} accepts -pthread" >&5
5572 echo 'int main() { return 0; }' | cat > conftest.c
5573 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5574 if test $? -eq 0; then
5575 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5576 ac_cv_have_dash_pthread=yes
5577 case "$target_os" in
5578 freebsd*)
5579 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5582 CFLAGS="$CFLAGS -pthread"
5583 CXXFLAGS="$CXXFLAGS -pthread"
5585 esac
5588 rm -f conftest*
5589 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5591 ac_cv_have_dash_pthreads=no
5592 if test "$ac_cv_have_dash_pthread" = "no"; then
5593 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5594 echo "configure:5595: checking whether ${CC-cc} accepts -pthreads" >&5
5595 echo 'int main() { return 0; }' | cat > conftest.c
5596 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5597 if test $? -eq 0; then
5598 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5599 ac_cv_have_dash_pthreads=yes
5600 CFLAGS="$CFLAGS -pthreads"
5601 CXXFLAGS="$CXXFLAGS -pthreads"
5604 rm -f conftest*
5605 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5608 case "$target" in
5609 *-solaris*)
5610 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5611 _PTHREAD_LDFLAGS=
5614 *-freebsd*)
5615 cat >> confdefs.h <<\EOF
5616 #define _REENTRANT 1
5619 cat >> confdefs.h <<\EOF
5620 #define _THREAD_SAFE 1
5623 if test "$ac_cv_have_dash_pthread" = "yes"; then
5624 _PTHREAD_LDFLAGS="-pthread"
5625 else
5626 _PTHREAD_LDFLAGS="-lc_r"
5629 *-netbsd*)
5630 if test "$ac_cv_have_dash_pthread" = "yes"; then
5631 _PTHREAD_LDFLAGS="-pthread"
5634 *-bsdi*)
5635 cat >> confdefs.h <<\EOF
5636 #define _THREAD_SAFE 1
5639 if test "$ac_cv_have_dash_pthread" = "yes"; then
5640 _PTHREAD_LDFLAGS=
5643 *-openbsd*)
5644 if test "$ac_cv_have_dash_pthread" = "yes"; then
5645 _PTHREAD_LDFLAGS=-pthread
5648 *-linux*|*-gnu*|*-k*bsd*-gnu)
5649 cat >> confdefs.h <<\EOF
5650 #define _REENTRANT 1
5654 esac
5656 else
5657 if test -n "$USE_USER_PTHREADS"; then
5658 USE_PTHREADS=
5659 USE_NSPR_THREADS=
5660 else
5661 _PTHREAD_LDFLAGS=
5665 case "$target" in
5666 *-aix*)
5667 if test -n "$USE_NSPR_THREADS"; then
5668 cat >> confdefs.h <<\EOF
5669 #define _PR_LOCAL_THREADS_ONLY 1
5673 case "$target_os" in
5674 aix4.1*)
5675 if test -z "$USE_PTHREADS"; then
5676 cat >> confdefs.h <<\EOF
5677 #define AIX_RENAME_SELECT 1
5682 aix4.2*)
5683 if test -z "$USE_NSPR_THREADS"; then
5684 cat >> confdefs.h <<\EOF
5685 #define HAVE_POINTER_LOCALTIME_R 1
5690 aix4.3*)
5691 if test -z "$USE_NSPR_THREADS"; then
5692 cat >> confdefs.h <<\EOF
5693 #define HAVE_POINTER_LOCALTIME_R 1
5697 if test -n "$USE_PTHREADS"; then
5698 cat >> confdefs.h <<\EOF
5699 #define _PR_HAVE_THREADSAFE_GETHOST 1
5705 if test -z "$USE_NSPR_THREADS"; then
5706 cat >> confdefs.h <<\EOF
5707 #define HAVE_POINTER_LOCALTIME_R 1
5711 if test -n "$USE_PTHREADS"; then
5712 cat >> confdefs.h <<\EOF
5713 #define _PR_HAVE_THREADSAFE_GETHOST 1
5718 esac
5720 *-bsdi*)
5721 if test -n "$USE_PTHREADS"; then
5722 cat >> confdefs.h <<\EOF
5723 #define _PR_NEED_PTHREAD_INIT 1
5728 *-freebsd*)
5729 if test -n "$USE_NSPR_THREADS"; then
5730 cat >> confdefs.h <<\EOF
5731 #define _PR_LOCAL_THREADS_ONLY 1
5736 *-hpux*)
5737 if test -n "$USE_NSPR_THREADS"; then
5738 cat >> confdefs.h <<\EOF
5739 #define _PR_LOCAL_THREADS_ONLY 1
5743 if test "$USE_PTHREADS"; then
5744 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
5745 cat >> confdefs.h <<\EOF
5746 #define _REENTRANT 1
5749 cat >> confdefs.h <<\EOF
5750 #define _PR_DCETHREADS 1
5753 else
5754 cat >> confdefs.h <<EOF
5755 #define _POSIX_C_SOURCE 199506L
5758 cat >> confdefs.h <<\EOF
5759 #define _PR_HAVE_THREADSAFE_GETHOST 1
5764 if test "$USE_USER_PTHREADS"; then
5765 cat >> confdefs.h <<EOF
5766 #define _POSIX_C_SOURCE 199506L
5771 *-irix*)
5772 if test "${target_os}" = "irix6.5"; then
5773 if test -n "$USE_PTHREADS"; then
5774 cat >> confdefs.h <<\EOF
5775 #define _PR_HAVE_GETHOST_R 1
5778 cat >> confdefs.h <<\EOF
5779 #define _PR_HAVE_GETHOST_R_POINTER 1
5785 *-linux*|*-gnu*|*-k*bsd*-gnu)
5786 if test -n "$USE_NSPR_THREADS"; then
5787 cat >> confdefs.h <<\EOF
5788 #define _PR_LOCAL_THREADS_ONLY 1
5793 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
5794 USE_PTHREADS=
5795 _PTHREAD_LDFLAGS=
5796 USE_USER_PTHREADS=
5798 *-netbsd*|*-openbsd*)
5799 if test -n "$USE_NSPR_THREADS"; then
5800 cat >> confdefs.h <<\EOF
5801 #define _PR_LOCAL_THREADS_ONLY 1
5806 *-osf*)
5807 if test -n "$USE_NSPR_THREADS"; then
5808 cat >> confdefs.h <<\EOF
5809 #define _PR_LOCAL_THREADS_ONLY 1
5813 if test -n "$USE_PTHREADS"; then
5814 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
5816 else
5817 cat >> confdefs.h <<\EOF
5818 #define _PR_HAVE_THREADSAFE_GETHOST 1
5824 *-solaris*)
5825 if test -n "$USE_NSPR_THREADS"; then
5826 cat >> confdefs.h <<\EOF
5827 #define _PR_LOCAL_THREADS_ONLY 1
5831 if test -n "$USE_PTHREADS"; then
5832 cat >> confdefs.h <<\EOF
5833 #define _REENTRANT 1
5836 cat >> confdefs.h <<\EOF
5837 #define HAVE_POINTER_LOCALTIME_R 1
5840 if test "$OS_TEST" = "i86pc"; then
5841 if test -n "$USE_64"; then
5842 PR_MD_ASFILES=os_SunOS_x86_64.s
5843 else
5844 PR_MD_ASFILES=os_SunOS_x86.s
5846 else
5847 if test -n "$USE_64"; then
5848 PR_MD_ASFILES=os_SunOS_sparcv9.s
5853 *-nto*)
5854 if test -n "$USE_PTHREADS"; then
5855 cat >> confdefs.h <<\EOF
5856 #define _PR_HAVE_GETHOST_R 1
5859 cat >> confdefs.h <<\EOF
5860 #define _PR_HAVE_GETHOST_R_POINTER 1
5865 esac
5867 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
5869 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
5870 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
5873 if test -n "$_SAVE_DEBUG_FLAGS"; then
5874 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
5877 if test -n "$MOZ_OPTIMIZE"; then
5878 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
5879 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
5882 if test -n "$MOZ_DEBUG"; then
5883 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
5884 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
5887 if test -n "$MOZ_OPTIMIZE"; then
5888 OBJDIR_TAG=_OPT
5889 else
5890 OBJDIR_TAG=_DBG
5893 if test -n "$USE_64"; then
5894 COMPILER_TAG=_64
5897 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
5899 case "$target_os" in
5900 cygwin*|msvc*|mks*)
5901 CC="\$(CYGWIN_WRAPPER) $CC"
5902 CXX="\$(CYGWIN_WRAPPER) $CXX"
5903 RC="\$(CYGWIN_WRAPPER) $RC"
5905 esac
6004 MAKEFILES="
6005 Makefile
6006 config/Makefile
6007 config/autoconf.mk
6008 config/nsprincl.mk
6009 config/nsprincl.sh
6010 config/nspr-config
6011 lib/Makefile
6012 lib/ds/Makefile
6013 lib/libc/Makefile
6014 lib/libc/include/Makefile
6015 lib/libc/src/Makefile
6016 lib/tests/Makefile
6017 pkg/Makefile
6018 pkg/linux/Makefile
6019 pkg/solaris/Makefile
6020 pkg/solaris/SUNWpr/Makefile
6021 pkg/solaris/SUNWprd/Makefile
6022 pr/Makefile
6023 pr/include/Makefile
6024 pr/include/md/Makefile
6025 pr/include/obsolete/Makefile
6026 pr/include/private/Makefile
6027 pr/src/Makefile
6028 pr/src/io/Makefile
6029 pr/src/linking/Makefile
6030 pr/src/malloc/Makefile
6031 pr/src/md/Makefile
6032 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6033 pr/src/memory/Makefile
6034 pr/src/misc/Makefile
6035 pr/src/threads/Makefile
6036 pr/tests/Makefile
6037 pr/tests/dll/Makefile
6041 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6042 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
6043 elif test -n "$USE_PTHREADS"; then
6044 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
6045 elif test -n "$USE_BTHREADS"; then
6046 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
6049 if test -n "$USE_CPLUS"; then
6050 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
6053 echo $MAKEFILES > unallmakefiles
6055 trap '' 1 2 15
6056 cat > confcache <<\EOF
6057 # This file is a shell script that caches the results of configure
6058 # tests run on this system so they can be shared between configure
6059 # scripts and configure runs. It is not useful on other systems.
6060 # If it contains results you don't want to keep, you may remove or edit it.
6062 # By default, configure uses ./config.cache as the cache file,
6063 # creating it if it does not exist already. You can give configure
6064 # the --cache-file=FILE option to use a different cache file; that is
6065 # what configure does when it calls configure scripts in
6066 # subdirectories, so they share the cache.
6067 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6068 # config.status only pays attention to the cache file if you give it the
6069 # --recheck option to rerun configure.
6072 # The following way of writing the cache mishandles newlines in values,
6073 # but we know of no workaround that is simple, portable, and efficient.
6074 # So, don't put newlines in cache variables' values.
6075 # Ultrix sh set writes to stderr and can't be redirected directly,
6076 # and sets the high bit in the cache file unless we assign to the vars.
6077 (set) 2>&1 |
6078 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6079 *ac_space=\ *)
6080 # `set' does not quote correctly, so add quotes (double-quote substitution
6081 # turns \\\\ into \\, and sed turns \\ into \).
6082 sed -n \
6083 -e "s/'/'\\\\''/g" \
6084 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6087 # `set' quotes correctly as required by POSIX, so do not add quotes.
6088 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6090 esac >> confcache
6091 if cmp -s $cache_file confcache; then
6093 else
6094 if test -w $cache_file; then
6095 echo "updating cache $cache_file"
6096 cat confcache > $cache_file
6097 else
6098 echo "not updating unwritable cache $cache_file"
6101 rm -f confcache
6103 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6105 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6106 # Let make expand exec_prefix.
6107 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6109 # Any assignment to VPATH causes Sun make to only execute
6110 # the first set of double-colon rules, so remove it if not needed.
6111 # If there is a colon in the path, we need to keep it.
6112 if test "x$srcdir" = x.; then
6113 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6116 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6118 # Transform confdefs.h into DEFS.
6119 # Protect against shell expansion while executing Makefile rules.
6120 # Protect against Makefile macro expansion.
6121 cat > conftest.defs <<\EOF
6122 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6123 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6124 s%\[%\\&%g
6125 s%\]%\\&%g
6126 s%\$%$$%g
6128 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '` # Manually modified for MKS support.
6129 rm -f conftest.defs
6132 # Without the "./", some shells look in PATH for config.status.
6133 : ${CONFIG_STATUS=./config.status}
6135 echo creating $CONFIG_STATUS
6136 rm -f $CONFIG_STATUS
6137 cat > $CONFIG_STATUS <<EOF
6138 #! /bin/sh
6139 # Generated automatically by configure.
6140 # Run this file to recreate the current configuration.
6141 # This directory was configured as follows,
6142 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6144 # $0 $ac_configure_args
6146 # Compiler output produced by configure, useful for debugging
6147 # configure, is in ./config.log if it exists.
6149 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6150 for ac_option
6152 case "\$ac_option" in
6153 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6154 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6155 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6156 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6157 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6158 exit 0 ;;
6159 -help | --help | --hel | --he | --h)
6160 echo "\$ac_cs_usage"; exit 0 ;;
6161 *) echo "\$ac_cs_usage"; exit 1 ;;
6162 esac
6163 done
6165 ac_given_srcdir=$srcdir
6167 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6169 cat >> $CONFIG_STATUS <<EOF
6171 # Protect against being on the right side of a sed subst in config.status.
6172 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6173 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6174 $ac_vpsub
6175 $extrasub
6176 s%@SHELL@%$SHELL%g
6177 s%@CFLAGS@%$CFLAGS%g
6178 s%@CPPFLAGS@%$CPPFLAGS%g
6179 s%@CXXFLAGS@%$CXXFLAGS%g
6180 s%@FFLAGS@%$FFLAGS%g
6181 s%@DEFS@%$DEFS%g
6182 s%@LDFLAGS@%$LDFLAGS%g
6183 s%@LIBS@%$LIBS%g
6184 s%@exec_prefix@%$exec_prefix%g
6185 s%@prefix@%$prefix%g
6186 s%@program_transform_name@%$program_transform_name%g
6187 s%@bindir@%$bindir%g
6188 s%@sbindir@%$sbindir%g
6189 s%@libexecdir@%$libexecdir%g
6190 s%@datadir@%$datadir%g
6191 s%@sysconfdir@%$sysconfdir%g
6192 s%@sharedstatedir@%$sharedstatedir%g
6193 s%@localstatedir@%$localstatedir%g
6194 s%@libdir@%$libdir%g
6195 s%@includedir@%$includedir%g
6196 s%@oldincludedir@%$oldincludedir%g
6197 s%@infodir@%$infodir%g
6198 s%@mandir@%$mandir%g
6199 s%@host@%$host%g
6200 s%@host_alias@%$host_alias%g
6201 s%@host_cpu@%$host_cpu%g
6202 s%@host_vendor@%$host_vendor%g
6203 s%@host_os@%$host_os%g
6204 s%@target@%$target%g
6205 s%@target_alias@%$target_alias%g
6206 s%@target_cpu@%$target_cpu%g
6207 s%@target_vendor@%$target_vendor%g
6208 s%@target_os@%$target_os%g
6209 s%@build@%$build%g
6210 s%@build_alias@%$build_alias%g
6211 s%@build_cpu@%$build_cpu%g
6212 s%@build_vendor@%$build_vendor%g
6213 s%@build_os@%$build_os%g
6214 s%@CC@%$CC%g
6215 s%@dist_prefix@%$dist_prefix%g
6216 s%@dist_bindir@%$dist_bindir%g
6217 s%@dist_includedir@%$dist_includedir%g
6218 s%@dist_libdir@%$dist_libdir%g
6219 s%@WHOAMI@%$WHOAMI%g
6220 s%@HOST_CC@%$HOST_CC%g
6221 s%@CXX@%$CXX%g
6222 s%@RANLIB@%$RANLIB%g
6223 s%@AR@%$AR%g
6224 s%@AS@%$AS%g
6225 s%@LD@%$LD%g
6226 s%@STRIP@%$STRIP%g
6227 s%@WINDRES@%$WINDRES%g
6228 s%@CPP@%$CPP%g
6229 s%@PERL@%$PERL%g
6230 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6231 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6232 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6233 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6234 s%@GNU_CC@%$GNU_CC%g
6235 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6236 s%@MSC_VER@%$MSC_VER%g
6237 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6238 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6239 s%@USE_CPLUS@%$USE_CPLUS%g
6240 s%@USE_IPV6@%$USE_IPV6%g
6241 s%@USE_N32@%$USE_N32%g
6242 s%@USE_64@%$USE_64%g
6243 s%@OBJECT_MODE@%$OBJECT_MODE%g
6244 s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
6245 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6246 s%@USE_PTHREADS@%$USE_PTHREADS%g
6247 s%@USE_BTHREADS@%$USE_BTHREADS%g
6248 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6249 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6250 s%@LIBNSPR@%$LIBNSPR%g
6251 s%@LIBPLC@%$LIBPLC%g
6252 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6253 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6254 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6255 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6256 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6257 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6258 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6259 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6260 s%@CPU_ARCH@%$CPU_ARCH%g
6261 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6262 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6263 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6264 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6265 s%@MKSHLIB@%$MKSHLIB%g
6266 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6267 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6268 s%@OS_TARGET@%$OS_TARGET%g
6269 s%@OS_ARCH@%$OS_ARCH%g
6270 s%@OS_RELEASE@%$OS_RELEASE%g
6271 s%@OS_TEST@%$OS_TEST%g
6272 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6273 s%@DEFINES@%$DEFINES%g
6274 s%@AR_FLAGS@%$AR_FLAGS%g
6275 s%@ASFLAGS@%$ASFLAGS%g
6276 s%@FILTER@%$FILTER%g
6277 s%@IMPLIB@%$IMPLIB%g
6278 s%@OS_LIBS@%$OS_LIBS%g
6279 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6280 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6281 s%@NOSUCHFILE@%$NOSUCHFILE%g
6282 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6283 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6284 s%@OBJDIR@%$OBJDIR%g
6285 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6286 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6287 s%@NSINSTALL@%$NSINSTALL%g
6288 s%@OPTIMIZER@%$OPTIMIZER%g
6289 s%@RC@%$RC%g
6290 s%@RCFLAGS@%$RCFLAGS%g
6291 s%@DLLFLAGS@%$DLLFLAGS%g
6292 s%@EXEFLAGS@%$EXEFLAGS%g
6293 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6294 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6295 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6296 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6297 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6298 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6299 s%@NEXT_ROOT@%$NEXT_ROOT%g
6300 s%@MT@%$MT%g
6302 CEOF
6305 cat >> $CONFIG_STATUS <<\EOF
6307 # Split the substitutions into bite-sized pieces for seds with
6308 # small command number limits, like on Digital OSF/1 and HP-UX.
6309 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6310 ac_file=1 # Number of current file.
6311 ac_beg=1 # First line for current file.
6312 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6313 ac_more_lines=:
6314 ac_sed_cmds=""
6315 while $ac_more_lines; do
6316 if test $ac_beg -gt 1; then
6317 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6318 else
6319 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6321 if test ! -s conftest.s$ac_file; then
6322 ac_more_lines=false
6323 rm -f conftest.s$ac_file
6324 else
6325 if test -z "$ac_sed_cmds"; then
6326 ac_sed_cmds="sed -f conftest.s$ac_file"
6327 else
6328 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6330 ac_file=`expr $ac_file + 1`
6331 ac_beg=$ac_end
6332 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6334 done
6335 if test -z "$ac_sed_cmds"; then
6336 ac_sed_cmds=cat
6340 cat >> $CONFIG_STATUS <<EOF
6342 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6344 cat >> $CONFIG_STATUS <<\EOF
6345 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6346 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6347 case "$ac_file" in
6348 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6349 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6350 *) ac_file_in="${ac_file}.in" ;;
6351 esac
6353 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6355 # Remove last slash and all that follows it. Not all systems have dirname.
6356 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6357 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6358 # The file is in a subdirectory.
6359 test ! -d "$ac_dir" && mkdir "$ac_dir"
6360 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6361 # A "../" for each directory in $ac_dir_suffix.
6362 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6363 else
6364 ac_dir_suffix= ac_dots=
6367 case "$ac_given_srcdir" in
6368 .) srcdir=.
6369 if test -z "$ac_dots"; then top_srcdir=.
6370 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6371 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6372 *) # Relative path.
6373 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6374 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6375 esac
6378 echo creating "$ac_file"
6379 rm -f "$ac_file"
6380 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6381 case "$ac_file" in
6382 *Makefile*) ac_comsub="1i\\
6383 # $configure_input" ;;
6384 *) ac_comsub= ;;
6385 esac
6387 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6388 sed -e "$ac_comsub
6389 s%@configure_input@%$configure_input%g
6390 s%@srcdir@%$srcdir%g
6391 s%@top_srcdir@%$top_srcdir%g
6392 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6393 fi; done
6394 rm -f conftest.s*
6397 cat >> $CONFIG_STATUS <<EOF
6400 cat >> $CONFIG_STATUS <<\EOF
6401 chmod +x config/nspr-config
6402 exit 0
6404 chmod +x $CONFIG_STATUS
6405 rm -fr confdefs* $ac_clean_files
6406 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1