Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: third_party/nspr/mozilla/nsprpub/configure

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

Powered by Google App Engine
This is Rietveld 408576698