VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/nsprpub/configure@ 61611

最後變更 在這個檔案從61611是 1,由 vboxsync 提交於 55 年 前

import

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 148.8 KB
 
1#! /bin/sh
2
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.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-dist-prefix=DIST_PREFIX
16 place build files in DIST_PREFIX [dist]"
17ac_help="$ac_help
18 --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]"
19ac_help="$ac_help
20 --with-dist-includedir=DIR
21 build include files in DIR [DIST_PREFIX/include/nspr]"
22ac_help="$ac_help
23 --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]"
24ac_help="$ac_help
25 --with-mozilla Compile NSPR with Mozilla support"
26ac_help="$ac_help
27 --enable-optimize(=val) Enable code optimizations (val, ie. -O2) "
28ac_help="$ac_help
29 --disable-debug Do not compile in debugging symbols"
30ac_help="$ac_help
31 --enable-win32-target=\$t
32 Specify win32 flavor. (WIN95 or WINNT)"
33ac_help="$ac_help
34 --enable-debug-rtl Use the MSVC debug runtime library"
35ac_help="$ac_help
36 --enable-n32 Enable n32 ABI support (IRIX only)"
37ac_help="$ac_help
38 --enable-64bit Enable 64-bit support (on certain platforms)"
39ac_help="$ac_help
40 --enable-mdupdate Enable use of certain compilers' mdupdate feature"
41ac_help="$ac_help
42 --enable-macos-target=VER (default=10.1)
43 Set the minimum MacOS version needed at runtime"
44ac_help="$ac_help
45 --enable-strip Enable stripping of shared libs and programs"
46ac_help="$ac_help
47 --with-pthreads Use system pthreads library as thread subsystem"
48ac_help="$ac_help
49 --enable-user-pthreads Build using userland pthreads"
50ac_help="$ac_help
51 --enable-nspr-threads Build using classic nspr threads"
52ac_help="$ac_help
53 --with-bthreads Use system bthreads library as thread subsystem (BeOS only)"
54ac_help="$ac_help
55 --with-native-threads Use native system threads as thread subsystem (Solaris only)"
56ac_help="$ac_help
57 --enable-cplus Enable some c++ api routines"
58ac_help="$ac_help
59 --enable-ipv6 Compile ipv6 support"
60ac_help="$ac_help
61 --enable-boehm Enable the Boehm Garbage Collector"
62
63# Initialize some variables set by options.
64# The variables have the same names as the options, with
65# dashes changed to underlines.
66build=NONE
67cache_file=./config.cache
68exec_prefix=NONE
69host=NONE
70no_create=
71nonopt=NONE
72no_recursion=
73prefix=NONE
74program_prefix=NONE
75program_suffix=NONE
76program_transform_name=s,x,x,
77silent=
78site=
79srcdir=
80target=NONE
81verbose=
82x_includes=NONE
83x_libraries=NONE
84bindir='${exec_prefix}/bin'
85sbindir='${exec_prefix}/sbin'
86libexecdir='${exec_prefix}/libexec'
87datadir='${prefix}/share'
88sysconfdir='${prefix}/etc'
89sharedstatedir='${prefix}/com'
90localstatedir='${prefix}/var'
91libdir='${exec_prefix}/lib'
92includedir='${prefix}/include'
93oldincludedir='/usr/include'
94infodir='${prefix}/info'
95mandir='${prefix}/man'
96
97# Initialize some other variables.
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101# Maximum number of lines to put in a shell here document.
102ac_max_here_lines=12
103
104ac_prev=
105for ac_option
106do
107
108 # If the previous option needs an argument, assign it.
109 if test -n "$ac_prev"; then
110 eval "$ac_prev=\$ac_option"
111 ac_prev=
112 continue
113 fi
114
115 case "$ac_option" in
116 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
117 *) ac_optarg= ;;
118 esac
119
120 # Accept the important Cygnus configure options, so we can diagnose typos.
121
122 case "$ac_option" in
123
124 -bindir | --bindir | --bindi | --bind | --bin | --bi)
125 ac_prev=bindir ;;
126 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
127 bindir="$ac_optarg" ;;
128
129 -build | --build | --buil | --bui | --bu)
130 ac_prev=build ;;
131 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
132 build="$ac_optarg" ;;
133
134 -cache-file | --cache-file | --cache-fil | --cache-fi \
135 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
136 ac_prev=cache_file ;;
137 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
138 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
139 cache_file="$ac_optarg" ;;
140
141 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
142 ac_prev=datadir ;;
143 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
144 | --da=*)
145 datadir="$ac_optarg" ;;
146
147 -disable-* | --disable-*)
148 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
149 # Reject names that are not valid shell variable names.
150 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
151 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152 fi
153 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154 eval "enable_${ac_feature}=no" ;;
155
156 -enable-* | --enable-*)
157 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
158 # Reject names that are not valid shell variable names.
159 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
160 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 fi
162 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
163 case "$ac_option" in
164 *=*) ;;
165 *) ac_optarg=yes ;;
166 esac
167 eval "enable_${ac_feature}='$ac_optarg'" ;;
168
169 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
170 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
171 | --exec | --exe | --ex)
172 ac_prev=exec_prefix ;;
173 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
174 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
175 | --exec=* | --exe=* | --ex=*)
176 exec_prefix="$ac_optarg" ;;
177
178 -gas | --gas | --ga | --g)
179 # Obsolete; use --with-gas.
180 with_gas=yes ;;
181
182 -help | --help | --hel | --he)
183 # Omit some internal or obsolete options to make the list less imposing.
184 # This message is too long to be a string in the A/UX 3.1 sh.
185 cat << EOF
186Usage: configure [options] [host]
187Options: [defaults in brackets after descriptions]
188Configuration:
189 --cache-file=FILE cache test results in FILE
190 --help print this message
191 --no-create do not create output files
192 --quiet, --silent do not print \`checking...' messages
193 --version print the version of autoconf that created configure
194Directory and file names:
195 --prefix=PREFIX install architecture-independent files in PREFIX
196 [$ac_default_prefix]
197 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
198 [same as prefix]
199 --bindir=DIR user executables in DIR [EPREFIX/bin]
200 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
201 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
202 --datadir=DIR read-only architecture-independent data in DIR
203 [PREFIX/share]
204 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
205 --sharedstatedir=DIR modifiable architecture-independent data in DIR
206 [PREFIX/com]
207 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
208 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
209 --includedir=DIR C header files in DIR [PREFIX/include]
210 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
211 --infodir=DIR info documentation in DIR [PREFIX/info]
212 --mandir=DIR man documentation in DIR [PREFIX/man]
213 --srcdir=DIR find the sources in DIR [configure dir or ..]
214 --program-prefix=PREFIX prepend PREFIX to installed program names
215 --program-suffix=SUFFIX append SUFFIX to installed program names
216 --program-transform-name=PROGRAM
217 run sed PROGRAM on installed program names
218EOF
219 cat << EOF
220Host type:
221 --build=BUILD configure for building on BUILD [BUILD=HOST]
222 --host=HOST configure for HOST [guessed]
223 --target=TARGET configure for TARGET [TARGET=HOST]
224Features and packages:
225 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
226 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
227 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
228 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
229 --x-includes=DIR X include files are in DIR
230 --x-libraries=DIR X library files are in DIR
231EOF
232 if test -n "$ac_help"; then
233 echo "--enable and --with options recognized:$ac_help"
234 fi
235 exit 0 ;;
236
237 -host | --host | --hos | --ho)
238 ac_prev=host ;;
239 -host=* | --host=* | --hos=* | --ho=*)
240 host="$ac_optarg" ;;
241
242 -includedir | --includedir | --includedi | --included | --include \
243 | --includ | --inclu | --incl | --inc)
244 ac_prev=includedir ;;
245 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
246 | --includ=* | --inclu=* | --incl=* | --inc=*)
247 includedir="$ac_optarg" ;;
248
249 -infodir | --infodir | --infodi | --infod | --info | --inf)
250 ac_prev=infodir ;;
251 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
252 infodir="$ac_optarg" ;;
253
254 -libdir | --libdir | --libdi | --libd)
255 ac_prev=libdir ;;
256 -libdir=* | --libdir=* | --libdi=* | --libd=*)
257 libdir="$ac_optarg" ;;
258
259 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
260 | --libexe | --libex | --libe)
261 ac_prev=libexecdir ;;
262 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
263 | --libexe=* | --libex=* | --libe=*)
264 libexecdir="$ac_optarg" ;;
265
266 -localstatedir | --localstatedir | --localstatedi | --localstated \
267 | --localstate | --localstat | --localsta | --localst \
268 | --locals | --local | --loca | --loc | --lo)
269 ac_prev=localstatedir ;;
270 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
271 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
272 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
273 localstatedir="$ac_optarg" ;;
274
275 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
276 ac_prev=mandir ;;
277 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
278 mandir="$ac_optarg" ;;
279
280 -nfp | --nfp | --nf)
281 # Obsolete; use --without-fp.
282 with_fp=no ;;
283
284 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
285 | --no-cr | --no-c)
286 no_create=yes ;;
287
288 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
289 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
290 no_recursion=yes ;;
291
292 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
293 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
294 | --oldin | --oldi | --old | --ol | --o)
295 ac_prev=oldincludedir ;;
296 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
297 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
298 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
299 oldincludedir="$ac_optarg" ;;
300
301 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
302 ac_prev=prefix ;;
303 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
304 prefix="$ac_optarg" ;;
305
306 -program-prefix | --program-prefix | --program-prefi | --program-pref \
307 | --program-pre | --program-pr | --program-p)
308 ac_prev=program_prefix ;;
309 -program-prefix=* | --program-prefix=* | --program-prefi=* \
310 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
311 program_prefix="$ac_optarg" ;;
312
313 -program-suffix | --program-suffix | --program-suffi | --program-suff \
314 | --program-suf | --program-su | --program-s)
315 ac_prev=program_suffix ;;
316 -program-suffix=* | --program-suffix=* | --program-suffi=* \
317 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
318 program_suffix="$ac_optarg" ;;
319
320 -program-transform-name | --program-transform-name \
321 | --program-transform-nam | --program-transform-na \
322 | --program-transform-n | --program-transform- \
323 | --program-transform | --program-transfor \
324 | --program-transfo | --program-transf \
325 | --program-trans | --program-tran \
326 | --progr-tra | --program-tr | --program-t)
327 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
336
337 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
338 | -silent | --silent | --silen | --sile | --sil)
339 silent=yes ;;
340
341 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
342 ac_prev=sbindir ;;
343 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
344 | --sbi=* | --sb=*)
345 sbindir="$ac_optarg" ;;
346
347 -sharedstatedir | --sharedstatedir | --sharedstatedi \
348 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
349 | --sharedst | --shareds | --shared | --share | --shar \
350 | --sha | --sh)
351 ac_prev=sharedstatedir ;;
352 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
353 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
354 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
355 | --sha=* | --sh=*)
356 sharedstatedir="$ac_optarg" ;;
357
358 -site | --site | --sit)
359 ac_prev=site ;;
360 -site=* | --site=* | --sit=*)
361 site="$ac_optarg" ;;
362
363 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
364 ac_prev=srcdir ;;
365 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
366 srcdir="$ac_optarg" ;;
367
368 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
369 | --syscon | --sysco | --sysc | --sys | --sy)
370 ac_prev=sysconfdir ;;
371 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
372 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
373 sysconfdir="$ac_optarg" ;;
374
375 -target | --target | --targe | --targ | --tar | --ta | --t)
376 ac_prev=target ;;
377 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
378 target="$ac_optarg" ;;
379
380 -v | -verbose | --verbose | --verbos | --verbo | --verb)
381 verbose=yes ;;
382
383 -version | --version | --versio | --versi | --vers)
384 echo "configure generated by autoconf version 2.13"
385 exit 0 ;;
386
387 -with-* | --with-*)
388 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
389 # Reject names that are not valid shell variable names.
390 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
391 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
392 fi
393 ac_package=`echo $ac_package| sed 's/-/_/g'`
394 case "$ac_option" in
395 *=*) ;;
396 *) ac_optarg=yes ;;
397 esac
398 eval "with_${ac_package}='$ac_optarg'" ;;
399
400 -without-* | --without-*)
401 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
402 # Reject names that are not valid shell variable names.
403 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
404 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405 fi
406 ac_package=`echo $ac_package| sed 's/-/_/g'`
407 eval "with_${ac_package}=no" ;;
408
409 --x)
410 # Obsolete; use --with-x.
411 with_x=yes ;;
412
413 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414 | --x-incl | --x-inc | --x-in | --x-i)
415 ac_prev=x_includes ;;
416 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418 x_includes="$ac_optarg" ;;
419
420 -x-libraries | --x-libraries | --x-librarie | --x-librari \
421 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422 ac_prev=x_libraries ;;
423 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425 x_libraries="$ac_optarg" ;;
426
427 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
428 ;;
429
430 *)
431 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
432 echo "configure: warning: $ac_option: invalid host type" 1>&2
433 fi
434 if test "x$nonopt" != xNONE; then
435 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
436 fi
437 nonopt="$ac_option"
438 ;;
439
440 esac
441done
442
443if test -n "$ac_prev"; then
444 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
445fi
446
447trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
448
449# File descriptor usage:
450# 0 standard input
451# 1 file creation
452# 2 errors and warnings
453# 3 some systems may open it to /dev/tty
454# 4 used on the Kubota Titan
455# 6 checking for... messages and results
456# 5 compiler messages saved in config.log
457if test "$silent" = yes; then
458 exec 6>/dev/null
459else
460 exec 6>&1
461fi
462exec 5>./config.log
463
464echo "\
465This file contains any messages produced by compilers while
466running configure, to aid debugging if configure makes a mistake.
467" 1>&5
468
469# Strip out --no-create and --no-recursion so they do not pile up.
470# Also quote any args containing shell metacharacters.
471ac_configure_args=
472for ac_arg
473do
474 case "$ac_arg" in
475 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
476 | --no-cr | --no-c) ;;
477 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
478 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
479 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
480 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
481 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
482 esac
483done
484
485# NLS nuisances.
486# Only set these to C if already set. These must not be set unconditionally
487# because not all systems understand e.g. LANG=C (notably SCO).
488# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
489# Non-C LC_CTYPE values break the ctype check.
490if test "${LANG+set}" = set; then LANG=C; export LANG; fi
491if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
492if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
493if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
494
495# confdefs.h avoids OS command line length limits that DEFS can exceed.
496rm -rf conftest* confdefs.h
497# AIX cpp loses on an empty file, so make sure it contains at least a newline.
498echo > confdefs.h
499
500# A filename unique to this package, relative to the directory that
501# configure is in, which we can look for to find out if srcdir is correct.
502ac_unique_file=config/libc_r.h
503
504# Find the source files, if location was not specified.
505if test -z "$srcdir"; then
506 ac_srcdir_defaulted=yes
507 # Try the directory containing this script, then its parent.
508 ac_prog=$0
509 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
510 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511 srcdir=$ac_confdir
512 if test ! -r $srcdir/$ac_unique_file; then
513 srcdir=..
514 fi
515else
516 ac_srcdir_defaulted=no
517fi
518if test ! -r $srcdir/$ac_unique_file; then
519 if test "$ac_srcdir_defaulted" = yes; then
520 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
521 else
522 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
523 fi
524fi
525srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
526
527# Prefer explicitly selected file to automatically selected ones.
528if test -z "$CONFIG_SITE"; then
529 if test "x$prefix" != xNONE; then
530 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
531 else
532 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
533 fi
534fi
535for ac_site_file in $CONFIG_SITE; do
536 if test -r "$ac_site_file"; then
537 echo "loading site script $ac_site_file"
538 . "$ac_site_file"
539 fi
540done
541
542if test -r "$cache_file"; then
543 echo "loading cache $cache_file"
544 . $cache_file
545else
546 echo "creating cache $cache_file"
547 > $cache_file
548fi
549
550ac_ext=c
551# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
552ac_cpp='$CPP $CPPFLAGS'
553ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
554ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
555cross_compiling=$ac_cv_prog_cc_cross
556
557ac_exeext=
558ac_objext=o
559if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
560 # Stardent Vistra SVR4 grep lacks -e, says [email protected].
561 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
562 ac_n= ac_c='
563' ac_t=' '
564 else
565 ac_n=-n ac_c= ac_t=
566 fi
567else
568 ac_n= ac_c='\c' ac_t=
569fi
570
571
572
573ac_aux_dir=
574for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
575 if test -f $ac_dir/install-sh; then
576 ac_aux_dir=$ac_dir
577 ac_install_sh="$ac_aux_dir/install-sh -c"
578 break
579 elif test -f $ac_dir/install.sh; then
580 ac_aux_dir=$ac_dir
581 ac_install_sh="$ac_aux_dir/install.sh -c"
582 break
583 fi
584done
585if test -z "$ac_aux_dir"; then
586 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
587fi
588ac_config_guess=$ac_aux_dir/config.guess
589ac_config_sub=$ac_aux_dir/config.sub
590ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
591
592
593# Do some error checking and defaulting for the host and target type.
594# The inputs are:
595# configure --host=HOST --target=TARGET --build=BUILD NONOPT
596#
597# The rules are:
598# 1. You are not allowed to specify --host, --target, and nonopt at the
599# same time.
600# 2. Host defaults to nonopt.
601# 3. If nonopt is not specified, then host defaults to the current host,
602# as determined by config.guess.
603# 4. Target and build default to nonopt.
604# 5. If nonopt is not specified, then target and build default to host.
605
606# The aliases save the names the user supplied, while $host etc.
607# will get canonicalized.
608case $host---$target---$nonopt in
609NONE---*---* | *---NONE---* | *---*---NONE) ;;
610*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
611esac
612
613
614# Make sure we can run config.sub.
615if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
616else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
617fi
618
619echo $ac_n "checking host system type""... $ac_c" 1>&6
620echo "configure:621: checking host system type" >&5
621
622host_alias=$host
623case "$host_alias" in
624NONE)
625 case $nonopt in
626 NONE)
627 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
628 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
629 fi ;;
630 *) host_alias=$nonopt ;;
631 esac ;;
632esac
633
634host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
635host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
636host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
637host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
638echo "$ac_t""$host" 1>&6
639
640echo $ac_n "checking target system type""... $ac_c" 1>&6
641echo "configure:642: checking target system type" >&5
642
643target_alias=$target
644case "$target_alias" in
645NONE)
646 case $nonopt in
647 NONE) target_alias=$host_alias ;;
648 *) target_alias=$nonopt ;;
649 esac ;;
650esac
651
652target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
653target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
654target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
655target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
656echo "$ac_t""$target" 1>&6
657
658echo $ac_n "checking build system type""... $ac_c" 1>&6
659echo "configure:660: checking build system type" >&5
660
661build_alias=$build
662case "$build_alias" in
663NONE)
664 case $nonopt in
665 NONE) build_alias=$host_alias ;;
666 *) build_alias=$nonopt ;;
667 esac ;;
668esac
669
670build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
671build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
672build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
673build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
674echo "$ac_t""$build" 1>&6
675
676test "$host_alias" != "$target_alias" &&
677 test "$program_prefix$program_suffix$program_transform_name" = \
678 NONENONEs,x,x, &&
679 program_prefix=${target_alias}-
680
681
682MOD_MAJOR_VERSION=4
683MOD_MINOR_VERSION=5
684MOD_PATCH_VERSION=0
685NSPR_MODNAME=nspr20
686_HAVE_PTHREADS=
687USE_PTHREADS=
688USE_USER_PTHREADS=
689USE_NSPR_THREADS=
690USE_N32=
691USE_64=
692USE_CPLUS=
693USE_IPV6=
694USE_MDUPDATE=
695MACOS_DEPLOYMENT_TARGET=
696_OPTIMIZE_FLAGS=-O
697_DEBUG_FLAGS=-g
698MOZ_DEBUG=1
699MOZ_OPTIMIZE=
700OBJDIR=.
701OBJDIR_NAME=.
702OBJDIR_SUFFIX=OBJ
703NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
704NOSUCHFILE=/no-such-file
705LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
706LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
707CYGWIN_WRAPPER=
708
709RESOLVE_LINK_SYMBOLS=
710
711CFLAGS="${CFLAGS=}"
712CXXFLAGS="${CXXFLAGS=}"
713LDFLAGS="${LDFLAGS=}"
714HOST_CFLAGS="${HOST_CFLAGS=}"
715HOST_LDFLAGS="${HOST_LDFLAGS=}"
716
717case "$target" in
718*-cygwin*|*-mingw*)
719 # Check to see if we are really running in a msvc environemnt
720 _WIN32_MSVC=
721 for ac_prog in cl
722do
723# Extract the first word of "$ac_prog", so it can be a program name with args.
724set dummy $ac_prog; ac_word=$2
725echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
726echo "configure:727: checking for $ac_word" >&5
727if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
728 echo $ac_n "(cached) $ac_c" 1>&6
729else
730 if test -n "$CC"; then
731 ac_cv_prog_CC="$CC" # Let the user override the test.
732else
733 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
734 ac_dummy="$PATH"
735 for ac_dir in $ac_dummy; do
736 test -z "$ac_dir" && ac_dir=.
737 if test -f $ac_dir/$ac_word; then
738 ac_cv_prog_CC="$ac_prog"
739 break
740 fi
741 done
742 IFS="$ac_save_ifs"
743fi
744fi
745CC="$ac_cv_prog_CC"
746if test -n "$CC"; then
747 echo "$ac_t""$CC" 1>&6
748else
749 echo "$ac_t""no" 1>&6
750fi
751
752test -n "$CC" && break
753done
754
755 if test "$CC" = "cl"; then
756 echo 'main() { return 0; }' > dummy.c
757 ${CC} -o dummy dummy.c >/dev/null 2>&1
758 if test $? = 0; then
759 _WIN32_MSVC=1
760 CXX=$CC
761 else
762 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
763 fi
764 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
765 fi
766 ;;
767*-msvc*)
768 _WIN32_MSVC=1
769 ;;
770*-mks*)
771 _WIN32_MSVC=1
772 ;;
773esac
774
775if test -n "$_WIN32_MSVC"; then
776 SKIP_PATH_CHECKS=1
777 SKIP_COMPILER_CHECKS=1
778 SKIP_LIBRARY_CHECKS=1
779fi
780
781dist_prefix='${MOD_DEPTH}/dist'
782dist_bindir='${dist_prefix}/bin'
783dist_includedir='${dist_prefix}/include/nspr'
784dist_libdir='${dist_prefix}/lib'
785if test "${includedir}" = '${prefix}/include'; then
786 includedir='${prefix}/include/nspr'
787fi
788
789# Check whether --with-dist-prefix or --without-dist-prefix was given.
790if test "${with_dist_prefix+set}" = set; then
791 withval="$with_dist_prefix"
792 dist_prefix=$withval
793fi
794
795
796# Check whether --with-dist-bindir or --without-dist-bindir was given.
797if test "${with_dist_bindir+set}" = set; then
798 withval="$with_dist_bindir"
799 dist_bindir=$withval
800fi
801
802
803# Check whether --with-dist-includedir or --without-dist-includedir was given.
804if test "${with_dist_includedir+set}" = set; then
805 withval="$with_dist_includedir"
806 dist_includedir=$withval
807fi
808
809
810# Check whether --with-dist-libdir or --without-dist-libdir was given.
811if test "${with_dist_libdir+set}" = set; then
812 withval="$with_dist_libdir"
813 dist_libdir=$withval
814fi
815
816
817
818
819
820
821
822# Check whether --with-mozilla or --without-mozilla was given.
823if test "${with_mozilla+set}" = set; then
824 withval="$with_mozilla"
825 if test "$withval" = "yes"; then
826 cat >> confdefs.h <<\EOF
827#define MOZILLA_CLIENT 1
828EOF
829
830 MOZILLA_CLIENT=1
831 else
832 MOZILLA_CLIENT=
833 fi
834else
835 if test -n "$MOZILLA_CLIENT"; then
836 cat >> confdefs.h <<\EOF
837#define MOZILLA_CLIENT 1
838EOF
839
840 fi
841fi
842
843
844# Check whether --enable-optimize or --disable-optimize was given.
845if test "${enable_optimize+set}" = set; then
846 enableval="$enable_optimize"
847 if test "$enableval" != "no"; then
848 MOZ_OPTIMIZE=1
849 if test -n "$enableval" && test "$enableval" != "yes"; then
850 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
851 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
852 fi
853 else
854 MOZ_OPTIMIZE=
855 fi
856fi
857
858
859# Check whether --enable-debug or --disable-debug was given.
860if test "${enable_debug+set}" = set; then
861 enableval="$enable_debug"
862 if test "$enableval" = "no"; then
863 MOZ_DEBUG=
864 else
865 MOZ_DEBUG=1
866 fi
867fi
868
869
870# Check whether --enable-win32-target or --disable-win32-target was given.
871if test "${enable_win32_target+set}" = set; then
872 enableval="$enable_win32_target"
873 OS_TARGET=`echo $enableval | tr a-z A-Z`
874else
875 OS_TARGET=
876fi
877
878
879# Check whether --enable-debug-rtl or --disable-debug-rtl was given.
880if test "${enable_debug_rtl+set}" = set; then
881 enableval="$enable_debug_rtl"
882 if test "$enableval" = "yes"; then
883 USE_DEBUG_RTL=1
884 fi
885fi
886
887
888# Check whether --enable-n32 or --disable-n32 was given.
889if test "${enable_n32+set}" = set; then
890 enableval="$enable_n32"
891 if test "$enableval" = "yes"; then
892 USE_N32=1
893 else if test "$enableval" = "no"; then
894 USE_N32=
895 fi
896 fi
897fi
898
899
900# Check whether --enable-64bit or --disable-64bit was given.
901if test "${enable_64bit+set}" = set; then
902 enableval="$enable_64bit"
903 if test "$enableval" = "yes"; then
904 USE_64=1
905 fi
906fi
907
908
909# Check whether --enable-mdupdate or --disable-mdupdate was given.
910if test "${enable_mdupdate+set}" = set; then
911 enableval="$enable_mdupdate"
912 if test "$enableval" = "yes"; then
913 USE_MDUPDATE=1
914 fi
915fi
916
917
918# Check whether --enable-macos-target or --disable-macos-target was given.
919if test "${enable_macos_target+set}" = set; then
920 enableval="$enable_macos_target"
921 MACOS_DEPLOYMENT_TARGET_STR=$enableval
922else
923 MACOS_DEPLOYMENT_TARGET_STR=10.1
924fi
925
926
927case "$target" in
928
929*-aix*)
930 case "${target_os}" in
931 aix3.2*)
932 USE_NSPR_THREADS=1
933 ;;
934 *)
935 USE_PTHREADS=1
936 ;;
937 esac
938 ;;
939
940esac
941
942if test -z "$CC"; then
943 case "$target" in
944
945 *-aix*)
946 if test -z "$USE_NSPR_THREADS"; then
947 CC=xlc_r
948 else
949 CC=xlc
950 fi
951 ;;
952
953 *-hpux*)
954 CC=cc
955 ;;
956
957 *-irix*)
958 CC=cc
959 ;;
960
961 *-openvms*)
962 CC=cc
963 ;;
964
965 *-osf*)
966 CC=cc
967 ;;
968
969 *-solaris*)
970 CC=cc
971 ;;
972
973 esac
974fi
975
976if test -z "$CXX"; then
977 case "$target" in
978
979 *-aix*)
980 if test -z "$USE_NSPR_THREADS"; then
981 CXX=xlC_r
982 else
983 CXX=xlC
984 fi
985 ;;
986
987 *-hpux*)
988 case "${target_os}" in
989 hpux10.30)
990 CXX=aCC
991 ;;
992 hpux11.*)
993 CXX=aCC
994 ;;
995 *)
996 CXX=CC
997 ;;
998 esac
999 ;;
1000
1001 *-irix*)
1002 CXX=CC
1003 ;;
1004
1005 *-openvms*)
1006 CXX=cxx
1007 ;;
1008
1009 *-osf*)
1010 CXX=cxx
1011 ;;
1012
1013 *-solaris*)
1014 CXX=CC
1015 ;;
1016
1017 esac
1018fi
1019
1020if test -z "$SKIP_PATH_CHECKS"; then
1021 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1022set dummy $WHOAMI whoami; ac_word=$2
1023echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1024echo "configure:1025: checking for $ac_word" >&5
1025if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1026 echo $ac_n "(cached) $ac_c" 1>&6
1027else
1028 case "$WHOAMI" in
1029 /*)
1030 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1031 ;;
1032 ?:/*)
1033 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1034 ;;
1035 *)
1036 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1037 ac_dummy="$PATH"
1038 for ac_dir in $ac_dummy; do
1039 test -z "$ac_dir" && ac_dir=.
1040 if test -f $ac_dir/$ac_word; then
1041 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1042 break
1043 fi
1044 done
1045 IFS="$ac_save_ifs"
1046 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1047 ;;
1048esac
1049fi
1050WHOAMI="$ac_cv_path_WHOAMI"
1051if test -n "$WHOAMI"; then
1052 echo "$ac_t""$WHOAMI" 1>&6
1053else
1054 echo "$ac_t""no" 1>&6
1055fi
1056
1057fi
1058
1059if test -n "$MOZ_DEBUG"; then
1060 cat >> confdefs.h <<\EOF
1061#define DEBUG 1
1062EOF
1063
1064 DEFINES="$DEFINES -UNDEBUG"
1065
1066 case "${target_os}" in
1067 beos*)
1068 DEFINES="$DEFINES -DDEBUG_${USER}"
1069 ;;
1070 msvc*|mks*|cygwin*|mingw*|os2*)
1071 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1072 ;;
1073 *)
1074 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1075 ;;
1076 esac
1077else
1078 cat >> confdefs.h <<\EOF
1079#define NDEBUG 1
1080EOF
1081
1082 DEFINES="$DEFINES -UDEBUG"
1083fi
1084
1085if test -z "$SKIP_COMPILER_CHECKS"; then
1086if test "$target" != "$host"; then
1087 echo "cross compiling from $host to $target"
1088 cross_compiling=yes
1089
1090 _SAVE_CC="$CC"
1091 _SAVE_CFLAGS="$CFLAGS"
1092 _SAVE_LDFLAGS="$LDFLAGS"
1093
1094 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1095echo "configure:1096: checking for $host compiler" >&5
1096 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1097do
1098# Extract the first word of "$ac_prog", so it can be a program name with args.
1099set dummy $ac_prog; ac_word=$2
1100echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101echo "configure:1102: checking for $ac_word" >&5
1102if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1103 echo $ac_n "(cached) $ac_c" 1>&6
1104else
1105 if test -n "$HOST_CC"; then
1106 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1107else
1108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1109 ac_dummy="$PATH"
1110 for ac_dir in $ac_dummy; do
1111 test -z "$ac_dir" && ac_dir=.
1112 if test -f $ac_dir/$ac_word; then
1113 ac_cv_prog_HOST_CC="$ac_prog"
1114 break
1115 fi
1116 done
1117 IFS="$ac_save_ifs"
1118fi
1119fi
1120HOST_CC="$ac_cv_prog_HOST_CC"
1121if test -n "$HOST_CC"; then
1122 echo "$ac_t""$HOST_CC" 1>&6
1123else
1124 echo "$ac_t""no" 1>&6
1125fi
1126
1127test -n "$HOST_CC" && break
1128done
1129test -n "$HOST_CC" || HOST_CC=""""
1130
1131 if test -z "$HOST_CC"; then
1132 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1133 fi
1134 echo "$ac_t""$HOST_CC" 1>&6
1135 if test -z "$HOST_CFLAGS"; then
1136 HOST_CFLAGS="$CFLAGS"
1137 fi
1138 if test -z "$HOST_LDFLAGS"; then
1139 HOST_LDFLAGS="$LDFLAGS"
1140 fi
1141
1142 CC="$HOST_CC"
1143 CFLAGS="$HOST_CFLAGS"
1144 LDFLAGS="$HOST_LDFLAGS"
1145
1146 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1147echo "configure:1148: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1148 cat > conftest.$ac_ext <<EOF
1149#line 1150 "configure"
1150#include "confdefs.h"
1151
1152int main() {
1153return(0);
1154; return 0; }
1155EOF
1156if { (eval echo configure:1157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1157 rm -rf conftest*
1158 ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1159else
1160 echo "configure: failed program was:" >&5
1161 cat conftest.$ac_ext >&5
1162 rm -rf conftest*
1163 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1164fi
1165rm -f conftest*
1166
1167 CC=$_SAVE_CC
1168 CFLAGS=$_SAVE_CFLAGS
1169 LDFLAGS=$_SAVE_LDFLAGS
1170
1171 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1172do
1173# Extract the first word of "$ac_prog", so it can be a program name with args.
1174set dummy $ac_prog; ac_word=$2
1175echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1176echo "configure:1177: checking for $ac_word" >&5
1177if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1178 echo $ac_n "(cached) $ac_c" 1>&6
1179else
1180 if test -n "$CC"; then
1181 ac_cv_prog_CC="$CC" # Let the user override the test.
1182else
1183 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1184 ac_dummy="$PATH"
1185 for ac_dir in $ac_dummy; do
1186 test -z "$ac_dir" && ac_dir=.
1187 if test -f $ac_dir/$ac_word; then
1188 ac_cv_prog_CC="$ac_prog"
1189 break
1190 fi
1191 done
1192 IFS="$ac_save_ifs"
1193fi
1194fi
1195CC="$ac_cv_prog_CC"
1196if test -n "$CC"; then
1197 echo "$ac_t""$CC" 1>&6
1198else
1199 echo "$ac_t""no" 1>&6
1200fi
1201
1202test -n "$CC" && break
1203done
1204test -n "$CC" || CC="echo"
1205
1206 unset ac_cv_prog_CC
1207 # Extract the first word of "gcc", so it can be a program name with args.
1208set dummy gcc; ac_word=$2
1209echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1210echo "configure:1211: checking for $ac_word" >&5
1211if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1212 echo $ac_n "(cached) $ac_c" 1>&6
1213else
1214 if test -n "$CC"; then
1215 ac_cv_prog_CC="$CC" # Let the user override the test.
1216else
1217 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1218 ac_dummy="$PATH"
1219 for ac_dir in $ac_dummy; do
1220 test -z "$ac_dir" && ac_dir=.
1221 if test -f $ac_dir/$ac_word; then
1222 ac_cv_prog_CC="gcc"
1223 break
1224 fi
1225 done
1226 IFS="$ac_save_ifs"
1227fi
1228fi
1229CC="$ac_cv_prog_CC"
1230if test -n "$CC"; then
1231 echo "$ac_t""$CC" 1>&6
1232else
1233 echo "$ac_t""no" 1>&6
1234fi
1235
1236if test -z "$CC"; then
1237 # Extract the first word of "cc", so it can be a program name with args.
1238set dummy cc; ac_word=$2
1239echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1240echo "configure:1241: checking for $ac_word" >&5
1241if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1242 echo $ac_n "(cached) $ac_c" 1>&6
1243else
1244 if test -n "$CC"; then
1245 ac_cv_prog_CC="$CC" # Let the user override the test.
1246else
1247 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1248 ac_prog_rejected=no
1249 ac_dummy="$PATH"
1250 for ac_dir in $ac_dummy; do
1251 test -z "$ac_dir" && ac_dir=.
1252 if test -f $ac_dir/$ac_word; then
1253 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1254 ac_prog_rejected=yes
1255 continue
1256 fi
1257 ac_cv_prog_CC="cc"
1258 break
1259 fi
1260 done
1261 IFS="$ac_save_ifs"
1262if test $ac_prog_rejected = yes; then
1263 # We found a bogon in the path, so make sure we never use it.
1264 set dummy $ac_cv_prog_CC
1265 shift
1266 if test $# -gt 0; then
1267 # We chose a different compiler from the bogus one.
1268 # However, it has the same basename, so the bogon will be chosen
1269 # first if we set CC to just the basename; use the full file name.
1270 shift
1271 set dummy "$ac_dir/$ac_word" "$@"
1272 shift
1273 ac_cv_prog_CC="$@"
1274 fi
1275fi
1276fi
1277fi
1278CC="$ac_cv_prog_CC"
1279if test -n "$CC"; then
1280 echo "$ac_t""$CC" 1>&6
1281else
1282 echo "$ac_t""no" 1>&6
1283fi
1284
1285 if test -z "$CC"; then
1286 case "`uname -s`" in
1287 *win32* | *WIN32*)
1288 # Extract the first word of "cl", so it can be a program name with args.
1289set dummy cl; ac_word=$2
1290echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1291echo "configure:1292: checking for $ac_word" >&5
1292if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1293 echo $ac_n "(cached) $ac_c" 1>&6
1294else
1295 if test -n "$CC"; then
1296 ac_cv_prog_CC="$CC" # Let the user override the test.
1297else
1298 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1299 ac_dummy="$PATH"
1300 for ac_dir in $ac_dummy; do
1301 test -z "$ac_dir" && ac_dir=.
1302 if test -f $ac_dir/$ac_word; then
1303 ac_cv_prog_CC="cl"
1304 break
1305 fi
1306 done
1307 IFS="$ac_save_ifs"
1308fi
1309fi
1310CC="$ac_cv_prog_CC"
1311if test -n "$CC"; then
1312 echo "$ac_t""$CC" 1>&6
1313else
1314 echo "$ac_t""no" 1>&6
1315fi
1316 ;;
1317 esac
1318 fi
1319 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1320fi
1321
1322echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1323echo "configure:1324: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1324
1325ac_ext=c
1326# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1327ac_cpp='$CPP $CPPFLAGS'
1328ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1329ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1330cross_compiling=$ac_cv_prog_cc_cross
1331
1332cat > conftest.$ac_ext << EOF
1333
1334#line 1335 "configure"
1335#include "confdefs.h"
1336
1337main(){return(0);}
1338EOF
1339if { (eval echo configure:1340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1340 ac_cv_prog_cc_works=yes
1341 # If we can't run a trivial program, we are probably using a cross compiler.
1342 if (./conftest; exit) 2>/dev/null; then
1343 ac_cv_prog_cc_cross=no
1344 else
1345 ac_cv_prog_cc_cross=yes
1346 fi
1347else
1348 echo "configure: failed program was:" >&5
1349 cat conftest.$ac_ext >&5
1350 ac_cv_prog_cc_works=no
1351fi
1352rm -fr conftest*
1353ac_ext=c
1354# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1355ac_cpp='$CPP $CPPFLAGS'
1356ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1357ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1358cross_compiling=$ac_cv_prog_cc_cross
1359
1360echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1361if test $ac_cv_prog_cc_works = no; then
1362 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1363fi
1364echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1365echo "configure:1366: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1366echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1367cross_compiling=$ac_cv_prog_cc_cross
1368
1369echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1370echo "configure:1371: checking whether we are using GNU C" >&5
1371if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1372 echo $ac_n "(cached) $ac_c" 1>&6
1373else
1374 cat > conftest.c <<EOF
1375#ifdef __GNUC__
1376 yes;
1377#endif
1378EOF
1379if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1380 ac_cv_prog_gcc=yes
1381else
1382 ac_cv_prog_gcc=no
1383fi
1384fi
1385
1386echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1387
1388if test $ac_cv_prog_gcc = yes; then
1389 GCC=yes
1390else
1391 GCC=
1392fi
1393
1394ac_test_CFLAGS="${CFLAGS+set}"
1395ac_save_CFLAGS="$CFLAGS"
1396CFLAGS=
1397echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1398echo "configure:1399: checking whether ${CC-cc} accepts -g" >&5
1399if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1400 echo $ac_n "(cached) $ac_c" 1>&6
1401else
1402 echo 'void f(){}' > conftest.c
1403if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1404 ac_cv_prog_cc_g=yes
1405else
1406 ac_cv_prog_cc_g=no
1407fi
1408rm -f conftest*
1409
1410fi
1411
1412echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1413if test "$ac_test_CFLAGS" = set; then
1414 CFLAGS="$ac_save_CFLAGS"
1415elif test $ac_cv_prog_cc_g = yes; then
1416 if test "$GCC" = yes; then
1417 CFLAGS="-g -O2"
1418 else
1419 CFLAGS="-g"
1420 fi
1421else
1422 if test "$GCC" = yes; then
1423 CFLAGS="-O2"
1424 else
1425 CFLAGS=
1426 fi
1427fi
1428
1429 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1430do
1431# Extract the first word of "$ac_prog", so it can be a program name with args.
1432set dummy $ac_prog; ac_word=$2
1433echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1434echo "configure:1435: checking for $ac_word" >&5
1435if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1436 echo $ac_n "(cached) $ac_c" 1>&6
1437else
1438 if test -n "$CXX"; then
1439 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1440else
1441 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1442 ac_dummy="$PATH"
1443 for ac_dir in $ac_dummy; do
1444 test -z "$ac_dir" && ac_dir=.
1445 if test -f $ac_dir/$ac_word; then
1446 ac_cv_prog_CXX="$ac_prog"
1447 break
1448 fi
1449 done
1450 IFS="$ac_save_ifs"
1451fi
1452fi
1453CXX="$ac_cv_prog_CXX"
1454if test -n "$CXX"; then
1455 echo "$ac_t""$CXX" 1>&6
1456else
1457 echo "$ac_t""no" 1>&6
1458fi
1459
1460test -n "$CXX" && break
1461done
1462test -n "$CXX" || CXX="echo"
1463
1464 unset ac_cv_prog_CXX
1465 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1466do
1467# Extract the first word of "$ac_prog", so it can be a program name with args.
1468set dummy $ac_prog; ac_word=$2
1469echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1470echo "configure:1471: checking for $ac_word" >&5
1471if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1472 echo $ac_n "(cached) $ac_c" 1>&6
1473else
1474 if test -n "$CXX"; then
1475 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1476else
1477 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1478 ac_dummy="$PATH"
1479 for ac_dir in $ac_dummy; do
1480 test -z "$ac_dir" && ac_dir=.
1481 if test -f $ac_dir/$ac_word; then
1482 ac_cv_prog_CXX="$ac_prog"
1483 break
1484 fi
1485 done
1486 IFS="$ac_save_ifs"
1487fi
1488fi
1489CXX="$ac_cv_prog_CXX"
1490if test -n "$CXX"; then
1491 echo "$ac_t""$CXX" 1>&6
1492else
1493 echo "$ac_t""no" 1>&6
1494fi
1495
1496test -n "$CXX" && break
1497done
1498test -n "$CXX" || CXX="gcc"
1499
1500
1501echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1502echo "configure:1503: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1503
1504ac_ext=C
1505# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1506ac_cpp='$CXXCPP $CPPFLAGS'
1507ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1508ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1509cross_compiling=$ac_cv_prog_cxx_cross
1510
1511cat > conftest.$ac_ext << EOF
1512
1513#line 1514 "configure"
1514#include "confdefs.h"
1515
1516int main(){return(0);}
1517EOF
1518if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1519 ac_cv_prog_cxx_works=yes
1520 # If we can't run a trivial program, we are probably using a cross compiler.
1521 if (./conftest; exit) 2>/dev/null; then
1522 ac_cv_prog_cxx_cross=no
1523 else
1524 ac_cv_prog_cxx_cross=yes
1525 fi
1526else
1527 echo "configure: failed program was:" >&5
1528 cat conftest.$ac_ext >&5
1529 ac_cv_prog_cxx_works=no
1530fi
1531rm -fr conftest*
1532ac_ext=c
1533# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1534ac_cpp='$CPP $CPPFLAGS'
1535ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1536ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1537cross_compiling=$ac_cv_prog_cc_cross
1538
1539echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1540if test $ac_cv_prog_cxx_works = no; then
1541 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1542fi
1543echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1544echo "configure:1545: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1545echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1546cross_compiling=$ac_cv_prog_cxx_cross
1547
1548echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1549echo "configure:1550: checking whether we are using GNU C++" >&5
1550if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1552else
1553 cat > conftest.C <<EOF
1554#ifdef __GNUC__
1555 yes;
1556#endif
1557EOF
1558if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1559 ac_cv_prog_gxx=yes
1560else
1561 ac_cv_prog_gxx=no
1562fi
1563fi
1564
1565echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1566
1567if test $ac_cv_prog_gxx = yes; then
1568 GXX=yes
1569else
1570 GXX=
1571fi
1572
1573ac_test_CXXFLAGS="${CXXFLAGS+set}"
1574ac_save_CXXFLAGS="$CXXFLAGS"
1575CXXFLAGS=
1576echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1577echo "configure:1578: checking whether ${CXX-g++} accepts -g" >&5
1578if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1579 echo $ac_n "(cached) $ac_c" 1>&6
1580else
1581 echo 'void f(){}' > conftest.cc
1582if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1583 ac_cv_prog_cxx_g=yes
1584else
1585 ac_cv_prog_cxx_g=no
1586fi
1587rm -f conftest*
1588
1589fi
1590
1591echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1592if test "$ac_test_CXXFLAGS" = set; then
1593 CXXFLAGS="$ac_save_CXXFLAGS"
1594elif test $ac_cv_prog_cxx_g = yes; then
1595 if test "$GXX" = yes; then
1596 CXXFLAGS="-g -O2"
1597 else
1598 CXXFLAGS="-g"
1599 fi
1600else
1601 if test "$GXX" = yes; then
1602 CXXFLAGS="-O2"
1603 else
1604 CXXFLAGS=
1605 fi
1606fi
1607
1608 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1609do
1610# Extract the first word of "$ac_prog", so it can be a program name with args.
1611set dummy $ac_prog; ac_word=$2
1612echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1613echo "configure:1614: checking for $ac_word" >&5
1614if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 if test -n "$RANLIB"; then
1618 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1619else
1620 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1621 ac_dummy="$PATH"
1622 for ac_dir in $ac_dummy; do
1623 test -z "$ac_dir" && ac_dir=.
1624 if test -f $ac_dir/$ac_word; then
1625 ac_cv_prog_RANLIB="$ac_prog"
1626 break
1627 fi
1628 done
1629 IFS="$ac_save_ifs"
1630fi
1631fi
1632RANLIB="$ac_cv_prog_RANLIB"
1633if test -n "$RANLIB"; then
1634 echo "$ac_t""$RANLIB" 1>&6
1635else
1636 echo "$ac_t""no" 1>&6
1637fi
1638
1639test -n "$RANLIB" && break
1640done
1641test -n "$RANLIB" || RANLIB="echo"
1642
1643 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1644do
1645# Extract the first word of "$ac_prog", so it can be a program name with args.
1646set dummy $ac_prog; ac_word=$2
1647echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1648echo "configure:1649: checking for $ac_word" >&5
1649if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1650 echo $ac_n "(cached) $ac_c" 1>&6
1651else
1652 if test -n "$AR"; then
1653 ac_cv_prog_AR="$AR" # Let the user override the test.
1654else
1655 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1656 ac_dummy="$PATH"
1657 for ac_dir in $ac_dummy; do
1658 test -z "$ac_dir" && ac_dir=.
1659 if test -f $ac_dir/$ac_word; then
1660 ac_cv_prog_AR="$ac_prog"
1661 break
1662 fi
1663 done
1664 IFS="$ac_save_ifs"
1665fi
1666fi
1667AR="$ac_cv_prog_AR"
1668if test -n "$AR"; then
1669 echo "$ac_t""$AR" 1>&6
1670else
1671 echo "$ac_t""no" 1>&6
1672fi
1673
1674test -n "$AR" && break
1675done
1676test -n "$AR" || AR="echo"
1677
1678 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1679do
1680# Extract the first word of "$ac_prog", so it can be a program name with args.
1681set dummy $ac_prog; ac_word=$2
1682echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1683echo "configure:1684: checking for $ac_word" >&5
1684if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1685 echo $ac_n "(cached) $ac_c" 1>&6
1686else
1687 if test -n "$AS"; then
1688 ac_cv_prog_AS="$AS" # Let the user override the test.
1689else
1690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1691 ac_dummy="$PATH"
1692 for ac_dir in $ac_dummy; do
1693 test -z "$ac_dir" && ac_dir=.
1694 if test -f $ac_dir/$ac_word; then
1695 ac_cv_prog_AS="$ac_prog"
1696 break
1697 fi
1698 done
1699 IFS="$ac_save_ifs"
1700fi
1701fi
1702AS="$ac_cv_prog_AS"
1703if test -n "$AS"; then
1704 echo "$ac_t""$AS" 1>&6
1705else
1706 echo "$ac_t""no" 1>&6
1707fi
1708
1709test -n "$AS" && break
1710done
1711test -n "$AS" || AS="echo"
1712
1713 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
1714do
1715# Extract the first word of "$ac_prog", so it can be a program name with args.
1716set dummy $ac_prog; ac_word=$2
1717echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1718echo "configure:1719: checking for $ac_word" >&5
1719if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
1721else
1722 if test -n "$LD"; then
1723 ac_cv_prog_LD="$LD" # Let the user override the test.
1724else
1725 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1726 ac_dummy="$PATH"
1727 for ac_dir in $ac_dummy; do
1728 test -z "$ac_dir" && ac_dir=.
1729 if test -f $ac_dir/$ac_word; then
1730 ac_cv_prog_LD="$ac_prog"
1731 break
1732 fi
1733 done
1734 IFS="$ac_save_ifs"
1735fi
1736fi
1737LD="$ac_cv_prog_LD"
1738if test -n "$LD"; then
1739 echo "$ac_t""$LD" 1>&6
1740else
1741 echo "$ac_t""no" 1>&6
1742fi
1743
1744test -n "$LD" && break
1745done
1746test -n "$LD" || LD="echo"
1747
1748 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
1749do
1750# Extract the first word of "$ac_prog", so it can be a program name with args.
1751set dummy $ac_prog; ac_word=$2
1752echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1753echo "configure:1754: checking for $ac_word" >&5
1754if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1755 echo $ac_n "(cached) $ac_c" 1>&6
1756else
1757 if test -n "$STRIP"; then
1758 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1759else
1760 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1761 ac_dummy="$PATH"
1762 for ac_dir in $ac_dummy; do
1763 test -z "$ac_dir" && ac_dir=.
1764 if test -f $ac_dir/$ac_word; then
1765 ac_cv_prog_STRIP="$ac_prog"
1766 break
1767 fi
1768 done
1769 IFS="$ac_save_ifs"
1770fi
1771fi
1772STRIP="$ac_cv_prog_STRIP"
1773if test -n "$STRIP"; then
1774 echo "$ac_t""$STRIP" 1>&6
1775else
1776 echo "$ac_t""no" 1>&6
1777fi
1778
1779test -n "$STRIP" && break
1780done
1781test -n "$STRIP" || STRIP="echo"
1782
1783 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
1784do
1785# Extract the first word of "$ac_prog", so it can be a program name with args.
1786set dummy $ac_prog; ac_word=$2
1787echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1788echo "configure:1789: checking for $ac_word" >&5
1789if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
1790 echo $ac_n "(cached) $ac_c" 1>&6
1791else
1792 if test -n "$WINDRES"; then
1793 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
1794else
1795 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1796 ac_dummy="$PATH"
1797 for ac_dir in $ac_dummy; do
1798 test -z "$ac_dir" && ac_dir=.
1799 if test -f $ac_dir/$ac_word; then
1800 ac_cv_prog_WINDRES="$ac_prog"
1801 break
1802 fi
1803 done
1804 IFS="$ac_save_ifs"
1805fi
1806fi
1807WINDRES="$ac_cv_prog_WINDRES"
1808if test -n "$WINDRES"; then
1809 echo "$ac_t""$WINDRES" 1>&6
1810else
1811 echo "$ac_t""no" 1>&6
1812fi
1813
1814test -n "$WINDRES" && break
1815done
1816test -n "$WINDRES" || WINDRES="echo"
1817
1818
1819else
1820 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1821do
1822# Extract the first word of "$ac_prog", so it can be a program name with args.
1823set dummy $ac_prog; ac_word=$2
1824echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1825echo "configure:1826: checking for $ac_word" >&5
1826if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1827 echo $ac_n "(cached) $ac_c" 1>&6
1828else
1829 if test -n "$CXX"; then
1830 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1831else
1832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1833 ac_dummy="$PATH"
1834 for ac_dir in $ac_dummy; do
1835 test -z "$ac_dir" && ac_dir=.
1836 if test -f $ac_dir/$ac_word; then
1837 ac_cv_prog_CXX="$ac_prog"
1838 break
1839 fi
1840 done
1841 IFS="$ac_save_ifs"
1842fi
1843fi
1844CXX="$ac_cv_prog_CXX"
1845if test -n "$CXX"; then
1846 echo "$ac_t""$CXX" 1>&6
1847else
1848 echo "$ac_t""no" 1>&6
1849fi
1850
1851test -n "$CXX" && break
1852done
1853test -n "$CXX" || CXX="gcc"
1854
1855
1856echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1857echo "configure:1858: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1858
1859ac_ext=C
1860# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1861ac_cpp='$CXXCPP $CPPFLAGS'
1862ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1863ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1864cross_compiling=$ac_cv_prog_cxx_cross
1865
1866cat > conftest.$ac_ext << EOF
1867
1868#line 1869 "configure"
1869#include "confdefs.h"
1870
1871int main(){return(0);}
1872EOF
1873if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1874 ac_cv_prog_cxx_works=yes
1875 # If we can't run a trivial program, we are probably using a cross compiler.
1876 if (./conftest; exit) 2>/dev/null; then
1877 ac_cv_prog_cxx_cross=no
1878 else
1879 ac_cv_prog_cxx_cross=yes
1880 fi
1881else
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 ac_cv_prog_cxx_works=no
1885fi
1886rm -fr conftest*
1887ac_ext=c
1888# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1889ac_cpp='$CPP $CPPFLAGS'
1890ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1891ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1892cross_compiling=$ac_cv_prog_cc_cross
1893
1894echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1895if test $ac_cv_prog_cxx_works = no; then
1896 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1897fi
1898echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1899echo "configure:1900: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1900echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1901cross_compiling=$ac_cv_prog_cxx_cross
1902
1903echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1904echo "configure:1905: checking whether we are using GNU C++" >&5
1905if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1907else
1908 cat > conftest.C <<EOF
1909#ifdef __GNUC__
1910 yes;
1911#endif
1912EOF
1913if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1914 ac_cv_prog_gxx=yes
1915else
1916 ac_cv_prog_gxx=no
1917fi
1918fi
1919
1920echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1921
1922if test $ac_cv_prog_gxx = yes; then
1923 GXX=yes
1924else
1925 GXX=
1926fi
1927
1928ac_test_CXXFLAGS="${CXXFLAGS+set}"
1929ac_save_CXXFLAGS="$CXXFLAGS"
1930CXXFLAGS=
1931echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1932echo "configure:1933: checking whether ${CXX-g++} accepts -g" >&5
1933if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1935else
1936 echo 'void f(){}' > conftest.cc
1937if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1938 ac_cv_prog_cxx_g=yes
1939else
1940 ac_cv_prog_cxx_g=no
1941fi
1942rm -f conftest*
1943
1944fi
1945
1946echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1947if test "$ac_test_CXXFLAGS" = set; then
1948 CXXFLAGS="$ac_save_CXXFLAGS"
1949elif test $ac_cv_prog_cxx_g = yes; then
1950 if test "$GXX" = yes; then
1951 CXXFLAGS="-g -O2"
1952 else
1953 CXXFLAGS="-g"
1954 fi
1955else
1956 if test "$GXX" = yes; then
1957 CXXFLAGS="-O2"
1958 else
1959 CXXFLAGS=
1960 fi
1961fi
1962
1963 if test "$CXX" = "cl" -a -z "$CC"; then
1964 CC=$CXX
1965 else
1966 # Extract the first word of "gcc", so it can be a program name with args.
1967set dummy gcc; ac_word=$2
1968echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1969echo "configure:1970: checking for $ac_word" >&5
1970if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1971 echo $ac_n "(cached) $ac_c" 1>&6
1972else
1973 if test -n "$CC"; then
1974 ac_cv_prog_CC="$CC" # Let the user override the test.
1975else
1976 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1977 ac_dummy="$PATH"
1978 for ac_dir in $ac_dummy; do
1979 test -z "$ac_dir" && ac_dir=.
1980 if test -f $ac_dir/$ac_word; then
1981 ac_cv_prog_CC="gcc"
1982 break
1983 fi
1984 done
1985 IFS="$ac_save_ifs"
1986fi
1987fi
1988CC="$ac_cv_prog_CC"
1989if test -n "$CC"; then
1990 echo "$ac_t""$CC" 1>&6
1991else
1992 echo "$ac_t""no" 1>&6
1993fi
1994
1995if test -z "$CC"; then
1996 # Extract the first word of "cc", so it can be a program name with args.
1997set dummy cc; ac_word=$2
1998echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1999echo "configure:2000: checking for $ac_word" >&5
2000if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002else
2003 if test -n "$CC"; then
2004 ac_cv_prog_CC="$CC" # Let the user override the test.
2005else
2006 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2007 ac_prog_rejected=no
2008 ac_dummy="$PATH"
2009 for ac_dir in $ac_dummy; do
2010 test -z "$ac_dir" && ac_dir=.
2011 if test -f $ac_dir/$ac_word; then
2012 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2013 ac_prog_rejected=yes
2014 continue
2015 fi
2016 ac_cv_prog_CC="cc"
2017 break
2018 fi
2019 done
2020 IFS="$ac_save_ifs"
2021if test $ac_prog_rejected = yes; then
2022 # We found a bogon in the path, so make sure we never use it.
2023 set dummy $ac_cv_prog_CC
2024 shift
2025 if test $# -gt 0; then
2026 # We chose a different compiler from the bogus one.
2027 # However, it has the same basename, so the bogon will be chosen
2028 # first if we set CC to just the basename; use the full file name.
2029 shift
2030 set dummy "$ac_dir/$ac_word" "$@"
2031 shift
2032 ac_cv_prog_CC="$@"
2033 fi
2034fi
2035fi
2036fi
2037CC="$ac_cv_prog_CC"
2038if test -n "$CC"; then
2039 echo "$ac_t""$CC" 1>&6
2040else
2041 echo "$ac_t""no" 1>&6
2042fi
2043
2044 if test -z "$CC"; then
2045 case "`uname -s`" in
2046 *win32* | *WIN32*)
2047 # Extract the first word of "cl", so it can be a program name with args.
2048set dummy cl; ac_word=$2
2049echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2050echo "configure:2051: checking for $ac_word" >&5
2051if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2052 echo $ac_n "(cached) $ac_c" 1>&6
2053else
2054 if test -n "$CC"; then
2055 ac_cv_prog_CC="$CC" # Let the user override the test.
2056else
2057 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2058 ac_dummy="$PATH"
2059 for ac_dir in $ac_dummy; do
2060 test -z "$ac_dir" && ac_dir=.
2061 if test -f $ac_dir/$ac_word; then
2062 ac_cv_prog_CC="cl"
2063 break
2064 fi
2065 done
2066 IFS="$ac_save_ifs"
2067fi
2068fi
2069CC="$ac_cv_prog_CC"
2070if test -n "$CC"; then
2071 echo "$ac_t""$CC" 1>&6
2072else
2073 echo "$ac_t""no" 1>&6
2074fi
2075 ;;
2076 esac
2077 fi
2078 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2079fi
2080
2081echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2082echo "configure:2083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2083
2084ac_ext=c
2085# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2086ac_cpp='$CPP $CPPFLAGS'
2087ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2088ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2089cross_compiling=$ac_cv_prog_cc_cross
2090
2091cat > conftest.$ac_ext << EOF
2092
2093#line 2094 "configure"
2094#include "confdefs.h"
2095
2096main(){return(0);}
2097EOF
2098if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2099 ac_cv_prog_cc_works=yes
2100 # If we can't run a trivial program, we are probably using a cross compiler.
2101 if (./conftest; exit) 2>/dev/null; then
2102 ac_cv_prog_cc_cross=no
2103 else
2104 ac_cv_prog_cc_cross=yes
2105 fi
2106else
2107 echo "configure: failed program was:" >&5
2108 cat conftest.$ac_ext >&5
2109 ac_cv_prog_cc_works=no
2110fi
2111rm -fr conftest*
2112ac_ext=c
2113# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2114ac_cpp='$CPP $CPPFLAGS'
2115ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2116ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2117cross_compiling=$ac_cv_prog_cc_cross
2118
2119echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2120if test $ac_cv_prog_cc_works = no; then
2121 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2122fi
2123echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2124echo "configure:2125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2125echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2126cross_compiling=$ac_cv_prog_cc_cross
2127
2128echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2129echo "configure:2130: checking whether we are using GNU C" >&5
2130if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2131 echo $ac_n "(cached) $ac_c" 1>&6
2132else
2133 cat > conftest.c <<EOF
2134#ifdef __GNUC__
2135 yes;
2136#endif
2137EOF
2138if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2139 ac_cv_prog_gcc=yes
2140else
2141 ac_cv_prog_gcc=no
2142fi
2143fi
2144
2145echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2146
2147if test $ac_cv_prog_gcc = yes; then
2148 GCC=yes
2149else
2150 GCC=
2151fi
2152
2153ac_test_CFLAGS="${CFLAGS+set}"
2154ac_save_CFLAGS="$CFLAGS"
2155CFLAGS=
2156echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2157echo "configure:2158: checking whether ${CC-cc} accepts -g" >&5
2158if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2159 echo $ac_n "(cached) $ac_c" 1>&6
2160else
2161 echo 'void f(){}' > conftest.c
2162if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2163 ac_cv_prog_cc_g=yes
2164else
2165 ac_cv_prog_cc_g=no
2166fi
2167rm -f conftest*
2168
2169fi
2170
2171echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2172if test "$ac_test_CFLAGS" = set; then
2173 CFLAGS="$ac_save_CFLAGS"
2174elif test $ac_cv_prog_cc_g = yes; then
2175 if test "$GCC" = yes; then
2176 CFLAGS="-g -O2"
2177 else
2178 CFLAGS="-g"
2179 fi
2180else
2181 if test "$GCC" = yes; then
2182 CFLAGS="-O2"
2183 else
2184 CFLAGS=
2185 fi
2186fi
2187
2188 fi
2189 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2190echo "configure:2191: checking how to run the C preprocessor" >&5
2191# On Suns, sometimes $CPP names a directory.
2192if test -n "$CPP" && test -d "$CPP"; then
2193 CPP=
2194fi
2195if test -z "$CPP"; then
2196if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2197 echo $ac_n "(cached) $ac_c" 1>&6
2198else
2199 # This must be in double quotes, not single quotes, because CPP may get
2200 # substituted into the Makefile and "${CC-cc}" will confuse make.
2201 CPP="${CC-cc} -E"
2202 # On the NeXT, cc -E runs the code through the compiler's parser,
2203 # not just through cpp.
2204 cat > conftest.$ac_ext <<EOF
2205#line 2206 "configure"
2206#include "confdefs.h"
2207#include <assert.h>
2208Syntax Error
2209EOF
2210ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2211{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2212ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2213if test -z "$ac_err"; then
2214 :
2215else
2216 echo "$ac_err" >&5
2217 echo "configure: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
2219 rm -rf conftest*
2220 CPP="${CC-cc} -E -traditional-cpp"
2221 cat > conftest.$ac_ext <<EOF
2222#line 2223 "configure"
2223#include "confdefs.h"
2224#include <assert.h>
2225Syntax Error
2226EOF
2227ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2228{ (eval echo configure:2229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2229ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2230if test -z "$ac_err"; then
2231 :
2232else
2233 echo "$ac_err" >&5
2234 echo "configure: failed program was:" >&5
2235 cat conftest.$ac_ext >&5
2236 rm -rf conftest*
2237 CPP="${CC-cc} -nologo -E"
2238 cat > conftest.$ac_ext <<EOF
2239#line 2240 "configure"
2240#include "confdefs.h"
2241#include <assert.h>
2242Syntax Error
2243EOF
2244ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2245{ (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2246ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2247if test -z "$ac_err"; then
2248 :
2249else
2250 echo "$ac_err" >&5
2251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2253 rm -rf conftest*
2254 CPP=/lib/cpp
2255fi
2256rm -f conftest*
2257fi
2258rm -f conftest*
2259fi
2260rm -f conftest*
2261 ac_cv_prog_CPP="$CPP"
2262fi
2263 CPP="$ac_cv_prog_CPP"
2264else
2265 ac_cv_prog_CPP="$CPP"
2266fi
2267echo "$ac_t""$CPP" 1>&6
2268
2269 # Extract the first word of "ranlib", so it can be a program name with args.
2270set dummy ranlib; ac_word=$2
2271echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2272echo "configure:2273: checking for $ac_word" >&5
2273if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2274 echo $ac_n "(cached) $ac_c" 1>&6
2275else
2276 if test -n "$RANLIB"; then
2277 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2278else
2279 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2280 ac_dummy="$PATH"
2281 for ac_dir in $ac_dummy; do
2282 test -z "$ac_dir" && ac_dir=.
2283 if test -f $ac_dir/$ac_word; then
2284 ac_cv_prog_RANLIB="ranlib"
2285 break
2286 fi
2287 done
2288 IFS="$ac_save_ifs"
2289 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2290fi
2291fi
2292RANLIB="$ac_cv_prog_RANLIB"
2293if test -n "$RANLIB"; then
2294 echo "$ac_t""$RANLIB" 1>&6
2295else
2296 echo "$ac_t""no" 1>&6
2297fi
2298
2299 for ac_prog in as
2300do
2301# Extract the first word of "$ac_prog", so it can be a program name with args.
2302set dummy $ac_prog; ac_word=$2
2303echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2304echo "configure:2305: checking for $ac_word" >&5
2305if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2306 echo $ac_n "(cached) $ac_c" 1>&6
2307else
2308 case "$AS" in
2309 /*)
2310 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2311 ;;
2312 ?:/*)
2313 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2314 ;;
2315 *)
2316 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2317 ac_dummy="$PATH"
2318 for ac_dir in $ac_dummy; do
2319 test -z "$ac_dir" && ac_dir=.
2320 if test -f $ac_dir/$ac_word; then
2321 ac_cv_path_AS="$ac_dir/$ac_word"
2322 break
2323 fi
2324 done
2325 IFS="$ac_save_ifs"
2326 ;;
2327esac
2328fi
2329AS="$ac_cv_path_AS"
2330if test -n "$AS"; then
2331 echo "$ac_t""$AS" 1>&6
2332else
2333 echo "$ac_t""no" 1>&6
2334fi
2335
2336test -n "$AS" && break
2337done
2338test -n "$AS" || AS="$CC"
2339
2340 for ac_prog in ar
2341do
2342# Extract the first word of "$ac_prog", so it can be a program name with args.
2343set dummy $ac_prog; ac_word=$2
2344echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2345echo "configure:2346: checking for $ac_word" >&5
2346if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349 case "$AR" in
2350 /*)
2351 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2352 ;;
2353 ?:/*)
2354 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2355 ;;
2356 *)
2357 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2358 ac_dummy="$PATH"
2359 for ac_dir in $ac_dummy; do
2360 test -z "$ac_dir" && ac_dir=.
2361 if test -f $ac_dir/$ac_word; then
2362 ac_cv_path_AR="$ac_dir/$ac_word"
2363 break
2364 fi
2365 done
2366 IFS="$ac_save_ifs"
2367 ;;
2368esac
2369fi
2370AR="$ac_cv_path_AR"
2371if test -n "$AR"; then
2372 echo "$ac_t""$AR" 1>&6
2373else
2374 echo "$ac_t""no" 1>&6
2375fi
2376
2377test -n "$AR" && break
2378done
2379test -n "$AR" || AR="echo not_ar"
2380
2381 for ac_prog in ld link
2382do
2383# Extract the first word of "$ac_prog", so it can be a program name with args.
2384set dummy $ac_prog; ac_word=$2
2385echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2386echo "configure:2387: checking for $ac_word" >&5
2387if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2388 echo $ac_n "(cached) $ac_c" 1>&6
2389else
2390 case "$LD" in
2391 /*)
2392 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2393 ;;
2394 ?:/*)
2395 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2396 ;;
2397 *)
2398 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2399 ac_dummy="$PATH"
2400 for ac_dir in $ac_dummy; do
2401 test -z "$ac_dir" && ac_dir=.
2402 if test -f $ac_dir/$ac_word; then
2403 ac_cv_path_LD="$ac_dir/$ac_word"
2404 break
2405 fi
2406 done
2407 IFS="$ac_save_ifs"
2408 ;;
2409esac
2410fi
2411LD="$ac_cv_path_LD"
2412if test -n "$LD"; then
2413 echo "$ac_t""$LD" 1>&6
2414else
2415 echo "$ac_t""no" 1>&6
2416fi
2417
2418test -n "$LD" && break
2419done
2420test -n "$LD" || LD="echo not_ld"
2421
2422 for ac_prog in strip
2423do
2424# Extract the first word of "$ac_prog", so it can be a program name with args.
2425set dummy $ac_prog; ac_word=$2
2426echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2427echo "configure:2428: checking for $ac_word" >&5
2428if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2429 echo $ac_n "(cached) $ac_c" 1>&6
2430else
2431 case "$STRIP" in
2432 /*)
2433 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2434 ;;
2435 ?:/*)
2436 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2437 ;;
2438 *)
2439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2440 ac_dummy="$PATH"
2441 for ac_dir in $ac_dummy; do
2442 test -z "$ac_dir" && ac_dir=.
2443 if test -f $ac_dir/$ac_word; then
2444 ac_cv_path_STRIP="$ac_dir/$ac_word"
2445 break
2446 fi
2447 done
2448 IFS="$ac_save_ifs"
2449 ;;
2450esac
2451fi
2452STRIP="$ac_cv_path_STRIP"
2453if test -n "$STRIP"; then
2454 echo "$ac_t""$STRIP" 1>&6
2455else
2456 echo "$ac_t""no" 1>&6
2457fi
2458
2459test -n "$STRIP" && break
2460done
2461test -n "$STRIP" || STRIP="echo not_strip"
2462
2463 for ac_prog in windres
2464do
2465# Extract the first word of "$ac_prog", so it can be a program name with args.
2466set dummy $ac_prog; ac_word=$2
2467echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2468echo "configure:2469: checking for $ac_word" >&5
2469if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2471else
2472 case "$WINDRES" in
2473 /*)
2474 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2475 ;;
2476 ?:/*)
2477 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2478 ;;
2479 *)
2480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2481 ac_dummy="$PATH"
2482 for ac_dir in $ac_dummy; do
2483 test -z "$ac_dir" && ac_dir=.
2484 if test -f $ac_dir/$ac_word; then
2485 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2486 break
2487 fi
2488 done
2489 IFS="$ac_save_ifs"
2490 ;;
2491esac
2492fi
2493WINDRES="$ac_cv_path_WINDRES"
2494if test -n "$WINDRES"; then
2495 echo "$ac_t""$WINDRES" 1>&6
2496else
2497 echo "$ac_t""no" 1>&6
2498fi
2499
2500test -n "$WINDRES" && break
2501done
2502test -n "$WINDRES" || WINDRES="echo not_windres"
2503
2504 if test -z "$HOST_CC"; then
2505 HOST_CC="$CC"
2506 fi
2507 if test -z "$HOST_CFLAGS"; then
2508 HOST_CFLAGS="$CFLAGS"
2509 fi
2510fi
2511
2512if test "$GCC" = "yes"; then
2513 GNU_CC=1
2514fi
2515if test "$GXX" = "yes"; then
2516 GNU_CXX=1
2517fi
2518if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2519 GNU_AS=1
2520fi
2521rm -f a.out
2522
2523if test "$cross_compiling" = "yes"; then
2524 CROSS_COMPILE=1
2525else
2526 CROSS_COMPILE=
2527fi
2528
2529echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2530echo "configure:2531: checking for gcc -pipe support" >&5
2531if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2532 echo '#include <stdio.h>' > dummy-hello.c
2533 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2534 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2535 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2536 if test $? = 0; then
2537 _res_as_stdin="yes"
2538 else
2539 _res_as_stdin="no"
2540 fi
2541 if test "$_res_as_stdin" = "yes"; then
2542 _SAVE_CFLAGS=$CFLAGS
2543 CFLAGS="$CFLAGS -pipe"
2544 cat > conftest.$ac_ext <<EOF
2545#line 2546 "configure"
2546#include "confdefs.h"
2547 #include <stdio.h>
2548int main() {
2549printf("Hello World\n");
2550; return 0; }
2551EOF
2552if { (eval echo configure:2553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2553 rm -rf conftest*
2554 _res_gcc_pipe="yes"
2555else
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -rf conftest*
2559 _res_gcc_pipe="no"
2560fi
2561rm -f conftest*
2562 CFLAGS=$_SAVE_CFLAGS
2563 fi
2564 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2565 _res="yes";
2566 CFLAGS="$CFLAGS -pipe"
2567 CXXFLAGS="$CXXFLAGS -pipe"
2568 else
2569 _res="no"
2570 fi
2571 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2572 echo "$ac_t""$_res" 1>&6
2573else
2574 echo "$ac_t""no" 1>&6
2575fi
2576
2577fi # SKIP_COMPILER_CHECKS
2578
2579if test -z "$SKIP_PATH_CHECKS"; then
2580 for ac_prog in perl5 perl
2581do
2582# Extract the first word of "$ac_prog", so it can be a program name with args.
2583set dummy $ac_prog; ac_word=$2
2584echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2585echo "configure:2586: checking for $ac_word" >&5
2586if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2587 echo $ac_n "(cached) $ac_c" 1>&6
2588else
2589 case "$PERL" in
2590 /*)
2591 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2592 ;;
2593 ?:/*)
2594 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2595 ;;
2596 *)
2597 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2598 ac_dummy="$PATH"
2599 for ac_dir in $ac_dummy; do
2600 test -z "$ac_dir" && ac_dir=.
2601 if test -f $ac_dir/$ac_word; then
2602 ac_cv_path_PERL="$ac_dir/$ac_word"
2603 break
2604 fi
2605 done
2606 IFS="$ac_save_ifs"
2607 ;;
2608esac
2609fi
2610PERL="$ac_cv_path_PERL"
2611if test -n "$PERL"; then
2612 echo "$ac_t""$PERL" 1>&6
2613else
2614 echo "$ac_t""no" 1>&6
2615fi
2616
2617test -n "$PERL" && break
2618done
2619test -n "$PERL" || PERL="echo not_perl"
2620
2621elif test -z "$PERL"; then
2622 PERL=perl
2623fi
2624
2625OBJ_SUFFIX=o
2626LIB_SUFFIX=a
2627DLL_SUFFIX=so
2628ASM_SUFFIX=s
2629MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
2630PR_MD_ASFILES=
2631PR_MD_CSRCS=
2632PR_MD_ARCH_DIR=unix
2633AR_FLAGS='cr $@'
2634AS='$(CC)'
2635ASFLAGS='$(CFLAGS)'
2636
2637if test -n "$CROSS_COMPILE"; then
2638 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2639 OS_RELEASE=
2640 OS_TEST="${target_cpu}"
2641 case "${target_os}" in
2642 linux*) OS_ARCH=Linux ;;
2643 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2644 mingw*) OS_ARCH=WINNT ;;
2645 esac
2646else
2647 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2648 OS_RELEASE=`uname -r`
2649 OS_TEST=`uname -m`
2650fi
2651
2652if test "$OS_ARCH" = "IRIX64"; then
2653 OS_ARCH=IRIX
2654fi
2655
2656if test "$OS_ARCH" = "AIX"; then
2657 OS_RELEASE=`uname -v`.`uname -r`
2658fi
2659
2660if test "$OS_ARCH" = "FreeBSD"; then
2661 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2662fi
2663
2664if test "$OS_ARCH" = "Linux"; then
2665 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2666 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
2667fi
2668
2669if test "$OS_ARCH" = "OpenVMS"; then
2670 OS_RELEASE=`uname -v`
2671fi
2672
2673#######################################################################
2674# Master "Core Components" macros for getting the OS target #
2675#######################################################################
2676
2677#
2678# Note: OS_TARGET should be specified on the command line for gmake.
2679# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
2680# The difference between the Win95 target and the WinNT target is that
2681# the WinNT target uses Windows NT specific features not available
2682# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
2683# at lesser performance (the Win95 target uses threads; the WinNT target
2684# uses fibers).
2685#
2686# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
2687# is built. See: win16_3.11.mk for lots more about the Win16 target.
2688#
2689# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
2690# cross-compilation.
2691#
2692
2693#
2694# The following hack allows one to build on a WIN95 machine (as if
2695# s/he were cross-compiling on a WINNT host for a WIN95 target).
2696# It also accomodates for MKS's uname.exe. If you never intend
2697# to do development on a WIN95 machine, you don't need this hack.
2698#
2699if test "$OS_ARCH" = "WIN95"; then
2700 OS_ARCH=WINNT
2701 OS_TARGET=WIN95
2702elif test "$OS_ARCH" = 'Windows_95'; then
2703 OS_ARCH=Windows_NT
2704 OS_TARGET=WIN95
2705elif test "$OS_ARCH" = 'Windows_98'; then
2706 OS_ARCH=Windows_NT
2707 OS_TARGET=WIN95
2708elif test "`echo $OS_ARCH | egrep -c '^(CYGWIN_9|CYGWIN_ME)' 2>/dev/null`" != 0; then
2709 OS_ARCH='CYGWIN_NT-4.0'
2710 OS_TARGET=WIN95
2711elif test "$OS_ARCH" = "OS_2"; then
2712 OS_ARCH=OS2
2713 OS_TARGET=OS2
2714fi
2715
2716#
2717# On WIN32, we also define the variable CPU_ARCH.
2718#
2719
2720if test "$OS_ARCH" = "WINNT"; then
2721 CPU_ARCH=`uname -p`
2722 if test "$CPU_ARCH" = "I386"; then
2723 CPU_ARCH=x86
2724 fi
2725elif test "$OS_ARCH" = "Windows_NT"; then
2726#
2727# If uname -s returns "Windows_NT", we assume that we are using
2728# the uname.exe in MKS toolkit.
2729#
2730# The -r option of MKS uname only returns the major version number.
2731# So we need to use its -v option to get the minor version number.
2732# Moreover, it doesn't have the -p option, so we need to use uname -m.
2733#
2734 OS_ARCH=WINNT
2735 OS_MINOR_RELEASE=`uname -v`
2736 if test "$OS_MINOR_RELEASE" = "00"; then
2737 OS_MINOR_RELEASE=0
2738 fi
2739 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
2740 CPU_ARCH=`uname -m`
2741 #
2742 # MKS's uname -m returns "586" on a Pentium machine.
2743 #
2744 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2745 CPU_ARCH=x86
2746 fi
2747elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
2748#
2749# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
2750# the uname.exe in the Cygwin tools.
2751#
2752 OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
2753 OS_ARCH=WINNT
2754 CPU_ARCH=`uname -m`
2755 #
2756 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
2757 #
2758 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2759 CPU_ARCH=x86
2760 fi
2761elif test "$OS_ARCH" = "CYGWIN32_NT"; then
2762#
2763# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
2764# If uname -s returns "CYGWIN32/NT", we assume that we are using
2765# the uname.exe in the GNU-Win32 tools.
2766#
2767 OS_ARCH=WINNT
2768 CPU_ARCH=`uname -m`
2769 #
2770 # GNU-Win32's uname -m returns "i686" on a Pentium Pro machine.
2771 #
2772 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
2773 CPU_ARCH=x86
2774 fi
2775fi
2776
2777if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
2778 OS_TARGET=WIN95
2779 if test -n "$MOZ_DEBUG"; then
2780 USE_DEBUG_RTL=1
2781 fi
2782fi
2783if test -z "$OS_TARGET"; then
2784 OS_TARGET=$OS_ARCH
2785fi
2786if test "$OS_TARGET" = "WIN95"; then
2787 OS_RELEASE="4.0"
2788fi
2789if test "$OS_TARGET" = "WIN16"; then
2790 OS_RELEASE=
2791fi
2792OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
2793
2794
2795case "$host" in
2796*-mingw*|*-cygwin*|*-msvc*|*-mks*)
2797 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
2798 if test `echo "${PATH}" | grep -c \;` = 0; then
2799 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
2800 fi
2801 ;;
2802*-beos*)
2803 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
2804 ;;
2805*os2*)
2806 ;;
2807*)
2808 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
2809 ;;
2810esac
2811
2812case "$target" in
2813
2814*-aix*)
2815 cat >> confdefs.h <<\EOF
2816#define XP_UNIX 1
2817EOF
2818
2819 cat >> confdefs.h <<\EOF
2820#define AIX 1
2821EOF
2822
2823 cat >> confdefs.h <<\EOF
2824#define SYSV 1
2825EOF
2826
2827 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
2828 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
2829echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
2830echo "configure:2831: checking for sys/atomic_op.h" >&5
2831if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2832 echo $ac_n "(cached) $ac_c" 1>&6
2833else
2834 cat > conftest.$ac_ext <<EOF
2835#line 2836 "configure"
2836#include "confdefs.h"
2837#include <sys/atomic_op.h>
2838EOF
2839ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2840{ (eval echo configure:2841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2841ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2842if test -z "$ac_err"; then
2843 rm -rf conftest*
2844 eval "ac_cv_header_$ac_safe=yes"
2845else
2846 echo "$ac_err" >&5
2847 echo "configure: failed program was:" >&5
2848 cat conftest.$ac_ext >&5
2849 rm -rf conftest*
2850 eval "ac_cv_header_$ac_safe=no"
2851fi
2852rm -f conftest*
2853fi
2854if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2855 echo "$ac_t""yes" 1>&6
2856 cat >> confdefs.h <<\EOF
2857#define AIX_HAVE_ATOMIC_OP_H 1
2858EOF
2859
2860else
2861 echo "$ac_t""no" 1>&6
2862fi
2863
2864 case "${target_os}" in
2865 aix3.2*)
2866 cat >> confdefs.h <<\EOF
2867#define AIX_RENAME_SELECT 1
2868EOF
2869
2870 cat >> confdefs.h <<\EOF
2871#define _PR_NO_LARGE_FILES 1
2872EOF
2873
2874 AIX_LINK_OPTS='-bnso -berok'
2875 PR_MD_ASFILES=os_AIX.s
2876 ;;
2877 aix4.1*)
2878 cat >> confdefs.h <<\EOF
2879#define AIX_TIMERS 1
2880EOF
2881
2882 cat >> confdefs.h <<\EOF
2883#define _PR_NO_LARGE_FILES 1
2884EOF
2885
2886 cat >> confdefs.h <<\EOF
2887#define AIX4_1 1
2888EOF
2889
2890 MKSHLIB=
2891 DSO_LDOPTS=
2892 AIX_LINK_OPTS='-bnso -berok'
2893 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
2894 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
2895 ;;
2896 aix4.2*)
2897 cat >> confdefs.h <<\EOF
2898#define AIX_TIMERS 1
2899EOF
2900
2901 cat >> confdefs.h <<\EOF
2902#define _PR_HAVE_OFF64_T 1
2903EOF
2904
2905 AIX_LINK_OPTS='-brtl -bnso -berok'
2906 ;;
2907 aix4.3*)
2908 cat >> confdefs.h <<\EOF
2909#define AIX_TIMERS 1
2910EOF
2911
2912 cat >> confdefs.h <<\EOF
2913#define _PR_HAVE_OFF64_T 1
2914EOF
2915
2916 cat >> confdefs.h <<\EOF
2917#define AIX4_3_PLUS 1
2918EOF
2919
2920 cat >> confdefs.h <<\EOF
2921#define HAVE_SOCKLEN_T 1
2922EOF
2923
2924 cat >> confdefs.h <<\EOF
2925#define HAVE_FCNTL_FILE_LOCKING 1
2926EOF
2927
2928 USE_IPV6=1
2929 AIX_LINK_OPTS='-brtl -bnso -berok'
2930 ;;
2931 *)
2932 cat >> confdefs.h <<\EOF
2933#define AIX_TIMERS 1
2934EOF
2935
2936 cat >> confdefs.h <<\EOF
2937#define _PR_HAVE_OFF64_T 1
2938EOF
2939
2940 cat >> confdefs.h <<\EOF
2941#define AIX4_3_PLUS 1
2942EOF
2943
2944 cat >> confdefs.h <<\EOF
2945#define HAVE_SOCKLEN_T 1
2946EOF
2947
2948 cat >> confdefs.h <<\EOF
2949#define HAVE_FCNTL_FILE_LOCKING 1
2950EOF
2951
2952 USE_IPV6=1
2953 AIX_LINK_OPTS='-brtl -bnso -berok'
2954 ;;
2955 esac
2956 CFLAGS="$CFLAGS -qro -qroconst"
2957 AIX_WRAP='$(DIST)/lib/aixwrap.o'
2958 AIX_TMP='./_aix_tmp.o'
2959 if test -n "$USE_64"; then
2960 MDCPUCFG_H=_aix64.cfg
2961 OBJECT_MODE=64
2962 else
2963 MDCPUCFG_H=_aix32.cfg
2964 fi
2965 PR_MD_CSRCS=aix.c
2966 RESOLVE_LINK_SYMBOLS=1
2967 ;;
2968
2969*-beos*)
2970 cat >> confdefs.h <<\EOF
2971#define XP_BEOS 1
2972EOF
2973
2974 cat >> confdefs.h <<\EOF
2975#define BeOS 1
2976EOF
2977
2978 cat >> confdefs.h <<\EOF
2979#define BEOS 1
2980EOF
2981
2982 cat >> confdefs.h <<\EOF
2983#define _POSIX_SOURCE 1
2984EOF
2985
2986 DSO_LDOPTS=-nostart
2987 MDCPUCFG_H=_beos.cfg
2988 USE_BTHREADS=1
2989 PR_MD_ARCH_DIR=beos
2990 RESOLVE_LINK_SYMBOLS=1
2991 case "${target_cpu}" in
2992 i*86)
2993 _OPTIMIZE_FLAGS=-O2
2994 _DEBUG_FLAGS='-gdwarf-2 -O0'
2995 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
2996 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
2997echo "configure:2998: checking for gethostbyaddr in -lbind" >&5
2998ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
2999if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3001else
3002 ac_save_LIBS="$LIBS"
3003LIBS="-lbind $LIBS"
3004cat > conftest.$ac_ext <<EOF
3005#line 3006 "configure"
3006#include "confdefs.h"
3007/* Override any gcc2 internal prototype to avoid an error. */
3008/* We use char because int might match the return type of a gcc2
3009 builtin and then its argument prototype would still apply. */
3010char gethostbyaddr();
3011
3012int main() {
3013gethostbyaddr()
3014; return 0; }
3015EOF
3016if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3017 rm -rf conftest*
3018 eval "ac_cv_lib_$ac_lib_var=yes"
3019else
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3022 rm -rf conftest*
3023 eval "ac_cv_lib_$ac_lib_var=no"
3024fi
3025rm -f conftest*
3026LIBS="$ac_save_LIBS"
3027
3028fi
3029if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3030 echo "$ac_t""yes" 1>&6
3031 OS_LIBS="$OS_LIBS -lbind -lsocket"
3032else
3033 echo "$ac_t""no" 1>&6
3034fi
3035
3036 ;;
3037 powerpc)
3038 CC=mwcc
3039 CCC=mwcc
3040 LD=mwld
3041 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'
3042 _OPTIMIZE_FLAGS=-O2
3043 _DEBUG_FLAGS='-g -O0'
3044 ;;
3045 esac
3046 ;;
3047
3048*-bsdi*)
3049 cat >> confdefs.h <<\EOF
3050#define XP_UNIX 1
3051EOF
3052
3053 cat >> confdefs.h <<\EOF
3054#define BSDI 1
3055EOF
3056
3057 cat >> confdefs.h <<\EOF
3058#define NEED_BSDREGEX 1
3059EOF
3060
3061
3062 CFLAGS="$CFLAGS -Wall -Wno-format"
3063 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3064
3065 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3066 CPU_ARCH=x86
3067 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3068 CPU_ARCH=sparc
3069 fi
3070
3071 MDCPUCFG_H=_bsdi.cfg
3072 PR_MD_CSRCS=bsdi.c
3073
3074 DSO_LDOPTS=-r
3075
3076 case "$target_os" in
3077 bsdi1.1*)
3078 cat >> confdefs.h <<\EOF
3079#define _PR_BSDI_JMPBUF_IS_ARRAY 1
3080EOF
3081
3082 cat >> confdefs.h <<\EOF
3083#define _PR_STAT_HAS_ONLY_ST_ATIME 1
3084EOF
3085
3086 cat >> confdefs.h <<\EOF
3087#define _PR_NEED_H_ERRNO 1
3088EOF
3089
3090 MKSHLIB=
3091 DSO_CFLAGS=
3092 DSO_LDOPTS=
3093 ;;
3094
3095 bsdi2.1*)
3096 cat >> confdefs.h <<\EOF
3097#define _PR_TIMESPEC_HAS_TS_SEC 1
3098EOF
3099
3100 cat >> confdefs.h <<\EOF
3101#define _PR_BSDI_JMPBUF_IS_ARRAY 1
3102EOF
3103
3104 cat >> confdefs.h <<\EOF
3105#define HAVE_DLL 1
3106EOF
3107
3108 cat >> confdefs.h <<\EOF
3109#define USE_DLFCN 1
3110EOF
3111
3112 cat >> confdefs.h <<\EOF
3113#define _PR_STAT_HAS_ST_ATIMESPEC 1
3114EOF
3115
3116 PR_MD_ASFILES=os_BSD_OS_386_2.s
3117 ;;
3118
3119 bsdi4.* | bsdi5.*)
3120 cat >> confdefs.h <<\EOF
3121#define _PR_SELECT_CONST_TIMEVAL 1
3122EOF
3123
3124 cat >> confdefs.h <<\EOF
3125#define _PR_BSDI_JMPBUF_IS_STRUCT 1
3126EOF
3127
3128 cat >> confdefs.h <<\EOF
3129#define HAVE_DLL 1
3130EOF
3131
3132 cat >> confdefs.h <<\EOF
3133#define USE_DLFCN 1
3134EOF
3135
3136 cat >> confdefs.h <<\EOF
3137#define _PR_STAT_HAS_ST_ATIMESPEC 1
3138EOF
3139
3140 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3141 DSO_CFLAGS=-fPIC
3142 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3143 STRIP="$STRIP -d"
3144 case "$target_os" in
3145 bsdi4.2* | bsdi4.3* | bsdi5.*)
3146 cat >> confdefs.h <<\EOF
3147#define _PR_HAVE_GETPROTO_R 1
3148EOF
3149
3150 cat >> confdefs.h <<\EOF
3151#define _PR_HAVE_GETPROTO_R_POINTER 1
3152EOF
3153
3154 ;;
3155 esac
3156 ;;
3157 *)
3158 cat >> confdefs.h <<\EOF
3159#define _PR_SELECT_CONST_TIMEVAL 1
3160EOF
3161
3162 cat >> confdefs.h <<\EOF
3163#define _PR_BSDI_JMPBUF_IS_STRUCT 1
3164EOF
3165
3166 cat >> confdefs.h <<\EOF
3167#define HAVE_DLL 1
3168EOF
3169
3170 cat >> confdefs.h <<\EOF
3171#define USE_DLFCN 1
3172EOF
3173
3174 cat >> confdefs.h <<\EOF
3175#define _PR_STAT_HAS_ST_ATIMESPEC 1
3176EOF
3177
3178 ;;
3179 esac
3180
3181 ;;
3182
3183*-darwin*)
3184 cat >> confdefs.h <<\EOF
3185#define XP_UNIX 1
3186EOF
3187
3188 cat >> confdefs.h <<\EOF
3189#define DARWIN 1
3190EOF
3191
3192 cat >> confdefs.h <<\EOF
3193#define HAVE_BSD_FLOCK 1
3194EOF
3195
3196 CFLAGS="$CFLAGS -Wmost -fno-common"
3197 if echo $OS_TEST | grep -c 86 2>/dev/null; then
3198 cat >> confdefs.h <<\EOF
3199#define i386 1
3200EOF
3201
3202 CPU_ARCH=i386
3203 else
3204 cat >> confdefs.h <<\EOF
3205#define ppc 1
3206EOF
3207
3208 CPU_ARCH=ppc
3209 fi
3210 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3211 # Use the standard preprocessor (cpp)
3212 CFLAGS="$CFLAGS -no-cpp-precomp"
3213 MKSHLIB='$(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS) -o $@'
3214 STRIP="$STRIP -x -S"
3215 DLL_SUFFIX=dylib
3216 USE_PTHREADS=1
3217 MDCPUCFG_H=_darwin.cfg
3218 PR_MD_CSRCS=darwin.c
3219 if test "$CPU_ARCH" = "ppc"; then
3220 PR_MD_ASFILES=os_Darwin_ppc.s
3221 fi
3222
3223 # Add Mac OS X support for loading CFM & CFBundle plugins
3224 if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
3225 cat >> confdefs.h <<\EOF
3226#define XP_MACOSX 1
3227EOF
3228
3229 OS_TARGET=MacOSX
3230
3231
3232 MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1`
3233 MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2`
3234 MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3`
3235 if test -z "$MACOS_VERSION_MINOR"; then
3236 MACOS_VERSION_MINOR=0
3237 fi
3238 if test -z "$MACOS_VERSION_MICRO"; then
3239 MACOS_VERSION_MICRO=0
3240 fi
3241 MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"`
3242 cat >> confdefs.h <<EOF
3243#define MACOS_DEPLOYMENT_TARGET $MACOS_DEPLOYMENT_TARGET
3244EOF
3245
3246 fi
3247
3248 # do the right thing for panther SDK support
3249 if test "$NEXT_ROOT"; then
3250 CFLAGS="-I${NEXT_ROOT}/usr/include $CFLAGS"
3251 CXXFLAGS="-I${NEXT_ROOT}/usr/include $CXXFLAGS"
3252 fi
3253 ;;
3254
3255*-dgux*)
3256 cat >> confdefs.h <<\EOF
3257#define XP_UNIX 1
3258EOF
3259
3260 cat >> confdefs.h <<\EOF
3261#define _PR_LOCAL_THREADS_ONLY 1
3262EOF
3263
3264 cat >> confdefs.h <<\EOF
3265#define SVR4 1
3266EOF
3267
3268 cat >> confdefs.h <<\EOF
3269#define SYSV 1
3270EOF
3271
3272 cat >> confdefs.h <<\EOF
3273#define DGUX 1
3274EOF
3275
3276 cat >> confdefs.h <<\EOF
3277#define _DGUX_SOURCE 1
3278EOF
3279
3280 cat >> confdefs.h <<\EOF
3281#define _POSIX4A_DRAFT6_SOURCE 1
3282EOF
3283
3284 DSO_LDOPTS=-G
3285 _OPTIMIZE_FLAGS=-O2
3286 _DEBUG_FLAGS=
3287 MDCPUCFG_H=_dgux.cfg
3288 PR_MD_CSRCS=dgux.c
3289 ;;
3290
3291*-freebsd*)
3292 if test -z "$USE_NSPR_THREADS"; then
3293 USE_PTHREADS=1
3294 fi
3295 cat >> confdefs.h <<\EOF
3296#define XP_UNIX 1
3297EOF
3298
3299 cat >> confdefs.h <<\EOF
3300#define FREEBSD 1
3301EOF
3302
3303 cat >> confdefs.h <<\EOF
3304#define HAVE_BSD_FLOCK 1
3305EOF
3306
3307 cat >> confdefs.h <<\EOF
3308#define HAVE_SOCKLEN_T 1
3309EOF
3310
3311 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3312 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3313 if test "$MOZ_OBJFORMAT" = "elf"; then
3314 DLL_SUFFIX=so
3315 else
3316 DLL_SUFFIX=so.1.0
3317 fi
3318 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3319 DSO_CFLAGS=-fPIC
3320 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3321 MDCPUCFG_H=_freebsd.cfg
3322 PR_MD_CSRCS=freebsd.c
3323 ;;
3324
3325*-hpux*)
3326 cat >> confdefs.h <<\EOF
3327#define XP_UNIX 1
3328EOF
3329
3330 cat >> confdefs.h <<\EOF
3331#define HPUX 1
3332EOF
3333
3334 cat >> confdefs.h <<\EOF
3335#define _HPUX_SOURCE 1
3336EOF
3337
3338 cat >> confdefs.h <<\EOF
3339#define hppa 1
3340EOF
3341
3342 # OSF1 and HPUX report the POLLHUP event for a socket when the
3343 # shutdown(SHUT_WR) operation is called for the remote end, even though
3344 # the socket is still writeable. Use select(), instead of poll(), to
3345 # workaround this problem.
3346 cat >> confdefs.h <<\EOF
3347#define _PR_POLL_WITH_SELECT 1
3348EOF
3349
3350 cat >> confdefs.h <<\EOF
3351#define _USE_BIG_FDS 1
3352EOF
3353
3354 DLL_SUFFIX=sl
3355 DSO_LDOPTS='-b +h $(notdir $@)'
3356 PR_MD_CSRCS=hpux.c
3357 if test "$OS_TEST" != "ia64"; then
3358 PR_MD_ASFILES=os_HPUX.s
3359 fi
3360 if test -n "$USE_64"; then
3361 MDCPUCFG_H=_hpux64.cfg
3362 else
3363 MDCPUCFG_H=_hpux32.cfg
3364 fi
3365 if test -z "$GNU_CC"; then
3366 CC="$CC -Ae"
3367 CXX="$CXX -ext"
3368 DSO_CFLAGS=+Z
3369 else
3370 DSO_CFLAGS=-fPIC
3371 fi
3372
3373 if test -n "$MOZILLA_CLIENT"; then
3374 DEFAULT_IMPL_STRATEGY=_EMU
3375 fi
3376
3377 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
3378 cat >> confdefs.h <<\EOF
3379#define _PR_NEED_H_ERRNO 1
3380EOF
3381
3382 cat >> confdefs.h <<\EOF
3383#define HPUX9 1
3384EOF
3385
3386 DEFAULT_IMPL_STRATEGY=_EMU
3387 USE_NSPR_THREADS=1
3388 fi
3389
3390 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
3391 cat >> confdefs.h <<\EOF
3392#define _PR_NO_LARGE_FILES 1
3393EOF
3394
3395 fi
3396
3397 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3398 cat >> confdefs.h <<\EOF
3399#define _PR_NEED_H_ERRNO 1
3400EOF
3401
3402 fi
3403
3404 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3405 cat >> confdefs.h <<\EOF
3406#define HAVE_INT_LOCALTIME_R 1
3407EOF
3408
3409 fi
3410
3411 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
3412 cat >> confdefs.h <<\EOF
3413#define HAVE_POINTER_LOCALTIME_R 1
3414EOF
3415
3416 fi
3417
3418 # HP-UX 11i (B.11.11) or higher
3419
3420 case "$OS_RELEASE" in
3421 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
3422 USE_IPV6=1
3423 ;;
3424 esac
3425
3426
3427 if test "$OS_RELEASE" = "B.10.01"; then
3428 cat >> confdefs.h <<\EOF
3429#define HPUX10 1
3430EOF
3431
3432 DEFAULT_IMPL_STRATEGY=_EMU
3433 fi
3434
3435 if test "$OS_RELEASE" = "B.10.10"; then
3436 cat >> confdefs.h <<\EOF
3437#define HPUX10 1
3438EOF
3439
3440 cat >> confdefs.h <<\EOF
3441#define HPUX10_10 1
3442EOF
3443
3444 DEFAULT_IMPL_STRATEGY=_PTH
3445 fi
3446
3447 if test "$OS_RELEASE" = "B.10.20"; then
3448 cat >> confdefs.h <<\EOF
3449#define HPUX10 1
3450EOF
3451
3452 cat >> confdefs.h <<\EOF
3453#define HPUX10_20 1
3454EOF
3455
3456 if test -z "$GNU_CC"; then
3457 CFLAGS="$CFLAGS +DAportable +DS1.1"
3458 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3459 fi
3460 DEFAULT_IMPL_STRATEGY=_PTH
3461 fi
3462
3463 if test "$OS_RELEASE" = "B.10.30"; then
3464 cat >> confdefs.h <<\EOF
3465#define HPUX10 1
3466EOF
3467
3468 cat >> confdefs.h <<\EOF
3469#define HPUX10_30 1
3470EOF
3471
3472 if test -z "$GNU_CC"; then
3473 CFLAGS="$CFLAGS +DAportable +DS1.1"
3474 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3475 fi
3476 DEFAULT_IMPL_STRATEGY=_PTH
3477 fi
3478
3479 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
3480 cat >> confdefs.h <<\EOF
3481#define HPUX10 1
3482EOF
3483
3484 cat >> confdefs.h <<\EOF
3485#define HPUX11 1
3486EOF
3487
3488 cat >> confdefs.h <<\EOF
3489#define _LARGEFILE64_SOURCE 1
3490EOF
3491
3492 cat >> confdefs.h <<\EOF
3493#define _PR_HAVE_OFF64_T 1
3494EOF
3495
3496 cat >> confdefs.h <<\EOF
3497#define HAVE_FCNTL_FILE_LOCKING 1
3498EOF
3499
3500 if test -z "$GNU_CC"; then
3501 if test -z "$USE_64"; then
3502 if test "$OS_TEST" = "ia64"; then
3503 CFLAGS="$CFLAGS +DD32"
3504 CXXFLAGS="$CXXFLAGS +DD32"
3505 else
3506 CFLAGS="$CFLAGS +DAportable +DS2.0"
3507 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
3508 fi
3509 else
3510 if test "$OS_TEST" = "ia64"; then
3511 CFLAGS="$CFLAGS +DD64"
3512 CXXFLAGS="$CXXFLAGS +DD64"
3513 else
3514 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
3515 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
3516 fi
3517 fi
3518 fi
3519 DEFAULT_IMPL_STRATEGY=_PTH
3520 fi
3521
3522 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
3523 USE_NSPR_THREADS=1
3524 USE_PTHREADS=
3525 USE_USER_THREADS=
3526 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
3527 USE_PTHREADS=1
3528 if test "$USE_NSPR_THREADS"; then
3529 USE_PTHREADS=
3530 fi
3531 if test "$USE_USER_PTHREADS"; then
3532 USE_PTHREADS=
3533 fi
3534 fi
3535 ;;
3536
3537*-irix*)
3538 cat >> confdefs.h <<\EOF
3539#define XP_UNIX 1
3540EOF
3541
3542 cat >> confdefs.h <<\EOF
3543#define IRIX 1
3544EOF
3545
3546 cat >> confdefs.h <<\EOF
3547#define SVR4 1
3548EOF
3549
3550 cat >> confdefs.h <<\EOF
3551#define _SGI_MP_SOURCE 1
3552EOF
3553
3554 cat >> confdefs.h <<\EOF
3555#define HAVE_FCNTL_FILE_LOCKING 1
3556EOF
3557
3558 PR_MD_CSRCS=irix.c
3559 PR_MD_ASFILES=os_Irix.s
3560 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
3561 STRIP="$STRIP -f"
3562 RESOLVE_LINK_SYMBOLS=1
3563 if test -n "$USE_64"; then
3564 MDCPUCFG_H=_irix64.cfg
3565 else
3566 MDCPUCFG_H=_irix32.cfg
3567 fi
3568 case "${target_os}" in
3569 irix6*)
3570 cat >> confdefs.h <<\EOF
3571#define IRIX6 1
3572EOF
3573
3574 USE_PTHREADS=1
3575 USE_N32=1
3576 COMPILER_TAG=_n32
3577 IMPL_STRATEGY=_PTH
3578 ;;
3579 irix5*)
3580 cat >> confdefs.h <<\EOF
3581#define IRIX5 1
3582EOF
3583
3584 USE_NSPR_THREADS=1
3585 ;;
3586 *)
3587 USE_PTHREADS=1
3588 USE_N32=1
3589 ;;
3590 esac
3591 if test "$GNU_CC"; then
3592 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
3593 CFLAGS="$CFLAGS -Wall -Wno-format"
3594 _OPTIMIZE_FLAGS="-O6"
3595 else
3596 if test -n "$USE_N32"; then
3597 AS='as -D_ASM $(INCLUDES) -n32'
3598 else
3599 AS='as -D_ASM $(INCLUDES)'
3600 fi
3601 CFLAGS="$CFLAGS -fullwarn -xansi"
3602 if test "$USE_N32"; then
3603 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
3604 else
3605 _OPTIMIZE_FLAGS="-O -Olimit 4000"
3606 fi
3607 if test "$USE_MDUPDATE"; then
3608 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
3609 fi
3610 case "${target}" in
3611 *-irix6.*)
3612 CFLAGS="$CFLAGS -multigot"
3613 DSO_LDOPTS="-no_unresolved"
3614 if test "$USE_N32"; then
3615 CFLAGS="$CFLAGS -n32 -woff 1209"
3616 DSO_LDOPTS="$DSO_LDOPTS -n32"
3617 else
3618 if test "$USE_64"; then
3619 CFLAGS="$CFLAGS -64"
3620 else
3621 CFLAGS="$CFLAGS -32"
3622 fi
3623 fi
3624 ;;
3625 *)
3626 CFLAGS="$CFLAGS -xgot"
3627 ;;
3628 esac
3629 fi
3630 if test "${target_os}" = "irix5.3"; then
3631 cat >> confdefs.h <<\EOF
3632#define IRIX5_3 1
3633EOF
3634
3635 fi
3636 case "${target_os}" in
3637 irix6.5)
3638 if test -z "$GNU_CC"; then
3639 CFLAGS="$CFLAGS -mips3"
3640 fi
3641 cat >> confdefs.h <<\EOF
3642#define _PR_HAVE_GETPROTO_R 1
3643EOF
3644
3645 cat >> confdefs.h <<\EOF
3646#define _PR_HAVE_GETPROTO_R_POINTER 1
3647EOF
3648
3649 cat >> confdefs.h <<\EOF
3650#define _PR_HAVE_SGI_PRDA_PROCMASK 1
3651EOF
3652
3653 ;;
3654 irix5*)
3655 ;;
3656 *)
3657 cat >> confdefs.h <<\EOF
3658#define _PR_HAVE_SGI_PRDA_PROCMASK 1
3659EOF
3660
3661 ;;
3662 esac
3663 ;;
3664
3665*-linux*)
3666 if test -z "$USE_NSPR_THREADS"; then
3667 USE_PTHREADS=1
3668 IMPL_STRATEGY=_PTH
3669 fi
3670 cat >> confdefs.h <<\EOF
3671#define XP_UNIX 1
3672EOF
3673
3674 cat >> confdefs.h <<\EOF
3675#define _POSIX_SOURCE 1
3676EOF
3677
3678 cat >> confdefs.h <<\EOF
3679#define _BSD_SOURCE 1
3680EOF
3681
3682 cat >> confdefs.h <<\EOF
3683#define _SVID_SOURCE 1
3684EOF
3685
3686 cat >> confdefs.h <<\EOF
3687#define _LARGEFILE64_SOURCE 1
3688EOF
3689
3690 cat >> confdefs.h <<\EOF
3691#define HAVE_FCNTL_FILE_LOCKING 1
3692EOF
3693
3694 cat >> confdefs.h <<\EOF
3695#define LINUX 1
3696EOF
3697
3698 CFLAGS="$CFLAGS -ansi -Wall"
3699 CXXFLAGS="$CXXFLAGS -ansi -Wall"
3700 MDCPUCFG_H=_linux.cfg
3701 PR_MD_CSRCS=linux.c
3702 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3703 DSO_CFLAGS=-fPIC
3704 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3705 _OPTIMIZE_FLAGS=-O2
3706 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
3707 # combo is not yet good at debugging inlined
3708 # functions (even when using DWARF2 as the
3709 # debugging format)
3710 COMPILER_TAG=_glibc
3711 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3712 CPU_ARCH=x86
3713 else
3714 CPU_ARCH=$OS_TEST
3715 fi
3716 CPU_ARCH_TAG=_${CPU_ARCH}
3717 case "${target_cpu}" in
3718 alpha)
3719 cat >> confdefs.h <<\EOF
3720#define _ALPHA_ 1
3721EOF
3722
3723 cat >> confdefs.h <<\EOF
3724#define __alpha 1
3725EOF
3726
3727 CFLAGS="$CFLAGS -mieee"
3728 CXXFLAGS="$CXXFLAGS -mieee"
3729 ;;
3730 i*86)
3731 cat >> confdefs.h <<\EOF
3732#define i386 1
3733EOF
3734
3735 PR_MD_ASFILES=os_Linux_x86.s
3736 ;;
3737 ia64)
3738 PR_MD_ASFILES=os_Linux_ia64.s
3739 ;;
3740 x86_64)
3741 PR_MD_ASFILES=os_Linux_x86_64.s
3742 ;;
3743 m68k)
3744 CFLAGS="$CFLAGS -m68020-60"
3745 CXXFLAGS="$CXXFLAGS -m68020-60"
3746 ;;
3747 esac
3748 ;;
3749
3750*-mingw*|*-cygwin*|*-msvc*|*-mks*)
3751 cat >> confdefs.h <<\EOF
3752#define XP_PC 1
3753EOF
3754
3755 cat >> confdefs.h <<\EOF
3756#define WIN32 1
3757EOF
3758
3759 PR_MD_ARCH_DIR=windows
3760 RESOLVE_LINK_SYMBOLS=1
3761
3762 if test -n "$GNU_CC"; then
3763 CC="$CC -mno-cygwin"
3764 CXX="$CXX -mno-cygwin"
3765 DLL_SUFFIX=dll
3766 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
3767 RC=$WINDRES
3768 # Use temp file for windres (bug 213281)
3769 RCFLAGS='-O coff --use-temp-file'
3770 else
3771 CC=cl
3772 CXX=cl
3773 LD=link
3774 AR='lib -NOLOGO -OUT:"$@"'
3775 AR_FLAGS=
3776 RANLIB='echo not_ranlib'
3777 STRIP='echo not_strip'
3778 RC=rc.exe
3779 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
3780 OBJ_SUFFIX=obj
3781 LIB_SUFFIX=lib
3782 DLL_SUFFIX=dll
3783
3784 # Determine compiler version
3785 CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
3786 _CC_MAJOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $1 }'`
3787 _CC_MINOR_VERSION=`echo $CC_VERSION | awk -F\. '{ print $2 }'`
3788 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
3789
3790 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
3791 DLLFLAGS='-OUT:"$@"'
3792 _DEBUG_FLAGS=-Z7
3793 _OPTIMIZE_FLAGS=-O2
3794 if test -z "$MOZ_OPTIMIZE"; then
3795 CFLAGS="$CFLAGS -Od"
3796 fi
3797
3798 if test -n "$USE_DEBUG_RTL"; then
3799 CFLAGS="$CFLAGS -MDd"
3800 else
3801 CFLAGS="$CFLAGS -MD"
3802 fi
3803
3804 if test -n "$MOZ_DEBUG"; then
3805 cat >> confdefs.h <<\EOF
3806#define _DEBUG 1
3807EOF
3808
3809 else
3810 DEFINES="$DEFINES -U_DEBUG"
3811 fi
3812
3813 if test -n "$MOZ_OPTIMIZE"; then
3814 if test -n "$MOZ_PROFILE"; then
3815 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Z7"
3816 fi
3817 if test -n "$MOZ_DEBUG_SYMBOLS"; then
3818 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Zi"
3819 fi
3820 if test -n "$MOZ_PROFILE" -o -n "$MOZ_DEBUG_SYMBOLS"; then
3821 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
3822 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
3823 fi
3824 fi
3825
3826 if test -n "$MOZ_DEBUG"; then
3827 DLLFLAGS="$DLLFLAGS -DEBUG -DEBUGTYPE:CV"
3828 LDFLAGS="$LDFLAGS -DEBUG -DEBUGTYPE:CV"
3829 fi
3830
3831 if test "$OS_TARGET" = "WINNT"; then
3832 CFLAGS="$CFLAGS -GT"
3833 if test "$CPU_ARCH" = "x86"; then
3834 CFLAGS="$CFLAGS -G5"
3835 fi
3836 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
3837 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
3838 else
3839 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
3840 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
3841 fi
3842 fi # GNU_CC
3843
3844 if test -n "$USE_STATIC_TLS"; then
3845 cat >> confdefs.h <<\EOF
3846#define _PR_USE_STATIC_TLS 1
3847EOF
3848
3849 fi
3850
3851 if test "$OS_TARGET" = "WINNT"; then
3852 cat >> confdefs.h <<\EOF
3853#define WINNT 1
3854EOF
3855
3856 else
3857 cat >> confdefs.h <<\EOF
3858#define WIN95 1
3859EOF
3860
3861 # undefine WINNT as some versions of mingw gcc define it by default
3862 DEFINES="$DEFINES -UWINNT"
3863 cat >> confdefs.h <<\EOF
3864#define _PR_GLOBAL_THREADS_ONLY 1
3865EOF
3866
3867 fi
3868
3869 if test "$CPU_ARCH" = "x86"; then
3870 CPU_ARCH_TAG=
3871 else
3872 CPU_ARCH_TAG=$CPU_ARCH
3873 fi
3874
3875 if test -n "$USE_DEBUG_RTL"; then
3876 OBJDIR_SUFFIX=OBJD
3877 fi
3878
3879 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
3880 if test "$MSC_VER" = "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
3881 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
3882 fi
3883
3884 case "$OS_TARGET" in
3885 WINNT)
3886 MDCPUCFG_H=_winnt.cfg
3887 ;;
3888 WIN95)
3889 MDCPUCFG_H=_win95.cfg
3890 ;;
3891 WIN16)
3892 MDCPUCFG_H=_win16.cfg
3893 ;;
3894 *)
3895 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
3896 ;;
3897 esac
3898
3899 case "$target_cpu" in
3900 i*86)
3901 cat >> confdefs.h <<\EOF
3902#define _X86_ 1
3903EOF
3904
3905 ;;
3906 alpha)
3907 cat >> confdefs.h <<\EOF
3908#define _ALPHA_ 1
3909EOF
3910
3911 ;;
3912 mips)
3913 cat >> confdefs.h <<\EOF
3914#define _MIPS_ 1
3915EOF
3916
3917 ;;
3918 *)
3919 cat >> confdefs.h <<\EOF
3920#define _CPU_ARCH_NOT_DEFINED 1
3921EOF
3922
3923 ;;
3924 esac
3925
3926 ;;
3927
3928*-ncr-sysv*)
3929 cat >> confdefs.h <<\EOF
3930#define XP_UNIX 1
3931EOF
3932
3933 cat >> confdefs.h <<\EOF
3934#define SVR4 1
3935EOF
3936
3937 cat >> confdefs.h <<\EOF
3938#define SYSV 1
3939EOF
3940
3941 cat >> confdefs.h <<\EOF
3942#define NCR 1
3943EOF
3944
3945 USE_NSPR_THREADS=1
3946 if test "$OS_RELEASE" = "2.03"; then
3947 cat >> confdefs.h <<\EOF
3948#define _PR_STAT_HAS_ST_ATIM 1
3949EOF
3950
3951 else
3952 cat >> confdefs.h <<\EOF
3953#define _PR_STAT_HAS_ST_ATIM_UNION 1
3954EOF
3955
3956 fi
3957
3958 if test -z "$GNU_CC"; then
3959 CFLAGS="$CFLAGS -Hnocopyr"
3960 CXXFLAGS="$CXXFLAGS -Hnocopyr"
3961 else
3962 CFLAGS="$CFLAGS -fPIC -Wall"
3963 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
3964 DSO_LDOPTS=-G
3965 fi
3966 MDCPUCFG_H=_ncr.cfg
3967 PR_MD_CSRCS=ncr.c
3968 ;;
3969
3970mips-nec-sysv*)
3971 cat >> confdefs.h <<\EOF
3972#define XP_UNIX 1
3973EOF
3974
3975 cat >> confdefs.h <<\EOF
3976#define SVR4 1
3977EOF
3978
3979 cat >> confdefs.h <<\EOF
3980#define __SVR4 1
3981EOF
3982
3983 cat >> confdefs.h <<\EOF
3984#define NEC 1
3985EOF
3986
3987 cat >> confdefs.h <<\EOF
3988#define nec_ews 1
3989EOF
3990
3991 USE_NSPR_THREADS=1
3992 if test -z "$GNU_CC"; then
3993 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
3994 CXX=g++
3995 fi
3996 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
3997 DSO_LDOPTS=-G
3998 MDCPUCFG_H=_nec.cfg
3999 PR_MD_CSRCS=nec.c
4000 ;;
4001
4002*-netbsd*)
4003 cat >> confdefs.h <<\EOF
4004#define XP_UNIX 1
4005EOF
4006
4007 cat >> confdefs.h <<\EOF
4008#define NETBSD 1
4009EOF
4010
4011 cat >> confdefs.h <<\EOF
4012#define HAVE_BSD_FLOCK 1
4013EOF
4014
4015 USE_NSPR_THREADS=1
4016 MDCPUCFG_H=_netbsd.cfg
4017 PR_MD_CSRCS=netbsd.c
4018
4019 DSO_CFLAGS='-fPIC -DPIC'
4020 CFLAGS="$CFLAGS -ansi -Wall"
4021 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4022 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4023
4024 if test -z "$OBJECT_FMT"; then
4025 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4026 OBJECT_FMT=a.out
4027 DLL_SUFFIX=so.1.0
4028 DSO_LDOPTS='-shared'
4029 else
4030 OBJECT_FMT=ELF
4031 DLL_SUFFIX=so
4032 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4033 fi
4034 fi
4035
4036 if test "$LIBRUNPATH"; then
4037 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4038 fi
4039 ;;
4040
4041mips-sony-newsos*)
4042 cat >> confdefs.h <<\EOF
4043#define XP_UNIX 1
4044EOF
4045
4046 cat >> confdefs.h <<\EOF
4047#define SONY 1
4048EOF
4049
4050 cat >> confdefs.h <<\EOF
4051#define SYSV 1
4052EOF
4053
4054 cat >> confdefs.h <<\EOF
4055#define SVR4 1
4056EOF
4057
4058 cat >> confdefs.h <<\EOF
4059#define __svr4 1
4060EOF
4061
4062 cat >> confdefs.h <<\EOF
4063#define __svr4__ 1
4064EOF
4065
4066 cat >> confdefs.h <<\EOF
4067#define HAVE_SVID_GETTOD 1
4068EOF
4069
4070 USE_NSPR_THREADS=1
4071 CFLAGS="$CFLAGS -Xa -fullwarn"
4072 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4073 DSO_LDOPTS=-G
4074 MDCPUCFG_H=_sony.cfg
4075 PR_MD_CSRCS=sony.c
4076 ;;
4077
4078*-nextstep*|*-openstep*)
4079 cat >> confdefs.h <<\EOF
4080#define XP_UNIX 1
4081EOF
4082
4083 cat >> confdefs.h <<\EOF
4084#define NEXTSTEP 1
4085EOF
4086
4087 cat >> confdefs.h <<\EOF
4088#define HAVE_BSD_FLOCK 1
4089EOF
4090
4091 cat >> confdefs.h <<\EOF
4092#define _POSIX_SOURCE 1
4093EOF
4094
4095 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4096 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4097 USE_NSPR_THREADS=1
4098 DLL_SUFFIX=dylib
4099 MDCPUCFG_H=_nextstep.cfg
4100 PR_MD_CSRCS=nextstep.c
4101 ;;
4102
4103
4104*-nto*)
4105 cat >> confdefs.h <<\EOF
4106#define XP_UNIX 1
4107EOF
4108
4109 cat >> confdefs.h <<\EOF
4110#define NTO 1
4111EOF
4112
4113 cat >> confdefs.h <<\EOF
4114#define _QNX_SOURCE 1
4115EOF
4116
4117 cat >> confdefs.h <<\EOF
4118#define HAVE_POINTER_LOCALTIME_R 1
4119EOF
4120
4121 MDCPUCFG_H=_nto.cfg
4122 PR_MD_CSRCS=nto.c
4123 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4124 DSO_CFLAGS=-fPIC
4125 DSO_LDOPTS=-shared
4126 OS_LIBS="$OS_LIBS -lsocket"
4127 _OPTIMIZE_FLAGS="-O1"
4128 _DEBUG_FLAGS="-gstabs"
4129 ;;
4130
4131*-openbsd*)
4132 cat >> confdefs.h <<\EOF
4133#define XP_UNIX 1
4134EOF
4135
4136 cat >> confdefs.h <<\EOF
4137#define OPENBSD 1
4138EOF
4139
4140 cat >> confdefs.h <<\EOF
4141#define HAVE_BSD_FLOCK 1
4142EOF
4143
4144 cat >> confdefs.h <<\EOF
4145#define HAVE_SOCKLEN_T 1
4146EOF
4147
4148 CFLAGS="$CFLAGS -ansi -Wall"
4149 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4150 DLL_SUFFIX=so.1.0
4151 DSO_CFLAGS=-fPIC
4152 MDCPUCFG_H=_openbsd.cfg
4153 PR_MD_CSRCS=openbsd.c
4154 USE_NSPR_THREADS=1
4155 DSO_LDOPTS='-shared -fPIC'
4156 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4157 ;;
4158
4159*-openvms*)
4160 cat >> confdefs.h <<\EOF
4161#define XP_UNIX 1
4162EOF
4163
4164 cat >> confdefs.h <<\EOF
4165#define VMS 1
4166EOF
4167
4168 cat >> confdefs.h <<\EOF
4169#define PR_GETIPNODE_NOT_THREADSAFE 1
4170EOF
4171
4172 RESOLVE_LINK_SYMBOLS=1
4173 AR_FLAGS='c $@'
4174 MDCPUCFG_H=_openvms.cfg
4175 PR_MD_CSRCS=openvms.c
4176 DSO_LDOPTS='-shared -auto_symvec $(LDFLAGS)'
4177 if test -n "$MOZ_DEBUG"; then
4178 DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
4179 else
4180 DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
4181 fi
4182 ;;
4183
4184*-osf*)
4185 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4186 cat >> confdefs.h <<\EOF
4187#define XP_UNIX 1
4188EOF
4189
4190 cat >> confdefs.h <<\EOF
4191#define OSF1 1
4192EOF
4193
4194 cat >> confdefs.h <<\EOF
4195#define _REENTRANT 1
4196EOF
4197
4198 # OSF1 and HPUX report the POLLHUP event for a socket when the
4199 # shutdown(SHUT_WR) operation is called for the remote end, even though
4200 # the socket is still writeable. Use select(), instead of poll(), to
4201 # workaround this problem.
4202 cat >> confdefs.h <<\EOF
4203#define _PR_POLL_WITH_SELECT 1
4204EOF
4205
4206
4207 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4208 USE_NSPR_THREADS=1
4209 fi
4210
4211 if test -z "$GNU_CC"; then
4212 CC="$CC -std1 -ieee_with_inexact"
4213 if test "$OS_RELEASE" != "V2.0"; then
4214 CC="$CC -readonly_strings"
4215 fi
4216 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4217 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4218echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4219echo "configure:4220: checking for machine/builtins.h" >&5
4220if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4221 echo $ac_n "(cached) $ac_c" 1>&6
4222else
4223 cat > conftest.$ac_ext <<EOF
4224#line 4225 "configure"
4225#include "confdefs.h"
4226#include <machine/builtins.h>
4227EOF
4228ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4229{ (eval echo configure:4230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4230ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4231if test -z "$ac_err"; then
4232 rm -rf conftest*
4233 eval "ac_cv_header_$ac_safe=yes"
4234else
4235 echo "$ac_err" >&5
4236 echo "configure: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
4238 rm -rf conftest*
4239 eval "ac_cv_header_$ac_safe=no"
4240fi
4241rm -f conftest*
4242fi
4243if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4244 echo "$ac_t""yes" 1>&6
4245 cat >> confdefs.h <<\EOF
4246#define OSF1_HAVE_MACHINE_BUILTINS_H 1
4247EOF
4248
4249else
4250 echo "$ac_t""no" 1>&6
4251fi
4252
4253 else
4254 CFLAGS="$CFLAGS -mieee"
4255 CXXFLAGS="$CXXFLAGS -mieee"
4256 fi
4257
4258 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4259 cat >> confdefs.h <<\EOF
4260#define HAVE_INT_LOCALTIME_R 1
4261EOF
4262
4263 else
4264 cat >> confdefs.h <<\EOF
4265#define HAVE_FCNTL_FILE_LOCKING 1
4266EOF
4267
4268 cat >> confdefs.h <<\EOF
4269#define HAVE_POINTER_LOCALTIME_R 1
4270EOF
4271
4272 fi
4273 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4274 cat >> confdefs.h <<\EOF
4275#define OSF1V4_MAP_PRIVATE_BUG 1
4276EOF
4277
4278 fi
4279 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4280 MDCPUCFG_H=_osf1.cfg
4281 PR_MD_CSRCS=osf1.c
4282 ;;
4283
4284*-qnx*)
4285 cat >> confdefs.h <<\EOF
4286#define XP_UNIX 1
4287EOF
4288
4289 cat >> confdefs.h <<\EOF
4290#define QNX 1
4291EOF
4292
4293 cat >> confdefs.h <<\EOF
4294#define _PR_NEED_H_ERRNO 1
4295EOF
4296
4297 USE_NSPR_THREADS=1
4298 MDCPUCFG_H=_qnx.cfg
4299 PR_MD_CSRCS=qnx.c
4300 ;;
4301
4302*-*-sco*)
4303 cat >> confdefs.h <<\EOF
4304#define XP_UNIX 1
4305EOF
4306
4307 cat >> confdefs.h <<\EOF
4308#define SCO 1
4309EOF
4310
4311 cat >> confdefs.h <<\EOF
4312#define sco 1
4313EOF
4314
4315 cat >> confdefs.h <<\EOF
4316#define SYSV 1
4317EOF
4318
4319 cat >> confdefs.h <<\EOF
4320#define _SVID3 1
4321EOF
4322
4323 cat >> confdefs.h <<\EOF
4324#define _PR_NEED_H_ERRNO 1
4325EOF
4326
4327 CC='cc -b elf -KPIC'
4328 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4329 USE_NSPR_THREADS=1
4330 CPU_ARCH=x86
4331 DSO_LDOPTS='-b elf -G'
4332 MDCPUCFG_H=_scoos.cfg
4333 PR_MD_SRCS=scoos.c
4334 ;;
4335
4336*-sinix*)
4337 cat >> confdefs.h <<\EOF
4338#define XP_UNIX 1
4339EOF
4340
4341 cat >> confdefs.h <<\EOF
4342#define SVR4 1
4343EOF
4344
4345 cat >> confdefs.h <<\EOF
4346#define SNI 1
4347EOF
4348
4349 cat >> confdefs.h <<\EOF
4350#define RELIANTUNIX 1
4351EOF
4352
4353 cat >> confdefs.h <<\EOF
4354#define sinix 1
4355EOF
4356
4357 cat >> confdefs.h <<\EOF
4358#define HAVE_SVID_GETTOD 1
4359EOF
4360
4361 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4362 cat >> confdefs.h <<\EOF
4363#define i386 1
4364EOF
4365
4366 CPU_ARCH=x86
4367 else
4368 CPU_ARCH=mips
4369 fi
4370
4371 if test "$GNU_CC"; then
4372 AS='$(CC) -x assembler-with-cpp'
4373 if test "$CPU_ARCH" = "mips"; then
4374 LD=gld
4375 fi
4376 CFLAGS="$CFLAGS -Wall -Wno-format"
4377 else
4378 AS='/usr/bin/cc'
4379 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4380 fi
4381
4382 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4383
4384 if test "$OS_RELEASE" = "5.43"; then
4385 cat >> confdefs.h <<\EOF
4386#define IP_MULTICAST 1
4387EOF
4388
4389 fi
4390
4391 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4392 USE_NSPR_THREADS=1
4393 MDCPUCFG_H=_reliantunix.cfg
4394 PR_MD_CSRCS=reliantunix.c
4395 if test "${OS_ARCH}" = "mips"; then
4396 PR_MD_ASFILES=os_ReliantUNIX.s
4397 fi
4398 ;;
4399
4400*-sunos*)
4401 cat >> confdefs.h <<\EOF
4402#define XP_UNIX 1
4403EOF
4404
4405 cat >> confdefs.h <<\EOF
4406#define SUNOS4 1
4407EOF
4408
4409 CFLAGS="$CFLAGS -Wall -Wno-format"
4410 if test "$USE_MDUPDATE"; then
4411 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4412 fi
4413 CPU_ARCH=sparc
4414 DLL_SUFFIX=so.1.0
4415 DSO_LDOPTS=
4416 DSO_CFLAGS=-fPIC
4417 USE_NSPR_THREADS=1
4418 if test "$OS_RELEASE" = "4.1.3_U1"; then
4419 _OPTIMIZE_FLAGS=
4420 OS_LIBS="$OS_LIBS -lm"
4421 fi
4422 MDCPUCFG_H=_sunos4.cfg
4423 PR_MD_CSRCS=sunos4.c
4424 ;;
4425
4426*-solaris*)
4427 if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
4428 USE_PTHREADS=1
4429 fi
4430 cat >> confdefs.h <<\EOF
4431#define XP_UNIX 1
4432EOF
4433
4434 cat >> confdefs.h <<\EOF
4435#define SVR4 1
4436EOF
4437
4438 cat >> confdefs.h <<\EOF
4439#define SYSV 1
4440EOF
4441
4442 cat >> confdefs.h <<\EOF
4443#define __svr4 1
4444EOF
4445
4446 cat >> confdefs.h <<\EOF
4447#define __svr4__ 1
4448EOF
4449
4450 cat >> confdefs.h <<\EOF
4451#define SOLARIS 1
4452EOF
4453
4454 cat >> confdefs.h <<\EOF
4455#define HAVE_FCNTL_FILE_LOCKING 1
4456EOF
4457
4458 if test -n "$USE_64"; then
4459 MDCPUCFG_H=_solaris64.cfg
4460 else
4461 MDCPUCFG_H=_solaris32.cfg
4462 fi
4463 PR_MD_CSRCS=solaris.c
4464 LD=/usr/ccs/bin/ld
4465 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4466 RESOLVE_LINK_SYMBOLS=1
4467 if test -n "$GNU_CC"; then
4468 DSO_CFLAGS=-fPIC
4469 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
4470 GCC_USE_GNU_LD=1
4471 fi
4472 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs'
4473 else
4474 DSO_CFLAGS=-KPIC
4475 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs'
4476 fi
4477 if test -z "$GNU_AS"; then
4478 ASFLAGS="$ASFLAGS -Wa,-P"
4479 fi
4480 if test -n "$GNU_CC"; then
4481 CFLAGS="$CFLAGS -Wall"
4482 CXXFLAGS="$CXXFLAGS -Wall"
4483 if test -n "$USE_MDUPDATE"; then
4484 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4485 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
4486 fi
4487 else
4488 CFLAGS="$CFLAGS -xstrconst"
4489 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
4490 if test -z "$MOZ_OPTIMIZE"; then
4491 CFLAGS="$CFLAGS -xs"
4492 CXXFLAGS="$CXXFLAGS -xs"
4493 fi
4494 _OPTIMIZE_FLAGS=-xO4
4495 fi
4496 if test -n "$USE_64"; then
4497 if test -n "$GNU_CC"; then
4498 CC="$CC -m64"
4499 CXX="$CXX -m64"
4500 else
4501 CC="$CC -xarch=v9"
4502 CXX="$CXX -xarch=v9"
4503 fi
4504 fi
4505 if test "$OS_TEST" = "i86pc"; then
4506 cat >> confdefs.h <<\EOF
4507#define i386 1
4508EOF
4509
4510 CPU_ARCH_TAG=_$OS_TEST
4511 # The default debug format, DWARF (-g), is not supported by gcc
4512 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
4513 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
4514 # If your gcc uses GNU as, you do not need the -Wa,-s option.
4515 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
4516 _DEBUG_FLAGS=-gstabs
4517 if test -z "$GNU_AS"; then
4518 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
4519 fi
4520 fi
4521 fi
4522 case "${target_os}" in
4523 solaris2.3*)
4524 cat >> confdefs.h <<\EOF
4525#define _PR_NO_LARGE_FILES 1
4526EOF
4527
4528 ;;
4529 solaris2.4*)
4530 cat >> confdefs.h <<\EOF
4531#define _PR_NO_LARGE_FILES 1
4532EOF
4533
4534 ;;
4535 solaris2.5*)
4536 cat >> confdefs.h <<\EOF
4537#define SOLARIS2_5 1
4538EOF
4539
4540 ;;
4541 *)
4542 cat >> confdefs.h <<\EOF
4543#define _PR_HAVE_OFF64_T 1
4544EOF
4545
4546 # The lfcompile64(5) man page on Solaris 2.6 says:
4547 # For applications that do not wish to conform to the POSIX or
4548 # X/Open specifications, the 64-bit transitional interfaces
4549 # are available by default. No compile-time flags need to be
4550 # set.
4551 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
4552 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
4553 if test -n "$GNU_CC"; then
4554 cat >> confdefs.h <<\EOF
4555#define _LARGEFILE64_SOURCE 1
4556EOF
4557
4558 fi
4559 ;;
4560 esac
4561 case "${target_os}" in
4562 solaris2.3*)
4563 ;;
4564 solaris2.4*)
4565 ;;
4566 solaris2.5*)
4567 ;;
4568 solaris2.6*)
4569 ;;
4570 solaris2.7*)
4571 ;;
4572 *)
4573 # Solaris 8 or higher has IPv6.
4574 cat >> confdefs.h <<\EOF
4575#define _PR_INET6 1
4576EOF
4577
4578 ;;
4579 esac
4580 if test "$OS_TEST" = "sun4u"; then
4581 # 64-bit Solaris requires SPARC V9 architecture, so the following
4582 # is not needed.
4583 if test -z "$USE_64"; then
4584 ULTRASPARC_LIBRARY=nspr_flt
4585 fi
4586 fi
4587 # Purify requires that binaries linked against nspr also
4588 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
4589 _rev=`uname -r`
4590 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
4591 OS_LIBS="$OS_LIBS $_librt"
4592 ;;
4593
4594*-sco-sysv5*)
4595 cat >> confdefs.h <<\EOF
4596#define XP_UNIX 1
4597EOF
4598
4599 cat >> confdefs.h <<\EOF
4600#define UNIXWARE 1
4601EOF
4602
4603 cat >> confdefs.h <<\EOF
4604#define SVR4 1
4605EOF
4606
4607 cat >> confdefs.h <<\EOF
4608#define SYSV 1
4609EOF
4610
4611 USE_NSPR_THREADS=1
4612 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
4613 cat >> confdefs.h <<\EOF
4614#define _PR_NO_LARGE_FILES 1
4615EOF
4616
4617 CC='$(NSDEPTH)/build/hcc cc'
4618 CXX='$(NSDEPTH)/build/hcpp CC'
4619 MDCPUCFG_H=_unixware.cfg
4620 else
4621 cat >> confdefs.h <<\EOF
4622#define _LARGEFILE64_SOURCE 1
4623EOF
4624
4625 cat >> confdefs.h <<\EOF
4626#define _PR_HAVE_OFF64_T 1
4627EOF
4628
4629 cat >> confdefs.h <<\EOF
4630#define _PR_HAVE_SOCKADDR_LEN 1
4631EOF
4632
4633 MDCPUCFG_H=_unixware7.cfg
4634 fi
4635 PR_MD_CSRCS=unixware.c
4636 DSO_LDOPTS=-G
4637 CPU_ARCH=x86
4638 ;;
4639
4640*-os2*)
4641 cat >> confdefs.h <<\EOF
4642#define XP_OS2 1
4643EOF
4644
4645 cat >> confdefs.h <<\EOF
4646#define XP_PC 1
4647EOF
4648
4649 cat >> confdefs.h <<\EOF
4650#define BSD_SELECT 1
4651EOF
4652
4653 cat >> confdefs.h <<\EOF
4654#define TCPV40HDRS 1
4655EOF
4656
4657 LIB_SUFFIX=lib
4658 DLL_SUFFIX=dll
4659 RC=rc.exe
4660 PR_MD_ARCH_DIR=os2
4661 PROG_SUFFIX=.exe
4662 NSINSTALL=nsinstall
4663 MDCPUCFG_H=_os2.cfg
4664 RESOLVE_LINK_SYMBOLS=1
4665
4666 # EMX/GCC build
4667 if test -n "$GNU_CC"; then
4668 cat >> confdefs.h <<\EOF
4669#define XP_OS2_EMX 1
4670EOF
4671
4672 cat >> confdefs.h <<\EOF
4673#define OS2 1
4674EOF
4675
4676 AR=emxomfar
4677 AR_FLAGS='r $@'
4678 CFLAGS="$CFLAGS -Wall -Zomf"
4679 CXXFLAGS="$CFLAGS -Wall -Zomf"
4680 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4681 DSO_CFLAGS=
4682 DSO_LDOPTS='-Zomf -Zdll -Zmap'
4683 LDFLAGS='-Zmap'
4684 _OPTIMIZE_FLAGS="-O2 -s"
4685 _DEBUG_FLAGS="-g -fno-inline"
4686 if test -n "$MOZ_OPTIMIZE"; then
4687 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
4688 fi
4689 OS_LIBS="-lsocket"
4690 IMPLIB='emximp -o'
4691 FILTER='emxexp -o'
4692
4693 # GCC for OS/2 currently predefines these, but we don't want them
4694 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
4695
4696 # Visual Age C++ build
4697 elif test "$VACPP" = "yes"; then
4698 cat >> confdefs.h <<\EOF
4699#define XP_OS2_VACPP 1
4700EOF
4701
4702 cat >> confdefs.h <<\EOF
4703#define OS2 4
4704EOF
4705
4706 cat >> confdefs.h <<\EOF
4707#define _X86_ 1
4708EOF
4709
4710 OBJ_SUFFIX=obj
4711 AS=alp
4712 ASFLAGS='-Mb'
4713 ASM_SUFFIX=asm
4714 AR=-ilib
4715 AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
4716 CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
4717 HOST_CFLAGS="$CFLAGS"
4718 OS_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
4719 OS_EXE_CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
4720 CXXFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9'
4721 OS_LIBS='so32dll.lib tcp32dll.lib'
4722 LD='-ilink'
4723 MKSHLIB='$(LD) $(DSO_LDOPTS)'
4724 IMPLIB='implib -nologo -noignorecase'
4725 FILTER='cppfilt -q -B -P'
4726 _OPTIMIZE_FLAGS='/O+ /Gl+ /qtune=pentium /qarch=pentium'
4727 _DEBUG_FLAGS='/Ti+ '
4728 LDFLAGS='/NOL /M /L'
4729 DLLFLAGS='/O:$@ /DLL /INC:_dllentry /MAP:$(@:.dll=.map) /L /NOL'
4730 EXEFLAGS='/OUT:$@ /PMTYPE:VIO /MAP:$(@:.exe=.map) /L /NOL'
4731 if test -n "$MOZ_DEBUG"; then
4732 LDFLAGS="$LDFLAGS /DE"
4733 DLLFLAGS="$DLLFLAGS /DE"
4734 EXEFLAGS="$EXEFLAGS /DE"
4735 fi
4736 if test -n "$MOZ_OPTIMIZE"; then
4737 LDFLAGS="$LDFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
4738 DLLFLAGS="$DLLFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
4739 EXEFLAGS="$EXEFLAGS /OPTFUNC /EXEPACK:2 /PACKCODE /PACKDATA"
4740 fi
4741 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4742 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4743 fi
4744 ;;
4745
4746*)
4747 cat >> confdefs.h <<\EOF
4748#define XP_UNIX 1
4749EOF
4750
4751 ;;
4752
4753esac
4754
4755if test -z "$SKIP_LIBRARY_CHECKS"; then
4756
4757
4758
4759case $target in
4760*-darwin*)
4761 ;;
4762*)
4763 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4764echo "configure:4765: checking for dlopen in -ldl" >&5
4765ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4766if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4767 echo $ac_n "(cached) $ac_c" 1>&6
4768else
4769 ac_save_LIBS="$LIBS"
4770LIBS="-ldl $LIBS"
4771cat > conftest.$ac_ext <<EOF
4772#line 4773 "configure"
4773#include "confdefs.h"
4774/* Override any gcc2 internal prototype to avoid an error. */
4775/* We use char because int might match the return type of a gcc2
4776 builtin and then its argument prototype would still apply. */
4777char dlopen();
4778
4779int main() {
4780dlopen()
4781; return 0; }
4782EOF
4783if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784 rm -rf conftest*
4785 eval "ac_cv_lib_$ac_lib_var=yes"
4786else
4787 echo "configure: failed program was:" >&5
4788 cat conftest.$ac_ext >&5
4789 rm -rf conftest*
4790 eval "ac_cv_lib_$ac_lib_var=no"
4791fi
4792rm -f conftest*
4793LIBS="$ac_save_LIBS"
4794
4795fi
4796if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4797 echo "$ac_t""yes" 1>&6
4798 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
4799echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
4800echo "configure:4801: checking for dlfcn.h" >&5
4801if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4802 echo $ac_n "(cached) $ac_c" 1>&6
4803else
4804 cat > conftest.$ac_ext <<EOF
4805#line 4806 "configure"
4806#include "confdefs.h"
4807#include <dlfcn.h>
4808EOF
4809ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4810{ (eval echo configure:4811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4811ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4812if test -z "$ac_err"; then
4813 rm -rf conftest*
4814 eval "ac_cv_header_$ac_safe=yes"
4815else
4816 echo "$ac_err" >&5
4817 echo "configure: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 rm -rf conftest*
4820 eval "ac_cv_header_$ac_safe=no"
4821fi
4822rm -f conftest*
4823fi
4824if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4825 echo "$ac_t""yes" 1>&6
4826 OS_LIBS="-ldl $OS_LIBS"
4827else
4828 echo "$ac_t""no" 1>&6
4829fi
4830
4831else
4832 echo "$ac_t""no" 1>&6
4833fi
4834
4835 ;;
4836esac
4837
4838
4839
4840
4841if test $ac_cv_prog_gcc = yes; then
4842 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
4843echo "configure:4844: checking whether ${CC-cc} needs -traditional" >&5
4844if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
4845 echo $ac_n "(cached) $ac_c" 1>&6
4846else
4847 ac_pattern="Autoconf.*'x'"
4848 cat > conftest.$ac_ext <<EOF
4849#line 4850 "configure"
4850#include "confdefs.h"
4851#include <sgtty.h>
4852Autoconf TIOCGETP
4853EOF
4854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4855 egrep "$ac_pattern" >/dev/null 2>&1; then
4856 rm -rf conftest*
4857 ac_cv_prog_gcc_traditional=yes
4858else
4859 rm -rf conftest*
4860 ac_cv_prog_gcc_traditional=no
4861fi
4862rm -f conftest*
4863
4864
4865 if test $ac_cv_prog_gcc_traditional = no; then
4866 cat > conftest.$ac_ext <<EOF
4867#line 4868 "configure"
4868#include "confdefs.h"
4869#include <termio.h>
4870Autoconf TCGETA
4871EOF
4872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4873 egrep "$ac_pattern" >/dev/null 2>&1; then
4874 rm -rf conftest*
4875 ac_cv_prog_gcc_traditional=yes
4876fi
4877rm -f conftest*
4878
4879 fi
4880fi
4881
4882echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
4883 if test $ac_cv_prog_gcc_traditional = yes; then
4884 CC="$CC -traditional"
4885 fi
4886fi
4887
4888for ac_func in lchown strerror
4889do
4890echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4891echo "configure:4892: checking for $ac_func" >&5
4892if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4893 echo $ac_n "(cached) $ac_c" 1>&6
4894else
4895 cat > conftest.$ac_ext <<EOF
4896#line 4897 "configure"
4897#include "confdefs.h"
4898/* System header to define __stub macros and hopefully few prototypes,
4899 which can conflict with char $ac_func(); below. */
4900#include <assert.h>
4901/* Override any gcc2 internal prototype to avoid an error. */
4902/* We use char because int might match the return type of a gcc2
4903 builtin and then its argument prototype would still apply. */
4904char $ac_func();
4905
4906int main() {
4907
4908/* The GNU C library defines this for functions which it implements
4909 to always fail with ENOSYS. Some functions are actually named
4910 something starting with __ and the normal name is an alias. */
4911#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4912choke me
4913#else
4914$ac_func();
4915#endif
4916
4917; return 0; }
4918EOF
4919if { (eval echo configure:4920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4920 rm -rf conftest*
4921 eval "ac_cv_func_$ac_func=yes"
4922else
4923 echo "configure: failed program was:" >&5
4924 cat conftest.$ac_ext >&5
4925 rm -rf conftest*
4926 eval "ac_cv_func_$ac_func=no"
4927fi
4928rm -f conftest*
4929fi
4930
4931if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4932 echo "$ac_t""yes" 1>&6
4933 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4934 cat >> confdefs.h <<EOF
4935#define $ac_tr_func 1
4936EOF
4937
4938else
4939 echo "$ac_t""no" 1>&6
4940fi
4941done
4942
4943
4944
4945
4946# Check whether --enable-strip or --disable-strip was given.
4947if test "${enable_strip+set}" = set; then
4948 enableval="$enable_strip"
4949 if test "$enableval" = "yes"; then
4950 ENABLE_STRIP=1
4951 fi
4952fi
4953
4954
4955case "${target_os}" in
4956hpux*)
4957if test -z "$GNU_CC"; then
4958
4959 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
4960echo "configure:4961: checking for +Olit support" >&5
4961if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
4962 echo $ac_n "(cached) $ac_c" 1>&6
4963else
4964 ac_cv_hpux_usable_olit_option=no
4965 rm -f conftest*
4966 echo 'int main() { return 0; }' | cat > conftest.c
4967 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
4968 if test $? -eq 0; then
4969 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
4970 ac_cv_hpux_usable_olit_option=yes
4971 fi
4972 fi
4973 rm -f conftest*
4974
4975fi
4976
4977echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
4978
4979 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
4980 CFLAGS="$CFLAGS +Olit=all"
4981 CXXFLAGS="$CXXFLAGS +Olit=all"
4982 else
4983 CFLAGS="$CFLAGS +ESlit"
4984 CXXFLAGS="$CXXFLAGS +ESlit"
4985 fi
4986fi
4987;;
4988esac
4989
4990
4991
4992
4993echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
4994echo "configure:4995: checking for pthread_create in -lpthreads" >&5
4995echo "
4996 #include <pthread.h>
4997 void *foo(void *v) { return v; }
4998 int main() {
4999 pthread_t t;
5000 if (!pthread_create(&t, 0, &foo, 0)) {
5001 pthread_join(t, 0);
5002 }
5003 return 0;
5004 }" > dummy.c ;
5005 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5006 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5007 _res=$? ;
5008 rm -f dummy.c dummy${ac_exeext} ;
5009 if test "$_res" = "0"; then
5010 echo "$ac_t""yes" 1>&6
5011 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5012 else
5013 echo "$ac_t""no" 1>&6
5014
5015echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5016echo "configure:5017: checking for pthread_create in -lpthread" >&5
5017echo "
5018 #include <pthread.h>
5019 void *foo(void *v) { return v; }
5020 int main() {
5021 pthread_t t;
5022 if (!pthread_create(&t, 0, &foo, 0)) {
5023 pthread_join(t, 0);
5024 }
5025 return 0;
5026 }" > dummy.c ;
5027 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5028 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5029 _res=$? ;
5030 rm -f dummy.c dummy${ac_exeext} ;
5031 if test "$_res" = "0"; then
5032 echo "$ac_t""yes" 1>&6
5033 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5034 else
5035 echo "$ac_t""no" 1>&6
5036
5037echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5038echo "configure:5039: checking for pthread_create in -lc_r" >&5
5039echo "
5040 #include <pthread.h>
5041 void *foo(void *v) { return v; }
5042 int main() {
5043 pthread_t t;
5044 if (!pthread_create(&t, 0, &foo, 0)) {
5045 pthread_join(t, 0);
5046 }
5047 return 0;
5048 }" > dummy.c ;
5049 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5050 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5051 _res=$? ;
5052 rm -f dummy.c dummy${ac_exeext} ;
5053 if test "$_res" = "0"; then
5054 echo "$ac_t""yes" 1>&6
5055 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5056 else
5057 echo "$ac_t""no" 1>&6
5058
5059echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5060echo "configure:5061: checking for pthread_create in -lc" >&5
5061echo "
5062 #include <pthread.h>
5063 void *foo(void *v) { return v; }
5064 int main() {
5065 pthread_t t;
5066 if (!pthread_create(&t, 0, &foo, 0)) {
5067 pthread_join(t, 0);
5068 }
5069 return 0;
5070 }" > dummy.c ;
5071 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5072 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5073 _res=$? ;
5074 rm -f dummy.c dummy${ac_exeext} ;
5075 if test "$_res" = "0"; then
5076 echo "$ac_t""yes" 1>&6
5077 _HAVE_PTHREADS=1
5078
5079 else
5080 echo "$ac_t""no" 1>&6
5081
5082 fi
5083
5084
5085 fi
5086
5087
5088 fi
5089
5090
5091 fi
5092
5093
5094# Check whether --with-pthreads or --without-pthreads was given.
5095if test "${with_pthreads+set}" = set; then
5096 withval="$with_pthreads"
5097 if test "$withval" = "yes"; then
5098 if test -n "$_HAVE_PTHREADS"; then
5099 USE_PTHREADS=1
5100 USE_USER_PTHREADS=
5101 USE_NSPR_THREADS=
5102 else
5103 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5104 fi
5105 else
5106 USE_PTHREADS=
5107 _PTHREAD_LDFLAGS=
5108 fi
5109else
5110 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5111 USE_PTHREADS=1
5112 USE_USER_PTHREADS=
5113 USE_NSPR_THREADS=
5114 fi
5115fi
5116
5117
5118# Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5119if test "${enable_user_pthreads+set}" = set; then
5120 enableval="$enable_user_pthreads"
5121 if test "$enableval" = "yes"; then
5122 if test -n "$_HAVE_PTHREADS"; then
5123 USE_PTHREADS=
5124 USE_USER_PTHREADS=1
5125 USE_NSPR_THREADS=
5126 else
5127 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5128 fi
5129 fi
5130fi
5131
5132
5133# Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5134if test "${enable_nspr_threads+set}" = set; then
5135 enableval="$enable_nspr_threads"
5136 if test "$enableval" = "yes"; then
5137 USE_PTHREADS=
5138 USE_USER_PTHREADS=
5139 USE_NSPR_THREADS=1
5140 fi
5141fi
5142
5143
5144case "$target" in
5145*-beos*)
5146 # Check whether --with-bthreads or --without-bthreads was given.
5147if test "${with_bthreads+set}" = set; then
5148 withval="$with_bthreads"
5149 if test "$withval" = "yes"; then
5150 USE_BTHREADS=1
5151 USE_USER_PTHREADS=
5152 USE_PTHREADS=
5153 fi
5154fi
5155
5156 ;;
5157
5158*-solaris*)
5159 # Check whether --with-native-threads or --without-native-threads was given.
5160if test "${with_native_threads+set}" = set; then
5161 withval="$with_native_threads"
5162 if test "$withval" = "yes"; then
5163 USE_NATIVE_THREADS=1
5164 USE_USER_PTHREADS=
5165 USE_PTHREADS=
5166 fi
5167fi
5168
5169 ;;
5170esac
5171
5172fi # SKIP_LIBRARY_CHECKS
5173
5174# Check whether --enable-cplus or --disable-cplus was given.
5175if test "${enable_cplus+set}" = set; then
5176 enableval="$enable_cplus"
5177 if test "$enableval" = "yes"; then
5178 USE_CPLUS=1
5179 fi
5180fi
5181
5182
5183# Check whether --enable-ipv6 or --disable-ipv6 was given.
5184if test "${enable_ipv6+set}" = set; then
5185 enableval="$enable_ipv6"
5186 if test "$enableval" = "yes"; then
5187 USE_IPV6=1
5188 else
5189 USE_IPV6=
5190 fi
5191fi
5192
5193
5194
5195# Check whether --enable-boehm or --disable-boehm was given.
5196if test "${enable_boehm+set}" = set; then
5197 enableval="$enable_boehm"
5198 if test "$enableval" = "yes"; then
5199 cat >> confdefs.h <<\EOF
5200#define GC_LEAK_DETECTOR 1
5201EOF
5202
5203 GC_LEAK_DETECTOR=1
5204 fi
5205fi
5206
5207
5208if test -n "$USE_PTHREADS"; then
5209 rm -f conftest*
5210 ac_cv_have_dash_pthread=no
5211 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5212echo "configure:5213: checking whether ${CC-cc} accepts -pthread" >&5
5213 echo 'int main() { return 0; }' | cat > conftest.c
5214 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5215 if test $? -eq 0; then
5216 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5217 ac_cv_have_dash_pthread=yes
5218 case "$target_os" in
5219 freebsd*)
5220# Freebsd doesn't use -pthread for compiles, it uses them for linking
5221 ;;
5222 *)
5223 CFLAGS="$CFLAGS -pthread"
5224 CXXFLAGS="$CXXFLAGS -pthread"
5225 ;;
5226 esac
5227 fi
5228 fi
5229 rm -f conftest*
5230 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5231
5232 ac_cv_have_dash_pthreads=no
5233 if test "$ac_cv_have_dash_pthread" = "no"; then
5234 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5235echo "configure:5236: checking whether ${CC-cc} accepts -pthreads" >&5
5236 echo 'int main() { return 0; }' | cat > conftest.c
5237 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5238 if test $? -eq 0; then
5239 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5240 ac_cv_have_dash_pthreads=yes
5241 CFLAGS="$CFLAGS -pthreads"
5242 CXXFLAGS="$CXXFLAGS -pthreads"
5243 fi
5244 fi
5245 rm -f conftest*
5246 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5247 fi
5248
5249 case "$target" in
5250 *-solaris*)
5251 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5252 _PTHREAD_LDFLAGS=
5253 fi
5254 ;;
5255 *-freebsd*)
5256 cat >> confdefs.h <<\EOF
5257#define _REENTRANT 1
5258EOF
5259
5260 cat >> confdefs.h <<\EOF
5261#define _THREAD_SAFE 1
5262EOF
5263
5264 if test "$ac_cv_have_dash_pthread" = "yes"; then
5265 _PTHREAD_LDFLAGS="-pthread"
5266 else
5267 _PTHREAD_LDFLAGS="-lc_r"
5268 fi
5269 ;;
5270 *-netbsd*)
5271 if test "$ac_cv_have_dash_pthread" = "yes"; then
5272 _PTHREAD_LDFLAGS="-pthread"
5273 fi
5274 ;;
5275 *-bsdi*)
5276 cat >> confdefs.h <<\EOF
5277#define _THREAD_SAFE 1
5278EOF
5279
5280 if test "$ac_cv_have_dash_pthread" = "yes"; then
5281 _PTHREAD_LDFLAGS=
5282 fi
5283 ;;
5284 *-openbsd*)
5285 if test "$ac_cv_have_dash_pthread" = "yes"; then
5286 _PTHREAD_LDFLAGS=-pthread
5287 fi
5288 ;;
5289 *-linux*)
5290 cat >> confdefs.h <<\EOF
5291#define _REENTRANT 1
5292EOF
5293
5294 ;;
5295 esac
5296
5297else
5298 if test -n "$USE_USER_PTHREADS"; then
5299 USE_PTHREADS=
5300 USE_NSPR_THREADS=
5301 else
5302 _PTHREAD_LDFLAGS=
5303 fi
5304fi
5305
5306case "$target" in
5307*-aix*)
5308 if test -n "$USE_NSPR_THREADS"; then
5309 cat >> confdefs.h <<\EOF
5310#define _PR_LOCAL_THREADS_ONLY 1
5311EOF
5312
5313 fi
5314 case "$target_os" in
5315 aix4.1*)
5316 if test -z "$USE_PTHREADS"; then
5317 cat >> confdefs.h <<\EOF
5318#define AIX_RENAME_SELECT 1
5319EOF
5320
5321 fi
5322 ;;
5323 aix4.2*)
5324 if test -z "$USE_NSPR_THREADS"; then
5325 cat >> confdefs.h <<\EOF
5326#define HAVE_POINTER_LOCALTIME_R 1
5327EOF
5328
5329 fi
5330 ;;
5331 aix4.3*)
5332 if test -z "$USE_NSPR_THREADS"; then
5333 cat >> confdefs.h <<\EOF
5334#define HAVE_POINTER_LOCALTIME_R 1
5335EOF
5336
5337 fi
5338 if test -n "$USE_PTHREADS"; then
5339 cat >> confdefs.h <<\EOF
5340#define _PR_HAVE_THREADSAFE_GETHOST 1
5341EOF
5342
5343 fi
5344 ;;
5345 *)
5346 if test -z "$USE_NSPR_THREADS"; then
5347 cat >> confdefs.h <<\EOF
5348#define HAVE_POINTER_LOCALTIME_R 1
5349EOF
5350
5351 fi
5352 if test -n "$USE_PTHREADS"; then
5353 cat >> confdefs.h <<\EOF
5354#define _PR_HAVE_THREADSAFE_GETHOST 1
5355EOF
5356
5357 fi
5358 ;;
5359 esac
5360 ;;
5361*-bsdi*)
5362 if test -n "$USE_PTHREADS"; then
5363 cat >> confdefs.h <<\EOF
5364#define _PR_NEED_PTHREAD_INIT 1
5365EOF
5366
5367 fi
5368 ;;
5369*-freebsd*)
5370 if test -n "$USE_NSPR_THREADS"; then
5371 cat >> confdefs.h <<\EOF
5372#define _PR_LOCAL_THREADS_ONLY 1
5373EOF
5374
5375 fi
5376 ;;
5377*-hpux*)
5378 if test -n "$USE_NSPR_THREADS"; then
5379 cat >> confdefs.h <<\EOF
5380#define _PR_LOCAL_THREADS_ONLY 1
5381EOF
5382
5383 fi
5384 if test "$USE_PTHREADS"; then
5385 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
5386 cat >> confdefs.h <<\EOF
5387#define _REENTRANT 1
5388EOF
5389
5390 cat >> confdefs.h <<\EOF
5391#define _PR_DCETHREADS 1
5392EOF
5393
5394 else
5395 cat >> confdefs.h <<EOF
5396#define _POSIX_C_SOURCE 199506L
5397EOF
5398
5399 cat >> confdefs.h <<\EOF
5400#define _PR_HAVE_THREADSAFE_GETHOST 1
5401EOF
5402
5403 fi
5404 fi
5405 if test "$USE_USER_PTHREADS"; then
5406 cat >> confdefs.h <<EOF
5407#define _POSIX_C_SOURCE 199506L
5408EOF
5409
5410 fi
5411 ;;
5412*-irix*)
5413 if test "${target_os}" = "irix6.5"; then
5414 if test -n "$USE_PTHREADS"; then
5415 cat >> confdefs.h <<\EOF
5416#define _PR_HAVE_GETHOST_R 1
5417EOF
5418
5419 cat >> confdefs.h <<\EOF
5420#define _PR_HAVE_GETHOST_R_POINTER 1
5421EOF
5422
5423 fi
5424 fi
5425 ;;
5426*-linux*)
5427 if test -n "$USE_NSPR_THREADS"; then
5428 cat >> confdefs.h <<\EOF
5429#define _PR_LOCAL_THREADS_ONLY 1
5430EOF
5431
5432 fi
5433 ;;
5434*-mingw*|*-cygwin*|*-msvc*|*-mks*)
5435 USE_PTHREADS=
5436 _PTHREAD_LDFLAGS=
5437 USE_USER_PTHREADS=
5438 ;;
5439*-netbsd*|*-openbsd*)
5440 if test -n "$USE_NSPR_THREADS"; then
5441 cat >> confdefs.h <<\EOF
5442#define _PR_LOCAL_THREADS_ONLY 1
5443EOF
5444
5445 fi
5446 ;;
5447*-osf*)
5448 if test -n "$USE_NSPR_THREADS"; then
5449 cat >> confdefs.h <<\EOF
5450#define _PR_LOCAL_THREADS_ONLY 1
5451EOF
5452
5453 fi
5454 if test -n "$USE_PTHREADS"; then
5455 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
5456 :
5457 else
5458 cat >> confdefs.h <<\EOF
5459#define _PR_HAVE_THREADSAFE_GETHOST 1
5460EOF
5461
5462 fi
5463 fi
5464 ;;
5465*-solaris*)
5466 if test -n "$USE_NATIVE_THREADS"; then
5467 cat >> confdefs.h <<\EOF
5468#define _PR_GLOBAL_THREADS_ONLY 1
5469EOF
5470
5471 else
5472 if test -n "$USE_NSPR_THREADS"; then
5473 cat >> confdefs.h <<\EOF
5474#define _PR_LOCAL_THREADS_ONLY 1
5475EOF
5476
5477 fi
5478 fi
5479 if test -z "$USE_NSPR_THREADS"; then
5480 cat >> confdefs.h <<\EOF
5481#define _REENTRANT 1
5482EOF
5483
5484 cat >> confdefs.h <<\EOF
5485#define HAVE_POINTER_LOCALTIME_R 1
5486EOF
5487
5488 if test "$OS_TEST" = "i86pc"; then
5489 PR_MD_ASFILES=os_SunOS_x86.s
5490 else
5491 PR_MD_ASFILES=os_SunOS.s
5492 if test -n "$USE_64"; then
5493 PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
5494 fi
5495 fi
5496 fi
5497 ;;
5498*-nto*)
5499 if test -n "$USE_PTHREADS"; then
5500 cat >> confdefs.h <<\EOF
5501#define _PR_HAVE_GETHOST_R 1
5502EOF
5503
5504 cat >> confdefs.h <<\EOF
5505#define _PR_HAVE_GETHOST_R_POINTER 1
5506EOF
5507
5508 fi
5509 ;;
5510esac
5511
5512OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
5513
5514if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
5515 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
5516fi
5517
5518if test -n "$MOZ_OPTIMIZE"; then
5519 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
5520 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
5521fi
5522
5523if test -n "$MOZ_DEBUG"; then
5524 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
5525 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
5526fi
5527
5528if test -n "$MOZ_OPTIMIZE"; then
5529 OBJDIR_TAG=_OPT
5530else
5531 OBJDIR_TAG=_DBG
5532fi
5533
5534if test -n "$USE_64"; then
5535 COMPILER_TAG=_64
5536fi
5537
5538RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
5539
5540case "$target_os" in
5541mingw*|cygwin*|msvc*|mks*)
5542 CC="\$(CYGWIN_WRAPPER) $CC"
5543 CXX="\$(CYGWIN_WRAPPER) $CXX"
5544 RC="\$(CYGWIN_WRAPPER) $RC"
5545 ;;
5546esac
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639MAKEFILES="
5640Makefile
5641config/Makefile
5642config/autoconf.mk
5643config/nsprincl.mk
5644config/nsprincl.sh
5645config/nspr-config
5646lib/Makefile
5647lib/ds/Makefile
5648lib/libc/Makefile
5649lib/libc/include/Makefile
5650lib/libc/src/Makefile
5651lib/tests/Makefile
5652pkg/Makefile
5653pkg/linux/Makefile
5654pkg/solaris/Makefile
5655pkg/solaris/SUNWpr/Makefile
5656pkg/solaris/SUNWprx/Makefile
5657pr/Makefile
5658pr/include/Makefile
5659pr/include/md/Makefile
5660pr/include/obsolete/Makefile
5661pr/include/private/Makefile
5662pr/src/Makefile
5663pr/src/io/Makefile
5664pr/src/linking/Makefile
5665pr/src/malloc/Makefile
5666pr/src/md/Makefile
5667pr/src/md/${PR_MD_ARCH_DIR}/Makefile
5668pr/src/memory/Makefile
5669pr/src/misc/Makefile
5670pr/src/threads/Makefile
5671pr/tests/Makefile
5672pr/tests/dll/Makefile
5673"
5674
5675
5676if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
5677 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
5678elif test -n "$USE_PTHREADS"; then
5679 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
5680elif test -n "$USE_BTHREADS"; then
5681 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
5682fi
5683
5684if test -n "$USE_CPLUS"; then
5685 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
5686fi
5687
5688trap '' 1 2 15
5689cat > confcache <<\EOF
5690# This file is a shell script that caches the results of configure
5691# tests run on this system so they can be shared between configure
5692# scripts and configure runs. It is not useful on other systems.
5693# If it contains results you don't want to keep, you may remove or edit it.
5694#
5695# By default, configure uses ./config.cache as the cache file,
5696# creating it if it does not exist already. You can give configure
5697# the --cache-file=FILE option to use a different cache file; that is
5698# what configure does when it calls configure scripts in
5699# subdirectories, so they share the cache.
5700# Giving --cache-file=/dev/null disables caching, for debugging configure.
5701# config.status only pays attention to the cache file if you give it the
5702# --recheck option to rerun configure.
5703#
5704EOF
5705# The following way of writing the cache mishandles newlines in values,
5706# but we know of no workaround that is simple, portable, and efficient.
5707# So, don't put newlines in cache variables' values.
5708# Ultrix sh set writes to stderr and can't be redirected directly,
5709# and sets the high bit in the cache file unless we assign to the vars.
5710(set) 2>&1 |
5711 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5712 *ac_space=\ *)
5713 # `set' does not quote correctly, so add quotes (double-quote substitution
5714 # turns \\\\ into \\, and sed turns \\ into \).
5715 sed -n \
5716 -e "s/'/'\\\\''/g" \
5717 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5718 ;;
5719 *)
5720 # `set' quotes correctly as required by POSIX, so do not add quotes.
5721 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5722 ;;
5723 esac >> confcache
5724if cmp -s $cache_file confcache; then
5725 :
5726else
5727 if test -w $cache_file; then
5728 echo "updating cache $cache_file"
5729 cat confcache > $cache_file
5730 else
5731 echo "not updating unwritable cache $cache_file"
5732 fi
5733fi
5734rm -f confcache
5735
5736trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5737
5738test "x$prefix" = xNONE && prefix=$ac_default_prefix
5739# Let make expand exec_prefix.
5740test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5741
5742# Any assignment to VPATH causes Sun make to only execute
5743# the first set of double-colon rules, so remove it if not needed.
5744# If there is a colon in the path, we need to keep it.
5745if test "x$srcdir" = x.; then
5746 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5747fi
5748
5749trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5750
5751# Transform confdefs.h into DEFS.
5752# Protect against shell expansion while executing Makefile rules.
5753# Protect against Makefile macro expansion.
5754cat > conftest.defs <<\EOF
5755s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
5756s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
5757s%\[%\\&%g
5758s%\]%\\&%g
5759s%\$%$$%g
5760EOF
5761DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
5762rm -f conftest.defs
5763
5764
5765# Without the "./", some shells look in PATH for config.status.
5766: ${CONFIG_STATUS=./config.status}
5767
5768echo creating $CONFIG_STATUS
5769rm -f $CONFIG_STATUS
5770cat > $CONFIG_STATUS <<EOF
5771#! /bin/sh
5772# Generated automatically by configure.
5773# Run this file to recreate the current configuration.
5774# This directory was configured as follows,
5775# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5776#
5777# $0 $ac_configure_args
5778#
5779# Compiler output produced by configure, useful for debugging
5780# configure, is in ./config.log if it exists.
5781
5782ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5783for ac_option
5784do
5785 case "\$ac_option" in
5786 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5787 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5788 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5789 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5790 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5791 exit 0 ;;
5792 -help | --help | --hel | --he | --h)
5793 echo "\$ac_cs_usage"; exit 0 ;;
5794 *) echo "\$ac_cs_usage"; exit 1 ;;
5795 esac
5796done
5797
5798ac_given_srcdir=$srcdir
5799
5800trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5801EOF
5802cat >> $CONFIG_STATUS <<EOF
5803
5804# Protect against being on the right side of a sed subst in config.status.
5805sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5806 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5807$ac_vpsub
5808$extrasub
5809s%@SHELL@%$SHELL%g
5810s%@CFLAGS@%$CFLAGS%g
5811s%@CPPFLAGS@%$CPPFLAGS%g
5812s%@CXXFLAGS@%$CXXFLAGS%g
5813s%@FFLAGS@%$FFLAGS%g
5814s%@DEFS@%$DEFS%g
5815s%@LDFLAGS@%$LDFLAGS%g
5816s%@LIBS@%$LIBS%g
5817s%@exec_prefix@%$exec_prefix%g
5818s%@prefix@%$prefix%g
5819s%@program_transform_name@%$program_transform_name%g
5820s%@bindir@%$bindir%g
5821s%@sbindir@%$sbindir%g
5822s%@libexecdir@%$libexecdir%g
5823s%@datadir@%$datadir%g
5824s%@sysconfdir@%$sysconfdir%g
5825s%@sharedstatedir@%$sharedstatedir%g
5826s%@localstatedir@%$localstatedir%g
5827s%@libdir@%$libdir%g
5828s%@includedir@%$includedir%g
5829s%@oldincludedir@%$oldincludedir%g
5830s%@infodir@%$infodir%g
5831s%@mandir@%$mandir%g
5832s%@host@%$host%g
5833s%@host_alias@%$host_alias%g
5834s%@host_cpu@%$host_cpu%g
5835s%@host_vendor@%$host_vendor%g
5836s%@host_os@%$host_os%g
5837s%@target@%$target%g
5838s%@target_alias@%$target_alias%g
5839s%@target_cpu@%$target_cpu%g
5840s%@target_vendor@%$target_vendor%g
5841s%@target_os@%$target_os%g
5842s%@build@%$build%g
5843s%@build_alias@%$build_alias%g
5844s%@build_cpu@%$build_cpu%g
5845s%@build_vendor@%$build_vendor%g
5846s%@build_os@%$build_os%g
5847s%@CC@%$CC%g
5848s%@dist_prefix@%$dist_prefix%g
5849s%@dist_bindir@%$dist_bindir%g
5850s%@dist_includedir@%$dist_includedir%g
5851s%@dist_libdir@%$dist_libdir%g
5852s%@WHOAMI@%$WHOAMI%g
5853s%@HOST_CC@%$HOST_CC%g
5854s%@CXX@%$CXX%g
5855s%@RANLIB@%$RANLIB%g
5856s%@AR@%$AR%g
5857s%@AS@%$AS%g
5858s%@LD@%$LD%g
5859s%@STRIP@%$STRIP%g
5860s%@WINDRES@%$WINDRES%g
5861s%@CPP@%$CPP%g
5862s%@PERL@%$PERL%g
5863s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
5864s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
5865s%@HOST_CFLAGS@%$HOST_CFLAGS%g
5866s%@GNU_CC@%$GNU_CC%g
5867s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
5868s%@MSC_VER@%$MSC_VER%g
5869s%@CROSS_COMPILE@%$CROSS_COMPILE%g
5870s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
5871s%@USE_CPLUS@%$USE_CPLUS%g
5872s%@USE_IPV6@%$USE_IPV6%g
5873s%@USE_N32@%$USE_N32%g
5874s%@USE_64@%$USE_64%g
5875s%@OBJECT_MODE@%$OBJECT_MODE%g
5876s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
5877s%@ENABLE_STRIP@%$ENABLE_STRIP%g
5878s%@USE_PTHREADS@%$USE_PTHREADS%g
5879s%@USE_BTHREADS@%$USE_BTHREADS%g
5880s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
5881s%@USE_NATIVE_THREADS@%$USE_NATIVE_THREADS%g
5882s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
5883s%@LIBNSPR@%$LIBNSPR%g
5884s%@LIBPLC@%$LIBPLC%g
5885s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
5886s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
5887s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
5888s%@NSPR_MODNAME@%$NSPR_MODNAME%g
5889s%@MDCPUCFG_H@%$MDCPUCFG_H%g
5890s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
5891s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
5892s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
5893s%@CPU_ARCH@%$CPU_ARCH%g
5894s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
5895s%@LIB_SUFFIX@%$LIB_SUFFIX%g
5896s%@DLL_SUFFIX@%$DLL_SUFFIX%g
5897s%@ASM_SUFFIX@%$ASM_SUFFIX%g
5898s%@MKSHLIB@%$MKSHLIB%g
5899s%@DSO_CFLAGS@%$DSO_CFLAGS%g
5900s%@DSO_LDOPTS@%$DSO_LDOPTS%g
5901s%@OS_TARGET@%$OS_TARGET%g
5902s%@OS_ARCH@%$OS_ARCH%g
5903s%@OS_RELEASE@%$OS_RELEASE%g
5904s%@OS_TEST@%$OS_TEST%g
5905s%@MACOS_DEPLOYMENT_TARGET@%$MACOS_DEPLOYMENT_TARGET%g
5906s%@DEFINES@%$DEFINES%g
5907s%@AR_FLAGS@%$AR_FLAGS%g
5908s%@ASFLAGS@%$ASFLAGS%g
5909s%@FILTER@%$FILTER%g
5910s%@IMPLIB@%$IMPLIB%g
5911s%@OS_LIBS@%$OS_LIBS%g
5912s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
5913s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
5914s%@NOSUCHFILE@%$NOSUCHFILE%g
5915s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
5916s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
5917s%@OBJDIR@%$OBJDIR%g
5918s%@OBJDIR_NAME@%$OBJDIR_NAME%g
5919s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
5920s%@NSINSTALL@%$NSINSTALL%g
5921s%@OPTIMIZER@%$OPTIMIZER%g
5922s%@RC@%$RC%g
5923s%@RCFLAGS@%$RCFLAGS%g
5924s%@DLLFLAGS@%$DLLFLAGS%g
5925s%@EXEFLAGS@%$EXEFLAGS%g
5926s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
5927s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
5928
5929CEOF
5930EOF
5931
5932cat >> $CONFIG_STATUS <<\EOF
5933
5934# Split the substitutions into bite-sized pieces for seds with
5935# small command number limits, like on Digital OSF/1 and HP-UX.
5936ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5937ac_file=1 # Number of current file.
5938ac_beg=1 # First line for current file.
5939ac_end=$ac_max_sed_cmds # Line after last line for current file.
5940ac_more_lines=:
5941ac_sed_cmds=""
5942while $ac_more_lines; do
5943 if test $ac_beg -gt 1; then
5944 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5945 else
5946 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5947 fi
5948 if test ! -s conftest.s$ac_file; then
5949 ac_more_lines=false
5950 rm -f conftest.s$ac_file
5951 else
5952 if test -z "$ac_sed_cmds"; then
5953 ac_sed_cmds="sed -f conftest.s$ac_file"
5954 else
5955 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5956 fi
5957 ac_file=`expr $ac_file + 1`
5958 ac_beg=$ac_end
5959 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5960 fi
5961done
5962if test -z "$ac_sed_cmds"; then
5963 ac_sed_cmds=cat
5964fi
5965EOF
5966
5967cat >> $CONFIG_STATUS <<EOF
5968
5969CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
5970EOF
5971cat >> $CONFIG_STATUS <<\EOF
5972for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5973 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5974 case "$ac_file" in
5975 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5976 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5977 *) ac_file_in="${ac_file}.in" ;;
5978 esac
5979
5980 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5981
5982 # Remove last slash and all that follows it. Not all systems have dirname.
5983 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5984 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5985 # The file is in a subdirectory.
5986 test ! -d "$ac_dir" && mkdir "$ac_dir"
5987 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5988 # A "../" for each directory in $ac_dir_suffix.
5989 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5990 else
5991 ac_dir_suffix= ac_dots=
5992 fi
5993
5994 case "$ac_given_srcdir" in
5995 .) srcdir=.
5996 if test -z "$ac_dots"; then top_srcdir=.
5997 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5998 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5999 *) # Relative path.
6000 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6001 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6002 esac
6003
6004
6005 echo creating "$ac_file"
6006 rm -f "$ac_file"
6007 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6008 case "$ac_file" in
6009 *Makefile*) ac_comsub="1i\\
6010# $configure_input" ;;
6011 *) ac_comsub= ;;
6012 esac
6013
6014 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6015 sed -e "$ac_comsub
6016s%@configure_input@%$configure_input%g
6017s%@srcdir@%$srcdir%g
6018s%@top_srcdir@%$top_srcdir%g
6019" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6020fi; done
6021rm -f conftest.s*
6022
6023EOF
6024cat >> $CONFIG_STATUS <<EOF
6025
6026EOF
6027cat >> $CONFIG_STATUS <<\EOF
6028chmod +x config/nspr-config
6029exit 0
6030EOF
6031chmod +x $CONFIG_STATUS
6032rm -fr confdefs* $ac_clean_files
6033test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6034
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette