Backed out changeset de5d1b528b9a
[mozilla-central.git] / nsprpub / configure
blobd1b5de72fdd9c4868d35cada8cc4aed5bf4b371f
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-android-ndk=DIR
16 location where the Android NDK can be found"
17 ac_help="$ac_help
18 --with-android-toolchain=DIR
19 location of the android toolchain, default NDK/build/prebuilt/HOST/arm-eabi-4.4.0"
20 ac_help="$ac_help
21 --with-android-platform=DIR
22 location of platform dir, default NDK/build/platforms/android-5/arch-arm"
23 ac_help="$ac_help
24 --with-dist-prefix=DIST_PREFIX
25 place build files in DIST_PREFIX [dist]"
26 ac_help="$ac_help
27 --with-dist-bindir=DIR build execuatables in DIR [DIST_PREFIX/bin]"
28 ac_help="$ac_help
29 --with-dist-includedir=DIR
30 build include files in DIR [DIST_PREFIX/include/nspr]"
31 ac_help="$ac_help
32 --with-dist-libdir=DIR build library files in DIR [DIST_PREFIX/lib]"
33 ac_help="$ac_help
34 --with-mozilla Compile NSPR with Mozilla support"
35 ac_help="$ac_help
36 --enable-optimize[=OPT] Enable code optimizations (ie. -O2) "
37 ac_help="$ac_help
38 --enable-debug[=DBG] Enable debugging (using compiler flags DBG)"
39 ac_help="$ac_help
40 --enable-debug-symbols[=DBG] Enable debugging symbols
41 (using compiler flags DBG)"
42 ac_help="$ac_help
43 --enable-win32-target=\$t
44 Specify win32 flavor. (WIN95 or WINNT)"
45 ac_help="$ac_help
46 --enable-symbian-target=\$t
47 Specify symbian flavor. (WINSCW or GCCE)"
48 ac_help="$ac_help
49 --enable-debug-rtl Use the MSVC debug runtime library"
50 ac_help="$ac_help
51 --enable-n32 Enable n32 ABI support (IRIX only)"
52 ac_help="$ac_help
53 --enable-64bit Enable 64-bit support (on certain platforms)"
54 ac_help="$ac_help
55 --enable-mdupdate Enable use of certain compilers' mdupdate feature"
56 ac_help="$ac_help
57 --enable-cplus Enable some c++ api routines"
58 ac_help="$ac_help
59 --with-arm-kuser Use kuser helpers (Linux/ARM only)
60 (Requires kernel 2.6.13 or later)"
61 ac_help="$ac_help
62 --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
63 ac_help="$ac_help
64 --enable-macos-target=VER
65 Set the minimum MacOS version needed at runtime
66 [10.2 for ppc, 10.4 for x86]"
67 ac_help="$ac_help
68 --disable-os2-high-mem Disable high-memory support on OS/2"
69 ac_help="$ac_help
70 --enable-thumb2 Enable Thumb2 instruction set"
71 ac_help="$ac_help
72 --with-symbian-sdk=SYMBIAN_SDK_DIR
73 The path to the Symbian SDK"
74 ac_help="$ac_help
75 --enable-strip Enable stripping of shared libs and programs"
76 ac_help="$ac_help
77 --with-pthreads Use system pthreads library as thread subsystem"
78 ac_help="$ac_help
79 --enable-user-pthreads Build using userland pthreads"
80 ac_help="$ac_help
81 --enable-nspr-threads Build using classic nspr threads"
82 ac_help="$ac_help
83 --with-bthreads Use system bthreads library as thread subsystem
84 (BeOS only)"
85 ac_help="$ac_help
86 --enable-ipv6 Compile ipv6 support"
87 ac_help="$ac_help
88 --enable-boehm Enable the Boehm Garbage Collector"
89 ac_help="$ac_help
90 --enable-wrap-malloc Wrap malloc calls (gnu linker only)"
91 ac_help="$ac_help
92 --with-wrap-malloc=SHAREDLIB Location of malloc wrapper library"
94 # Initialize some variables set by options.
95 # The variables have the same names as the options, with
96 # dashes changed to underlines.
97 build=NONE
98 cache_file=./config.cache
99 exec_prefix=NONE
100 host=NONE
101 no_create=
102 nonopt=NONE
103 no_recursion=
104 prefix=NONE
105 program_prefix=NONE
106 program_suffix=NONE
107 program_transform_name=s,x,x,
108 silent=
109 site=
110 srcdir=
111 target=NONE
112 verbose=
113 x_includes=NONE
114 x_libraries=NONE
115 bindir='${exec_prefix}/bin'
116 sbindir='${exec_prefix}/sbin'
117 libexecdir='${exec_prefix}/libexec'
118 datadir='${prefix}/share'
119 sysconfdir='${prefix}/etc'
120 sharedstatedir='${prefix}/com'
121 localstatedir='${prefix}/var'
122 libdir='${exec_prefix}/lib'
123 includedir='${prefix}/include'
124 oldincludedir='/usr/include'
125 infodir='${prefix}/info'
126 mandir='${prefix}/man'
128 # Initialize some other variables.
129 subdirs=
130 MFLAGS= MAKEFLAGS=
131 SHELL=${CONFIG_SHELL-/bin/sh}
132 # Maximum number of lines to put in a shell here document.
133 ac_max_here_lines=12
135 ac_prev=
136 for ac_option
139 # If the previous option needs an argument, assign it.
140 if test -n "$ac_prev"; then
141 eval "$ac_prev=\$ac_option"
142 ac_prev=
143 continue
146 case "$ac_option" in
147 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
148 *) ac_optarg= ;;
149 esac
151 # Accept the important Cygnus configure options, so we can diagnose typos.
153 case "$ac_option" in
155 -bindir | --bindir | --bindi | --bind | --bin | --bi)
156 ac_prev=bindir ;;
157 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
158 bindir="$ac_optarg" ;;
160 -build | --build | --buil | --bui | --bu)
161 ac_prev=build ;;
162 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
163 build="$ac_optarg" ;;
165 -cache-file | --cache-file | --cache-fil | --cache-fi \
166 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
167 ac_prev=cache_file ;;
168 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
169 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
170 cache_file="$ac_optarg" ;;
172 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
173 ac_prev=datadir ;;
174 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
175 | --da=*)
176 datadir="$ac_optarg" ;;
178 -disable-* | --disable-*)
179 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
180 # Reject names that are not valid shell variable names.
181 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
182 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
185 eval "enable_${ac_feature}=no" ;;
187 -enable-* | --enable-*)
188 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
189 # Reject names that are not valid shell variable names.
190 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
191 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
193 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
194 case "$ac_option" in
195 *=*) ;;
196 *) ac_optarg=yes ;;
197 esac
198 eval "enable_${ac_feature}='$ac_optarg'" ;;
200 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
201 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
202 | --exec | --exe | --ex)
203 ac_prev=exec_prefix ;;
204 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
205 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
206 | --exec=* | --exe=* | --ex=*)
207 exec_prefix="$ac_optarg" ;;
209 -gas | --gas | --ga | --g)
210 # Obsolete; use --with-gas.
211 with_gas=yes ;;
213 -help | --help | --hel | --he)
214 # Omit some internal or obsolete options to make the list less imposing.
215 # This message is too long to be a string in the A/UX 3.1 sh.
216 cat << EOF
217 Usage: configure [options] [host]
218 Options: [defaults in brackets after descriptions]
219 Configuration:
220 --cache-file=FILE cache test results in FILE
221 --help print this message
222 --no-create do not create output files
223 --quiet, --silent do not print \`checking...' messages
224 --version print the version of autoconf that created configure
225 Directory and file names:
226 --prefix=PREFIX install architecture-independent files in PREFIX
227 [$ac_default_prefix]
228 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
229 [same as prefix]
230 --bindir=DIR user executables in DIR [EPREFIX/bin]
231 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
232 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
233 --datadir=DIR read-only architecture-independent data in DIR
234 [PREFIX/share]
235 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
236 --sharedstatedir=DIR modifiable architecture-independent data in DIR
237 [PREFIX/com]
238 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
239 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
240 --includedir=DIR C header files in DIR [PREFIX/include]
241 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
242 --infodir=DIR info documentation in DIR [PREFIX/info]
243 --mandir=DIR man documentation in DIR [PREFIX/man]
244 --srcdir=DIR find the sources in DIR [configure dir or ..]
245 --program-prefix=PREFIX prepend PREFIX to installed program names
246 --program-suffix=SUFFIX append SUFFIX to installed program names
247 --program-transform-name=PROGRAM
248 run sed PROGRAM on installed program names
250 cat << EOF
251 Host type:
252 --build=BUILD configure for building on BUILD [BUILD=HOST]
253 --host=HOST configure for HOST [guessed]
254 --target=TARGET configure for TARGET [TARGET=HOST]
255 Features and packages:
256 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
257 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
258 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
259 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
260 --x-includes=DIR X include files are in DIR
261 --x-libraries=DIR X library files are in DIR
263 if test -n "$ac_help"; then
264 echo "--enable and --with options recognized:$ac_help"
266 exit 0 ;;
268 -host | --host | --hos | --ho)
269 ac_prev=host ;;
270 -host=* | --host=* | --hos=* | --ho=*)
271 host="$ac_optarg" ;;
273 -includedir | --includedir | --includedi | --included | --include \
274 | --includ | --inclu | --incl | --inc)
275 ac_prev=includedir ;;
276 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
277 | --includ=* | --inclu=* | --incl=* | --inc=*)
278 includedir="$ac_optarg" ;;
280 -infodir | --infodir | --infodi | --infod | --info | --inf)
281 ac_prev=infodir ;;
282 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
283 infodir="$ac_optarg" ;;
285 -libdir | --libdir | --libdi | --libd)
286 ac_prev=libdir ;;
287 -libdir=* | --libdir=* | --libdi=* | --libd=*)
288 libdir="$ac_optarg" ;;
290 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
291 | --libexe | --libex | --libe)
292 ac_prev=libexecdir ;;
293 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
294 | --libexe=* | --libex=* | --libe=*)
295 libexecdir="$ac_optarg" ;;
297 -localstatedir | --localstatedir | --localstatedi | --localstated \
298 | --localstate | --localstat | --localsta | --localst \
299 | --locals | --local | --loca | --loc | --lo)
300 ac_prev=localstatedir ;;
301 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
302 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
303 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
304 localstatedir="$ac_optarg" ;;
306 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
307 ac_prev=mandir ;;
308 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
309 mandir="$ac_optarg" ;;
311 -nfp | --nfp | --nf)
312 # Obsolete; use --without-fp.
313 with_fp=no ;;
315 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
316 | --no-cr | --no-c)
317 no_create=yes ;;
319 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
320 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
321 no_recursion=yes ;;
323 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
324 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
325 | --oldin | --oldi | --old | --ol | --o)
326 ac_prev=oldincludedir ;;
327 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
328 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
329 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
330 oldincludedir="$ac_optarg" ;;
332 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
333 ac_prev=prefix ;;
334 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
335 prefix="$ac_optarg" ;;
337 -program-prefix | --program-prefix | --program-prefi | --program-pref \
338 | --program-pre | --program-pr | --program-p)
339 ac_prev=program_prefix ;;
340 -program-prefix=* | --program-prefix=* | --program-prefi=* \
341 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
342 program_prefix="$ac_optarg" ;;
344 -program-suffix | --program-suffix | --program-suffi | --program-suff \
345 | --program-suf | --program-su | --program-s)
346 ac_prev=program_suffix ;;
347 -program-suffix=* | --program-suffix=* | --program-suffi=* \
348 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
349 program_suffix="$ac_optarg" ;;
351 -program-transform-name | --program-transform-name \
352 | --program-transform-nam | --program-transform-na \
353 | --program-transform-n | --program-transform- \
354 | --program-transform | --program-transfor \
355 | --program-transfo | --program-transf \
356 | --program-trans | --program-tran \
357 | --progr-tra | --program-tr | --program-t)
358 ac_prev=program_transform_name ;;
359 -program-transform-name=* | --program-transform-name=* \
360 | --program-transform-nam=* | --program-transform-na=* \
361 | --program-transform-n=* | --program-transform-=* \
362 | --program-transform=* | --program-transfor=* \
363 | --program-transfo=* | --program-transf=* \
364 | --program-trans=* | --program-tran=* \
365 | --progr-tra=* | --program-tr=* | --program-t=*)
366 program_transform_name="$ac_optarg" ;;
368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
369 | -silent | --silent | --silen | --sile | --sil)
370 silent=yes ;;
372 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
373 ac_prev=sbindir ;;
374 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
375 | --sbi=* | --sb=*)
376 sbindir="$ac_optarg" ;;
378 -sharedstatedir | --sharedstatedir | --sharedstatedi \
379 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
380 | --sharedst | --shareds | --shared | --share | --shar \
381 | --sha | --sh)
382 ac_prev=sharedstatedir ;;
383 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
384 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
385 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
386 | --sha=* | --sh=*)
387 sharedstatedir="$ac_optarg" ;;
389 -site | --site | --sit)
390 ac_prev=site ;;
391 -site=* | --site=* | --sit=*)
392 site="$ac_optarg" ;;
394 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
395 ac_prev=srcdir ;;
396 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
397 srcdir="$ac_optarg" ;;
399 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
400 | --syscon | --sysco | --sysc | --sys | --sy)
401 ac_prev=sysconfdir ;;
402 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
403 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
404 sysconfdir="$ac_optarg" ;;
406 -target | --target | --targe | --targ | --tar | --ta | --t)
407 ac_prev=target ;;
408 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
409 target="$ac_optarg" ;;
411 -v | -verbose | --verbose | --verbos | --verbo | --verb)
412 verbose=yes ;;
414 -version | --version | --versio | --versi | --vers)
415 echo "configure generated by autoconf version 2.13"
416 exit 0 ;;
418 -with-* | --with-*)
419 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
425 case "$ac_option" in
426 *=*) ;;
427 *) ac_optarg=yes ;;
428 esac
429 eval "with_${ac_package}='$ac_optarg'" ;;
431 -without-* | --without-*)
432 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
438 eval "with_${ac_package}=no" ;;
440 --x)
441 # Obsolete; use --with-x.
442 with_x=yes ;;
444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
445 | --x-incl | --x-inc | --x-in | --x-i)
446 ac_prev=x_includes ;;
447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
449 x_includes="$ac_optarg" ;;
451 -x-libraries | --x-libraries | --x-librarie | --x-librari \
452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
453 ac_prev=x_libraries ;;
454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
456 x_libraries="$ac_optarg" ;;
458 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
462 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
463 echo "configure: warning: $ac_option: invalid host type" 1>&2
465 if test "x$nonopt" != xNONE; then
466 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
468 nonopt="$ac_option"
471 esac
472 done
474 if test -n "$ac_prev"; then
475 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
480 # File descriptor usage:
481 # 0 standard input
482 # 1 file creation
483 # 2 errors and warnings
484 # 3 some systems may open it to /dev/tty
485 # 4 used on the Kubota Titan
486 # 6 checking for... messages and results
487 # 5 compiler messages saved in config.log
488 if test "$silent" = yes; then
489 exec 6>/dev/null
490 else
491 exec 6>&1
493 exec 5>./config.log
495 echo "\
496 This file contains any messages produced by compilers while
497 running configure, to aid debugging if configure makes a mistake.
498 " 1>&5
500 # Strip out --no-create and --no-recursion so they do not pile up.
501 # Also quote any args containing shell metacharacters.
502 ac_configure_args=
503 for ac_arg
505 case "$ac_arg" in
506 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
507 | --no-cr | --no-c) ;;
508 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
509 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
510 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
511 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
512 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
513 esac
514 done
516 # NLS nuisances.
517 # Only set these to C if already set. These must not be set unconditionally
518 # because not all systems understand e.g. LANG=C (notably SCO).
519 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
520 # Non-C LC_CTYPE values break the ctype check.
521 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
522 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
523 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
524 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
526 # confdefs.h avoids OS command line length limits that DEFS can exceed.
527 rm -rf conftest* confdefs.h
528 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
529 echo > confdefs.h
531 # A filename unique to this package, relative to the directory that
532 # configure is in, which we can look for to find out if srcdir is correct.
533 ac_unique_file=config/libc_r.h
535 # Find the source files, if location was not specified.
536 if test -z "$srcdir"; then
537 ac_srcdir_defaulted=yes
538 # Try the directory containing this script, then its parent.
539 ac_prog=$0
540 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
541 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
542 srcdir=$ac_confdir
543 if test ! -r $srcdir/$ac_unique_file; then
544 srcdir=..
546 else
547 ac_srcdir_defaulted=no
549 if test ! -r $srcdir/$ac_unique_file; then
550 if test "$ac_srcdir_defaulted" = yes; then
551 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
552 else
553 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
558 # Prefer explicitly selected file to automatically selected ones.
559 if test -z "$CONFIG_SITE"; then
560 if test "x$prefix" != xNONE; then
561 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
562 else
563 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566 for ac_site_file in $CONFIG_SITE; do
567 if test -r "$ac_site_file"; then
568 echo "loading site script $ac_site_file"
569 . "$ac_site_file"
571 done
573 if test -r "$cache_file"; then
574 echo "loading cache $cache_file"
575 . $cache_file
576 else
577 echo "creating cache $cache_file"
578 > $cache_file
581 ac_ext=c
582 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
583 ac_cpp='$CPP $CPPFLAGS'
584 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
585 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
586 cross_compiling=$ac_cv_prog_cc_cross
588 ac_exeext=
589 ac_objext=o
590 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
591 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
592 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
593 ac_n= ac_c='
594 ' ac_t=' '
595 else
596 ac_n=-n ac_c= ac_t=
598 else
599 ac_n= ac_c='\c' ac_t=
604 ac_aux_dir=
605 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
606 if test -f $ac_dir/install-sh; then
607 ac_aux_dir=$ac_dir
608 ac_install_sh="$ac_aux_dir/install-sh -c"
609 break
610 elif test -f $ac_dir/install.sh; then
611 ac_aux_dir=$ac_dir
612 ac_install_sh="$ac_aux_dir/install.sh -c"
613 break
615 done
616 if test -z "$ac_aux_dir"; then
617 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
619 ac_config_guess=$ac_aux_dir/config.guess
620 ac_config_sub=$ac_aux_dir/config.sub
621 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
624 # Do some error checking and defaulting for the host and target type.
625 # The inputs are:
626 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
628 # The rules are:
629 # 1. You are not allowed to specify --host, --target, and nonopt at the
630 # same time.
631 # 2. Host defaults to nonopt.
632 # 3. If nonopt is not specified, then host defaults to the current host,
633 # as determined by config.guess.
634 # 4. Target and build default to nonopt.
635 # 5. If nonopt is not specified, then target and build default to host.
637 # The aliases save the names the user supplied, while $host etc.
638 # will get canonicalized.
639 case $host---$target---$nonopt in
640 NONE---*---* | *---NONE---* | *---*---NONE) ;;
641 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
642 esac
645 # Make sure we can run config.sub.
646 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
647 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
650 echo $ac_n "checking host system type""... $ac_c" 1>&6
651 echo "configure:652: checking host system type" >&5
653 host_alias=$host
654 case "$host_alias" in
655 NONE)
656 case $nonopt in
657 NONE)
658 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
659 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
660 fi ;;
661 *) host_alias=$nonopt ;;
662 esac ;;
663 esac
665 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
666 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
667 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
668 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
669 echo "$ac_t""$host" 1>&6
671 echo $ac_n "checking target system type""... $ac_c" 1>&6
672 echo "configure:673: checking target system type" >&5
674 target_alias=$target
675 case "$target_alias" in
676 NONE)
677 case $nonopt in
678 NONE) target_alias=$host_alias ;;
679 *) target_alias=$nonopt ;;
680 esac ;;
681 esac
683 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
684 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
685 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
686 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
687 echo "$ac_t""$target" 1>&6
689 echo $ac_n "checking build system type""... $ac_c" 1>&6
690 echo "configure:691: checking build system type" >&5
692 build_alias=$build
693 case "$build_alias" in
694 NONE)
695 case $nonopt in
696 NONE) build_alias=$host_alias ;;
697 *) build_alias=$nonopt ;;
698 esac ;;
699 esac
701 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
702 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
703 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
704 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
705 echo "$ac_t""$build" 1>&6
707 test "$host_alias" != "$target_alias" &&
708 test "$program_prefix$program_suffix$program_transform_name" = \
709 NONENONEs,x,x, &&
710 program_prefix=${target_alias}-
713 MOD_MAJOR_VERSION=4
714 MOD_MINOR_VERSION=8
715 MOD_PATCH_VERSION=6
716 NSPR_MODNAME=nspr20
717 _HAVE_PTHREADS=
718 USE_PTHREADS=
719 USE_USER_PTHREADS=
720 USE_NSPR_THREADS=
721 USE_N32=
722 USE_64=
723 USE_CPLUS=
724 USE_IPV6=
725 USE_MDUPDATE=
726 _MACOSX_DEPLOYMENT_TARGET=
727 _OPTIMIZE_FLAGS=-O
728 _DEBUG_FLAGS=-g
729 MOZ_DEBUG=1
730 MOZ_OPTIMIZE=
731 OBJDIR='$(OBJDIR_NAME)'
732 OBJDIR_NAME=.
733 OBJDIR_SUFFIX=OBJ
734 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
735 NOSUCHFILE=/no-such-file
736 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
737 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
738 CYGWIN_WRAPPER=
739 MACOS_SDK_DIR=
740 NEXT_ROOT=
742 MOZ_OS2_HIGH_MEMORY=1
743 MOZ_THUMB2=
744 PROFILE_GEN_CFLAGS=
745 PROFILE_GEN_LDFLAGS=
746 PROFILE_USE_CFLAGS=
747 PROFILE_USE_LDFLAGS=
749 RESOLVE_LINK_SYMBOLS=
751 CFLAGS="${CFLAGS=}"
752 CXXFLAGS="${CXXFLAGS=}"
753 LDFLAGS="${LDFLAGS=}"
754 DLLFLAGS="${DLLFLAGS=}"
755 HOST_CFLAGS="${HOST_CFLAGS=}"
756 HOST_LDFLAGS="${HOST_LDFLAGS=}"
758 case "$target" in
759 *-cygwin*|*-mingw*)
760 # Check to see if we are really running in a msvc environemnt
761 _WIN32_MSVC=
762 for ac_prog in cl
764 # Extract the first word of "$ac_prog", so it can be a program name with args.
765 set dummy $ac_prog; ac_word=$2
766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
767 echo "configure:768: checking for $ac_word" >&5
768 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
769 echo $ac_n "(cached) $ac_c" 1>&6
770 else
771 if test -n "$CC"; then
772 ac_cv_prog_CC="$CC" # Let the user override the test.
773 else
774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
775 ac_dummy="$PATH"
776 for ac_dir in $ac_dummy; do
777 test -z "$ac_dir" && ac_dir=.
778 if test -f $ac_dir/$ac_word; then
779 ac_cv_prog_CC="$ac_prog"
780 break
782 done
783 IFS="$ac_save_ifs"
786 CC="$ac_cv_prog_CC"
787 if test -n "$CC"; then
788 echo "$ac_t""$CC" 1>&6
789 else
790 echo "$ac_t""no" 1>&6
793 test -n "$CC" && break
794 done
796 if test "$CC" = "cl"; then
797 echo 'main() { return 0; }' > dummy.c
798 ${CC} -o dummy dummy.c >/dev/null 2>&1
799 if test $? = 0; then
800 _WIN32_MSVC=1
801 CXX=$CC
802 else
803 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
805 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
808 *-msvc*)
809 _WIN32_MSVC=1
811 *-mks*)
812 _WIN32_MSVC=1
814 esac
816 if test -n "$_WIN32_MSVC"; then
817 SKIP_PATH_CHECKS=1
818 SKIP_COMPILER_CHECKS=1
819 SKIP_LIBRARY_CHECKS=1
823 # Check whether --with-android-ndk or --without-android-ndk was given.
824 if test "${with_android_ndk+set}" = set; then
825 withval="$with_android_ndk"
826 android_ndk=$withval
830 # Check whether --with-android-toolchain or --without-android-toolchain was given.
831 if test "${with_android_toolchain+set}" = set; then
832 withval="$with_android_toolchain"
833 android_toolchain=$withval
837 # Check whether --with-android-platform or --without-android-platform was given.
838 if test "${with_android_platform+set}" = set; then
839 withval="$with_android_platform"
840 android_platform=$withval
844 if test "$target" = "arm-android-eabi" ; then
845 if test -z "$android_ndk" ; then
846 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
849 if test -z "$android_toolchain" ; then
850 android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[:upper:]" "[:lower:]"`-x86/arm-eabi-4.4.0
853 if test -z "$android_platform" ; then
854 android_platform="$android_ndk"/build/platforms/android-5/arch-arm
857 AS="$android_toolchain"/bin/arm-eabi-as
858 CC="$android_toolchain"/bin/arm-eabi-gcc
859 CXX="$android_toolchain"/bin/arm-eabi-g++
860 CPP="$android_toolchain"/bin/arm-eabi-cpp
861 LD="$android_toolchain"/bin/arm-eabi-ld
862 AR="$android_toolchain"/bin/arm-eabi-ar
863 RANLIB="$android_toolchain"/bin/arm-eabi-ranlib
864 STRIP="$android_toolchain"/bin/arm-eabi-strip
866 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
867 CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CFLAGS"
868 CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
869 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
871 if test -z "$HOST_CPPFLAGS" ; then
872 HOST_CPPFLAGS=" "
874 if test -z "$HOST_CFLAGS" ; then
875 HOST_CFLAGS=" "
877 if test -z "$HOST_CXXFLAGS" ; then
878 HOST_CXXFLAGS=" "
880 if test -z "$HOST_LDFLAGS" ; then
881 HOST_LDFLAGS=" "
884 cat >> confdefs.h <<\EOF
885 #define ANDROID 1
890 dist_prefix='${MOD_DEPTH}/dist'
891 dist_bindir='${dist_prefix}/bin'
892 dist_includedir='${dist_prefix}/include/nspr'
893 dist_libdir='${dist_prefix}/lib'
894 if test "${includedir}" = '${prefix}/include'; then
895 includedir='${prefix}/include/nspr'
898 # Check whether --with-dist-prefix or --without-dist-prefix was given.
899 if test "${with_dist_prefix+set}" = set; then
900 withval="$with_dist_prefix"
901 dist_prefix=$withval
905 # Check whether --with-dist-bindir or --without-dist-bindir was given.
906 if test "${with_dist_bindir+set}" = set; then
907 withval="$with_dist_bindir"
908 dist_bindir=$withval
912 # Check whether --with-dist-includedir or --without-dist-includedir was given.
913 if test "${with_dist_includedir+set}" = set; then
914 withval="$with_dist_includedir"
915 dist_includedir=$withval
919 # Check whether --with-dist-libdir or --without-dist-libdir was given.
920 if test "${with_dist_libdir+set}" = set; then
921 withval="$with_dist_libdir"
922 dist_libdir=$withval
931 # Check whether --with-mozilla or --without-mozilla was given.
932 if test "${with_mozilla+set}" = set; then
933 withval="$with_mozilla"
934 if test "$withval" = "yes"; then
935 cat >> confdefs.h <<\EOF
936 #define MOZILLA_CLIENT 1
939 MOZILLA_CLIENT=1
940 else
941 MOZILLA_CLIENT=
943 else
944 if test -n "$MOZILLA_CLIENT"; then
945 cat >> confdefs.h <<\EOF
946 #define MOZILLA_CLIENT 1
953 # Check whether --enable-optimize or --disable-optimize was given.
954 if test "${enable_optimize+set}" = set; then
955 enableval="$enable_optimize"
956 if test "$enableval" != "no"; then
957 MOZ_OPTIMIZE=1
958 if test -n "$enableval" -a "$enableval" != "yes"; then
959 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
960 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
962 else
963 MOZ_OPTIMIZE=
968 # Check whether --enable-debug or --disable-debug was given.
969 if test "${enable_debug+set}" = set; then
970 enableval="$enable_debug"
971 if test "$enableval" != "no"; then
972 MOZ_DEBUG=1
973 MOZ_DEBUG_SYMBOLS=1
974 if test -n "$enableval" -a "$enableval" != "yes"; then
975 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
976 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
978 else
979 MOZ_DEBUG=
981 else
982 MOZ_DEBUG_SYMBOLS=1
986 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
987 if test "${enable_debug_symbols+set}" = set; then
988 enableval="$enable_debug_symbols"
989 if test "$enableval" != "no"; then
990 MOZ_DEBUG_SYMBOLS=1
991 if test -n "$enableval" -a "$enableval" != "yes"; then
992 if test -z "$_SAVE_DEBUG_FLAGS"; then
993 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
994 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
995 else
996 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
999 else
1000 MOZ_DEBUG_SYMBOLS=
1005 # Check whether --enable-win32-target or --disable-win32-target was given.
1006 if test "${enable_win32_target+set}" = set; then
1007 enableval="$enable_win32_target"
1008 OS_TARGET=`echo $enableval | tr a-z A-Z`
1012 # Check whether --enable-symbian-target or --disable-symbian-target was given.
1013 if test "${enable_symbian_target+set}" = set; then
1014 enableval="$enable_symbian_target"
1015 OS_TARGET=`echo $enableval | tr a-z A-Z`
1019 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
1020 if test "${enable_debug_rtl+set}" = set; then
1021 enableval="$enable_debug_rtl"
1022 if test "$enableval" = "yes"; then
1023 USE_DEBUG_RTL=1
1028 # Check whether --enable-n32 or --disable-n32 was given.
1029 if test "${enable_n32+set}" = set; then
1030 enableval="$enable_n32"
1031 if test "$enableval" = "yes"; then
1032 USE_N32=1
1033 else if test "$enableval" = "no"; then
1034 USE_N32=
1040 # Check whether --enable-64bit or --disable-64bit was given.
1041 if test "${enable_64bit+set}" = set; then
1042 enableval="$enable_64bit"
1043 if test "$enableval" = "yes"; then
1044 USE_64=1
1049 # Check whether --enable-mdupdate or --disable-mdupdate was given.
1050 if test "${enable_mdupdate+set}" = set; then
1051 enableval="$enable_mdupdate"
1052 if test "$enableval" = "yes"; then
1053 USE_MDUPDATE=1
1058 # Check whether --enable-cplus or --disable-cplus was given.
1059 if test "${enable_cplus+set}" = set; then
1060 enableval="$enable_cplus"
1061 if test "$enableval" = "yes"; then
1062 USE_CPLUS=1
1067 # Check whether --with-arm-kuser or --without-arm-kuser was given.
1068 if test "${with_arm_kuser+set}" = set; then
1069 withval="$with_arm_kuser"
1070 if test "$withval" = "yes"; then
1071 cat >> confdefs.h <<\EOF
1072 #define _PR_ARM_KUSER 1
1079 # Check whether --with-macos-sdk or --without-macos-sdk was given.
1080 if test "${with_macos_sdk+set}" = set; then
1081 withval="$with_macos_sdk"
1082 MACOS_SDK_DIR=$withval
1086 # Check whether --enable-macos-target or --disable-macos-target was given.
1087 if test "${enable_macos_target+set}" = set; then
1088 enableval="$enable_macos_target"
1089 _MACOSX_DEPLOYMENT_TARGET=$enableval
1093 case "$target" in
1095 *-aix*)
1096 case "${target_os}" in
1097 aix3.2*)
1098 USE_NSPR_THREADS=1
1101 USE_PTHREADS=1
1103 esac
1106 esac
1108 if test -z "$CC"; then
1109 case "$target" in
1111 *-aix*)
1112 if test -z "$USE_NSPR_THREADS"; then
1113 CC=xlc_r
1114 else
1115 CC=xlc
1119 *-hpux*)
1120 CC=cc
1123 *-irix*)
1124 CC=cc
1127 *-osf*)
1128 CC=cc
1131 *-solaris*)
1132 CC=cc
1135 esac
1138 if test -z "$CXX"; then
1139 case "$target" in
1141 *-aix*)
1142 if test -z "$USE_NSPR_THREADS"; then
1143 CXX=xlC_r
1144 else
1145 CXX=xlC
1149 *-hpux*)
1150 case "${target_os}" in
1151 hpux10.30)
1152 CXX=aCC
1154 hpux11.*)
1155 CXX=aCC
1158 CXX=CC
1160 esac
1163 *-irix*)
1164 CXX=CC
1167 *-osf*)
1168 CXX=cxx
1171 *-solaris*)
1172 CXX=CC
1175 esac
1178 if test -z "$SKIP_PATH_CHECKS"; then
1179 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1180 set dummy $WHOAMI whoami; ac_word=$2
1181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1182 echo "configure:1183: checking for $ac_word" >&5
1183 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1184 echo $ac_n "(cached) $ac_c" 1>&6
1185 else
1186 case "$WHOAMI" in
1188 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1190 ?:/*)
1191 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1195 ac_dummy="$PATH"
1196 for ac_dir in $ac_dummy; do
1197 test -z "$ac_dir" && ac_dir=.
1198 if test -f $ac_dir/$ac_word; then
1199 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1200 break
1202 done
1203 IFS="$ac_save_ifs"
1204 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1206 esac
1208 WHOAMI="$ac_cv_path_WHOAMI"
1209 if test -n "$WHOAMI"; then
1210 echo "$ac_t""$WHOAMI" 1>&6
1211 else
1212 echo "$ac_t""no" 1>&6
1217 if test -n "$MOZ_DEBUG"; then
1218 cat >> confdefs.h <<\EOF
1219 #define DEBUG 1
1222 DEFINES="$DEFINES -UNDEBUG"
1224 case "${target_os}" in
1225 beos*)
1226 DEFINES="$DEFINES -DDEBUG_${USER}"
1228 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1229 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1232 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1234 esac
1235 else
1236 cat >> confdefs.h <<\EOF
1237 #define NDEBUG 1
1240 DEFINES="$DEFINES -UDEBUG"
1243 if test -z "$SKIP_COMPILER_CHECKS"; then
1244 if test "$target" != "$host"; then
1245 echo "cross compiling from $host to $target"
1246 cross_compiling=yes
1248 _SAVE_CC="$CC"
1249 _SAVE_CFLAGS="$CFLAGS"
1250 _SAVE_LDFLAGS="$LDFLAGS"
1252 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1253 echo "configure:1254: checking for $host compiler" >&5
1254 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1256 # Extract the first word of "$ac_prog", so it can be a program name with args.
1257 set dummy $ac_prog; ac_word=$2
1258 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1259 echo "configure:1260: checking for $ac_word" >&5
1260 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1261 echo $ac_n "(cached) $ac_c" 1>&6
1262 else
1263 if test -n "$HOST_CC"; then
1264 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1265 else
1266 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1267 ac_dummy="$PATH"
1268 for ac_dir in $ac_dummy; do
1269 test -z "$ac_dir" && ac_dir=.
1270 if test -f $ac_dir/$ac_word; then
1271 ac_cv_prog_HOST_CC="$ac_prog"
1272 break
1274 done
1275 IFS="$ac_save_ifs"
1278 HOST_CC="$ac_cv_prog_HOST_CC"
1279 if test -n "$HOST_CC"; then
1280 echo "$ac_t""$HOST_CC" 1>&6
1281 else
1282 echo "$ac_t""no" 1>&6
1285 test -n "$HOST_CC" && break
1286 done
1287 test -n "$HOST_CC" || HOST_CC=""""
1289 if test -z "$HOST_CC"; then
1290 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1292 echo "$ac_t""$HOST_CC" 1>&6
1293 if test -z "$HOST_CFLAGS"; then
1294 HOST_CFLAGS="$CFLAGS"
1296 if test -z "$HOST_LDFLAGS"; then
1297 HOST_LDFLAGS="$LDFLAGS"
1300 CC="$HOST_CC"
1301 CFLAGS="$HOST_CFLAGS"
1302 LDFLAGS="$HOST_LDFLAGS"
1304 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1305 echo "configure:1306: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1306 cat > conftest.$ac_ext <<EOF
1307 #line 1308 "configure"
1308 #include "confdefs.h"
1310 int main() {
1311 return(0);
1312 ; return 0; }
1314 if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1315 rm -rf conftest*
1316 ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1317 else
1318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
1320 rm -rf conftest*
1321 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1323 rm -f conftest*
1325 CC=$_SAVE_CC
1326 CFLAGS=$_SAVE_CFLAGS
1327 LDFLAGS=$_SAVE_LDFLAGS
1329 case "$build:$target" in
1330 powerpc-apple-darwin8*:i?86-apple-darwin*)
1331 _SAVE_CFLAGS=$CFLAGS
1332 _SAVE_CXXFLAGS=$CXXLAGS
1333 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1334 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1336 esac
1338 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1340 # Extract the first word of "$ac_prog", so it can be a program name with args.
1341 set dummy $ac_prog; 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="$ac_prog"
1356 break
1358 done
1359 IFS="$ac_save_ifs"
1362 CC="$ac_cv_prog_CC"
1363 if test -n "$CC"; then
1364 echo "$ac_t""$CC" 1>&6
1365 else
1366 echo "$ac_t""no" 1>&6
1369 test -n "$CC" && break
1370 done
1371 test -n "$CC" || CC="echo"
1373 unset ac_cv_prog_CC
1374 # Extract the first word of "gcc", so it can be a program name with args.
1375 set dummy gcc; ac_word=$2
1376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1377 echo "configure:1378: checking for $ac_word" >&5
1378 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1379 echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381 if test -n "$CC"; then
1382 ac_cv_prog_CC="$CC" # Let the user override the test.
1383 else
1384 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1385 ac_dummy="$PATH"
1386 for ac_dir in $ac_dummy; do
1387 test -z "$ac_dir" && ac_dir=.
1388 if test -f $ac_dir/$ac_word; then
1389 ac_cv_prog_CC="gcc"
1390 break
1392 done
1393 IFS="$ac_save_ifs"
1396 CC="$ac_cv_prog_CC"
1397 if test -n "$CC"; then
1398 echo "$ac_t""$CC" 1>&6
1399 else
1400 echo "$ac_t""no" 1>&6
1403 if test -z "$CC"; then
1404 # Extract the first word of "cc", so it can be a program name with args.
1405 set dummy cc; ac_word=$2
1406 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1407 echo "configure:1408: checking for $ac_word" >&5
1408 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1409 echo $ac_n "(cached) $ac_c" 1>&6
1410 else
1411 if test -n "$CC"; then
1412 ac_cv_prog_CC="$CC" # Let the user override the test.
1413 else
1414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1415 ac_prog_rejected=no
1416 ac_dummy="$PATH"
1417 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 if test -f $ac_dir/$ac_word; then
1420 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1421 ac_prog_rejected=yes
1422 continue
1424 ac_cv_prog_CC="cc"
1425 break
1427 done
1428 IFS="$ac_save_ifs"
1429 if test $ac_prog_rejected = yes; then
1430 # We found a bogon in the path, so make sure we never use it.
1431 set dummy $ac_cv_prog_CC
1432 shift
1433 if test $# -gt 0; then
1434 # We chose a different compiler from the bogus one.
1435 # However, it has the same basename, so the bogon will be chosen
1436 # first if we set CC to just the basename; use the full file name.
1437 shift
1438 set dummy "$ac_dir/$ac_word" "$@"
1439 shift
1440 ac_cv_prog_CC="$@"
1445 CC="$ac_cv_prog_CC"
1446 if test -n "$CC"; then
1447 echo "$ac_t""$CC" 1>&6
1448 else
1449 echo "$ac_t""no" 1>&6
1452 if test -z "$CC"; then
1453 case "`uname -s`" in
1454 *win32* | *WIN32*)
1455 # Extract the first word of "cl", so it can be a program name with args.
1456 set dummy cl; ac_word=$2
1457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1458 echo "configure:1459: checking for $ac_word" >&5
1459 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1460 echo $ac_n "(cached) $ac_c" 1>&6
1461 else
1462 if test -n "$CC"; then
1463 ac_cv_prog_CC="$CC" # Let the user override the test.
1464 else
1465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1466 ac_dummy="$PATH"
1467 for ac_dir in $ac_dummy; do
1468 test -z "$ac_dir" && ac_dir=.
1469 if test -f $ac_dir/$ac_word; then
1470 ac_cv_prog_CC="cl"
1471 break
1473 done
1474 IFS="$ac_save_ifs"
1477 CC="$ac_cv_prog_CC"
1478 if test -n "$CC"; then
1479 echo "$ac_t""$CC" 1>&6
1480 else
1481 echo "$ac_t""no" 1>&6
1484 esac
1486 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1489 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1490 echo "configure:1491: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1492 ac_ext=c
1493 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1494 ac_cpp='$CPP $CPPFLAGS'
1495 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1496 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1497 cross_compiling=$ac_cv_prog_cc_cross
1499 cat > conftest.$ac_ext << EOF
1501 #line 1502 "configure"
1502 #include "confdefs.h"
1504 main(){return(0);}
1506 if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1507 ac_cv_prog_cc_works=yes
1508 # If we can't run a trivial program, we are probably using a cross compiler.
1509 if (./conftest; exit) 2>/dev/null; then
1510 ac_cv_prog_cc_cross=no
1511 else
1512 ac_cv_prog_cc_cross=yes
1514 else
1515 echo "configure: failed program was:" >&5
1516 cat conftest.$ac_ext >&5
1517 ac_cv_prog_cc_works=no
1519 rm -fr conftest*
1520 ac_ext=c
1521 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1522 ac_cpp='$CPP $CPPFLAGS'
1523 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1524 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1525 cross_compiling=$ac_cv_prog_cc_cross
1527 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1528 if test $ac_cv_prog_cc_works = no; then
1529 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1531 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1532 echo "configure:1533: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1533 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1534 cross_compiling=$ac_cv_prog_cc_cross
1536 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1537 echo "configure:1538: checking whether we are using GNU C" >&5
1538 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1539 echo $ac_n "(cached) $ac_c" 1>&6
1540 else
1541 cat > conftest.c <<EOF
1542 #ifdef __GNUC__
1543 yes;
1544 #endif
1546 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1547 ac_cv_prog_gcc=yes
1548 else
1549 ac_cv_prog_gcc=no
1553 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1555 if test $ac_cv_prog_gcc = yes; then
1556 GCC=yes
1557 else
1558 GCC=
1561 ac_test_CFLAGS="${CFLAGS+set}"
1562 ac_save_CFLAGS="$CFLAGS"
1563 CFLAGS=
1564 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1565 echo "configure:1566: checking whether ${CC-cc} accepts -g" >&5
1566 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1567 echo $ac_n "(cached) $ac_c" 1>&6
1568 else
1569 echo 'void f(){}' > conftest.c
1570 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1571 ac_cv_prog_cc_g=yes
1572 else
1573 ac_cv_prog_cc_g=no
1575 rm -f conftest*
1579 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1580 if test "$ac_test_CFLAGS" = set; then
1581 CFLAGS="$ac_save_CFLAGS"
1582 elif test $ac_cv_prog_cc_g = yes; then
1583 if test "$GCC" = yes; then
1584 CFLAGS="-g -O2"
1585 else
1586 CFLAGS="-g"
1588 else
1589 if test "$GCC" = yes; then
1590 CFLAGS="-O2"
1591 else
1592 CFLAGS=
1596 if test -n "$USE_CPLUS"; then
1597 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1599 # Extract the first word of "$ac_prog", so it can be a program name with args.
1600 set dummy $ac_prog; ac_word=$2
1601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1602 echo "configure:1603: checking for $ac_word" >&5
1603 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606 if test -n "$CXX"; then
1607 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1608 else
1609 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
1612 test -z "$ac_dir" && ac_dir=.
1613 if test -f $ac_dir/$ac_word; then
1614 ac_cv_prog_CXX="$ac_prog"
1615 break
1617 done
1618 IFS="$ac_save_ifs"
1621 CXX="$ac_cv_prog_CXX"
1622 if test -n "$CXX"; then
1623 echo "$ac_t""$CXX" 1>&6
1624 else
1625 echo "$ac_t""no" 1>&6
1628 test -n "$CXX" && break
1629 done
1630 test -n "$CXX" || CXX="echo"
1632 unset ac_cv_prog_CXX
1633 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1635 # Extract the first word of "$ac_prog", so it can be a program name with args.
1636 set dummy $ac_prog; ac_word=$2
1637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1638 echo "configure:1639: checking for $ac_word" >&5
1639 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1640 echo $ac_n "(cached) $ac_c" 1>&6
1641 else
1642 if test -n "$CXX"; then
1643 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1644 else
1645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1646 ac_dummy="$PATH"
1647 for ac_dir in $ac_dummy; do
1648 test -z "$ac_dir" && ac_dir=.
1649 if test -f $ac_dir/$ac_word; then
1650 ac_cv_prog_CXX="$ac_prog"
1651 break
1653 done
1654 IFS="$ac_save_ifs"
1657 CXX="$ac_cv_prog_CXX"
1658 if test -n "$CXX"; then
1659 echo "$ac_t""$CXX" 1>&6
1660 else
1661 echo "$ac_t""no" 1>&6
1664 test -n "$CXX" && break
1665 done
1666 test -n "$CXX" || CXX="gcc"
1669 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1670 echo "configure:1671: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1672 ac_ext=C
1673 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1674 ac_cpp='$CXXCPP $CPPFLAGS'
1675 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1676 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1677 cross_compiling=$ac_cv_prog_cxx_cross
1679 cat > conftest.$ac_ext << EOF
1681 #line 1682 "configure"
1682 #include "confdefs.h"
1684 int main(){return(0);}
1686 if { (eval echo configure:1687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1687 ac_cv_prog_cxx_works=yes
1688 # If we can't run a trivial program, we are probably using a cross compiler.
1689 if (./conftest; exit) 2>/dev/null; then
1690 ac_cv_prog_cxx_cross=no
1691 else
1692 ac_cv_prog_cxx_cross=yes
1694 else
1695 echo "configure: failed program was:" >&5
1696 cat conftest.$ac_ext >&5
1697 ac_cv_prog_cxx_works=no
1699 rm -fr conftest*
1700 ac_ext=c
1701 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1702 ac_cpp='$CPP $CPPFLAGS'
1703 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1704 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1705 cross_compiling=$ac_cv_prog_cc_cross
1707 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1708 if test $ac_cv_prog_cxx_works = no; then
1709 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1711 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1712 echo "configure:1713: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1713 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1714 cross_compiling=$ac_cv_prog_cxx_cross
1716 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1717 echo "configure:1718: checking whether we are using GNU C++" >&5
1718 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1719 echo $ac_n "(cached) $ac_c" 1>&6
1720 else
1721 cat > conftest.C <<EOF
1722 #ifdef __GNUC__
1723 yes;
1724 #endif
1726 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1727 ac_cv_prog_gxx=yes
1728 else
1729 ac_cv_prog_gxx=no
1733 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1735 if test $ac_cv_prog_gxx = yes; then
1736 GXX=yes
1737 else
1738 GXX=
1741 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1742 ac_save_CXXFLAGS="$CXXFLAGS"
1743 CXXFLAGS=
1744 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1745 echo "configure:1746: checking whether ${CXX-g++} accepts -g" >&5
1746 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749 echo 'void f(){}' > conftest.cc
1750 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1751 ac_cv_prog_cxx_g=yes
1752 else
1753 ac_cv_prog_cxx_g=no
1755 rm -f conftest*
1759 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1760 if test "$ac_test_CXXFLAGS" = set; then
1761 CXXFLAGS="$ac_save_CXXFLAGS"
1762 elif test $ac_cv_prog_cxx_g = yes; then
1763 if test "$GXX" = yes; then
1764 CXXFLAGS="-g -O2"
1765 else
1766 CXXFLAGS="-g"
1768 else
1769 if test "$GXX" = yes; then
1770 CXXFLAGS="-O2"
1771 else
1772 CXXFLAGS=
1778 case "$build:$target" in
1779 powerpc-apple-darwin8*:i?86-apple-darwin*)
1780 CFLAGS=$_SAVE_CFLAGS
1781 CXXFLAGS=$_SAVE_CXXFLAGS
1783 esac
1785 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1787 # Extract the first word of "$ac_prog", so it can be a program name with args.
1788 set dummy $ac_prog; ac_word=$2
1789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1790 echo "configure:1791: checking for $ac_word" >&5
1791 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1792 echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794 if test -n "$RANLIB"; then
1795 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1796 else
1797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1798 ac_dummy="$PATH"
1799 for ac_dir in $ac_dummy; do
1800 test -z "$ac_dir" && ac_dir=.
1801 if test -f $ac_dir/$ac_word; then
1802 ac_cv_prog_RANLIB="$ac_prog"
1803 break
1805 done
1806 IFS="$ac_save_ifs"
1809 RANLIB="$ac_cv_prog_RANLIB"
1810 if test -n "$RANLIB"; then
1811 echo "$ac_t""$RANLIB" 1>&6
1812 else
1813 echo "$ac_t""no" 1>&6
1816 test -n "$RANLIB" && break
1817 done
1818 test -n "$RANLIB" || RANLIB="echo"
1820 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1822 # Extract the first word of "$ac_prog", so it can be a program name with args.
1823 set dummy $ac_prog; ac_word=$2
1824 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1825 echo "configure:1826: checking for $ac_word" >&5
1826 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1827 echo $ac_n "(cached) $ac_c" 1>&6
1828 else
1829 if test -n "$AR"; then
1830 ac_cv_prog_AR="$AR" # Let the user override the test.
1831 else
1832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1833 ac_dummy="$PATH"
1834 for ac_dir in $ac_dummy; do
1835 test -z "$ac_dir" && ac_dir=.
1836 if test -f $ac_dir/$ac_word; then
1837 ac_cv_prog_AR="$ac_prog"
1838 break
1840 done
1841 IFS="$ac_save_ifs"
1844 AR="$ac_cv_prog_AR"
1845 if test -n "$AR"; then
1846 echo "$ac_t""$AR" 1>&6
1847 else
1848 echo "$ac_t""no" 1>&6
1851 test -n "$AR" && break
1852 done
1853 test -n "$AR" || AR="echo"
1855 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1857 # Extract the first word of "$ac_prog", so it can be a program name with args.
1858 set dummy $ac_prog; ac_word=$2
1859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1860 echo "configure:1861: checking for $ac_word" >&5
1861 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864 if test -n "$AS"; then
1865 ac_cv_prog_AS="$AS" # Let the user override the test.
1866 else
1867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1868 ac_dummy="$PATH"
1869 for ac_dir in $ac_dummy; do
1870 test -z "$ac_dir" && ac_dir=.
1871 if test -f $ac_dir/$ac_word; then
1872 ac_cv_prog_AS="$ac_prog"
1873 break
1875 done
1876 IFS="$ac_save_ifs"
1879 AS="$ac_cv_prog_AS"
1880 if test -n "$AS"; then
1881 echo "$ac_t""$AS" 1>&6
1882 else
1883 echo "$ac_t""no" 1>&6
1886 test -n "$AS" && break
1887 done
1888 test -n "$AS" || AS="echo"
1890 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
1892 # Extract the first word of "$ac_prog", so it can be a program name with args.
1893 set dummy $ac_prog; ac_word=$2
1894 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1895 echo "configure:1896: checking for $ac_word" >&5
1896 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1897 echo $ac_n "(cached) $ac_c" 1>&6
1898 else
1899 if test -n "$LD"; then
1900 ac_cv_prog_LD="$LD" # Let the user override the test.
1901 else
1902 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1903 ac_dummy="$PATH"
1904 for ac_dir in $ac_dummy; do
1905 test -z "$ac_dir" && ac_dir=.
1906 if test -f $ac_dir/$ac_word; then
1907 ac_cv_prog_LD="$ac_prog"
1908 break
1910 done
1911 IFS="$ac_save_ifs"
1914 LD="$ac_cv_prog_LD"
1915 if test -n "$LD"; then
1916 echo "$ac_t""$LD" 1>&6
1917 else
1918 echo "$ac_t""no" 1>&6
1921 test -n "$LD" && break
1922 done
1923 test -n "$LD" || LD="echo"
1925 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
1927 # Extract the first word of "$ac_prog", so it can be a program name with args.
1928 set dummy $ac_prog; ac_word=$2
1929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1930 echo "configure:1931: checking for $ac_word" >&5
1931 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1932 echo $ac_n "(cached) $ac_c" 1>&6
1933 else
1934 if test -n "$STRIP"; then
1935 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1936 else
1937 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1938 ac_dummy="$PATH"
1939 for ac_dir in $ac_dummy; do
1940 test -z "$ac_dir" && ac_dir=.
1941 if test -f $ac_dir/$ac_word; then
1942 ac_cv_prog_STRIP="$ac_prog"
1943 break
1945 done
1946 IFS="$ac_save_ifs"
1949 STRIP="$ac_cv_prog_STRIP"
1950 if test -n "$STRIP"; then
1951 echo "$ac_t""$STRIP" 1>&6
1952 else
1953 echo "$ac_t""no" 1>&6
1956 test -n "$STRIP" && break
1957 done
1958 test -n "$STRIP" || STRIP="echo"
1960 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
1962 # Extract the first word of "$ac_prog", so it can be a program name with args.
1963 set dummy $ac_prog; ac_word=$2
1964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1965 echo "configure:1966: checking for $ac_word" >&5
1966 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
1967 echo $ac_n "(cached) $ac_c" 1>&6
1968 else
1969 if test -n "$WINDRES"; then
1970 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
1971 else
1972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1973 ac_dummy="$PATH"
1974 for ac_dir in $ac_dummy; do
1975 test -z "$ac_dir" && ac_dir=.
1976 if test -f $ac_dir/$ac_word; then
1977 ac_cv_prog_WINDRES="$ac_prog"
1978 break
1980 done
1981 IFS="$ac_save_ifs"
1984 WINDRES="$ac_cv_prog_WINDRES"
1985 if test -n "$WINDRES"; then
1986 echo "$ac_t""$WINDRES" 1>&6
1987 else
1988 echo "$ac_t""no" 1>&6
1991 test -n "$WINDRES" && break
1992 done
1993 test -n "$WINDRES" || WINDRES="echo"
1996 else
1997 # Extract the first word of "gcc", so it can be a program name with args.
1998 set dummy gcc; ac_word=$2
1999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2000 echo "configure:2001: checking for $ac_word" >&5
2001 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2003 else
2004 if test -n "$CC"; then
2005 ac_cv_prog_CC="$CC" # Let the user override the test.
2006 else
2007 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2008 ac_dummy="$PATH"
2009 for ac_dir in $ac_dummy; do
2010 test -z "$ac_dir" && ac_dir=.
2011 if test -f $ac_dir/$ac_word; then
2012 ac_cv_prog_CC="gcc"
2013 break
2015 done
2016 IFS="$ac_save_ifs"
2019 CC="$ac_cv_prog_CC"
2020 if test -n "$CC"; then
2021 echo "$ac_t""$CC" 1>&6
2022 else
2023 echo "$ac_t""no" 1>&6
2026 if test -z "$CC"; then
2027 # Extract the first word of "cc", so it can be a program name with args.
2028 set dummy cc; ac_word=$2
2029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2030 echo "configure:2031: checking for $ac_word" >&5
2031 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2032 echo $ac_n "(cached) $ac_c" 1>&6
2033 else
2034 if test -n "$CC"; then
2035 ac_cv_prog_CC="$CC" # Let the user override the test.
2036 else
2037 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2038 ac_prog_rejected=no
2039 ac_dummy="$PATH"
2040 for ac_dir in $ac_dummy; do
2041 test -z "$ac_dir" && ac_dir=.
2042 if test -f $ac_dir/$ac_word; then
2043 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2044 ac_prog_rejected=yes
2045 continue
2047 ac_cv_prog_CC="cc"
2048 break
2050 done
2051 IFS="$ac_save_ifs"
2052 if test $ac_prog_rejected = yes; then
2053 # We found a bogon in the path, so make sure we never use it.
2054 set dummy $ac_cv_prog_CC
2055 shift
2056 if test $# -gt 0; then
2057 # We chose a different compiler from the bogus one.
2058 # However, it has the same basename, so the bogon will be chosen
2059 # first if we set CC to just the basename; use the full file name.
2060 shift
2061 set dummy "$ac_dir/$ac_word" "$@"
2062 shift
2063 ac_cv_prog_CC="$@"
2068 CC="$ac_cv_prog_CC"
2069 if test -n "$CC"; then
2070 echo "$ac_t""$CC" 1>&6
2071 else
2072 echo "$ac_t""no" 1>&6
2075 if test -z "$CC"; then
2076 case "`uname -s`" in
2077 *win32* | *WIN32*)
2078 # Extract the first word of "cl", so it can be a program name with args.
2079 set dummy cl; ac_word=$2
2080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_word" >&5
2082 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085 if test -n "$CC"; then
2086 ac_cv_prog_CC="$CC" # Let the user override the test.
2087 else
2088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2089 ac_dummy="$PATH"
2090 for ac_dir in $ac_dummy; do
2091 test -z "$ac_dir" && ac_dir=.
2092 if test -f $ac_dir/$ac_word; then
2093 ac_cv_prog_CC="cl"
2094 break
2096 done
2097 IFS="$ac_save_ifs"
2100 CC="$ac_cv_prog_CC"
2101 if test -n "$CC"; then
2102 echo "$ac_t""$CC" 1>&6
2103 else
2104 echo "$ac_t""no" 1>&6
2107 esac
2109 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2112 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2113 echo "configure:2114: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2115 ac_ext=c
2116 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2117 ac_cpp='$CPP $CPPFLAGS'
2118 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2119 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2120 cross_compiling=$ac_cv_prog_cc_cross
2122 cat > conftest.$ac_ext << EOF
2124 #line 2125 "configure"
2125 #include "confdefs.h"
2127 main(){return(0);}
2129 if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2130 ac_cv_prog_cc_works=yes
2131 # If we can't run a trivial program, we are probably using a cross compiler.
2132 if (./conftest; exit) 2>/dev/null; then
2133 ac_cv_prog_cc_cross=no
2134 else
2135 ac_cv_prog_cc_cross=yes
2137 else
2138 echo "configure: failed program was:" >&5
2139 cat conftest.$ac_ext >&5
2140 ac_cv_prog_cc_works=no
2142 rm -fr conftest*
2143 ac_ext=c
2144 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2145 ac_cpp='$CPP $CPPFLAGS'
2146 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2147 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2148 cross_compiling=$ac_cv_prog_cc_cross
2150 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2151 if test $ac_cv_prog_cc_works = no; then
2152 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2154 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2156 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2157 cross_compiling=$ac_cv_prog_cc_cross
2159 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2160 echo "configure:2161: checking whether we are using GNU C" >&5
2161 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2162 echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164 cat > conftest.c <<EOF
2165 #ifdef __GNUC__
2166 yes;
2167 #endif
2169 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2170 ac_cv_prog_gcc=yes
2171 else
2172 ac_cv_prog_gcc=no
2176 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2178 if test $ac_cv_prog_gcc = yes; then
2179 GCC=yes
2180 else
2181 GCC=
2184 ac_test_CFLAGS="${CFLAGS+set}"
2185 ac_save_CFLAGS="$CFLAGS"
2186 CFLAGS=
2187 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2188 echo "configure:2189: checking whether ${CC-cc} accepts -g" >&5
2189 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2190 echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192 echo 'void f(){}' > conftest.c
2193 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2194 ac_cv_prog_cc_g=yes
2195 else
2196 ac_cv_prog_cc_g=no
2198 rm -f conftest*
2202 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2203 if test "$ac_test_CFLAGS" = set; then
2204 CFLAGS="$ac_save_CFLAGS"
2205 elif test $ac_cv_prog_cc_g = yes; then
2206 if test "$GCC" = yes; then
2207 CFLAGS="-g -O2"
2208 else
2209 CFLAGS="-g"
2211 else
2212 if test "$GCC" = yes; then
2213 CFLAGS="-O2"
2214 else
2215 CFLAGS=
2219 if test -n "$USE_CPLUS"; then
2220 if test "$CC" = "cl" -a -z "$CXX"; then
2221 CXX=$CC
2222 else
2223 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2225 # Extract the first word of "$ac_prog", so it can be a program name with args.
2226 set dummy $ac_prog; ac_word=$2
2227 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2228 echo "configure:2229: checking for $ac_word" >&5
2229 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2230 echo $ac_n "(cached) $ac_c" 1>&6
2231 else
2232 if test -n "$CXX"; then
2233 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2234 else
2235 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2236 ac_dummy="$PATH"
2237 for ac_dir in $ac_dummy; do
2238 test -z "$ac_dir" && ac_dir=.
2239 if test -f $ac_dir/$ac_word; then
2240 ac_cv_prog_CXX="$ac_prog"
2241 break
2243 done
2244 IFS="$ac_save_ifs"
2247 CXX="$ac_cv_prog_CXX"
2248 if test -n "$CXX"; then
2249 echo "$ac_t""$CXX" 1>&6
2250 else
2251 echo "$ac_t""no" 1>&6
2254 test -n "$CXX" && break
2255 done
2256 test -n "$CXX" || CXX="gcc"
2259 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2260 echo "configure:2261: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2262 ac_ext=C
2263 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2264 ac_cpp='$CXXCPP $CPPFLAGS'
2265 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2266 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2267 cross_compiling=$ac_cv_prog_cxx_cross
2269 cat > conftest.$ac_ext << EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2274 int main(){return(0);}
2276 if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2277 ac_cv_prog_cxx_works=yes
2278 # If we can't run a trivial program, we are probably using a cross compiler.
2279 if (./conftest; exit) 2>/dev/null; then
2280 ac_cv_prog_cxx_cross=no
2281 else
2282 ac_cv_prog_cxx_cross=yes
2284 else
2285 echo "configure: failed program was:" >&5
2286 cat conftest.$ac_ext >&5
2287 ac_cv_prog_cxx_works=no
2289 rm -fr conftest*
2290 ac_ext=c
2291 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2292 ac_cpp='$CPP $CPPFLAGS'
2293 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2294 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2295 cross_compiling=$ac_cv_prog_cc_cross
2297 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2298 if test $ac_cv_prog_cxx_works = no; then
2299 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2301 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2302 echo "configure:2303: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2303 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2304 cross_compiling=$ac_cv_prog_cxx_cross
2306 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2307 echo "configure:2308: checking whether we are using GNU C++" >&5
2308 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2309 echo $ac_n "(cached) $ac_c" 1>&6
2310 else
2311 cat > conftest.C <<EOF
2312 #ifdef __GNUC__
2313 yes;
2314 #endif
2316 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2317 ac_cv_prog_gxx=yes
2318 else
2319 ac_cv_prog_gxx=no
2323 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2325 if test $ac_cv_prog_gxx = yes; then
2326 GXX=yes
2327 else
2328 GXX=
2331 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2332 ac_save_CXXFLAGS="$CXXFLAGS"
2333 CXXFLAGS=
2334 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2335 echo "configure:2336: checking whether ${CXX-g++} accepts -g" >&5
2336 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2338 else
2339 echo 'void f(){}' > conftest.cc
2340 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2341 ac_cv_prog_cxx_g=yes
2342 else
2343 ac_cv_prog_cxx_g=no
2345 rm -f conftest*
2349 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2350 if test "$ac_test_CXXFLAGS" = set; then
2351 CXXFLAGS="$ac_save_CXXFLAGS"
2352 elif test $ac_cv_prog_cxx_g = yes; then
2353 if test "$GXX" = yes; then
2354 CXXFLAGS="-g -O2"
2355 else
2356 CXXFLAGS="-g"
2358 else
2359 if test "$GXX" = yes; then
2360 CXXFLAGS="-O2"
2361 else
2362 CXXFLAGS=
2368 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2369 echo "configure:2370: checking how to run the C preprocessor" >&5
2370 # On Suns, sometimes $CPP names a directory.
2371 if test -n "$CPP" && test -d "$CPP"; then
2372 CPP=
2374 if test -z "$CPP"; then
2375 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2376 echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378 # This must be in double quotes, not single quotes, because CPP may get
2379 # substituted into the Makefile and "${CC-cc}" will confuse make.
2380 CPP="${CC-cc} -E"
2381 # On the NeXT, cc -E runs the code through the compiler's parser,
2382 # not just through cpp.
2383 cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #include <assert.h>
2387 Syntax Error
2389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2390 { (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2392 if test -z "$ac_err"; then
2394 else
2395 echo "$ac_err" >&5
2396 echo "configure: failed program was:" >&5
2397 cat conftest.$ac_ext >&5
2398 rm -rf conftest*
2399 CPP="${CC-cc} -E -traditional-cpp"
2400 cat > conftest.$ac_ext <<EOF
2401 #line 2402 "configure"
2402 #include "confdefs.h"
2403 #include <assert.h>
2404 Syntax Error
2406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2407 { (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2409 if test -z "$ac_err"; then
2411 else
2412 echo "$ac_err" >&5
2413 echo "configure: failed program was:" >&5
2414 cat conftest.$ac_ext >&5
2415 rm -rf conftest*
2416 CPP="${CC-cc} -nologo -E"
2417 cat > conftest.$ac_ext <<EOF
2418 #line 2419 "configure"
2419 #include "confdefs.h"
2420 #include <assert.h>
2421 Syntax Error
2423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2424 { (eval echo configure:2425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2426 if test -z "$ac_err"; then
2428 else
2429 echo "$ac_err" >&5
2430 echo "configure: failed program was:" >&5
2431 cat conftest.$ac_ext >&5
2432 rm -rf conftest*
2433 CPP=/lib/cpp
2435 rm -f conftest*
2437 rm -f conftest*
2439 rm -f conftest*
2440 ac_cv_prog_CPP="$CPP"
2442 CPP="$ac_cv_prog_CPP"
2443 else
2444 ac_cv_prog_CPP="$CPP"
2446 echo "$ac_t""$CPP" 1>&6
2448 # Extract the first word of "ranlib", so it can be a program name with args.
2449 set dummy ranlib; ac_word=$2
2450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2451 echo "configure:2452: checking for $ac_word" >&5
2452 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2453 echo $ac_n "(cached) $ac_c" 1>&6
2454 else
2455 if test -n "$RANLIB"; then
2456 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2457 else
2458 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2459 ac_dummy="$PATH"
2460 for ac_dir in $ac_dummy; do
2461 test -z "$ac_dir" && ac_dir=.
2462 if test -f $ac_dir/$ac_word; then
2463 ac_cv_prog_RANLIB="ranlib"
2464 break
2466 done
2467 IFS="$ac_save_ifs"
2468 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2471 RANLIB="$ac_cv_prog_RANLIB"
2472 if test -n "$RANLIB"; then
2473 echo "$ac_t""$RANLIB" 1>&6
2474 else
2475 echo "$ac_t""no" 1>&6
2478 for ac_prog in as
2480 # Extract the first word of "$ac_prog", so it can be a program name with args.
2481 set dummy $ac_prog; ac_word=$2
2482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2483 echo "configure:2484: checking for $ac_word" >&5
2484 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2485 echo $ac_n "(cached) $ac_c" 1>&6
2486 else
2487 case "$AS" in
2489 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2491 ?:/*)
2492 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2496 ac_dummy="$PATH"
2497 for ac_dir in $ac_dummy; do
2498 test -z "$ac_dir" && ac_dir=.
2499 if test -f $ac_dir/$ac_word; then
2500 ac_cv_path_AS="$ac_dir/$ac_word"
2501 break
2503 done
2504 IFS="$ac_save_ifs"
2506 esac
2508 AS="$ac_cv_path_AS"
2509 if test -n "$AS"; then
2510 echo "$ac_t""$AS" 1>&6
2511 else
2512 echo "$ac_t""no" 1>&6
2515 test -n "$AS" && break
2516 done
2517 test -n "$AS" || AS="$CC"
2519 for ac_prog in ar
2521 # Extract the first word of "$ac_prog", so it can be a program name with args.
2522 set dummy $ac_prog; ac_word=$2
2523 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2524 echo "configure:2525: checking for $ac_word" >&5
2525 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2526 echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528 case "$AR" in
2530 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2532 ?:/*)
2533 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2536 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2537 ac_dummy="$PATH"
2538 for ac_dir in $ac_dummy; do
2539 test -z "$ac_dir" && ac_dir=.
2540 if test -f $ac_dir/$ac_word; then
2541 ac_cv_path_AR="$ac_dir/$ac_word"
2542 break
2544 done
2545 IFS="$ac_save_ifs"
2547 esac
2549 AR="$ac_cv_path_AR"
2550 if test -n "$AR"; then
2551 echo "$ac_t""$AR" 1>&6
2552 else
2553 echo "$ac_t""no" 1>&6
2556 test -n "$AR" && break
2557 done
2558 test -n "$AR" || AR="echo not_ar"
2560 for ac_prog in ld link
2562 # Extract the first word of "$ac_prog", so it can be a program name with args.
2563 set dummy $ac_prog; ac_word=$2
2564 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2565 echo "configure:2566: checking for $ac_word" >&5
2566 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2567 echo $ac_n "(cached) $ac_c" 1>&6
2568 else
2569 case "$LD" in
2571 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2573 ?:/*)
2574 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2577 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2578 ac_dummy="$PATH"
2579 for ac_dir in $ac_dummy; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 ac_cv_path_LD="$ac_dir/$ac_word"
2583 break
2585 done
2586 IFS="$ac_save_ifs"
2588 esac
2590 LD="$ac_cv_path_LD"
2591 if test -n "$LD"; then
2592 echo "$ac_t""$LD" 1>&6
2593 else
2594 echo "$ac_t""no" 1>&6
2597 test -n "$LD" && break
2598 done
2599 test -n "$LD" || LD="echo not_ld"
2601 for ac_prog in strip
2603 # Extract the first word of "$ac_prog", so it can be a program name with args.
2604 set dummy $ac_prog; ac_word=$2
2605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2606 echo "configure:2607: checking for $ac_word" >&5
2607 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2608 echo $ac_n "(cached) $ac_c" 1>&6
2609 else
2610 case "$STRIP" in
2612 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2614 ?:/*)
2615 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2618 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2619 ac_dummy="$PATH"
2620 for ac_dir in $ac_dummy; do
2621 test -z "$ac_dir" && ac_dir=.
2622 if test -f $ac_dir/$ac_word; then
2623 ac_cv_path_STRIP="$ac_dir/$ac_word"
2624 break
2626 done
2627 IFS="$ac_save_ifs"
2629 esac
2631 STRIP="$ac_cv_path_STRIP"
2632 if test -n "$STRIP"; then
2633 echo "$ac_t""$STRIP" 1>&6
2634 else
2635 echo "$ac_t""no" 1>&6
2638 test -n "$STRIP" && break
2639 done
2640 test -n "$STRIP" || STRIP="echo not_strip"
2642 for ac_prog in windres
2644 # Extract the first word of "$ac_prog", so it can be a program name with args.
2645 set dummy $ac_prog; ac_word=$2
2646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2647 echo "configure:2648: checking for $ac_word" >&5
2648 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2649 echo $ac_n "(cached) $ac_c" 1>&6
2650 else
2651 case "$WINDRES" in
2653 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2655 ?:/*)
2656 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2660 ac_dummy="$PATH"
2661 for ac_dir in $ac_dummy; do
2662 test -z "$ac_dir" && ac_dir=.
2663 if test -f $ac_dir/$ac_word; then
2664 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2665 break
2667 done
2668 IFS="$ac_save_ifs"
2670 esac
2672 WINDRES="$ac_cv_path_WINDRES"
2673 if test -n "$WINDRES"; then
2674 echo "$ac_t""$WINDRES" 1>&6
2675 else
2676 echo "$ac_t""no" 1>&6
2679 test -n "$WINDRES" && break
2680 done
2681 test -n "$WINDRES" || WINDRES="echo not_windres"
2683 if test -z "$HOST_CC"; then
2684 HOST_CC="$CC"
2686 if test -z "$HOST_CFLAGS"; then
2687 HOST_CFLAGS="$CFLAGS"
2691 if test "$GCC" = "yes"; then
2692 GNU_CC=1
2694 if test "$GXX" = "yes"; then
2695 GNU_CXX=1
2697 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2698 GNU_AS=1
2700 rm -f a.out
2702 case "$build:$target" in
2703 i?86-apple-darwin*:powerpc-apple-darwin*)
2704 cross_compiling=yes
2706 esac
2708 if test "$cross_compiling" = "yes"; then
2709 CROSS_COMPILE=1
2710 else
2711 CROSS_COMPILE=
2714 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2715 echo "configure:2716: checking for gcc -pipe support" >&5
2716 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2717 echo '#include <stdio.h>' > dummy-hello.c
2718 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2719 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2720 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2721 if test $? = 0; then
2722 _res_as_stdin="yes"
2723 else
2724 _res_as_stdin="no"
2726 if test "$_res_as_stdin" = "yes"; then
2727 _SAVE_CFLAGS=$CFLAGS
2728 CFLAGS="$CFLAGS -pipe"
2729 cat > conftest.$ac_ext <<EOF
2730 #line 2731 "configure"
2731 #include "confdefs.h"
2732 #include <stdio.h>
2733 int main() {
2734 printf("Hello World\n");
2735 ; return 0; }
2737 if { (eval echo configure:2738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2738 rm -rf conftest*
2739 _res_gcc_pipe="yes"
2740 else
2741 echo "configure: failed program was:" >&5
2742 cat conftest.$ac_ext >&5
2743 rm -rf conftest*
2744 _res_gcc_pipe="no"
2746 rm -f conftest*
2747 CFLAGS=$_SAVE_CFLAGS
2749 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2750 _res="yes";
2751 CFLAGS="$CFLAGS -pipe"
2752 CXXFLAGS="$CXXFLAGS -pipe"
2753 else
2754 _res="no"
2756 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2757 echo "$ac_t""$_res" 1>&6
2758 else
2759 echo "$ac_t""no" 1>&6
2763 _SAVE_CFLAGS="$CFLAGS"
2764 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2766 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2767 echo "configure:2768: checking whether C compiler supports -fprofile-generate" >&5
2768 cat > conftest.$ac_ext <<EOF
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2772 int main() {
2773 return 0;
2774 ; return 0; }
2776 if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2777 rm -rf conftest*
2778 PROFILE_GEN_CFLAGS="-fprofile-generate"
2779 result="yes"
2780 else
2781 echo "configure: failed program was:" >&5
2782 cat conftest.$ac_ext >&5
2783 rm -rf conftest*
2784 result="no"
2786 rm -f conftest*
2787 echo "$ac_t""$result" 1>&6
2789 if test $result = "yes"; then
2790 PROFILE_GEN_LDFLAGS="-fprofile-generate"
2791 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition"
2792 PROFILE_USE_LDFLAGS="-fprofile-use"
2795 CFLAGS="$_SAVE_CFLAGS"
2797 if test "$GNU_CC"; then
2798 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2799 echo "configure:2800: checking for visibility(hidden) attribute" >&5
2800 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2801 echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803 cat > conftest.c <<EOF
2804 int foo __attribute__ ((visibility ("hidden"))) = 1;
2806 ac_cv_visibility_hidden=no
2807 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2808 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2809 ac_cv_visibility_hidden=yes
2812 rm -f conftest.cs
2816 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2817 if test "$ac_cv_visibility_hidden" = "yes"; then
2818 cat >> confdefs.h <<\EOF
2819 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2822 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2823 echo "configure:2824: checking for visibility pragma support" >&5
2824 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2825 echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827 cat > conftest.c <<EOF
2828 #pragma GCC visibility push(hidden)
2829 int foo_hidden = 1;
2830 #pragma GCC visibility push(default)
2831 int foo_default = 1;
2833 ac_cv_visibility_pragma=no
2834 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2835 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2836 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2837 ac_cv_visibility_pragma=yes
2841 rm -f conftest.cs
2845 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2846 if test "$ac_cv_visibility_pragma" = "yes"; then
2847 cat >> confdefs.h <<\EOF
2848 #define HAVE_VISIBILITY_PRAGMA 1
2851 # To work around a build problem on Linux x86-64 (Bugzilla bug
2852 # 293438), we use the -fvisibility=hidden flag. This flag is less
2853 # optimal than #pragma GCC visibility push(hidden) because the flag
2854 # assumes that symbols defined outside the current source file have
2855 # the default visibility. This has the advantage that we don't need
2856 # to wrap system header files, but has the disadvantage that calls
2857 # to hidden symbols defined in other source files cannot be
2858 # optimized by the compiler. The -fvisibility=hidden flag does
2859 # hide and export symbols correctly.
2860 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
2861 #WRAP_SYSTEM_INCLUDES=1
2862 VISIBILITY_FLAGS="-fvisibility=hidden"
2863 WRAP_SYSTEM_INCLUDES=
2866 fi # GNU_CC
2868 fi # SKIP_COMPILER_CHECKS
2870 if test -z "$SKIP_PATH_CHECKS"; then
2871 for ac_prog in perl5 perl
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874 set dummy $ac_prog; ac_word=$2
2875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2876 echo "configure:2877: checking for $ac_word" >&5
2877 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2878 echo $ac_n "(cached) $ac_c" 1>&6
2879 else
2880 case "$PERL" in
2882 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2884 ?:/*)
2885 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2889 ac_dummy="$PATH"
2890 for ac_dir in $ac_dummy; do
2891 test -z "$ac_dir" && ac_dir=.
2892 if test -f $ac_dir/$ac_word; then
2893 ac_cv_path_PERL="$ac_dir/$ac_word"
2894 break
2896 done
2897 IFS="$ac_save_ifs"
2899 esac
2901 PERL="$ac_cv_path_PERL"
2902 if test -n "$PERL"; then
2903 echo "$ac_t""$PERL" 1>&6
2904 else
2905 echo "$ac_t""no" 1>&6
2908 test -n "$PERL" && break
2909 done
2910 test -n "$PERL" || PERL="echo not_perl"
2912 elif test -z "$PERL"; then
2913 PERL=perl
2916 OBJ_SUFFIX=o
2917 LIB_SUFFIX=a
2918 DLL_SUFFIX=so
2919 ASM_SUFFIX=s
2920 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
2921 PR_MD_ASFILES=
2922 PR_MD_CSRCS=
2923 PR_MD_ARCH_DIR=unix
2924 AR_FLAGS='cr $@'
2925 AS='$(CC)'
2926 ASFLAGS='$(CFLAGS)'
2928 if test -n "$CROSS_COMPILE"; then
2929 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2930 OS_RELEASE=
2931 OS_TEST="${target_cpu}"
2932 case "${target_os}" in
2933 linux*) OS_ARCH=Linux ;;
2934 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2935 mingw*) OS_ARCH=WINNT ;;
2936 wince*) OS_ARCH=WINCE ;;
2937 winmo*) OS_ARCH=WINCE ;;
2938 darwin*) OS_ARCH=Darwin ;;
2939 riscos*) OS_ARCH=RISCOS ;;
2940 esac
2941 else
2942 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2943 OS_RELEASE=`uname -r`
2944 OS_TEST=`uname -m`
2947 if test "$OS_ARCH" = "IRIX64"; then
2948 OS_ARCH=IRIX
2951 if test "$OS_ARCH" = "AIX"; then
2952 OS_RELEASE=`uname -v`.`uname -r`
2955 if test "$OS_ARCH" = "FreeBSD"; then
2956 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2959 if test "$OS_ARCH" = "Linux"; then
2960 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2961 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
2964 #######################################################################
2965 # Master "Core Components" macros for getting the OS target #
2966 #######################################################################
2969 # Note: OS_TARGET should be specified on the command line for gmake.
2970 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
2971 # The difference between the Win95 target and the WinNT target is that
2972 # the WinNT target uses Windows NT specific features not available
2973 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
2974 # at lesser performance (the Win95 target uses threads; the WinNT target
2975 # uses fibers).
2977 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
2978 # cross-compilation.
2982 # The following hack allows one to build on a WIN95 machine (as if
2983 # s/he were cross-compiling on a WINNT host for a WIN95 target).
2984 # It also accomodates for MKS's uname.exe. If you never intend
2985 # to do development on a WIN95 machine, you don't need this hack.
2987 case "$OS_ARCH" in
2988 WIN95)
2989 OS_ARCH=WINNT
2990 OS_TARGET=WIN95
2992 Windows_95)
2993 OS_ARCH=Windows_NT
2994 OS_TARGET=WIN95
2996 Windows_98)
2997 OS_ARCH=Windows_NT
2998 OS_TARGET=WIN95
3000 CYGWIN_9*|CYGWIN_ME*)
3001 OS_ARCH='CYGWIN_NT-4.0'
3002 OS_TARGET=WIN95
3004 OS_2)
3005 OS_ARCH=OS2
3006 OS_TARGET=OS2
3008 esac
3011 # On WIN32, we also define the variable CPU_ARCH.
3014 case "$OS_ARCH" in
3015 WINNT)
3016 CPU_ARCH=`uname -p`
3017 if test "$CPU_ARCH" = "I386"; then
3018 CPU_ARCH=x86
3021 Windows_NT)
3023 # If uname -s returns "Windows_NT", we assume that we are using
3024 # the uname.exe in MKS toolkit.
3026 # The -r option of MKS uname only returns the major version number.
3027 # So we need to use its -v option to get the minor version number.
3028 # Moreover, it doesn't have the -p option, so we need to use uname -m.
3030 OS_ARCH=WINNT
3031 OS_MINOR_RELEASE=`uname -v`
3032 if test "$OS_MINOR_RELEASE" = "00"; then
3033 OS_MINOR_RELEASE=0
3035 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
3036 CPU_ARCH=`uname -m`
3038 # MKS's uname -m returns "586" on a Pentium machine.
3040 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3041 CPU_ARCH=x86
3044 CYGWIN_NT*|MINGW*_NT*)
3046 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
3047 # the uname.exe in the Cygwin tools.
3048 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
3049 # the uname.exe in the MSYS tools.
3051 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
3052 OS_ARCH=WINNT
3053 CPU_ARCH=`uname -m`
3055 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
3057 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3058 CPU_ARCH=x86
3061 esac
3063 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
3064 OS_TARGET=WIN95
3065 if test -n "$MOZ_DEBUG"; then
3066 USE_DEBUG_RTL=1
3069 if test -z "$OS_TARGET"; then
3070 OS_TARGET=$OS_ARCH
3072 if test "$OS_TARGET" = "WIN95"; then
3073 OS_RELEASE="4.0"
3075 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
3077 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
3078 if test "${enable_os2_high_mem+set}" = set; then
3079 enableval="$enable_os2_high_mem"
3080 if test "$enableval" = "no"; then
3081 MOZ_OS2_HIGH_MEMORY=
3082 else
3083 MOZ_OS2_HIGH_MEMORY=1
3088 # Check whether --enable-thumb2 or --disable-thumb2 was given.
3089 if test "${enable_thumb2+set}" = set; then
3090 enableval="$enable_thumb2"
3091 if test "$enableval" = "yes"; then
3092 MOZ_THUMB2=1,
3097 if test -n "$MOZ_THUMB2"; then
3098 case "$target_cpu" in
3099 arm*)
3100 if test "$GNU_CC"; then
3101 CFLAGS="$CFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb"
3102 CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb"
3103 ASFLAGS="$ASFLAGS -march=armv7-a -mthumb"
3104 else
3105 { echo "configure: error: --enable-thumb2 is not supported for non-GNU toolchains" 1>&2; exit 1; }
3109 { echo "configure: error: --enable-thumb2 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
3111 esac
3114 case "$host" in
3115 *-mingw*)
3116 NSINSTALL=nsinstall
3118 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
3119 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
3120 if test `echo "${PATH}" | grep -c \;` = 0; then
3121 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
3124 *-beos*)
3125 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
3127 *os2*)
3130 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
3132 esac
3134 case "$target" in
3136 *-aix*)
3137 cat >> confdefs.h <<\EOF
3138 #define XP_UNIX 1
3141 cat >> confdefs.h <<\EOF
3142 #define AIX 1
3145 cat >> confdefs.h <<\EOF
3146 #define SYSV 1
3149 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3150 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3151 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3152 echo "configure:3153: checking for sys/atomic_op.h" >&5
3153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3154 echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156 cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 #include <sys/atomic_op.h>
3161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3162 { (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3164 if test -z "$ac_err"; then
3165 rm -rf conftest*
3166 eval "ac_cv_header_$ac_safe=yes"
3167 else
3168 echo "$ac_err" >&5
3169 echo "configure: failed program was:" >&5
3170 cat conftest.$ac_ext >&5
3171 rm -rf conftest*
3172 eval "ac_cv_header_$ac_safe=no"
3174 rm -f conftest*
3176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3177 echo "$ac_t""yes" 1>&6
3178 cat >> confdefs.h <<\EOF
3179 #define AIX_HAVE_ATOMIC_OP_H 1
3182 else
3183 echo "$ac_t""no" 1>&6
3186 case "${target_os}" in
3187 aix3.2*)
3188 cat >> confdefs.h <<\EOF
3189 #define AIX_RENAME_SELECT 1
3192 cat >> confdefs.h <<\EOF
3193 #define _PR_NO_LARGE_FILES 1
3196 AIX_LINK_OPTS='-bnso -berok'
3197 PR_MD_ASFILES=os_AIX.s
3199 aix4.1*)
3200 cat >> confdefs.h <<\EOF
3201 #define AIX_TIMERS 1
3204 cat >> confdefs.h <<\EOF
3205 #define _PR_NO_LARGE_FILES 1
3208 cat >> confdefs.h <<\EOF
3209 #define AIX4_1 1
3212 MKSHLIB=
3213 DSO_LDOPTS=
3214 AIX_LINK_OPTS='-bnso -berok'
3215 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3216 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3218 aix4.2*)
3219 cat >> confdefs.h <<\EOF
3220 #define AIX_TIMERS 1
3223 cat >> confdefs.h <<\EOF
3224 #define _PR_HAVE_OFF64_T 1
3227 AIX_LINK_OPTS='-brtl -bnso -berok'
3229 aix4.3*)
3230 cat >> confdefs.h <<\EOF
3231 #define AIX_TIMERS 1
3234 cat >> confdefs.h <<\EOF
3235 #define _PR_HAVE_OFF64_T 1
3238 cat >> confdefs.h <<\EOF
3239 #define AIX4_3_PLUS 1
3242 cat >> confdefs.h <<\EOF
3243 #define HAVE_SOCKLEN_T 1
3246 cat >> confdefs.h <<\EOF
3247 #define HAVE_FCNTL_FILE_LOCKING 1
3250 USE_IPV6=1
3251 AIX_LINK_OPTS='-brtl -bnso -berok'
3254 cat >> confdefs.h <<\EOF
3255 #define AIX_TIMERS 1
3258 cat >> confdefs.h <<\EOF
3259 #define _PR_HAVE_OFF64_T 1
3262 cat >> confdefs.h <<\EOF
3263 #define AIX4_3_PLUS 1
3266 cat >> confdefs.h <<\EOF
3267 #define HAVE_SOCKLEN_T 1
3270 cat >> confdefs.h <<\EOF
3271 #define HAVE_FCNTL_FILE_LOCKING 1
3274 USE_IPV6=1
3275 AIX_LINK_OPTS='-brtl -bnso -berok'
3277 esac
3278 CFLAGS="$CFLAGS -qro -qroconst"
3279 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3280 AIX_TMP='./_aix_tmp.o'
3281 if test -n "$USE_64"; then
3282 MDCPUCFG_H=_aix64.cfg
3283 OBJECT_MODE=64
3284 else
3285 MDCPUCFG_H=_aix32.cfg
3287 PR_MD_CSRCS=aix.c
3288 RESOLVE_LINK_SYMBOLS=1
3291 *-beos*)
3292 cat >> confdefs.h <<\EOF
3293 #define XP_BEOS 1
3296 cat >> confdefs.h <<\EOF
3297 #define BeOS 1
3300 cat >> confdefs.h <<\EOF
3301 #define BEOS 1
3304 cat >> confdefs.h <<\EOF
3305 #define _POSIX_SOURCE 1
3308 DSO_LDOPTS=-nostart
3309 MDCPUCFG_H=_beos.cfg
3310 USE_BTHREADS=1
3311 PR_MD_ARCH_DIR=beos
3312 RESOLVE_LINK_SYMBOLS=1
3313 case "${target_cpu}" in
3314 i*86)
3315 _OPTIMIZE_FLAGS=-O2
3316 _DEBUG_FLAGS='-gdwarf-2 -O0'
3317 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3318 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3319 echo "configure:3320: checking for gethostbyaddr in -lbind" >&5
3320 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3321 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3322 echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324 ac_save_LIBS="$LIBS"
3325 LIBS="-lbind $LIBS"
3326 cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 /* Override any gcc2 internal prototype to avoid an error. */
3330 /* We use char because int might match the return type of a gcc2
3331 builtin and then its argument prototype would still apply. */
3332 char gethostbyaddr();
3334 int main() {
3335 gethostbyaddr()
3336 ; return 0; }
3338 if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3339 rm -rf conftest*
3340 eval "ac_cv_lib_$ac_lib_var=yes"
3341 else
3342 echo "configure: failed program was:" >&5
3343 cat conftest.$ac_ext >&5
3344 rm -rf conftest*
3345 eval "ac_cv_lib_$ac_lib_var=no"
3347 rm -f conftest*
3348 LIBS="$ac_save_LIBS"
3351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3352 echo "$ac_t""yes" 1>&6
3353 OS_LIBS="$OS_LIBS -lbind -lsocket"
3354 else
3355 echo "$ac_t""no" 1>&6
3359 powerpc)
3360 CC=mwcc
3361 CCC=mwcc
3362 LD=mwld
3363 DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o'
3364 _OPTIMIZE_FLAGS=-O2
3365 _DEBUG_FLAGS='-g -O0'
3367 esac
3370 *-bsdi*)
3371 cat >> confdefs.h <<\EOF
3372 #define XP_UNIX 1
3375 cat >> confdefs.h <<\EOF
3376 #define BSDI 1
3379 cat >> confdefs.h <<\EOF
3380 #define NEED_BSDREGEX 1
3384 CFLAGS="$CFLAGS -Wall -Wno-format"
3385 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3387 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3388 CPU_ARCH=x86
3389 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3390 CPU_ARCH=sparc
3393 MDCPUCFG_H=_bsdi.cfg
3394 PR_MD_CSRCS=bsdi.c
3396 DSO_LDOPTS=-r
3398 case "$target_os" in
3399 bsdi1.1*)
3400 cat >> confdefs.h <<\EOF
3401 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3404 cat >> confdefs.h <<\EOF
3405 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3408 cat >> confdefs.h <<\EOF
3409 #define _PR_NEED_H_ERRNO 1
3412 MKSHLIB=
3413 DSO_CFLAGS=
3414 DSO_LDOPTS=
3417 bsdi2.1*)
3418 cat >> confdefs.h <<\EOF
3419 #define _PR_TIMESPEC_HAS_TS_SEC 1
3422 cat >> confdefs.h <<\EOF
3423 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3426 cat >> confdefs.h <<\EOF
3427 #define HAVE_DLL 1
3430 cat >> confdefs.h <<\EOF
3431 #define USE_DLFCN 1
3434 cat >> confdefs.h <<\EOF
3435 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3438 PR_MD_ASFILES=os_BSD_OS_386_2.s
3441 bsdi4.* | bsdi5.*)
3442 cat >> confdefs.h <<\EOF
3443 #define _PR_SELECT_CONST_TIMEVAL 1
3446 cat >> confdefs.h <<\EOF
3447 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3450 cat >> confdefs.h <<\EOF
3451 #define HAVE_DLL 1
3454 cat >> confdefs.h <<\EOF
3455 #define USE_DLFCN 1
3458 cat >> confdefs.h <<\EOF
3459 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3462 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3463 DSO_CFLAGS=-fPIC
3464 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3465 STRIP="$STRIP -d"
3466 case "$target_os" in
3467 bsdi4.2* | bsdi4.3* | bsdi5.*)
3468 cat >> confdefs.h <<\EOF
3469 #define _PR_HAVE_GETPROTO_R 1
3472 cat >> confdefs.h <<\EOF
3473 #define _PR_HAVE_GETPROTO_R_POINTER 1
3477 esac
3480 cat >> confdefs.h <<\EOF
3481 #define _PR_SELECT_CONST_TIMEVAL 1
3484 cat >> confdefs.h <<\EOF
3485 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3488 cat >> confdefs.h <<\EOF
3489 #define HAVE_DLL 1
3492 cat >> confdefs.h <<\EOF
3493 #define USE_DLFCN 1
3496 cat >> confdefs.h <<\EOF
3497 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3501 esac
3505 *-darwin*)
3506 cat >> confdefs.h <<\EOF
3507 #define XP_UNIX 1
3510 cat >> confdefs.h <<\EOF
3511 #define DARWIN 1
3514 cat >> confdefs.h <<\EOF
3515 #define HAVE_BSD_FLOCK 1
3518 cat >> confdefs.h <<\EOF
3519 #define HAVE_SOCKLEN_T 1
3522 AS='$(CC) -x assembler-with-cpp'
3523 CFLAGS="$CFLAGS -Wall -fno-common"
3524 case "${target_cpu}" in
3525 i*86*)
3526 if test -n "$USE_64"; then
3527 CPU_ARCH=x86_64
3528 CC="$CC -arch x86_64"
3529 else
3530 CPU_ARCH=i386
3534 CPU_ARCH=ppc
3536 esac
3537 DSO_CFLAGS=-fPIC
3538 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3539 _OPTIMIZE_FLAGS=-O2
3540 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3541 STRIP="$STRIP -x -S"
3542 DLL_SUFFIX=dylib
3543 USE_PTHREADS=1
3544 MDCPUCFG_H=_darwin.cfg
3545 PR_MD_CSRCS=darwin.c
3546 PR_MD_ASFILES=os_Darwin.s
3548 # Add Mac OS X support for loading CFM & CFBundle plugins
3549 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3550 cat >> confdefs.h <<\EOF
3551 #define XP_MACOSX 1
3554 OS_TARGET=MacOSX
3556 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3557 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3558 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3559 case "${target_cpu}" in
3560 powerpc*)
3561 export MACOSX_DEPLOYMENT_TARGET=10.2
3563 i*86*)
3564 export MACOSX_DEPLOYMENT_TARGET=10.4
3566 esac
3570 if test "$MACOS_SDK_DIR"; then
3572 if test ! -d "$MACOS_SDK_DIR"; then
3573 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3574 specify a valid SDK. SDKs are installed when the optional cross-development
3575 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3579 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3580 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3581 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3583 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3584 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3585 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3586 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3587 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3590 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3592 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3594 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3597 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3599 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3600 MACOS_SDK_LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin -L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION_FULL} -L${MACOS_SDK_DIR}/usr/lib ${SDK_C_FRAMEWORK}"
3601 else
3602 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3605 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3606 export NEXT_ROOT=$MACOS_SDK_DIR
3608 if test -n "$CROSS_COMPILE" ; then
3609 HOST_CC="NEXT_ROOT= $HOST_CC"
3610 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3612 else
3613 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3615 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3617 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3618 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3619 else
3620 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3627 *-dgux*)
3628 cat >> confdefs.h <<\EOF
3629 #define XP_UNIX 1
3632 cat >> confdefs.h <<\EOF
3633 #define _PR_LOCAL_THREADS_ONLY 1
3636 cat >> confdefs.h <<\EOF
3637 #define SVR4 1
3640 cat >> confdefs.h <<\EOF
3641 #define SYSV 1
3644 cat >> confdefs.h <<\EOF
3645 #define DGUX 1
3648 cat >> confdefs.h <<\EOF
3649 #define _DGUX_SOURCE 1
3652 cat >> confdefs.h <<\EOF
3653 #define _POSIX4A_DRAFT6_SOURCE 1
3656 DSO_LDOPTS=-G
3657 _OPTIMIZE_FLAGS=-O2
3658 _DEBUG_FLAGS=
3659 MDCPUCFG_H=_dgux.cfg
3660 PR_MD_CSRCS=dgux.c
3663 *-freebsd*)
3664 if test -z "$USE_NSPR_THREADS"; then
3665 USE_PTHREADS=1
3667 cat >> confdefs.h <<\EOF
3668 #define XP_UNIX 1
3671 cat >> confdefs.h <<\EOF
3672 #define FREEBSD 1
3675 cat >> confdefs.h <<\EOF
3676 #define HAVE_BSD_FLOCK 1
3679 cat >> confdefs.h <<\EOF
3680 #define HAVE_SOCKLEN_T 1
3683 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3684 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
3685 if test "$MOZ_OBJFORMAT" = "elf"; then
3686 DLL_SUFFIX=so
3687 else
3688 DLL_SUFFIX=so.1.0
3690 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3691 DSO_CFLAGS=-fPIC
3692 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3693 MDCPUCFG_H=_freebsd.cfg
3694 PR_MD_CSRCS=freebsd.c
3697 *-hpux*)
3698 cat >> confdefs.h <<\EOF
3699 #define XP_UNIX 1
3702 cat >> confdefs.h <<\EOF
3703 #define HPUX 1
3706 cat >> confdefs.h <<\EOF
3707 #define _HPUX_SOURCE 1
3710 # OSF1 and HPUX report the POLLHUP event for a socket when the
3711 # shutdown(SHUT_WR) operation is called for the remote end, even though
3712 # the socket is still writeable. Use select(), instead of poll(), to
3713 # workaround this problem.
3714 cat >> confdefs.h <<\EOF
3715 #define _PR_POLL_WITH_SELECT 1
3718 cat >> confdefs.h <<\EOF
3719 #define _USE_BIG_FDS 1
3722 DSO_LDOPTS='-b +h $(notdir $@)'
3723 PR_MD_CSRCS=hpux.c
3724 if test "$OS_TEST" = "ia64"; then
3725 DLL_SUFFIX=so
3726 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
3727 CPU_ARCH_TAG=_$OS_TEST
3728 if test -z "$USE_64"; then
3729 COMPILER_TAG=_32
3731 PR_MD_ASFILES=os_HPUX_ia64.s
3732 else
3733 cat >> confdefs.h <<\EOF
3734 #define hppa 1
3737 DLL_SUFFIX=sl
3738 PR_MD_ASFILES=os_HPUX.s
3740 if test -n "$USE_64"; then
3741 MDCPUCFG_H=_hpux64.cfg
3742 else
3743 MDCPUCFG_H=_hpux32.cfg
3745 if test -z "$GNU_CC"; then
3746 CC="$CC -Ae"
3747 CXX="$CXX -ext"
3748 DSO_CFLAGS=+Z
3749 else
3750 DSO_CFLAGS=-fPIC
3751 ASFLAGS="$ASFLAGS -x assembler-with-cpp"
3754 if test -n "$MOZILLA_CLIENT"; then
3755 DEFAULT_IMPL_STRATEGY=_EMU
3758 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
3759 cat >> confdefs.h <<\EOF
3760 #define _PR_NEED_H_ERRNO 1
3763 cat >> confdefs.h <<\EOF
3764 #define HPUX9 1
3767 DEFAULT_IMPL_STRATEGY=_EMU
3768 USE_NSPR_THREADS=1
3771 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
3772 cat >> confdefs.h <<\EOF
3773 #define _PR_NO_LARGE_FILES 1
3778 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3779 cat >> confdefs.h <<\EOF
3780 #define _PR_NEED_H_ERRNO 1
3785 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3786 cat >> confdefs.h <<\EOF
3787 #define HAVE_INT_LOCALTIME_R 1
3792 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
3793 cat >> confdefs.h <<\EOF
3794 #define HAVE_POINTER_LOCALTIME_R 1
3799 # HP-UX 11i v2 (B.11.23) or higher
3801 case "$OS_RELEASE" in
3802 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
3803 USE_IPV6=1
3805 esac
3808 if test "$OS_RELEASE" = "B.10.01"; then
3809 cat >> confdefs.h <<\EOF
3810 #define HPUX10 1
3813 DEFAULT_IMPL_STRATEGY=_EMU
3816 if test "$OS_RELEASE" = "B.10.10"; then
3817 cat >> confdefs.h <<\EOF
3818 #define HPUX10 1
3821 cat >> confdefs.h <<\EOF
3822 #define HPUX10_10 1
3825 DEFAULT_IMPL_STRATEGY=_PTH
3828 if test "$OS_RELEASE" = "B.10.20"; then
3829 cat >> confdefs.h <<\EOF
3830 #define HPUX10 1
3833 cat >> confdefs.h <<\EOF
3834 #define HPUX10_20 1
3837 if test -z "$GNU_CC"; then
3838 CFLAGS="$CFLAGS +DAportable +DS1.1"
3839 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3841 DEFAULT_IMPL_STRATEGY=_PTH
3844 if test "$OS_RELEASE" = "B.10.30"; then
3845 cat >> confdefs.h <<\EOF
3846 #define HPUX10 1
3849 cat >> confdefs.h <<\EOF
3850 #define HPUX10_30 1
3853 if test -z "$GNU_CC"; then
3854 CFLAGS="$CFLAGS +DAportable +DS1.1"
3855 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3857 DEFAULT_IMPL_STRATEGY=_PTH
3860 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
3861 cat >> confdefs.h <<\EOF
3862 #define HPUX10 1
3865 cat >> confdefs.h <<\EOF
3866 #define HPUX11 1
3869 cat >> confdefs.h <<\EOF
3870 #define _LARGEFILE64_SOURCE 1
3873 cat >> confdefs.h <<\EOF
3874 #define _PR_HAVE_OFF64_T 1
3877 cat >> confdefs.h <<\EOF
3878 #define HAVE_FCNTL_FILE_LOCKING 1
3881 if test -z "$GNU_CC"; then
3882 if test -z "$USE_64"; then
3883 if test "$OS_TEST" = "ia64"; then
3884 CFLAGS="$CFLAGS +DD32"
3885 CXXFLAGS="$CXXFLAGS +DD32"
3886 else
3887 CFLAGS="$CFLAGS +DAportable +DS2.0"
3888 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
3890 else
3891 if test "$OS_TEST" = "ia64"; then
3892 CFLAGS="$CFLAGS +DD64"
3893 CXXFLAGS="$CXXFLAGS +DD64"
3894 else
3895 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
3896 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
3900 DEFAULT_IMPL_STRATEGY=_PTH
3903 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
3904 USE_NSPR_THREADS=1
3905 USE_PTHREADS=
3906 USE_USER_PTHREADS=
3907 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
3908 USE_PTHREADS=1
3909 if test "$USE_NSPR_THREADS"; then
3910 USE_PTHREADS=
3912 if test "$USE_USER_PTHREADS"; then
3913 USE_PTHREADS=
3918 *-irix*)
3919 cat >> confdefs.h <<\EOF
3920 #define XP_UNIX 1
3923 cat >> confdefs.h <<\EOF
3924 #define IRIX 1
3927 cat >> confdefs.h <<\EOF
3928 #define SVR4 1
3931 cat >> confdefs.h <<\EOF
3932 #define _SGI_MP_SOURCE 1
3935 cat >> confdefs.h <<\EOF
3936 #define HAVE_FCNTL_FILE_LOCKING 1
3939 PR_MD_CSRCS=irix.c
3940 PR_MD_ASFILES=os_Irix.s
3941 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
3942 STRIP="$STRIP -f"
3943 RESOLVE_LINK_SYMBOLS=1
3944 if test -n "$USE_64"; then
3945 MDCPUCFG_H=_irix64.cfg
3946 else
3947 MDCPUCFG_H=_irix32.cfg
3949 case "${target_os}" in
3950 irix6*)
3951 cat >> confdefs.h <<\EOF
3952 #define IRIX6 1
3955 USE_PTHREADS=1
3956 USE_N32=1
3957 COMPILER_TAG=_n32
3958 IMPL_STRATEGY=_PTH
3960 irix5*)
3961 cat >> confdefs.h <<\EOF
3962 #define IRIX5 1
3965 USE_NSPR_THREADS=1
3968 USE_PTHREADS=1
3969 USE_N32=1
3971 esac
3972 if test "$GNU_CC"; then
3973 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
3974 CFLAGS="$CFLAGS -Wall -Wno-format"
3975 _OPTIMIZE_FLAGS="-O6"
3976 else
3977 if test -n "$USE_N32"; then
3978 AS='as -D_ASM $(INCLUDES) -n32'
3979 else
3980 AS='as -D_ASM $(INCLUDES)'
3982 CFLAGS="$CFLAGS -fullwarn -xansi"
3983 if test "$USE_N32"; then
3984 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
3985 else
3986 _OPTIMIZE_FLAGS="-O -Olimit 4000"
3988 if test "$USE_MDUPDATE"; then
3989 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
3991 case "${target}" in
3992 *-irix6.*)
3993 CFLAGS="$CFLAGS -multigot"
3994 DSO_LDOPTS="-no_unresolved"
3995 if test "$USE_N32"; then
3996 CFLAGS="$CFLAGS -n32 -woff 1209"
3997 DSO_LDOPTS="$DSO_LDOPTS -n32"
3998 else
3999 if test "$USE_64"; then
4000 CFLAGS="$CFLAGS -64"
4001 else
4002 CFLAGS="$CFLAGS -32"
4007 CFLAGS="$CFLAGS -xgot"
4009 esac
4011 if test "${target_os}" = "irix5.3"; then
4012 cat >> confdefs.h <<\EOF
4013 #define IRIX5_3 1
4017 case "${target_os}" in
4018 irix6.5)
4019 if test -z "$GNU_CC"; then
4020 CFLAGS="$CFLAGS -mips3"
4022 cat >> confdefs.h <<\EOF
4023 #define _PR_HAVE_GETPROTO_R 1
4026 cat >> confdefs.h <<\EOF
4027 #define _PR_HAVE_GETPROTO_R_POINTER 1
4030 cat >> confdefs.h <<\EOF
4031 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4035 irix5*)
4038 cat >> confdefs.h <<\EOF
4039 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4043 esac
4046 arm-android-eabi)
4047 if test -z "$USE_NSPR_THREADS"; then
4048 USE_PTHREADS=1
4049 IMPL_STRATEGY=_PTH
4051 cat >> confdefs.h <<\EOF
4052 #define XP_UNIX 1
4055 cat >> confdefs.h <<\EOF
4056 #define _GNU_SOURCE 1
4059 cat >> confdefs.h <<\EOF
4060 #define HAVE_FCNTL_FILE_LOCKING 1
4063 cat >> confdefs.h <<\EOF
4064 #define LINUX 1
4067 CFLAGS="$CFLAGS -Wall"
4068 CXXFLAGS="$CXXFLAGS -Wall"
4069 MDCPUCFG_H=_linux.cfg
4070 PR_MD_CSRCS=linux.c
4071 MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
4072 DSO_CFLAGS=-fPIC
4073 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4074 _OPTIMIZE_FLAGS=-O2
4075 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4076 # combo is not yet good at debugging inlined
4077 # functions (even when using DWARF2 as the
4078 # debugging format)
4079 COMPILER_TAG=_glibc
4080 CPU_ARCH=arm
4081 CPU_ARCH_TAG=_arm
4082 OS_TARGET=Android
4085 *-linux*|*-gnu*|*-k*bsd*-gnu)
4086 if test -z "$USE_NSPR_THREADS"; then
4087 USE_PTHREADS=1
4088 IMPL_STRATEGY=_PTH
4090 cat >> confdefs.h <<\EOF
4091 #define XP_UNIX 1
4094 cat >> confdefs.h <<\EOF
4095 #define _GNU_SOURCE 1
4098 cat >> confdefs.h <<\EOF
4099 #define HAVE_FCNTL_FILE_LOCKING 1
4102 case "${target_os}" in
4103 linux*)
4104 cat >> confdefs.h <<\EOF
4105 #define LINUX 1
4109 esac
4110 CFLAGS="$CFLAGS -Wall"
4111 CXXFLAGS="$CXXFLAGS -Wall"
4112 MDCPUCFG_H=_linux.cfg
4113 PR_MD_CSRCS=linux.c
4114 MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
4115 DSO_CFLAGS=-fPIC
4116 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4117 _OPTIMIZE_FLAGS=-O2
4118 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4119 # combo is not yet good at debugging inlined
4120 # functions (even when using DWARF2 as the
4121 # debugging format)
4122 COMPILER_TAG=_glibc
4123 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
4124 CPU_ARCH=x86
4125 else
4126 CPU_ARCH=$OS_TEST
4128 CPU_ARCH_TAG=_${CPU_ARCH}
4129 case "${target_cpu}" in
4130 alpha)
4131 cat >> confdefs.h <<\EOF
4132 #define _ALPHA_ 1
4135 cat >> confdefs.h <<\EOF
4136 #define __alpha 1
4139 CFLAGS="$CFLAGS -mieee"
4140 CXXFLAGS="$CXXFLAGS -mieee"
4142 i*86)
4143 cat >> confdefs.h <<\EOF
4144 #define i386 1
4147 PR_MD_ASFILES=os_Linux_x86.s
4149 ia64)
4150 PR_MD_ASFILES=os_Linux_ia64.s
4152 x86_64)
4153 if test -n "$USE_64"; then
4154 PR_MD_ASFILES=os_Linux_x86_64.s
4155 else
4156 cat >> confdefs.h <<\EOF
4157 #define i386 1
4160 PR_MD_ASFILES=os_Linux_x86.s
4161 CC="$CC -m32"
4162 CXX="$CXX -m32"
4165 ppc|powerpc)
4166 PR_MD_ASFILES=os_Linux_ppc.s
4168 powerpc64)
4169 if test -n "$USE_64"; then
4170 CC="$CC -m64"
4171 CXX="$CXX -m64"
4172 else
4173 PR_MD_ASFILES=os_Linux_ppc.s
4176 m68k)
4177 CFLAGS="$CFLAGS -m68020-60"
4178 CXXFLAGS="$CXXFLAGS -m68020-60"
4180 esac
4183 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
4184 cat >> confdefs.h <<\EOF
4185 #define XP_PC 1
4188 cat >> confdefs.h <<\EOF
4189 #define WIN32 1
4192 PR_MD_ARCH_DIR=windows
4193 RESOLVE_LINK_SYMBOLS=1
4195 if test -n "$GNU_CC"; then
4196 CC="$CC -mno-cygwin"
4197 CXX="$CXX -mno-cygwin"
4198 DLL_SUFFIX=dll
4199 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
4200 RC=$WINDRES
4201 # Use temp file for windres (bug 213281)
4202 RCFLAGS='-O coff --use-temp-file'
4203 else
4204 CC=cl
4205 CXX=cl
4206 LD=link
4207 AR='lib -NOLOGO -OUT:"$@"'
4208 AR_FLAGS=
4209 RANLIB='echo not_ranlib'
4210 STRIP='echo not_strip'
4211 RC=rc.exe
4212 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4213 OBJ_SUFFIX=obj
4214 LIB_SUFFIX=lib
4215 DLL_SUFFIX=dll
4217 # Determine compiler version
4219 _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
4221 CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
4222 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
4223 _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
4224 _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
4225 _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
4226 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4228 if test "$_CC_MAJOR_VERSION" -eq "14"; then
4229 if test $_CC_RELEASE -gt 50727; then
4230 _USE_DYNAMICBASE=1
4231 elif test $_CC_BUILD -ge 762; then
4232 _USE_DYNAMICBASE=1
4234 elif test $_CC_MAJOR_VERSION -ge 15; then
4235 _USE_DYNAMICBASE=1
4238 if test -n "$_USE_DYNAMICBASE"; then
4239 DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
4242 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4243 # tape manipulation utility (or something else)
4244 if test "$MSC_VER" -ge "1400"; then
4246 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4249 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4250 if test -n "$MSMT_TOOL"; then
4251 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4252 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4253 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4255 MT=mt
4256 unset MSMT_TOOL
4257 else
4258 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4262 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4263 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4264 _DEBUG_FLAGS=-Zi
4265 _OPTIMIZE_FLAGS=-O2
4267 PROFILE_GEN_CFLAGS="-GL"
4268 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
4269 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
4270 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
4272 if test -z "$MOZ_OPTIMIZE"; then
4273 CFLAGS="$CFLAGS -Od"
4276 if test -n "$USE_DEBUG_RTL"; then
4277 CFLAGS="$CFLAGS -MDd"
4278 else
4279 CFLAGS="$CFLAGS -MD"
4282 if test -n "$MOZ_DEBUG"; then
4283 cat >> confdefs.h <<\EOF
4284 #define _DEBUG 1
4287 else
4288 DEFINES="$DEFINES -U_DEBUG"
4291 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4292 if test -n "$MOZ_OPTIMIZE"; then
4293 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4294 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4295 else
4296 DLLFLAGS="$DLLFLAGS -DEBUG"
4297 LDFLAGS="$LDFLAGS -DEBUG"
4301 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4302 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4303 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4306 if test "$OS_TARGET" = "WINNT"; then
4307 CFLAGS="$CFLAGS -GT"
4308 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4309 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4310 else
4311 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4312 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4314 fi # GNU_CC
4316 if test -n "$USE_STATIC_TLS"; then
4317 cat >> confdefs.h <<\EOF
4318 #define _PR_USE_STATIC_TLS 1
4323 if test "$OS_TARGET" = "WINNT"; then
4324 cat >> confdefs.h <<\EOF
4325 #define WINNT 1
4328 else
4329 cat >> confdefs.h <<\EOF
4330 #define WIN95 1
4333 # undefine WINNT as some versions of mingw gcc define it by default
4334 DEFINES="$DEFINES -UWINNT"
4335 cat >> confdefs.h <<\EOF
4336 #define _PR_GLOBAL_THREADS_ONLY 1
4341 if test "$CPU_ARCH" = "x86"; then
4342 CPU_ARCH_TAG=
4343 else
4344 CPU_ARCH_TAG=$CPU_ARCH
4347 if test -n "$USE_DEBUG_RTL"; then
4348 OBJDIR_SUFFIX=OBJD
4351 case "$OS_TARGET" in
4352 WINNT)
4353 MDCPUCFG_H=_winnt.cfg
4355 WIN95)
4356 MDCPUCFG_H=_win95.cfg
4359 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4361 esac
4363 case "$target_cpu" in
4364 i*86)
4365 if test -n "$USE_64"; then
4366 cat >> confdefs.h <<\EOF
4367 #define _AMD64_ 1
4370 else
4371 cat >> confdefs.h <<\EOF
4372 #define _X86_ 1
4377 x86_64)
4378 cat >> confdefs.h <<\EOF
4379 #define _AMD64_ 1
4382 USE_64=1
4384 ia64)
4385 cat >> confdefs.h <<\EOF
4386 #define _IA64_ 1
4389 USE_64=1
4392 cat >> confdefs.h <<\EOF
4393 #define _CPU_ARCH_NOT_DEFINED 1
4397 esac
4400 *-wince*|*-winmo*)
4401 cat >> confdefs.h <<\EOF
4402 #define XP_PC 1
4405 cat >> confdefs.h <<\EOF
4406 #define WIN32 1
4409 cat >> confdefs.h <<\EOF
4410 #define WINCE 1
4413 cat >> confdefs.h <<\EOF
4414 #define _PR_GLOBAL_THREADS_ONLY 1
4418 AR_FLAGS='-NOLOGO -OUT:"$@"'
4420 OBJ_SUFFIX=obj
4421 LIB_SUFFIX=lib
4422 DLL_SUFFIX=dll
4423 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4425 PR_MD_ARCH_DIR=windows
4426 RESOLVE_LINK_SYMBOLS=1
4428 MDCPUCFG_H=_win95.cfg
4429 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4430 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4432 DLLFLAGS='-OUT:"$@"'
4433 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4434 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4435 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4436 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4438 _DEBUG_FLAGS=-Zi
4439 _OPTIMIZE_FLAGS=-O2
4442 *-ncr-sysv*)
4443 cat >> confdefs.h <<\EOF
4444 #define XP_UNIX 1
4447 cat >> confdefs.h <<\EOF
4448 #define SVR4 1
4451 cat >> confdefs.h <<\EOF
4452 #define SYSV 1
4455 cat >> confdefs.h <<\EOF
4456 #define NCR 1
4459 USE_NSPR_THREADS=1
4460 if test "$OS_RELEASE" = "2.03"; then
4461 cat >> confdefs.h <<\EOF
4462 #define _PR_STAT_HAS_ST_ATIM 1
4465 else
4466 cat >> confdefs.h <<\EOF
4467 #define _PR_STAT_HAS_ST_ATIM_UNION 1
4472 if test -z "$GNU_CC"; then
4473 CFLAGS="$CFLAGS -Hnocopyr"
4474 CXXFLAGS="$CXXFLAGS -Hnocopyr"
4475 else
4476 CFLAGS="$CFLAGS -fPIC -Wall"
4477 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
4478 DSO_LDOPTS=-G
4480 MDCPUCFG_H=_ncr.cfg
4481 PR_MD_CSRCS=ncr.c
4484 mips-nec-sysv*)
4485 cat >> confdefs.h <<\EOF
4486 #define XP_UNIX 1
4489 cat >> confdefs.h <<\EOF
4490 #define SVR4 1
4493 cat >> confdefs.h <<\EOF
4494 #define __SVR4 1
4497 cat >> confdefs.h <<\EOF
4498 #define NEC 1
4501 cat >> confdefs.h <<\EOF
4502 #define nec_ews 1
4505 USE_NSPR_THREADS=1
4506 if test -z "$GNU_CC"; then
4507 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
4508 CXX=g++
4510 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
4511 DSO_LDOPTS=-G
4512 MDCPUCFG_H=_nec.cfg
4513 PR_MD_CSRCS=nec.c
4516 *-netbsd*)
4517 cat >> confdefs.h <<\EOF
4518 #define XP_UNIX 1
4521 cat >> confdefs.h <<\EOF
4522 #define NETBSD 1
4525 cat >> confdefs.h <<\EOF
4526 #define HAVE_BSD_FLOCK 1
4529 if test -z "$USE_NSPR_THREADS"; then
4530 USE_PTHREADS=1
4532 MDCPUCFG_H=_netbsd.cfg
4533 PR_MD_CSRCS=netbsd.c
4535 DSO_CFLAGS='-fPIC -DPIC'
4536 CFLAGS="$CFLAGS -ansi -Wall"
4537 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4538 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4540 if test -z "$OBJECT_FMT"; then
4541 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4542 OBJECT_FMT=a.out
4543 DLL_SUFFIX=so.1.0
4544 DSO_LDOPTS='-shared'
4545 else
4546 OBJECT_FMT=ELF
4547 DLL_SUFFIX=so
4548 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4552 if test "$LIBRUNPATH"; then
4553 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4557 mips-sony-newsos*)
4558 cat >> confdefs.h <<\EOF
4559 #define XP_UNIX 1
4562 cat >> confdefs.h <<\EOF
4563 #define SONY 1
4566 cat >> confdefs.h <<\EOF
4567 #define SYSV 1
4570 cat >> confdefs.h <<\EOF
4571 #define SVR4 1
4574 cat >> confdefs.h <<\EOF
4575 #define __svr4 1
4578 cat >> confdefs.h <<\EOF
4579 #define __svr4__ 1
4582 cat >> confdefs.h <<\EOF
4583 #define HAVE_SVID_GETTOD 1
4586 USE_NSPR_THREADS=1
4587 CFLAGS="$CFLAGS -Xa -fullwarn"
4588 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4589 DSO_LDOPTS=-G
4590 MDCPUCFG_H=_sony.cfg
4591 PR_MD_CSRCS=sony.c
4594 *-nextstep*|*-openstep*)
4595 cat >> confdefs.h <<\EOF
4596 #define XP_UNIX 1
4599 cat >> confdefs.h <<\EOF
4600 #define NEXTSTEP 1
4603 cat >> confdefs.h <<\EOF
4604 #define HAVE_BSD_FLOCK 1
4607 cat >> confdefs.h <<\EOF
4608 #define _POSIX_SOURCE 1
4611 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4612 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4613 USE_NSPR_THREADS=1
4614 DLL_SUFFIX=dylib
4615 MDCPUCFG_H=_nextstep.cfg
4616 PR_MD_CSRCS=nextstep.c
4620 *-nto*)
4621 cat >> confdefs.h <<\EOF
4622 #define XP_UNIX 1
4625 cat >> confdefs.h <<\EOF
4626 #define NTO 1
4629 cat >> confdefs.h <<\EOF
4630 #define _QNX_SOURCE 1
4633 cat >> confdefs.h <<\EOF
4634 #define HAVE_POINTER_LOCALTIME_R 1
4637 MDCPUCFG_H=_nto.cfg
4638 PR_MD_CSRCS=nto.c
4639 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4640 DSO_CFLAGS=-fPIC
4641 DSO_LDOPTS=-shared
4642 OS_LIBS="$OS_LIBS -lsocket"
4643 _OPTIMIZE_FLAGS="-O1"
4644 _DEBUG_FLAGS="-gstabs"
4647 *-openbsd*)
4648 cat >> confdefs.h <<\EOF
4649 #define XP_UNIX 1
4652 cat >> confdefs.h <<\EOF
4653 #define OPENBSD 1
4656 cat >> confdefs.h <<\EOF
4657 #define HAVE_BSD_FLOCK 1
4660 cat >> confdefs.h <<\EOF
4661 #define HAVE_SOCKLEN_T 1
4664 CFLAGS="$CFLAGS -ansi -Wall"
4665 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4666 DLL_SUFFIX=so.1.0
4667 DSO_CFLAGS=-fPIC
4668 MDCPUCFG_H=_openbsd.cfg
4669 PR_MD_CSRCS=openbsd.c
4670 OS_LIBS="-lc"
4671 if test -z "$USE_NSPR_THREADS"; then
4672 USE_PTHREADS=1
4674 DSO_LDOPTS='-shared -fPIC'
4675 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4678 *-osf*)
4679 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4680 cat >> confdefs.h <<\EOF
4681 #define XP_UNIX 1
4684 cat >> confdefs.h <<\EOF
4685 #define OSF1 1
4688 cat >> confdefs.h <<\EOF
4689 #define _REENTRANT 1
4692 # OSF1 and HPUX report the POLLHUP event for a socket when the
4693 # shutdown(SHUT_WR) operation is called for the remote end, even though
4694 # the socket is still writeable. Use select(), instead of poll(), to
4695 # workaround this problem.
4696 cat >> confdefs.h <<\EOF
4697 #define _PR_POLL_WITH_SELECT 1
4701 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4702 USE_NSPR_THREADS=1
4705 if test -z "$GNU_CC"; then
4706 CC="$CC -std1 -ieee_with_inexact"
4707 if test "$OS_RELEASE" != "V2.0"; then
4708 CC="$CC -readonly_strings"
4710 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4711 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4712 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4713 echo "configure:4714: checking for machine/builtins.h" >&5
4714 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <machine/builtins.h>
4722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4723 { (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4725 if test -z "$ac_err"; then
4726 rm -rf conftest*
4727 eval "ac_cv_header_$ac_safe=yes"
4728 else
4729 echo "$ac_err" >&5
4730 echo "configure: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4732 rm -rf conftest*
4733 eval "ac_cv_header_$ac_safe=no"
4735 rm -f conftest*
4737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4738 echo "$ac_t""yes" 1>&6
4739 cat >> confdefs.h <<\EOF
4740 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4743 else
4744 echo "$ac_t""no" 1>&6
4747 else
4748 CFLAGS="$CFLAGS -mieee"
4749 CXXFLAGS="$CXXFLAGS -mieee"
4752 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4753 cat >> confdefs.h <<\EOF
4754 #define HAVE_INT_LOCALTIME_R 1
4757 else
4758 cat >> confdefs.h <<\EOF
4759 #define HAVE_FCNTL_FILE_LOCKING 1
4762 cat >> confdefs.h <<\EOF
4763 #define HAVE_POINTER_LOCALTIME_R 1
4767 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4768 cat >> confdefs.h <<\EOF
4769 #define OSF1V4_MAP_PRIVATE_BUG 1
4773 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4774 MDCPUCFG_H=_osf1.cfg
4775 PR_MD_CSRCS=osf1.c
4778 *-qnx*)
4779 cat >> confdefs.h <<\EOF
4780 #define XP_UNIX 1
4783 cat >> confdefs.h <<\EOF
4784 #define QNX 1
4787 cat >> confdefs.h <<\EOF
4788 #define _PR_NEED_H_ERRNO 1
4791 USE_NSPR_THREADS=1
4792 MDCPUCFG_H=_qnx.cfg
4793 PR_MD_CSRCS=qnx.c
4796 *-riscos*)
4797 cat >> confdefs.h <<\EOF
4798 #define XP_UNIX 1
4801 cat >> confdefs.h <<\EOF
4802 #define RISCOS 1
4805 cat >> confdefs.h <<\EOF
4806 #define _PR_NEED_H_ERRNO 1
4809 USE_PTHREADS=1
4810 MDCPUCFG_H=_riscos.cfg
4811 PR_MD_CSRCS=riscos.c
4812 DSO_CFLAGS=-fPIC
4813 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4814 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4817 *-*-sco*)
4818 cat >> confdefs.h <<\EOF
4819 #define XP_UNIX 1
4822 cat >> confdefs.h <<\EOF
4823 #define SCO 1
4826 cat >> confdefs.h <<\EOF
4827 #define sco 1
4830 cat >> confdefs.h <<\EOF
4831 #define SYSV 1
4834 cat >> confdefs.h <<\EOF
4835 #define _SVID3 1
4838 cat >> confdefs.h <<\EOF
4839 #define _PR_NEED_H_ERRNO 1
4842 CC='cc -b elf -KPIC'
4843 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4844 USE_NSPR_THREADS=1
4845 CPU_ARCH=x86
4846 DSO_LDOPTS='-b elf -G'
4847 MDCPUCFG_H=_scoos.cfg
4848 PR_MD_SRCS=scoos.c
4851 *-sinix*)
4852 cat >> confdefs.h <<\EOF
4853 #define XP_UNIX 1
4856 cat >> confdefs.h <<\EOF
4857 #define SVR4 1
4860 cat >> confdefs.h <<\EOF
4861 #define SNI 1
4864 cat >> confdefs.h <<\EOF
4865 #define RELIANTUNIX 1
4868 cat >> confdefs.h <<\EOF
4869 #define sinix 1
4872 cat >> confdefs.h <<\EOF
4873 #define HAVE_SVID_GETTOD 1
4876 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4877 cat >> confdefs.h <<\EOF
4878 #define i386 1
4881 CPU_ARCH=x86
4882 else
4883 CPU_ARCH=mips
4886 if test "$GNU_CC"; then
4887 AS='$(CC) -x assembler-with-cpp'
4888 if test "$CPU_ARCH" = "mips"; then
4889 LD=gld
4891 CFLAGS="$CFLAGS -Wall -Wno-format"
4892 else
4893 AS='/usr/bin/cc'
4894 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4897 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4899 if test "$OS_RELEASE" = "5.43"; then
4900 cat >> confdefs.h <<\EOF
4901 #define IP_MULTICAST 1
4906 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4907 USE_NSPR_THREADS=1
4908 MDCPUCFG_H=_reliantunix.cfg
4909 PR_MD_CSRCS=reliantunix.c
4910 if test "${OS_ARCH}" = "mips"; then
4911 PR_MD_ASFILES=os_ReliantUNIX.s
4915 *-sunos*)
4916 cat >> confdefs.h <<\EOF
4917 #define XP_UNIX 1
4920 cat >> confdefs.h <<\EOF
4921 #define SUNOS4 1
4924 CFLAGS="$CFLAGS -Wall -Wno-format"
4925 if test "$USE_MDUPDATE"; then
4926 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4928 CPU_ARCH=sparc
4929 DLL_SUFFIX=so.1.0
4930 DSO_LDOPTS=
4931 DSO_CFLAGS=-fPIC
4932 USE_NSPR_THREADS=1
4933 if test "$OS_RELEASE" = "4.1.3_U1"; then
4934 _OPTIMIZE_FLAGS=
4935 OS_LIBS="$OS_LIBS -lm"
4937 MDCPUCFG_H=_sunos4.cfg
4938 PR_MD_CSRCS=sunos4.c
4941 *-solaris*)
4942 if test -z "$USE_NSPR_THREADS"; then
4943 USE_PTHREADS=1
4945 cat >> confdefs.h <<\EOF
4946 #define XP_UNIX 1
4949 cat >> confdefs.h <<\EOF
4950 #define SVR4 1
4953 cat >> confdefs.h <<\EOF
4954 #define SYSV 1
4957 cat >> confdefs.h <<\EOF
4958 #define __svr4 1
4961 cat >> confdefs.h <<\EOF
4962 #define __svr4__ 1
4965 cat >> confdefs.h <<\EOF
4966 #define SOLARIS 1
4969 cat >> confdefs.h <<\EOF
4970 #define HAVE_FCNTL_FILE_LOCKING 1
4973 CPU_ARCH=`uname -p`
4974 MDCPUCFG_H=_solaris.cfg
4975 PR_MD_CSRCS=solaris.c
4976 LD=/usr/ccs/bin/ld
4977 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4978 RESOLVE_LINK_SYMBOLS=1
4979 case "${OS_RELEASE}" in
4980 5.8|5.9)
4983 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
4984 USE_B_DIRECT=1
4986 esac
4987 if test -n "$GNU_CC"; then
4988 DSO_CFLAGS=-fPIC
4989 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
4990 GCC_USE_GNU_LD=1
4992 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
4993 if test -n "$USE_B_DIRECT"; then
4994 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
4996 else
4997 DSO_CFLAGS=-KPIC
4998 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
4999 if test -n "$USE_B_DIRECT"; then
5000 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5003 if test -n "$GNU_CC"; then
5004 CFLAGS="$CFLAGS -Wall"
5005 CXXFLAGS="$CXXFLAGS -Wall"
5006 if test -n "$USE_MDUPDATE"; then
5007 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
5008 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
5010 GCC_AS=`$CC -print-prog-name=as`
5011 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
5012 GNU_AS=1
5014 else
5015 CFLAGS="$CFLAGS -xstrconst"
5016 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
5017 if test -z "$MOZ_OPTIMIZE"; then
5018 CFLAGS="$CFLAGS -xs"
5019 CXXFLAGS="$CXXFLAGS -xs"
5021 _OPTIMIZE_FLAGS=-xO4
5023 if test -z "$GNU_AS"; then
5024 ASFLAGS="$ASFLAGS -Wa,-P"
5026 if test -n "$USE_64"; then
5027 if test -n "$GNU_CC"; then
5028 CC="$CC -m64"
5029 CXX="$CXX -m64"
5030 else
5031 if test "$OS_TEST" = "i86pc"; then
5032 CC="$CC -xarch=amd64"
5033 CXX="$CXX -xarch=amd64"
5034 else
5035 CC="$CC -xarch=v9"
5036 CXX="$CXX -xarch=v9"
5040 if test "$OS_TEST" = "i86pc"; then
5041 if test -z "$USE_64"; then
5042 cat >> confdefs.h <<\EOF
5043 #define i386 1
5047 CPU_ARCH_TAG=_$OS_TEST
5048 # The default debug format, DWARF (-g), is not supported by gcc
5049 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
5050 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
5051 # If your gcc uses GNU as, you do not need the -Wa,-s option.
5052 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
5053 _DEBUG_FLAGS=-gstabs
5054 if test -z "$GNU_AS"; then
5055 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
5059 case "${target_os}" in
5060 solaris2.3*)
5061 cat >> confdefs.h <<\EOF
5062 #define _PR_NO_LARGE_FILES 1
5066 solaris2.4*)
5067 cat >> confdefs.h <<\EOF
5068 #define _PR_NO_LARGE_FILES 1
5072 solaris2.5*)
5073 cat >> confdefs.h <<\EOF
5074 #define SOLARIS2_5 1
5079 cat >> confdefs.h <<\EOF
5080 #define _PR_HAVE_OFF64_T 1
5083 # The lfcompile64(5) man page on Solaris 2.6 says:
5084 # For applications that do not wish to conform to the POSIX or
5085 # X/Open specifications, the 64-bit transitional interfaces
5086 # are available by default. No compile-time flags need to be
5087 # set.
5088 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
5089 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
5090 if test -n "$GNU_CC"; then
5091 cat >> confdefs.h <<\EOF
5092 #define _LARGEFILE64_SOURCE 1
5097 esac
5098 case "${target_os}" in
5099 solaris2.3*)
5101 solaris2.4*)
5103 solaris2.5*)
5105 solaris2.6*)
5107 solaris2.7*)
5110 # Solaris 8 or higher has IPv6.
5111 cat >> confdefs.h <<\EOF
5112 #define _PR_INET6 1
5116 esac
5117 if test "$CPU_ARCH" = "sparc"; then
5118 # 64-bit Solaris SPARC requires V9 architecture, so the following
5119 # is not needed.
5120 if test -z "$USE_64"; then
5121 ULTRASPARC_LIBRARY=nspr_flt
5124 # Purify requires that binaries linked against nspr also
5125 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
5126 _rev=`uname -r`
5127 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
5128 OS_LIBS="$OS_LIBS $_librt"
5131 *-sco-sysv5*)
5132 cat >> confdefs.h <<\EOF
5133 #define XP_UNIX 1
5136 cat >> confdefs.h <<\EOF
5137 #define UNIXWARE 1
5140 cat >> confdefs.h <<\EOF
5141 #define SVR4 1
5144 cat >> confdefs.h <<\EOF
5145 #define SYSV 1
5148 USE_NSPR_THREADS=1
5149 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
5150 cat >> confdefs.h <<\EOF
5151 #define _PR_NO_LARGE_FILES 1
5154 CC='$(NSDEPTH)/build/hcc cc'
5155 CXX='$(NSDEPTH)/build/hcpp CC'
5156 MDCPUCFG_H=_unixware.cfg
5157 else
5158 cat >> confdefs.h <<\EOF
5159 #define _LARGEFILE64_SOURCE 1
5162 cat >> confdefs.h <<\EOF
5163 #define _PR_HAVE_OFF64_T 1
5166 cat >> confdefs.h <<\EOF
5167 #define _PR_HAVE_SOCKADDR_LEN 1
5170 MDCPUCFG_H=_unixware7.cfg
5172 PR_MD_CSRCS=unixware.c
5173 DSO_LDOPTS=-G
5174 CPU_ARCH=x86
5177 *-symbian*)
5178 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
5179 if test "${with_symbian_sdk+set}" = set; then
5180 withval="$with_symbian_sdk"
5181 SYMBIAN_SDK_DIR=$withval
5185 echo -----------------------------------------------------------------------------
5186 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
5187 echo -----------------------------------------------------------------------------
5189 cat >> confdefs.h <<\EOF
5190 #define XP_UNIX 1
5193 cat >> confdefs.h <<\EOF
5194 #define SYMBIAN 1
5197 cat >> confdefs.h <<\EOF
5198 #define __arm__ 1
5201 cat >> confdefs.h <<\EOF
5202 #define __SYMBIAN32__ 1
5205 cat >> confdefs.h <<\EOF
5206 #define _UNICODE 1
5209 cat >> confdefs.h <<\EOF
5210 #define NDEBUG 1
5213 cat >> confdefs.h <<\EOF
5214 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5217 cat >> confdefs.h <<\EOF
5218 #define MOZ_STDERR_TO_STDOUT 1
5221 cat >> confdefs.h <<\EOF
5222 #define HAVE_FCNTL_FILE_LOCKING 1
5225 cat >> confdefs.h <<\EOF
5226 #define HAVE_SOCKLEN_T 1
5229 USE_PTHREADS=1
5230 LIB_SUFFIX=lib
5231 DLL_SUFFIX=dll
5232 MKSHLIB=
5233 DSO_LDOPTS=
5234 DSO_CFLAGS=
5235 VISIBILITY_FLAGS=
5236 MDCPUCFG_H=_symbian.cfg
5237 PR_MD_CSRCS=symbian.c
5238 NSINSTALL=nsinstall
5239 RANLIB='echo no ranlib '
5240 CPU_ARCH=ARM
5241 OS_ARCH=SYMBIAN
5242 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5243 CFLAGS="$CFLAGS -MD -nostdinc"
5244 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5245 echo -------------------------------------------------------
5246 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5247 echo -------------------------------------------------------
5248 case "$OS_TARGET" in
5249 WINSCW)
5250 CC=mwccsym2.exe
5251 CXX=mwccsym2.exe
5252 LD=mwldsym2.exe
5253 AR=mwldsym2.exe
5254 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5255 CFLAGS="$CFLAGS -O0 -inline off -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -nostderr -gccdep -cwd source -i- -I\$(VPATH)"
5256 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5257 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5258 cat >> confdefs.h <<\EOF
5259 #define _DEBUG 1
5262 cat >> confdefs.h <<\EOF
5263 #define __CW32__ 1
5266 cat >> confdefs.h <<\EOF
5267 #define __WINS__ 1
5270 cat >> confdefs.h <<\EOF
5271 #define __WINSCW__ 1
5274 DEFINES="$DEFINES -U_WIN32"
5276 GCCE)
5277 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5278 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5279 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5280 cat >> confdefs.h <<\EOF
5281 #define __GCCE__ 1
5284 cat >> confdefs.h <<\EOF
5285 #define __EABI__ 1
5288 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5291 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5293 esac
5294 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5297 *-os2*)
5298 cat >> confdefs.h <<\EOF
5299 #define XP_OS2 1
5302 cat >> confdefs.h <<\EOF
5303 #define XP_PC 1
5306 cat >> confdefs.h <<\EOF
5307 #define BSD_SELECT 1
5310 cat >> confdefs.h <<\EOF
5311 #define TCPV40HDRS 1
5314 LIB_SUFFIX=lib
5315 DLL_SUFFIX=dll
5316 RC=rc.exe
5317 PR_MD_ARCH_DIR=os2
5318 PROG_SUFFIX=.exe
5319 NSINSTALL=nsinstall
5320 MDCPUCFG_H=_os2.cfg
5321 RESOLVE_LINK_SYMBOLS=1
5323 cat >> confdefs.h <<\EOF
5324 #define OS2 1
5327 AR=emxomfar
5328 AR_FLAGS='r $@'
5329 CFLAGS="$CFLAGS -Wall -Zomf"
5330 CXXFLAGS="$CFLAGS -Wall -Zomf"
5331 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5332 DSO_CFLAGS=
5333 DSO_LDOPTS='-Zomf -Zdll'
5334 LDFLAGS='-Zmap'
5335 _OPTIMIZE_FLAGS="-O2 -s"
5336 _DEBUG_FLAGS="-g -fno-inline"
5337 if test -n "$MOZ_OPTIMIZE"; then
5338 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5340 IMPLIB='emximp -o'
5341 FILTER='emxexp -o'
5342 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5343 LDFLAGS="$LDFLAGS -Zhigh-mem"
5344 cat >> confdefs.h <<\EOF
5345 #define MOZ_OS2_HIGH_MEMORY 1
5350 # GCC for OS/2 currently predefines these, but we don't want them
5351 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5355 cat >> confdefs.h <<\EOF
5356 #define XP_UNIX 1
5361 esac
5363 if test -z "$SKIP_LIBRARY_CHECKS"; then
5367 case $target in
5368 *-darwin*|*-beos*|*-os2*)
5371 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5372 echo "configure:5373: checking for dlopen in -ldl" >&5
5373 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5374 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5375 echo $ac_n "(cached) $ac_c" 1>&6
5376 else
5377 ac_save_LIBS="$LIBS"
5378 LIBS="-ldl $LIBS"
5379 cat > conftest.$ac_ext <<EOF
5380 #line 5381 "configure"
5381 #include "confdefs.h"
5382 /* Override any gcc2 internal prototype to avoid an error. */
5383 /* We use char because int might match the return type of a gcc2
5384 builtin and then its argument prototype would still apply. */
5385 char dlopen();
5387 int main() {
5388 dlopen()
5389 ; return 0; }
5391 if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5392 rm -rf conftest*
5393 eval "ac_cv_lib_$ac_lib_var=yes"
5394 else
5395 echo "configure: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 rm -rf conftest*
5398 eval "ac_cv_lib_$ac_lib_var=no"
5400 rm -f conftest*
5401 LIBS="$ac_save_LIBS"
5404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5405 echo "$ac_t""yes" 1>&6
5406 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5407 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5408 echo "configure:5409: checking for dlfcn.h" >&5
5409 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5410 echo $ac_n "(cached) $ac_c" 1>&6
5411 else
5412 cat > conftest.$ac_ext <<EOF
5413 #line 5414 "configure"
5414 #include "confdefs.h"
5415 #include <dlfcn.h>
5417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5418 { (eval echo configure:5419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5420 if test -z "$ac_err"; then
5421 rm -rf conftest*
5422 eval "ac_cv_header_$ac_safe=yes"
5423 else
5424 echo "$ac_err" >&5
5425 echo "configure: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
5427 rm -rf conftest*
5428 eval "ac_cv_header_$ac_safe=no"
5430 rm -f conftest*
5432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5433 echo "$ac_t""yes" 1>&6
5434 OS_LIBS="-ldl $OS_LIBS"
5435 else
5436 echo "$ac_t""no" 1>&6
5439 else
5440 echo "$ac_t""no" 1>&6
5444 esac
5449 if test $ac_cv_prog_gcc = yes; then
5450 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5451 echo "configure:5452: checking whether ${CC-cc} needs -traditional" >&5
5452 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5453 echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455 ac_pattern="Autoconf.*'x'"
5456 cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459 #include <sgtty.h>
5460 Autoconf TIOCGETP
5462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5463 egrep "$ac_pattern" >/dev/null 2>&1; then
5464 rm -rf conftest*
5465 ac_cv_prog_gcc_traditional=yes
5466 else
5467 rm -rf conftest*
5468 ac_cv_prog_gcc_traditional=no
5470 rm -f conftest*
5473 if test $ac_cv_prog_gcc_traditional = no; then
5474 cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5477 #include <termio.h>
5478 Autoconf TCGETA
5480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481 egrep "$ac_pattern" >/dev/null 2>&1; then
5482 rm -rf conftest*
5483 ac_cv_prog_gcc_traditional=yes
5485 rm -f conftest*
5490 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5491 if test $ac_cv_prog_gcc_traditional = yes; then
5492 CC="$CC -traditional"
5496 for ac_func in lchown strerror
5498 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5499 echo "configure:5500: checking for $ac_func" >&5
5500 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5501 echo $ac_n "(cached) $ac_c" 1>&6
5502 else
5503 cat > conftest.$ac_ext <<EOF
5504 #line 5505 "configure"
5505 #include "confdefs.h"
5506 /* System header to define __stub macros and hopefully few prototypes,
5507 which can conflict with char $ac_func(); below. */
5508 #include <assert.h>
5509 /* Override any gcc2 internal prototype to avoid an error. */
5510 /* We use char because int might match the return type of a gcc2
5511 builtin and then its argument prototype would still apply. */
5512 char $ac_func();
5514 int main() {
5516 /* The GNU C library defines this for functions which it implements
5517 to always fail with ENOSYS. Some functions are actually named
5518 something starting with __ and the normal name is an alias. */
5519 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5520 choke me
5521 #else
5522 $ac_func();
5523 #endif
5525 ; return 0; }
5527 if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5528 rm -rf conftest*
5529 eval "ac_cv_func_$ac_func=yes"
5530 else
5531 echo "configure: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 rm -rf conftest*
5534 eval "ac_cv_func_$ac_func=no"
5536 rm -f conftest*
5539 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5540 echo "$ac_t""yes" 1>&6
5541 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5542 cat >> confdefs.h <<EOF
5543 #define $ac_tr_func 1
5546 else
5547 echo "$ac_t""no" 1>&6
5549 done
5554 # Check whether --enable-strip or --disable-strip was given.
5555 if test "${enable_strip+set}" = set; then
5556 enableval="$enable_strip"
5557 if test "$enableval" = "yes"; then
5558 ENABLE_STRIP=1
5563 case "${target_os}" in
5564 hpux*)
5565 if test -z "$GNU_CC"; then
5567 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5568 echo "configure:5569: checking for +Olit support" >&5
5569 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5570 echo $ac_n "(cached) $ac_c" 1>&6
5571 else
5572 ac_cv_hpux_usable_olit_option=no
5573 rm -f conftest*
5574 echo 'int main() { return 0; }' | cat > conftest.c
5575 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5576 if test $? -eq 0; then
5577 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5578 ac_cv_hpux_usable_olit_option=yes
5581 rm -f conftest*
5585 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5587 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5588 CFLAGS="$CFLAGS +Olit=all"
5589 CXXFLAGS="$CXXFLAGS +Olit=all"
5590 else
5591 CFLAGS="$CFLAGS +ESlit"
5592 CXXFLAGS="$CXXFLAGS +ESlit"
5596 esac
5600 case "$target_os" in
5601 darwin*)
5602 _HAVE_PTHREADS=1
5604 wince*)
5605 _HAVE_PTHREADS=
5609 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5610 echo "configure:5611: checking for pthread_create in -lpthreads" >&5
5611 echo "
5612 #include <pthread.h>
5613 void *foo(void *v) { return v; }
5614 int main() {
5615 pthread_t t;
5616 if (!pthread_create(&t, 0, &foo, 0)) {
5617 pthread_join(t, 0);
5619 return 0;
5620 }" > dummy.c ;
5621 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5622 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5623 _res=$? ;
5624 rm -f dummy.c dummy${ac_exeext} ;
5625 if test "$_res" = "0"; then
5626 echo "$ac_t""yes" 1>&6
5627 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5628 else
5629 echo "$ac_t""no" 1>&6
5631 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5632 echo "configure:5633: checking for pthread_create in -lpthread" >&5
5633 echo "
5634 #include <pthread.h>
5635 void *foo(void *v) { return v; }
5636 int main() {
5637 pthread_t t;
5638 if (!pthread_create(&t, 0, &foo, 0)) {
5639 pthread_join(t, 0);
5641 return 0;
5642 }" > dummy.c ;
5643 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5644 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5645 _res=$? ;
5646 rm -f dummy.c dummy${ac_exeext} ;
5647 if test "$_res" = "0"; then
5648 echo "$ac_t""yes" 1>&6
5649 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5650 else
5651 echo "$ac_t""no" 1>&6
5653 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5654 echo "configure:5655: checking for pthread_create in -lc_r" >&5
5655 echo "
5656 #include <pthread.h>
5657 void *foo(void *v) { return v; }
5658 int main() {
5659 pthread_t t;
5660 if (!pthread_create(&t, 0, &foo, 0)) {
5661 pthread_join(t, 0);
5663 return 0;
5664 }" > dummy.c ;
5665 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5666 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5667 _res=$? ;
5668 rm -f dummy.c dummy${ac_exeext} ;
5669 if test "$_res" = "0"; then
5670 echo "$ac_t""yes" 1>&6
5671 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5672 else
5673 echo "$ac_t""no" 1>&6
5675 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5676 echo "configure:5677: checking for pthread_create in -lc" >&5
5677 echo "
5678 #include <pthread.h>
5679 void *foo(void *v) { return v; }
5680 int main() {
5681 pthread_t t;
5682 if (!pthread_create(&t, 0, &foo, 0)) {
5683 pthread_join(t, 0);
5685 return 0;
5686 }" > dummy.c ;
5687 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5688 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5689 _res=$? ;
5690 rm -f dummy.c dummy${ac_exeext} ;
5691 if test "$_res" = "0"; then
5692 echo "$ac_t""yes" 1>&6
5693 _HAVE_PTHREADS=1
5695 else
5696 echo "$ac_t""no" 1>&6
5710 esac
5712 # Check whether --with-pthreads or --without-pthreads was given.
5713 if test "${with_pthreads+set}" = set; then
5714 withval="$with_pthreads"
5715 if test "$withval" = "yes"; then
5716 if test -n "$_HAVE_PTHREADS"; then
5717 USE_PTHREADS=1
5718 USE_USER_PTHREADS=
5719 USE_NSPR_THREADS=
5720 else
5721 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5723 else
5724 USE_PTHREADS=
5725 _PTHREAD_LDFLAGS=
5727 else
5728 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5729 USE_PTHREADS=1
5730 USE_USER_PTHREADS=
5731 USE_NSPR_THREADS=
5736 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5737 if test "${enable_user_pthreads+set}" = set; then
5738 enableval="$enable_user_pthreads"
5739 if test "$enableval" = "yes"; then
5740 if test -n "$_HAVE_PTHREADS"; then
5741 USE_PTHREADS=
5742 USE_USER_PTHREADS=1
5743 USE_NSPR_THREADS=
5744 else
5745 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5751 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5752 if test "${enable_nspr_threads+set}" = set; then
5753 enableval="$enable_nspr_threads"
5754 if test "$enableval" = "yes"; then
5755 USE_PTHREADS=
5756 USE_USER_PTHREADS=
5757 USE_NSPR_THREADS=1
5762 case "$target" in
5763 *-beos*)
5764 # Check whether --with-bthreads or --without-bthreads was given.
5765 if test "${with_bthreads+set}" = set; then
5766 withval="$with_bthreads"
5767 if test "$withval" = "yes"; then
5768 USE_BTHREADS=1
5769 USE_USER_PTHREADS=
5770 USE_PTHREADS=
5775 esac
5777 fi # SKIP_LIBRARY_CHECKS
5779 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5780 if test "${enable_ipv6+set}" = set; then
5781 enableval="$enable_ipv6"
5782 if test "$enableval" = "yes"; then
5783 USE_IPV6=1
5784 else
5785 USE_IPV6=
5791 # Check whether --enable-boehm or --disable-boehm was given.
5792 if test "${enable_boehm+set}" = set; then
5793 enableval="$enable_boehm"
5794 if test "$enableval" = "yes"; then
5795 cat >> confdefs.h <<\EOF
5796 #define GC_LEAK_DETECTOR 1
5799 GC_LEAK_DETECTOR=1
5804 if test -n "$USE_PTHREADS"; then
5805 rm -f conftest*
5806 ac_cv_have_dash_pthread=no
5807 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5808 echo "configure:5809: checking whether ${CC-cc} accepts -pthread" >&5
5809 echo 'int main() { return 0; }' | cat > conftest.c
5810 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5811 if test $? -eq 0; then
5812 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5813 ac_cv_have_dash_pthread=yes
5814 case "$target_os" in
5815 freebsd*)
5816 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5819 CFLAGS="$CFLAGS -pthread"
5820 CXXFLAGS="$CXXFLAGS -pthread"
5822 esac
5825 rm -f conftest*
5826 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5828 ac_cv_have_dash_pthreads=no
5829 if test "$ac_cv_have_dash_pthread" = "no"; then
5830 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5831 echo "configure:5832: checking whether ${CC-cc} accepts -pthreads" >&5
5832 echo 'int main() { return 0; }' | cat > conftest.c
5833 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5834 if test $? -eq 0; then
5835 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5836 ac_cv_have_dash_pthreads=yes
5837 CFLAGS="$CFLAGS -pthreads"
5838 CXXFLAGS="$CXXFLAGS -pthreads"
5841 rm -f conftest*
5842 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5845 case "$target" in
5846 *-solaris*)
5847 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5848 _PTHREAD_LDFLAGS=
5851 *-freebsd*)
5852 cat >> confdefs.h <<\EOF
5853 #define _REENTRANT 1
5856 cat >> confdefs.h <<\EOF
5857 #define _THREAD_SAFE 1
5860 if test "$ac_cv_have_dash_pthread" = "yes"; then
5861 _PTHREAD_LDFLAGS="-pthread"
5862 else
5863 _PTHREAD_LDFLAGS="-lc_r"
5866 *-netbsd*)
5867 if test "$ac_cv_have_dash_pthread" = "yes"; then
5868 _PTHREAD_LDFLAGS="-pthread"
5871 *-bsdi*)
5872 cat >> confdefs.h <<\EOF
5873 #define _THREAD_SAFE 1
5876 if test "$ac_cv_have_dash_pthread" = "yes"; then
5877 _PTHREAD_LDFLAGS=
5880 *-openbsd*)
5881 if test "$ac_cv_have_dash_pthread" = "yes"; then
5882 _PTHREAD_LDFLAGS=-pthread
5885 *-linux*|*-gnu*|*-k*bsd*-gnu)
5886 cat >> confdefs.h <<\EOF
5887 #define _REENTRANT 1
5891 esac
5893 else
5894 if test -n "$USE_USER_PTHREADS"; then
5895 USE_PTHREADS=
5896 USE_NSPR_THREADS=
5897 else
5898 _PTHREAD_LDFLAGS=
5902 case "$target" in
5903 *-aix*)
5904 if test -n "$USE_NSPR_THREADS"; then
5905 cat >> confdefs.h <<\EOF
5906 #define _PR_LOCAL_THREADS_ONLY 1
5910 case "$target_os" in
5911 aix4.1*)
5912 if test -z "$USE_PTHREADS"; then
5913 cat >> confdefs.h <<\EOF
5914 #define AIX_RENAME_SELECT 1
5919 aix4.2*)
5920 if test -z "$USE_NSPR_THREADS"; then
5921 cat >> confdefs.h <<\EOF
5922 #define HAVE_POINTER_LOCALTIME_R 1
5927 aix4.3*)
5928 if test -z "$USE_NSPR_THREADS"; then
5929 cat >> confdefs.h <<\EOF
5930 #define HAVE_POINTER_LOCALTIME_R 1
5934 if test -n "$USE_PTHREADS"; then
5935 cat >> confdefs.h <<\EOF
5936 #define _PR_HAVE_THREADSAFE_GETHOST 1
5942 if test -z "$USE_NSPR_THREADS"; then
5943 cat >> confdefs.h <<\EOF
5944 #define HAVE_POINTER_LOCALTIME_R 1
5948 if test -n "$USE_PTHREADS"; then
5949 cat >> confdefs.h <<\EOF
5950 #define _PR_HAVE_THREADSAFE_GETHOST 1
5955 esac
5957 *-bsdi*)
5958 if test -n "$USE_PTHREADS"; then
5959 cat >> confdefs.h <<\EOF
5960 #define _PR_NEED_PTHREAD_INIT 1
5965 *-freebsd*)
5966 if test -n "$USE_NSPR_THREADS"; then
5967 cat >> confdefs.h <<\EOF
5968 #define _PR_LOCAL_THREADS_ONLY 1
5973 *-hpux*)
5974 if test -n "$USE_NSPR_THREADS"; then
5975 cat >> confdefs.h <<\EOF
5976 #define _PR_LOCAL_THREADS_ONLY 1
5980 if test "$USE_PTHREADS"; then
5981 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
5982 cat >> confdefs.h <<\EOF
5983 #define _REENTRANT 1
5986 cat >> confdefs.h <<\EOF
5987 #define _PR_DCETHREADS 1
5990 else
5991 cat >> confdefs.h <<EOF
5992 #define _POSIX_C_SOURCE 199506L
5995 cat >> confdefs.h <<\EOF
5996 #define _PR_HAVE_THREADSAFE_GETHOST 1
6001 if test "$USE_USER_PTHREADS"; then
6002 cat >> confdefs.h <<EOF
6003 #define _POSIX_C_SOURCE 199506L
6008 *-irix*)
6009 if test "${target_os}" = "irix6.5"; then
6010 if test -n "$USE_PTHREADS"; then
6011 cat >> confdefs.h <<\EOF
6012 #define _PR_HAVE_GETHOST_R 1
6015 cat >> confdefs.h <<\EOF
6016 #define _PR_HAVE_GETHOST_R_POINTER 1
6022 *-linux*|*-gnu*|*-k*bsd*-gnu)
6023 if test -n "$USE_NSPR_THREADS"; then
6024 cat >> confdefs.h <<\EOF
6025 #define _PR_LOCAL_THREADS_ONLY 1
6030 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
6031 USE_PTHREADS=
6032 _PTHREAD_LDFLAGS=
6033 USE_USER_PTHREADS=
6035 *-netbsd*|*-openbsd*)
6036 if test -n "$USE_NSPR_THREADS"; then
6037 cat >> confdefs.h <<\EOF
6038 #define _PR_LOCAL_THREADS_ONLY 1
6043 *-osf*)
6044 if test -n "$USE_NSPR_THREADS"; then
6045 cat >> confdefs.h <<\EOF
6046 #define _PR_LOCAL_THREADS_ONLY 1
6050 if test -n "$USE_PTHREADS"; then
6051 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
6053 else
6054 cat >> confdefs.h <<\EOF
6055 #define _PR_HAVE_THREADSAFE_GETHOST 1
6061 *-solaris*)
6062 if test -n "$USE_NSPR_THREADS"; then
6063 cat >> confdefs.h <<\EOF
6064 #define _PR_LOCAL_THREADS_ONLY 1
6068 if test -n "$USE_PTHREADS"; then
6069 cat >> confdefs.h <<\EOF
6070 #define _REENTRANT 1
6073 cat >> confdefs.h <<\EOF
6074 #define HAVE_POINTER_LOCALTIME_R 1
6077 if test "$OS_TEST" = "i86pc"; then
6078 if test -n "$USE_64"; then
6079 PR_MD_ASFILES=os_SunOS_x86_64.s
6080 else
6081 PR_MD_ASFILES=os_SunOS_x86.s
6083 else
6084 if test -n "$USE_64"; then
6085 PR_MD_ASFILES=os_SunOS_sparcv9.s
6090 *-nto*)
6091 if test -n "$USE_PTHREADS"; then
6092 cat >> confdefs.h <<\EOF
6093 #define _PR_HAVE_GETHOST_R 1
6096 cat >> confdefs.h <<\EOF
6097 #define _PR_HAVE_GETHOST_R_POINTER 1
6102 esac
6104 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
6106 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
6107 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
6110 if test -n "$_SAVE_DEBUG_FLAGS"; then
6111 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
6114 if test -n "$MOZ_OPTIMIZE"; then
6115 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
6116 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
6119 if test -n "$MOZ_DEBUG_SYMBOLS"; then
6120 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
6121 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
6124 if test -n "$MOZ_OPTIMIZE"; then
6125 OBJDIR_TAG=_OPT
6126 else
6127 OBJDIR_TAG=_DBG
6130 if test -n "$USE_64"; then
6131 COMPILER_TAG=_64
6134 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
6136 case "$target_os" in
6137 cygwin*|msvc*|mks*)
6138 CC="\$(CYGWIN_WRAPPER) $CC"
6139 CXX="\$(CYGWIN_WRAPPER) $CXX"
6140 RC="\$(CYGWIN_WRAPPER) $RC"
6142 esac
6144 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
6145 if test "${enable_wrap_malloc+set}" = set; then
6146 enableval="$enable_wrap_malloc"
6147 if test "$enableval" = "yes"; then
6148 _WRAP_MALLOC=1
6153 if test -n "$_WRAP_MALLOC"; then
6154 if test "$GNU_CC"; then
6155 WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,calloc -Wl,--wrap -Wl,valloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,memalign -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wl,--wrap -Wl,strdup -Wl,--wrap -Wl,strndup -Wl,--wrap -Wl,posix_memalign"
6156 DSO_LDOPTS="$DSO_LDOPTS $WRAP_MALLOC_CFLAGS"
6157 else
6158 { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6162 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6163 if test "${with_wrap_malloc+set}" = set; then
6164 withval="$with_wrap_malloc"
6165 WRAP_MALLOC_LIB=$withval
6275 MAKEFILES="
6276 Makefile
6277 config/Makefile
6278 config/autoconf.mk
6279 config/nsprincl.mk
6280 config/nsprincl.sh
6281 config/nspr-config
6282 lib/Makefile
6283 lib/ds/Makefile
6284 lib/libc/Makefile
6285 lib/libc/include/Makefile
6286 lib/libc/src/Makefile
6287 lib/tests/Makefile
6288 pkg/Makefile
6289 pkg/linux/Makefile
6290 pkg/solaris/Makefile
6291 pkg/solaris/SUNWpr/Makefile
6292 pkg/solaris/SUNWprd/Makefile
6293 pr/Makefile
6294 pr/include/Makefile
6295 pr/include/md/Makefile
6296 pr/include/obsolete/Makefile
6297 pr/include/private/Makefile
6298 pr/src/Makefile
6299 pr/src/io/Makefile
6300 pr/src/linking/Makefile
6301 pr/src/malloc/Makefile
6302 pr/src/md/Makefile
6303 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6304 pr/src/memory/Makefile
6305 pr/src/misc/Makefile
6306 pr/src/threads/Makefile
6307 pr/tests/Makefile
6308 pr/tests/dll/Makefile
6312 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6313 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
6314 elif test -n "$USE_PTHREADS"; then
6315 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
6316 elif test -n "$USE_BTHREADS"; then
6317 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
6320 if test -n "$USE_CPLUS"; then
6321 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
6324 echo $MAKEFILES > unallmakefiles
6326 trap '' 1 2 15
6327 cat > confcache <<\EOF
6328 # This file is a shell script that caches the results of configure
6329 # tests run on this system so they can be shared between configure
6330 # scripts and configure runs. It is not useful on other systems.
6331 # If it contains results you don't want to keep, you may remove or edit it.
6333 # By default, configure uses ./config.cache as the cache file,
6334 # creating it if it does not exist already. You can give configure
6335 # the --cache-file=FILE option to use a different cache file; that is
6336 # what configure does when it calls configure scripts in
6337 # subdirectories, so they share the cache.
6338 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6339 # config.status only pays attention to the cache file if you give it the
6340 # --recheck option to rerun configure.
6343 # The following way of writing the cache mishandles newlines in values,
6344 # but we know of no workaround that is simple, portable, and efficient.
6345 # So, don't put newlines in cache variables' values.
6346 # Ultrix sh set writes to stderr and can't be redirected directly,
6347 # and sets the high bit in the cache file unless we assign to the vars.
6348 (set) 2>&1 |
6349 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6350 *ac_space=\ *)
6351 # `set' does not quote correctly, so add quotes (double-quote substitution
6352 # turns \\\\ into \\, and sed turns \\ into \).
6353 sed -n \
6354 -e "s/'/'\\\\''/g" \
6355 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6358 # `set' quotes correctly as required by POSIX, so do not add quotes.
6359 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6361 esac >> confcache
6362 if cmp -s $cache_file confcache; then
6364 else
6365 if test -w $cache_file; then
6366 echo "updating cache $cache_file"
6367 cat confcache > $cache_file
6368 else
6369 echo "not updating unwritable cache $cache_file"
6372 rm -f confcache
6374 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6376 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6377 # Let make expand exec_prefix.
6378 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6380 # Any assignment to VPATH causes Sun make to only execute
6381 # the first set of double-colon rules, so remove it if not needed.
6382 # If there is a colon in the path, we need to keep it.
6383 if test "x$srcdir" = x.; then
6384 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6387 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6389 # Transform confdefs.h into DEFS.
6390 # Protect against shell expansion while executing Makefile rules.
6391 # Protect against Makefile macro expansion.
6392 cat > conftest.defs <<\EOF
6393 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6394 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6395 s%\[%\\&%g
6396 s%\]%\\&%g
6397 s%\$%$$%g
6399 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
6400 rm -f conftest.defs
6403 # Without the "./", some shells look in PATH for config.status.
6404 : ${CONFIG_STATUS=./config.status}
6406 echo creating $CONFIG_STATUS
6407 rm -f $CONFIG_STATUS
6408 cat > $CONFIG_STATUS <<EOF
6409 #! /bin/sh
6410 # Generated automatically by configure.
6411 # Run this file to recreate the current configuration.
6412 # This directory was configured as follows,
6413 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6415 # $0 $ac_configure_args
6417 # Compiler output produced by configure, useful for debugging
6418 # configure, is in ./config.log if it exists.
6420 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6421 for ac_option
6423 case "\$ac_option" in
6424 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6425 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6426 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6427 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6428 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6429 exit 0 ;;
6430 -help | --help | --hel | --he | --h)
6431 echo "\$ac_cs_usage"; exit 0 ;;
6432 *) echo "\$ac_cs_usage"; exit 1 ;;
6433 esac
6434 done
6436 ac_given_srcdir=$srcdir
6438 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6440 cat >> $CONFIG_STATUS <<EOF
6442 # Protect against being on the right side of a sed subst in config.status.
6443 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6444 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6445 $ac_vpsub
6446 $extrasub
6447 s%@SHELL@%$SHELL%g
6448 s%@CFLAGS@%$CFLAGS%g
6449 s%@CPPFLAGS@%$CPPFLAGS%g
6450 s%@CXXFLAGS@%$CXXFLAGS%g
6451 s%@FFLAGS@%$FFLAGS%g
6452 s%@DEFS@%$DEFS%g
6453 s%@LDFLAGS@%$LDFLAGS%g
6454 s%@LIBS@%$LIBS%g
6455 s%@exec_prefix@%$exec_prefix%g
6456 s%@prefix@%$prefix%g
6457 s%@program_transform_name@%$program_transform_name%g
6458 s%@bindir@%$bindir%g
6459 s%@sbindir@%$sbindir%g
6460 s%@libexecdir@%$libexecdir%g
6461 s%@datadir@%$datadir%g
6462 s%@sysconfdir@%$sysconfdir%g
6463 s%@sharedstatedir@%$sharedstatedir%g
6464 s%@localstatedir@%$localstatedir%g
6465 s%@libdir@%$libdir%g
6466 s%@includedir@%$includedir%g
6467 s%@oldincludedir@%$oldincludedir%g
6468 s%@infodir@%$infodir%g
6469 s%@mandir@%$mandir%g
6470 s%@host@%$host%g
6471 s%@host_alias@%$host_alias%g
6472 s%@host_cpu@%$host_cpu%g
6473 s%@host_vendor@%$host_vendor%g
6474 s%@host_os@%$host_os%g
6475 s%@target@%$target%g
6476 s%@target_alias@%$target_alias%g
6477 s%@target_cpu@%$target_cpu%g
6478 s%@target_vendor@%$target_vendor%g
6479 s%@target_os@%$target_os%g
6480 s%@build@%$build%g
6481 s%@build_alias@%$build_alias%g
6482 s%@build_cpu@%$build_cpu%g
6483 s%@build_vendor@%$build_vendor%g
6484 s%@build_os@%$build_os%g
6485 s%@CC@%$CC%g
6486 s%@dist_prefix@%$dist_prefix%g
6487 s%@dist_bindir@%$dist_bindir%g
6488 s%@dist_includedir@%$dist_includedir%g
6489 s%@dist_libdir@%$dist_libdir%g
6490 s%@WHOAMI@%$WHOAMI%g
6491 s%@HOST_CC@%$HOST_CC%g
6492 s%@CXX@%$CXX%g
6493 s%@RANLIB@%$RANLIB%g
6494 s%@AR@%$AR%g
6495 s%@AS@%$AS%g
6496 s%@LD@%$LD%g
6497 s%@STRIP@%$STRIP%g
6498 s%@WINDRES@%$WINDRES%g
6499 s%@CPP@%$CPP%g
6500 s%@PERL@%$PERL%g
6501 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6502 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6503 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6504 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6505 s%@GNU_CC@%$GNU_CC%g
6506 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6507 s%@MSC_VER@%$MSC_VER%g
6508 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6509 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6510 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
6511 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
6512 s%@USE_CPLUS@%$USE_CPLUS%g
6513 s%@USE_IPV6@%$USE_IPV6%g
6514 s%@USE_N32@%$USE_N32%g
6515 s%@USE_64@%$USE_64%g
6516 s%@OBJECT_MODE@%$OBJECT_MODE%g
6517 s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
6518 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6519 s%@USE_PTHREADS@%$USE_PTHREADS%g
6520 s%@USE_BTHREADS@%$USE_BTHREADS%g
6521 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6522 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6523 s%@LIBNSPR@%$LIBNSPR%g
6524 s%@LIBPLC@%$LIBPLC%g
6525 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6526 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6527 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6528 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6529 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6530 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6531 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6532 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6533 s%@CPU_ARCH@%$CPU_ARCH%g
6534 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6535 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6536 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6537 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6538 s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
6539 s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
6540 s%@MKSHLIB@%$MKSHLIB%g
6541 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6542 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6543 s%@OS_TARGET@%$OS_TARGET%g
6544 s%@OS_ARCH@%$OS_ARCH%g
6545 s%@OS_RELEASE@%$OS_RELEASE%g
6546 s%@OS_TEST@%$OS_TEST%g
6547 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6548 s%@DEFINES@%$DEFINES%g
6549 s%@AR_FLAGS@%$AR_FLAGS%g
6550 s%@ASFLAGS@%$ASFLAGS%g
6551 s%@FILTER@%$FILTER%g
6552 s%@IMPLIB@%$IMPLIB%g
6553 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
6554 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
6555 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
6556 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
6557 s%@OS_LIBS@%$OS_LIBS%g
6558 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6559 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6560 s%@NOSUCHFILE@%$NOSUCHFILE%g
6561 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6562 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6563 s%@OBJDIR@%$OBJDIR%g
6564 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6565 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6566 s%@NSINSTALL@%$NSINSTALL%g
6567 s%@OPTIMIZER@%$OPTIMIZER%g
6568 s%@RC@%$RC%g
6569 s%@RCFLAGS@%$RCFLAGS%g
6570 s%@DLLFLAGS@%$DLLFLAGS%g
6571 s%@EXEFLAGS@%$EXEFLAGS%g
6572 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6573 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6574 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6575 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6576 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6577 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6578 s%@NEXT_ROOT@%$NEXT_ROOT%g
6579 s%@MT@%$MT%g
6581 CEOF
6584 cat >> $CONFIG_STATUS <<\EOF
6586 # Split the substitutions into bite-sized pieces for seds with
6587 # small command number limits, like on Digital OSF/1 and HP-UX.
6588 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6589 ac_file=1 # Number of current file.
6590 ac_beg=1 # First line for current file.
6591 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6592 ac_more_lines=:
6593 ac_sed_cmds=""
6594 while $ac_more_lines; do
6595 if test $ac_beg -gt 1; then
6596 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6597 else
6598 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6600 if test ! -s conftest.s$ac_file; then
6601 ac_more_lines=false
6602 rm -f conftest.s$ac_file
6603 else
6604 if test -z "$ac_sed_cmds"; then
6605 ac_sed_cmds="sed -f conftest.s$ac_file"
6606 else
6607 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6609 ac_file=`expr $ac_file + 1`
6610 ac_beg=$ac_end
6611 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6613 done
6614 if test -z "$ac_sed_cmds"; then
6615 ac_sed_cmds=cat
6619 cat >> $CONFIG_STATUS <<EOF
6621 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6623 cat >> $CONFIG_STATUS <<\EOF
6624 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6625 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6626 case "$ac_file" in
6627 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6628 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6629 *) ac_file_in="${ac_file}.in" ;;
6630 esac
6632 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6634 # Remove last slash and all that follows it. Not all systems have dirname.
6635 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6636 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6637 # The file is in a subdirectory.
6638 test ! -d "$ac_dir" && mkdir "$ac_dir"
6639 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6640 # A "../" for each directory in $ac_dir_suffix.
6641 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6642 else
6643 ac_dir_suffix= ac_dots=
6646 case "$ac_given_srcdir" in
6647 .) srcdir=.
6648 if test -z "$ac_dots"; then top_srcdir=.
6649 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6650 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6651 *) # Relative path.
6652 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6653 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6654 esac
6657 echo creating "$ac_file"
6658 rm -f "$ac_file"
6659 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6660 case "$ac_file" in
6661 *Makefile*) ac_comsub="1i\\
6662 # $configure_input" ;;
6663 *) ac_comsub= ;;
6664 esac
6666 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6667 sed -e "$ac_comsub
6668 s%@configure_input@%$configure_input%g
6669 s%@srcdir@%$srcdir%g
6670 s%@top_srcdir@%$top_srcdir%g
6671 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6672 fi; done
6673 rm -f conftest.s*
6676 cat >> $CONFIG_STATUS <<EOF
6679 cat >> $CONFIG_STATUS <<\EOF
6680 chmod +x config/nspr-config
6681 exit 0
6683 chmod +x $CONFIG_STATUS
6684 rm -fr confdefs* $ac_clean_files
6685 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1