Final patch (I pray) for 460116 (r=jorendorff).
[mozilla-central.git] / nsprpub / configure
blob65000d7401a8a26adf59f03df93a2e2024348665
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=2
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*|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 darwin*) OS_ARCH=Darwin ;;
2787 esac
2788 else
2789 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2790 OS_RELEASE=`uname -r`
2791 OS_TEST=`uname -m`
2794 if test "$OS_ARCH" = "IRIX64"; then
2795 OS_ARCH=IRIX
2798 if test "$OS_ARCH" = "AIX"; then
2799 OS_RELEASE=`uname -v`.`uname -r`
2802 if test "$OS_ARCH" = "FreeBSD"; then
2803 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2806 if test "$OS_ARCH" = "Linux"; then
2807 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2808 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
2811 if test "$OS_ARCH" = "OpenVMS"; then
2812 OS_RELEASE=`uname -v`
2815 #######################################################################
2816 # Master "Core Components" macros for getting the OS target #
2817 #######################################################################
2820 # Note: OS_TARGET should be specified on the command line for gmake.
2821 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
2822 # The difference between the Win95 target and the WinNT target is that
2823 # the WinNT target uses Windows NT specific features not available
2824 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
2825 # at lesser performance (the Win95 target uses threads; the WinNT target
2826 # uses fibers).
2828 # When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
2829 # is built. See: win16_3.11.mk for lots more about the Win16 target.
2831 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
2832 # cross-compilation.
2836 # The following hack allows one to build on a WIN95 machine (as if
2837 # s/he were cross-compiling on a WINNT host for a WIN95 target).
2838 # It also accomodates for MKS's uname.exe. If you never intend
2839 # to do development on a WIN95 machine, you don't need this hack.
2841 case "$OS_ARCH" in
2842 WIN95)
2843 OS_ARCH=WINNT
2844 OS_TARGET=WIN95
2846 Windows_95)
2847 OS_ARCH=Windows_NT
2848 OS_TARGET=WIN95
2850 Windows_98)
2851 OS_ARCH=Windows_NT
2852 OS_TARGET=WIN95
2854 CYGWIN_9*|CYGWIN_ME*)
2855 OS_ARCH='CYGWIN_NT-4.0'
2856 OS_TARGET=WIN95
2858 OS_2)
2859 OS_ARCH=OS2
2860 OS_TARGET=OS2
2862 esac
2865 # On WIN32, we also define the variable CPU_ARCH.
2868 case "$OS_ARCH" in
2869 WINNT)
2870 CPU_ARCH=`uname -p`
2871 if test "$CPU_ARCH" = "I386"; then
2872 CPU_ARCH=x86
2875 Windows_NT)
2877 # If uname -s returns "Windows_NT", we assume that we are using
2878 # the uname.exe in MKS toolkit.
2880 # The -r option of MKS uname only returns the major version number.
2881 # So we need to use its -v option to get the minor version number.
2882 # Moreover, it doesn't have the -p option, so we need to use uname -m.
2884 OS_ARCH=WINNT
2885 OS_MINOR_RELEASE=`uname -v`
2886 if test "$OS_MINOR_RELEASE" = "00"; then
2887 OS_MINOR_RELEASE=0
2889 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
2890 CPU_ARCH=`uname -m`
2892 # MKS's uname -m returns "586" on a Pentium machine.
2894 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2895 CPU_ARCH=x86
2898 CYGWIN_NT*|MINGW*_NT*)
2900 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
2901 # the uname.exe in the Cygwin tools.
2902 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
2903 # the uname.exe in the MSYS tools.
2905 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
2906 OS_ARCH=WINNT
2907 CPU_ARCH=`uname -m`
2909 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
2911 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2912 CPU_ARCH=x86
2915 esac
2917 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
2918 OS_TARGET=WIN95
2919 if test -n "$MOZ_DEBUG"; then
2920 USE_DEBUG_RTL=1
2923 if test -z "$OS_TARGET"; then
2924 OS_TARGET=$OS_ARCH
2926 if test "$OS_TARGET" = "WIN95"; then
2927 OS_RELEASE="4.0"
2929 if test "$OS_TARGET" = "WIN16"; then
2930 OS_RELEASE=
2932 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
2934 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
2935 if test "${enable_os2_high_mem+set}" = set; then
2936 enableval="$enable_os2_high_mem"
2937 if test "$enableval" = "no"; then
2938 MOZ_OS2_HIGH_MEMORY=
2939 else
2940 MOZ_OS2_HIGH_MEMORY=1
2945 case "$host" in
2946 *-mingw*)
2947 NSINSTALL=nsinstall
2949 *-cygwin*|*-msvc*|*-mks*)
2950 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
2951 if test `echo "${PATH}" | grep -c \;` = 0; then
2952 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
2955 *-beos*)
2956 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
2958 *os2*)
2961 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
2963 esac
2965 case "$target" in
2967 *-aix*)
2968 cat >> confdefs.h <<\EOF
2969 #define XP_UNIX 1
2972 cat >> confdefs.h <<\EOF
2973 #define AIX 1
2976 cat >> confdefs.h <<\EOF
2977 #define SYSV 1
2980 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
2981 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
2982 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
2983 echo "configure:2984: checking for sys/atomic_op.h" >&5
2984 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2985 echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987 cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 #include <sys/atomic_op.h>
2992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2993 { (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2995 if test -z "$ac_err"; then
2996 rm -rf conftest*
2997 eval "ac_cv_header_$ac_safe=yes"
2998 else
2999 echo "$ac_err" >&5
3000 echo "configure: failed program was:" >&5
3001 cat conftest.$ac_ext >&5
3002 rm -rf conftest*
3003 eval "ac_cv_header_$ac_safe=no"
3005 rm -f conftest*
3007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3008 echo "$ac_t""yes" 1>&6
3009 cat >> confdefs.h <<\EOF
3010 #define AIX_HAVE_ATOMIC_OP_H 1
3013 else
3014 echo "$ac_t""no" 1>&6
3017 case "${target_os}" in
3018 aix3.2*)
3019 cat >> confdefs.h <<\EOF
3020 #define AIX_RENAME_SELECT 1
3023 cat >> confdefs.h <<\EOF
3024 #define _PR_NO_LARGE_FILES 1
3027 AIX_LINK_OPTS='-bnso -berok'
3028 PR_MD_ASFILES=os_AIX.s
3030 aix4.1*)
3031 cat >> confdefs.h <<\EOF
3032 #define AIX_TIMERS 1
3035 cat >> confdefs.h <<\EOF
3036 #define _PR_NO_LARGE_FILES 1
3039 cat >> confdefs.h <<\EOF
3040 #define AIX4_1 1
3043 MKSHLIB=
3044 DSO_LDOPTS=
3045 AIX_LINK_OPTS='-bnso -berok'
3046 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3047 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3049 aix4.2*)
3050 cat >> confdefs.h <<\EOF
3051 #define AIX_TIMERS 1
3054 cat >> confdefs.h <<\EOF
3055 #define _PR_HAVE_OFF64_T 1
3058 AIX_LINK_OPTS='-brtl -bnso -berok'
3060 aix4.3*)
3061 cat >> confdefs.h <<\EOF
3062 #define AIX_TIMERS 1
3065 cat >> confdefs.h <<\EOF
3066 #define _PR_HAVE_OFF64_T 1
3069 cat >> confdefs.h <<\EOF
3070 #define AIX4_3_PLUS 1
3073 cat >> confdefs.h <<\EOF
3074 #define HAVE_SOCKLEN_T 1
3077 cat >> confdefs.h <<\EOF
3078 #define HAVE_FCNTL_FILE_LOCKING 1
3081 USE_IPV6=1
3082 AIX_LINK_OPTS='-brtl -bnso -berok'
3085 cat >> confdefs.h <<\EOF
3086 #define AIX_TIMERS 1
3089 cat >> confdefs.h <<\EOF
3090 #define _PR_HAVE_OFF64_T 1
3093 cat >> confdefs.h <<\EOF
3094 #define AIX4_3_PLUS 1
3097 cat >> confdefs.h <<\EOF
3098 #define HAVE_SOCKLEN_T 1
3101 cat >> confdefs.h <<\EOF
3102 #define HAVE_FCNTL_FILE_LOCKING 1
3105 USE_IPV6=1
3106 AIX_LINK_OPTS='-brtl -bnso -berok'
3108 esac
3109 CFLAGS="$CFLAGS -qro -qroconst"
3110 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3111 AIX_TMP='./_aix_tmp.o'
3112 if test -n "$USE_64"; then
3113 MDCPUCFG_H=_aix64.cfg
3114 OBJECT_MODE=64
3115 else
3116 MDCPUCFG_H=_aix32.cfg
3118 PR_MD_CSRCS=aix.c
3119 RESOLVE_LINK_SYMBOLS=1
3122 *-beos*)
3123 cat >> confdefs.h <<\EOF
3124 #define XP_BEOS 1
3127 cat >> confdefs.h <<\EOF
3128 #define BeOS 1
3131 cat >> confdefs.h <<\EOF
3132 #define BEOS 1
3135 cat >> confdefs.h <<\EOF
3136 #define _POSIX_SOURCE 1
3139 DSO_LDOPTS=-nostart
3140 MDCPUCFG_H=_beos.cfg
3141 USE_BTHREADS=1
3142 PR_MD_ARCH_DIR=beos
3143 RESOLVE_LINK_SYMBOLS=1
3144 case "${target_cpu}" in
3145 i*86)
3146 _OPTIMIZE_FLAGS=-O2
3147 _DEBUG_FLAGS='-gdwarf-2 -O0'
3148 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3149 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3150 echo "configure:3151: checking for gethostbyaddr in -lbind" >&5
3151 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3152 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3153 echo $ac_n "(cached) $ac_c" 1>&6
3154 else
3155 ac_save_LIBS="$LIBS"
3156 LIBS="-lbind $LIBS"
3157 cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 /* Override any gcc2 internal prototype to avoid an error. */
3161 /* We use char because int might match the return type of a gcc2
3162 builtin and then its argument prototype would still apply. */
3163 char gethostbyaddr();
3165 int main() {
3166 gethostbyaddr()
3167 ; return 0; }
3169 if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3170 rm -rf conftest*
3171 eval "ac_cv_lib_$ac_lib_var=yes"
3172 else
3173 echo "configure: failed program was:" >&5
3174 cat conftest.$ac_ext >&5
3175 rm -rf conftest*
3176 eval "ac_cv_lib_$ac_lib_var=no"
3178 rm -f conftest*
3179 LIBS="$ac_save_LIBS"
3182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3183 echo "$ac_t""yes" 1>&6
3184 OS_LIBS="$OS_LIBS -lbind -lsocket"
3185 else
3186 echo "$ac_t""no" 1>&6
3190 powerpc)
3191 CC=mwcc
3192 CCC=mwcc
3193 LD=mwld
3194 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'
3195 _OPTIMIZE_FLAGS=-O2
3196 _DEBUG_FLAGS='-g -O0'
3198 esac
3201 *-bsdi*)
3202 cat >> confdefs.h <<\EOF
3203 #define XP_UNIX 1
3206 cat >> confdefs.h <<\EOF
3207 #define BSDI 1
3210 cat >> confdefs.h <<\EOF
3211 #define NEED_BSDREGEX 1
3215 CFLAGS="$CFLAGS -Wall -Wno-format"
3216 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3218 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3219 CPU_ARCH=x86
3220 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3221 CPU_ARCH=sparc
3224 MDCPUCFG_H=_bsdi.cfg
3225 PR_MD_CSRCS=bsdi.c
3227 DSO_LDOPTS=-r
3229 case "$target_os" in
3230 bsdi1.1*)
3231 cat >> confdefs.h <<\EOF
3232 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3235 cat >> confdefs.h <<\EOF
3236 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3239 cat >> confdefs.h <<\EOF
3240 #define _PR_NEED_H_ERRNO 1
3243 MKSHLIB=
3244 DSO_CFLAGS=
3245 DSO_LDOPTS=
3248 bsdi2.1*)
3249 cat >> confdefs.h <<\EOF
3250 #define _PR_TIMESPEC_HAS_TS_SEC 1
3253 cat >> confdefs.h <<\EOF
3254 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3257 cat >> confdefs.h <<\EOF
3258 #define HAVE_DLL 1
3261 cat >> confdefs.h <<\EOF
3262 #define USE_DLFCN 1
3265 cat >> confdefs.h <<\EOF
3266 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3269 PR_MD_ASFILES=os_BSD_OS_386_2.s
3272 bsdi4.* | bsdi5.*)
3273 cat >> confdefs.h <<\EOF
3274 #define _PR_SELECT_CONST_TIMEVAL 1
3277 cat >> confdefs.h <<\EOF
3278 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3281 cat >> confdefs.h <<\EOF
3282 #define HAVE_DLL 1
3285 cat >> confdefs.h <<\EOF
3286 #define USE_DLFCN 1
3289 cat >> confdefs.h <<\EOF
3290 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3293 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3294 DSO_CFLAGS=-fPIC
3295 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3296 STRIP="$STRIP -d"
3297 case "$target_os" in
3298 bsdi4.2* | bsdi4.3* | bsdi5.*)
3299 cat >> confdefs.h <<\EOF
3300 #define _PR_HAVE_GETPROTO_R 1
3303 cat >> confdefs.h <<\EOF
3304 #define _PR_HAVE_GETPROTO_R_POINTER 1
3308 esac
3311 cat >> confdefs.h <<\EOF
3312 #define _PR_SELECT_CONST_TIMEVAL 1
3315 cat >> confdefs.h <<\EOF
3316 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3319 cat >> confdefs.h <<\EOF
3320 #define HAVE_DLL 1
3323 cat >> confdefs.h <<\EOF
3324 #define USE_DLFCN 1
3327 cat >> confdefs.h <<\EOF
3328 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3332 esac
3336 *-darwin*)
3337 cat >> confdefs.h <<\EOF
3338 #define XP_UNIX 1
3341 cat >> confdefs.h <<\EOF
3342 #define DARWIN 1
3345 cat >> confdefs.h <<\EOF
3346 #define HAVE_BSD_FLOCK 1
3349 cat >> confdefs.h <<\EOF
3350 #define HAVE_SOCKLEN_T 1
3353 CFLAGS="$CFLAGS -Wmost -fno-common"
3354 case "${target_cpu}" in
3355 i*86*)
3356 if test -n "$USE_64"; then
3357 CPU_ARCH=x86_64
3358 CC="$CC -arch x86_64"
3359 else
3360 CPU_ARCH=i386
3364 CPU_ARCH=ppc
3366 esac
3367 DSO_CFLAGS=-fPIC
3368 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3369 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3370 STRIP="$STRIP -x -S"
3371 DLL_SUFFIX=dylib
3372 USE_PTHREADS=1
3373 MDCPUCFG_H=_darwin.cfg
3374 PR_MD_CSRCS=darwin.c
3375 PR_MD_ASFILES=os_Darwin.s
3377 # Add Mac OS X support for loading CFM & CFBundle plugins
3378 if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
3379 cat >> confdefs.h <<\EOF
3380 #define XP_MACOSX 1
3383 OS_TARGET=MacOSX
3385 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3386 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3387 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3388 case "${target_cpu}" in
3389 powerpc*)
3390 export MACOSX_DEPLOYMENT_TARGET=10.2
3392 i*86*)
3393 export MACOSX_DEPLOYMENT_TARGET=10.4
3395 esac
3399 if test "$MACOS_SDK_DIR"; then
3401 if test ! -d "$MACOS_SDK_DIR"; then
3402 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3403 specify a valid SDK. SDKs are installed when the optional cross-development
3404 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3408 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3409 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3410 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3412 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3413 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3414 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3415 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3416 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3419 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3421 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3423 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3426 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3428 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3429 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}"
3430 else
3431 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3434 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3435 DSO_LDOPTS="${MACOS_SDK_LIBS} $DSO_LDOPTS"
3436 export NEXT_ROOT=$MACOS_SDK_DIR
3438 if test -n "$CROSS_COMPILE" ; then
3439 HOST_CC="NEXT_ROOT= $HOST_CC"
3440 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3442 else
3443 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3445 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3447 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3448 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3449 DSO_LDOPTS="$DSO_LDOPTS -isysroot ${MACOS_SDK_DIR}"
3450 else
3451 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3452 DSO_LDOPTS="$DSO_LDOPTS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3459 *-dgux*)
3460 cat >> confdefs.h <<\EOF
3461 #define XP_UNIX 1
3464 cat >> confdefs.h <<\EOF
3465 #define _PR_LOCAL_THREADS_ONLY 1
3468 cat >> confdefs.h <<\EOF
3469 #define SVR4 1
3472 cat >> confdefs.h <<\EOF
3473 #define SYSV 1
3476 cat >> confdefs.h <<\EOF
3477 #define DGUX 1
3480 cat >> confdefs.h <<\EOF
3481 #define _DGUX_SOURCE 1
3484 cat >> confdefs.h <<\EOF
3485 #define _POSIX4A_DRAFT6_SOURCE 1
3488 DSO_LDOPTS=-G
3489 _OPTIMIZE_FLAGS=-O2
3490 _DEBUG_FLAGS=
3491 MDCPUCFG_H=_dgux.cfg
3492 PR_MD_CSRCS=dgux.c
3495 *-freebsd*)
3496 if test -z "$USE_NSPR_THREADS"; then
3497 USE_PTHREADS=1
3499 cat >> confdefs.h <<\EOF
3500 #define XP_UNIX 1
3503 cat >> confdefs.h <<\EOF
3504 #define FREEBSD 1
3507 cat >> confdefs.h <<\EOF
3508 #define HAVE_BSD_FLOCK 1
3511 cat >> confdefs.h <<\EOF
3512 #define HAVE_SOCKLEN_T 1
3515 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3516 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
3517 if test "$MOZ_OBJFORMAT" = "elf"; then
3518 DLL_SUFFIX=so
3519 else
3520 DLL_SUFFIX=so.1.0
3522 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3523 DSO_CFLAGS=-fPIC
3524 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3525 MDCPUCFG_H=_freebsd.cfg
3526 PR_MD_CSRCS=freebsd.c
3529 *-hpux*)
3530 cat >> confdefs.h <<\EOF
3531 #define XP_UNIX 1
3534 cat >> confdefs.h <<\EOF
3535 #define HPUX 1
3538 cat >> confdefs.h <<\EOF
3539 #define _HPUX_SOURCE 1
3542 # OSF1 and HPUX report the POLLHUP event for a socket when the
3543 # shutdown(SHUT_WR) operation is called for the remote end, even though
3544 # the socket is still writeable. Use select(), instead of poll(), to
3545 # workaround this problem.
3546 cat >> confdefs.h <<\EOF
3547 #define _PR_POLL_WITH_SELECT 1
3550 cat >> confdefs.h <<\EOF
3551 #define _USE_BIG_FDS 1
3554 DSO_LDOPTS='-b +h $(notdir $@)'
3555 PR_MD_CSRCS=hpux.c
3556 if test "$OS_TEST" = "ia64"; then
3557 DLL_SUFFIX=so
3558 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
3559 CPU_ARCH_TAG=_$OS_TEST
3560 if test -z "$USE_64"; then
3561 COMPILER_TAG=_32
3563 PR_MD_ASFILES=os_HPUX_ia64.s
3564 else
3565 cat >> confdefs.h <<\EOF
3566 #define hppa 1
3569 DLL_SUFFIX=sl
3570 PR_MD_ASFILES=os_HPUX.s
3572 if test -n "$USE_64"; then
3573 MDCPUCFG_H=_hpux64.cfg
3574 else
3575 MDCPUCFG_H=_hpux32.cfg
3577 if test -z "$GNU_CC"; then
3578 CC="$CC -Ae"
3579 CXX="$CXX -ext"
3580 DSO_CFLAGS=+Z
3581 else
3582 DSO_CFLAGS=-fPIC
3585 if test -n "$MOZILLA_CLIENT"; then
3586 DEFAULT_IMPL_STRATEGY=_EMU
3589 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
3590 cat >> confdefs.h <<\EOF
3591 #define _PR_NEED_H_ERRNO 1
3594 cat >> confdefs.h <<\EOF
3595 #define HPUX9 1
3598 DEFAULT_IMPL_STRATEGY=_EMU
3599 USE_NSPR_THREADS=1
3602 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
3603 cat >> confdefs.h <<\EOF
3604 #define _PR_NO_LARGE_FILES 1
3609 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3610 cat >> confdefs.h <<\EOF
3611 #define _PR_NEED_H_ERRNO 1
3616 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3617 cat >> confdefs.h <<\EOF
3618 #define HAVE_INT_LOCALTIME_R 1
3623 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
3624 cat >> confdefs.h <<\EOF
3625 #define HAVE_POINTER_LOCALTIME_R 1
3630 # HP-UX 11i v2 (B.11.23) or higher
3632 case "$OS_RELEASE" in
3633 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
3634 USE_IPV6=1
3636 esac
3639 if test "$OS_RELEASE" = "B.10.01"; then
3640 cat >> confdefs.h <<\EOF
3641 #define HPUX10 1
3644 DEFAULT_IMPL_STRATEGY=_EMU
3647 if test "$OS_RELEASE" = "B.10.10"; then
3648 cat >> confdefs.h <<\EOF
3649 #define HPUX10 1
3652 cat >> confdefs.h <<\EOF
3653 #define HPUX10_10 1
3656 DEFAULT_IMPL_STRATEGY=_PTH
3659 if test "$OS_RELEASE" = "B.10.20"; then
3660 cat >> confdefs.h <<\EOF
3661 #define HPUX10 1
3664 cat >> confdefs.h <<\EOF
3665 #define HPUX10_20 1
3668 if test -z "$GNU_CC"; then
3669 CFLAGS="$CFLAGS +DAportable +DS1.1"
3670 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3672 DEFAULT_IMPL_STRATEGY=_PTH
3675 if test "$OS_RELEASE" = "B.10.30"; then
3676 cat >> confdefs.h <<\EOF
3677 #define HPUX10 1
3680 cat >> confdefs.h <<\EOF
3681 #define HPUX10_30 1
3684 if test -z "$GNU_CC"; then
3685 CFLAGS="$CFLAGS +DAportable +DS1.1"
3686 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3688 DEFAULT_IMPL_STRATEGY=_PTH
3691 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
3692 cat >> confdefs.h <<\EOF
3693 #define HPUX10 1
3696 cat >> confdefs.h <<\EOF
3697 #define HPUX11 1
3700 cat >> confdefs.h <<\EOF
3701 #define _LARGEFILE64_SOURCE 1
3704 cat >> confdefs.h <<\EOF
3705 #define _PR_HAVE_OFF64_T 1
3708 cat >> confdefs.h <<\EOF
3709 #define HAVE_FCNTL_FILE_LOCKING 1
3712 if test -z "$GNU_CC"; then
3713 if test -z "$USE_64"; then
3714 if test "$OS_TEST" = "ia64"; then
3715 CFLAGS="$CFLAGS +DD32"
3716 CXXFLAGS="$CXXFLAGS +DD32"
3717 else
3718 CFLAGS="$CFLAGS +DAportable +DS2.0"
3719 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
3721 else
3722 if test "$OS_TEST" = "ia64"; then
3723 CFLAGS="$CFLAGS +DD64"
3724 CXXFLAGS="$CXXFLAGS +DD64"
3725 else
3726 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
3727 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
3731 DEFAULT_IMPL_STRATEGY=_PTH
3734 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
3735 USE_NSPR_THREADS=1
3736 USE_PTHREADS=
3737 USE_USER_PTHREADS=
3738 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
3739 USE_PTHREADS=1
3740 if test "$USE_NSPR_THREADS"; then
3741 USE_PTHREADS=
3743 if test "$USE_USER_PTHREADS"; then
3744 USE_PTHREADS=
3749 *-irix*)
3750 cat >> confdefs.h <<\EOF
3751 #define XP_UNIX 1
3754 cat >> confdefs.h <<\EOF
3755 #define IRIX 1
3758 cat >> confdefs.h <<\EOF
3759 #define SVR4 1
3762 cat >> confdefs.h <<\EOF
3763 #define _SGI_MP_SOURCE 1
3766 cat >> confdefs.h <<\EOF
3767 #define HAVE_FCNTL_FILE_LOCKING 1
3770 PR_MD_CSRCS=irix.c
3771 PR_MD_ASFILES=os_Irix.s
3772 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
3773 STRIP="$STRIP -f"
3774 RESOLVE_LINK_SYMBOLS=1
3775 if test -n "$USE_64"; then
3776 MDCPUCFG_H=_irix64.cfg
3777 else
3778 MDCPUCFG_H=_irix32.cfg
3780 case "${target_os}" in
3781 irix6*)
3782 cat >> confdefs.h <<\EOF
3783 #define IRIX6 1
3786 USE_PTHREADS=1
3787 USE_N32=1
3788 COMPILER_TAG=_n32
3789 IMPL_STRATEGY=_PTH
3791 irix5*)
3792 cat >> confdefs.h <<\EOF
3793 #define IRIX5 1
3796 USE_NSPR_THREADS=1
3799 USE_PTHREADS=1
3800 USE_N32=1
3802 esac
3803 if test "$GNU_CC"; then
3804 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
3805 CFLAGS="$CFLAGS -Wall -Wno-format"
3806 _OPTIMIZE_FLAGS="-O6"
3807 else
3808 if test -n "$USE_N32"; then
3809 AS='as -D_ASM $(INCLUDES) -n32'
3810 else
3811 AS='as -D_ASM $(INCLUDES)'
3813 CFLAGS="$CFLAGS -fullwarn -xansi"
3814 if test "$USE_N32"; then
3815 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
3816 else
3817 _OPTIMIZE_FLAGS="-O -Olimit 4000"
3819 if test "$USE_MDUPDATE"; then
3820 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
3822 case "${target}" in
3823 *-irix6.*)
3824 CFLAGS="$CFLAGS -multigot"
3825 DSO_LDOPTS="-no_unresolved"
3826 if test "$USE_N32"; then
3827 CFLAGS="$CFLAGS -n32 -woff 1209"
3828 DSO_LDOPTS="$DSO_LDOPTS -n32"
3829 else
3830 if test "$USE_64"; then
3831 CFLAGS="$CFLAGS -64"
3832 else
3833 CFLAGS="$CFLAGS -32"
3838 CFLAGS="$CFLAGS -xgot"
3840 esac
3842 if test "${target_os}" = "irix5.3"; then
3843 cat >> confdefs.h <<\EOF
3844 #define IRIX5_3 1
3848 case "${target_os}" in
3849 irix6.5)
3850 if test -z "$GNU_CC"; then
3851 CFLAGS="$CFLAGS -mips3"
3853 cat >> confdefs.h <<\EOF
3854 #define _PR_HAVE_GETPROTO_R 1
3857 cat >> confdefs.h <<\EOF
3858 #define _PR_HAVE_GETPROTO_R_POINTER 1
3861 cat >> confdefs.h <<\EOF
3862 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
3866 irix5*)
3869 cat >> confdefs.h <<\EOF
3870 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
3874 esac
3877 *-linux*|*-gnu*|*-k*bsd*-gnu)
3878 if test -z "$USE_NSPR_THREADS"; then
3879 USE_PTHREADS=1
3880 IMPL_STRATEGY=_PTH
3882 cat >> confdefs.h <<\EOF
3883 #define XP_UNIX 1
3886 cat >> confdefs.h <<\EOF
3887 #define _GNU_SOURCE 1
3890 cat >> confdefs.h <<\EOF
3891 #define HAVE_FCNTL_FILE_LOCKING 1
3894 case "${target_os}" in
3895 linux*)
3896 cat >> confdefs.h <<\EOF
3897 #define LINUX 1
3901 esac
3902 CFLAGS="$CFLAGS -Wall"
3903 CXXFLAGS="$CXXFLAGS -Wall"
3904 MDCPUCFG_H=_linux.cfg
3905 PR_MD_CSRCS=linux.c
3906 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3907 DSO_CFLAGS=-fPIC
3908 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3909 _OPTIMIZE_FLAGS=-O2
3910 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
3911 # combo is not yet good at debugging inlined
3912 # functions (even when using DWARF2 as the
3913 # debugging format)
3914 COMPILER_TAG=_glibc
3915 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3916 CPU_ARCH=x86
3917 else
3918 CPU_ARCH=$OS_TEST
3920 CPU_ARCH_TAG=_${CPU_ARCH}
3921 case "${target_cpu}" in
3922 alpha)
3923 cat >> confdefs.h <<\EOF
3924 #define _ALPHA_ 1
3927 cat >> confdefs.h <<\EOF
3928 #define __alpha 1
3931 CFLAGS="$CFLAGS -mieee"
3932 CXXFLAGS="$CXXFLAGS -mieee"
3934 i*86)
3935 cat >> confdefs.h <<\EOF
3936 #define i386 1
3939 PR_MD_ASFILES=os_Linux_x86.s
3941 ia64)
3942 PR_MD_ASFILES=os_Linux_ia64.s
3944 x86_64)
3945 if test -n "$USE_64"; then
3946 PR_MD_ASFILES=os_Linux_x86_64.s
3947 else
3948 cat >> confdefs.h <<\EOF
3949 #define i386 1
3952 PR_MD_ASFILES=os_Linux_x86.s
3953 CC="$CC -m32"
3954 CXX="$CXX -m32"
3957 ppc|powerpc)
3958 PR_MD_ASFILES=os_Linux_ppc.s
3960 powerpc64)
3961 if test -n "$USE_64"; then
3962 CC="$CC -m64"
3963 CXX="$CXX -m64"
3964 else
3965 PR_MD_ASFILES=os_Linux_ppc.s
3968 m68k)
3969 CFLAGS="$CFLAGS -m68020-60"
3970 CXXFLAGS="$CXXFLAGS -m68020-60"
3972 esac
3975 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
3976 cat >> confdefs.h <<\EOF
3977 #define XP_PC 1
3980 cat >> confdefs.h <<\EOF
3981 #define WIN32 1
3984 PR_MD_ARCH_DIR=windows
3985 RESOLVE_LINK_SYMBOLS=1
3987 if test -n "$GNU_CC"; then
3988 CC="$CC -mno-cygwin"
3989 CXX="$CXX -mno-cygwin"
3990 DLL_SUFFIX=dll
3991 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
3992 RC=$WINDRES
3993 # Use temp file for windres (bug 213281)
3994 RCFLAGS='-O coff --use-temp-file'
3995 else
3996 CC=cl
3997 CXX=cl
3998 LD=link
3999 AR='lib -NOLOGO -OUT:"$@"'
4000 AR_FLAGS=
4001 RANLIB='echo not_ranlib'
4002 STRIP='echo not_strip'
4003 RC=rc.exe
4004 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4005 OBJ_SUFFIX=obj
4006 LIB_SUFFIX=lib
4007 DLL_SUFFIX=dll
4009 # Determine compiler version
4010 CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
4011 _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
4012 _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
4013 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4015 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4016 # tape manipulation utility (or something else)
4017 if test "$MSC_VER" -ge "1400"; then
4019 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4022 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4023 if test -n "$MSMT_TOOL"; then
4024 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4025 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4026 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4028 MT=mt
4029 unset MSMT_TOOL
4030 else
4031 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4035 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4036 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4037 _DEBUG_FLAGS=-Z7
4038 _OPTIMIZE_FLAGS=-O2
4039 if test -z "$MOZ_OPTIMIZE"; then
4040 CFLAGS="$CFLAGS -Od"
4043 if test -n "$USE_DEBUG_RTL"; then
4044 CFLAGS="$CFLAGS -MDd"
4045 else
4046 CFLAGS="$CFLAGS -MD"
4049 if test -n "$MOZ_DEBUG"; then
4050 cat >> confdefs.h <<\EOF
4051 #define _DEBUG 1
4054 else
4055 DEFINES="$DEFINES -U_DEBUG"
4058 if test -n "$MOZ_OPTIMIZE"; then
4059 if test -n "$MOZ_PROFILE"; then
4060 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
4062 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4063 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
4065 if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
4066 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4067 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4071 if test -n "$MOZ_DEBUG"; then
4072 DLLFLAGS="$DLLFLAGS -DEBUG"
4073 LDFLAGS="$LDFLAGS -DEBUG"
4076 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4077 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4078 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4081 if test "$OS_TARGET" = "WINNT"; then
4082 CFLAGS="$CFLAGS -GT"
4083 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4084 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4085 else
4086 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4087 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4089 fi # GNU_CC
4091 if test -n "$USE_STATIC_TLS"; then
4092 cat >> confdefs.h <<\EOF
4093 #define _PR_USE_STATIC_TLS 1
4098 if test "$OS_TARGET" = "WINNT"; then
4099 cat >> confdefs.h <<\EOF
4100 #define WINNT 1
4103 else
4104 cat >> confdefs.h <<\EOF
4105 #define WIN95 1
4108 # undefine WINNT as some versions of mingw gcc define it by default
4109 DEFINES="$DEFINES -UWINNT"
4110 cat >> confdefs.h <<\EOF
4111 #define _PR_GLOBAL_THREADS_ONLY 1
4116 if test "$CPU_ARCH" = "x86"; then
4117 CPU_ARCH_TAG=
4118 else
4119 CPU_ARCH_TAG=$CPU_ARCH
4122 if test -n "$USE_DEBUG_RTL"; then
4123 OBJDIR_SUFFIX=OBJD
4126 case "$OS_TARGET" in
4127 WINNT)
4128 MDCPUCFG_H=_winnt.cfg
4130 WIN95)
4131 MDCPUCFG_H=_win95.cfg
4133 WIN16)
4134 MDCPUCFG_H=_win16.cfg
4137 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4139 esac
4141 case "$target_cpu" in
4142 i*86)
4143 if test -n "$USE_64"; then
4144 cat >> confdefs.h <<\EOF
4145 #define _AMD64_ 1
4148 cat >> confdefs.h <<\EOF
4149 #define _M_AMD64 1
4152 else
4153 cat >> confdefs.h <<\EOF
4154 #define _X86_ 1
4159 alpha)
4160 cat >> confdefs.h <<\EOF
4161 #define _ALPHA_ 1
4165 mips)
4166 cat >> confdefs.h <<\EOF
4167 #define _MIPS_ 1
4171 x86_64)
4172 cat >> confdefs.h <<\EOF
4173 #define _AMD64_ 1
4176 cat >> confdefs.h <<\EOF
4177 #define _M_AMD64 1
4180 USE_64=1
4182 ia64)
4183 cat >> confdefs.h <<\EOF
4184 #define _IA64_ 1
4187 cat >> confdefs.h <<\EOF
4188 #define _M_IA64 1
4191 USE_64=1
4194 cat >> confdefs.h <<\EOF
4195 #define _CPU_ARCH_NOT_DEFINED 1
4199 esac
4201 if test "$USE_64"; then
4202 cat >> confdefs.h <<\EOF
4203 #define _WIN64 1
4210 *-ncr-sysv*)
4211 cat >> confdefs.h <<\EOF
4212 #define XP_UNIX 1
4215 cat >> confdefs.h <<\EOF
4216 #define SVR4 1
4219 cat >> confdefs.h <<\EOF
4220 #define SYSV 1
4223 cat >> confdefs.h <<\EOF
4224 #define NCR 1
4227 USE_NSPR_THREADS=1
4228 if test "$OS_RELEASE" = "2.03"; then
4229 cat >> confdefs.h <<\EOF
4230 #define _PR_STAT_HAS_ST_ATIM 1
4233 else
4234 cat >> confdefs.h <<\EOF
4235 #define _PR_STAT_HAS_ST_ATIM_UNION 1
4240 if test -z "$GNU_CC"; then
4241 CFLAGS="$CFLAGS -Hnocopyr"
4242 CXXFLAGS="$CXXFLAGS -Hnocopyr"
4243 else
4244 CFLAGS="$CFLAGS -fPIC -Wall"
4245 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
4246 DSO_LDOPTS=-G
4248 MDCPUCFG_H=_ncr.cfg
4249 PR_MD_CSRCS=ncr.c
4252 mips-nec-sysv*)
4253 cat >> confdefs.h <<\EOF
4254 #define XP_UNIX 1
4257 cat >> confdefs.h <<\EOF
4258 #define SVR4 1
4261 cat >> confdefs.h <<\EOF
4262 #define __SVR4 1
4265 cat >> confdefs.h <<\EOF
4266 #define NEC 1
4269 cat >> confdefs.h <<\EOF
4270 #define nec_ews 1
4273 USE_NSPR_THREADS=1
4274 if test -z "$GNU_CC"; then
4275 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
4276 CXX=g++
4278 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
4279 DSO_LDOPTS=-G
4280 MDCPUCFG_H=_nec.cfg
4281 PR_MD_CSRCS=nec.c
4284 *-netbsd*)
4285 cat >> confdefs.h <<\EOF
4286 #define XP_UNIX 1
4289 cat >> confdefs.h <<\EOF
4290 #define NETBSD 1
4293 cat >> confdefs.h <<\EOF
4294 #define HAVE_BSD_FLOCK 1
4297 USE_NSPR_THREADS=1
4298 MDCPUCFG_H=_netbsd.cfg
4299 PR_MD_CSRCS=netbsd.c
4301 DSO_CFLAGS='-fPIC -DPIC'
4302 CFLAGS="$CFLAGS -ansi -Wall"
4303 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4304 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4306 if test -z "$OBJECT_FMT"; then
4307 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4308 OBJECT_FMT=a.out
4309 DLL_SUFFIX=so.1.0
4310 DSO_LDOPTS='-shared'
4311 else
4312 OBJECT_FMT=ELF
4313 DLL_SUFFIX=so
4314 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4318 if test "$LIBRUNPATH"; then
4319 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4323 mips-sony-newsos*)
4324 cat >> confdefs.h <<\EOF
4325 #define XP_UNIX 1
4328 cat >> confdefs.h <<\EOF
4329 #define SONY 1
4332 cat >> confdefs.h <<\EOF
4333 #define SYSV 1
4336 cat >> confdefs.h <<\EOF
4337 #define SVR4 1
4340 cat >> confdefs.h <<\EOF
4341 #define __svr4 1
4344 cat >> confdefs.h <<\EOF
4345 #define __svr4__ 1
4348 cat >> confdefs.h <<\EOF
4349 #define HAVE_SVID_GETTOD 1
4352 USE_NSPR_THREADS=1
4353 CFLAGS="$CFLAGS -Xa -fullwarn"
4354 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4355 DSO_LDOPTS=-G
4356 MDCPUCFG_H=_sony.cfg
4357 PR_MD_CSRCS=sony.c
4360 *-nextstep*|*-openstep*)
4361 cat >> confdefs.h <<\EOF
4362 #define XP_UNIX 1
4365 cat >> confdefs.h <<\EOF
4366 #define NEXTSTEP 1
4369 cat >> confdefs.h <<\EOF
4370 #define HAVE_BSD_FLOCK 1
4373 cat >> confdefs.h <<\EOF
4374 #define _POSIX_SOURCE 1
4377 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4378 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4379 USE_NSPR_THREADS=1
4380 DLL_SUFFIX=dylib
4381 MDCPUCFG_H=_nextstep.cfg
4382 PR_MD_CSRCS=nextstep.c
4386 *-nto*)
4387 cat >> confdefs.h <<\EOF
4388 #define XP_UNIX 1
4391 cat >> confdefs.h <<\EOF
4392 #define NTO 1
4395 cat >> confdefs.h <<\EOF
4396 #define _QNX_SOURCE 1
4399 cat >> confdefs.h <<\EOF
4400 #define HAVE_POINTER_LOCALTIME_R 1
4403 MDCPUCFG_H=_nto.cfg
4404 PR_MD_CSRCS=nto.c
4405 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4406 DSO_CFLAGS=-fPIC
4407 DSO_LDOPTS=-shared
4408 OS_LIBS="$OS_LIBS -lsocket"
4409 _OPTIMIZE_FLAGS="-O1"
4410 _DEBUG_FLAGS="-gstabs"
4413 *-openbsd*)
4414 cat >> confdefs.h <<\EOF
4415 #define XP_UNIX 1
4418 cat >> confdefs.h <<\EOF
4419 #define OPENBSD 1
4422 cat >> confdefs.h <<\EOF
4423 #define HAVE_BSD_FLOCK 1
4426 cat >> confdefs.h <<\EOF
4427 #define HAVE_SOCKLEN_T 1
4430 CFLAGS="$CFLAGS -ansi -Wall"
4431 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4432 DLL_SUFFIX=so.1.0
4433 DSO_CFLAGS=-fPIC
4434 MDCPUCFG_H=_openbsd.cfg
4435 PR_MD_CSRCS=openbsd.c
4436 OS_LIBS="-lc"
4437 if test -z "$USE_NSPR_THREADS"; then
4438 USE_PTHREADS=1
4440 DSO_LDOPTS='-shared -fPIC'
4441 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4444 *-openvms*)
4445 cat >> confdefs.h <<\EOF
4446 #define XP_UNIX 1
4449 cat >> confdefs.h <<\EOF
4450 #define VMS 1
4453 cat >> confdefs.h <<\EOF
4454 #define PR_GETIPNODE_NOT_THREADSAFE 1
4457 RESOLVE_LINK_SYMBOLS=1
4458 AR_FLAGS='c $@'
4459 MDCPUCFG_H=_openvms.cfg
4460 PR_MD_CSRCS=openvms.c
4461 DSO_LDOPTS='-shared -auto_symvec $(LDFLAGS)'
4462 if test -n "$MOZ_DEBUG"; then
4463 DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
4464 else
4465 DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
4469 *-osf*)
4470 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4471 cat >> confdefs.h <<\EOF
4472 #define XP_UNIX 1
4475 cat >> confdefs.h <<\EOF
4476 #define OSF1 1
4479 cat >> confdefs.h <<\EOF
4480 #define _REENTRANT 1
4483 # OSF1 and HPUX report the POLLHUP event for a socket when the
4484 # shutdown(SHUT_WR) operation is called for the remote end, even though
4485 # the socket is still writeable. Use select(), instead of poll(), to
4486 # workaround this problem.
4487 cat >> confdefs.h <<\EOF
4488 #define _PR_POLL_WITH_SELECT 1
4492 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4493 USE_NSPR_THREADS=1
4496 if test -z "$GNU_CC"; then
4497 CC="$CC -std1 -ieee_with_inexact"
4498 if test "$OS_RELEASE" != "V2.0"; then
4499 CC="$CC -readonly_strings"
4501 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4502 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4503 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4504 echo "configure:4505: checking for machine/builtins.h" >&5
4505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4506 echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <machine/builtins.h>
4513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4514 { (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4516 if test -z "$ac_err"; then
4517 rm -rf conftest*
4518 eval "ac_cv_header_$ac_safe=yes"
4519 else
4520 echo "$ac_err" >&5
4521 echo "configure: failed program was:" >&5
4522 cat conftest.$ac_ext >&5
4523 rm -rf conftest*
4524 eval "ac_cv_header_$ac_safe=no"
4526 rm -f conftest*
4528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4529 echo "$ac_t""yes" 1>&6
4530 cat >> confdefs.h <<\EOF
4531 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4534 else
4535 echo "$ac_t""no" 1>&6
4538 else
4539 CFLAGS="$CFLAGS -mieee"
4540 CXXFLAGS="$CXXFLAGS -mieee"
4543 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4544 cat >> confdefs.h <<\EOF
4545 #define HAVE_INT_LOCALTIME_R 1
4548 else
4549 cat >> confdefs.h <<\EOF
4550 #define HAVE_FCNTL_FILE_LOCKING 1
4553 cat >> confdefs.h <<\EOF
4554 #define HAVE_POINTER_LOCALTIME_R 1
4558 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4559 cat >> confdefs.h <<\EOF
4560 #define OSF1V4_MAP_PRIVATE_BUG 1
4564 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4565 MDCPUCFG_H=_osf1.cfg
4566 PR_MD_CSRCS=osf1.c
4569 *-qnx*)
4570 cat >> confdefs.h <<\EOF
4571 #define XP_UNIX 1
4574 cat >> confdefs.h <<\EOF
4575 #define QNX 1
4578 cat >> confdefs.h <<\EOF
4579 #define _PR_NEED_H_ERRNO 1
4582 USE_NSPR_THREADS=1
4583 MDCPUCFG_H=_qnx.cfg
4584 PR_MD_CSRCS=qnx.c
4587 *-riscos*)
4588 cat >> confdefs.h <<\EOF
4589 #define XP_UNIX 1
4592 cat >> confdefs.h <<\EOF
4593 #define RISCOS 1
4596 cat >> confdefs.h <<\EOF
4597 #define _PR_NEED_H_ERRNO 1
4600 USE_PTHREADS=1
4601 MDCPUCFG_H=_riscos.cfg
4602 PR_MD_CSRCS=riscos.c
4603 DLL_SUFFIX=a
4604 LD="/home/riscos/env/ro-ar cr"
4607 *-*-sco*)
4608 cat >> confdefs.h <<\EOF
4609 #define XP_UNIX 1
4612 cat >> confdefs.h <<\EOF
4613 #define SCO 1
4616 cat >> confdefs.h <<\EOF
4617 #define sco 1
4620 cat >> confdefs.h <<\EOF
4621 #define SYSV 1
4624 cat >> confdefs.h <<\EOF
4625 #define _SVID3 1
4628 cat >> confdefs.h <<\EOF
4629 #define _PR_NEED_H_ERRNO 1
4632 CC='cc -b elf -KPIC'
4633 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4634 USE_NSPR_THREADS=1
4635 CPU_ARCH=x86
4636 DSO_LDOPTS='-b elf -G'
4637 MDCPUCFG_H=_scoos.cfg
4638 PR_MD_SRCS=scoos.c
4641 *-sinix*)
4642 cat >> confdefs.h <<\EOF
4643 #define XP_UNIX 1
4646 cat >> confdefs.h <<\EOF
4647 #define SVR4 1
4650 cat >> confdefs.h <<\EOF
4651 #define SNI 1
4654 cat >> confdefs.h <<\EOF
4655 #define RELIANTUNIX 1
4658 cat >> confdefs.h <<\EOF
4659 #define sinix 1
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_SVID_GETTOD 1
4666 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4667 cat >> confdefs.h <<\EOF
4668 #define i386 1
4671 CPU_ARCH=x86
4672 else
4673 CPU_ARCH=mips
4676 if test "$GNU_CC"; then
4677 AS='$(CC) -x assembler-with-cpp'
4678 if test "$CPU_ARCH" = "mips"; then
4679 LD=gld
4681 CFLAGS="$CFLAGS -Wall -Wno-format"
4682 else
4683 AS='/usr/bin/cc'
4684 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4687 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4689 if test "$OS_RELEASE" = "5.43"; then
4690 cat >> confdefs.h <<\EOF
4691 #define IP_MULTICAST 1
4696 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4697 USE_NSPR_THREADS=1
4698 MDCPUCFG_H=_reliantunix.cfg
4699 PR_MD_CSRCS=reliantunix.c
4700 if test "${OS_ARCH}" = "mips"; then
4701 PR_MD_ASFILES=os_ReliantUNIX.s
4705 *-sunos*)
4706 cat >> confdefs.h <<\EOF
4707 #define XP_UNIX 1
4710 cat >> confdefs.h <<\EOF
4711 #define SUNOS4 1
4714 CFLAGS="$CFLAGS -Wall -Wno-format"
4715 if test "$USE_MDUPDATE"; then
4716 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4718 CPU_ARCH=sparc
4719 DLL_SUFFIX=so.1.0
4720 DSO_LDOPTS=
4721 DSO_CFLAGS=-fPIC
4722 USE_NSPR_THREADS=1
4723 if test "$OS_RELEASE" = "4.1.3_U1"; then
4724 _OPTIMIZE_FLAGS=
4725 OS_LIBS="$OS_LIBS -lm"
4727 MDCPUCFG_H=_sunos4.cfg
4728 PR_MD_CSRCS=sunos4.c
4731 *-solaris*)
4732 if test -z "$USE_NSPR_THREADS"; then
4733 USE_PTHREADS=1
4735 cat >> confdefs.h <<\EOF
4736 #define XP_UNIX 1
4739 cat >> confdefs.h <<\EOF
4740 #define SVR4 1
4743 cat >> confdefs.h <<\EOF
4744 #define SYSV 1
4747 cat >> confdefs.h <<\EOF
4748 #define __svr4 1
4751 cat >> confdefs.h <<\EOF
4752 #define __svr4__ 1
4755 cat >> confdefs.h <<\EOF
4756 #define SOLARIS 1
4759 cat >> confdefs.h <<\EOF
4760 #define HAVE_FCNTL_FILE_LOCKING 1
4763 CPU_ARCH=`uname -p`
4764 MDCPUCFG_H=_solaris.cfg
4765 PR_MD_CSRCS=solaris.c
4766 LD=/usr/ccs/bin/ld
4767 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4768 RESOLVE_LINK_SYMBOLS=1
4769 if test -n "$GNU_CC"; then
4770 DSO_CFLAGS=-fPIC
4771 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
4772 GCC_USE_GNU_LD=1
4774 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore,-Bdirect'
4775 else
4776 DSO_CFLAGS=-KPIC
4777 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore -Bdirect'
4779 if test -n "$GNU_CC"; then
4780 CFLAGS="$CFLAGS -Wall"
4781 CXXFLAGS="$CXXFLAGS -Wall"
4782 if test -n "$USE_MDUPDATE"; then
4783 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4784 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
4786 GCC_AS=`$CC -print-prog-name=as`
4787 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
4788 GNU_AS=1
4790 else
4791 CFLAGS="$CFLAGS -xstrconst"
4792 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
4793 if test -z "$MOZ_OPTIMIZE"; then
4794 CFLAGS="$CFLAGS -xs"
4795 CXXFLAGS="$CXXFLAGS -xs"
4797 _OPTIMIZE_FLAGS=-xO4
4799 if test -z "$GNU_AS"; then
4800 ASFLAGS="$ASFLAGS -Wa,-P"
4802 if test -n "$USE_64"; then
4803 if test -n "$GNU_CC"; then
4804 CC="$CC -m64"
4805 CXX="$CXX -m64"
4806 else
4807 if test "$OS_TEST" = "i86pc"; then
4808 CC="$CC -xarch=amd64"
4809 CXX="$CXX -xarch=amd64"
4810 else
4811 CC="$CC -xarch=v9"
4812 CXX="$CXX -xarch=v9"
4816 if test "$OS_TEST" = "i86pc"; then
4817 if test -z "$USE_64"; then
4818 cat >> confdefs.h <<\EOF
4819 #define i386 1
4823 CPU_ARCH_TAG=_$OS_TEST
4824 # The default debug format, DWARF (-g), is not supported by gcc
4825 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
4826 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
4827 # If your gcc uses GNU as, you do not need the -Wa,-s option.
4828 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
4829 _DEBUG_FLAGS=-gstabs
4830 if test -z "$GNU_AS"; then
4831 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
4835 case "${target_os}" in
4836 solaris2.3*)
4837 cat >> confdefs.h <<\EOF
4838 #define _PR_NO_LARGE_FILES 1
4842 solaris2.4*)
4843 cat >> confdefs.h <<\EOF
4844 #define _PR_NO_LARGE_FILES 1
4848 solaris2.5*)
4849 cat >> confdefs.h <<\EOF
4850 #define SOLARIS2_5 1
4855 cat >> confdefs.h <<\EOF
4856 #define _PR_HAVE_OFF64_T 1
4859 # The lfcompile64(5) man page on Solaris 2.6 says:
4860 # For applications that do not wish to conform to the POSIX or
4861 # X/Open specifications, the 64-bit transitional interfaces
4862 # are available by default. No compile-time flags need to be
4863 # set.
4864 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
4865 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
4866 if test -n "$GNU_CC"; then
4867 cat >> confdefs.h <<\EOF
4868 #define _LARGEFILE64_SOURCE 1
4873 esac
4874 case "${target_os}" in
4875 solaris2.3*)
4877 solaris2.4*)
4879 solaris2.5*)
4881 solaris2.6*)
4883 solaris2.7*)
4886 # Solaris 8 or higher has IPv6.
4887 cat >> confdefs.h <<\EOF
4888 #define _PR_INET6 1
4892 esac
4893 if test "$CPU_ARCH" = "sparc"; then
4894 # 64-bit Solaris SPARC requires V9 architecture, so the following
4895 # is not needed.
4896 if test -z "$USE_64"; then
4897 ULTRASPARC_LIBRARY=nspr_flt
4900 # Purify requires that binaries linked against nspr also
4901 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
4902 _rev=`uname -r`
4903 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
4904 OS_LIBS="$OS_LIBS $_librt"
4907 *-sco-sysv5*)
4908 cat >> confdefs.h <<\EOF
4909 #define XP_UNIX 1
4912 cat >> confdefs.h <<\EOF
4913 #define UNIXWARE 1
4916 cat >> confdefs.h <<\EOF
4917 #define SVR4 1
4920 cat >> confdefs.h <<\EOF
4921 #define SYSV 1
4924 USE_NSPR_THREADS=1
4925 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
4926 cat >> confdefs.h <<\EOF
4927 #define _PR_NO_LARGE_FILES 1
4930 CC='$(NSDEPTH)/build/hcc cc'
4931 CXX='$(NSDEPTH)/build/hcpp CC'
4932 MDCPUCFG_H=_unixware.cfg
4933 else
4934 cat >> confdefs.h <<\EOF
4935 #define _LARGEFILE64_SOURCE 1
4938 cat >> confdefs.h <<\EOF
4939 #define _PR_HAVE_OFF64_T 1
4942 cat >> confdefs.h <<\EOF
4943 #define _PR_HAVE_SOCKADDR_LEN 1
4946 MDCPUCFG_H=_unixware7.cfg
4948 PR_MD_CSRCS=unixware.c
4949 DSO_LDOPTS=-G
4950 CPU_ARCH=x86
4953 *-os2*)
4954 cat >> confdefs.h <<\EOF
4955 #define XP_OS2 1
4958 cat >> confdefs.h <<\EOF
4959 #define XP_PC 1
4962 cat >> confdefs.h <<\EOF
4963 #define BSD_SELECT 1
4966 cat >> confdefs.h <<\EOF
4967 #define TCPV40HDRS 1
4970 LIB_SUFFIX=lib
4971 DLL_SUFFIX=dll
4972 RC=rc.exe
4973 PR_MD_ARCH_DIR=os2
4974 PROG_SUFFIX=.exe
4975 NSINSTALL=nsinstall
4976 MDCPUCFG_H=_os2.cfg
4977 RESOLVE_LINK_SYMBOLS=1
4979 cat >> confdefs.h <<\EOF
4980 #define OS2 1
4983 AR=emxomfar
4984 AR_FLAGS='r $@'
4985 CFLAGS="$CFLAGS -Wall -Zomf"
4986 CXXFLAGS="$CFLAGS -Wall -Zomf"
4987 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4988 DSO_CFLAGS=
4989 DSO_LDOPTS='-Zomf -Zdll -Zmap'
4990 LDFLAGS='-Zmap'
4991 _OPTIMIZE_FLAGS="-O2 -s"
4992 _DEBUG_FLAGS="-g -fno-inline"
4993 if test -n "$MOZ_OPTIMIZE"; then
4994 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
4996 OS_LIBS="-lsocket"
4997 IMPLIB='emximp -o'
4998 FILTER='emxexp -o'
4999 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5000 DSO_LDOPTS="$DSO_LDOPTS -Zhigh-mem"
5001 LDFLAGS="$LDFLAGS -Zhigh-mem"
5002 cat >> confdefs.h <<\EOF
5003 #define MOZ_OS2_HIGH_MEMORY 1
5008 # GCC for OS/2 currently predefines these, but we don't want them
5009 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5013 cat >> confdefs.h <<\EOF
5014 #define XP_UNIX 1
5019 esac
5021 if test -z "$SKIP_LIBRARY_CHECKS"; then
5025 case $target in
5026 *-darwin*|*-beos*)
5029 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5030 echo "configure:5031: checking for dlopen in -ldl" >&5
5031 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5032 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5033 echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5035 ac_save_LIBS="$LIBS"
5036 LIBS="-ldl $LIBS"
5037 cat > conftest.$ac_ext <<EOF
5038 #line 5039 "configure"
5039 #include "confdefs.h"
5040 /* Override any gcc2 internal prototype to avoid an error. */
5041 /* We use char because int might match the return type of a gcc2
5042 builtin and then its argument prototype would still apply. */
5043 char dlopen();
5045 int main() {
5046 dlopen()
5047 ; return 0; }
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050 rm -rf conftest*
5051 eval "ac_cv_lib_$ac_lib_var=yes"
5052 else
5053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
5055 rm -rf conftest*
5056 eval "ac_cv_lib_$ac_lib_var=no"
5058 rm -f conftest*
5059 LIBS="$ac_save_LIBS"
5062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5063 echo "$ac_t""yes" 1>&6
5064 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5065 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5066 echo "configure:5067: checking for dlfcn.h" >&5
5067 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5068 echo $ac_n "(cached) $ac_c" 1>&6
5069 else
5070 cat > conftest.$ac_ext <<EOF
5071 #line 5072 "configure"
5072 #include "confdefs.h"
5073 #include <dlfcn.h>
5075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5076 { (eval echo configure:5077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5078 if test -z "$ac_err"; then
5079 rm -rf conftest*
5080 eval "ac_cv_header_$ac_safe=yes"
5081 else
5082 echo "$ac_err" >&5
5083 echo "configure: failed program was:" >&5
5084 cat conftest.$ac_ext >&5
5085 rm -rf conftest*
5086 eval "ac_cv_header_$ac_safe=no"
5088 rm -f conftest*
5090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5091 echo "$ac_t""yes" 1>&6
5092 OS_LIBS="-ldl $OS_LIBS"
5093 else
5094 echo "$ac_t""no" 1>&6
5097 else
5098 echo "$ac_t""no" 1>&6
5102 esac
5107 if test $ac_cv_prog_gcc = yes; then
5108 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5109 echo "configure:5110: checking whether ${CC-cc} needs -traditional" >&5
5110 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5111 echo $ac_n "(cached) $ac_c" 1>&6
5112 else
5113 ac_pattern="Autoconf.*'x'"
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 #include <sgtty.h>
5118 Autoconf TIOCGETP
5120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5121 egrep "$ac_pattern" >/dev/null 2>&1; then
5122 rm -rf conftest*
5123 ac_cv_prog_gcc_traditional=yes
5124 else
5125 rm -rf conftest*
5126 ac_cv_prog_gcc_traditional=no
5128 rm -f conftest*
5131 if test $ac_cv_prog_gcc_traditional = no; then
5132 cat > conftest.$ac_ext <<EOF
5133 #line 5134 "configure"
5134 #include "confdefs.h"
5135 #include <termio.h>
5136 Autoconf TCGETA
5138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5139 egrep "$ac_pattern" >/dev/null 2>&1; then
5140 rm -rf conftest*
5141 ac_cv_prog_gcc_traditional=yes
5143 rm -f conftest*
5148 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5149 if test $ac_cv_prog_gcc_traditional = yes; then
5150 CC="$CC -traditional"
5154 for ac_func in lchown strerror
5156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5157 echo "configure:5158: checking for $ac_func" >&5
5158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5159 echo $ac_n "(cached) $ac_c" 1>&6
5160 else
5161 cat > conftest.$ac_ext <<EOF
5162 #line 5163 "configure"
5163 #include "confdefs.h"
5164 /* System header to define __stub macros and hopefully few prototypes,
5165 which can conflict with char $ac_func(); below. */
5166 #include <assert.h>
5167 /* Override any gcc2 internal prototype to avoid an error. */
5168 /* We use char because int might match the return type of a gcc2
5169 builtin and then its argument prototype would still apply. */
5170 char $ac_func();
5172 int main() {
5174 /* The GNU C library defines this for functions which it implements
5175 to always fail with ENOSYS. Some functions are actually named
5176 something starting with __ and the normal name is an alias. */
5177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5178 choke me
5179 #else
5180 $ac_func();
5181 #endif
5183 ; return 0; }
5185 if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5186 rm -rf conftest*
5187 eval "ac_cv_func_$ac_func=yes"
5188 else
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 rm -rf conftest*
5192 eval "ac_cv_func_$ac_func=no"
5194 rm -f conftest*
5197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5198 echo "$ac_t""yes" 1>&6
5199 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5200 cat >> confdefs.h <<EOF
5201 #define $ac_tr_func 1
5204 else
5205 echo "$ac_t""no" 1>&6
5207 done
5212 # Check whether --enable-strip or --disable-strip was given.
5213 if test "${enable_strip+set}" = set; then
5214 enableval="$enable_strip"
5215 if test "$enableval" = "yes"; then
5216 ENABLE_STRIP=1
5221 case "${target_os}" in
5222 hpux*)
5223 if test -z "$GNU_CC"; then
5225 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5226 echo "configure:5227: checking for +Olit support" >&5
5227 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5228 echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230 ac_cv_hpux_usable_olit_option=no
5231 rm -f conftest*
5232 echo 'int main() { return 0; }' | cat > conftest.c
5233 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5234 if test $? -eq 0; then
5235 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5236 ac_cv_hpux_usable_olit_option=yes
5239 rm -f conftest*
5243 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5245 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5246 CFLAGS="$CFLAGS +Olit=all"
5247 CXXFLAGS="$CXXFLAGS +Olit=all"
5248 else
5249 CFLAGS="$CFLAGS +ESlit"
5250 CXXFLAGS="$CXXFLAGS +ESlit"
5254 esac
5258 case "$target_os" in
5259 darwin*)
5260 _HAVE_PTHREADS=1
5264 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5265 echo "configure:5266: checking for pthread_create in -lpthreads" >&5
5266 echo "
5267 #include <pthread.h>
5268 void *foo(void *v) { return v; }
5269 int main() {
5270 pthread_t t;
5271 if (!pthread_create(&t, 0, &foo, 0)) {
5272 pthread_join(t, 0);
5274 return 0;
5275 }" > dummy.c ;
5276 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5277 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5278 _res=$? ;
5279 rm -f dummy.c dummy${ac_exeext} ;
5280 if test "$_res" = "0"; then
5281 echo "$ac_t""yes" 1>&6
5282 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5283 else
5284 echo "$ac_t""no" 1>&6
5286 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5287 echo "configure:5288: checking for pthread_create in -lpthread" >&5
5288 echo "
5289 #include <pthread.h>
5290 void *foo(void *v) { return v; }
5291 int main() {
5292 pthread_t t;
5293 if (!pthread_create(&t, 0, &foo, 0)) {
5294 pthread_join(t, 0);
5296 return 0;
5297 }" > dummy.c ;
5298 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5299 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5300 _res=$? ;
5301 rm -f dummy.c dummy${ac_exeext} ;
5302 if test "$_res" = "0"; then
5303 echo "$ac_t""yes" 1>&6
5304 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5305 else
5306 echo "$ac_t""no" 1>&6
5308 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5309 echo "configure:5310: checking for pthread_create in -lc_r" >&5
5310 echo "
5311 #include <pthread.h>
5312 void *foo(void *v) { return v; }
5313 int main() {
5314 pthread_t t;
5315 if (!pthread_create(&t, 0, &foo, 0)) {
5316 pthread_join(t, 0);
5318 return 0;
5319 }" > dummy.c ;
5320 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5321 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5322 _res=$? ;
5323 rm -f dummy.c dummy${ac_exeext} ;
5324 if test "$_res" = "0"; then
5325 echo "$ac_t""yes" 1>&6
5326 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5327 else
5328 echo "$ac_t""no" 1>&6
5330 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5331 echo "configure:5332: checking for pthread_create in -lc" >&5
5332 echo "
5333 #include <pthread.h>
5334 void *foo(void *v) { return v; }
5335 int main() {
5336 pthread_t t;
5337 if (!pthread_create(&t, 0, &foo, 0)) {
5338 pthread_join(t, 0);
5340 return 0;
5341 }" > dummy.c ;
5342 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5343 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5344 _res=$? ;
5345 rm -f dummy.c dummy${ac_exeext} ;
5346 if test "$_res" = "0"; then
5347 echo "$ac_t""yes" 1>&6
5348 _HAVE_PTHREADS=1
5350 else
5351 echo "$ac_t""no" 1>&6
5365 esac
5367 # Check whether --with-pthreads or --without-pthreads was given.
5368 if test "${with_pthreads+set}" = set; then
5369 withval="$with_pthreads"
5370 if test "$withval" = "yes"; then
5371 if test -n "$_HAVE_PTHREADS"; then
5372 USE_PTHREADS=1
5373 USE_USER_PTHREADS=
5374 USE_NSPR_THREADS=
5375 else
5376 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5378 else
5379 USE_PTHREADS=
5380 _PTHREAD_LDFLAGS=
5382 else
5383 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5384 USE_PTHREADS=1
5385 USE_USER_PTHREADS=
5386 USE_NSPR_THREADS=
5391 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5392 if test "${enable_user_pthreads+set}" = set; then
5393 enableval="$enable_user_pthreads"
5394 if test "$enableval" = "yes"; then
5395 if test -n "$_HAVE_PTHREADS"; then
5396 USE_PTHREADS=
5397 USE_USER_PTHREADS=1
5398 USE_NSPR_THREADS=
5399 else
5400 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5406 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5407 if test "${enable_nspr_threads+set}" = set; then
5408 enableval="$enable_nspr_threads"
5409 if test "$enableval" = "yes"; then
5410 USE_PTHREADS=
5411 USE_USER_PTHREADS=
5412 USE_NSPR_THREADS=1
5417 case "$target" in
5418 *-beos*)
5419 # Check whether --with-bthreads or --without-bthreads was given.
5420 if test "${with_bthreads+set}" = set; then
5421 withval="$with_bthreads"
5422 if test "$withval" = "yes"; then
5423 USE_BTHREADS=1
5424 USE_USER_PTHREADS=
5425 USE_PTHREADS=
5430 esac
5432 fi # SKIP_LIBRARY_CHECKS
5434 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5435 if test "${enable_ipv6+set}" = set; then
5436 enableval="$enable_ipv6"
5437 if test "$enableval" = "yes"; then
5438 USE_IPV6=1
5439 else
5440 USE_IPV6=
5446 # Check whether --enable-boehm or --disable-boehm was given.
5447 if test "${enable_boehm+set}" = set; then
5448 enableval="$enable_boehm"
5449 if test "$enableval" = "yes"; then
5450 cat >> confdefs.h <<\EOF
5451 #define GC_LEAK_DETECTOR 1
5454 GC_LEAK_DETECTOR=1
5459 if test -n "$USE_PTHREADS"; then
5460 rm -f conftest*
5461 ac_cv_have_dash_pthread=no
5462 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5463 echo "configure:5464: checking whether ${CC-cc} accepts -pthread" >&5
5464 echo 'int main() { return 0; }' | cat > conftest.c
5465 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5466 if test $? -eq 0; then
5467 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5468 ac_cv_have_dash_pthread=yes
5469 case "$target_os" in
5470 freebsd*)
5471 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5474 CFLAGS="$CFLAGS -pthread"
5475 CXXFLAGS="$CXXFLAGS -pthread"
5477 esac
5480 rm -f conftest*
5481 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5483 ac_cv_have_dash_pthreads=no
5484 if test "$ac_cv_have_dash_pthread" = "no"; then
5485 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5486 echo "configure:5487: checking whether ${CC-cc} accepts -pthreads" >&5
5487 echo 'int main() { return 0; }' | cat > conftest.c
5488 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5489 if test $? -eq 0; then
5490 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5491 ac_cv_have_dash_pthreads=yes
5492 CFLAGS="$CFLAGS -pthreads"
5493 CXXFLAGS="$CXXFLAGS -pthreads"
5496 rm -f conftest*
5497 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5500 case "$target" in
5501 *-solaris*)
5502 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5503 _PTHREAD_LDFLAGS=
5506 *-freebsd*)
5507 cat >> confdefs.h <<\EOF
5508 #define _REENTRANT 1
5511 cat >> confdefs.h <<\EOF
5512 #define _THREAD_SAFE 1
5515 if test "$ac_cv_have_dash_pthread" = "yes"; then
5516 _PTHREAD_LDFLAGS="-pthread"
5517 else
5518 _PTHREAD_LDFLAGS="-lc_r"
5521 *-netbsd*)
5522 if test "$ac_cv_have_dash_pthread" = "yes"; then
5523 _PTHREAD_LDFLAGS="-pthread"
5526 *-bsdi*)
5527 cat >> confdefs.h <<\EOF
5528 #define _THREAD_SAFE 1
5531 if test "$ac_cv_have_dash_pthread" = "yes"; then
5532 _PTHREAD_LDFLAGS=
5535 *-openbsd*)
5536 if test "$ac_cv_have_dash_pthread" = "yes"; then
5537 _PTHREAD_LDFLAGS=-pthread
5540 *-linux*|*-gnu*|*-k*bsd*-gnu)
5541 cat >> confdefs.h <<\EOF
5542 #define _REENTRANT 1
5546 esac
5548 else
5549 if test -n "$USE_USER_PTHREADS"; then
5550 USE_PTHREADS=
5551 USE_NSPR_THREADS=
5552 else
5553 _PTHREAD_LDFLAGS=
5557 case "$target" in
5558 *-aix*)
5559 if test -n "$USE_NSPR_THREADS"; then
5560 cat >> confdefs.h <<\EOF
5561 #define _PR_LOCAL_THREADS_ONLY 1
5565 case "$target_os" in
5566 aix4.1*)
5567 if test -z "$USE_PTHREADS"; then
5568 cat >> confdefs.h <<\EOF
5569 #define AIX_RENAME_SELECT 1
5574 aix4.2*)
5575 if test -z "$USE_NSPR_THREADS"; then
5576 cat >> confdefs.h <<\EOF
5577 #define HAVE_POINTER_LOCALTIME_R 1
5582 aix4.3*)
5583 if test -z "$USE_NSPR_THREADS"; then
5584 cat >> confdefs.h <<\EOF
5585 #define HAVE_POINTER_LOCALTIME_R 1
5589 if test -n "$USE_PTHREADS"; then
5590 cat >> confdefs.h <<\EOF
5591 #define _PR_HAVE_THREADSAFE_GETHOST 1
5597 if test -z "$USE_NSPR_THREADS"; then
5598 cat >> confdefs.h <<\EOF
5599 #define HAVE_POINTER_LOCALTIME_R 1
5603 if test -n "$USE_PTHREADS"; then
5604 cat >> confdefs.h <<\EOF
5605 #define _PR_HAVE_THREADSAFE_GETHOST 1
5610 esac
5612 *-bsdi*)
5613 if test -n "$USE_PTHREADS"; then
5614 cat >> confdefs.h <<\EOF
5615 #define _PR_NEED_PTHREAD_INIT 1
5620 *-freebsd*)
5621 if test -n "$USE_NSPR_THREADS"; then
5622 cat >> confdefs.h <<\EOF
5623 #define _PR_LOCAL_THREADS_ONLY 1
5628 *-hpux*)
5629 if test -n "$USE_NSPR_THREADS"; then
5630 cat >> confdefs.h <<\EOF
5631 #define _PR_LOCAL_THREADS_ONLY 1
5635 if test "$USE_PTHREADS"; then
5636 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
5637 cat >> confdefs.h <<\EOF
5638 #define _REENTRANT 1
5641 cat >> confdefs.h <<\EOF
5642 #define _PR_DCETHREADS 1
5645 else
5646 cat >> confdefs.h <<EOF
5647 #define _POSIX_C_SOURCE 199506L
5650 cat >> confdefs.h <<\EOF
5651 #define _PR_HAVE_THREADSAFE_GETHOST 1
5656 if test "$USE_USER_PTHREADS"; then
5657 cat >> confdefs.h <<EOF
5658 #define _POSIX_C_SOURCE 199506L
5663 *-irix*)
5664 if test "${target_os}" = "irix6.5"; then
5665 if test -n "$USE_PTHREADS"; then
5666 cat >> confdefs.h <<\EOF
5667 #define _PR_HAVE_GETHOST_R 1
5670 cat >> confdefs.h <<\EOF
5671 #define _PR_HAVE_GETHOST_R_POINTER 1
5677 *-linux*|*-gnu*|*-k*bsd*-gnu)
5678 if test -n "$USE_NSPR_THREADS"; then
5679 cat >> confdefs.h <<\EOF
5680 #define _PR_LOCAL_THREADS_ONLY 1
5685 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-os2*|*-beos*)
5686 USE_PTHREADS=
5687 _PTHREAD_LDFLAGS=
5688 USE_USER_PTHREADS=
5690 *-netbsd*|*-openbsd*)
5691 if test -n "$USE_NSPR_THREADS"; then
5692 cat >> confdefs.h <<\EOF
5693 #define _PR_LOCAL_THREADS_ONLY 1
5698 *-osf*)
5699 if test -n "$USE_NSPR_THREADS"; then
5700 cat >> confdefs.h <<\EOF
5701 #define _PR_LOCAL_THREADS_ONLY 1
5705 if test -n "$USE_PTHREADS"; then
5706 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
5708 else
5709 cat >> confdefs.h <<\EOF
5710 #define _PR_HAVE_THREADSAFE_GETHOST 1
5716 *-solaris*)
5717 if test -n "$USE_NSPR_THREADS"; then
5718 cat >> confdefs.h <<\EOF
5719 #define _PR_LOCAL_THREADS_ONLY 1
5723 if test -n "$USE_PTHREADS"; then
5724 cat >> confdefs.h <<\EOF
5725 #define _REENTRANT 1
5728 cat >> confdefs.h <<\EOF
5729 #define HAVE_POINTER_LOCALTIME_R 1
5732 if test "$OS_TEST" = "i86pc"; then
5733 if test -n "$USE_64"; then
5734 PR_MD_ASFILES=os_SunOS_x86_64.s
5735 else
5736 PR_MD_ASFILES=os_SunOS_x86.s
5738 else
5739 if test -n "$USE_64"; then
5740 PR_MD_ASFILES=os_SunOS_sparcv9.s
5745 *-nto*)
5746 if test -n "$USE_PTHREADS"; then
5747 cat >> confdefs.h <<\EOF
5748 #define _PR_HAVE_GETHOST_R 1
5751 cat >> confdefs.h <<\EOF
5752 #define _PR_HAVE_GETHOST_R_POINTER 1
5757 esac
5759 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
5761 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
5762 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
5765 if test -n "$_SAVE_DEBUG_FLAGS"; then
5766 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
5769 if test -n "$MOZ_OPTIMIZE"; then
5770 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
5771 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
5774 if test -n "$MOZ_DEBUG"; then
5775 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
5776 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
5779 if test -n "$MOZ_OPTIMIZE"; then
5780 OBJDIR_TAG=_OPT
5781 else
5782 OBJDIR_TAG=_DBG
5785 if test -n "$USE_64"; then
5786 COMPILER_TAG=_64
5789 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
5791 case "$target_os" in
5792 cygwin*|msvc*|mks*)
5793 CC="\$(CYGWIN_WRAPPER) $CC"
5794 CXX="\$(CYGWIN_WRAPPER) $CXX"
5795 RC="\$(CYGWIN_WRAPPER) $RC"
5797 esac
5895 MAKEFILES="
5896 Makefile
5897 config/Makefile
5898 config/autoconf.mk
5899 config/nsprincl.mk
5900 config/nsprincl.sh
5901 config/nspr-config
5902 lib/Makefile
5903 lib/ds/Makefile
5904 lib/libc/Makefile
5905 lib/libc/include/Makefile
5906 lib/libc/src/Makefile
5907 lib/tests/Makefile
5908 pkg/Makefile
5909 pkg/linux/Makefile
5910 pkg/solaris/Makefile
5911 pkg/solaris/SUNWpr/Makefile
5912 pkg/solaris/SUNWprd/Makefile
5913 pr/Makefile
5914 pr/include/Makefile
5915 pr/include/md/Makefile
5916 pr/include/obsolete/Makefile
5917 pr/include/private/Makefile
5918 pr/src/Makefile
5919 pr/src/io/Makefile
5920 pr/src/linking/Makefile
5921 pr/src/malloc/Makefile
5922 pr/src/md/Makefile
5923 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
5924 pr/src/memory/Makefile
5925 pr/src/misc/Makefile
5926 pr/src/threads/Makefile
5927 pr/tests/Makefile
5928 pr/tests/dll/Makefile
5932 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
5933 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
5934 elif test -n "$USE_PTHREADS"; then
5935 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
5936 elif test -n "$USE_BTHREADS"; then
5937 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
5940 if test -n "$USE_CPLUS"; then
5941 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
5944 echo $MAKEFILES > unallmakefiles
5946 trap '' 1 2 15
5947 cat > confcache <<\EOF
5948 # This file is a shell script that caches the results of configure
5949 # tests run on this system so they can be shared between configure
5950 # scripts and configure runs. It is not useful on other systems.
5951 # If it contains results you don't want to keep, you may remove or edit it.
5953 # By default, configure uses ./config.cache as the cache file,
5954 # creating it if it does not exist already. You can give configure
5955 # the --cache-file=FILE option to use a different cache file; that is
5956 # what configure does when it calls configure scripts in
5957 # subdirectories, so they share the cache.
5958 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5959 # config.status only pays attention to the cache file if you give it the
5960 # --recheck option to rerun configure.
5963 # The following way of writing the cache mishandles newlines in values,
5964 # but we know of no workaround that is simple, portable, and efficient.
5965 # So, don't put newlines in cache variables' values.
5966 # Ultrix sh set writes to stderr and can't be redirected directly,
5967 # and sets the high bit in the cache file unless we assign to the vars.
5968 (set) 2>&1 |
5969 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5970 *ac_space=\ *)
5971 # `set' does not quote correctly, so add quotes (double-quote substitution
5972 # turns \\\\ into \\, and sed turns \\ into \).
5973 sed -n \
5974 -e "s/'/'\\\\''/g" \
5975 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5978 # `set' quotes correctly as required by POSIX, so do not add quotes.
5979 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5981 esac >> confcache
5982 if cmp -s $cache_file confcache; then
5984 else
5985 if test -w $cache_file; then
5986 echo "updating cache $cache_file"
5987 cat confcache > $cache_file
5988 else
5989 echo "not updating unwritable cache $cache_file"
5992 rm -f confcache
5994 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5996 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5997 # Let make expand exec_prefix.
5998 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6000 # Any assignment to VPATH causes Sun make to only execute
6001 # the first set of double-colon rules, so remove it if not needed.
6002 # If there is a colon in the path, we need to keep it.
6003 if test "x$srcdir" = x.; then
6004 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6007 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6009 # Transform confdefs.h into DEFS.
6010 # Protect against shell expansion while executing Makefile rules.
6011 # Protect against Makefile macro expansion.
6012 cat > conftest.defs <<\EOF
6013 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6014 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6015 s%\[%\\&%g
6016 s%\]%\\&%g
6017 s%\$%$$%g
6019 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '`
6020 rm -f conftest.defs
6023 # Without the "./", some shells look in PATH for config.status.
6024 : ${CONFIG_STATUS=./config.status}
6026 echo creating $CONFIG_STATUS
6027 rm -f $CONFIG_STATUS
6028 cat > $CONFIG_STATUS <<EOF
6029 #! /bin/sh
6030 # Generated automatically by configure.
6031 # Run this file to recreate the current configuration.
6032 # This directory was configured as follows,
6033 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6035 # $0 $ac_configure_args
6037 # Compiler output produced by configure, useful for debugging
6038 # configure, is in ./config.log if it exists.
6040 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6041 for ac_option
6043 case "\$ac_option" in
6044 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6045 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6046 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6047 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6048 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6049 exit 0 ;;
6050 -help | --help | --hel | --he | --h)
6051 echo "\$ac_cs_usage"; exit 0 ;;
6052 *) echo "\$ac_cs_usage"; exit 1 ;;
6053 esac
6054 done
6056 ac_given_srcdir=$srcdir
6058 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6060 cat >> $CONFIG_STATUS <<EOF
6062 # Protect against being on the right side of a sed subst in config.status.
6063 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6064 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6065 $ac_vpsub
6066 $extrasub
6067 s%@SHELL@%$SHELL%g
6068 s%@CFLAGS@%$CFLAGS%g
6069 s%@CPPFLAGS@%$CPPFLAGS%g
6070 s%@CXXFLAGS@%$CXXFLAGS%g
6071 s%@FFLAGS@%$FFLAGS%g
6072 s%@DEFS@%$DEFS%g
6073 s%@LDFLAGS@%$LDFLAGS%g
6074 s%@LIBS@%$LIBS%g
6075 s%@exec_prefix@%$exec_prefix%g
6076 s%@prefix@%$prefix%g
6077 s%@program_transform_name@%$program_transform_name%g
6078 s%@bindir@%$bindir%g
6079 s%@sbindir@%$sbindir%g
6080 s%@libexecdir@%$libexecdir%g
6081 s%@datadir@%$datadir%g
6082 s%@sysconfdir@%$sysconfdir%g
6083 s%@sharedstatedir@%$sharedstatedir%g
6084 s%@localstatedir@%$localstatedir%g
6085 s%@libdir@%$libdir%g
6086 s%@includedir@%$includedir%g
6087 s%@oldincludedir@%$oldincludedir%g
6088 s%@infodir@%$infodir%g
6089 s%@mandir@%$mandir%g
6090 s%@host@%$host%g
6091 s%@host_alias@%$host_alias%g
6092 s%@host_cpu@%$host_cpu%g
6093 s%@host_vendor@%$host_vendor%g
6094 s%@host_os@%$host_os%g
6095 s%@target@%$target%g
6096 s%@target_alias@%$target_alias%g
6097 s%@target_cpu@%$target_cpu%g
6098 s%@target_vendor@%$target_vendor%g
6099 s%@target_os@%$target_os%g
6100 s%@build@%$build%g
6101 s%@build_alias@%$build_alias%g
6102 s%@build_cpu@%$build_cpu%g
6103 s%@build_vendor@%$build_vendor%g
6104 s%@build_os@%$build_os%g
6105 s%@CC@%$CC%g
6106 s%@dist_prefix@%$dist_prefix%g
6107 s%@dist_bindir@%$dist_bindir%g
6108 s%@dist_includedir@%$dist_includedir%g
6109 s%@dist_libdir@%$dist_libdir%g
6110 s%@WHOAMI@%$WHOAMI%g
6111 s%@HOST_CC@%$HOST_CC%g
6112 s%@CXX@%$CXX%g
6113 s%@RANLIB@%$RANLIB%g
6114 s%@AR@%$AR%g
6115 s%@AS@%$AS%g
6116 s%@LD@%$LD%g
6117 s%@STRIP@%$STRIP%g
6118 s%@WINDRES@%$WINDRES%g
6119 s%@CPP@%$CPP%g
6120 s%@PERL@%$PERL%g
6121 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6122 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6123 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6124 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6125 s%@GNU_CC@%$GNU_CC%g
6126 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6127 s%@MSC_VER@%$MSC_VER%g
6128 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6129 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6130 s%@USE_CPLUS@%$USE_CPLUS%g
6131 s%@USE_IPV6@%$USE_IPV6%g
6132 s%@USE_N32@%$USE_N32%g
6133 s%@USE_64@%$USE_64%g
6134 s%@OBJECT_MODE@%$OBJECT_MODE%g
6135 s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
6136 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6137 s%@USE_PTHREADS@%$USE_PTHREADS%g
6138 s%@USE_BTHREADS@%$USE_BTHREADS%g
6139 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6140 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6141 s%@LIBNSPR@%$LIBNSPR%g
6142 s%@LIBPLC@%$LIBPLC%g
6143 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6144 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6145 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6146 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6147 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6148 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6149 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6150 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6151 s%@CPU_ARCH@%$CPU_ARCH%g
6152 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6153 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6154 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6155 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6156 s%@MKSHLIB@%$MKSHLIB%g
6157 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6158 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6159 s%@OS_TARGET@%$OS_TARGET%g
6160 s%@OS_ARCH@%$OS_ARCH%g
6161 s%@OS_RELEASE@%$OS_RELEASE%g
6162 s%@OS_TEST@%$OS_TEST%g
6163 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6164 s%@DEFINES@%$DEFINES%g
6165 s%@AR_FLAGS@%$AR_FLAGS%g
6166 s%@ASFLAGS@%$ASFLAGS%g
6167 s%@FILTER@%$FILTER%g
6168 s%@IMPLIB@%$IMPLIB%g
6169 s%@OS_LIBS@%$OS_LIBS%g
6170 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6171 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6172 s%@NOSUCHFILE@%$NOSUCHFILE%g
6173 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6174 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6175 s%@OBJDIR@%$OBJDIR%g
6176 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6177 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6178 s%@NSINSTALL@%$NSINSTALL%g
6179 s%@OPTIMIZER@%$OPTIMIZER%g
6180 s%@RC@%$RC%g
6181 s%@RCFLAGS@%$RCFLAGS%g
6182 s%@DLLFLAGS@%$DLLFLAGS%g
6183 s%@EXEFLAGS@%$EXEFLAGS%g
6184 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6185 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6186 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6187 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6188 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6189 s%@NEXT_ROOT@%$NEXT_ROOT%g
6190 s%@MT@%$MT%g
6192 CEOF
6195 cat >> $CONFIG_STATUS <<\EOF
6197 # Split the substitutions into bite-sized pieces for seds with
6198 # small command number limits, like on Digital OSF/1 and HP-UX.
6199 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6200 ac_file=1 # Number of current file.
6201 ac_beg=1 # First line for current file.
6202 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6203 ac_more_lines=:
6204 ac_sed_cmds=""
6205 while $ac_more_lines; do
6206 if test $ac_beg -gt 1; then
6207 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6208 else
6209 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6211 if test ! -s conftest.s$ac_file; then
6212 ac_more_lines=false
6213 rm -f conftest.s$ac_file
6214 else
6215 if test -z "$ac_sed_cmds"; then
6216 ac_sed_cmds="sed -f conftest.s$ac_file"
6217 else
6218 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6220 ac_file=`expr $ac_file + 1`
6221 ac_beg=$ac_end
6222 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6224 done
6225 if test -z "$ac_sed_cmds"; then
6226 ac_sed_cmds=cat
6230 cat >> $CONFIG_STATUS <<EOF
6232 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6234 cat >> $CONFIG_STATUS <<\EOF
6235 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6236 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6237 case "$ac_file" in
6238 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6239 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6240 *) ac_file_in="${ac_file}.in" ;;
6241 esac
6243 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6245 # Remove last slash and all that follows it. Not all systems have dirname.
6246 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6247 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6248 # The file is in a subdirectory.
6249 test ! -d "$ac_dir" && mkdir "$ac_dir"
6250 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6251 # A "../" for each directory in $ac_dir_suffix.
6252 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6253 else
6254 ac_dir_suffix= ac_dots=
6257 case "$ac_given_srcdir" in
6258 .) srcdir=.
6259 if test -z "$ac_dots"; then top_srcdir=.
6260 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6261 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6262 *) # Relative path.
6263 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6264 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6265 esac
6268 echo creating "$ac_file"
6269 rm -f "$ac_file"
6270 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6271 case "$ac_file" in
6272 *Makefile*) ac_comsub="1i\\
6273 # $configure_input" ;;
6274 *) ac_comsub= ;;
6275 esac
6277 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6278 sed -e "$ac_comsub
6279 s%@configure_input@%$configure_input%g
6280 s%@srcdir@%$srcdir%g
6281 s%@top_srcdir@%$top_srcdir%g
6282 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6283 fi; done
6284 rm -f conftest.s*
6287 cat >> $CONFIG_STATUS <<EOF
6290 cat >> $CONFIG_STATUS <<\EOF
6291 chmod +x config/nspr-config
6292 exit 0
6294 chmod +x $CONFIG_STATUS
6295 rm -fr confdefs* $ac_clean_files
6296 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1