Automated checkin: version bump remove "pre" from version number for firefox 3.7a1...
[mozilla-central.git] / nsprpub / configure
blob2aa3dbb8d129ef942035e7f5509c4afe52b237ce
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 /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 cat >> confdefs.h <<\EOF
4136 #define _M_AMD64 1
4139 else
4140 cat >> confdefs.h <<\EOF
4141 #define _X86_ 1
4146 alpha)
4147 cat >> confdefs.h <<\EOF
4148 #define _ALPHA_ 1
4152 mips)
4153 cat >> confdefs.h <<\EOF
4154 #define _MIPS_ 1
4158 x86_64)
4159 cat >> confdefs.h <<\EOF
4160 #define _AMD64_ 1
4163 cat >> confdefs.h <<\EOF
4164 #define _M_AMD64 1
4167 USE_64=1
4169 ia64)
4170 cat >> confdefs.h <<\EOF
4171 #define _IA64_ 1
4174 cat >> confdefs.h <<\EOF
4175 #define _M_IA64 1
4178 USE_64=1
4181 cat >> confdefs.h <<\EOF
4182 #define _CPU_ARCH_NOT_DEFINED 1
4186 esac
4188 if test "$USE_64"; then
4189 cat >> confdefs.h <<\EOF
4190 #define _WIN64 1
4197 *-wince*|*-winmo*)
4198 cat >> confdefs.h <<\EOF
4199 #define XP_PC 1
4202 cat >> confdefs.h <<\EOF
4203 #define WIN32 1
4206 cat >> confdefs.h <<\EOF
4207 #define WINCE 1
4210 cat >> confdefs.h <<\EOF
4211 #define _PR_GLOBAL_THREADS_ONLY 1
4215 AR='lib -NOLOGO -OUT:"$@"'
4216 AR_FLAGS=
4218 OBJ_SUFFIX=obj
4219 LIB_SUFFIX=lib
4220 DLL_SUFFIX=dll
4221 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4223 PR_MD_ARCH_DIR=windows
4224 RESOLVE_LINK_SYMBOLS=1
4226 MDCPUCFG_H=_win95.cfg
4227 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4228 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4230 DLLFLAGS='-OUT:"$@"'
4231 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4232 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4233 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4234 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4236 _DEBUG_FLAGS=-Zi
4237 _OPTIMIZE_FLAGS=-O2
4240 *-ncr-sysv*)
4241 cat >> confdefs.h <<\EOF
4242 #define XP_UNIX 1
4245 cat >> confdefs.h <<\EOF
4246 #define SVR4 1
4249 cat >> confdefs.h <<\EOF
4250 #define SYSV 1
4253 cat >> confdefs.h <<\EOF
4254 #define NCR 1
4257 USE_NSPR_THREADS=1
4258 if test "$OS_RELEASE" = "2.03"; then
4259 cat >> confdefs.h <<\EOF
4260 #define _PR_STAT_HAS_ST_ATIM 1
4263 else
4264 cat >> confdefs.h <<\EOF
4265 #define _PR_STAT_HAS_ST_ATIM_UNION 1
4270 if test -z "$GNU_CC"; then
4271 CFLAGS="$CFLAGS -Hnocopyr"
4272 CXXFLAGS="$CXXFLAGS -Hnocopyr"
4273 else
4274 CFLAGS="$CFLAGS -fPIC -Wall"
4275 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
4276 DSO_LDOPTS=-G
4278 MDCPUCFG_H=_ncr.cfg
4279 PR_MD_CSRCS=ncr.c
4282 mips-nec-sysv*)
4283 cat >> confdefs.h <<\EOF
4284 #define XP_UNIX 1
4287 cat >> confdefs.h <<\EOF
4288 #define SVR4 1
4291 cat >> confdefs.h <<\EOF
4292 #define __SVR4 1
4295 cat >> confdefs.h <<\EOF
4296 #define NEC 1
4299 cat >> confdefs.h <<\EOF
4300 #define nec_ews 1
4303 USE_NSPR_THREADS=1
4304 if test -z "$GNU_CC"; then
4305 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
4306 CXX=g++
4308 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
4309 DSO_LDOPTS=-G
4310 MDCPUCFG_H=_nec.cfg
4311 PR_MD_CSRCS=nec.c
4314 *-netbsd*)
4315 cat >> confdefs.h <<\EOF
4316 #define XP_UNIX 1
4319 cat >> confdefs.h <<\EOF
4320 #define NETBSD 1
4323 cat >> confdefs.h <<\EOF
4324 #define HAVE_BSD_FLOCK 1
4327 if test -z "$USE_NSPR_THREADS"; then
4328 USE_PTHREADS=1
4330 MDCPUCFG_H=_netbsd.cfg
4331 PR_MD_CSRCS=netbsd.c
4333 DSO_CFLAGS='-fPIC -DPIC'
4334 CFLAGS="$CFLAGS -ansi -Wall"
4335 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4336 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4338 if test -z "$OBJECT_FMT"; then
4339 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4340 OBJECT_FMT=a.out
4341 DLL_SUFFIX=so.1.0
4342 DSO_LDOPTS='-shared'
4343 else
4344 OBJECT_FMT=ELF
4345 DLL_SUFFIX=so
4346 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4350 if test "$LIBRUNPATH"; then
4351 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4355 mips-sony-newsos*)
4356 cat >> confdefs.h <<\EOF
4357 #define XP_UNIX 1
4360 cat >> confdefs.h <<\EOF
4361 #define SONY 1
4364 cat >> confdefs.h <<\EOF
4365 #define SYSV 1
4368 cat >> confdefs.h <<\EOF
4369 #define SVR4 1
4372 cat >> confdefs.h <<\EOF
4373 #define __svr4 1
4376 cat >> confdefs.h <<\EOF
4377 #define __svr4__ 1
4380 cat >> confdefs.h <<\EOF
4381 #define HAVE_SVID_GETTOD 1
4384 USE_NSPR_THREADS=1
4385 CFLAGS="$CFLAGS -Xa -fullwarn"
4386 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4387 DSO_LDOPTS=-G
4388 MDCPUCFG_H=_sony.cfg
4389 PR_MD_CSRCS=sony.c
4392 *-nextstep*|*-openstep*)
4393 cat >> confdefs.h <<\EOF
4394 #define XP_UNIX 1
4397 cat >> confdefs.h <<\EOF
4398 #define NEXTSTEP 1
4401 cat >> confdefs.h <<\EOF
4402 #define HAVE_BSD_FLOCK 1
4405 cat >> confdefs.h <<\EOF
4406 #define _POSIX_SOURCE 1
4409 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4410 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4411 USE_NSPR_THREADS=1
4412 DLL_SUFFIX=dylib
4413 MDCPUCFG_H=_nextstep.cfg
4414 PR_MD_CSRCS=nextstep.c
4418 *-nto*)
4419 cat >> confdefs.h <<\EOF
4420 #define XP_UNIX 1
4423 cat >> confdefs.h <<\EOF
4424 #define NTO 1
4427 cat >> confdefs.h <<\EOF
4428 #define _QNX_SOURCE 1
4431 cat >> confdefs.h <<\EOF
4432 #define HAVE_POINTER_LOCALTIME_R 1
4435 MDCPUCFG_H=_nto.cfg
4436 PR_MD_CSRCS=nto.c
4437 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4438 DSO_CFLAGS=-fPIC
4439 DSO_LDOPTS=-shared
4440 OS_LIBS="$OS_LIBS -lsocket"
4441 _OPTIMIZE_FLAGS="-O1"
4442 _DEBUG_FLAGS="-gstabs"
4445 *-openbsd*)
4446 cat >> confdefs.h <<\EOF
4447 #define XP_UNIX 1
4450 cat >> confdefs.h <<\EOF
4451 #define OPENBSD 1
4454 cat >> confdefs.h <<\EOF
4455 #define HAVE_BSD_FLOCK 1
4458 cat >> confdefs.h <<\EOF
4459 #define HAVE_SOCKLEN_T 1
4462 CFLAGS="$CFLAGS -ansi -Wall"
4463 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4464 DLL_SUFFIX=so.1.0
4465 DSO_CFLAGS=-fPIC
4466 MDCPUCFG_H=_openbsd.cfg
4467 PR_MD_CSRCS=openbsd.c
4468 OS_LIBS="-lc"
4469 if test -z "$USE_NSPR_THREADS"; then
4470 USE_PTHREADS=1
4472 DSO_LDOPTS='-shared -fPIC'
4473 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4476 *-osf*)
4477 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4478 cat >> confdefs.h <<\EOF
4479 #define XP_UNIX 1
4482 cat >> confdefs.h <<\EOF
4483 #define OSF1 1
4486 cat >> confdefs.h <<\EOF
4487 #define _REENTRANT 1
4490 # OSF1 and HPUX report the POLLHUP event for a socket when the
4491 # shutdown(SHUT_WR) operation is called for the remote end, even though
4492 # the socket is still writeable. Use select(), instead of poll(), to
4493 # workaround this problem.
4494 cat >> confdefs.h <<\EOF
4495 #define _PR_POLL_WITH_SELECT 1
4499 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4500 USE_NSPR_THREADS=1
4503 if test -z "$GNU_CC"; then
4504 CC="$CC -std1 -ieee_with_inexact"
4505 if test "$OS_RELEASE" != "V2.0"; then
4506 CC="$CC -readonly_strings"
4508 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4509 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4510 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4511 echo "configure:4512: checking for machine/builtins.h" >&5
4512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4513 echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515 cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518 #include <machine/builtins.h>
4520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4521 { (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4523 if test -z "$ac_err"; then
4524 rm -rf conftest*
4525 eval "ac_cv_header_$ac_safe=yes"
4526 else
4527 echo "$ac_err" >&5
4528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 rm -rf conftest*
4531 eval "ac_cv_header_$ac_safe=no"
4533 rm -f conftest*
4535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4536 echo "$ac_t""yes" 1>&6
4537 cat >> confdefs.h <<\EOF
4538 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4541 else
4542 echo "$ac_t""no" 1>&6
4545 else
4546 CFLAGS="$CFLAGS -mieee"
4547 CXXFLAGS="$CXXFLAGS -mieee"
4550 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4551 cat >> confdefs.h <<\EOF
4552 #define HAVE_INT_LOCALTIME_R 1
4555 else
4556 cat >> confdefs.h <<\EOF
4557 #define HAVE_FCNTL_FILE_LOCKING 1
4560 cat >> confdefs.h <<\EOF
4561 #define HAVE_POINTER_LOCALTIME_R 1
4565 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4566 cat >> confdefs.h <<\EOF
4567 #define OSF1V4_MAP_PRIVATE_BUG 1
4571 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4572 MDCPUCFG_H=_osf1.cfg
4573 PR_MD_CSRCS=osf1.c
4576 *-qnx*)
4577 cat >> confdefs.h <<\EOF
4578 #define XP_UNIX 1
4581 cat >> confdefs.h <<\EOF
4582 #define QNX 1
4585 cat >> confdefs.h <<\EOF
4586 #define _PR_NEED_H_ERRNO 1
4589 USE_NSPR_THREADS=1
4590 MDCPUCFG_H=_qnx.cfg
4591 PR_MD_CSRCS=qnx.c
4594 *-riscos*)
4595 cat >> confdefs.h <<\EOF
4596 #define XP_UNIX 1
4599 cat >> confdefs.h <<\EOF
4600 #define RISCOS 1
4603 cat >> confdefs.h <<\EOF
4604 #define _PR_NEED_H_ERRNO 1
4607 USE_PTHREADS=1
4608 MDCPUCFG_H=_riscos.cfg
4609 PR_MD_CSRCS=riscos.c
4610 DSO_CFLAGS=-fPIC
4611 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4612 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4615 *-*-sco*)
4616 cat >> confdefs.h <<\EOF
4617 #define XP_UNIX 1
4620 cat >> confdefs.h <<\EOF
4621 #define SCO 1
4624 cat >> confdefs.h <<\EOF
4625 #define sco 1
4628 cat >> confdefs.h <<\EOF
4629 #define SYSV 1
4632 cat >> confdefs.h <<\EOF
4633 #define _SVID3 1
4636 cat >> confdefs.h <<\EOF
4637 #define _PR_NEED_H_ERRNO 1
4640 CC='cc -b elf -KPIC'
4641 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4642 USE_NSPR_THREADS=1
4643 CPU_ARCH=x86
4644 DSO_LDOPTS='-b elf -G'
4645 MDCPUCFG_H=_scoos.cfg
4646 PR_MD_SRCS=scoos.c
4649 *-sinix*)
4650 cat >> confdefs.h <<\EOF
4651 #define XP_UNIX 1
4654 cat >> confdefs.h <<\EOF
4655 #define SVR4 1
4658 cat >> confdefs.h <<\EOF
4659 #define SNI 1
4662 cat >> confdefs.h <<\EOF
4663 #define RELIANTUNIX 1
4666 cat >> confdefs.h <<\EOF
4667 #define sinix 1
4670 cat >> confdefs.h <<\EOF
4671 #define HAVE_SVID_GETTOD 1
4674 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4675 cat >> confdefs.h <<\EOF
4676 #define i386 1
4679 CPU_ARCH=x86
4680 else
4681 CPU_ARCH=mips
4684 if test "$GNU_CC"; then
4685 AS='$(CC) -x assembler-with-cpp'
4686 if test "$CPU_ARCH" = "mips"; then
4687 LD=gld
4689 CFLAGS="$CFLAGS -Wall -Wno-format"
4690 else
4691 AS='/usr/bin/cc'
4692 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4695 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4697 if test "$OS_RELEASE" = "5.43"; then
4698 cat >> confdefs.h <<\EOF
4699 #define IP_MULTICAST 1
4704 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4705 USE_NSPR_THREADS=1
4706 MDCPUCFG_H=_reliantunix.cfg
4707 PR_MD_CSRCS=reliantunix.c
4708 if test "${OS_ARCH}" = "mips"; then
4709 PR_MD_ASFILES=os_ReliantUNIX.s
4713 *-sunos*)
4714 cat >> confdefs.h <<\EOF
4715 #define XP_UNIX 1
4718 cat >> confdefs.h <<\EOF
4719 #define SUNOS4 1
4722 CFLAGS="$CFLAGS -Wall -Wno-format"
4723 if test "$USE_MDUPDATE"; then
4724 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4726 CPU_ARCH=sparc
4727 DLL_SUFFIX=so.1.0
4728 DSO_LDOPTS=
4729 DSO_CFLAGS=-fPIC
4730 USE_NSPR_THREADS=1
4731 if test "$OS_RELEASE" = "4.1.3_U1"; then
4732 _OPTIMIZE_FLAGS=
4733 OS_LIBS="$OS_LIBS -lm"
4735 MDCPUCFG_H=_sunos4.cfg
4736 PR_MD_CSRCS=sunos4.c
4739 *-solaris*)
4740 if test -z "$USE_NSPR_THREADS"; then
4741 USE_PTHREADS=1
4743 cat >> confdefs.h <<\EOF
4744 #define XP_UNIX 1
4747 cat >> confdefs.h <<\EOF
4748 #define SVR4 1
4751 cat >> confdefs.h <<\EOF
4752 #define SYSV 1
4755 cat >> confdefs.h <<\EOF
4756 #define __svr4 1
4759 cat >> confdefs.h <<\EOF
4760 #define __svr4__ 1
4763 cat >> confdefs.h <<\EOF
4764 #define SOLARIS 1
4767 cat >> confdefs.h <<\EOF
4768 #define HAVE_FCNTL_FILE_LOCKING 1
4771 CPU_ARCH=`uname -p`
4772 MDCPUCFG_H=_solaris.cfg
4773 PR_MD_CSRCS=solaris.c
4774 LD=/usr/ccs/bin/ld
4775 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4776 RESOLVE_LINK_SYMBOLS=1
4777 case "${OS_RELEASE}" in
4778 5.8|5.9)
4781 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
4782 USE_B_DIRECT=1
4784 esac
4785 if test -n "$GNU_CC"; then
4786 DSO_CFLAGS=-fPIC
4787 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
4788 GCC_USE_GNU_LD=1
4790 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
4791 if test -n "$USE_B_DIRECT"; then
4792 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
4794 else
4795 DSO_CFLAGS=-KPIC
4796 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
4797 if test -n "$USE_B_DIRECT"; then
4798 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
4801 if test -n "$GNU_CC"; then
4802 CFLAGS="$CFLAGS -Wall"
4803 CXXFLAGS="$CXXFLAGS -Wall"
4804 if test -n "$USE_MDUPDATE"; then
4805 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4806 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
4808 GCC_AS=`$CC -print-prog-name=as`
4809 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
4810 GNU_AS=1
4812 else
4813 CFLAGS="$CFLAGS -xstrconst"
4814 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
4815 if test -z "$MOZ_OPTIMIZE"; then
4816 CFLAGS="$CFLAGS -xs"
4817 CXXFLAGS="$CXXFLAGS -xs"
4819 _OPTIMIZE_FLAGS=-xO4
4821 if test -z "$GNU_AS"; then
4822 ASFLAGS="$ASFLAGS -Wa,-P"
4824 if test -n "$USE_64"; then
4825 if test -n "$GNU_CC"; then
4826 CC="$CC -m64"
4827 CXX="$CXX -m64"
4828 else
4829 if test "$OS_TEST" = "i86pc"; then
4830 CC="$CC -xarch=amd64"
4831 CXX="$CXX -xarch=amd64"
4832 else
4833 CC="$CC -xarch=v9"
4834 CXX="$CXX -xarch=v9"
4838 if test "$OS_TEST" = "i86pc"; then
4839 if test -z "$USE_64"; then
4840 cat >> confdefs.h <<\EOF
4841 #define i386 1
4845 CPU_ARCH_TAG=_$OS_TEST
4846 # The default debug format, DWARF (-g), is not supported by gcc
4847 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
4848 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
4849 # If your gcc uses GNU as, you do not need the -Wa,-s option.
4850 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
4851 _DEBUG_FLAGS=-gstabs
4852 if test -z "$GNU_AS"; then
4853 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
4857 case "${target_os}" in
4858 solaris2.3*)
4859 cat >> confdefs.h <<\EOF
4860 #define _PR_NO_LARGE_FILES 1
4864 solaris2.4*)
4865 cat >> confdefs.h <<\EOF
4866 #define _PR_NO_LARGE_FILES 1
4870 solaris2.5*)
4871 cat >> confdefs.h <<\EOF
4872 #define SOLARIS2_5 1
4877 cat >> confdefs.h <<\EOF
4878 #define _PR_HAVE_OFF64_T 1
4881 # The lfcompile64(5) man page on Solaris 2.6 says:
4882 # For applications that do not wish to conform to the POSIX or
4883 # X/Open specifications, the 64-bit transitional interfaces
4884 # are available by default. No compile-time flags need to be
4885 # set.
4886 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
4887 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
4888 if test -n "$GNU_CC"; then
4889 cat >> confdefs.h <<\EOF
4890 #define _LARGEFILE64_SOURCE 1
4895 esac
4896 case "${target_os}" in
4897 solaris2.3*)
4899 solaris2.4*)
4901 solaris2.5*)
4903 solaris2.6*)
4905 solaris2.7*)
4908 # Solaris 8 or higher has IPv6.
4909 cat >> confdefs.h <<\EOF
4910 #define _PR_INET6 1
4914 esac
4915 if test "$CPU_ARCH" = "sparc"; then
4916 # 64-bit Solaris SPARC requires V9 architecture, so the following
4917 # is not needed.
4918 if test -z "$USE_64"; then
4919 ULTRASPARC_LIBRARY=nspr_flt
4922 # Purify requires that binaries linked against nspr also
4923 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
4924 _rev=`uname -r`
4925 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
4926 OS_LIBS="$OS_LIBS $_librt"
4929 *-sco-sysv5*)
4930 cat >> confdefs.h <<\EOF
4931 #define XP_UNIX 1
4934 cat >> confdefs.h <<\EOF
4935 #define UNIXWARE 1
4938 cat >> confdefs.h <<\EOF
4939 #define SVR4 1
4942 cat >> confdefs.h <<\EOF
4943 #define SYSV 1
4946 USE_NSPR_THREADS=1
4947 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
4948 cat >> confdefs.h <<\EOF
4949 #define _PR_NO_LARGE_FILES 1
4952 CC='$(NSDEPTH)/build/hcc cc'
4953 CXX='$(NSDEPTH)/build/hcpp CC'
4954 MDCPUCFG_H=_unixware.cfg
4955 else
4956 cat >> confdefs.h <<\EOF
4957 #define _LARGEFILE64_SOURCE 1
4960 cat >> confdefs.h <<\EOF
4961 #define _PR_HAVE_OFF64_T 1
4964 cat >> confdefs.h <<\EOF
4965 #define _PR_HAVE_SOCKADDR_LEN 1
4968 MDCPUCFG_H=_unixware7.cfg
4970 PR_MD_CSRCS=unixware.c
4971 DSO_LDOPTS=-G
4972 CPU_ARCH=x86
4975 *-symbian*)
4976 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
4977 if test "${with_symbian_sdk+set}" = set; then
4978 withval="$with_symbian_sdk"
4979 SYMBIAN_SDK_DIR=$withval
4983 echo -----------------------------------------------------------------------------
4984 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
4985 echo -----------------------------------------------------------------------------
4987 cat >> confdefs.h <<\EOF
4988 #define XP_UNIX 1
4991 cat >> confdefs.h <<\EOF
4992 #define SYMBIAN 1
4995 cat >> confdefs.h <<\EOF
4996 #define __arm__ 1
4999 cat >> confdefs.h <<\EOF
5000 #define __SYMBIAN32__ 1
5003 cat >> confdefs.h <<\EOF
5004 #define _UNICODE 1
5007 cat >> confdefs.h <<\EOF
5008 #define NDEBUG 1
5011 cat >> confdefs.h <<\EOF
5012 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5015 cat >> confdefs.h <<\EOF
5016 #define MOZ_STDERR_TO_STDOUT 1
5019 cat >> confdefs.h <<\EOF
5020 #define HAVE_FCNTL_FILE_LOCKING 1
5023 cat >> confdefs.h <<\EOF
5024 #define HAVE_SOCKLEN_T 1
5027 USE_PTHREADS=1
5028 LIB_SUFFIX=lib
5029 DLL_SUFFIX=dll
5030 MKSHLIB=
5031 DSO_LDOPTS=
5032 DSO_CFLAGS=
5033 VISIBILITY_FLAGS=
5034 MDCPUCFG_H=_symbian.cfg
5035 PR_MD_CSRCS=symbian.c
5036 NSINSTALL=nsinstall
5037 RANLIB='echo no ranlib '
5038 CPU_ARCH=ARM
5039 OS_ARCH=SYMBIAN
5040 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5041 CFLAGS="$CFLAGS -MD -nostdinc"
5042 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5043 echo -------------------------------------------------------
5044 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5045 echo -------------------------------------------------------
5046 case "$OS_TARGET" in
5047 WINSCW)
5048 CC=mwccsym2.exe
5049 CXX=mwccsym2.exe
5050 LD=mwldsym2.exe
5051 AR=mwldsym2.exe
5052 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5053 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)"
5054 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5055 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5056 cat >> confdefs.h <<\EOF
5057 #define _DEBUG 1
5060 cat >> confdefs.h <<\EOF
5061 #define __CW32__ 1
5064 cat >> confdefs.h <<\EOF
5065 #define __WINS__ 1
5068 cat >> confdefs.h <<\EOF
5069 #define __WINSCW__ 1
5072 DEFINES="$DEFINES -U_WIN32"
5074 GCCE)
5075 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5076 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5077 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5078 cat >> confdefs.h <<\EOF
5079 #define __GCCE__ 1
5082 cat >> confdefs.h <<\EOF
5083 #define __EABI__ 1
5086 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5089 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5091 esac
5092 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5095 *-os2*)
5096 cat >> confdefs.h <<\EOF
5097 #define XP_OS2 1
5100 cat >> confdefs.h <<\EOF
5101 #define XP_PC 1
5104 cat >> confdefs.h <<\EOF
5105 #define BSD_SELECT 1
5108 cat >> confdefs.h <<\EOF
5109 #define TCPV40HDRS 1
5112 LIB_SUFFIX=lib
5113 DLL_SUFFIX=dll
5114 RC=rc.exe
5115 PR_MD_ARCH_DIR=os2
5116 PROG_SUFFIX=.exe
5117 NSINSTALL=nsinstall
5118 MDCPUCFG_H=_os2.cfg
5119 RESOLVE_LINK_SYMBOLS=1
5121 cat >> confdefs.h <<\EOF
5122 #define OS2 1
5125 AR=emxomfar
5126 AR_FLAGS='r $@'
5127 CFLAGS="$CFLAGS -Wall -Zomf"
5128 CXXFLAGS="$CFLAGS -Wall -Zomf"
5129 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5130 DSO_CFLAGS=
5131 DSO_LDOPTS='-Zomf -Zdll'
5132 LDFLAGS='-Zmap'
5133 _OPTIMIZE_FLAGS="-O2 -s"
5134 _DEBUG_FLAGS="-g -fno-inline"
5135 if test -n "$MOZ_OPTIMIZE"; then
5136 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5138 IMPLIB='emximp -o'
5139 FILTER='emxexp -o'
5140 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5141 LDFLAGS="$LDFLAGS -Zhigh-mem"
5142 cat >> confdefs.h <<\EOF
5143 #define MOZ_OS2_HIGH_MEMORY 1
5148 # GCC for OS/2 currently predefines these, but we don't want them
5149 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5153 cat >> confdefs.h <<\EOF
5154 #define XP_UNIX 1
5159 esac
5161 if test -z "$SKIP_LIBRARY_CHECKS"; then
5165 case $target in
5166 *-darwin*|*-beos*|*-os2*)
5169 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5170 echo "configure:5171: checking for dlopen in -ldl" >&5
5171 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5172 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5173 echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175 ac_save_LIBS="$LIBS"
5176 LIBS="-ldl $LIBS"
5177 cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 /* Override any gcc2 internal prototype to avoid an error. */
5181 /* We use char because int might match the return type of a gcc2
5182 builtin and then its argument prototype would still apply. */
5183 char dlopen();
5185 int main() {
5186 dlopen()
5187 ; return 0; }
5189 if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5190 rm -rf conftest*
5191 eval "ac_cv_lib_$ac_lib_var=yes"
5192 else
5193 echo "configure: failed program was:" >&5
5194 cat conftest.$ac_ext >&5
5195 rm -rf conftest*
5196 eval "ac_cv_lib_$ac_lib_var=no"
5198 rm -f conftest*
5199 LIBS="$ac_save_LIBS"
5202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5203 echo "$ac_t""yes" 1>&6
5204 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5205 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5206 echo "configure:5207: checking for dlfcn.h" >&5
5207 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5208 echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 #include <dlfcn.h>
5215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5216 { (eval echo configure:5217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5218 if test -z "$ac_err"; then
5219 rm -rf conftest*
5220 eval "ac_cv_header_$ac_safe=yes"
5221 else
5222 echo "$ac_err" >&5
5223 echo "configure: failed program was:" >&5
5224 cat conftest.$ac_ext >&5
5225 rm -rf conftest*
5226 eval "ac_cv_header_$ac_safe=no"
5228 rm -f conftest*
5230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5231 echo "$ac_t""yes" 1>&6
5232 OS_LIBS="-ldl $OS_LIBS"
5233 else
5234 echo "$ac_t""no" 1>&6
5237 else
5238 echo "$ac_t""no" 1>&6
5242 esac
5247 if test $ac_cv_prog_gcc = yes; then
5248 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5249 echo "configure:5250: checking whether ${CC-cc} needs -traditional" >&5
5250 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5251 echo $ac_n "(cached) $ac_c" 1>&6
5252 else
5253 ac_pattern="Autoconf.*'x'"
5254 cat > conftest.$ac_ext <<EOF
5255 #line 5256 "configure"
5256 #include "confdefs.h"
5257 #include <sgtty.h>
5258 Autoconf TIOCGETP
5260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5261 egrep "$ac_pattern" >/dev/null 2>&1; then
5262 rm -rf conftest*
5263 ac_cv_prog_gcc_traditional=yes
5264 else
5265 rm -rf conftest*
5266 ac_cv_prog_gcc_traditional=no
5268 rm -f conftest*
5271 if test $ac_cv_prog_gcc_traditional = no; then
5272 cat > conftest.$ac_ext <<EOF
5273 #line 5274 "configure"
5274 #include "confdefs.h"
5275 #include <termio.h>
5276 Autoconf TCGETA
5278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5279 egrep "$ac_pattern" >/dev/null 2>&1; then
5280 rm -rf conftest*
5281 ac_cv_prog_gcc_traditional=yes
5283 rm -f conftest*
5288 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5289 if test $ac_cv_prog_gcc_traditional = yes; then
5290 CC="$CC -traditional"
5294 for ac_func in lchown strerror
5296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5297 echo "configure:5298: checking for $ac_func" >&5
5298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5299 echo $ac_n "(cached) $ac_c" 1>&6
5300 else
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304 /* System header to define __stub macros and hopefully few prototypes,
5305 which can conflict with char $ac_func(); below. */
5306 #include <assert.h>
5307 /* Override any gcc2 internal prototype to avoid an error. */
5308 /* We use char because int might match the return type of a gcc2
5309 builtin and then its argument prototype would still apply. */
5310 char $ac_func();
5312 int main() {
5314 /* The GNU C library defines this for functions which it implements
5315 to always fail with ENOSYS. Some functions are actually named
5316 something starting with __ and the normal name is an alias. */
5317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5318 choke me
5319 #else
5320 $ac_func();
5321 #endif
5323 ; return 0; }
5325 if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5326 rm -rf conftest*
5327 eval "ac_cv_func_$ac_func=yes"
5328 else
5329 echo "configure: failed program was:" >&5
5330 cat conftest.$ac_ext >&5
5331 rm -rf conftest*
5332 eval "ac_cv_func_$ac_func=no"
5334 rm -f conftest*
5337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5338 echo "$ac_t""yes" 1>&6
5339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5340 cat >> confdefs.h <<EOF
5341 #define $ac_tr_func 1
5344 else
5345 echo "$ac_t""no" 1>&6
5347 done
5352 # Check whether --enable-strip or --disable-strip was given.
5353 if test "${enable_strip+set}" = set; then
5354 enableval="$enable_strip"
5355 if test "$enableval" = "yes"; then
5356 ENABLE_STRIP=1
5361 case "${target_os}" in
5362 hpux*)
5363 if test -z "$GNU_CC"; then
5365 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5366 echo "configure:5367: checking for +Olit support" >&5
5367 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5368 echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370 ac_cv_hpux_usable_olit_option=no
5371 rm -f conftest*
5372 echo 'int main() { return 0; }' | cat > conftest.c
5373 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5374 if test $? -eq 0; then
5375 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5376 ac_cv_hpux_usable_olit_option=yes
5379 rm -f conftest*
5383 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5385 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5386 CFLAGS="$CFLAGS +Olit=all"
5387 CXXFLAGS="$CXXFLAGS +Olit=all"
5388 else
5389 CFLAGS="$CFLAGS +ESlit"
5390 CXXFLAGS="$CXXFLAGS +ESlit"
5394 esac
5398 case "$target_os" in
5399 darwin*)
5400 _HAVE_PTHREADS=1
5404 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5405 echo "configure:5406: checking for pthread_create in -lpthreads" >&5
5406 echo "
5407 #include <pthread.h>
5408 void *foo(void *v) { return v; }
5409 int main() {
5410 pthread_t t;
5411 if (!pthread_create(&t, 0, &foo, 0)) {
5412 pthread_join(t, 0);
5414 return 0;
5415 }" > dummy.c ;
5416 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5417 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5418 _res=$? ;
5419 rm -f dummy.c dummy${ac_exeext} ;
5420 if test "$_res" = "0"; then
5421 echo "$ac_t""yes" 1>&6
5422 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5423 else
5424 echo "$ac_t""no" 1>&6
5426 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5427 echo "configure:5428: checking for pthread_create in -lpthread" >&5
5428 echo "
5429 #include <pthread.h>
5430 void *foo(void *v) { return v; }
5431 int main() {
5432 pthread_t t;
5433 if (!pthread_create(&t, 0, &foo, 0)) {
5434 pthread_join(t, 0);
5436 return 0;
5437 }" > dummy.c ;
5438 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5439 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5440 _res=$? ;
5441 rm -f dummy.c dummy${ac_exeext} ;
5442 if test "$_res" = "0"; then
5443 echo "$ac_t""yes" 1>&6
5444 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5445 else
5446 echo "$ac_t""no" 1>&6
5448 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5449 echo "configure:5450: checking for pthread_create in -lc_r" >&5
5450 echo "
5451 #include <pthread.h>
5452 void *foo(void *v) { return v; }
5453 int main() {
5454 pthread_t t;
5455 if (!pthread_create(&t, 0, &foo, 0)) {
5456 pthread_join(t, 0);
5458 return 0;
5459 }" > dummy.c ;
5460 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5461 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5462 _res=$? ;
5463 rm -f dummy.c dummy${ac_exeext} ;
5464 if test "$_res" = "0"; then
5465 echo "$ac_t""yes" 1>&6
5466 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5467 else
5468 echo "$ac_t""no" 1>&6
5470 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5471 echo "configure:5472: checking for pthread_create in -lc" >&5
5472 echo "
5473 #include <pthread.h>
5474 void *foo(void *v) { return v; }
5475 int main() {
5476 pthread_t t;
5477 if (!pthread_create(&t, 0, &foo, 0)) {
5478 pthread_join(t, 0);
5480 return 0;
5481 }" > dummy.c ;
5482 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5483 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5484 _res=$? ;
5485 rm -f dummy.c dummy${ac_exeext} ;
5486 if test "$_res" = "0"; then
5487 echo "$ac_t""yes" 1>&6
5488 _HAVE_PTHREADS=1
5490 else
5491 echo "$ac_t""no" 1>&6
5505 esac
5507 # Check whether --with-pthreads or --without-pthreads was given.
5508 if test "${with_pthreads+set}" = set; then
5509 withval="$with_pthreads"
5510 if test "$withval" = "yes"; then
5511 if test -n "$_HAVE_PTHREADS"; then
5512 USE_PTHREADS=1
5513 USE_USER_PTHREADS=
5514 USE_NSPR_THREADS=
5515 else
5516 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5518 else
5519 USE_PTHREADS=
5520 _PTHREAD_LDFLAGS=
5522 else
5523 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5524 USE_PTHREADS=1
5525 USE_USER_PTHREADS=
5526 USE_NSPR_THREADS=
5531 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5532 if test "${enable_user_pthreads+set}" = set; then
5533 enableval="$enable_user_pthreads"
5534 if test "$enableval" = "yes"; then
5535 if test -n "$_HAVE_PTHREADS"; then
5536 USE_PTHREADS=
5537 USE_USER_PTHREADS=1
5538 USE_NSPR_THREADS=
5539 else
5540 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5546 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5547 if test "${enable_nspr_threads+set}" = set; then
5548 enableval="$enable_nspr_threads"
5549 if test "$enableval" = "yes"; then
5550 USE_PTHREADS=
5551 USE_USER_PTHREADS=
5552 USE_NSPR_THREADS=1
5557 case "$target" in
5558 *-beos*)
5559 # Check whether --with-bthreads or --without-bthreads was given.
5560 if test "${with_bthreads+set}" = set; then
5561 withval="$with_bthreads"
5562 if test "$withval" = "yes"; then
5563 USE_BTHREADS=1
5564 USE_USER_PTHREADS=
5565 USE_PTHREADS=
5570 esac
5572 fi # SKIP_LIBRARY_CHECKS
5574 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5575 if test "${enable_ipv6+set}" = set; then
5576 enableval="$enable_ipv6"
5577 if test "$enableval" = "yes"; then
5578 USE_IPV6=1
5579 else
5580 USE_IPV6=
5586 # Check whether --enable-boehm or --disable-boehm was given.
5587 if test "${enable_boehm+set}" = set; then
5588 enableval="$enable_boehm"
5589 if test "$enableval" = "yes"; then
5590 cat >> confdefs.h <<\EOF
5591 #define GC_LEAK_DETECTOR 1
5594 GC_LEAK_DETECTOR=1
5599 if test -n "$USE_PTHREADS"; then
5600 rm -f conftest*
5601 ac_cv_have_dash_pthread=no
5602 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5603 echo "configure:5604: checking whether ${CC-cc} accepts -pthread" >&5
5604 echo 'int main() { return 0; }' | cat > conftest.c
5605 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5606 if test $? -eq 0; then
5607 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5608 ac_cv_have_dash_pthread=yes
5609 case "$target_os" in
5610 freebsd*)
5611 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5614 CFLAGS="$CFLAGS -pthread"
5615 CXXFLAGS="$CXXFLAGS -pthread"
5617 esac
5620 rm -f conftest*
5621 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5623 ac_cv_have_dash_pthreads=no
5624 if test "$ac_cv_have_dash_pthread" = "no"; then
5625 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5626 echo "configure:5627: checking whether ${CC-cc} accepts -pthreads" >&5
5627 echo 'int main() { return 0; }' | cat > conftest.c
5628 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5629 if test $? -eq 0; then
5630 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5631 ac_cv_have_dash_pthreads=yes
5632 CFLAGS="$CFLAGS -pthreads"
5633 CXXFLAGS="$CXXFLAGS -pthreads"
5636 rm -f conftest*
5637 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5640 case "$target" in
5641 *-solaris*)
5642 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5643 _PTHREAD_LDFLAGS=
5646 *-freebsd*)
5647 cat >> confdefs.h <<\EOF
5648 #define _REENTRANT 1
5651 cat >> confdefs.h <<\EOF
5652 #define _THREAD_SAFE 1
5655 if test "$ac_cv_have_dash_pthread" = "yes"; then
5656 _PTHREAD_LDFLAGS="-pthread"
5657 else
5658 _PTHREAD_LDFLAGS="-lc_r"
5661 *-netbsd*)
5662 if test "$ac_cv_have_dash_pthread" = "yes"; then
5663 _PTHREAD_LDFLAGS="-pthread"
5666 *-bsdi*)
5667 cat >> confdefs.h <<\EOF
5668 #define _THREAD_SAFE 1
5671 if test "$ac_cv_have_dash_pthread" = "yes"; then
5672 _PTHREAD_LDFLAGS=
5675 *-openbsd*)
5676 if test "$ac_cv_have_dash_pthread" = "yes"; then
5677 _PTHREAD_LDFLAGS=-pthread
5680 *-linux*|*-gnu*|*-k*bsd*-gnu)
5681 cat >> confdefs.h <<\EOF
5682 #define _REENTRANT 1
5686 esac
5688 else
5689 if test -n "$USE_USER_PTHREADS"; then
5690 USE_PTHREADS=
5691 USE_NSPR_THREADS=
5692 else
5693 _PTHREAD_LDFLAGS=
5697 case "$target" in
5698 *-aix*)
5699 if test -n "$USE_NSPR_THREADS"; then
5700 cat >> confdefs.h <<\EOF
5701 #define _PR_LOCAL_THREADS_ONLY 1
5705 case "$target_os" in
5706 aix4.1*)
5707 if test -z "$USE_PTHREADS"; then
5708 cat >> confdefs.h <<\EOF
5709 #define AIX_RENAME_SELECT 1
5714 aix4.2*)
5715 if test -z "$USE_NSPR_THREADS"; then
5716 cat >> confdefs.h <<\EOF
5717 #define HAVE_POINTER_LOCALTIME_R 1
5722 aix4.3*)
5723 if test -z "$USE_NSPR_THREADS"; then
5724 cat >> confdefs.h <<\EOF
5725 #define HAVE_POINTER_LOCALTIME_R 1
5729 if test -n "$USE_PTHREADS"; then
5730 cat >> confdefs.h <<\EOF
5731 #define _PR_HAVE_THREADSAFE_GETHOST 1
5737 if test -z "$USE_NSPR_THREADS"; then
5738 cat >> confdefs.h <<\EOF
5739 #define HAVE_POINTER_LOCALTIME_R 1
5743 if test -n "$USE_PTHREADS"; then
5744 cat >> confdefs.h <<\EOF
5745 #define _PR_HAVE_THREADSAFE_GETHOST 1
5750 esac
5752 *-bsdi*)
5753 if test -n "$USE_PTHREADS"; then
5754 cat >> confdefs.h <<\EOF
5755 #define _PR_NEED_PTHREAD_INIT 1
5760 *-freebsd*)
5761 if test -n "$USE_NSPR_THREADS"; then
5762 cat >> confdefs.h <<\EOF
5763 #define _PR_LOCAL_THREADS_ONLY 1
5768 *-hpux*)
5769 if test -n "$USE_NSPR_THREADS"; then
5770 cat >> confdefs.h <<\EOF
5771 #define _PR_LOCAL_THREADS_ONLY 1
5775 if test "$USE_PTHREADS"; then
5776 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
5777 cat >> confdefs.h <<\EOF
5778 #define _REENTRANT 1
5781 cat >> confdefs.h <<\EOF
5782 #define _PR_DCETHREADS 1
5785 else
5786 cat >> confdefs.h <<EOF
5787 #define _POSIX_C_SOURCE 199506L
5790 cat >> confdefs.h <<\EOF
5791 #define _PR_HAVE_THREADSAFE_GETHOST 1
5796 if test "$USE_USER_PTHREADS"; then
5797 cat >> confdefs.h <<EOF
5798 #define _POSIX_C_SOURCE 199506L
5803 *-irix*)
5804 if test "${target_os}" = "irix6.5"; then
5805 if test -n "$USE_PTHREADS"; then
5806 cat >> confdefs.h <<\EOF
5807 #define _PR_HAVE_GETHOST_R 1
5810 cat >> confdefs.h <<\EOF
5811 #define _PR_HAVE_GETHOST_R_POINTER 1
5817 *-linux*|*-gnu*|*-k*bsd*-gnu)
5818 if test -n "$USE_NSPR_THREADS"; then
5819 cat >> confdefs.h <<\EOF
5820 #define _PR_LOCAL_THREADS_ONLY 1
5825 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
5826 USE_PTHREADS=
5827 _PTHREAD_LDFLAGS=
5828 USE_USER_PTHREADS=
5830 *-netbsd*|*-openbsd*)
5831 if test -n "$USE_NSPR_THREADS"; then
5832 cat >> confdefs.h <<\EOF
5833 #define _PR_LOCAL_THREADS_ONLY 1
5838 *-osf*)
5839 if test -n "$USE_NSPR_THREADS"; then
5840 cat >> confdefs.h <<\EOF
5841 #define _PR_LOCAL_THREADS_ONLY 1
5845 if test -n "$USE_PTHREADS"; then
5846 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
5848 else
5849 cat >> confdefs.h <<\EOF
5850 #define _PR_HAVE_THREADSAFE_GETHOST 1
5856 *-solaris*)
5857 if test -n "$USE_NSPR_THREADS"; then
5858 cat >> confdefs.h <<\EOF
5859 #define _PR_LOCAL_THREADS_ONLY 1
5863 if test -n "$USE_PTHREADS"; then
5864 cat >> confdefs.h <<\EOF
5865 #define _REENTRANT 1
5868 cat >> confdefs.h <<\EOF
5869 #define HAVE_POINTER_LOCALTIME_R 1
5872 if test "$OS_TEST" = "i86pc"; then
5873 if test -n "$USE_64"; then
5874 PR_MD_ASFILES=os_SunOS_x86_64.s
5875 else
5876 PR_MD_ASFILES=os_SunOS_x86.s
5878 else
5879 if test -n "$USE_64"; then
5880 PR_MD_ASFILES=os_SunOS_sparcv9.s
5885 *-nto*)
5886 if test -n "$USE_PTHREADS"; then
5887 cat >> confdefs.h <<\EOF
5888 #define _PR_HAVE_GETHOST_R 1
5891 cat >> confdefs.h <<\EOF
5892 #define _PR_HAVE_GETHOST_R_POINTER 1
5897 esac
5899 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
5901 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
5902 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
5905 if test -n "$_SAVE_DEBUG_FLAGS"; then
5906 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
5909 if test -n "$MOZ_OPTIMIZE"; then
5910 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
5911 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
5914 if test -n "$MOZ_DEBUG"; then
5915 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
5916 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
5919 if test -n "$MOZ_OPTIMIZE"; then
5920 OBJDIR_TAG=_OPT
5921 else
5922 OBJDIR_TAG=_DBG
5925 if test -n "$USE_64"; then
5926 COMPILER_TAG=_64
5929 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
5931 case "$target_os" in
5932 cygwin*|msvc*|mks*)
5933 CC="\$(CYGWIN_WRAPPER) $CC"
5934 CXX="\$(CYGWIN_WRAPPER) $CXX"
5935 RC="\$(CYGWIN_WRAPPER) $RC"
5937 esac
6036 MAKEFILES="
6037 Makefile
6038 config/Makefile
6039 config/autoconf.mk
6040 config/nsprincl.mk
6041 config/nsprincl.sh
6042 config/nspr-config
6043 lib/Makefile
6044 lib/ds/Makefile
6045 lib/libc/Makefile
6046 lib/libc/include/Makefile
6047 lib/libc/src/Makefile
6048 lib/tests/Makefile
6049 pkg/Makefile
6050 pkg/linux/Makefile
6051 pkg/solaris/Makefile
6052 pkg/solaris/SUNWpr/Makefile
6053 pkg/solaris/SUNWprd/Makefile
6054 pr/Makefile
6055 pr/include/Makefile
6056 pr/include/md/Makefile
6057 pr/include/obsolete/Makefile
6058 pr/include/private/Makefile
6059 pr/src/Makefile
6060 pr/src/io/Makefile
6061 pr/src/linking/Makefile
6062 pr/src/malloc/Makefile
6063 pr/src/md/Makefile
6064 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6065 pr/src/memory/Makefile
6066 pr/src/misc/Makefile
6067 pr/src/threads/Makefile
6068 pr/tests/Makefile
6069 pr/tests/dll/Makefile
6073 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6074 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
6075 elif test -n "$USE_PTHREADS"; then
6076 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
6077 elif test -n "$USE_BTHREADS"; then
6078 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
6081 if test -n "$USE_CPLUS"; then
6082 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
6085 echo $MAKEFILES > unallmakefiles
6087 trap '' 1 2 15
6088 cat > confcache <<\EOF
6089 # This file is a shell script that caches the results of configure
6090 # tests run on this system so they can be shared between configure
6091 # scripts and configure runs. It is not useful on other systems.
6092 # If it contains results you don't want to keep, you may remove or edit it.
6094 # By default, configure uses ./config.cache as the cache file,
6095 # creating it if it does not exist already. You can give configure
6096 # the --cache-file=FILE option to use a different cache file; that is
6097 # what configure does when it calls configure scripts in
6098 # subdirectories, so they share the cache.
6099 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6100 # config.status only pays attention to the cache file if you give it the
6101 # --recheck option to rerun configure.
6104 # The following way of writing the cache mishandles newlines in values,
6105 # but we know of no workaround that is simple, portable, and efficient.
6106 # So, don't put newlines in cache variables' values.
6107 # Ultrix sh set writes to stderr and can't be redirected directly,
6108 # and sets the high bit in the cache file unless we assign to the vars.
6109 (set) 2>&1 |
6110 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6111 *ac_space=\ *)
6112 # `set' does not quote correctly, so add quotes (double-quote substitution
6113 # turns \\\\ into \\, and sed turns \\ into \).
6114 sed -n \
6115 -e "s/'/'\\\\''/g" \
6116 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6119 # `set' quotes correctly as required by POSIX, so do not add quotes.
6120 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6122 esac >> confcache
6123 if cmp -s $cache_file confcache; then
6125 else
6126 if test -w $cache_file; then
6127 echo "updating cache $cache_file"
6128 cat confcache > $cache_file
6129 else
6130 echo "not updating unwritable cache $cache_file"
6133 rm -f confcache
6135 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6137 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6138 # Let make expand exec_prefix.
6139 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6141 # Any assignment to VPATH causes Sun make to only execute
6142 # the first set of double-colon rules, so remove it if not needed.
6143 # If there is a colon in the path, we need to keep it.
6144 if test "x$srcdir" = x.; then
6145 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6148 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6150 # Transform confdefs.h into DEFS.
6151 # Protect against shell expansion while executing Makefile rules.
6152 # Protect against Makefile macro expansion.
6153 cat > conftest.defs <<\EOF
6154 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6155 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6156 s%\[%\\&%g
6157 s%\]%\\&%g
6158 s%\$%$$%g
6160 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '` # Manually modified for MKS support.
6161 rm -f conftest.defs
6164 # Without the "./", some shells look in PATH for config.status.
6165 : ${CONFIG_STATUS=./config.status}
6167 echo creating $CONFIG_STATUS
6168 rm -f $CONFIG_STATUS
6169 cat > $CONFIG_STATUS <<EOF
6170 #! /bin/sh
6171 # Generated automatically by configure.
6172 # Run this file to recreate the current configuration.
6173 # This directory was configured as follows,
6174 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6176 # $0 $ac_configure_args
6178 # Compiler output produced by configure, useful for debugging
6179 # configure, is in ./config.log if it exists.
6181 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6182 for ac_option
6184 case "\$ac_option" in
6185 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6186 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6187 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6188 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6189 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6190 exit 0 ;;
6191 -help | --help | --hel | --he | --h)
6192 echo "\$ac_cs_usage"; exit 0 ;;
6193 *) echo "\$ac_cs_usage"; exit 1 ;;
6194 esac
6195 done
6197 ac_given_srcdir=$srcdir
6199 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6201 cat >> $CONFIG_STATUS <<EOF
6203 # Protect against being on the right side of a sed subst in config.status.
6204 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6205 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6206 $ac_vpsub
6207 $extrasub
6208 s%@SHELL@%$SHELL%g
6209 s%@CFLAGS@%$CFLAGS%g
6210 s%@CPPFLAGS@%$CPPFLAGS%g
6211 s%@CXXFLAGS@%$CXXFLAGS%g
6212 s%@FFLAGS@%$FFLAGS%g
6213 s%@DEFS@%$DEFS%g
6214 s%@LDFLAGS@%$LDFLAGS%g
6215 s%@LIBS@%$LIBS%g
6216 s%@exec_prefix@%$exec_prefix%g
6217 s%@prefix@%$prefix%g
6218 s%@program_transform_name@%$program_transform_name%g
6219 s%@bindir@%$bindir%g
6220 s%@sbindir@%$sbindir%g
6221 s%@libexecdir@%$libexecdir%g
6222 s%@datadir@%$datadir%g
6223 s%@sysconfdir@%$sysconfdir%g
6224 s%@sharedstatedir@%$sharedstatedir%g
6225 s%@localstatedir@%$localstatedir%g
6226 s%@libdir@%$libdir%g
6227 s%@includedir@%$includedir%g
6228 s%@oldincludedir@%$oldincludedir%g
6229 s%@infodir@%$infodir%g
6230 s%@mandir@%$mandir%g
6231 s%@host@%$host%g
6232 s%@host_alias@%$host_alias%g
6233 s%@host_cpu@%$host_cpu%g
6234 s%@host_vendor@%$host_vendor%g
6235 s%@host_os@%$host_os%g
6236 s%@target@%$target%g
6237 s%@target_alias@%$target_alias%g
6238 s%@target_cpu@%$target_cpu%g
6239 s%@target_vendor@%$target_vendor%g
6240 s%@target_os@%$target_os%g
6241 s%@build@%$build%g
6242 s%@build_alias@%$build_alias%g
6243 s%@build_cpu@%$build_cpu%g
6244 s%@build_vendor@%$build_vendor%g
6245 s%@build_os@%$build_os%g
6246 s%@CC@%$CC%g
6247 s%@dist_prefix@%$dist_prefix%g
6248 s%@dist_bindir@%$dist_bindir%g
6249 s%@dist_includedir@%$dist_includedir%g
6250 s%@dist_libdir@%$dist_libdir%g
6251 s%@WHOAMI@%$WHOAMI%g
6252 s%@HOST_CC@%$HOST_CC%g
6253 s%@CXX@%$CXX%g
6254 s%@RANLIB@%$RANLIB%g
6255 s%@AR@%$AR%g
6256 s%@AS@%$AS%g
6257 s%@LD@%$LD%g
6258 s%@STRIP@%$STRIP%g
6259 s%@WINDRES@%$WINDRES%g
6260 s%@CPP@%$CPP%g
6261 s%@PERL@%$PERL%g
6262 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6263 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6264 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6265 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6266 s%@GNU_CC@%$GNU_CC%g
6267 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6268 s%@MSC_VER@%$MSC_VER%g
6269 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6270 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6271 s%@USE_CPLUS@%$USE_CPLUS%g
6272 s%@USE_IPV6@%$USE_IPV6%g
6273 s%@USE_N32@%$USE_N32%g
6274 s%@USE_64@%$USE_64%g
6275 s%@OBJECT_MODE@%$OBJECT_MODE%g
6276 s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
6277 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6278 s%@USE_PTHREADS@%$USE_PTHREADS%g
6279 s%@USE_BTHREADS@%$USE_BTHREADS%g
6280 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6281 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6282 s%@LIBNSPR@%$LIBNSPR%g
6283 s%@LIBPLC@%$LIBPLC%g
6284 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6285 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6286 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6287 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6288 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6289 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6290 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6291 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6292 s%@CPU_ARCH@%$CPU_ARCH%g
6293 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6294 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6295 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6296 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6297 s%@MKSHLIB@%$MKSHLIB%g
6298 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6299 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6300 s%@OS_TARGET@%$OS_TARGET%g
6301 s%@OS_ARCH@%$OS_ARCH%g
6302 s%@OS_RELEASE@%$OS_RELEASE%g
6303 s%@OS_TEST@%$OS_TEST%g
6304 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6305 s%@DEFINES@%$DEFINES%g
6306 s%@AR_FLAGS@%$AR_FLAGS%g
6307 s%@ASFLAGS@%$ASFLAGS%g
6308 s%@FILTER@%$FILTER%g
6309 s%@IMPLIB@%$IMPLIB%g
6310 s%@OS_LIBS@%$OS_LIBS%g
6311 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6312 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6313 s%@NOSUCHFILE@%$NOSUCHFILE%g
6314 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6315 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6316 s%@OBJDIR@%$OBJDIR%g
6317 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6318 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6319 s%@NSINSTALL@%$NSINSTALL%g
6320 s%@OPTIMIZER@%$OPTIMIZER%g
6321 s%@RC@%$RC%g
6322 s%@RCFLAGS@%$RCFLAGS%g
6323 s%@DLLFLAGS@%$DLLFLAGS%g
6324 s%@EXEFLAGS@%$EXEFLAGS%g
6325 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6326 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6327 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6328 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6329 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6330 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6331 s%@NEXT_ROOT@%$NEXT_ROOT%g
6332 s%@MT@%$MT%g
6334 CEOF
6337 cat >> $CONFIG_STATUS <<\EOF
6339 # Split the substitutions into bite-sized pieces for seds with
6340 # small command number limits, like on Digital OSF/1 and HP-UX.
6341 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6342 ac_file=1 # Number of current file.
6343 ac_beg=1 # First line for current file.
6344 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6345 ac_more_lines=:
6346 ac_sed_cmds=""
6347 while $ac_more_lines; do
6348 if test $ac_beg -gt 1; then
6349 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6350 else
6351 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6353 if test ! -s conftest.s$ac_file; then
6354 ac_more_lines=false
6355 rm -f conftest.s$ac_file
6356 else
6357 if test -z "$ac_sed_cmds"; then
6358 ac_sed_cmds="sed -f conftest.s$ac_file"
6359 else
6360 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6362 ac_file=`expr $ac_file + 1`
6363 ac_beg=$ac_end
6364 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6366 done
6367 if test -z "$ac_sed_cmds"; then
6368 ac_sed_cmds=cat
6372 cat >> $CONFIG_STATUS <<EOF
6374 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6376 cat >> $CONFIG_STATUS <<\EOF
6377 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6378 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6379 case "$ac_file" in
6380 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6381 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6382 *) ac_file_in="${ac_file}.in" ;;
6383 esac
6385 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6387 # Remove last slash and all that follows it. Not all systems have dirname.
6388 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6389 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6390 # The file is in a subdirectory.
6391 test ! -d "$ac_dir" && mkdir "$ac_dir"
6392 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6393 # A "../" for each directory in $ac_dir_suffix.
6394 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6395 else
6396 ac_dir_suffix= ac_dots=
6399 case "$ac_given_srcdir" in
6400 .) srcdir=.
6401 if test -z "$ac_dots"; then top_srcdir=.
6402 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6403 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6404 *) # Relative path.
6405 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6406 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6407 esac
6410 echo creating "$ac_file"
6411 rm -f "$ac_file"
6412 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6413 case "$ac_file" in
6414 *Makefile*) ac_comsub="1i\\
6415 # $configure_input" ;;
6416 *) ac_comsub= ;;
6417 esac
6419 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6420 sed -e "$ac_comsub
6421 s%@configure_input@%$configure_input%g
6422 s%@srcdir@%$srcdir%g
6423 s%@top_srcdir@%$top_srcdir%g
6424 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6425 fi; done
6426 rm -f conftest.s*
6429 cat >> $CONFIG_STATUS <<EOF
6432 cat >> $CONFIG_STATUS <<\EOF
6433 chmod +x config/nspr-config
6434 exit 0
6436 chmod +x $CONFIG_STATUS
6437 rm -fr confdefs* $ac_clean_files
6438 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1