Bug 469739 - Add support for displaying Vista UAC shield icon; r=joe sr=vladimir
[wine-gecko.git] / nsprpub / configure
blobeda8c02b5b1052c882481ef8ae1c7da7b10e4403
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-debug-rtl Use the MSVC debug runtime library"
36 ac_help="$ac_help
37 --enable-n32 Enable n32 ABI support (IRIX only)"
38 ac_help="$ac_help
39 --enable-64bit Enable 64-bit support (on certain platforms)"
40 ac_help="$ac_help
41 --enable-mdupdate Enable use of certain compilers' mdupdate feature"
42 ac_help="$ac_help
43 --enable-cplus Enable some c++ api routines"
44 ac_help="$ac_help
45 --with-arm-kuser Use kuser helpers (Linux/ARM only)
46 (Requires kernel 2.6.13 or later)"
47 ac_help="$ac_help
48 --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
49 ac_help="$ac_help
50 --enable-macos-target=VER
51 Set the minimum MacOS version needed at runtime
52 [10.2 for ppc, 10.4 for x86]"
53 ac_help="$ac_help
54 --disable-os2-high-mem Disable high-memory support on OS/2"
55 ac_help="$ac_help
56 --enable-strip Enable stripping of shared libs and programs"
57 ac_help="$ac_help
58 --with-pthreads Use system pthreads library as thread subsystem"
59 ac_help="$ac_help
60 --enable-user-pthreads Build using userland pthreads"
61 ac_help="$ac_help
62 --enable-nspr-threads Build using classic nspr threads"
63 ac_help="$ac_help
64 --with-bthreads Use system bthreads library as thread subsystem
65 (BeOS only)"
66 ac_help="$ac_help
67 --enable-ipv6 Compile ipv6 support"
68 ac_help="$ac_help
69 --enable-boehm Enable the Boehm Garbage Collector"
71 # Initialize some variables set by options.
72 # The variables have the same names as the options, with
73 # dashes changed to underlines.
74 build=NONE
75 cache_file=./config.cache
76 exec_prefix=NONE
77 host=NONE
78 no_create=
79 nonopt=NONE
80 no_recursion=
81 prefix=NONE
82 program_prefix=NONE
83 program_suffix=NONE
84 program_transform_name=s,x,x,
85 silent=
86 site=
87 srcdir=
88 target=NONE
89 verbose=
90 x_includes=NONE
91 x_libraries=NONE
92 bindir='${exec_prefix}/bin'
93 sbindir='${exec_prefix}/sbin'
94 libexecdir='${exec_prefix}/libexec'
95 datadir='${prefix}/share'
96 sysconfdir='${prefix}/etc'
97 sharedstatedir='${prefix}/com'
98 localstatedir='${prefix}/var'
99 libdir='${exec_prefix}/lib'
100 includedir='${prefix}/include'
101 oldincludedir='/usr/include'
102 infodir='${prefix}/info'
103 mandir='${prefix}/man'
105 # Initialize some other variables.
106 subdirs=
107 MFLAGS= MAKEFLAGS=
108 SHELL=${CONFIG_SHELL-/bin/sh}
109 # Maximum number of lines to put in a shell here document.
110 ac_max_here_lines=12
112 ac_prev=
113 for ac_option
116 # If the previous option needs an argument, assign it.
117 if test -n "$ac_prev"; then
118 eval "$ac_prev=\$ac_option"
119 ac_prev=
120 continue
123 case "$ac_option" in
124 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
125 *) ac_optarg= ;;
126 esac
128 # Accept the important Cygnus configure options, so we can diagnose typos.
130 case "$ac_option" in
132 -bindir | --bindir | --bindi | --bind | --bin | --bi)
133 ac_prev=bindir ;;
134 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
135 bindir="$ac_optarg" ;;
137 -build | --build | --buil | --bui | --bu)
138 ac_prev=build ;;
139 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
140 build="$ac_optarg" ;;
142 -cache-file | --cache-file | --cache-fil | --cache-fi \
143 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
144 ac_prev=cache_file ;;
145 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
146 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
147 cache_file="$ac_optarg" ;;
149 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
150 ac_prev=datadir ;;
151 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
152 | --da=*)
153 datadir="$ac_optarg" ;;
155 -disable-* | --disable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
157 # Reject names that are not valid shell variable names.
158 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 eval "enable_${ac_feature}=no" ;;
164 -enable-* | --enable-*)
165 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
166 # Reject names that are not valid shell variable names.
167 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
168 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
170 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171 case "$ac_option" in
172 *=*) ;;
173 *) ac_optarg=yes ;;
174 esac
175 eval "enable_${ac_feature}='$ac_optarg'" ;;
177 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
178 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
179 | --exec | --exe | --ex)
180 ac_prev=exec_prefix ;;
181 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
182 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
183 | --exec=* | --exe=* | --ex=*)
184 exec_prefix="$ac_optarg" ;;
186 -gas | --gas | --ga | --g)
187 # Obsolete; use --with-gas.
188 with_gas=yes ;;
190 -help | --help | --hel | --he)
191 # Omit some internal or obsolete options to make the list less imposing.
192 # This message is too long to be a string in the A/UX 3.1 sh.
193 cat << EOF
194 Usage: configure [options] [host]
195 Options: [defaults in brackets after descriptions]
196 Configuration:
197 --cache-file=FILE cache test results in FILE
198 --help print this message
199 --no-create do not create output files
200 --quiet, --silent do not print \`checking...' messages
201 --version print the version of autoconf that created configure
202 Directory and file names:
203 --prefix=PREFIX install architecture-independent files in PREFIX
204 [$ac_default_prefix]
205 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
206 [same as prefix]
207 --bindir=DIR user executables in DIR [EPREFIX/bin]
208 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
209 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
210 --datadir=DIR read-only architecture-independent data in DIR
211 [PREFIX/share]
212 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
213 --sharedstatedir=DIR modifiable architecture-independent data in DIR
214 [PREFIX/com]
215 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
216 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
217 --includedir=DIR C header files in DIR [PREFIX/include]
218 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
219 --infodir=DIR info documentation in DIR [PREFIX/info]
220 --mandir=DIR man documentation in DIR [PREFIX/man]
221 --srcdir=DIR find the sources in DIR [configure dir or ..]
222 --program-prefix=PREFIX prepend PREFIX to installed program names
223 --program-suffix=SUFFIX append SUFFIX to installed program names
224 --program-transform-name=PROGRAM
225 run sed PROGRAM on installed program names
227 cat << EOF
228 Host type:
229 --build=BUILD configure for building on BUILD [BUILD=HOST]
230 --host=HOST configure for HOST [guessed]
231 --target=TARGET configure for TARGET [TARGET=HOST]
232 Features and packages:
233 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
234 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
235 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
236 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
237 --x-includes=DIR X include files are in DIR
238 --x-libraries=DIR X library files are in DIR
240 if test -n "$ac_help"; then
241 echo "--enable and --with options recognized:$ac_help"
243 exit 0 ;;
245 -host | --host | --hos | --ho)
246 ac_prev=host ;;
247 -host=* | --host=* | --hos=* | --ho=*)
248 host="$ac_optarg" ;;
250 -includedir | --includedir | --includedi | --included | --include \
251 | --includ | --inclu | --incl | --inc)
252 ac_prev=includedir ;;
253 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
254 | --includ=* | --inclu=* | --incl=* | --inc=*)
255 includedir="$ac_optarg" ;;
257 -infodir | --infodir | --infodi | --infod | --info | --inf)
258 ac_prev=infodir ;;
259 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
260 infodir="$ac_optarg" ;;
262 -libdir | --libdir | --libdi | --libd)
263 ac_prev=libdir ;;
264 -libdir=* | --libdir=* | --libdi=* | --libd=*)
265 libdir="$ac_optarg" ;;
267 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
268 | --libexe | --libex | --libe)
269 ac_prev=libexecdir ;;
270 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
271 | --libexe=* | --libex=* | --libe=*)
272 libexecdir="$ac_optarg" ;;
274 -localstatedir | --localstatedir | --localstatedi | --localstated \
275 | --localstate | --localstat | --localsta | --localst \
276 | --locals | --local | --loca | --loc | --lo)
277 ac_prev=localstatedir ;;
278 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
279 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
280 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
281 localstatedir="$ac_optarg" ;;
283 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
284 ac_prev=mandir ;;
285 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
286 mandir="$ac_optarg" ;;
288 -nfp | --nfp | --nf)
289 # Obsolete; use --without-fp.
290 with_fp=no ;;
292 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
293 | --no-cr | --no-c)
294 no_create=yes ;;
296 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
297 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
298 no_recursion=yes ;;
300 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
301 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
302 | --oldin | --oldi | --old | --ol | --o)
303 ac_prev=oldincludedir ;;
304 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
305 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
306 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
307 oldincludedir="$ac_optarg" ;;
309 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
310 ac_prev=prefix ;;
311 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
312 prefix="$ac_optarg" ;;
314 -program-prefix | --program-prefix | --program-prefi | --program-pref \
315 | --program-pre | --program-pr | --program-p)
316 ac_prev=program_prefix ;;
317 -program-prefix=* | --program-prefix=* | --program-prefi=* \
318 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
319 program_prefix="$ac_optarg" ;;
321 -program-suffix | --program-suffix | --program-suffi | --program-suff \
322 | --program-suf | --program-su | --program-s)
323 ac_prev=program_suffix ;;
324 -program-suffix=* | --program-suffix=* | --program-suffi=* \
325 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
326 program_suffix="$ac_optarg" ;;
328 -program-transform-name | --program-transform-name \
329 | --program-transform-nam | --program-transform-na \
330 | --program-transform-n | --program-transform- \
331 | --program-transform | --program-transfor \
332 | --program-transfo | --program-transf \
333 | --program-trans | --program-tran \
334 | --progr-tra | --program-tr | --program-t)
335 ac_prev=program_transform_name ;;
336 -program-transform-name=* | --program-transform-name=* \
337 | --program-transform-nam=* | --program-transform-na=* \
338 | --program-transform-n=* | --program-transform-=* \
339 | --program-transform=* | --program-transfor=* \
340 | --program-transfo=* | --program-transf=* \
341 | --program-trans=* | --program-tran=* \
342 | --progr-tra=* | --program-tr=* | --program-t=*)
343 program_transform_name="$ac_optarg" ;;
345 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
346 | -silent | --silent | --silen | --sile | --sil)
347 silent=yes ;;
349 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
350 ac_prev=sbindir ;;
351 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
352 | --sbi=* | --sb=*)
353 sbindir="$ac_optarg" ;;
355 -sharedstatedir | --sharedstatedir | --sharedstatedi \
356 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
357 | --sharedst | --shareds | --shared | --share | --shar \
358 | --sha | --sh)
359 ac_prev=sharedstatedir ;;
360 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
361 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
362 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
363 | --sha=* | --sh=*)
364 sharedstatedir="$ac_optarg" ;;
366 -site | --site | --sit)
367 ac_prev=site ;;
368 -site=* | --site=* | --sit=*)
369 site="$ac_optarg" ;;
371 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
372 ac_prev=srcdir ;;
373 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
374 srcdir="$ac_optarg" ;;
376 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
377 | --syscon | --sysco | --sysc | --sys | --sy)
378 ac_prev=sysconfdir ;;
379 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
380 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
381 sysconfdir="$ac_optarg" ;;
383 -target | --target | --targe | --targ | --tar | --ta | --t)
384 ac_prev=target ;;
385 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
386 target="$ac_optarg" ;;
388 -v | -verbose | --verbose | --verbos | --verbo | --verb)
389 verbose=yes ;;
391 -version | --version | --versio | --versi | --vers)
392 echo "configure generated by autoconf version 2.13"
393 exit 0 ;;
395 -with-* | --with-*)
396 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
397 # Reject names that are not valid shell variable names.
398 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
399 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
402 case "$ac_option" in
403 *=*) ;;
404 *) ac_optarg=yes ;;
405 esac
406 eval "with_${ac_package}='$ac_optarg'" ;;
408 -without-* | --without-*)
409 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
410 # Reject names that are not valid shell variable names.
411 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
412 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
414 ac_package=`echo $ac_package| sed 's/-/_/g'`
415 eval "with_${ac_package}=no" ;;
417 --x)
418 # Obsolete; use --with-x.
419 with_x=yes ;;
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes="$ac_optarg" ;;
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries="$ac_optarg" ;;
435 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
439 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
440 echo "configure: warning: $ac_option: invalid host type" 1>&2
442 if test "x$nonopt" != xNONE; then
443 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
445 nonopt="$ac_option"
448 esac
449 done
451 if test -n "$ac_prev"; then
452 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
457 # File descriptor usage:
458 # 0 standard input
459 # 1 file creation
460 # 2 errors and warnings
461 # 3 some systems may open it to /dev/tty
462 # 4 used on the Kubota Titan
463 # 6 checking for... messages and results
464 # 5 compiler messages saved in config.log
465 if test "$silent" = yes; then
466 exec 6>/dev/null
467 else
468 exec 6>&1
470 exec 5>./config.log
472 echo "\
473 This file contains any messages produced by compilers while
474 running configure, to aid debugging if configure makes a mistake.
475 " 1>&5
477 # Strip out --no-create and --no-recursion so they do not pile up.
478 # Also quote any args containing shell metacharacters.
479 ac_configure_args=
480 for ac_arg
482 case "$ac_arg" in
483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484 | --no-cr | --no-c) ;;
485 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
486 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
487 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
488 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
489 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
490 esac
491 done
493 # NLS nuisances.
494 # Only set these to C if already set. These must not be set unconditionally
495 # because not all systems understand e.g. LANG=C (notably SCO).
496 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
497 # Non-C LC_CTYPE values break the ctype check.
498 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
499 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
500 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
501 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
503 # confdefs.h avoids OS command line length limits that DEFS can exceed.
504 rm -rf conftest* confdefs.h
505 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
506 echo > confdefs.h
508 # A filename unique to this package, relative to the directory that
509 # configure is in, which we can look for to find out if srcdir is correct.
510 ac_unique_file=config/libc_r.h
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
516 ac_prog=$0
517 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519 srcdir=$ac_confdir
520 if test ! -r $srcdir/$ac_unique_file; then
521 srcdir=..
523 else
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
529 else
530 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
535 # Prefer explicitly selected file to automatically selected ones.
536 if test -z "$CONFIG_SITE"; then
537 if test "x$prefix" != xNONE; then
538 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
539 else
540 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
543 for ac_site_file in $CONFIG_SITE; do
544 if test -r "$ac_site_file"; then
545 echo "loading site script $ac_site_file"
546 . "$ac_site_file"
548 done
550 if test -r "$cache_file"; then
551 echo "loading cache $cache_file"
552 . $cache_file
553 else
554 echo "creating cache $cache_file"
555 > $cache_file
558 ac_ext=c
559 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
560 ac_cpp='$CPP $CPPFLAGS'
561 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
562 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
563 cross_compiling=$ac_cv_prog_cc_cross
565 ac_exeext=
566 ac_objext=o
567 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
568 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
569 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
570 ac_n= ac_c='
571 ' ac_t=' '
572 else
573 ac_n=-n ac_c= ac_t=
575 else
576 ac_n= ac_c='\c' ac_t=
581 ac_aux_dir=
582 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
583 if test -f $ac_dir/install-sh; then
584 ac_aux_dir=$ac_dir
585 ac_install_sh="$ac_aux_dir/install-sh -c"
586 break
587 elif test -f $ac_dir/install.sh; then
588 ac_aux_dir=$ac_dir
589 ac_install_sh="$ac_aux_dir/install.sh -c"
590 break
592 done
593 if test -z "$ac_aux_dir"; then
594 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
596 ac_config_guess=$ac_aux_dir/config.guess
597 ac_config_sub=$ac_aux_dir/config.sub
598 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
601 # Do some error checking and defaulting for the host and target type.
602 # The inputs are:
603 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
605 # The rules are:
606 # 1. You are not allowed to specify --host, --target, and nonopt at the
607 # same time.
608 # 2. Host defaults to nonopt.
609 # 3. If nonopt is not specified, then host defaults to the current host,
610 # as determined by config.guess.
611 # 4. Target and build default to nonopt.
612 # 5. If nonopt is not specified, then target and build default to host.
614 # The aliases save the names the user supplied, while $host etc.
615 # will get canonicalized.
616 case $host---$target---$nonopt in
617 NONE---*---* | *---NONE---* | *---*---NONE) ;;
618 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
619 esac
622 # Make sure we can run config.sub.
623 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
624 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
627 echo $ac_n "checking host system type""... $ac_c" 1>&6
628 echo "configure:629: checking host system type" >&5
630 host_alias=$host
631 case "$host_alias" in
632 NONE)
633 case $nonopt in
634 NONE)
635 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
636 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
637 fi ;;
638 *) host_alias=$nonopt ;;
639 esac ;;
640 esac
642 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
643 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646 echo "$ac_t""$host" 1>&6
648 echo $ac_n "checking target system type""... $ac_c" 1>&6
649 echo "configure:650: checking target system type" >&5
651 target_alias=$target
652 case "$target_alias" in
653 NONE)
654 case $nonopt in
655 NONE) target_alias=$host_alias ;;
656 *) target_alias=$nonopt ;;
657 esac ;;
658 esac
660 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
661 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
662 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
663 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
664 echo "$ac_t""$target" 1>&6
666 echo $ac_n "checking build system type""... $ac_c" 1>&6
667 echo "configure:668: checking build system type" >&5
669 build_alias=$build
670 case "$build_alias" in
671 NONE)
672 case $nonopt in
673 NONE) build_alias=$host_alias ;;
674 *) build_alias=$nonopt ;;
675 esac ;;
676 esac
678 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
679 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
680 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
681 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
682 echo "$ac_t""$build" 1>&6
684 test "$host_alias" != "$target_alias" &&
685 test "$program_prefix$program_suffix$program_transform_name" = \
686 NONENONEs,x,x, &&
687 program_prefix=${target_alias}-
690 MOD_MAJOR_VERSION=4
691 MOD_MINOR_VERSION=7
692 MOD_PATCH_VERSION=4
693 NSPR_MODNAME=nspr20
694 _HAVE_PTHREADS=
695 USE_PTHREADS=
696 USE_USER_PTHREADS=
697 USE_NSPR_THREADS=
698 USE_N32=
699 USE_64=
700 USE_CPLUS=
701 USE_IPV6=
702 USE_MDUPDATE=
703 _MACOSX_DEPLOYMENT_TARGET=
704 _OPTIMIZE_FLAGS=-O
705 _DEBUG_FLAGS=-g
706 MOZ_DEBUG=1
707 MOZ_OPTIMIZE=
708 OBJDIR='$(OBJDIR_NAME)'
709 OBJDIR_NAME=.
710 OBJDIR_SUFFIX=OBJ
711 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
712 NOSUCHFILE=/no-such-file
713 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
714 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
715 CYGWIN_WRAPPER=
716 MACOS_SDK_DIR=
717 NEXT_ROOT=
719 MOZ_OS2_HIGH_MEMORY=1
721 RESOLVE_LINK_SYMBOLS=
723 CFLAGS="${CFLAGS=}"
724 CXXFLAGS="${CXXFLAGS=}"
725 LDFLAGS="${LDFLAGS=}"
726 DLLFLAGS="${DLLFLAGS=}"
727 HOST_CFLAGS="${HOST_CFLAGS=}"
728 HOST_LDFLAGS="${HOST_LDFLAGS=}"
730 case "$target" in
731 *-cygwin*|*-mingw*)
732 # Check to see if we are really running in a msvc environemnt
733 _WIN32_MSVC=
734 for ac_prog in cl
736 # Extract the first word of "$ac_prog", so it can be a program name with args.
737 set dummy $ac_prog; ac_word=$2
738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
739 echo "configure:740: checking for $ac_word" >&5
740 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
741 echo $ac_n "(cached) $ac_c" 1>&6
742 else
743 if test -n "$CC"; then
744 ac_cv_prog_CC="$CC" # Let the user override the test.
745 else
746 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
747 ac_dummy="$PATH"
748 for ac_dir in $ac_dummy; do
749 test -z "$ac_dir" && ac_dir=.
750 if test -f $ac_dir/$ac_word; then
751 ac_cv_prog_CC="$ac_prog"
752 break
754 done
755 IFS="$ac_save_ifs"
758 CC="$ac_cv_prog_CC"
759 if test -n "$CC"; then
760 echo "$ac_t""$CC" 1>&6
761 else
762 echo "$ac_t""no" 1>&6
765 test -n "$CC" && break
766 done
768 if test "$CC" = "cl"; then
769 echo 'main() { return 0; }' > dummy.c
770 ${CC} -o dummy dummy.c >/dev/null 2>&1
771 if test $? = 0; then
772 _WIN32_MSVC=1
773 CXX=$CC
774 else
775 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
777 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
780 *-msvc*)
781 _WIN32_MSVC=1
783 *-mks*)
784 _WIN32_MSVC=1
786 esac
788 if test -n "$_WIN32_MSVC"; then
789 SKIP_PATH_CHECKS=1
790 SKIP_COMPILER_CHECKS=1
791 SKIP_LIBRARY_CHECKS=1
794 dist_prefix='${MOD_DEPTH}/dist'
795 dist_bindir='${dist_prefix}/bin'
796 dist_includedir='${dist_prefix}/include/nspr'
797 dist_libdir='${dist_prefix}/lib'
798 if test "${includedir}" = '${prefix}/include'; then
799 includedir='${prefix}/include/nspr'
802 # Check whether --with-dist-prefix or --without-dist-prefix was given.
803 if test "${with_dist_prefix+set}" = set; then
804 withval="$with_dist_prefix"
805 dist_prefix=$withval
809 # Check whether --with-dist-bindir or --without-dist-bindir was given.
810 if test "${with_dist_bindir+set}" = set; then
811 withval="$with_dist_bindir"
812 dist_bindir=$withval
816 # Check whether --with-dist-includedir or --without-dist-includedir was given.
817 if test "${with_dist_includedir+set}" = set; then
818 withval="$with_dist_includedir"
819 dist_includedir=$withval
823 # Check whether --with-dist-libdir or --without-dist-libdir was given.
824 if test "${with_dist_libdir+set}" = set; then
825 withval="$with_dist_libdir"
826 dist_libdir=$withval
835 # Check whether --with-mozilla or --without-mozilla was given.
836 if test "${with_mozilla+set}" = set; then
837 withval="$with_mozilla"
838 if test "$withval" = "yes"; then
839 cat >> confdefs.h <<\EOF
840 #define MOZILLA_CLIENT 1
843 MOZILLA_CLIENT=1
844 else
845 MOZILLA_CLIENT=
847 else
848 if test -n "$MOZILLA_CLIENT"; then
849 cat >> confdefs.h <<\EOF
850 #define MOZILLA_CLIENT 1
857 # Check whether --enable-optimize or --disable-optimize was given.
858 if test "${enable_optimize+set}" = set; then
859 enableval="$enable_optimize"
860 if test "$enableval" != "no"; then
861 MOZ_OPTIMIZE=1
862 if test -n "$enableval" && test "$enableval" != "yes"; then
863 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
864 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
866 else
867 MOZ_OPTIMIZE=
872 # Check whether --enable-debug or --disable-debug was given.
873 if test "${enable_debug+set}" = set; then
874 enableval="$enable_debug"
875 if test "$enableval" = "no"; then
876 MOZ_DEBUG=
877 else
878 MOZ_DEBUG=1
879 if test -n "$enableval" && test "$enableval" != "yes"; then
880 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
881 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
887 # Check whether --enable-win32-target or --disable-win32-target was given.
888 if test "${enable_win32_target+set}" = set; then
889 enableval="$enable_win32_target"
890 OS_TARGET=`echo $enableval | tr a-z A-Z`
891 else
892 OS_TARGET=
896 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
897 if test "${enable_debug_rtl+set}" = set; then
898 enableval="$enable_debug_rtl"
899 if test "$enableval" = "yes"; then
900 USE_DEBUG_RTL=1
905 # Check whether --enable-n32 or --disable-n32 was given.
906 if test "${enable_n32+set}" = set; then
907 enableval="$enable_n32"
908 if test "$enableval" = "yes"; then
909 USE_N32=1
910 else if test "$enableval" = "no"; then
911 USE_N32=
917 # Check whether --enable-64bit or --disable-64bit was given.
918 if test "${enable_64bit+set}" = set; then
919 enableval="$enable_64bit"
920 if test "$enableval" = "yes"; then
921 USE_64=1
926 # Check whether --enable-mdupdate or --disable-mdupdate was given.
927 if test "${enable_mdupdate+set}" = set; then
928 enableval="$enable_mdupdate"
929 if test "$enableval" = "yes"; then
930 USE_MDUPDATE=1
935 # Check whether --enable-cplus or --disable-cplus was given.
936 if test "${enable_cplus+set}" = set; then
937 enableval="$enable_cplus"
938 if test "$enableval" = "yes"; then
939 USE_CPLUS=1
944 # Check whether --with-arm-kuser or --without-arm-kuser was given.
945 if test "${with_arm_kuser+set}" = set; then
946 withval="$with_arm_kuser"
947 if test "$withval" = "yes"; then
948 cat >> confdefs.h <<\EOF
949 #define _PR_ARM_KUSER 1
956 # Check whether --with-macos-sdk or --without-macos-sdk was given.
957 if test "${with_macos_sdk+set}" = set; then
958 withval="$with_macos_sdk"
959 MACOS_SDK_DIR=$withval
963 # Check whether --enable-macos-target or --disable-macos-target was given.
964 if test "${enable_macos_target+set}" = set; then
965 enableval="$enable_macos_target"
966 _MACOSX_DEPLOYMENT_TARGET=$enableval
970 case "$target" in
972 *-aix*)
973 case "${target_os}" in
974 aix3.2*)
975 USE_NSPR_THREADS=1
978 USE_PTHREADS=1
980 esac
983 esac
985 if test -z "$CC"; then
986 case "$target" in
988 *-aix*)
989 if test -z "$USE_NSPR_THREADS"; then
990 CC=xlc_r
991 else
992 CC=xlc
996 *-hpux*)
997 CC=cc
1000 *-irix*)
1001 CC=cc
1004 *-openvms*)
1005 CC=cc
1008 *-osf*)
1009 CC=cc
1012 *-solaris*)
1013 CC=cc
1016 esac
1019 if test -z "$CXX"; then
1020 case "$target" in
1022 *-aix*)
1023 if test -z "$USE_NSPR_THREADS"; then
1024 CXX=xlC_r
1025 else
1026 CXX=xlC
1030 *-hpux*)
1031 case "${target_os}" in
1032 hpux10.30)
1033 CXX=aCC
1035 hpux11.*)
1036 CXX=aCC
1039 CXX=CC
1041 esac
1044 *-irix*)
1045 CXX=CC
1048 *-openvms*)
1049 CXX=cxx
1052 *-osf*)
1053 CXX=cxx
1056 *-solaris*)
1057 CXX=CC
1060 esac
1063 if test -z "$SKIP_PATH_CHECKS"; then
1064 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1065 set dummy $WHOAMI whoami; ac_word=$2
1066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067 echo "configure:1068: checking for $ac_word" >&5
1068 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1069 echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071 case "$WHOAMI" in
1073 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1075 ?:/*)
1076 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1079 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1080 ac_dummy="$PATH"
1081 for ac_dir in $ac_dummy; do
1082 test -z "$ac_dir" && ac_dir=.
1083 if test -f $ac_dir/$ac_word; then
1084 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1085 break
1087 done
1088 IFS="$ac_save_ifs"
1089 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1091 esac
1093 WHOAMI="$ac_cv_path_WHOAMI"
1094 if test -n "$WHOAMI"; then
1095 echo "$ac_t""$WHOAMI" 1>&6
1096 else
1097 echo "$ac_t""no" 1>&6
1102 if test -n "$MOZ_DEBUG"; then
1103 cat >> confdefs.h <<\EOF
1104 #define DEBUG 1
1107 DEFINES="$DEFINES -UNDEBUG"
1109 case "${target_os}" in
1110 beos*)
1111 DEFINES="$DEFINES -DDEBUG_${USER}"
1113 msvc*|mks*|cygwin*|mingw*|wince*|os2*)
1114 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1117 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1119 esac
1120 else
1121 cat >> confdefs.h <<\EOF
1122 #define NDEBUG 1
1125 DEFINES="$DEFINES -UDEBUG"
1128 if test -z "$SKIP_COMPILER_CHECKS"; then
1129 if test "$target" != "$host"; then
1130 echo "cross compiling from $host to $target"
1131 cross_compiling=yes
1133 _SAVE_CC="$CC"
1134 _SAVE_CFLAGS="$CFLAGS"
1135 _SAVE_LDFLAGS="$LDFLAGS"
1137 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1138 echo "configure:1139: checking for $host compiler" >&5
1139 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1141 # Extract the first word of "$ac_prog", so it can be a program name with args.
1142 set dummy $ac_prog; ac_word=$2
1143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1144 echo "configure:1145: checking for $ac_word" >&5
1145 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1146 echo $ac_n "(cached) $ac_c" 1>&6
1147 else
1148 if test -n "$HOST_CC"; then
1149 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1150 else
1151 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1152 ac_dummy="$PATH"
1153 for ac_dir in $ac_dummy; do
1154 test -z "$ac_dir" && ac_dir=.
1155 if test -f $ac_dir/$ac_word; then
1156 ac_cv_prog_HOST_CC="$ac_prog"
1157 break
1159 done
1160 IFS="$ac_save_ifs"
1163 HOST_CC="$ac_cv_prog_HOST_CC"
1164 if test -n "$HOST_CC"; then
1165 echo "$ac_t""$HOST_CC" 1>&6
1166 else
1167 echo "$ac_t""no" 1>&6
1170 test -n "$HOST_CC" && break
1171 done
1172 test -n "$HOST_CC" || HOST_CC=""""
1174 if test -z "$HOST_CC"; then
1175 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1177 echo "$ac_t""$HOST_CC" 1>&6
1178 if test -z "$HOST_CFLAGS"; then
1179 HOST_CFLAGS="$CFLAGS"
1181 if test -z "$HOST_LDFLAGS"; then
1182 HOST_LDFLAGS="$LDFLAGS"
1185 CC="$HOST_CC"
1186 CFLAGS="$HOST_CFLAGS"
1187 LDFLAGS="$HOST_LDFLAGS"
1189 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1191 cat > conftest.$ac_ext <<EOF
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1195 int main() {
1196 return(0);
1197 ; return 0; }
1199 if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1200 rm -rf conftest*
1201 ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1202 else
1203 echo "configure: failed program was:" >&5
1204 cat conftest.$ac_ext >&5
1205 rm -rf conftest*
1206 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1208 rm -f conftest*
1210 CC=$_SAVE_CC
1211 CFLAGS=$_SAVE_CFLAGS
1212 LDFLAGS=$_SAVE_LDFLAGS
1214 case "$build:$target" in
1215 powerpc-apple-darwin8*:i?86-apple-darwin*)
1216 _SAVE_CFLAGS=$CFLAGS
1217 _SAVE_CXXFLAGS=$CXXLAGS
1218 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1219 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1221 esac
1223 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1225 # Extract the first word of "$ac_prog", so it can be a program name with args.
1226 set dummy $ac_prog; ac_word=$2
1227 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1228 echo "configure:1229: checking for $ac_word" >&5
1229 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231 else
1232 if test -n "$CC"; then
1233 ac_cv_prog_CC="$CC" # Let the user override the test.
1234 else
1235 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1236 ac_dummy="$PATH"
1237 for ac_dir in $ac_dummy; do
1238 test -z "$ac_dir" && ac_dir=.
1239 if test -f $ac_dir/$ac_word; then
1240 ac_cv_prog_CC="$ac_prog"
1241 break
1243 done
1244 IFS="$ac_save_ifs"
1247 CC="$ac_cv_prog_CC"
1248 if test -n "$CC"; then
1249 echo "$ac_t""$CC" 1>&6
1250 else
1251 echo "$ac_t""no" 1>&6
1254 test -n "$CC" && break
1255 done
1256 test -n "$CC" || CC="echo"
1258 unset ac_cv_prog_CC
1259 # Extract the first word of "gcc", so it can be a program name with args.
1260 set dummy gcc; ac_word=$2
1261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1262 echo "configure:1263: checking for $ac_word" >&5
1263 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1264 echo $ac_n "(cached) $ac_c" 1>&6
1265 else
1266 if test -n "$CC"; then
1267 ac_cv_prog_CC="$CC" # Let the user override the test.
1268 else
1269 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1270 ac_dummy="$PATH"
1271 for ac_dir in $ac_dummy; do
1272 test -z "$ac_dir" && ac_dir=.
1273 if test -f $ac_dir/$ac_word; then
1274 ac_cv_prog_CC="gcc"
1275 break
1277 done
1278 IFS="$ac_save_ifs"
1281 CC="$ac_cv_prog_CC"
1282 if test -n "$CC"; then
1283 echo "$ac_t""$CC" 1>&6
1284 else
1285 echo "$ac_t""no" 1>&6
1288 if test -z "$CC"; then
1289 # Extract the first word of "cc", so it can be a program name with args.
1290 set dummy cc; ac_word=$2
1291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1292 echo "configure:1293: checking for $ac_word" >&5
1293 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296 if test -n "$CC"; then
1297 ac_cv_prog_CC="$CC" # Let the user override the test.
1298 else
1299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1300 ac_prog_rejected=no
1301 ac_dummy="$PATH"
1302 for ac_dir in $ac_dummy; do
1303 test -z "$ac_dir" && ac_dir=.
1304 if test -f $ac_dir/$ac_word; then
1305 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1306 ac_prog_rejected=yes
1307 continue
1309 ac_cv_prog_CC="cc"
1310 break
1312 done
1313 IFS="$ac_save_ifs"
1314 if test $ac_prog_rejected = yes; then
1315 # We found a bogon in the path, so make sure we never use it.
1316 set dummy $ac_cv_prog_CC
1317 shift
1318 if test $# -gt 0; then
1319 # We chose a different compiler from the bogus one.
1320 # However, it has the same basename, so the bogon will be chosen
1321 # first if we set CC to just the basename; use the full file name.
1322 shift
1323 set dummy "$ac_dir/$ac_word" "$@"
1324 shift
1325 ac_cv_prog_CC="$@"
1330 CC="$ac_cv_prog_CC"
1331 if test -n "$CC"; then
1332 echo "$ac_t""$CC" 1>&6
1333 else
1334 echo "$ac_t""no" 1>&6
1337 if test -z "$CC"; then
1338 case "`uname -s`" in
1339 *win32* | *WIN32*)
1340 # Extract the first word of "cl", so it can be a program name with args.
1341 set dummy cl; ac_word=$2
1342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1343 echo "configure:1344: checking for $ac_word" >&5
1344 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1345 echo $ac_n "(cached) $ac_c" 1>&6
1346 else
1347 if test -n "$CC"; then
1348 ac_cv_prog_CC="$CC" # Let the user override the test.
1349 else
1350 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1351 ac_dummy="$PATH"
1352 for ac_dir in $ac_dummy; do
1353 test -z "$ac_dir" && ac_dir=.
1354 if test -f $ac_dir/$ac_word; then
1355 ac_cv_prog_CC="cl"
1356 break
1358 done
1359 IFS="$ac_save_ifs"
1362 CC="$ac_cv_prog_CC"
1363 if test -n "$CC"; then
1364 echo "$ac_t""$CC" 1>&6
1365 else
1366 echo "$ac_t""no" 1>&6
1369 esac
1371 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1374 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1375 echo "configure:1376: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1377 ac_ext=c
1378 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1379 ac_cpp='$CPP $CPPFLAGS'
1380 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1381 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1382 cross_compiling=$ac_cv_prog_cc_cross
1384 cat > conftest.$ac_ext << EOF
1386 #line 1387 "configure"
1387 #include "confdefs.h"
1389 main(){return(0);}
1391 if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1392 ac_cv_prog_cc_works=yes
1393 # If we can't run a trivial program, we are probably using a cross compiler.
1394 if (./conftest; exit) 2>/dev/null; then
1395 ac_cv_prog_cc_cross=no
1396 else
1397 ac_cv_prog_cc_cross=yes
1399 else
1400 echo "configure: failed program was:" >&5
1401 cat conftest.$ac_ext >&5
1402 ac_cv_prog_cc_works=no
1404 rm -fr conftest*
1405 ac_ext=c
1406 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1409 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1410 cross_compiling=$ac_cv_prog_cc_cross
1412 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1413 if test $ac_cv_prog_cc_works = no; then
1414 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1416 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1417 echo "configure:1418: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1418 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1419 cross_compiling=$ac_cv_prog_cc_cross
1421 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1422 echo "configure:1423: checking whether we are using GNU C" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426 cat > conftest.c <<EOF
1427 #ifdef __GNUC__
1428 yes;
1429 #endif
1431 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1432 ac_cv_prog_gcc=yes
1433 else
1434 ac_cv_prog_gcc=no
1438 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1440 if test $ac_cv_prog_gcc = yes; then
1441 GCC=yes
1442 else
1443 GCC=
1446 ac_test_CFLAGS="${CFLAGS+set}"
1447 ac_save_CFLAGS="$CFLAGS"
1448 CFLAGS=
1449 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1450 echo "configure:1451: checking whether ${CC-cc} accepts -g" >&5
1451 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1452 echo $ac_n "(cached) $ac_c" 1>&6
1453 else
1454 echo 'void f(){}' > conftest.c
1455 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1456 ac_cv_prog_cc_g=yes
1457 else
1458 ac_cv_prog_cc_g=no
1460 rm -f conftest*
1464 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1465 if test "$ac_test_CFLAGS" = set; then
1466 CFLAGS="$ac_save_CFLAGS"
1467 elif test $ac_cv_prog_cc_g = yes; then
1468 if test "$GCC" = yes; then
1469 CFLAGS="-g -O2"
1470 else
1471 CFLAGS="-g"
1473 else
1474 if test "$GCC" = yes; then
1475 CFLAGS="-O2"
1476 else
1477 CFLAGS=
1481 if test -n "$USE_CPLUS"; then
1482 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1484 # Extract the first word of "$ac_prog", so it can be a program name with args.
1485 set dummy $ac_prog; ac_word=$2
1486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1487 echo "configure:1488: checking for $ac_word" >&5
1488 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1489 echo $ac_n "(cached) $ac_c" 1>&6
1490 else
1491 if test -n "$CXX"; then
1492 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1493 else
1494 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1495 ac_dummy="$PATH"
1496 for ac_dir in $ac_dummy; do
1497 test -z "$ac_dir" && ac_dir=.
1498 if test -f $ac_dir/$ac_word; then
1499 ac_cv_prog_CXX="$ac_prog"
1500 break
1502 done
1503 IFS="$ac_save_ifs"
1506 CXX="$ac_cv_prog_CXX"
1507 if test -n "$CXX"; then
1508 echo "$ac_t""$CXX" 1>&6
1509 else
1510 echo "$ac_t""no" 1>&6
1513 test -n "$CXX" && break
1514 done
1515 test -n "$CXX" || CXX="echo"
1517 unset ac_cv_prog_CXX
1518 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1520 # Extract the first word of "$ac_prog", so it can be a program name with args.
1521 set dummy $ac_prog; ac_word=$2
1522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1523 echo "configure:1524: checking for $ac_word" >&5
1524 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527 if test -n "$CXX"; then
1528 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1529 else
1530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1531 ac_dummy="$PATH"
1532 for ac_dir in $ac_dummy; do
1533 test -z "$ac_dir" && ac_dir=.
1534 if test -f $ac_dir/$ac_word; then
1535 ac_cv_prog_CXX="$ac_prog"
1536 break
1538 done
1539 IFS="$ac_save_ifs"
1542 CXX="$ac_cv_prog_CXX"
1543 if test -n "$CXX"; then
1544 echo "$ac_t""$CXX" 1>&6
1545 else
1546 echo "$ac_t""no" 1>&6
1549 test -n "$CXX" && break
1550 done
1551 test -n "$CXX" || CXX="gcc"
1554 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1555 echo "configure:1556: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1557 ac_ext=C
1558 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1559 ac_cpp='$CXXCPP $CPPFLAGS'
1560 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1561 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1562 cross_compiling=$ac_cv_prog_cxx_cross
1564 cat > conftest.$ac_ext << EOF
1566 #line 1567 "configure"
1567 #include "confdefs.h"
1569 int main(){return(0);}
1571 if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1572 ac_cv_prog_cxx_works=yes
1573 # If we can't run a trivial program, we are probably using a cross compiler.
1574 if (./conftest; exit) 2>/dev/null; then
1575 ac_cv_prog_cxx_cross=no
1576 else
1577 ac_cv_prog_cxx_cross=yes
1579 else
1580 echo "configure: failed program was:" >&5
1581 cat conftest.$ac_ext >&5
1582 ac_cv_prog_cxx_works=no
1584 rm -fr conftest*
1585 ac_ext=c
1586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1587 ac_cpp='$CPP $CPPFLAGS'
1588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1589 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1590 cross_compiling=$ac_cv_prog_cc_cross
1592 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1593 if test $ac_cv_prog_cxx_works = no; then
1594 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1596 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1597 echo "configure:1598: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1598 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1599 cross_compiling=$ac_cv_prog_cxx_cross
1601 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1602 echo "configure:1603: checking whether we are using GNU C++" >&5
1603 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606 cat > conftest.C <<EOF
1607 #ifdef __GNUC__
1608 yes;
1609 #endif
1611 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1612 ac_cv_prog_gxx=yes
1613 else
1614 ac_cv_prog_gxx=no
1618 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1620 if test $ac_cv_prog_gxx = yes; then
1621 GXX=yes
1622 else
1623 GXX=
1626 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1627 ac_save_CXXFLAGS="$CXXFLAGS"
1628 CXXFLAGS=
1629 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1630 echo "configure:1631: checking whether ${CXX-g++} accepts -g" >&5
1631 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1632 echo $ac_n "(cached) $ac_c" 1>&6
1633 else
1634 echo 'void f(){}' > conftest.cc
1635 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1636 ac_cv_prog_cxx_g=yes
1637 else
1638 ac_cv_prog_cxx_g=no
1640 rm -f conftest*
1644 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1645 if test "$ac_test_CXXFLAGS" = set; then
1646 CXXFLAGS="$ac_save_CXXFLAGS"
1647 elif test $ac_cv_prog_cxx_g = yes; then
1648 if test "$GXX" = yes; then
1649 CXXFLAGS="-g -O2"
1650 else
1651 CXXFLAGS="-g"
1653 else
1654 if test "$GXX" = yes; then
1655 CXXFLAGS="-O2"
1656 else
1657 CXXFLAGS=
1663 case "$build:$target" in
1664 powerpc-apple-darwin8*:i?86-apple-darwin*)
1665 CFLAGS=$_SAVE_CFLAGS
1666 CXXFLAGS=$_SAVE_CXXFLAGS
1668 esac
1670 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1672 # Extract the first word of "$ac_prog", so it can be a program name with args.
1673 set dummy $ac_prog; ac_word=$2
1674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1675 echo "configure:1676: checking for $ac_word" >&5
1676 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1677 echo $ac_n "(cached) $ac_c" 1>&6
1678 else
1679 if test -n "$RANLIB"; then
1680 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1681 else
1682 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1683 ac_dummy="$PATH"
1684 for ac_dir in $ac_dummy; do
1685 test -z "$ac_dir" && ac_dir=.
1686 if test -f $ac_dir/$ac_word; then
1687 ac_cv_prog_RANLIB="$ac_prog"
1688 break
1690 done
1691 IFS="$ac_save_ifs"
1694 RANLIB="$ac_cv_prog_RANLIB"
1695 if test -n "$RANLIB"; then
1696 echo "$ac_t""$RANLIB" 1>&6
1697 else
1698 echo "$ac_t""no" 1>&6
1701 test -n "$RANLIB" && break
1702 done
1703 test -n "$RANLIB" || RANLIB="echo"
1705 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1707 # Extract the first word of "$ac_prog", so it can be a program name with args.
1708 set dummy $ac_prog; ac_word=$2
1709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1710 echo "configure:1711: checking for $ac_word" >&5
1711 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1712 echo $ac_n "(cached) $ac_c" 1>&6
1713 else
1714 if test -n "$AR"; then
1715 ac_cv_prog_AR="$AR" # Let the user override the test.
1716 else
1717 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1718 ac_dummy="$PATH"
1719 for ac_dir in $ac_dummy; do
1720 test -z "$ac_dir" && ac_dir=.
1721 if test -f $ac_dir/$ac_word; then
1722 ac_cv_prog_AR="$ac_prog"
1723 break
1725 done
1726 IFS="$ac_save_ifs"
1729 AR="$ac_cv_prog_AR"
1730 if test -n "$AR"; then
1731 echo "$ac_t""$AR" 1>&6
1732 else
1733 echo "$ac_t""no" 1>&6
1736 test -n "$AR" && break
1737 done
1738 test -n "$AR" || AR="echo"
1740 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1742 # Extract the first word of "$ac_prog", so it can be a program name with args.
1743 set dummy $ac_prog; ac_word=$2
1744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1745 echo "configure:1746: checking for $ac_word" >&5
1746 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749 if test -n "$AS"; then
1750 ac_cv_prog_AS="$AS" # Let the user override the test.
1751 else
1752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1753 ac_dummy="$PATH"
1754 for ac_dir in $ac_dummy; do
1755 test -z "$ac_dir" && ac_dir=.
1756 if test -f $ac_dir/$ac_word; then
1757 ac_cv_prog_AS="$ac_prog"
1758 break
1760 done
1761 IFS="$ac_save_ifs"
1764 AS="$ac_cv_prog_AS"
1765 if test -n "$AS"; then
1766 echo "$ac_t""$AS" 1>&6
1767 else
1768 echo "$ac_t""no" 1>&6
1771 test -n "$AS" && break
1772 done
1773 test -n "$AS" || AS="echo"
1775 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
1777 # Extract the first word of "$ac_prog", so it can be a program name with args.
1778 set dummy $ac_prog; ac_word=$2
1779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1780 echo "configure:1781: checking for $ac_word" >&5
1781 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784 if test -n "$LD"; then
1785 ac_cv_prog_LD="$LD" # Let the user override the test.
1786 else
1787 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1788 ac_dummy="$PATH"
1789 for ac_dir in $ac_dummy; do
1790 test -z "$ac_dir" && ac_dir=.
1791 if test -f $ac_dir/$ac_word; then
1792 ac_cv_prog_LD="$ac_prog"
1793 break
1795 done
1796 IFS="$ac_save_ifs"
1799 LD="$ac_cv_prog_LD"
1800 if test -n "$LD"; then
1801 echo "$ac_t""$LD" 1>&6
1802 else
1803 echo "$ac_t""no" 1>&6
1806 test -n "$LD" && break
1807 done
1808 test -n "$LD" || LD="echo"
1810 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
1812 # Extract the first word of "$ac_prog", so it can be a program name with args.
1813 set dummy $ac_prog; ac_word=$2
1814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1815 echo "configure:1816: checking for $ac_word" >&5
1816 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818 else
1819 if test -n "$STRIP"; then
1820 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1821 else
1822 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1823 ac_dummy="$PATH"
1824 for ac_dir in $ac_dummy; do
1825 test -z "$ac_dir" && ac_dir=.
1826 if test -f $ac_dir/$ac_word; then
1827 ac_cv_prog_STRIP="$ac_prog"
1828 break
1830 done
1831 IFS="$ac_save_ifs"
1834 STRIP="$ac_cv_prog_STRIP"
1835 if test -n "$STRIP"; then
1836 echo "$ac_t""$STRIP" 1>&6
1837 else
1838 echo "$ac_t""no" 1>&6
1841 test -n "$STRIP" && break
1842 done
1843 test -n "$STRIP" || STRIP="echo"
1845 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
1847 # Extract the first word of "$ac_prog", so it can be a program name with args.
1848 set dummy $ac_prog; ac_word=$2
1849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1850 echo "configure:1851: checking for $ac_word" >&5
1851 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1853 else
1854 if test -n "$WINDRES"; then
1855 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
1856 else
1857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1858 ac_dummy="$PATH"
1859 for ac_dir in $ac_dummy; do
1860 test -z "$ac_dir" && ac_dir=.
1861 if test -f $ac_dir/$ac_word; then
1862 ac_cv_prog_WINDRES="$ac_prog"
1863 break
1865 done
1866 IFS="$ac_save_ifs"
1869 WINDRES="$ac_cv_prog_WINDRES"
1870 if test -n "$WINDRES"; then
1871 echo "$ac_t""$WINDRES" 1>&6
1872 else
1873 echo "$ac_t""no" 1>&6
1876 test -n "$WINDRES" && break
1877 done
1878 test -n "$WINDRES" || WINDRES="echo"
1881 else
1882 # Extract the first word of "gcc", so it can be a program name with args.
1883 set dummy gcc; ac_word=$2
1884 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1885 echo "configure:1886: checking for $ac_word" >&5
1886 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1887 echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889 if test -n "$CC"; then
1890 ac_cv_prog_CC="$CC" # Let the user override the test.
1891 else
1892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1893 ac_dummy="$PATH"
1894 for ac_dir in $ac_dummy; do
1895 test -z "$ac_dir" && ac_dir=.
1896 if test -f $ac_dir/$ac_word; then
1897 ac_cv_prog_CC="gcc"
1898 break
1900 done
1901 IFS="$ac_save_ifs"
1904 CC="$ac_cv_prog_CC"
1905 if test -n "$CC"; then
1906 echo "$ac_t""$CC" 1>&6
1907 else
1908 echo "$ac_t""no" 1>&6
1911 if test -z "$CC"; then
1912 # Extract the first word of "cc", so it can be a program name with args.
1913 set dummy cc; ac_word=$2
1914 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1915 echo "configure:1916: checking for $ac_word" >&5
1916 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1917 echo $ac_n "(cached) $ac_c" 1>&6
1918 else
1919 if test -n "$CC"; then
1920 ac_cv_prog_CC="$CC" # Let the user override the test.
1921 else
1922 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1923 ac_prog_rejected=no
1924 ac_dummy="$PATH"
1925 for ac_dir in $ac_dummy; do
1926 test -z "$ac_dir" && ac_dir=.
1927 if test -f $ac_dir/$ac_word; then
1928 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1929 ac_prog_rejected=yes
1930 continue
1932 ac_cv_prog_CC="cc"
1933 break
1935 done
1936 IFS="$ac_save_ifs"
1937 if test $ac_prog_rejected = yes; then
1938 # We found a bogon in the path, so make sure we never use it.
1939 set dummy $ac_cv_prog_CC
1940 shift
1941 if test $# -gt 0; then
1942 # We chose a different compiler from the bogus one.
1943 # However, it has the same basename, so the bogon will be chosen
1944 # first if we set CC to just the basename; use the full file name.
1945 shift
1946 set dummy "$ac_dir/$ac_word" "$@"
1947 shift
1948 ac_cv_prog_CC="$@"
1953 CC="$ac_cv_prog_CC"
1954 if test -n "$CC"; then
1955 echo "$ac_t""$CC" 1>&6
1956 else
1957 echo "$ac_t""no" 1>&6
1960 if test -z "$CC"; then
1961 case "`uname -s`" in
1962 *win32* | *WIN32*)
1963 # Extract the first word of "cl", so it can be a program name with args.
1964 set dummy cl; ac_word=$2
1965 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1966 echo "configure:1967: checking for $ac_word" >&5
1967 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1968 echo $ac_n "(cached) $ac_c" 1>&6
1969 else
1970 if test -n "$CC"; then
1971 ac_cv_prog_CC="$CC" # Let the user override the test.
1972 else
1973 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1974 ac_dummy="$PATH"
1975 for ac_dir in $ac_dummy; do
1976 test -z "$ac_dir" && ac_dir=.
1977 if test -f $ac_dir/$ac_word; then
1978 ac_cv_prog_CC="cl"
1979 break
1981 done
1982 IFS="$ac_save_ifs"
1985 CC="$ac_cv_prog_CC"
1986 if test -n "$CC"; then
1987 echo "$ac_t""$CC" 1>&6
1988 else
1989 echo "$ac_t""no" 1>&6
1992 esac
1994 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1997 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1998 echo "configure:1999: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2000 ac_ext=c
2001 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2002 ac_cpp='$CPP $CPPFLAGS'
2003 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2004 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2005 cross_compiling=$ac_cv_prog_cc_cross
2007 cat > conftest.$ac_ext << EOF
2009 #line 2010 "configure"
2010 #include "confdefs.h"
2012 main(){return(0);}
2014 if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2015 ac_cv_prog_cc_works=yes
2016 # If we can't run a trivial program, we are probably using a cross compiler.
2017 if (./conftest; exit) 2>/dev/null; then
2018 ac_cv_prog_cc_cross=no
2019 else
2020 ac_cv_prog_cc_cross=yes
2022 else
2023 echo "configure: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 ac_cv_prog_cc_works=no
2027 rm -fr conftest*
2028 ac_ext=c
2029 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2030 ac_cpp='$CPP $CPPFLAGS'
2031 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2032 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2033 cross_compiling=$ac_cv_prog_cc_cross
2035 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2036 if test $ac_cv_prog_cc_works = no; then
2037 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2039 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2040 echo "configure:2041: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2041 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2042 cross_compiling=$ac_cv_prog_cc_cross
2044 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2045 echo "configure:2046: checking whether we are using GNU C" >&5
2046 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2047 echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2049 cat > conftest.c <<EOF
2050 #ifdef __GNUC__
2051 yes;
2052 #endif
2054 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2055 ac_cv_prog_gcc=yes
2056 else
2057 ac_cv_prog_gcc=no
2061 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2063 if test $ac_cv_prog_gcc = yes; then
2064 GCC=yes
2065 else
2066 GCC=
2069 ac_test_CFLAGS="${CFLAGS+set}"
2070 ac_save_CFLAGS="$CFLAGS"
2071 CFLAGS=
2072 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2073 echo "configure:2074: checking whether ${CC-cc} accepts -g" >&5
2074 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2076 else
2077 echo 'void f(){}' > conftest.c
2078 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2079 ac_cv_prog_cc_g=yes
2080 else
2081 ac_cv_prog_cc_g=no
2083 rm -f conftest*
2087 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2088 if test "$ac_test_CFLAGS" = set; then
2089 CFLAGS="$ac_save_CFLAGS"
2090 elif test $ac_cv_prog_cc_g = yes; then
2091 if test "$GCC" = yes; then
2092 CFLAGS="-g -O2"
2093 else
2094 CFLAGS="-g"
2096 else
2097 if test "$GCC" = yes; then
2098 CFLAGS="-O2"
2099 else
2100 CFLAGS=
2104 if test -n "$USE_CPLUS"; then
2105 if test "$CC" = "cl" -a -z "$CXX"; then
2106 CXX=$CC
2107 else
2108 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2110 # Extract the first word of "$ac_prog", so it can be a program name with args.
2111 set dummy $ac_prog; ac_word=$2
2112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2113 echo "configure:2114: checking for $ac_word" >&5
2114 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2115 echo $ac_n "(cached) $ac_c" 1>&6
2116 else
2117 if test -n "$CXX"; then
2118 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2119 else
2120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2121 ac_dummy="$PATH"
2122 for ac_dir in $ac_dummy; do
2123 test -z "$ac_dir" && ac_dir=.
2124 if test -f $ac_dir/$ac_word; then
2125 ac_cv_prog_CXX="$ac_prog"
2126 break
2128 done
2129 IFS="$ac_save_ifs"
2132 CXX="$ac_cv_prog_CXX"
2133 if test -n "$CXX"; then
2134 echo "$ac_t""$CXX" 1>&6
2135 else
2136 echo "$ac_t""no" 1>&6
2139 test -n "$CXX" && break
2140 done
2141 test -n "$CXX" || CXX="gcc"
2144 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2145 echo "configure:2146: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2147 ac_ext=C
2148 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2149 ac_cpp='$CXXCPP $CPPFLAGS'
2150 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2151 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2152 cross_compiling=$ac_cv_prog_cxx_cross
2154 cat > conftest.$ac_ext << EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2159 int main(){return(0);}
2161 if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2162 ac_cv_prog_cxx_works=yes
2163 # If we can't run a trivial program, we are probably using a cross compiler.
2164 if (./conftest; exit) 2>/dev/null; then
2165 ac_cv_prog_cxx_cross=no
2166 else
2167 ac_cv_prog_cxx_cross=yes
2169 else
2170 echo "configure: failed program was:" >&5
2171 cat conftest.$ac_ext >&5
2172 ac_cv_prog_cxx_works=no
2174 rm -fr conftest*
2175 ac_ext=c
2176 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2177 ac_cpp='$CPP $CPPFLAGS'
2178 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2179 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2180 cross_compiling=$ac_cv_prog_cc_cross
2182 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2183 if test $ac_cv_prog_cxx_works = no; then
2184 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2186 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2187 echo "configure:2188: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2188 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2189 cross_compiling=$ac_cv_prog_cxx_cross
2191 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2192 echo "configure:2193: checking whether we are using GNU C++" >&5
2193 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2194 echo $ac_n "(cached) $ac_c" 1>&6
2195 else
2196 cat > conftest.C <<EOF
2197 #ifdef __GNUC__
2198 yes;
2199 #endif
2201 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2202 ac_cv_prog_gxx=yes
2203 else
2204 ac_cv_prog_gxx=no
2208 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2210 if test $ac_cv_prog_gxx = yes; then
2211 GXX=yes
2212 else
2213 GXX=
2216 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2217 ac_save_CXXFLAGS="$CXXFLAGS"
2218 CXXFLAGS=
2219 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2220 echo "configure:2221: checking whether ${CXX-g++} accepts -g" >&5
2221 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2222 echo $ac_n "(cached) $ac_c" 1>&6
2223 else
2224 echo 'void f(){}' > conftest.cc
2225 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2226 ac_cv_prog_cxx_g=yes
2227 else
2228 ac_cv_prog_cxx_g=no
2230 rm -f conftest*
2234 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2235 if test "$ac_test_CXXFLAGS" = set; then
2236 CXXFLAGS="$ac_save_CXXFLAGS"
2237 elif test $ac_cv_prog_cxx_g = yes; then
2238 if test "$GXX" = yes; then
2239 CXXFLAGS="-g -O2"
2240 else
2241 CXXFLAGS="-g"
2243 else
2244 if test "$GXX" = yes; then
2245 CXXFLAGS="-O2"
2246 else
2247 CXXFLAGS=
2253 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2254 echo "configure:2255: checking how to run the C preprocessor" >&5
2255 # On Suns, sometimes $CPP names a directory.
2256 if test -n "$CPP" && test -d "$CPP"; then
2257 CPP=
2259 if test -z "$CPP"; then
2260 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2261 echo $ac_n "(cached) $ac_c" 1>&6
2262 else
2263 # This must be in double quotes, not single quotes, because CPP may get
2264 # substituted into the Makefile and "${CC-cc}" will confuse make.
2265 CPP="${CC-cc} -E"
2266 # On the NeXT, cc -E runs the code through the compiler's parser,
2267 # not just through cpp.
2268 cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <assert.h>
2272 Syntax Error
2274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2275 { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2277 if test -z "$ac_err"; then
2279 else
2280 echo "$ac_err" >&5
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2283 rm -rf conftest*
2284 CPP="${CC-cc} -E -traditional-cpp"
2285 cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <assert.h>
2289 Syntax Error
2291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2292 { (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2294 if test -z "$ac_err"; then
2296 else
2297 echo "$ac_err" >&5
2298 echo "configure: failed program was:" >&5
2299 cat conftest.$ac_ext >&5
2300 rm -rf conftest*
2301 CPP="${CC-cc} -nologo -E"
2302 cat > conftest.$ac_ext <<EOF
2303 #line 2304 "configure"
2304 #include "confdefs.h"
2305 #include <assert.h>
2306 Syntax Error
2308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2309 { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2311 if test -z "$ac_err"; then
2313 else
2314 echo "$ac_err" >&5
2315 echo "configure: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2317 rm -rf conftest*
2318 CPP=/lib/cpp
2320 rm -f conftest*
2322 rm -f conftest*
2324 rm -f conftest*
2325 ac_cv_prog_CPP="$CPP"
2327 CPP="$ac_cv_prog_CPP"
2328 else
2329 ac_cv_prog_CPP="$CPP"
2331 echo "$ac_t""$CPP" 1>&6
2333 # Extract the first word of "ranlib", so it can be a program name with args.
2334 set dummy ranlib; ac_word=$2
2335 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2336 echo "configure:2337: checking for $ac_word" >&5
2337 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2338 echo $ac_n "(cached) $ac_c" 1>&6
2339 else
2340 if test -n "$RANLIB"; then
2341 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2342 else
2343 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2344 ac_dummy="$PATH"
2345 for ac_dir in $ac_dummy; do
2346 test -z "$ac_dir" && ac_dir=.
2347 if test -f $ac_dir/$ac_word; then
2348 ac_cv_prog_RANLIB="ranlib"
2349 break
2351 done
2352 IFS="$ac_save_ifs"
2353 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2356 RANLIB="$ac_cv_prog_RANLIB"
2357 if test -n "$RANLIB"; then
2358 echo "$ac_t""$RANLIB" 1>&6
2359 else
2360 echo "$ac_t""no" 1>&6
2363 for ac_prog in as
2365 # Extract the first word of "$ac_prog", so it can be a program name with args.
2366 set dummy $ac_prog; ac_word=$2
2367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2368 echo "configure:2369: checking for $ac_word" >&5
2369 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2370 echo $ac_n "(cached) $ac_c" 1>&6
2371 else
2372 case "$AS" in
2374 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2376 ?:/*)
2377 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2380 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2381 ac_dummy="$PATH"
2382 for ac_dir in $ac_dummy; do
2383 test -z "$ac_dir" && ac_dir=.
2384 if test -f $ac_dir/$ac_word; then
2385 ac_cv_path_AS="$ac_dir/$ac_word"
2386 break
2388 done
2389 IFS="$ac_save_ifs"
2391 esac
2393 AS="$ac_cv_path_AS"
2394 if test -n "$AS"; then
2395 echo "$ac_t""$AS" 1>&6
2396 else
2397 echo "$ac_t""no" 1>&6
2400 test -n "$AS" && break
2401 done
2402 test -n "$AS" || AS="$CC"
2404 for ac_prog in ar
2406 # Extract the first word of "$ac_prog", so it can be a program name with args.
2407 set dummy $ac_prog; ac_word=$2
2408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2409 echo "configure:2410: checking for $ac_word" >&5
2410 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2411 echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413 case "$AR" in
2415 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2417 ?:/*)
2418 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2421 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2422 ac_dummy="$PATH"
2423 for ac_dir in $ac_dummy; do
2424 test -z "$ac_dir" && ac_dir=.
2425 if test -f $ac_dir/$ac_word; then
2426 ac_cv_path_AR="$ac_dir/$ac_word"
2427 break
2429 done
2430 IFS="$ac_save_ifs"
2432 esac
2434 AR="$ac_cv_path_AR"
2435 if test -n "$AR"; then
2436 echo "$ac_t""$AR" 1>&6
2437 else
2438 echo "$ac_t""no" 1>&6
2441 test -n "$AR" && break
2442 done
2443 test -n "$AR" || AR="echo not_ar"
2445 for ac_prog in ld link
2447 # Extract the first word of "$ac_prog", so it can be a program name with args.
2448 set dummy $ac_prog; ac_word=$2
2449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2450 echo "configure:2451: checking for $ac_word" >&5
2451 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454 case "$LD" in
2456 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2458 ?:/*)
2459 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2462 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2463 ac_dummy="$PATH"
2464 for ac_dir in $ac_dummy; do
2465 test -z "$ac_dir" && ac_dir=.
2466 if test -f $ac_dir/$ac_word; then
2467 ac_cv_path_LD="$ac_dir/$ac_word"
2468 break
2470 done
2471 IFS="$ac_save_ifs"
2473 esac
2475 LD="$ac_cv_path_LD"
2476 if test -n "$LD"; then
2477 echo "$ac_t""$LD" 1>&6
2478 else
2479 echo "$ac_t""no" 1>&6
2482 test -n "$LD" && break
2483 done
2484 test -n "$LD" || LD="echo not_ld"
2486 for ac_prog in strip
2488 # Extract the first word of "$ac_prog", so it can be a program name with args.
2489 set dummy $ac_prog; ac_word=$2
2490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2491 echo "configure:2492: checking for $ac_word" >&5
2492 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2493 echo $ac_n "(cached) $ac_c" 1>&6
2494 else
2495 case "$STRIP" in
2497 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2499 ?:/*)
2500 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2503 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2504 ac_dummy="$PATH"
2505 for ac_dir in $ac_dummy; do
2506 test -z "$ac_dir" && ac_dir=.
2507 if test -f $ac_dir/$ac_word; then
2508 ac_cv_path_STRIP="$ac_dir/$ac_word"
2509 break
2511 done
2512 IFS="$ac_save_ifs"
2514 esac
2516 STRIP="$ac_cv_path_STRIP"
2517 if test -n "$STRIP"; then
2518 echo "$ac_t""$STRIP" 1>&6
2519 else
2520 echo "$ac_t""no" 1>&6
2523 test -n "$STRIP" && break
2524 done
2525 test -n "$STRIP" || STRIP="echo not_strip"
2527 for ac_prog in windres
2529 # Extract the first word of "$ac_prog", so it can be a program name with args.
2530 set dummy $ac_prog; ac_word=$2
2531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2532 echo "configure:2533: checking for $ac_word" >&5
2533 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2534 echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536 case "$WINDRES" in
2538 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2540 ?:/*)
2541 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2544 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2545 ac_dummy="$PATH"
2546 for ac_dir in $ac_dummy; do
2547 test -z "$ac_dir" && ac_dir=.
2548 if test -f $ac_dir/$ac_word; then
2549 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2550 break
2552 done
2553 IFS="$ac_save_ifs"
2555 esac
2557 WINDRES="$ac_cv_path_WINDRES"
2558 if test -n "$WINDRES"; then
2559 echo "$ac_t""$WINDRES" 1>&6
2560 else
2561 echo "$ac_t""no" 1>&6
2564 test -n "$WINDRES" && break
2565 done
2566 test -n "$WINDRES" || WINDRES="echo not_windres"
2568 if test -z "$HOST_CC"; then
2569 HOST_CC="$CC"
2571 if test -z "$HOST_CFLAGS"; then
2572 HOST_CFLAGS="$CFLAGS"
2576 if test "$GCC" = "yes"; then
2577 GNU_CC=1
2579 if test "$GXX" = "yes"; then
2580 GNU_CXX=1
2582 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2583 GNU_AS=1
2585 rm -f a.out
2587 case "$build:$target" in
2588 i?86-apple-darwin*:powerpc-apple-darwin*)
2589 cross_compiling=yes
2591 esac
2593 if test "$cross_compiling" = "yes"; then
2594 CROSS_COMPILE=1
2595 else
2596 CROSS_COMPILE=
2599 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2600 echo "configure:2601: checking for gcc -pipe support" >&5
2601 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2602 echo '#include <stdio.h>' > dummy-hello.c
2603 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2604 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2605 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2606 if test $? = 0; then
2607 _res_as_stdin="yes"
2608 else
2609 _res_as_stdin="no"
2611 if test "$_res_as_stdin" = "yes"; then
2612 _SAVE_CFLAGS=$CFLAGS
2613 CFLAGS="$CFLAGS -pipe"
2614 cat > conftest.$ac_ext <<EOF
2615 #line 2616 "configure"
2616 #include "confdefs.h"
2617 #include <stdio.h>
2618 int main() {
2619 printf("Hello World\n");
2620 ; return 0; }
2622 if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2623 rm -rf conftest*
2624 _res_gcc_pipe="yes"
2625 else
2626 echo "configure: failed program was:" >&5
2627 cat conftest.$ac_ext >&5
2628 rm -rf conftest*
2629 _res_gcc_pipe="no"
2631 rm -f conftest*
2632 CFLAGS=$_SAVE_CFLAGS
2634 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2635 _res="yes";
2636 CFLAGS="$CFLAGS -pipe"
2637 CXXFLAGS="$CXXFLAGS -pipe"
2638 else
2639 _res="no"
2641 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2642 echo "$ac_t""$_res" 1>&6
2643 else
2644 echo "$ac_t""no" 1>&6
2647 if test "$GNU_CC"; then
2648 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2649 echo "configure:2650: checking for visibility(hidden) attribute" >&5
2650 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653 cat > conftest.c <<EOF
2654 int foo __attribute__ ((visibility ("hidden"))) = 1;
2656 ac_cv_visibility_hidden=no
2657 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2658 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2659 ac_cv_visibility_hidden=yes
2662 rm -f conftest.cs
2666 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2667 if test "$ac_cv_visibility_hidden" = "yes"; then
2668 cat >> confdefs.h <<\EOF
2669 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2672 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2673 echo "configure:2674: checking for visibility pragma support" >&5
2674 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677 cat > conftest.c <<EOF
2678 #pragma GCC visibility push(hidden)
2679 int foo_hidden = 1;
2680 #pragma GCC visibility push(default)
2681 int foo_default = 1;
2683 ac_cv_visibility_pragma=no
2684 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2685 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2686 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2687 ac_cv_visibility_pragma=yes
2691 rm -f conftest.cs
2695 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2696 if test "$ac_cv_visibility_pragma" = "yes"; then
2697 cat >> confdefs.h <<\EOF
2698 #define HAVE_VISIBILITY_PRAGMA 1
2701 # To work around a build problem on Linux x86-64 (Bugzilla bug
2702 # 293438), we use the -fvisibility=hidden flag. This flag is less
2703 # optimal than #pragma GCC visibility push(hidden) because the flag
2704 # assumes that symbols defined outside the current source file have
2705 # the default visibility. This has the advantage that we don't need
2706 # to wrap system header files, but has the disadvantage that calls
2707 # to hidden symbols defined in other source files cannot be
2708 # optimized by the compiler. The -fvisibility=hidden flag does
2709 # hide and export symbols correctly.
2710 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
2711 #WRAP_SYSTEM_INCLUDES=1
2712 VISIBILITY_FLAGS="-fvisibility=hidden"
2713 WRAP_SYSTEM_INCLUDES=
2716 fi # GNU_CC
2718 fi # SKIP_COMPILER_CHECKS
2720 if test -z "$SKIP_PATH_CHECKS"; then
2721 for ac_prog in perl5 perl
2723 # Extract the first word of "$ac_prog", so it can be a program name with args.
2724 set dummy $ac_prog; ac_word=$2
2725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2726 echo "configure:2727: checking for $ac_word" >&5
2727 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730 case "$PERL" in
2732 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2734 ?:/*)
2735 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2739 ac_dummy="$PATH"
2740 for ac_dir in $ac_dummy; do
2741 test -z "$ac_dir" && ac_dir=.
2742 if test -f $ac_dir/$ac_word; then
2743 ac_cv_path_PERL="$ac_dir/$ac_word"
2744 break
2746 done
2747 IFS="$ac_save_ifs"
2749 esac
2751 PERL="$ac_cv_path_PERL"
2752 if test -n "$PERL"; then
2753 echo "$ac_t""$PERL" 1>&6
2754 else
2755 echo "$ac_t""no" 1>&6
2758 test -n "$PERL" && break
2759 done
2760 test -n "$PERL" || PERL="echo not_perl"
2762 elif test -z "$PERL"; then
2763 PERL=perl
2766 OBJ_SUFFIX=o
2767 LIB_SUFFIX=a
2768 DLL_SUFFIX=so
2769 ASM_SUFFIX=s
2770 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
2771 PR_MD_ASFILES=
2772 PR_MD_CSRCS=
2773 PR_MD_ARCH_DIR=unix
2774 AR_FLAGS='cr $@'
2775 AS='$(CC)'
2776 ASFLAGS='$(CFLAGS)'
2778 if test -n "$CROSS_COMPILE"; then
2779 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2780 OS_RELEASE=
2781 OS_TEST="${target_cpu}"
2782 case "${target_os}" in
2783 linux*) OS_ARCH=Linux ;;
2784 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2785 mingw*) OS_ARCH=WINNT ;;
2786 wince*) OS_ARCH=WINCE ;;
2787 darwin*) OS_ARCH=Darwin ;;
2788 esac
2789 else
2790 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2791 OS_RELEASE=`uname -r`
2792 OS_TEST=`uname -m`
2795 if test "$OS_ARCH" = "IRIX64"; then
2796 OS_ARCH=IRIX
2799 if test "$OS_ARCH" = "AIX"; then
2800 OS_RELEASE=`uname -v`.`uname -r`
2803 if test "$OS_ARCH" = "FreeBSD"; then
2804 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2807 if test "$OS_ARCH" = "Linux"; then
2808 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2809 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
2812 if test "$OS_ARCH" = "OpenVMS"; then
2813 OS_RELEASE=`uname -v`
2816 #######################################################################
2817 # Master "Core Components" macros for getting the OS target #
2818 #######################################################################
2821 # Note: OS_TARGET should be specified on the command line for gmake.
2822 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
2823 # The difference between the Win95 target and the WinNT target is that
2824 # the WinNT target uses Windows NT specific features not available
2825 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
2826 # at lesser performance (the Win95 target uses threads; the WinNT target
2827 # uses fibers).
2829 # When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
2830 # is built. See: win16_3.11.mk for lots more about the Win16 target.
2832 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
2833 # cross-compilation.
2837 # The following hack allows one to build on a WIN95 machine (as if
2838 # s/he were cross-compiling on a WINNT host for a WIN95 target).
2839 # It also accomodates for MKS's uname.exe. If you never intend
2840 # to do development on a WIN95 machine, you don't need this hack.
2842 case "$OS_ARCH" in
2843 WIN95)
2844 OS_ARCH=WINNT
2845 OS_TARGET=WIN95
2847 Windows_95)
2848 OS_ARCH=Windows_NT
2849 OS_TARGET=WIN95
2851 Windows_98)
2852 OS_ARCH=Windows_NT
2853 OS_TARGET=WIN95
2855 CYGWIN_9*|CYGWIN_ME*)
2856 OS_ARCH='CYGWIN_NT-4.0'
2857 OS_TARGET=WIN95
2859 OS_2)
2860 OS_ARCH=OS2
2861 OS_TARGET=OS2
2863 esac
2866 # On WIN32, we also define the variable CPU_ARCH.
2869 case "$OS_ARCH" in
2870 WINNT)
2871 CPU_ARCH=`uname -p`
2872 if test "$CPU_ARCH" = "I386"; then
2873 CPU_ARCH=x86
2876 Windows_NT)
2878 # If uname -s returns "Windows_NT", we assume that we are using
2879 # the uname.exe in MKS toolkit.
2881 # The -r option of MKS uname only returns the major version number.
2882 # So we need to use its -v option to get the minor version number.
2883 # Moreover, it doesn't have the -p option, so we need to use uname -m.
2885 OS_ARCH=WINNT
2886 OS_MINOR_RELEASE=`uname -v`
2887 if test "$OS_MINOR_RELEASE" = "00"; then
2888 OS_MINOR_RELEASE=0
2890 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
2891 CPU_ARCH=`uname -m`
2893 # MKS's uname -m returns "586" on a Pentium machine.
2895 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2896 CPU_ARCH=x86
2899 CYGWIN_NT*|MINGW*_NT*)
2901 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
2902 # the uname.exe in the Cygwin tools.
2903 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
2904 # the uname.exe in the MSYS tools.
2906 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
2907 OS_ARCH=WINNT
2908 CPU_ARCH=`uname -m`
2910 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
2912 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2913 CPU_ARCH=x86
2916 esac
2918 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
2919 OS_TARGET=WIN95
2920 if test -n "$MOZ_DEBUG"; then
2921 USE_DEBUG_RTL=1
2924 if test -z "$OS_TARGET"; then
2925 OS_TARGET=$OS_ARCH
2927 if test "$OS_TARGET" = "WIN95"; then
2928 OS_RELEASE="4.0"
2930 if test "$OS_TARGET" = "WIN16"; then
2931 OS_RELEASE=
2933 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
2935 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
2936 if test "${enable_os2_high_mem+set}" = set; then
2937 enableval="$enable_os2_high_mem"
2938 if test "$enableval" = "no"; then
2939 MOZ_OS2_HIGH_MEMORY=
2940 else
2941 MOZ_OS2_HIGH_MEMORY=1
2946 case "$host" in
2947 *-mingw*)
2948 NSINSTALL=nsinstall
2950 *-cygwin*|*-msvc*|*-mks*|*-wince*)
2951 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
2952 if test `echo "${PATH}" | grep -c \;` = 0; then
2953 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
2956 *-beos*)
2957 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
2959 *os2*)
2962 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
2964 esac
2966 case "$target" in
2968 *-aix*)
2969 cat >> confdefs.h <<\EOF
2970 #define XP_UNIX 1
2973 cat >> confdefs.h <<\EOF
2974 #define AIX 1
2977 cat >> confdefs.h <<\EOF
2978 #define SYSV 1
2981 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
2982 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
2983 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
2984 echo "configure:2985: checking for sys/atomic_op.h" >&5
2985 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2986 echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988 cat > conftest.$ac_ext <<EOF
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991 #include <sys/atomic_op.h>
2993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2994 { (eval echo configure:2995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2996 if test -z "$ac_err"; then
2997 rm -rf conftest*
2998 eval "ac_cv_header_$ac_safe=yes"
2999 else
3000 echo "$ac_err" >&5
3001 echo "configure: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 rm -rf conftest*
3004 eval "ac_cv_header_$ac_safe=no"
3006 rm -f conftest*
3008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3009 echo "$ac_t""yes" 1>&6
3010 cat >> confdefs.h <<\EOF
3011 #define AIX_HAVE_ATOMIC_OP_H 1
3014 else
3015 echo "$ac_t""no" 1>&6
3018 case "${target_os}" in
3019 aix3.2*)
3020 cat >> confdefs.h <<\EOF
3021 #define AIX_RENAME_SELECT 1
3024 cat >> confdefs.h <<\EOF
3025 #define _PR_NO_LARGE_FILES 1
3028 AIX_LINK_OPTS='-bnso -berok'
3029 PR_MD_ASFILES=os_AIX.s
3031 aix4.1*)
3032 cat >> confdefs.h <<\EOF
3033 #define AIX_TIMERS 1
3036 cat >> confdefs.h <<\EOF
3037 #define _PR_NO_LARGE_FILES 1
3040 cat >> confdefs.h <<\EOF
3041 #define AIX4_1 1
3044 MKSHLIB=
3045 DSO_LDOPTS=
3046 AIX_LINK_OPTS='-bnso -berok'
3047 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3048 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3050 aix4.2*)
3051 cat >> confdefs.h <<\EOF
3052 #define AIX_TIMERS 1
3055 cat >> confdefs.h <<\EOF
3056 #define _PR_HAVE_OFF64_T 1
3059 AIX_LINK_OPTS='-brtl -bnso -berok'
3061 aix4.3*)
3062 cat >> confdefs.h <<\EOF
3063 #define AIX_TIMERS 1
3066 cat >> confdefs.h <<\EOF
3067 #define _PR_HAVE_OFF64_T 1
3070 cat >> confdefs.h <<\EOF
3071 #define AIX4_3_PLUS 1
3074 cat >> confdefs.h <<\EOF
3075 #define HAVE_SOCKLEN_T 1
3078 cat >> confdefs.h <<\EOF
3079 #define HAVE_FCNTL_FILE_LOCKING 1
3082 USE_IPV6=1
3083 AIX_LINK_OPTS='-brtl -bnso -berok'
3086 cat >> confdefs.h <<\EOF
3087 #define AIX_TIMERS 1
3090 cat >> confdefs.h <<\EOF
3091 #define _PR_HAVE_OFF64_T 1
3094 cat >> confdefs.h <<\EOF
3095 #define AIX4_3_PLUS 1
3098 cat >> confdefs.h <<\EOF
3099 #define HAVE_SOCKLEN_T 1
3102 cat >> confdefs.h <<\EOF
3103 #define HAVE_FCNTL_FILE_LOCKING 1
3106 USE_IPV6=1
3107 AIX_LINK_OPTS='-brtl -bnso -berok'
3109 esac
3110 CFLAGS="$CFLAGS -qro -qroconst"
3111 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3112 AIX_TMP='./_aix_tmp.o'
3113 if test -n "$USE_64"; then
3114 MDCPUCFG_H=_aix64.cfg
3115 OBJECT_MODE=64
3116 else
3117 MDCPUCFG_H=_aix32.cfg
3119 PR_MD_CSRCS=aix.c
3120 RESOLVE_LINK_SYMBOLS=1
3123 *-beos*)
3124 cat >> confdefs.h <<\EOF
3125 #define XP_BEOS 1
3128 cat >> confdefs.h <<\EOF
3129 #define BeOS 1
3132 cat >> confdefs.h <<\EOF
3133 #define BEOS 1
3136 cat >> confdefs.h <<\EOF
3137 #define _POSIX_SOURCE 1
3140 DSO_LDOPTS=-nostart
3141 MDCPUCFG_H=_beos.cfg
3142 USE_BTHREADS=1
3143 PR_MD_ARCH_DIR=beos
3144 RESOLVE_LINK_SYMBOLS=1
3145 case "${target_cpu}" in
3146 i*86)
3147 _OPTIMIZE_FLAGS=-O2
3148 _DEBUG_FLAGS='-gdwarf-2 -O0'
3149 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3150 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3151 echo "configure:3152: checking for gethostbyaddr in -lbind" >&5
3152 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3154 echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156 ac_save_LIBS="$LIBS"
3157 LIBS="-lbind $LIBS"
3158 cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161 /* Override any gcc2 internal prototype to avoid an error. */
3162 /* We use char because int might match the return type of a gcc2
3163 builtin and then its argument prototype would still apply. */
3164 char gethostbyaddr();
3166 int main() {
3167 gethostbyaddr()
3168 ; return 0; }
3170 if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3171 rm -rf conftest*
3172 eval "ac_cv_lib_$ac_lib_var=yes"
3173 else
3174 echo "configure: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
3176 rm -rf conftest*
3177 eval "ac_cv_lib_$ac_lib_var=no"
3179 rm -f conftest*
3180 LIBS="$ac_save_LIBS"
3183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3184 echo "$ac_t""yes" 1>&6
3185 OS_LIBS="$OS_LIBS -lbind -lsocket"
3186 else
3187 echo "$ac_t""no" 1>&6
3191 powerpc)
3192 CC=mwcc
3193 CCC=mwcc
3194 LD=mwld
3195 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'
3196 _OPTIMIZE_FLAGS=-O2
3197 _DEBUG_FLAGS='-g -O0'
3199 esac
3202 *-bsdi*)
3203 cat >> confdefs.h <<\EOF
3204 #define XP_UNIX 1
3207 cat >> confdefs.h <<\EOF
3208 #define BSDI 1
3211 cat >> confdefs.h <<\EOF
3212 #define NEED_BSDREGEX 1
3216 CFLAGS="$CFLAGS -Wall -Wno-format"
3217 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3219 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3220 CPU_ARCH=x86
3221 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3222 CPU_ARCH=sparc
3225 MDCPUCFG_H=_bsdi.cfg
3226 PR_MD_CSRCS=bsdi.c
3228 DSO_LDOPTS=-r
3230 case "$target_os" in
3231 bsdi1.1*)
3232 cat >> confdefs.h <<\EOF
3233 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3236 cat >> confdefs.h <<\EOF
3237 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3240 cat >> confdefs.h <<\EOF
3241 #define _PR_NEED_H_ERRNO 1
3244 MKSHLIB=
3245 DSO_CFLAGS=
3246 DSO_LDOPTS=
3249 bsdi2.1*)
3250 cat >> confdefs.h <<\EOF
3251 #define _PR_TIMESPEC_HAS_TS_SEC 1
3254 cat >> confdefs.h <<\EOF
3255 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3258 cat >> confdefs.h <<\EOF
3259 #define HAVE_DLL 1
3262 cat >> confdefs.h <<\EOF
3263 #define USE_DLFCN 1
3266 cat >> confdefs.h <<\EOF
3267 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3270 PR_MD_ASFILES=os_BSD_OS_386_2.s
3273 bsdi4.* | bsdi5.*)
3274 cat >> confdefs.h <<\EOF
3275 #define _PR_SELECT_CONST_TIMEVAL 1
3278 cat >> confdefs.h <<\EOF
3279 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3282 cat >> confdefs.h <<\EOF
3283 #define HAVE_DLL 1
3286 cat >> confdefs.h <<\EOF
3287 #define USE_DLFCN 1
3290 cat >> confdefs.h <<\EOF
3291 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3294 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3295 DSO_CFLAGS=-fPIC
3296 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3297 STRIP="$STRIP -d"
3298 case "$target_os" in
3299 bsdi4.2* | bsdi4.3* | bsdi5.*)
3300 cat >> confdefs.h <<\EOF
3301 #define _PR_HAVE_GETPROTO_R 1
3304 cat >> confdefs.h <<\EOF
3305 #define _PR_HAVE_GETPROTO_R_POINTER 1
3309 esac
3312 cat >> confdefs.h <<\EOF
3313 #define _PR_SELECT_CONST_TIMEVAL 1
3316 cat >> confdefs.h <<\EOF
3317 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3320 cat >> confdefs.h <<\EOF
3321 #define HAVE_DLL 1
3324 cat >> confdefs.h <<\EOF
3325 #define USE_DLFCN 1
3328 cat >> confdefs.h <<\EOF
3329 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3333 esac
3337 *-darwin*)
3338 cat >> confdefs.h <<\EOF
3339 #define XP_UNIX 1
3342 cat >> confdefs.h <<\EOF
3343 #define DARWIN 1
3346 cat >> confdefs.h <<\EOF
3347 #define HAVE_BSD_FLOCK 1
3350 cat >> confdefs.h <<\EOF
3351 #define HAVE_SOCKLEN_T 1
3354 CFLAGS="$CFLAGS -Wmost -fno-common"
3355 case "${target_cpu}" in
3356 i*86*)
3357 if test -n "$USE_64"; then
3358 CPU_ARCH=x86_64
3359 CC="$CC -arch x86_64"
3360 else
3361 CPU_ARCH=i386
3365 CPU_ARCH=ppc
3367 esac
3368 DSO_CFLAGS=-fPIC
3369 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3370 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3371 STRIP="$STRIP -x -S"
3372 DLL_SUFFIX=dylib
3373 USE_PTHREADS=1
3374 MDCPUCFG_H=_darwin.cfg
3375 PR_MD_CSRCS=darwin.c
3376 PR_MD_ASFILES=os_Darwin.s
3378 # Add Mac OS X support for loading CFM & CFBundle plugins
3379 if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
3380 cat >> confdefs.h <<\EOF
3381 #define XP_MACOSX 1
3384 OS_TARGET=MacOSX
3386 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3387 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3388 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3389 case "${target_cpu}" in
3390 powerpc*)
3391 export MACOSX_DEPLOYMENT_TARGET=10.2
3393 i*86*)
3394 export MACOSX_DEPLOYMENT_TARGET=10.4
3396 esac
3400 if test "$MACOS_SDK_DIR"; then
3402 if test ! -d "$MACOS_SDK_DIR"; then
3403 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3404 specify a valid SDK. SDKs are installed when the optional cross-development
3405 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3409 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3410 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3411 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3413 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3414 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3415 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3416 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3417 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3420 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3422 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3424 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3427 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3429 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3430 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}"
3431 else
3432 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3435 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3436 DSO_LDOPTS="${MACOS_SDK_LIBS} $DSO_LDOPTS"
3437 export NEXT_ROOT=$MACOS_SDK_DIR
3439 if test -n "$CROSS_COMPILE" ; then
3440 HOST_CC="NEXT_ROOT= $HOST_CC"
3441 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3443 else
3444 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3446 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3448 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3449 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3450 DSO_LDOPTS="$DSO_LDOPTS -isysroot ${MACOS_SDK_DIR}"
3451 else
3452 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3453 DSO_LDOPTS="$DSO_LDOPTS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3460 *-dgux*)
3461 cat >> confdefs.h <<\EOF
3462 #define XP_UNIX 1
3465 cat >> confdefs.h <<\EOF
3466 #define _PR_LOCAL_THREADS_ONLY 1
3469 cat >> confdefs.h <<\EOF
3470 #define SVR4 1
3473 cat >> confdefs.h <<\EOF
3474 #define SYSV 1
3477 cat >> confdefs.h <<\EOF
3478 #define DGUX 1
3481 cat >> confdefs.h <<\EOF
3482 #define _DGUX_SOURCE 1
3485 cat >> confdefs.h <<\EOF
3486 #define _POSIX4A_DRAFT6_SOURCE 1
3489 DSO_LDOPTS=-G
3490 _OPTIMIZE_FLAGS=-O2
3491 _DEBUG_FLAGS=
3492 MDCPUCFG_H=_dgux.cfg
3493 PR_MD_CSRCS=dgux.c
3496 *-freebsd*)
3497 if test -z "$USE_NSPR_THREADS"; then
3498 USE_PTHREADS=1
3500 cat >> confdefs.h <<\EOF
3501 #define XP_UNIX 1
3504 cat >> confdefs.h <<\EOF
3505 #define FREEBSD 1
3508 cat >> confdefs.h <<\EOF
3509 #define HAVE_BSD_FLOCK 1
3512 cat >> confdefs.h <<\EOF
3513 #define HAVE_SOCKLEN_T 1
3516 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3517 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
3518 if test "$MOZ_OBJFORMAT" = "elf"; then
3519 DLL_SUFFIX=so
3520 else
3521 DLL_SUFFIX=so.1.0
3523 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3524 DSO_CFLAGS=-fPIC
3525 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3526 MDCPUCFG_H=_freebsd.cfg
3527 PR_MD_CSRCS=freebsd.c
3530 *-hpux*)
3531 cat >> confdefs.h <<\EOF
3532 #define XP_UNIX 1
3535 cat >> confdefs.h <<\EOF
3536 #define HPUX 1
3539 cat >> confdefs.h <<\EOF
3540 #define _HPUX_SOURCE 1
3543 # OSF1 and HPUX report the POLLHUP event for a socket when the
3544 # shutdown(SHUT_WR) operation is called for the remote end, even though
3545 # the socket is still writeable. Use select(), instead of poll(), to
3546 # workaround this problem.
3547 cat >> confdefs.h <<\EOF
3548 #define _PR_POLL_WITH_SELECT 1
3551 cat >> confdefs.h <<\EOF
3552 #define _USE_BIG_FDS 1
3555 DSO_LDOPTS='-b +h $(notdir $@)'
3556 PR_MD_CSRCS=hpux.c
3557 if test "$OS_TEST" = "ia64"; then
3558 DLL_SUFFIX=so
3559 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
3560 CPU_ARCH_TAG=_$OS_TEST
3561 if test -z "$USE_64"; then
3562 COMPILER_TAG=_32
3564 PR_MD_ASFILES=os_HPUX_ia64.s
3565 else
3566 cat >> confdefs.h <<\EOF
3567 #define hppa 1
3570 DLL_SUFFIX=sl
3571 PR_MD_ASFILES=os_HPUX.s
3573 if test -n "$USE_64"; then
3574 MDCPUCFG_H=_hpux64.cfg
3575 else
3576 MDCPUCFG_H=_hpux32.cfg
3578 if test -z "$GNU_CC"; then
3579 CC="$CC -Ae"
3580 CXX="$CXX -ext"
3581 DSO_CFLAGS=+Z
3582 else
3583 DSO_CFLAGS=-fPIC
3586 if test -n "$MOZILLA_CLIENT"; then
3587 DEFAULT_IMPL_STRATEGY=_EMU
3590 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
3591 cat >> confdefs.h <<\EOF
3592 #define _PR_NEED_H_ERRNO 1
3595 cat >> confdefs.h <<\EOF
3596 #define HPUX9 1
3599 DEFAULT_IMPL_STRATEGY=_EMU
3600 USE_NSPR_THREADS=1
3603 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
3604 cat >> confdefs.h <<\EOF
3605 #define _PR_NO_LARGE_FILES 1
3610 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3611 cat >> confdefs.h <<\EOF
3612 #define _PR_NEED_H_ERRNO 1
3617 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3618 cat >> confdefs.h <<\EOF
3619 #define HAVE_INT_LOCALTIME_R 1
3624 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
3625 cat >> confdefs.h <<\EOF
3626 #define HAVE_POINTER_LOCALTIME_R 1
3631 # HP-UX 11i v2 (B.11.23) or higher
3633 case "$OS_RELEASE" in
3634 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
3635 USE_IPV6=1
3637 esac
3640 if test "$OS_RELEASE" = "B.10.01"; then
3641 cat >> confdefs.h <<\EOF
3642 #define HPUX10 1
3645 DEFAULT_IMPL_STRATEGY=_EMU
3648 if test "$OS_RELEASE" = "B.10.10"; then
3649 cat >> confdefs.h <<\EOF
3650 #define HPUX10 1
3653 cat >> confdefs.h <<\EOF
3654 #define HPUX10_10 1
3657 DEFAULT_IMPL_STRATEGY=_PTH
3660 if test "$OS_RELEASE" = "B.10.20"; then
3661 cat >> confdefs.h <<\EOF
3662 #define HPUX10 1
3665 cat >> confdefs.h <<\EOF
3666 #define HPUX10_20 1
3669 if test -z "$GNU_CC"; then
3670 CFLAGS="$CFLAGS +DAportable +DS1.1"
3671 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3673 DEFAULT_IMPL_STRATEGY=_PTH
3676 if test "$OS_RELEASE" = "B.10.30"; then
3677 cat >> confdefs.h <<\EOF
3678 #define HPUX10 1
3681 cat >> confdefs.h <<\EOF
3682 #define HPUX10_30 1
3685 if test -z "$GNU_CC"; then
3686 CFLAGS="$CFLAGS +DAportable +DS1.1"
3687 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3689 DEFAULT_IMPL_STRATEGY=_PTH
3692 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
3693 cat >> confdefs.h <<\EOF
3694 #define HPUX10 1
3697 cat >> confdefs.h <<\EOF
3698 #define HPUX11 1
3701 cat >> confdefs.h <<\EOF
3702 #define _LARGEFILE64_SOURCE 1
3705 cat >> confdefs.h <<\EOF
3706 #define _PR_HAVE_OFF64_T 1
3709 cat >> confdefs.h <<\EOF
3710 #define HAVE_FCNTL_FILE_LOCKING 1
3713 if test -z "$GNU_CC"; then
3714 if test -z "$USE_64"; then
3715 if test "$OS_TEST" = "ia64"; then
3716 CFLAGS="$CFLAGS +DD32"
3717 CXXFLAGS="$CXXFLAGS +DD32"
3718 else
3719 CFLAGS="$CFLAGS +DAportable +DS2.0"
3720 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
3722 else
3723 if test "$OS_TEST" = "ia64"; then
3724 CFLAGS="$CFLAGS +DD64"
3725 CXXFLAGS="$CXXFLAGS +DD64"
3726 else
3727 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
3728 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
3732 DEFAULT_IMPL_STRATEGY=_PTH
3735 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
3736 USE_NSPR_THREADS=1
3737 USE_PTHREADS=
3738 USE_USER_PTHREADS=
3739 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
3740 USE_PTHREADS=1
3741 if test "$USE_NSPR_THREADS"; then
3742 USE_PTHREADS=
3744 if test "$USE_USER_PTHREADS"; then
3745 USE_PTHREADS=
3750 *-irix*)
3751 cat >> confdefs.h <<\EOF
3752 #define XP_UNIX 1
3755 cat >> confdefs.h <<\EOF
3756 #define IRIX 1
3759 cat >> confdefs.h <<\EOF
3760 #define SVR4 1
3763 cat >> confdefs.h <<\EOF
3764 #define _SGI_MP_SOURCE 1
3767 cat >> confdefs.h <<\EOF
3768 #define HAVE_FCNTL_FILE_LOCKING 1
3771 PR_MD_CSRCS=irix.c
3772 PR_MD_ASFILES=os_Irix.s
3773 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
3774 STRIP="$STRIP -f"
3775 RESOLVE_LINK_SYMBOLS=1
3776 if test -n "$USE_64"; then
3777 MDCPUCFG_H=_irix64.cfg
3778 else
3779 MDCPUCFG_H=_irix32.cfg
3781 case "${target_os}" in
3782 irix6*)
3783 cat >> confdefs.h <<\EOF
3784 #define IRIX6 1
3787 USE_PTHREADS=1
3788 USE_N32=1
3789 COMPILER_TAG=_n32
3790 IMPL_STRATEGY=_PTH
3792 irix5*)
3793 cat >> confdefs.h <<\EOF
3794 #define IRIX5 1
3797 USE_NSPR_THREADS=1
3800 USE_PTHREADS=1
3801 USE_N32=1
3803 esac
3804 if test "$GNU_CC"; then
3805 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
3806 CFLAGS="$CFLAGS -Wall -Wno-format"
3807 _OPTIMIZE_FLAGS="-O6"
3808 else
3809 if test -n "$USE_N32"; then
3810 AS='as -D_ASM $(INCLUDES) -n32'
3811 else
3812 AS='as -D_ASM $(INCLUDES)'
3814 CFLAGS="$CFLAGS -fullwarn -xansi"
3815 if test "$USE_N32"; then
3816 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
3817 else
3818 _OPTIMIZE_FLAGS="-O -Olimit 4000"
3820 if test "$USE_MDUPDATE"; then
3821 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
3823 case "${target}" in
3824 *-irix6.*)
3825 CFLAGS="$CFLAGS -multigot"
3826 DSO_LDOPTS="-no_unresolved"
3827 if test "$USE_N32"; then
3828 CFLAGS="$CFLAGS -n32 -woff 1209"
3829 DSO_LDOPTS="$DSO_LDOPTS -n32"
3830 else
3831 if test "$USE_64"; then
3832 CFLAGS="$CFLAGS -64"
3833 else
3834 CFLAGS="$CFLAGS -32"
3839 CFLAGS="$CFLAGS -xgot"
3841 esac
3843 if test "${target_os}" = "irix5.3"; then
3844 cat >> confdefs.h <<\EOF
3845 #define IRIX5_3 1
3849 case "${target_os}" in
3850 irix6.5)
3851 if test -z "$GNU_CC"; then
3852 CFLAGS="$CFLAGS -mips3"
3854 cat >> confdefs.h <<\EOF
3855 #define _PR_HAVE_GETPROTO_R 1
3858 cat >> confdefs.h <<\EOF
3859 #define _PR_HAVE_GETPROTO_R_POINTER 1
3862 cat >> confdefs.h <<\EOF
3863 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
3867 irix5*)
3870 cat >> confdefs.h <<\EOF
3871 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
3875 esac
3878 *-linux*|*-gnu*|*-k*bsd*-gnu)
3879 if test -z "$USE_NSPR_THREADS"; then
3880 USE_PTHREADS=1
3881 IMPL_STRATEGY=_PTH
3883 cat >> confdefs.h <<\EOF
3884 #define XP_UNIX 1
3887 cat >> confdefs.h <<\EOF
3888 #define _GNU_SOURCE 1
3891 cat >> confdefs.h <<\EOF
3892 #define HAVE_FCNTL_FILE_LOCKING 1
3895 case "${target_os}" in
3896 linux*)
3897 cat >> confdefs.h <<\EOF
3898 #define LINUX 1
3902 esac
3903 CFLAGS="$CFLAGS -Wall"
3904 CXXFLAGS="$CXXFLAGS -Wall"
3905 MDCPUCFG_H=_linux.cfg
3906 PR_MD_CSRCS=linux.c
3907 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3908 DSO_CFLAGS=-fPIC
3909 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3910 _OPTIMIZE_FLAGS=-O2
3911 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
3912 # combo is not yet good at debugging inlined
3913 # functions (even when using DWARF2 as the
3914 # debugging format)
3915 COMPILER_TAG=_glibc
3916 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3917 CPU_ARCH=x86
3918 else
3919 CPU_ARCH=$OS_TEST
3921 CPU_ARCH_TAG=_${CPU_ARCH}
3922 case "${target_cpu}" in
3923 alpha)
3924 cat >> confdefs.h <<\EOF
3925 #define _ALPHA_ 1
3928 cat >> confdefs.h <<\EOF
3929 #define __alpha 1
3932 CFLAGS="$CFLAGS -mieee"
3933 CXXFLAGS="$CXXFLAGS -mieee"
3935 i*86)
3936 cat >> confdefs.h <<\EOF
3937 #define i386 1
3940 PR_MD_ASFILES=os_Linux_x86.s
3942 ia64)
3943 PR_MD_ASFILES=os_Linux_ia64.s
3945 x86_64)
3946 if test -n "$USE_64"; then
3947 PR_MD_ASFILES=os_Linux_x86_64.s
3948 else
3949 cat >> confdefs.h <<\EOF
3950 #define i386 1
3953 PR_MD_ASFILES=os_Linux_x86.s
3954 CC="$CC -m32"
3955 CXX="$CXX -m32"
3958 ppc|powerpc)
3959 PR_MD_ASFILES=os_Linux_ppc.s
3961 powerpc64)
3962 if test -n "$USE_64"; then
3963 CC="$CC -m64"
3964 CXX="$CXX -m64"
3965 else
3966 PR_MD_ASFILES=os_Linux_ppc.s
3969 m68k)
3970 CFLAGS="$CFLAGS -m68020-60"
3971 CXXFLAGS="$CXXFLAGS -m68020-60"
3973 esac
3976 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
3977 cat >> confdefs.h <<\EOF
3978 #define XP_PC 1
3981 cat >> confdefs.h <<\EOF
3982 #define WIN32 1
3985 PR_MD_ARCH_DIR=windows
3986 RESOLVE_LINK_SYMBOLS=1
3988 if test -n "$GNU_CC"; then
3989 CC="$CC -mno-cygwin"
3990 CXX="$CXX -mno-cygwin"
3991 DLL_SUFFIX=dll
3992 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
3993 RC=$WINDRES
3994 # Use temp file for windres (bug 213281)
3995 RCFLAGS='-O coff --use-temp-file'
3996 else
3997 CC=cl
3998 CXX=cl
3999 LD=link
4000 AR='lib -NOLOGO -OUT:"$@"'
4001 AR_FLAGS=
4002 RANLIB='echo not_ranlib'
4003 STRIP='echo not_strip'
4004 RC=rc.exe
4005 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4006 OBJ_SUFFIX=obj
4007 LIB_SUFFIX=lib
4008 DLL_SUFFIX=dll
4010 # Determine compiler version
4011 CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
4012 _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
4013 _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
4014 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4016 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4017 # tape manipulation utility (or something else)
4018 if test "$MSC_VER" -ge "1400"; then
4020 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4023 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4024 if test -n "$MSMT_TOOL"; then
4025 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4026 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4027 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4029 MT=mt
4030 unset MSMT_TOOL
4031 else
4032 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4036 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4037 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4038 _DEBUG_FLAGS=-Z7
4039 _OPTIMIZE_FLAGS=-O2
4040 if test -z "$MOZ_OPTIMIZE"; then
4041 CFLAGS="$CFLAGS -Od"
4044 if test -n "$USE_DEBUG_RTL"; then
4045 CFLAGS="$CFLAGS -MDd"
4046 else
4047 CFLAGS="$CFLAGS -MD"
4050 if test -n "$MOZ_DEBUG"; then
4051 cat >> confdefs.h <<\EOF
4052 #define _DEBUG 1
4055 else
4056 DEFINES="$DEFINES -U_DEBUG"
4059 if test -n "$MOZ_OPTIMIZE"; then
4060 if test -n "$MOZ_PROFILE"; then
4061 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
4063 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4064 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
4066 if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
4067 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4068 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4072 if test -n "$MOZ_DEBUG"; then
4073 DLLFLAGS="$DLLFLAGS -DEBUG"
4074 LDFLAGS="$LDFLAGS -DEBUG"
4077 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4078 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4079 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4082 if test "$OS_TARGET" = "WINNT"; then
4083 CFLAGS="$CFLAGS -GT"
4084 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4085 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4086 else
4087 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4088 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4090 fi # GNU_CC
4092 if test -n "$USE_STATIC_TLS"; then
4093 cat >> confdefs.h <<\EOF
4094 #define _PR_USE_STATIC_TLS 1
4099 if test "$OS_TARGET" = "WINNT"; then
4100 cat >> confdefs.h <<\EOF
4101 #define WINNT 1
4104 else
4105 cat >> confdefs.h <<\EOF
4106 #define WIN95 1
4109 # undefine WINNT as some versions of mingw gcc define it by default
4110 DEFINES="$DEFINES -UWINNT"
4111 cat >> confdefs.h <<\EOF
4112 #define _PR_GLOBAL_THREADS_ONLY 1
4117 if test "$CPU_ARCH" = "x86"; then
4118 CPU_ARCH_TAG=
4119 else
4120 CPU_ARCH_TAG=$CPU_ARCH
4123 if test -n "$USE_DEBUG_RTL"; then
4124 OBJDIR_SUFFIX=OBJD
4127 case "$OS_TARGET" in
4128 WINNT)
4129 MDCPUCFG_H=_winnt.cfg
4131 WIN95)
4132 MDCPUCFG_H=_win95.cfg
4134 WIN16)
4135 MDCPUCFG_H=_win16.cfg
4138 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4140 esac
4142 case "$target_cpu" in
4143 i*86)
4144 if test -n "$USE_64"; then
4145 cat >> confdefs.h <<\EOF
4146 #define _AMD64_ 1
4149 cat >> confdefs.h <<\EOF
4150 #define _M_AMD64 1
4153 else
4154 cat >> confdefs.h <<\EOF
4155 #define _X86_ 1
4160 alpha)
4161 cat >> confdefs.h <<\EOF
4162 #define _ALPHA_ 1
4166 mips)
4167 cat >> confdefs.h <<\EOF
4168 #define _MIPS_ 1
4172 x86_64)
4173 cat >> confdefs.h <<\EOF
4174 #define _AMD64_ 1
4177 cat >> confdefs.h <<\EOF
4178 #define _M_AMD64 1
4181 USE_64=1
4183 ia64)
4184 cat >> confdefs.h <<\EOF
4185 #define _IA64_ 1
4188 cat >> confdefs.h <<\EOF
4189 #define _M_IA64 1
4192 USE_64=1
4195 cat >> confdefs.h <<\EOF
4196 #define _CPU_ARCH_NOT_DEFINED 1
4200 esac
4202 if test "$USE_64"; then
4203 cat >> confdefs.h <<\EOF
4204 #define _WIN64 1
4211 *-wince*)
4212 cat >> confdefs.h <<\EOF
4213 #define XP_PC 1
4216 cat >> confdefs.h <<\EOF
4217 #define WIN32 1
4220 cat >> confdefs.h <<\EOF
4221 #define WINCE 1
4224 cat >> confdefs.h <<\EOF
4225 #define _PR_GLOBAL_THREADS_ONLY 1
4229 AR='lib -NOLOGO -OUT:"$@"'
4230 AR_FLAGS=
4232 OBJ_SUFFIX=obj
4233 LIB_SUFFIX=lib
4234 DLL_SUFFIX=dll
4235 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4237 PR_MD_ARCH_DIR=windows
4238 RESOLVE_LINK_SYMBOLS=1
4240 MDCPUCFG_H=_win95.cfg
4241 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4242 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4244 DLLFLAGS='-OUT:"$@"'
4245 _DEBUG_FLAGS=-Zi
4248 *-ncr-sysv*)
4249 cat >> confdefs.h <<\EOF
4250 #define XP_UNIX 1
4253 cat >> confdefs.h <<\EOF
4254 #define SVR4 1
4257 cat >> confdefs.h <<\EOF
4258 #define SYSV 1
4261 cat >> confdefs.h <<\EOF
4262 #define NCR 1
4265 USE_NSPR_THREADS=1
4266 if test "$OS_RELEASE" = "2.03"; then
4267 cat >> confdefs.h <<\EOF
4268 #define _PR_STAT_HAS_ST_ATIM 1
4271 else
4272 cat >> confdefs.h <<\EOF
4273 #define _PR_STAT_HAS_ST_ATIM_UNION 1
4278 if test -z "$GNU_CC"; then
4279 CFLAGS="$CFLAGS -Hnocopyr"
4280 CXXFLAGS="$CXXFLAGS -Hnocopyr"
4281 else
4282 CFLAGS="$CFLAGS -fPIC -Wall"
4283 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
4284 DSO_LDOPTS=-G
4286 MDCPUCFG_H=_ncr.cfg
4287 PR_MD_CSRCS=ncr.c
4290 mips-nec-sysv*)
4291 cat >> confdefs.h <<\EOF
4292 #define XP_UNIX 1
4295 cat >> confdefs.h <<\EOF
4296 #define SVR4 1
4299 cat >> confdefs.h <<\EOF
4300 #define __SVR4 1
4303 cat >> confdefs.h <<\EOF
4304 #define NEC 1
4307 cat >> confdefs.h <<\EOF
4308 #define nec_ews 1
4311 USE_NSPR_THREADS=1
4312 if test -z "$GNU_CC"; then
4313 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
4314 CXX=g++
4316 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
4317 DSO_LDOPTS=-G
4318 MDCPUCFG_H=_nec.cfg
4319 PR_MD_CSRCS=nec.c
4322 *-netbsd*)
4323 cat >> confdefs.h <<\EOF
4324 #define XP_UNIX 1
4327 cat >> confdefs.h <<\EOF
4328 #define NETBSD 1
4331 cat >> confdefs.h <<\EOF
4332 #define HAVE_BSD_FLOCK 1
4335 if test -z "$USE_NSPR_THREADS"; then
4336 USE_PTHREADS=1
4338 MDCPUCFG_H=_netbsd.cfg
4339 PR_MD_CSRCS=netbsd.c
4341 DSO_CFLAGS='-fPIC -DPIC'
4342 CFLAGS="$CFLAGS -ansi -Wall"
4343 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4344 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4346 if test -z "$OBJECT_FMT"; then
4347 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4348 OBJECT_FMT=a.out
4349 DLL_SUFFIX=so.1.0
4350 DSO_LDOPTS='-shared'
4351 else
4352 OBJECT_FMT=ELF
4353 DLL_SUFFIX=so
4354 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4358 if test "$LIBRUNPATH"; then
4359 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4363 mips-sony-newsos*)
4364 cat >> confdefs.h <<\EOF
4365 #define XP_UNIX 1
4368 cat >> confdefs.h <<\EOF
4369 #define SONY 1
4372 cat >> confdefs.h <<\EOF
4373 #define SYSV 1
4376 cat >> confdefs.h <<\EOF
4377 #define SVR4 1
4380 cat >> confdefs.h <<\EOF
4381 #define __svr4 1
4384 cat >> confdefs.h <<\EOF
4385 #define __svr4__ 1
4388 cat >> confdefs.h <<\EOF
4389 #define HAVE_SVID_GETTOD 1
4392 USE_NSPR_THREADS=1
4393 CFLAGS="$CFLAGS -Xa -fullwarn"
4394 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4395 DSO_LDOPTS=-G
4396 MDCPUCFG_H=_sony.cfg
4397 PR_MD_CSRCS=sony.c
4400 *-nextstep*|*-openstep*)
4401 cat >> confdefs.h <<\EOF
4402 #define XP_UNIX 1
4405 cat >> confdefs.h <<\EOF
4406 #define NEXTSTEP 1
4409 cat >> confdefs.h <<\EOF
4410 #define HAVE_BSD_FLOCK 1
4413 cat >> confdefs.h <<\EOF
4414 #define _POSIX_SOURCE 1
4417 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4418 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4419 USE_NSPR_THREADS=1
4420 DLL_SUFFIX=dylib
4421 MDCPUCFG_H=_nextstep.cfg
4422 PR_MD_CSRCS=nextstep.c
4426 *-nto*)
4427 cat >> confdefs.h <<\EOF
4428 #define XP_UNIX 1
4431 cat >> confdefs.h <<\EOF
4432 #define NTO 1
4435 cat >> confdefs.h <<\EOF
4436 #define _QNX_SOURCE 1
4439 cat >> confdefs.h <<\EOF
4440 #define HAVE_POINTER_LOCALTIME_R 1
4443 MDCPUCFG_H=_nto.cfg
4444 PR_MD_CSRCS=nto.c
4445 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4446 DSO_CFLAGS=-fPIC
4447 DSO_LDOPTS=-shared
4448 OS_LIBS="$OS_LIBS -lsocket"
4449 _OPTIMIZE_FLAGS="-O1"
4450 _DEBUG_FLAGS="-gstabs"
4453 *-openbsd*)
4454 cat >> confdefs.h <<\EOF
4455 #define XP_UNIX 1
4458 cat >> confdefs.h <<\EOF
4459 #define OPENBSD 1
4462 cat >> confdefs.h <<\EOF
4463 #define HAVE_BSD_FLOCK 1
4466 cat >> confdefs.h <<\EOF
4467 #define HAVE_SOCKLEN_T 1
4470 CFLAGS="$CFLAGS -ansi -Wall"
4471 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4472 DLL_SUFFIX=so.1.0
4473 DSO_CFLAGS=-fPIC
4474 MDCPUCFG_H=_openbsd.cfg
4475 PR_MD_CSRCS=openbsd.c
4476 OS_LIBS="-lc"
4477 if test -z "$USE_NSPR_THREADS"; then
4478 USE_PTHREADS=1
4480 DSO_LDOPTS='-shared -fPIC'
4481 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4484 *-openvms*)
4485 cat >> confdefs.h <<\EOF
4486 #define XP_UNIX 1
4489 cat >> confdefs.h <<\EOF
4490 #define VMS 1
4493 cat >> confdefs.h <<\EOF
4494 #define PR_GETIPNODE_NOT_THREADSAFE 1
4497 RESOLVE_LINK_SYMBOLS=1
4498 AR_FLAGS='c $@'
4499 MDCPUCFG_H=_openvms.cfg
4500 PR_MD_CSRCS=openvms.c
4501 DSO_LDOPTS='-shared -auto_symvec $(LDFLAGS)'
4502 if test -n "$MOZ_DEBUG"; then
4503 DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
4504 else
4505 DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
4509 *-osf*)
4510 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4511 cat >> confdefs.h <<\EOF
4512 #define XP_UNIX 1
4515 cat >> confdefs.h <<\EOF
4516 #define OSF1 1
4519 cat >> confdefs.h <<\EOF
4520 #define _REENTRANT 1
4523 # OSF1 and HPUX report the POLLHUP event for a socket when the
4524 # shutdown(SHUT_WR) operation is called for the remote end, even though
4525 # the socket is still writeable. Use select(), instead of poll(), to
4526 # workaround this problem.
4527 cat >> confdefs.h <<\EOF
4528 #define _PR_POLL_WITH_SELECT 1
4532 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4533 USE_NSPR_THREADS=1
4536 if test -z "$GNU_CC"; then
4537 CC="$CC -std1 -ieee_with_inexact"
4538 if test "$OS_RELEASE" != "V2.0"; then
4539 CC="$CC -readonly_strings"
4541 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4542 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4543 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4544 echo "configure:4545: checking for machine/builtins.h" >&5
4545 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4546 echo $ac_n "(cached) $ac_c" 1>&6
4547 else
4548 cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551 #include <machine/builtins.h>
4553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4554 { (eval echo configure:4555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4556 if test -z "$ac_err"; then
4557 rm -rf conftest*
4558 eval "ac_cv_header_$ac_safe=yes"
4559 else
4560 echo "$ac_err" >&5
4561 echo "configure: failed program was:" >&5
4562 cat conftest.$ac_ext >&5
4563 rm -rf conftest*
4564 eval "ac_cv_header_$ac_safe=no"
4566 rm -f conftest*
4568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4569 echo "$ac_t""yes" 1>&6
4570 cat >> confdefs.h <<\EOF
4571 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4574 else
4575 echo "$ac_t""no" 1>&6
4578 else
4579 CFLAGS="$CFLAGS -mieee"
4580 CXXFLAGS="$CXXFLAGS -mieee"
4583 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4584 cat >> confdefs.h <<\EOF
4585 #define HAVE_INT_LOCALTIME_R 1
4588 else
4589 cat >> confdefs.h <<\EOF
4590 #define HAVE_FCNTL_FILE_LOCKING 1
4593 cat >> confdefs.h <<\EOF
4594 #define HAVE_POINTER_LOCALTIME_R 1
4598 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4599 cat >> confdefs.h <<\EOF
4600 #define OSF1V4_MAP_PRIVATE_BUG 1
4604 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4605 MDCPUCFG_H=_osf1.cfg
4606 PR_MD_CSRCS=osf1.c
4609 *-qnx*)
4610 cat >> confdefs.h <<\EOF
4611 #define XP_UNIX 1
4614 cat >> confdefs.h <<\EOF
4615 #define QNX 1
4618 cat >> confdefs.h <<\EOF
4619 #define _PR_NEED_H_ERRNO 1
4622 USE_NSPR_THREADS=1
4623 MDCPUCFG_H=_qnx.cfg
4624 PR_MD_CSRCS=qnx.c
4627 *-riscos*)
4628 cat >> confdefs.h <<\EOF
4629 #define XP_UNIX 1
4632 cat >> confdefs.h <<\EOF
4633 #define RISCOS 1
4636 cat >> confdefs.h <<\EOF
4637 #define _PR_NEED_H_ERRNO 1
4640 USE_PTHREADS=1
4641 MDCPUCFG_H=_riscos.cfg
4642 PR_MD_CSRCS=riscos.c
4643 DLL_SUFFIX=a
4644 LD="/home/riscos/env/ro-ar cr"
4647 *-*-sco*)
4648 cat >> confdefs.h <<\EOF
4649 #define XP_UNIX 1
4652 cat >> confdefs.h <<\EOF
4653 #define SCO 1
4656 cat >> confdefs.h <<\EOF
4657 #define sco 1
4660 cat >> confdefs.h <<\EOF
4661 #define SYSV 1
4664 cat >> confdefs.h <<\EOF
4665 #define _SVID3 1
4668 cat >> confdefs.h <<\EOF
4669 #define _PR_NEED_H_ERRNO 1
4672 CC='cc -b elf -KPIC'
4673 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4674 USE_NSPR_THREADS=1
4675 CPU_ARCH=x86
4676 DSO_LDOPTS='-b elf -G'
4677 MDCPUCFG_H=_scoos.cfg
4678 PR_MD_SRCS=scoos.c
4681 *-sinix*)
4682 cat >> confdefs.h <<\EOF
4683 #define XP_UNIX 1
4686 cat >> confdefs.h <<\EOF
4687 #define SVR4 1
4690 cat >> confdefs.h <<\EOF
4691 #define SNI 1
4694 cat >> confdefs.h <<\EOF
4695 #define RELIANTUNIX 1
4698 cat >> confdefs.h <<\EOF
4699 #define sinix 1
4702 cat >> confdefs.h <<\EOF
4703 #define HAVE_SVID_GETTOD 1
4706 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4707 cat >> confdefs.h <<\EOF
4708 #define i386 1
4711 CPU_ARCH=x86
4712 else
4713 CPU_ARCH=mips
4716 if test "$GNU_CC"; then
4717 AS='$(CC) -x assembler-with-cpp'
4718 if test "$CPU_ARCH" = "mips"; then
4719 LD=gld
4721 CFLAGS="$CFLAGS -Wall -Wno-format"
4722 else
4723 AS='/usr/bin/cc'
4724 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4727 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4729 if test "$OS_RELEASE" = "5.43"; then
4730 cat >> confdefs.h <<\EOF
4731 #define IP_MULTICAST 1
4736 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4737 USE_NSPR_THREADS=1
4738 MDCPUCFG_H=_reliantunix.cfg
4739 PR_MD_CSRCS=reliantunix.c
4740 if test "${OS_ARCH}" = "mips"; then
4741 PR_MD_ASFILES=os_ReliantUNIX.s
4745 *-sunos*)
4746 cat >> confdefs.h <<\EOF
4747 #define XP_UNIX 1
4750 cat >> confdefs.h <<\EOF
4751 #define SUNOS4 1
4754 CFLAGS="$CFLAGS -Wall -Wno-format"
4755 if test "$USE_MDUPDATE"; then
4756 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4758 CPU_ARCH=sparc
4759 DLL_SUFFIX=so.1.0
4760 DSO_LDOPTS=
4761 DSO_CFLAGS=-fPIC
4762 USE_NSPR_THREADS=1
4763 if test "$OS_RELEASE" = "4.1.3_U1"; then
4764 _OPTIMIZE_FLAGS=
4765 OS_LIBS="$OS_LIBS -lm"
4767 MDCPUCFG_H=_sunos4.cfg
4768 PR_MD_CSRCS=sunos4.c
4771 *-solaris*)
4772 if test -z "$USE_NSPR_THREADS"; then
4773 USE_PTHREADS=1
4775 cat >> confdefs.h <<\EOF
4776 #define XP_UNIX 1
4779 cat >> confdefs.h <<\EOF
4780 #define SVR4 1
4783 cat >> confdefs.h <<\EOF
4784 #define SYSV 1
4787 cat >> confdefs.h <<\EOF
4788 #define __svr4 1
4791 cat >> confdefs.h <<\EOF
4792 #define __svr4__ 1
4795 cat >> confdefs.h <<\EOF
4796 #define SOLARIS 1
4799 cat >> confdefs.h <<\EOF
4800 #define HAVE_FCNTL_FILE_LOCKING 1
4803 CPU_ARCH=`uname -p`
4804 MDCPUCFG_H=_solaris.cfg
4805 PR_MD_CSRCS=solaris.c
4806 LD=/usr/ccs/bin/ld
4807 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4808 RESOLVE_LINK_SYMBOLS=1
4809 case "${OS_RELEASE}" in
4810 5.8|5.9)
4813 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
4814 USE_B_DIRECT=1
4816 esac
4817 if test -n "$GNU_CC"; then
4818 DSO_CFLAGS=-fPIC
4819 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
4820 GCC_USE_GNU_LD=1
4822 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
4823 if test -n "$USE_B_DIRECT"; then
4824 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
4826 else
4827 DSO_CFLAGS=-KPIC
4828 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
4829 if test -n "$USE_B_DIRECT"; then
4830 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
4833 if test -n "$GNU_CC"; then
4834 CFLAGS="$CFLAGS -Wall"
4835 CXXFLAGS="$CXXFLAGS -Wall"
4836 if test -n "$USE_MDUPDATE"; then
4837 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4838 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
4840 GCC_AS=`$CC -print-prog-name=as`
4841 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
4842 GNU_AS=1
4844 else
4845 CFLAGS="$CFLAGS -xstrconst"
4846 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
4847 if test -z "$MOZ_OPTIMIZE"; then
4848 CFLAGS="$CFLAGS -xs"
4849 CXXFLAGS="$CXXFLAGS -xs"
4851 _OPTIMIZE_FLAGS=-xO4
4853 if test -z "$GNU_AS"; then
4854 ASFLAGS="$ASFLAGS -Wa,-P"
4856 if test -n "$USE_64"; then
4857 if test -n "$GNU_CC"; then
4858 CC="$CC -m64"
4859 CXX="$CXX -m64"
4860 else
4861 if test "$OS_TEST" = "i86pc"; then
4862 CC="$CC -xarch=amd64"
4863 CXX="$CXX -xarch=amd64"
4864 else
4865 CC="$CC -xarch=v9"
4866 CXX="$CXX -xarch=v9"
4870 if test "$OS_TEST" = "i86pc"; then
4871 if test -z "$USE_64"; then
4872 cat >> confdefs.h <<\EOF
4873 #define i386 1
4877 CPU_ARCH_TAG=_$OS_TEST
4878 # The default debug format, DWARF (-g), is not supported by gcc
4879 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
4880 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
4881 # If your gcc uses GNU as, you do not need the -Wa,-s option.
4882 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
4883 _DEBUG_FLAGS=-gstabs
4884 if test -z "$GNU_AS"; then
4885 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
4889 case "${target_os}" in
4890 solaris2.3*)
4891 cat >> confdefs.h <<\EOF
4892 #define _PR_NO_LARGE_FILES 1
4896 solaris2.4*)
4897 cat >> confdefs.h <<\EOF
4898 #define _PR_NO_LARGE_FILES 1
4902 solaris2.5*)
4903 cat >> confdefs.h <<\EOF
4904 #define SOLARIS2_5 1
4909 cat >> confdefs.h <<\EOF
4910 #define _PR_HAVE_OFF64_T 1
4913 # The lfcompile64(5) man page on Solaris 2.6 says:
4914 # For applications that do not wish to conform to the POSIX or
4915 # X/Open specifications, the 64-bit transitional interfaces
4916 # are available by default. No compile-time flags need to be
4917 # set.
4918 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
4919 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
4920 if test -n "$GNU_CC"; then
4921 cat >> confdefs.h <<\EOF
4922 #define _LARGEFILE64_SOURCE 1
4927 esac
4928 case "${target_os}" in
4929 solaris2.3*)
4931 solaris2.4*)
4933 solaris2.5*)
4935 solaris2.6*)
4937 solaris2.7*)
4940 # Solaris 8 or higher has IPv6.
4941 cat >> confdefs.h <<\EOF
4942 #define _PR_INET6 1
4946 esac
4947 if test "$CPU_ARCH" = "sparc"; then
4948 # 64-bit Solaris SPARC requires V9 architecture, so the following
4949 # is not needed.
4950 if test -z "$USE_64"; then
4951 ULTRASPARC_LIBRARY=nspr_flt
4954 # Purify requires that binaries linked against nspr also
4955 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
4956 _rev=`uname -r`
4957 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
4958 OS_LIBS="$OS_LIBS $_librt"
4961 *-sco-sysv5*)
4962 cat >> confdefs.h <<\EOF
4963 #define XP_UNIX 1
4966 cat >> confdefs.h <<\EOF
4967 #define UNIXWARE 1
4970 cat >> confdefs.h <<\EOF
4971 #define SVR4 1
4974 cat >> confdefs.h <<\EOF
4975 #define SYSV 1
4978 USE_NSPR_THREADS=1
4979 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
4980 cat >> confdefs.h <<\EOF
4981 #define _PR_NO_LARGE_FILES 1
4984 CC='$(NSDEPTH)/build/hcc cc'
4985 CXX='$(NSDEPTH)/build/hcpp CC'
4986 MDCPUCFG_H=_unixware.cfg
4987 else
4988 cat >> confdefs.h <<\EOF
4989 #define _LARGEFILE64_SOURCE 1
4992 cat >> confdefs.h <<\EOF
4993 #define _PR_HAVE_OFF64_T 1
4996 cat >> confdefs.h <<\EOF
4997 #define _PR_HAVE_SOCKADDR_LEN 1
5000 MDCPUCFG_H=_unixware7.cfg
5002 PR_MD_CSRCS=unixware.c
5003 DSO_LDOPTS=-G
5004 CPU_ARCH=x86
5007 *-os2*)
5008 cat >> confdefs.h <<\EOF
5009 #define XP_OS2 1
5012 cat >> confdefs.h <<\EOF
5013 #define XP_PC 1
5016 cat >> confdefs.h <<\EOF
5017 #define BSD_SELECT 1
5020 cat >> confdefs.h <<\EOF
5021 #define TCPV40HDRS 1
5024 LIB_SUFFIX=lib
5025 DLL_SUFFIX=dll
5026 RC=rc.exe
5027 PR_MD_ARCH_DIR=os2
5028 PROG_SUFFIX=.exe
5029 NSINSTALL=nsinstall
5030 MDCPUCFG_H=_os2.cfg
5031 RESOLVE_LINK_SYMBOLS=1
5033 cat >> confdefs.h <<\EOF
5034 #define OS2 1
5037 AR=emxomfar
5038 AR_FLAGS='r $@'
5039 CFLAGS="$CFLAGS -Wall -Zomf"
5040 CXXFLAGS="$CFLAGS -Wall -Zomf"
5041 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5042 DSO_CFLAGS=
5043 DSO_LDOPTS='-Zomf -Zdll -Zmap'
5044 LDFLAGS='-Zmap'
5045 _OPTIMIZE_FLAGS="-O2 -s"
5046 _DEBUG_FLAGS="-g -fno-inline"
5047 if test -n "$MOZ_OPTIMIZE"; then
5048 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5050 OS_LIBS="-lsocket"
5051 IMPLIB='emximp -o'
5052 FILTER='emxexp -o'
5053 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5054 DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
5055 LDFLAGS="$LDFLAGS -Zhigh-mem"
5056 cat >> confdefs.h <<\EOF
5057 #define MOZ_OS2_HIGH_MEMORY 1
5062 # GCC for OS/2 currently predefines these, but we don't want them
5063 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5067 cat >> confdefs.h <<\EOF
5068 #define XP_UNIX 1
5073 esac
5075 if test -z "$SKIP_LIBRARY_CHECKS"; then
5079 case $target in
5080 *-darwin*|*-beos*)
5083 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5084 echo "configure:5085: checking for dlopen in -ldl" >&5
5085 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5086 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5087 echo $ac_n "(cached) $ac_c" 1>&6
5088 else
5089 ac_save_LIBS="$LIBS"
5090 LIBS="-ldl $LIBS"
5091 cat > conftest.$ac_ext <<EOF
5092 #line 5093 "configure"
5093 #include "confdefs.h"
5094 /* Override any gcc2 internal prototype to avoid an error. */
5095 /* We use char because int might match the return type of a gcc2
5096 builtin and then its argument prototype would still apply. */
5097 char dlopen();
5099 int main() {
5100 dlopen()
5101 ; return 0; }
5103 if { (eval echo configure:5104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5104 rm -rf conftest*
5105 eval "ac_cv_lib_$ac_lib_var=yes"
5106 else
5107 echo "configure: failed program was:" >&5
5108 cat conftest.$ac_ext >&5
5109 rm -rf conftest*
5110 eval "ac_cv_lib_$ac_lib_var=no"
5112 rm -f conftest*
5113 LIBS="$ac_save_LIBS"
5116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5117 echo "$ac_t""yes" 1>&6
5118 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5119 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5120 echo "configure:5121: checking for dlfcn.h" >&5
5121 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5122 echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127 #include <dlfcn.h>
5129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5130 { (eval echo configure:5131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5132 if test -z "$ac_err"; then
5133 rm -rf conftest*
5134 eval "ac_cv_header_$ac_safe=yes"
5135 else
5136 echo "$ac_err" >&5
5137 echo "configure: failed program was:" >&5
5138 cat conftest.$ac_ext >&5
5139 rm -rf conftest*
5140 eval "ac_cv_header_$ac_safe=no"
5142 rm -f conftest*
5144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5145 echo "$ac_t""yes" 1>&6
5146 OS_LIBS="-ldl $OS_LIBS"
5147 else
5148 echo "$ac_t""no" 1>&6
5151 else
5152 echo "$ac_t""no" 1>&6
5156 esac
5161 if test $ac_cv_prog_gcc = yes; then
5162 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5163 echo "configure:5164: checking whether ${CC-cc} needs -traditional" >&5
5164 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5165 echo $ac_n "(cached) $ac_c" 1>&6
5166 else
5167 ac_pattern="Autoconf.*'x'"
5168 cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 #include <sgtty.h>
5172 Autoconf TIOCGETP
5174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5175 egrep "$ac_pattern" >/dev/null 2>&1; then
5176 rm -rf conftest*
5177 ac_cv_prog_gcc_traditional=yes
5178 else
5179 rm -rf conftest*
5180 ac_cv_prog_gcc_traditional=no
5182 rm -f conftest*
5185 if test $ac_cv_prog_gcc_traditional = no; then
5186 cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 #include <termio.h>
5190 Autoconf TCGETA
5192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5193 egrep "$ac_pattern" >/dev/null 2>&1; then
5194 rm -rf conftest*
5195 ac_cv_prog_gcc_traditional=yes
5197 rm -f conftest*
5202 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5203 if test $ac_cv_prog_gcc_traditional = yes; then
5204 CC="$CC -traditional"
5208 for ac_func in lchown strerror
5210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5211 echo "configure:5212: checking for $ac_func" >&5
5212 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5213 echo $ac_n "(cached) $ac_c" 1>&6
5214 else
5215 cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 /* System header to define __stub macros and hopefully few prototypes,
5219 which can conflict with char $ac_func(); below. */
5220 #include <assert.h>
5221 /* Override any gcc2 internal prototype to avoid an error. */
5222 /* We use char because int might match the return type of a gcc2
5223 builtin and then its argument prototype would still apply. */
5224 char $ac_func();
5226 int main() {
5228 /* The GNU C library defines this for functions which it implements
5229 to always fail with ENOSYS. Some functions are actually named
5230 something starting with __ and the normal name is an alias. */
5231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5232 choke me
5233 #else
5234 $ac_func();
5235 #endif
5237 ; return 0; }
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240 rm -rf conftest*
5241 eval "ac_cv_func_$ac_func=yes"
5242 else
5243 echo "configure: failed program was:" >&5
5244 cat conftest.$ac_ext >&5
5245 rm -rf conftest*
5246 eval "ac_cv_func_$ac_func=no"
5248 rm -f conftest*
5251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5252 echo "$ac_t""yes" 1>&6
5253 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5254 cat >> confdefs.h <<EOF
5255 #define $ac_tr_func 1
5258 else
5259 echo "$ac_t""no" 1>&6
5261 done
5266 # Check whether --enable-strip or --disable-strip was given.
5267 if test "${enable_strip+set}" = set; then
5268 enableval="$enable_strip"
5269 if test "$enableval" = "yes"; then
5270 ENABLE_STRIP=1
5275 case "${target_os}" in
5276 hpux*)
5277 if test -z "$GNU_CC"; then
5279 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5280 echo "configure:5281: checking for +Olit support" >&5
5281 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5282 echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284 ac_cv_hpux_usable_olit_option=no
5285 rm -f conftest*
5286 echo 'int main() { return 0; }' | cat > conftest.c
5287 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5288 if test $? -eq 0; then
5289 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5290 ac_cv_hpux_usable_olit_option=yes
5293 rm -f conftest*
5297 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5299 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5300 CFLAGS="$CFLAGS +Olit=all"
5301 CXXFLAGS="$CXXFLAGS +Olit=all"
5302 else
5303 CFLAGS="$CFLAGS +ESlit"
5304 CXXFLAGS="$CXXFLAGS +ESlit"
5308 esac
5312 case "$target_os" in
5313 darwin*)
5314 _HAVE_PTHREADS=1
5318 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5319 echo "configure:5320: checking for pthread_create in -lpthreads" >&5
5320 echo "
5321 #include <pthread.h>
5322 void *foo(void *v) { return v; }
5323 int main() {
5324 pthread_t t;
5325 if (!pthread_create(&t, 0, &foo, 0)) {
5326 pthread_join(t, 0);
5328 return 0;
5329 }" > dummy.c ;
5330 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5331 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5332 _res=$? ;
5333 rm -f dummy.c dummy${ac_exeext} ;
5334 if test "$_res" = "0"; then
5335 echo "$ac_t""yes" 1>&6
5336 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5337 else
5338 echo "$ac_t""no" 1>&6
5340 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5341 echo "configure:5342: checking for pthread_create in -lpthread" >&5
5342 echo "
5343 #include <pthread.h>
5344 void *foo(void *v) { return v; }
5345 int main() {
5346 pthread_t t;
5347 if (!pthread_create(&t, 0, &foo, 0)) {
5348 pthread_join(t, 0);
5350 return 0;
5351 }" > dummy.c ;
5352 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5353 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5354 _res=$? ;
5355 rm -f dummy.c dummy${ac_exeext} ;
5356 if test "$_res" = "0"; then
5357 echo "$ac_t""yes" 1>&6
5358 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5359 else
5360 echo "$ac_t""no" 1>&6
5362 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5363 echo "configure:5364: checking for pthread_create in -lc_r" >&5
5364 echo "
5365 #include <pthread.h>
5366 void *foo(void *v) { return v; }
5367 int main() {
5368 pthread_t t;
5369 if (!pthread_create(&t, 0, &foo, 0)) {
5370 pthread_join(t, 0);
5372 return 0;
5373 }" > dummy.c ;
5374 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5375 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5376 _res=$? ;
5377 rm -f dummy.c dummy${ac_exeext} ;
5378 if test "$_res" = "0"; then
5379 echo "$ac_t""yes" 1>&6
5380 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5381 else
5382 echo "$ac_t""no" 1>&6
5384 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5385 echo "configure:5386: checking for pthread_create in -lc" >&5
5386 echo "
5387 #include <pthread.h>
5388 void *foo(void *v) { return v; }
5389 int main() {
5390 pthread_t t;
5391 if (!pthread_create(&t, 0, &foo, 0)) {
5392 pthread_join(t, 0);
5394 return 0;
5395 }" > dummy.c ;
5396 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5397 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5398 _res=$? ;
5399 rm -f dummy.c dummy${ac_exeext} ;
5400 if test "$_res" = "0"; then
5401 echo "$ac_t""yes" 1>&6
5402 _HAVE_PTHREADS=1
5404 else
5405 echo "$ac_t""no" 1>&6
5419 esac
5421 # Check whether --with-pthreads or --without-pthreads was given.
5422 if test "${with_pthreads+set}" = set; then
5423 withval="$with_pthreads"
5424 if test "$withval" = "yes"; then
5425 if test -n "$_HAVE_PTHREADS"; then
5426 USE_PTHREADS=1
5427 USE_USER_PTHREADS=
5428 USE_NSPR_THREADS=
5429 else
5430 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5432 else
5433 USE_PTHREADS=
5434 _PTHREAD_LDFLAGS=
5436 else
5437 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5438 USE_PTHREADS=1
5439 USE_USER_PTHREADS=
5440 USE_NSPR_THREADS=
5445 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5446 if test "${enable_user_pthreads+set}" = set; then
5447 enableval="$enable_user_pthreads"
5448 if test "$enableval" = "yes"; then
5449 if test -n "$_HAVE_PTHREADS"; then
5450 USE_PTHREADS=
5451 USE_USER_PTHREADS=1
5452 USE_NSPR_THREADS=
5453 else
5454 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5460 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5461 if test "${enable_nspr_threads+set}" = set; then
5462 enableval="$enable_nspr_threads"
5463 if test "$enableval" = "yes"; then
5464 USE_PTHREADS=
5465 USE_USER_PTHREADS=
5466 USE_NSPR_THREADS=1
5471 case "$target" in
5472 *-beos*)
5473 # Check whether --with-bthreads or --without-bthreads was given.
5474 if test "${with_bthreads+set}" = set; then
5475 withval="$with_bthreads"
5476 if test "$withval" = "yes"; then
5477 USE_BTHREADS=1
5478 USE_USER_PTHREADS=
5479 USE_PTHREADS=
5484 esac
5486 fi # SKIP_LIBRARY_CHECKS
5488 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5489 if test "${enable_ipv6+set}" = set; then
5490 enableval="$enable_ipv6"
5491 if test "$enableval" = "yes"; then
5492 USE_IPV6=1
5493 else
5494 USE_IPV6=
5500 # Check whether --enable-boehm or --disable-boehm was given.
5501 if test "${enable_boehm+set}" = set; then
5502 enableval="$enable_boehm"
5503 if test "$enableval" = "yes"; then
5504 cat >> confdefs.h <<\EOF
5505 #define GC_LEAK_DETECTOR 1
5508 GC_LEAK_DETECTOR=1
5513 if test -n "$USE_PTHREADS"; then
5514 rm -f conftest*
5515 ac_cv_have_dash_pthread=no
5516 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5517 echo "configure:5518: checking whether ${CC-cc} accepts -pthread" >&5
5518 echo 'int main() { return 0; }' | cat > conftest.c
5519 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5520 if test $? -eq 0; then
5521 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5522 ac_cv_have_dash_pthread=yes
5523 case "$target_os" in
5524 freebsd*)
5525 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5528 CFLAGS="$CFLAGS -pthread"
5529 CXXFLAGS="$CXXFLAGS -pthread"
5531 esac
5534 rm -f conftest*
5535 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5537 ac_cv_have_dash_pthreads=no
5538 if test "$ac_cv_have_dash_pthread" = "no"; then
5539 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5540 echo "configure:5541: checking whether ${CC-cc} accepts -pthreads" >&5
5541 echo 'int main() { return 0; }' | cat > conftest.c
5542 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5543 if test $? -eq 0; then
5544 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5545 ac_cv_have_dash_pthreads=yes
5546 CFLAGS="$CFLAGS -pthreads"
5547 CXXFLAGS="$CXXFLAGS -pthreads"
5550 rm -f conftest*
5551 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5554 case "$target" in
5555 *-solaris*)
5556 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5557 _PTHREAD_LDFLAGS=
5560 *-freebsd*)
5561 cat >> confdefs.h <<\EOF
5562 #define _REENTRANT 1
5565 cat >> confdefs.h <<\EOF
5566 #define _THREAD_SAFE 1
5569 if test "$ac_cv_have_dash_pthread" = "yes"; then
5570 _PTHREAD_LDFLAGS="-pthread"
5571 else
5572 _PTHREAD_LDFLAGS="-lc_r"
5575 *-netbsd*)
5576 if test "$ac_cv_have_dash_pthread" = "yes"; then
5577 _PTHREAD_LDFLAGS="-pthread"
5580 *-bsdi*)
5581 cat >> confdefs.h <<\EOF
5582 #define _THREAD_SAFE 1
5585 if test "$ac_cv_have_dash_pthread" = "yes"; then
5586 _PTHREAD_LDFLAGS=
5589 *-openbsd*)
5590 if test "$ac_cv_have_dash_pthread" = "yes"; then
5591 _PTHREAD_LDFLAGS=-pthread
5594 *-linux*|*-gnu*|*-k*bsd*-gnu)
5595 cat >> confdefs.h <<\EOF
5596 #define _REENTRANT 1
5600 esac
5602 else
5603 if test -n "$USE_USER_PTHREADS"; then
5604 USE_PTHREADS=
5605 USE_NSPR_THREADS=
5606 else
5607 _PTHREAD_LDFLAGS=
5611 case "$target" in
5612 *-aix*)
5613 if test -n "$USE_NSPR_THREADS"; then
5614 cat >> confdefs.h <<\EOF
5615 #define _PR_LOCAL_THREADS_ONLY 1
5619 case "$target_os" in
5620 aix4.1*)
5621 if test -z "$USE_PTHREADS"; then
5622 cat >> confdefs.h <<\EOF
5623 #define AIX_RENAME_SELECT 1
5628 aix4.2*)
5629 if test -z "$USE_NSPR_THREADS"; then
5630 cat >> confdefs.h <<\EOF
5631 #define HAVE_POINTER_LOCALTIME_R 1
5636 aix4.3*)
5637 if test -z "$USE_NSPR_THREADS"; then
5638 cat >> confdefs.h <<\EOF
5639 #define HAVE_POINTER_LOCALTIME_R 1
5643 if test -n "$USE_PTHREADS"; then
5644 cat >> confdefs.h <<\EOF
5645 #define _PR_HAVE_THREADSAFE_GETHOST 1
5651 if test -z "$USE_NSPR_THREADS"; then
5652 cat >> confdefs.h <<\EOF
5653 #define HAVE_POINTER_LOCALTIME_R 1
5657 if test -n "$USE_PTHREADS"; then
5658 cat >> confdefs.h <<\EOF
5659 #define _PR_HAVE_THREADSAFE_GETHOST 1
5664 esac
5666 *-bsdi*)
5667 if test -n "$USE_PTHREADS"; then
5668 cat >> confdefs.h <<\EOF
5669 #define _PR_NEED_PTHREAD_INIT 1
5674 *-freebsd*)
5675 if test -n "$USE_NSPR_THREADS"; then
5676 cat >> confdefs.h <<\EOF
5677 #define _PR_LOCAL_THREADS_ONLY 1
5682 *-hpux*)
5683 if test -n "$USE_NSPR_THREADS"; then
5684 cat >> confdefs.h <<\EOF
5685 #define _PR_LOCAL_THREADS_ONLY 1
5689 if test "$USE_PTHREADS"; then
5690 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
5691 cat >> confdefs.h <<\EOF
5692 #define _REENTRANT 1
5695 cat >> confdefs.h <<\EOF
5696 #define _PR_DCETHREADS 1
5699 else
5700 cat >> confdefs.h <<EOF
5701 #define _POSIX_C_SOURCE 199506L
5704 cat >> confdefs.h <<\EOF
5705 #define _PR_HAVE_THREADSAFE_GETHOST 1
5710 if test "$USE_USER_PTHREADS"; then
5711 cat >> confdefs.h <<EOF
5712 #define _POSIX_C_SOURCE 199506L
5717 *-irix*)
5718 if test "${target_os}" = "irix6.5"; then
5719 if test -n "$USE_PTHREADS"; then
5720 cat >> confdefs.h <<\EOF
5721 #define _PR_HAVE_GETHOST_R 1
5724 cat >> confdefs.h <<\EOF
5725 #define _PR_HAVE_GETHOST_R_POINTER 1
5731 *-linux*|*-gnu*|*-k*bsd*-gnu)
5732 if test -n "$USE_NSPR_THREADS"; then
5733 cat >> confdefs.h <<\EOF
5734 #define _PR_LOCAL_THREADS_ONLY 1
5739 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-os2*|*-beos*)
5740 USE_PTHREADS=
5741 _PTHREAD_LDFLAGS=
5742 USE_USER_PTHREADS=
5744 *-netbsd*|*-openbsd*)
5745 if test -n "$USE_NSPR_THREADS"; then
5746 cat >> confdefs.h <<\EOF
5747 #define _PR_LOCAL_THREADS_ONLY 1
5752 *-osf*)
5753 if test -n "$USE_NSPR_THREADS"; then
5754 cat >> confdefs.h <<\EOF
5755 #define _PR_LOCAL_THREADS_ONLY 1
5759 if test -n "$USE_PTHREADS"; then
5760 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
5762 else
5763 cat >> confdefs.h <<\EOF
5764 #define _PR_HAVE_THREADSAFE_GETHOST 1
5770 *-solaris*)
5771 if test -n "$USE_NSPR_THREADS"; then
5772 cat >> confdefs.h <<\EOF
5773 #define _PR_LOCAL_THREADS_ONLY 1
5777 if test -n "$USE_PTHREADS"; then
5778 cat >> confdefs.h <<\EOF
5779 #define _REENTRANT 1
5782 cat >> confdefs.h <<\EOF
5783 #define HAVE_POINTER_LOCALTIME_R 1
5786 if test "$OS_TEST" = "i86pc"; then
5787 if test -n "$USE_64"; then
5788 PR_MD_ASFILES=os_SunOS_x86_64.s
5789 else
5790 PR_MD_ASFILES=os_SunOS_x86.s
5792 else
5793 if test -n "$USE_64"; then
5794 PR_MD_ASFILES=os_SunOS_sparcv9.s
5799 *-nto*)
5800 if test -n "$USE_PTHREADS"; then
5801 cat >> confdefs.h <<\EOF
5802 #define _PR_HAVE_GETHOST_R 1
5805 cat >> confdefs.h <<\EOF
5806 #define _PR_HAVE_GETHOST_R_POINTER 1
5811 esac
5813 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
5815 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
5816 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
5819 if test -n "$_SAVE_DEBUG_FLAGS"; then
5820 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
5823 if test -n "$MOZ_OPTIMIZE"; then
5824 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
5825 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
5828 if test -n "$MOZ_DEBUG"; then
5829 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
5830 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
5833 if test -n "$MOZ_OPTIMIZE"; then
5834 OBJDIR_TAG=_OPT
5835 else
5836 OBJDIR_TAG=_DBG
5839 if test -n "$USE_64"; then
5840 COMPILER_TAG=_64
5843 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
5845 case "$target_os" in
5846 cygwin*|msvc*|mks*)
5847 CC="\$(CYGWIN_WRAPPER) $CC"
5848 CXX="\$(CYGWIN_WRAPPER) $CXX"
5849 RC="\$(CYGWIN_WRAPPER) $RC"
5851 esac
5949 MAKEFILES="
5950 Makefile
5951 config/Makefile
5952 config/autoconf.mk
5953 config/nsprincl.mk
5954 config/nsprincl.sh
5955 config/nspr-config
5956 lib/Makefile
5957 lib/ds/Makefile
5958 lib/libc/Makefile
5959 lib/libc/include/Makefile
5960 lib/libc/src/Makefile
5961 lib/tests/Makefile
5962 pkg/Makefile
5963 pkg/linux/Makefile
5964 pkg/solaris/Makefile
5965 pkg/solaris/SUNWpr/Makefile
5966 pkg/solaris/SUNWprd/Makefile
5967 pr/Makefile
5968 pr/include/Makefile
5969 pr/include/md/Makefile
5970 pr/include/obsolete/Makefile
5971 pr/include/private/Makefile
5972 pr/src/Makefile
5973 pr/src/io/Makefile
5974 pr/src/linking/Makefile
5975 pr/src/malloc/Makefile
5976 pr/src/md/Makefile
5977 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
5978 pr/src/memory/Makefile
5979 pr/src/misc/Makefile
5980 pr/src/threads/Makefile
5981 pr/tests/Makefile
5982 pr/tests/dll/Makefile
5986 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
5987 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
5988 elif test -n "$USE_PTHREADS"; then
5989 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
5990 elif test -n "$USE_BTHREADS"; then
5991 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
5994 if test -n "$USE_CPLUS"; then
5995 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
5998 echo $MAKEFILES > unallmakefiles
6000 trap '' 1 2 15
6001 cat > confcache <<\EOF
6002 # This file is a shell script that caches the results of configure
6003 # tests run on this system so they can be shared between configure
6004 # scripts and configure runs. It is not useful on other systems.
6005 # If it contains results you don't want to keep, you may remove or edit it.
6007 # By default, configure uses ./config.cache as the cache file,
6008 # creating it if it does not exist already. You can give configure
6009 # the --cache-file=FILE option to use a different cache file; that is
6010 # what configure does when it calls configure scripts in
6011 # subdirectories, so they share the cache.
6012 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6013 # config.status only pays attention to the cache file if you give it the
6014 # --recheck option to rerun configure.
6017 # The following way of writing the cache mishandles newlines in values,
6018 # but we know of no workaround that is simple, portable, and efficient.
6019 # So, don't put newlines in cache variables' values.
6020 # Ultrix sh set writes to stderr and can't be redirected directly,
6021 # and sets the high bit in the cache file unless we assign to the vars.
6022 (set) 2>&1 |
6023 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6024 *ac_space=\ *)
6025 # `set' does not quote correctly, so add quotes (double-quote substitution
6026 # turns \\\\ into \\, and sed turns \\ into \).
6027 sed -n \
6028 -e "s/'/'\\\\''/g" \
6029 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6032 # `set' quotes correctly as required by POSIX, so do not add quotes.
6033 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6035 esac >> confcache
6036 if cmp -s $cache_file confcache; then
6038 else
6039 if test -w $cache_file; then
6040 echo "updating cache $cache_file"
6041 cat confcache > $cache_file
6042 else
6043 echo "not updating unwritable cache $cache_file"
6046 rm -f confcache
6048 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6050 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6051 # Let make expand exec_prefix.
6052 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6054 # Any assignment to VPATH causes Sun make to only execute
6055 # the first set of double-colon rules, so remove it if not needed.
6056 # If there is a colon in the path, we need to keep it.
6057 if test "x$srcdir" = x.; then
6058 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6061 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6063 # Transform confdefs.h into DEFS.
6064 # Protect against shell expansion while executing Makefile rules.
6065 # Protect against Makefile macro expansion.
6066 cat > conftest.defs <<\EOF
6067 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6068 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6069 s%\[%\\&%g
6070 s%\]%\\&%g
6071 s%\$%$$%g
6073 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '`
6074 rm -f conftest.defs
6077 # Without the "./", some shells look in PATH for config.status.
6078 : ${CONFIG_STATUS=./config.status}
6080 echo creating $CONFIG_STATUS
6081 rm -f $CONFIG_STATUS
6082 cat > $CONFIG_STATUS <<EOF
6083 #! /bin/sh
6084 # Generated automatically by configure.
6085 # Run this file to recreate the current configuration.
6086 # This directory was configured as follows,
6087 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6089 # $0 $ac_configure_args
6091 # Compiler output produced by configure, useful for debugging
6092 # configure, is in ./config.log if it exists.
6094 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6095 for ac_option
6097 case "\$ac_option" in
6098 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6099 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6100 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6101 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6102 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6103 exit 0 ;;
6104 -help | --help | --hel | --he | --h)
6105 echo "\$ac_cs_usage"; exit 0 ;;
6106 *) echo "\$ac_cs_usage"; exit 1 ;;
6107 esac
6108 done
6110 ac_given_srcdir=$srcdir
6112 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6114 cat >> $CONFIG_STATUS <<EOF
6116 # Protect against being on the right side of a sed subst in config.status.
6117 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6118 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6119 $ac_vpsub
6120 $extrasub
6121 s%@SHELL@%$SHELL%g
6122 s%@CFLAGS@%$CFLAGS%g
6123 s%@CPPFLAGS@%$CPPFLAGS%g
6124 s%@CXXFLAGS@%$CXXFLAGS%g
6125 s%@FFLAGS@%$FFLAGS%g
6126 s%@DEFS@%$DEFS%g
6127 s%@LDFLAGS@%$LDFLAGS%g
6128 s%@LIBS@%$LIBS%g
6129 s%@exec_prefix@%$exec_prefix%g
6130 s%@prefix@%$prefix%g
6131 s%@program_transform_name@%$program_transform_name%g
6132 s%@bindir@%$bindir%g
6133 s%@sbindir@%$sbindir%g
6134 s%@libexecdir@%$libexecdir%g
6135 s%@datadir@%$datadir%g
6136 s%@sysconfdir@%$sysconfdir%g
6137 s%@sharedstatedir@%$sharedstatedir%g
6138 s%@localstatedir@%$localstatedir%g
6139 s%@libdir@%$libdir%g
6140 s%@includedir@%$includedir%g
6141 s%@oldincludedir@%$oldincludedir%g
6142 s%@infodir@%$infodir%g
6143 s%@mandir@%$mandir%g
6144 s%@host@%$host%g
6145 s%@host_alias@%$host_alias%g
6146 s%@host_cpu@%$host_cpu%g
6147 s%@host_vendor@%$host_vendor%g
6148 s%@host_os@%$host_os%g
6149 s%@target@%$target%g
6150 s%@target_alias@%$target_alias%g
6151 s%@target_cpu@%$target_cpu%g
6152 s%@target_vendor@%$target_vendor%g
6153 s%@target_os@%$target_os%g
6154 s%@build@%$build%g
6155 s%@build_alias@%$build_alias%g
6156 s%@build_cpu@%$build_cpu%g
6157 s%@build_vendor@%$build_vendor%g
6158 s%@build_os@%$build_os%g
6159 s%@CC@%$CC%g
6160 s%@dist_prefix@%$dist_prefix%g
6161 s%@dist_bindir@%$dist_bindir%g
6162 s%@dist_includedir@%$dist_includedir%g
6163 s%@dist_libdir@%$dist_libdir%g
6164 s%@WHOAMI@%$WHOAMI%g
6165 s%@HOST_CC@%$HOST_CC%g
6166 s%@CXX@%$CXX%g
6167 s%@RANLIB@%$RANLIB%g
6168 s%@AR@%$AR%g
6169 s%@AS@%$AS%g
6170 s%@LD@%$LD%g
6171 s%@STRIP@%$STRIP%g
6172 s%@WINDRES@%$WINDRES%g
6173 s%@CPP@%$CPP%g
6174 s%@PERL@%$PERL%g
6175 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6176 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6177 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6178 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6179 s%@GNU_CC@%$GNU_CC%g
6180 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6181 s%@MSC_VER@%$MSC_VER%g
6182 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6183 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6184 s%@USE_CPLUS@%$USE_CPLUS%g
6185 s%@USE_IPV6@%$USE_IPV6%g
6186 s%@USE_N32@%$USE_N32%g
6187 s%@USE_64@%$USE_64%g
6188 s%@OBJECT_MODE@%$OBJECT_MODE%g
6189 s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
6190 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6191 s%@USE_PTHREADS@%$USE_PTHREADS%g
6192 s%@USE_BTHREADS@%$USE_BTHREADS%g
6193 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6194 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6195 s%@LIBNSPR@%$LIBNSPR%g
6196 s%@LIBPLC@%$LIBPLC%g
6197 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6198 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6199 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6200 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6201 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6202 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6203 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6204 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6205 s%@CPU_ARCH@%$CPU_ARCH%g
6206 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6207 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6208 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6209 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6210 s%@MKSHLIB@%$MKSHLIB%g
6211 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6212 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6213 s%@OS_TARGET@%$OS_TARGET%g
6214 s%@OS_ARCH@%$OS_ARCH%g
6215 s%@OS_RELEASE@%$OS_RELEASE%g
6216 s%@OS_TEST@%$OS_TEST%g
6217 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6218 s%@DEFINES@%$DEFINES%g
6219 s%@AR_FLAGS@%$AR_FLAGS%g
6220 s%@ASFLAGS@%$ASFLAGS%g
6221 s%@FILTER@%$FILTER%g
6222 s%@IMPLIB@%$IMPLIB%g
6223 s%@OS_LIBS@%$OS_LIBS%g
6224 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6225 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6226 s%@NOSUCHFILE@%$NOSUCHFILE%g
6227 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6228 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6229 s%@OBJDIR@%$OBJDIR%g
6230 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6231 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6232 s%@NSINSTALL@%$NSINSTALL%g
6233 s%@OPTIMIZER@%$OPTIMIZER%g
6234 s%@RC@%$RC%g
6235 s%@RCFLAGS@%$RCFLAGS%g
6236 s%@DLLFLAGS@%$DLLFLAGS%g
6237 s%@EXEFLAGS@%$EXEFLAGS%g
6238 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6239 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6240 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6241 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6242 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6243 s%@NEXT_ROOT@%$NEXT_ROOT%g
6244 s%@MT@%$MT%g
6246 CEOF
6249 cat >> $CONFIG_STATUS <<\EOF
6251 # Split the substitutions into bite-sized pieces for seds with
6252 # small command number limits, like on Digital OSF/1 and HP-UX.
6253 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6254 ac_file=1 # Number of current file.
6255 ac_beg=1 # First line for current file.
6256 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6257 ac_more_lines=:
6258 ac_sed_cmds=""
6259 while $ac_more_lines; do
6260 if test $ac_beg -gt 1; then
6261 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6262 else
6263 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6265 if test ! -s conftest.s$ac_file; then
6266 ac_more_lines=false
6267 rm -f conftest.s$ac_file
6268 else
6269 if test -z "$ac_sed_cmds"; then
6270 ac_sed_cmds="sed -f conftest.s$ac_file"
6271 else
6272 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6274 ac_file=`expr $ac_file + 1`
6275 ac_beg=$ac_end
6276 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6278 done
6279 if test -z "$ac_sed_cmds"; then
6280 ac_sed_cmds=cat
6284 cat >> $CONFIG_STATUS <<EOF
6286 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6288 cat >> $CONFIG_STATUS <<\EOF
6289 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6290 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6291 case "$ac_file" in
6292 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6293 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6294 *) ac_file_in="${ac_file}.in" ;;
6295 esac
6297 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6299 # Remove last slash and all that follows it. Not all systems have dirname.
6300 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6301 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6302 # The file is in a subdirectory.
6303 test ! -d "$ac_dir" && mkdir "$ac_dir"
6304 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6305 # A "../" for each directory in $ac_dir_suffix.
6306 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6307 else
6308 ac_dir_suffix= ac_dots=
6311 case "$ac_given_srcdir" in
6312 .) srcdir=.
6313 if test -z "$ac_dots"; then top_srcdir=.
6314 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6315 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6316 *) # Relative path.
6317 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6318 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6319 esac
6322 echo creating "$ac_file"
6323 rm -f "$ac_file"
6324 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6325 case "$ac_file" in
6326 *Makefile*) ac_comsub="1i\\
6327 # $configure_input" ;;
6328 *) ac_comsub= ;;
6329 esac
6331 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6332 sed -e "$ac_comsub
6333 s%@configure_input@%$configure_input%g
6334 s%@srcdir@%$srcdir%g
6335 s%@top_srcdir@%$top_srcdir%g
6336 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6337 fi; done
6338 rm -f conftest.s*
6341 cat >> $CONFIG_STATUS <<EOF
6344 cat >> $CONFIG_STATUS <<\EOF
6345 chmod +x config/nspr-config
6346 exit 0
6348 chmod +x $CONFIG_STATUS
6349 rm -fr confdefs* $ac_clean_files
6350 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1