Follow up fix for bug 623435. (r=brendan)
[mozilla-central.git] / nsprpub / configure
blob5ac69eb06ecb97897b45743bc5c20ee804b7ca4e
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 --with-ccache[=path/to/ccache]
76 Enable compiling with ccache"
77 ac_help="$ac_help
78 --enable-strip Enable stripping of shared libs and programs"
79 ac_help="$ac_help
80 --with-pthreads Use system pthreads library as thread subsystem"
81 ac_help="$ac_help
82 --enable-user-pthreads Build using userland pthreads"
83 ac_help="$ac_help
84 --enable-nspr-threads Build using classic nspr threads"
85 ac_help="$ac_help
86 --with-bthreads Use system bthreads library as thread subsystem
87 (BeOS only)"
88 ac_help="$ac_help
89 --enable-ipv6 Compile ipv6 support"
90 ac_help="$ac_help
91 --enable-wrap-malloc Wrap malloc calls (gnu linker only)"
92 ac_help="$ac_help
93 --with-wrap-malloc=SHAREDLIB Location of malloc wrapper library"
95 # Initialize some variables set by options.
96 # The variables have the same names as the options, with
97 # dashes changed to underlines.
98 build=NONE
99 cache_file=./config.cache
100 exec_prefix=NONE
101 host=NONE
102 no_create=
103 nonopt=NONE
104 no_recursion=
105 prefix=NONE
106 program_prefix=NONE
107 program_suffix=NONE
108 program_transform_name=s,x,x,
109 silent=
110 site=
111 srcdir=
112 target=NONE
113 verbose=
114 x_includes=NONE
115 x_libraries=NONE
116 bindir='${exec_prefix}/bin'
117 sbindir='${exec_prefix}/sbin'
118 libexecdir='${exec_prefix}/libexec'
119 datadir='${prefix}/share'
120 sysconfdir='${prefix}/etc'
121 sharedstatedir='${prefix}/com'
122 localstatedir='${prefix}/var'
123 libdir='${exec_prefix}/lib'
124 includedir='${prefix}/include'
125 oldincludedir='/usr/include'
126 infodir='${prefix}/info'
127 mandir='${prefix}/man'
129 # Initialize some other variables.
130 subdirs=
131 MFLAGS= MAKEFLAGS=
132 SHELL=${CONFIG_SHELL-/bin/sh}
133 # Maximum number of lines to put in a shell here document.
134 ac_max_here_lines=12
136 ac_prev=
137 for ac_option
140 # If the previous option needs an argument, assign it.
141 if test -n "$ac_prev"; then
142 eval "$ac_prev=\$ac_option"
143 ac_prev=
144 continue
147 case "$ac_option" in
148 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
149 *) ac_optarg= ;;
150 esac
152 # Accept the important Cygnus configure options, so we can diagnose typos.
154 case "$ac_option" in
156 -bindir | --bindir | --bindi | --bind | --bin | --bi)
157 ac_prev=bindir ;;
158 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
159 bindir="$ac_optarg" ;;
161 -build | --build | --buil | --bui | --bu)
162 ac_prev=build ;;
163 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
164 build="$ac_optarg" ;;
166 -cache-file | --cache-file | --cache-fil | --cache-fi \
167 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
168 ac_prev=cache_file ;;
169 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
170 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
171 cache_file="$ac_optarg" ;;
173 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
174 ac_prev=datadir ;;
175 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
176 | --da=*)
177 datadir="$ac_optarg" ;;
179 -disable-* | --disable-*)
180 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
181 # Reject names that are not valid shell variable names.
182 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
183 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
186 eval "enable_${ac_feature}=no" ;;
188 -enable-* | --enable-*)
189 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
190 # Reject names that are not valid shell variable names.
191 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
192 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
195 case "$ac_option" in
196 *=*) ;;
197 *) ac_optarg=yes ;;
198 esac
199 eval "enable_${ac_feature}='$ac_optarg'" ;;
201 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
202 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
203 | --exec | --exe | --ex)
204 ac_prev=exec_prefix ;;
205 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
206 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
207 | --exec=* | --exe=* | --ex=*)
208 exec_prefix="$ac_optarg" ;;
210 -gas | --gas | --ga | --g)
211 # Obsolete; use --with-gas.
212 with_gas=yes ;;
214 -help | --help | --hel | --he)
215 # Omit some internal or obsolete options to make the list less imposing.
216 # This message is too long to be a string in the A/UX 3.1 sh.
217 cat << EOF
218 Usage: configure [options] [host]
219 Options: [defaults in brackets after descriptions]
220 Configuration:
221 --cache-file=FILE cache test results in FILE
222 --help print this message
223 --no-create do not create output files
224 --quiet, --silent do not print \`checking...' messages
225 --version print the version of autoconf that created configure
226 Directory and file names:
227 --prefix=PREFIX install architecture-independent files in PREFIX
228 [$ac_default_prefix]
229 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
230 [same as prefix]
231 --bindir=DIR user executables in DIR [EPREFIX/bin]
232 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
233 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
234 --datadir=DIR read-only architecture-independent data in DIR
235 [PREFIX/share]
236 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
237 --sharedstatedir=DIR modifiable architecture-independent data in DIR
238 [PREFIX/com]
239 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
240 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
241 --includedir=DIR C header files in DIR [PREFIX/include]
242 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
243 --infodir=DIR info documentation in DIR [PREFIX/info]
244 --mandir=DIR man documentation in DIR [PREFIX/man]
245 --srcdir=DIR find the sources in DIR [configure dir or ..]
246 --program-prefix=PREFIX prepend PREFIX to installed program names
247 --program-suffix=SUFFIX append SUFFIX to installed program names
248 --program-transform-name=PROGRAM
249 run sed PROGRAM on installed program names
251 cat << EOF
252 Host type:
253 --build=BUILD configure for building on BUILD [BUILD=HOST]
254 --host=HOST configure for HOST [guessed]
255 --target=TARGET configure for TARGET [TARGET=HOST]
256 Features and packages:
257 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
258 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
259 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
260 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
261 --x-includes=DIR X include files are in DIR
262 --x-libraries=DIR X library files are in DIR
264 if test -n "$ac_help"; then
265 echo "--enable and --with options recognized:$ac_help"
267 exit 0 ;;
269 -host | --host | --hos | --ho)
270 ac_prev=host ;;
271 -host=* | --host=* | --hos=* | --ho=*)
272 host="$ac_optarg" ;;
274 -includedir | --includedir | --includedi | --included | --include \
275 | --includ | --inclu | --incl | --inc)
276 ac_prev=includedir ;;
277 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
278 | --includ=* | --inclu=* | --incl=* | --inc=*)
279 includedir="$ac_optarg" ;;
281 -infodir | --infodir | --infodi | --infod | --info | --inf)
282 ac_prev=infodir ;;
283 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
284 infodir="$ac_optarg" ;;
286 -libdir | --libdir | --libdi | --libd)
287 ac_prev=libdir ;;
288 -libdir=* | --libdir=* | --libdi=* | --libd=*)
289 libdir="$ac_optarg" ;;
291 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
292 | --libexe | --libex | --libe)
293 ac_prev=libexecdir ;;
294 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
295 | --libexe=* | --libex=* | --libe=*)
296 libexecdir="$ac_optarg" ;;
298 -localstatedir | --localstatedir | --localstatedi | --localstated \
299 | --localstate | --localstat | --localsta | --localst \
300 | --locals | --local | --loca | --loc | --lo)
301 ac_prev=localstatedir ;;
302 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
303 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
304 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
305 localstatedir="$ac_optarg" ;;
307 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
308 ac_prev=mandir ;;
309 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
310 mandir="$ac_optarg" ;;
312 -nfp | --nfp | --nf)
313 # Obsolete; use --without-fp.
314 with_fp=no ;;
316 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
317 | --no-cr | --no-c)
318 no_create=yes ;;
320 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
321 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
322 no_recursion=yes ;;
324 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
325 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
326 | --oldin | --oldi | --old | --ol | --o)
327 ac_prev=oldincludedir ;;
328 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
329 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
330 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
331 oldincludedir="$ac_optarg" ;;
333 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
334 ac_prev=prefix ;;
335 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
336 prefix="$ac_optarg" ;;
338 -program-prefix | --program-prefix | --program-prefi | --program-pref \
339 | --program-pre | --program-pr | --program-p)
340 ac_prev=program_prefix ;;
341 -program-prefix=* | --program-prefix=* | --program-prefi=* \
342 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
343 program_prefix="$ac_optarg" ;;
345 -program-suffix | --program-suffix | --program-suffi | --program-suff \
346 | --program-suf | --program-su | --program-s)
347 ac_prev=program_suffix ;;
348 -program-suffix=* | --program-suffix=* | --program-suffi=* \
349 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
350 program_suffix="$ac_optarg" ;;
352 -program-transform-name | --program-transform-name \
353 | --program-transform-nam | --program-transform-na \
354 | --program-transform-n | --program-transform- \
355 | --program-transform | --program-transfor \
356 | --program-transfo | --program-transf \
357 | --program-trans | --program-tran \
358 | --progr-tra | --program-tr | --program-t)
359 ac_prev=program_transform_name ;;
360 -program-transform-name=* | --program-transform-name=* \
361 | --program-transform-nam=* | --program-transform-na=* \
362 | --program-transform-n=* | --program-transform-=* \
363 | --program-transform=* | --program-transfor=* \
364 | --program-transfo=* | --program-transf=* \
365 | --program-trans=* | --program-tran=* \
366 | --progr-tra=* | --program-tr=* | --program-t=*)
367 program_transform_name="$ac_optarg" ;;
369 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
370 | -silent | --silent | --silen | --sile | --sil)
371 silent=yes ;;
373 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
374 ac_prev=sbindir ;;
375 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
376 | --sbi=* | --sb=*)
377 sbindir="$ac_optarg" ;;
379 -sharedstatedir | --sharedstatedir | --sharedstatedi \
380 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
381 | --sharedst | --shareds | --shared | --share | --shar \
382 | --sha | --sh)
383 ac_prev=sharedstatedir ;;
384 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
385 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
386 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
387 | --sha=* | --sh=*)
388 sharedstatedir="$ac_optarg" ;;
390 -site | --site | --sit)
391 ac_prev=site ;;
392 -site=* | --site=* | --sit=*)
393 site="$ac_optarg" ;;
395 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
396 ac_prev=srcdir ;;
397 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
398 srcdir="$ac_optarg" ;;
400 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
401 | --syscon | --sysco | --sysc | --sys | --sy)
402 ac_prev=sysconfdir ;;
403 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
404 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
405 sysconfdir="$ac_optarg" ;;
407 -target | --target | --targe | --targ | --tar | --ta | --t)
408 ac_prev=target ;;
409 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
410 target="$ac_optarg" ;;
412 -v | -verbose | --verbose | --verbos | --verbo | --verb)
413 verbose=yes ;;
415 -version | --version | --versio | --versi | --vers)
416 echo "configure generated by autoconf version 2.13"
417 exit 0 ;;
419 -with-* | --with-*)
420 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
421 # Reject names that are not valid shell variable names.
422 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
423 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425 ac_package=`echo $ac_package| sed 's/-/_/g'`
426 case "$ac_option" in
427 *=*) ;;
428 *) ac_optarg=yes ;;
429 esac
430 eval "with_${ac_package}='$ac_optarg'" ;;
432 -without-* | --without-*)
433 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
434 # Reject names that are not valid shell variable names.
435 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
436 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438 ac_package=`echo $ac_package| sed 's/-/_/g'`
439 eval "with_${ac_package}=no" ;;
441 --x)
442 # Obsolete; use --with-x.
443 with_x=yes ;;
445 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
446 | --x-incl | --x-inc | --x-in | --x-i)
447 ac_prev=x_includes ;;
448 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
449 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
450 x_includes="$ac_optarg" ;;
452 -x-libraries | --x-libraries | --x-librarie | --x-librari \
453 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
454 ac_prev=x_libraries ;;
455 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
456 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
457 x_libraries="$ac_optarg" ;;
459 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
463 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
464 echo "configure: warning: $ac_option: invalid host type" 1>&2
466 if test "x$nonopt" != xNONE; then
467 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
469 nonopt="$ac_option"
472 esac
473 done
475 if test -n "$ac_prev"; then
476 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
479 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
481 # File descriptor usage:
482 # 0 standard input
483 # 1 file creation
484 # 2 errors and warnings
485 # 3 some systems may open it to /dev/tty
486 # 4 used on the Kubota Titan
487 # 6 checking for... messages and results
488 # 5 compiler messages saved in config.log
489 if test "$silent" = yes; then
490 exec 6>/dev/null
491 else
492 exec 6>&1
494 exec 5>./config.log
496 echo "\
497 This file contains any messages produced by compilers while
498 running configure, to aid debugging if configure makes a mistake.
499 " 1>&5
501 # Strip out --no-create and --no-recursion so they do not pile up.
502 # Also quote any args containing shell metacharacters.
503 ac_configure_args=
504 for ac_arg
506 case "$ac_arg" in
507 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
508 | --no-cr | --no-c) ;;
509 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
510 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
511 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
512 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
513 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
514 esac
515 done
517 # NLS nuisances.
518 # Only set these to C if already set. These must not be set unconditionally
519 # because not all systems understand e.g. LANG=C (notably SCO).
520 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
521 # Non-C LC_CTYPE values break the ctype check.
522 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
523 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
524 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
525 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
527 # confdefs.h avoids OS command line length limits that DEFS can exceed.
528 rm -rf conftest* confdefs.h
529 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
530 echo > confdefs.h
532 # A filename unique to this package, relative to the directory that
533 # configure is in, which we can look for to find out if srcdir is correct.
534 ac_unique_file=config/libc_r.h
536 # Find the source files, if location was not specified.
537 if test -z "$srcdir"; then
538 ac_srcdir_defaulted=yes
539 # Try the directory containing this script, then its parent.
540 ac_prog=$0
541 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
542 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
543 srcdir=$ac_confdir
544 if test ! -r $srcdir/$ac_unique_file; then
545 srcdir=..
547 else
548 ac_srcdir_defaulted=no
550 if test ! -r $srcdir/$ac_unique_file; then
551 if test "$ac_srcdir_defaulted" = yes; then
552 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
553 else
554 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
557 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
559 # Prefer explicitly selected file to automatically selected ones.
560 if test -z "$CONFIG_SITE"; then
561 if test "x$prefix" != xNONE; then
562 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
563 else
564 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
567 for ac_site_file in $CONFIG_SITE; do
568 if test -r "$ac_site_file"; then
569 echo "loading site script $ac_site_file"
570 . "$ac_site_file"
572 done
574 if test -r "$cache_file"; then
575 echo "loading cache $cache_file"
576 . $cache_file
577 else
578 echo "creating cache $cache_file"
579 > $cache_file
582 ac_ext=c
583 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
584 ac_cpp='$CPP $CPPFLAGS'
585 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
586 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
587 cross_compiling=$ac_cv_prog_cc_cross
589 ac_exeext=
590 ac_objext=o
591 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
592 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
593 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
594 ac_n= ac_c='
595 ' ac_t=' '
596 else
597 ac_n=-n ac_c= ac_t=
599 else
600 ac_n= ac_c='\c' ac_t=
605 ac_aux_dir=
606 for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
607 if test -f $ac_dir/install-sh; then
608 ac_aux_dir=$ac_dir
609 ac_install_sh="$ac_aux_dir/install-sh -c"
610 break
611 elif test -f $ac_dir/install.sh; then
612 ac_aux_dir=$ac_dir
613 ac_install_sh="$ac_aux_dir/install.sh -c"
614 break
616 done
617 if test -z "$ac_aux_dir"; then
618 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
620 ac_config_guess=$ac_aux_dir/config.guess
621 ac_config_sub=$ac_aux_dir/config.sub
622 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
625 # Do some error checking and defaulting for the host and target type.
626 # The inputs are:
627 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
629 # The rules are:
630 # 1. You are not allowed to specify --host, --target, and nonopt at the
631 # same time.
632 # 2. Host defaults to nonopt.
633 # 3. If nonopt is not specified, then host defaults to the current host,
634 # as determined by config.guess.
635 # 4. Target and build default to nonopt.
636 # 5. If nonopt is not specified, then target and build default to host.
638 # The aliases save the names the user supplied, while $host etc.
639 # will get canonicalized.
640 case $host---$target---$nonopt in
641 NONE---*---* | *---NONE---* | *---*---NONE) ;;
642 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
643 esac
646 # Make sure we can run config.sub.
647 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
648 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
651 echo $ac_n "checking host system type""... $ac_c" 1>&6
652 echo "configure:653: checking host system type" >&5
654 host_alias=$host
655 case "$host_alias" in
656 NONE)
657 case $nonopt in
658 NONE)
659 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
660 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
661 fi ;;
662 *) host_alias=$nonopt ;;
663 esac ;;
664 esac
666 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
667 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
668 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
669 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
670 echo "$ac_t""$host" 1>&6
672 echo $ac_n "checking target system type""... $ac_c" 1>&6
673 echo "configure:674: checking target system type" >&5
675 target_alias=$target
676 case "$target_alias" in
677 NONE)
678 case $nonopt in
679 NONE) target_alias=$host_alias ;;
680 *) target_alias=$nonopt ;;
681 esac ;;
682 esac
684 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
685 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
686 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
687 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
688 echo "$ac_t""$target" 1>&6
690 echo $ac_n "checking build system type""... $ac_c" 1>&6
691 echo "configure:692: checking build system type" >&5
693 build_alias=$build
694 case "$build_alias" in
695 NONE)
696 case $nonopt in
697 NONE) build_alias=$host_alias ;;
698 *) build_alias=$nonopt ;;
699 esac ;;
700 esac
702 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
703 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
704 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
705 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
706 echo "$ac_t""$build" 1>&6
708 test "$host_alias" != "$target_alias" &&
709 test "$program_prefix$program_suffix$program_transform_name" = \
710 NONENONEs,x,x, &&
711 program_prefix=${target_alias}-
714 MOD_MAJOR_VERSION=4
715 MOD_MINOR_VERSION=8
716 MOD_PATCH_VERSION=7
717 NSPR_MODNAME=nspr20
718 _HAVE_PTHREADS=
719 USE_PTHREADS=
720 USE_USER_PTHREADS=
721 USE_NSPR_THREADS=
722 USE_N32=
723 USE_64=
724 USE_CPLUS=
725 USE_IPV6=
726 USE_MDUPDATE=
727 _MACOSX_DEPLOYMENT_TARGET=
728 _OPTIMIZE_FLAGS=-O
729 _DEBUG_FLAGS=-g
730 MOZ_DEBUG=1
731 MOZ_OPTIMIZE=
732 OBJDIR='$(OBJDIR_NAME)'
733 OBJDIR_NAME=.
734 OBJDIR_SUFFIX=OBJ
735 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
736 NOSUCHFILE=/no-such-file
737 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
738 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
739 CYGWIN_WRAPPER=
740 MACOS_SDK_DIR=
741 NEXT_ROOT=
743 MOZ_OS2_HIGH_MEMORY=1
744 MOZ_THUMB2=
745 PROFILE_GEN_CFLAGS=
746 PROFILE_GEN_LDFLAGS=
747 PROFILE_USE_CFLAGS=
748 PROFILE_USE_LDFLAGS=
750 RESOLVE_LINK_SYMBOLS=
752 CFLAGS="${CFLAGS=}"
753 CXXFLAGS="${CXXFLAGS=}"
754 LDFLAGS="${LDFLAGS=}"
755 DLLFLAGS="${DLLFLAGS=}"
756 HOST_CFLAGS="${HOST_CFLAGS=}"
757 HOST_LDFLAGS="${HOST_LDFLAGS=}"
759 case "$target" in
760 *-cygwin*|*-mingw*)
761 # Check to see if we are really running in a msvc environemnt
762 _WIN32_MSVC=
763 for ac_prog in cl
765 # Extract the first word of "$ac_prog", so it can be a program name with args.
766 set dummy $ac_prog; ac_word=$2
767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
768 echo "configure:769: checking for $ac_word" >&5
769 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
770 echo $ac_n "(cached) $ac_c" 1>&6
771 else
772 if test -n "$CC"; then
773 ac_cv_prog_CC="$CC" # Let the user override the test.
774 else
775 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
776 ac_dummy="$PATH"
777 for ac_dir in $ac_dummy; do
778 test -z "$ac_dir" && ac_dir=.
779 if test -f $ac_dir/$ac_word; then
780 ac_cv_prog_CC="$ac_prog"
781 break
783 done
784 IFS="$ac_save_ifs"
787 CC="$ac_cv_prog_CC"
788 if test -n "$CC"; then
789 echo "$ac_t""$CC" 1>&6
790 else
791 echo "$ac_t""no" 1>&6
794 test -n "$CC" && break
795 done
797 if test "$CC" = "cl"; then
798 echo 'main() { return 0; }' > dummy.c
799 ${CC} -o dummy dummy.c >/dev/null 2>&1
800 if test $? = 0; then
801 _WIN32_MSVC=1
802 CXX=$CC
803 else
804 echo "configure: warning: $(CC) test failed. Using normal feature tests" 1>&2
806 rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
809 *-msvc*)
810 _WIN32_MSVC=1
812 *-mks*)
813 _WIN32_MSVC=1
815 esac
817 if test -n "$_WIN32_MSVC"; then
818 SKIP_PATH_CHECKS=1
819 SKIP_COMPILER_CHECKS=1
820 SKIP_LIBRARY_CHECKS=1
824 # Check whether --with-android-ndk or --without-android-ndk was given.
825 if test "${with_android_ndk+set}" = set; then
826 withval="$with_android_ndk"
827 android_ndk=$withval
831 # Check whether --with-android-toolchain or --without-android-toolchain was given.
832 if test "${with_android_toolchain+set}" = set; then
833 withval="$with_android_toolchain"
834 android_toolchain=$withval
838 # Check whether --with-android-platform or --without-android-platform was given.
839 if test "${with_android_platform+set}" = set; then
840 withval="$with_android_platform"
841 android_platform=$withval
845 if test "$target" = "arm-android-eabi" ; then
846 if test -z "$android_ndk" ; then
847 { echo "configure: error: You must specify --with-android-ndk=/path/to/ndk when targeting Android." 1>&2; exit 1; }
850 if test -z "$android_toolchain" ; then
851 android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[:upper:]" "[:lower:]"`-x86/arm-eabi-4.4.0
854 if test -z "$android_platform" ; then
855 android_platform="$android_ndk"/build/platforms/android-5/arch-arm
858 AS="$android_toolchain"/bin/arm-eabi-as
859 CC="$android_toolchain"/bin/arm-eabi-gcc
860 CXX="$android_toolchain"/bin/arm-eabi-g++
861 CPP="$android_toolchain"/bin/arm-eabi-cpp
862 LD="$android_toolchain"/bin/arm-eabi-ld
863 AR="$android_toolchain"/bin/arm-eabi-ar
864 RANLIB="$android_toolchain"/bin/arm-eabi-ranlib
865 STRIP="$android_toolchain"/bin/arm-eabi-strip
867 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
868 CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CFLAGS"
869 CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
870 LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
872 if test -z "$HOST_CPPFLAGS" ; then
873 HOST_CPPFLAGS=" "
875 if test -z "$HOST_CFLAGS" ; then
876 HOST_CFLAGS=" "
878 if test -z "$HOST_CXXFLAGS" ; then
879 HOST_CXXFLAGS=" "
881 if test -z "$HOST_LDFLAGS" ; then
882 HOST_LDFLAGS=" "
885 WRAP_MALLOC_CFLAGS="-Wl,--wrap=dlopen -Wl,--wrap=dlclose -Wl,--wrap=dlerror -Wl,--wrap=dlsym -Wl,--wrap=dladdr"
887 cat >> confdefs.h <<\EOF
888 #define ANDROID 1
893 dist_prefix='${MOD_DEPTH}/dist'
894 dist_bindir='${dist_prefix}/bin'
895 dist_includedir='${dist_prefix}/include/nspr'
896 dist_libdir='${dist_prefix}/lib'
897 if test "${includedir}" = '${prefix}/include'; then
898 includedir='${prefix}/include/nspr'
901 # Check whether --with-dist-prefix or --without-dist-prefix was given.
902 if test "${with_dist_prefix+set}" = set; then
903 withval="$with_dist_prefix"
904 dist_prefix=$withval
908 # Check whether --with-dist-bindir or --without-dist-bindir was given.
909 if test "${with_dist_bindir+set}" = set; then
910 withval="$with_dist_bindir"
911 dist_bindir=$withval
915 # Check whether --with-dist-includedir or --without-dist-includedir was given.
916 if test "${with_dist_includedir+set}" = set; then
917 withval="$with_dist_includedir"
918 dist_includedir=$withval
922 # Check whether --with-dist-libdir or --without-dist-libdir was given.
923 if test "${with_dist_libdir+set}" = set; then
924 withval="$with_dist_libdir"
925 dist_libdir=$withval
934 # Check whether --with-mozilla or --without-mozilla was given.
935 if test "${with_mozilla+set}" = set; then
936 withval="$with_mozilla"
937 if test "$withval" = "yes"; then
938 cat >> confdefs.h <<\EOF
939 #define MOZILLA_CLIENT 1
942 MOZILLA_CLIENT=1
943 else
944 MOZILLA_CLIENT=
946 else
947 if test -n "$MOZILLA_CLIENT"; then
948 cat >> confdefs.h <<\EOF
949 #define MOZILLA_CLIENT 1
956 # Check whether --enable-optimize or --disable-optimize was given.
957 if test "${enable_optimize+set}" = set; then
958 enableval="$enable_optimize"
959 if test "$enableval" != "no"; then
960 MOZ_OPTIMIZE=1
961 if test -n "$enableval" -a "$enableval" != "yes"; then
962 _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
963 _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
965 else
966 MOZ_OPTIMIZE=
971 # Check whether --enable-debug or --disable-debug was given.
972 if test "${enable_debug+set}" = set; then
973 enableval="$enable_debug"
974 if test "$enableval" != "no"; then
975 MOZ_DEBUG=1
976 MOZ_DEBUG_SYMBOLS=1
977 if test -n "$enableval" -a "$enableval" != "yes"; then
978 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
979 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
981 else
982 MOZ_DEBUG=
984 else
985 MOZ_DEBUG_SYMBOLS=1
989 # Check whether --enable-debug-symbols or --disable-debug-symbols was given.
990 if test "${enable_debug_symbols+set}" = set; then
991 enableval="$enable_debug_symbols"
992 if test "$enableval" != "no"; then
993 MOZ_DEBUG_SYMBOLS=1
994 if test -n "$enableval" -a "$enableval" != "yes"; then
995 if test -z "$_SAVE_DEBUG_FLAGS"; then
996 _DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
997 _SAVE_DEBUG_FLAGS=$_DEBUG_FLAGS
998 else
999 { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; exit 1; }
1002 else
1003 MOZ_DEBUG_SYMBOLS=
1008 # Check whether --enable-win32-target or --disable-win32-target was given.
1009 if test "${enable_win32_target+set}" = set; then
1010 enableval="$enable_win32_target"
1011 OS_TARGET=`echo $enableval | tr a-z A-Z`
1015 # Check whether --enable-symbian-target or --disable-symbian-target was given.
1016 if test "${enable_symbian_target+set}" = set; then
1017 enableval="$enable_symbian_target"
1018 OS_TARGET=`echo $enableval | tr a-z A-Z`
1022 # Check whether --enable-debug-rtl or --disable-debug-rtl was given.
1023 if test "${enable_debug_rtl+set}" = set; then
1024 enableval="$enable_debug_rtl"
1025 if test "$enableval" = "yes"; then
1026 USE_DEBUG_RTL=1
1031 # Check whether --enable-n32 or --disable-n32 was given.
1032 if test "${enable_n32+set}" = set; then
1033 enableval="$enable_n32"
1034 if test "$enableval" = "yes"; then
1035 USE_N32=1
1036 else if test "$enableval" = "no"; then
1037 USE_N32=
1043 # Check whether --enable-64bit or --disable-64bit was given.
1044 if test "${enable_64bit+set}" = set; then
1045 enableval="$enable_64bit"
1046 if test "$enableval" = "yes"; then
1047 USE_64=1
1052 # Check whether --enable-mdupdate or --disable-mdupdate was given.
1053 if test "${enable_mdupdate+set}" = set; then
1054 enableval="$enable_mdupdate"
1055 if test "$enableval" = "yes"; then
1056 USE_MDUPDATE=1
1061 # Check whether --enable-cplus or --disable-cplus was given.
1062 if test "${enable_cplus+set}" = set; then
1063 enableval="$enable_cplus"
1064 if test "$enableval" = "yes"; then
1065 USE_CPLUS=1
1070 # Check whether --with-arm-kuser or --without-arm-kuser was given.
1071 if test "${with_arm_kuser+set}" = set; then
1072 withval="$with_arm_kuser"
1073 if test "$withval" = "yes"; then
1074 cat >> confdefs.h <<\EOF
1075 #define _PR_ARM_KUSER 1
1082 # Check whether --with-macos-sdk or --without-macos-sdk was given.
1083 if test "${with_macos_sdk+set}" = set; then
1084 withval="$with_macos_sdk"
1085 MACOS_SDK_DIR=$withval
1089 # Check whether --enable-macos-target or --disable-macos-target was given.
1090 if test "${enable_macos_target+set}" = set; then
1091 enableval="$enable_macos_target"
1092 _MACOSX_DEPLOYMENT_TARGET=$enableval
1096 case "$target" in
1098 *-aix*)
1099 case "${target_os}" in
1100 aix3.2*)
1101 USE_NSPR_THREADS=1
1104 USE_PTHREADS=1
1106 esac
1109 esac
1111 if test -z "$CC"; then
1112 case "$target" in
1114 *-aix*)
1115 if test -z "$USE_NSPR_THREADS"; then
1116 CC=xlc_r
1117 else
1118 CC=xlc
1122 *-hpux*)
1123 CC=cc
1126 *-irix*)
1127 CC=cc
1130 *-osf*)
1131 CC=cc
1134 *-solaris*)
1135 CC=cc
1138 esac
1141 if test -z "$CXX"; then
1142 case "$target" in
1144 *-aix*)
1145 if test -z "$USE_NSPR_THREADS"; then
1146 CXX=xlC_r
1147 else
1148 CXX=xlC
1152 *-hpux*)
1153 case "${target_os}" in
1154 hpux10.30)
1155 CXX=aCC
1157 hpux11.*)
1158 CXX=aCC
1161 CXX=CC
1163 esac
1166 *-irix*)
1167 CXX=CC
1170 *-osf*)
1171 CXX=cxx
1174 *-solaris*)
1175 CXX=CC
1178 esac
1181 if test -z "$SKIP_PATH_CHECKS"; then
1182 # Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
1183 set dummy $WHOAMI whoami; ac_word=$2
1184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1185 echo "configure:1186: checking for $ac_word" >&5
1186 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
1187 echo $ac_n "(cached) $ac_c" 1>&6
1188 else
1189 case "$WHOAMI" in
1191 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
1193 ?:/*)
1194 ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
1197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200 test -z "$ac_dir" && ac_dir=.
1201 if test -f $ac_dir/$ac_word; then
1202 ac_cv_path_WHOAMI="$ac_dir/$ac_word"
1203 break
1205 done
1206 IFS="$ac_save_ifs"
1207 test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo not_whoami"
1209 esac
1211 WHOAMI="$ac_cv_path_WHOAMI"
1212 if test -n "$WHOAMI"; then
1213 echo "$ac_t""$WHOAMI" 1>&6
1214 else
1215 echo "$ac_t""no" 1>&6
1220 if test -n "$MOZ_DEBUG"; then
1221 cat >> confdefs.h <<\EOF
1222 #define DEBUG 1
1225 DEFINES="$DEFINES -UNDEBUG"
1227 case "${target_os}" in
1228 beos*)
1229 DEFINES="$DEFINES -DDEBUG_${USER}"
1231 msvc*|mks*|cygwin*|mingw*|wince*|winmo*|os2*)
1232 DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
1235 DEFINES="$DEFINES -DDEBUG_`$WHOAMI`"
1237 esac
1238 else
1239 cat >> confdefs.h <<\EOF
1240 #define NDEBUG 1
1243 DEFINES="$DEFINES -UDEBUG"
1246 if test -z "$SKIP_COMPILER_CHECKS"; then
1247 if test "$target" != "$host"; then
1248 echo "cross compiling from $host to $target"
1249 cross_compiling=yes
1251 _SAVE_CC="$CC"
1252 _SAVE_CFLAGS="$CFLAGS"
1253 _SAVE_LDFLAGS="$LDFLAGS"
1255 echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
1256 echo "configure:1257: checking for $host compiler" >&5
1257 for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
1259 # Extract the first word of "$ac_prog", so it can be a program name with args.
1260 set dummy $ac_prog; ac_word=$2
1261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1262 echo "configure:1263: checking for $ac_word" >&5
1263 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
1264 echo $ac_n "(cached) $ac_c" 1>&6
1265 else
1266 if test -n "$HOST_CC"; then
1267 ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
1268 else
1269 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1270 ac_dummy="$PATH"
1271 for ac_dir in $ac_dummy; do
1272 test -z "$ac_dir" && ac_dir=.
1273 if test -f $ac_dir/$ac_word; then
1274 ac_cv_prog_HOST_CC="$ac_prog"
1275 break
1277 done
1278 IFS="$ac_save_ifs"
1281 HOST_CC="$ac_cv_prog_HOST_CC"
1282 if test -n "$HOST_CC"; then
1283 echo "$ac_t""$HOST_CC" 1>&6
1284 else
1285 echo "$ac_t""no" 1>&6
1288 test -n "$HOST_CC" && break
1289 done
1290 test -n "$HOST_CC" || HOST_CC=""""
1292 if test -z "$HOST_CC"; then
1293 { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1295 echo "$ac_t""$HOST_CC" 1>&6
1296 if test -z "$HOST_CFLAGS"; then
1297 HOST_CFLAGS="$CFLAGS"
1299 if test -z "$HOST_LDFLAGS"; then
1300 HOST_LDFLAGS="$LDFLAGS"
1303 CC="$HOST_CC"
1304 CFLAGS="$HOST_CFLAGS"
1305 LDFLAGS="$HOST_LDFLAGS"
1307 echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
1308 echo "configure:1309: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
1309 cat > conftest.$ac_ext <<EOF
1310 #line 1311 "configure"
1311 #include "confdefs.h"
1313 int main() {
1314 return(0);
1315 ; return 0; }
1317 if { (eval echo configure:1318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1318 rm -rf conftest*
1319 ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
1320 else
1321 echo "configure: failed program was:" >&5
1322 cat conftest.$ac_ext >&5
1323 rm -rf conftest*
1324 { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; }
1326 rm -f conftest*
1328 CC=$_SAVE_CC
1329 CFLAGS=$_SAVE_CFLAGS
1330 LDFLAGS=$_SAVE_LDFLAGS
1332 case "$build:$target" in
1333 powerpc-apple-darwin8*:i?86-apple-darwin*)
1334 _SAVE_CFLAGS=$CFLAGS
1335 _SAVE_CXXFLAGS=$CXXLAGS
1336 CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
1337 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
1339 esac
1341 for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
1343 # Extract the first word of "$ac_prog", so it can be a program name with args.
1344 set dummy $ac_prog; ac_word=$2
1345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1346 echo "configure:1347: checking for $ac_word" >&5
1347 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1348 echo $ac_n "(cached) $ac_c" 1>&6
1349 else
1350 if test -n "$CC"; then
1351 ac_cv_prog_CC="$CC" # Let the user override the test.
1352 else
1353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1354 ac_dummy="$PATH"
1355 for ac_dir in $ac_dummy; do
1356 test -z "$ac_dir" && ac_dir=.
1357 if test -f $ac_dir/$ac_word; then
1358 ac_cv_prog_CC="$ac_prog"
1359 break
1361 done
1362 IFS="$ac_save_ifs"
1365 CC="$ac_cv_prog_CC"
1366 if test -n "$CC"; then
1367 echo "$ac_t""$CC" 1>&6
1368 else
1369 echo "$ac_t""no" 1>&6
1372 test -n "$CC" && break
1373 done
1374 test -n "$CC" || CC="echo"
1376 unset ac_cv_prog_CC
1377 # Extract the first word of "gcc", so it can be a program name with args.
1378 set dummy gcc; ac_word=$2
1379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1380 echo "configure:1381: checking for $ac_word" >&5
1381 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1382 echo $ac_n "(cached) $ac_c" 1>&6
1383 else
1384 if test -n "$CC"; then
1385 ac_cv_prog_CC="$CC" # Let the user override the test.
1386 else
1387 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1388 ac_dummy="$PATH"
1389 for ac_dir in $ac_dummy; do
1390 test -z "$ac_dir" && ac_dir=.
1391 if test -f $ac_dir/$ac_word; then
1392 ac_cv_prog_CC="gcc"
1393 break
1395 done
1396 IFS="$ac_save_ifs"
1399 CC="$ac_cv_prog_CC"
1400 if test -n "$CC"; then
1401 echo "$ac_t""$CC" 1>&6
1402 else
1403 echo "$ac_t""no" 1>&6
1406 if test -z "$CC"; then
1407 # Extract the first word of "cc", so it can be a program name with args.
1408 set dummy cc; ac_word=$2
1409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1410 echo "configure:1411: checking for $ac_word" >&5
1411 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1412 echo $ac_n "(cached) $ac_c" 1>&6
1413 else
1414 if test -n "$CC"; then
1415 ac_cv_prog_CC="$CC" # Let the user override the test.
1416 else
1417 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1418 ac_prog_rejected=no
1419 ac_dummy="$PATH"
1420 for ac_dir in $ac_dummy; do
1421 test -z "$ac_dir" && ac_dir=.
1422 if test -f $ac_dir/$ac_word; then
1423 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1424 ac_prog_rejected=yes
1425 continue
1427 ac_cv_prog_CC="cc"
1428 break
1430 done
1431 IFS="$ac_save_ifs"
1432 if test $ac_prog_rejected = yes; then
1433 # We found a bogon in the path, so make sure we never use it.
1434 set dummy $ac_cv_prog_CC
1435 shift
1436 if test $# -gt 0; then
1437 # We chose a different compiler from the bogus one.
1438 # However, it has the same basename, so the bogon will be chosen
1439 # first if we set CC to just the basename; use the full file name.
1440 shift
1441 set dummy "$ac_dir/$ac_word" "$@"
1442 shift
1443 ac_cv_prog_CC="$@"
1448 CC="$ac_cv_prog_CC"
1449 if test -n "$CC"; then
1450 echo "$ac_t""$CC" 1>&6
1451 else
1452 echo "$ac_t""no" 1>&6
1455 if test -z "$CC"; then
1456 case "`uname -s`" in
1457 *win32* | *WIN32*)
1458 # Extract the first word of "cl", so it can be a program name with args.
1459 set dummy cl; ac_word=$2
1460 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1461 echo "configure:1462: checking for $ac_word" >&5
1462 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464 else
1465 if test -n "$CC"; then
1466 ac_cv_prog_CC="$CC" # Let the user override the test.
1467 else
1468 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1469 ac_dummy="$PATH"
1470 for ac_dir in $ac_dummy; do
1471 test -z "$ac_dir" && ac_dir=.
1472 if test -f $ac_dir/$ac_word; then
1473 ac_cv_prog_CC="cl"
1474 break
1476 done
1477 IFS="$ac_save_ifs"
1480 CC="$ac_cv_prog_CC"
1481 if test -n "$CC"; then
1482 echo "$ac_t""$CC" 1>&6
1483 else
1484 echo "$ac_t""no" 1>&6
1487 esac
1489 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1492 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1493 echo "configure:1494: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1495 ac_ext=c
1496 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1497 ac_cpp='$CPP $CPPFLAGS'
1498 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1499 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1500 cross_compiling=$ac_cv_prog_cc_cross
1502 cat > conftest.$ac_ext << EOF
1504 #line 1505 "configure"
1505 #include "confdefs.h"
1507 main(){return(0);}
1509 if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1510 ac_cv_prog_cc_works=yes
1511 # If we can't run a trivial program, we are probably using a cross compiler.
1512 if (./conftest; exit) 2>/dev/null; then
1513 ac_cv_prog_cc_cross=no
1514 else
1515 ac_cv_prog_cc_cross=yes
1517 else
1518 echo "configure: failed program was:" >&5
1519 cat conftest.$ac_ext >&5
1520 ac_cv_prog_cc_works=no
1522 rm -fr conftest*
1523 ac_ext=c
1524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1525 ac_cpp='$CPP $CPPFLAGS'
1526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1528 cross_compiling=$ac_cv_prog_cc_cross
1530 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1531 if test $ac_cv_prog_cc_works = no; then
1532 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1534 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1535 echo "configure:1536: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1536 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1537 cross_compiling=$ac_cv_prog_cc_cross
1539 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1540 echo "configure:1541: checking whether we are using GNU C" >&5
1541 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1542 echo $ac_n "(cached) $ac_c" 1>&6
1543 else
1544 cat > conftest.c <<EOF
1545 #ifdef __GNUC__
1546 yes;
1547 #endif
1549 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1550 ac_cv_prog_gcc=yes
1551 else
1552 ac_cv_prog_gcc=no
1556 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1558 if test $ac_cv_prog_gcc = yes; then
1559 GCC=yes
1560 else
1561 GCC=
1564 ac_test_CFLAGS="${CFLAGS+set}"
1565 ac_save_CFLAGS="$CFLAGS"
1566 CFLAGS=
1567 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1568 echo "configure:1569: checking whether ${CC-cc} accepts -g" >&5
1569 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1570 echo $ac_n "(cached) $ac_c" 1>&6
1571 else
1572 echo 'void f(){}' > conftest.c
1573 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1574 ac_cv_prog_cc_g=yes
1575 else
1576 ac_cv_prog_cc_g=no
1578 rm -f conftest*
1582 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1583 if test "$ac_test_CFLAGS" = set; then
1584 CFLAGS="$ac_save_CFLAGS"
1585 elif test $ac_cv_prog_cc_g = yes; then
1586 if test "$GCC" = yes; then
1587 CFLAGS="-g -O2"
1588 else
1589 CFLAGS="-g"
1591 else
1592 if test "$GCC" = yes; then
1593 CFLAGS="-O2"
1594 else
1595 CFLAGS=
1599 if test -n "$USE_CPLUS"; then
1600 for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
1602 # Extract the first word of "$ac_prog", so it can be a program name with args.
1603 set dummy $ac_prog; ac_word=$2
1604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1605 echo "configure:1606: checking for $ac_word" >&5
1606 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1607 echo $ac_n "(cached) $ac_c" 1>&6
1608 else
1609 if test -n "$CXX"; then
1610 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1611 else
1612 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1613 ac_dummy="$PATH"
1614 for ac_dir in $ac_dummy; do
1615 test -z "$ac_dir" && ac_dir=.
1616 if test -f $ac_dir/$ac_word; then
1617 ac_cv_prog_CXX="$ac_prog"
1618 break
1620 done
1621 IFS="$ac_save_ifs"
1624 CXX="$ac_cv_prog_CXX"
1625 if test -n "$CXX"; then
1626 echo "$ac_t""$CXX" 1>&6
1627 else
1628 echo "$ac_t""no" 1>&6
1631 test -n "$CXX" && break
1632 done
1633 test -n "$CXX" || CXX="echo"
1635 unset ac_cv_prog_CXX
1636 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1638 # Extract the first word of "$ac_prog", so it can be a program name with args.
1639 set dummy $ac_prog; ac_word=$2
1640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1641 echo "configure:1642: checking for $ac_word" >&5
1642 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1643 echo $ac_n "(cached) $ac_c" 1>&6
1644 else
1645 if test -n "$CXX"; then
1646 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1647 else
1648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651 test -z "$ac_dir" && ac_dir=.
1652 if test -f $ac_dir/$ac_word; then
1653 ac_cv_prog_CXX="$ac_prog"
1654 break
1656 done
1657 IFS="$ac_save_ifs"
1660 CXX="$ac_cv_prog_CXX"
1661 if test -n "$CXX"; then
1662 echo "$ac_t""$CXX" 1>&6
1663 else
1664 echo "$ac_t""no" 1>&6
1667 test -n "$CXX" && break
1668 done
1669 test -n "$CXX" || CXX="gcc"
1672 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1673 echo "configure:1674: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1675 ac_ext=C
1676 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1677 ac_cpp='$CXXCPP $CPPFLAGS'
1678 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1679 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1680 cross_compiling=$ac_cv_prog_cxx_cross
1682 cat > conftest.$ac_ext << EOF
1684 #line 1685 "configure"
1685 #include "confdefs.h"
1687 int main(){return(0);}
1689 if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1690 ac_cv_prog_cxx_works=yes
1691 # If we can't run a trivial program, we are probably using a cross compiler.
1692 if (./conftest; exit) 2>/dev/null; then
1693 ac_cv_prog_cxx_cross=no
1694 else
1695 ac_cv_prog_cxx_cross=yes
1697 else
1698 echo "configure: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1700 ac_cv_prog_cxx_works=no
1702 rm -fr conftest*
1703 ac_ext=c
1704 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1705 ac_cpp='$CPP $CPPFLAGS'
1706 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1707 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1708 cross_compiling=$ac_cv_prog_cc_cross
1710 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1711 if test $ac_cv_prog_cxx_works = no; then
1712 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1714 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1715 echo "configure:1716: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1716 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1717 cross_compiling=$ac_cv_prog_cxx_cross
1719 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1720 echo "configure:1721: checking whether we are using GNU C++" >&5
1721 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1722 echo $ac_n "(cached) $ac_c" 1>&6
1723 else
1724 cat > conftest.C <<EOF
1725 #ifdef __GNUC__
1726 yes;
1727 #endif
1729 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1730 ac_cv_prog_gxx=yes
1731 else
1732 ac_cv_prog_gxx=no
1736 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1738 if test $ac_cv_prog_gxx = yes; then
1739 GXX=yes
1740 else
1741 GXX=
1744 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1745 ac_save_CXXFLAGS="$CXXFLAGS"
1746 CXXFLAGS=
1747 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1748 echo "configure:1749: checking whether ${CXX-g++} accepts -g" >&5
1749 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1750 echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752 echo 'void f(){}' > conftest.cc
1753 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1754 ac_cv_prog_cxx_g=yes
1755 else
1756 ac_cv_prog_cxx_g=no
1758 rm -f conftest*
1762 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1763 if test "$ac_test_CXXFLAGS" = set; then
1764 CXXFLAGS="$ac_save_CXXFLAGS"
1765 elif test $ac_cv_prog_cxx_g = yes; then
1766 if test "$GXX" = yes; then
1767 CXXFLAGS="-g -O2"
1768 else
1769 CXXFLAGS="-g"
1771 else
1772 if test "$GXX" = yes; then
1773 CXXFLAGS="-O2"
1774 else
1775 CXXFLAGS=
1781 case "$build:$target" in
1782 powerpc-apple-darwin8*:i?86-apple-darwin*)
1783 CFLAGS=$_SAVE_CFLAGS
1784 CXXFLAGS=$_SAVE_CXXFLAGS
1786 esac
1788 for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
1790 # Extract the first word of "$ac_prog", so it can be a program name with args.
1791 set dummy $ac_prog; ac_word=$2
1792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1793 echo "configure:1794: checking for $ac_word" >&5
1794 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1795 echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797 if test -n "$RANLIB"; then
1798 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1799 else
1800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1801 ac_dummy="$PATH"
1802 for ac_dir in $ac_dummy; do
1803 test -z "$ac_dir" && ac_dir=.
1804 if test -f $ac_dir/$ac_word; then
1805 ac_cv_prog_RANLIB="$ac_prog"
1806 break
1808 done
1809 IFS="$ac_save_ifs"
1812 RANLIB="$ac_cv_prog_RANLIB"
1813 if test -n "$RANLIB"; then
1814 echo "$ac_t""$RANLIB" 1>&6
1815 else
1816 echo "$ac_t""no" 1>&6
1819 test -n "$RANLIB" && break
1820 done
1821 test -n "$RANLIB" || RANLIB="echo"
1823 for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
1825 # Extract the first word of "$ac_prog", so it can be a program name with args.
1826 set dummy $ac_prog; ac_word=$2
1827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1828 echo "configure:1829: checking for $ac_word" >&5
1829 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1830 echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832 if test -n "$AR"; then
1833 ac_cv_prog_AR="$AR" # Let the user override the test.
1834 else
1835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1836 ac_dummy="$PATH"
1837 for ac_dir in $ac_dummy; do
1838 test -z "$ac_dir" && ac_dir=.
1839 if test -f $ac_dir/$ac_word; then
1840 ac_cv_prog_AR="$ac_prog"
1841 break
1843 done
1844 IFS="$ac_save_ifs"
1847 AR="$ac_cv_prog_AR"
1848 if test -n "$AR"; then
1849 echo "$ac_t""$AR" 1>&6
1850 else
1851 echo "$ac_t""no" 1>&6
1854 test -n "$AR" && break
1855 done
1856 test -n "$AR" || AR="echo"
1858 for ac_prog in $AS "${target_alias}-as" "${target}-as"
1860 # Extract the first word of "$ac_prog", so it can be a program name with args.
1861 set dummy $ac_prog; ac_word=$2
1862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1863 echo "configure:1864: checking for $ac_word" >&5
1864 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1865 echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867 if test -n "$AS"; then
1868 ac_cv_prog_AS="$AS" # Let the user override the test.
1869 else
1870 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1871 ac_dummy="$PATH"
1872 for ac_dir in $ac_dummy; do
1873 test -z "$ac_dir" && ac_dir=.
1874 if test -f $ac_dir/$ac_word; then
1875 ac_cv_prog_AS="$ac_prog"
1876 break
1878 done
1879 IFS="$ac_save_ifs"
1882 AS="$ac_cv_prog_AS"
1883 if test -n "$AS"; then
1884 echo "$ac_t""$AS" 1>&6
1885 else
1886 echo "$ac_t""no" 1>&6
1889 test -n "$AS" && break
1890 done
1891 test -n "$AS" || AS="echo"
1893 for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
1895 # Extract the first word of "$ac_prog", so it can be a program name with args.
1896 set dummy $ac_prog; ac_word=$2
1897 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1898 echo "configure:1899: checking for $ac_word" >&5
1899 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902 if test -n "$LD"; then
1903 ac_cv_prog_LD="$LD" # Let the user override the test.
1904 else
1905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1906 ac_dummy="$PATH"
1907 for ac_dir in $ac_dummy; do
1908 test -z "$ac_dir" && ac_dir=.
1909 if test -f $ac_dir/$ac_word; then
1910 ac_cv_prog_LD="$ac_prog"
1911 break
1913 done
1914 IFS="$ac_save_ifs"
1917 LD="$ac_cv_prog_LD"
1918 if test -n "$LD"; then
1919 echo "$ac_t""$LD" 1>&6
1920 else
1921 echo "$ac_t""no" 1>&6
1924 test -n "$LD" && break
1925 done
1926 test -n "$LD" || LD="echo"
1928 for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
1930 # Extract the first word of "$ac_prog", so it can be a program name with args.
1931 set dummy $ac_prog; ac_word=$2
1932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1933 echo "configure:1934: checking for $ac_word" >&5
1934 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937 if test -n "$STRIP"; then
1938 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1939 else
1940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1941 ac_dummy="$PATH"
1942 for ac_dir in $ac_dummy; do
1943 test -z "$ac_dir" && ac_dir=.
1944 if test -f $ac_dir/$ac_word; then
1945 ac_cv_prog_STRIP="$ac_prog"
1946 break
1948 done
1949 IFS="$ac_save_ifs"
1952 STRIP="$ac_cv_prog_STRIP"
1953 if test -n "$STRIP"; then
1954 echo "$ac_t""$STRIP" 1>&6
1955 else
1956 echo "$ac_t""no" 1>&6
1959 test -n "$STRIP" && break
1960 done
1961 test -n "$STRIP" || STRIP="echo"
1963 for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
1965 # Extract the first word of "$ac_prog", so it can be a program name with args.
1966 set dummy $ac_prog; ac_word=$2
1967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1968 echo "configure:1969: checking for $ac_word" >&5
1969 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
1970 echo $ac_n "(cached) $ac_c" 1>&6
1971 else
1972 if test -n "$WINDRES"; then
1973 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
1974 else
1975 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1976 ac_dummy="$PATH"
1977 for ac_dir in $ac_dummy; do
1978 test -z "$ac_dir" && ac_dir=.
1979 if test -f $ac_dir/$ac_word; then
1980 ac_cv_prog_WINDRES="$ac_prog"
1981 break
1983 done
1984 IFS="$ac_save_ifs"
1987 WINDRES="$ac_cv_prog_WINDRES"
1988 if test -n "$WINDRES"; then
1989 echo "$ac_t""$WINDRES" 1>&6
1990 else
1991 echo "$ac_t""no" 1>&6
1994 test -n "$WINDRES" && break
1995 done
1996 test -n "$WINDRES" || WINDRES="echo"
1999 else
2000 # Extract the first word of "gcc", so it can be a program name with args.
2001 set dummy gcc; ac_word=$2
2002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_word" >&5
2004 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007 if test -n "$CC"; then
2008 ac_cv_prog_CC="$CC" # Let the user override the test.
2009 else
2010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2011 ac_dummy="$PATH"
2012 for ac_dir in $ac_dummy; do
2013 test -z "$ac_dir" && ac_dir=.
2014 if test -f $ac_dir/$ac_word; then
2015 ac_cv_prog_CC="gcc"
2016 break
2018 done
2019 IFS="$ac_save_ifs"
2022 CC="$ac_cv_prog_CC"
2023 if test -n "$CC"; then
2024 echo "$ac_t""$CC" 1>&6
2025 else
2026 echo "$ac_t""no" 1>&6
2029 if test -z "$CC"; then
2030 # Extract the first word of "cc", so it can be a program name with args.
2031 set dummy cc; ac_word=$2
2032 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2033 echo "configure:2034: checking for $ac_word" >&5
2034 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2035 echo $ac_n "(cached) $ac_c" 1>&6
2036 else
2037 if test -n "$CC"; then
2038 ac_cv_prog_CC="$CC" # Let the user override the test.
2039 else
2040 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2041 ac_prog_rejected=no
2042 ac_dummy="$PATH"
2043 for ac_dir in $ac_dummy; do
2044 test -z "$ac_dir" && ac_dir=.
2045 if test -f $ac_dir/$ac_word; then
2046 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2047 ac_prog_rejected=yes
2048 continue
2050 ac_cv_prog_CC="cc"
2051 break
2053 done
2054 IFS="$ac_save_ifs"
2055 if test $ac_prog_rejected = yes; then
2056 # We found a bogon in the path, so make sure we never use it.
2057 set dummy $ac_cv_prog_CC
2058 shift
2059 if test $# -gt 0; then
2060 # We chose a different compiler from the bogus one.
2061 # However, it has the same basename, so the bogon will be chosen
2062 # first if we set CC to just the basename; use the full file name.
2063 shift
2064 set dummy "$ac_dir/$ac_word" "$@"
2065 shift
2066 ac_cv_prog_CC="$@"
2071 CC="$ac_cv_prog_CC"
2072 if test -n "$CC"; then
2073 echo "$ac_t""$CC" 1>&6
2074 else
2075 echo "$ac_t""no" 1>&6
2078 if test -z "$CC"; then
2079 case "`uname -s`" in
2080 *win32* | *WIN32*)
2081 # Extract the first word of "cl", so it can be a program name with args.
2082 set dummy cl; ac_word=$2
2083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2084 echo "configure:2085: checking for $ac_word" >&5
2085 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2086 echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088 if test -n "$CC"; then
2089 ac_cv_prog_CC="$CC" # Let the user override the test.
2090 else
2091 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2092 ac_dummy="$PATH"
2093 for ac_dir in $ac_dummy; do
2094 test -z "$ac_dir" && ac_dir=.
2095 if test -f $ac_dir/$ac_word; then
2096 ac_cv_prog_CC="cl"
2097 break
2099 done
2100 IFS="$ac_save_ifs"
2103 CC="$ac_cv_prog_CC"
2104 if test -n "$CC"; then
2105 echo "$ac_t""$CC" 1>&6
2106 else
2107 echo "$ac_t""no" 1>&6
2110 esac
2112 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2115 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2116 echo "configure:2117: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2118 ac_ext=c
2119 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2120 ac_cpp='$CPP $CPPFLAGS'
2121 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2122 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2123 cross_compiling=$ac_cv_prog_cc_cross
2125 cat > conftest.$ac_ext << EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2130 main(){return(0);}
2132 if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2133 ac_cv_prog_cc_works=yes
2134 # If we can't run a trivial program, we are probably using a cross compiler.
2135 if (./conftest; exit) 2>/dev/null; then
2136 ac_cv_prog_cc_cross=no
2137 else
2138 ac_cv_prog_cc_cross=yes
2140 else
2141 echo "configure: failed program was:" >&5
2142 cat conftest.$ac_ext >&5
2143 ac_cv_prog_cc_works=no
2145 rm -fr conftest*
2146 ac_ext=c
2147 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2148 ac_cpp='$CPP $CPPFLAGS'
2149 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2150 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2151 cross_compiling=$ac_cv_prog_cc_cross
2153 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2154 if test $ac_cv_prog_cc_works = no; then
2155 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2157 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2158 echo "configure:2159: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2159 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2160 cross_compiling=$ac_cv_prog_cc_cross
2162 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2163 echo "configure:2164: checking whether we are using GNU C" >&5
2164 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2165 echo $ac_n "(cached) $ac_c" 1>&6
2166 else
2167 cat > conftest.c <<EOF
2168 #ifdef __GNUC__
2169 yes;
2170 #endif
2172 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2173 ac_cv_prog_gcc=yes
2174 else
2175 ac_cv_prog_gcc=no
2179 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2181 if test $ac_cv_prog_gcc = yes; then
2182 GCC=yes
2183 else
2184 GCC=
2187 ac_test_CFLAGS="${CFLAGS+set}"
2188 ac_save_CFLAGS="$CFLAGS"
2189 CFLAGS=
2190 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2191 echo "configure:2192: checking whether ${CC-cc} accepts -g" >&5
2192 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195 echo 'void f(){}' > conftest.c
2196 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2197 ac_cv_prog_cc_g=yes
2198 else
2199 ac_cv_prog_cc_g=no
2201 rm -f conftest*
2205 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2206 if test "$ac_test_CFLAGS" = set; then
2207 CFLAGS="$ac_save_CFLAGS"
2208 elif test $ac_cv_prog_cc_g = yes; then
2209 if test "$GCC" = yes; then
2210 CFLAGS="-g -O2"
2211 else
2212 CFLAGS="-g"
2214 else
2215 if test "$GCC" = yes; then
2216 CFLAGS="-O2"
2217 else
2218 CFLAGS=
2222 if test -n "$USE_CPLUS"; then
2223 if test "$CC" = "cl" -a -z "$CXX"; then
2224 CXX=$CC
2225 else
2226 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2228 # Extract the first word of "$ac_prog", so it can be a program name with args.
2229 set dummy $ac_prog; ac_word=$2
2230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2231 echo "configure:2232: checking for $ac_word" >&5
2232 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2233 echo $ac_n "(cached) $ac_c" 1>&6
2234 else
2235 if test -n "$CXX"; then
2236 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2237 else
2238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2239 ac_dummy="$PATH"
2240 for ac_dir in $ac_dummy; do
2241 test -z "$ac_dir" && ac_dir=.
2242 if test -f $ac_dir/$ac_word; then
2243 ac_cv_prog_CXX="$ac_prog"
2244 break
2246 done
2247 IFS="$ac_save_ifs"
2250 CXX="$ac_cv_prog_CXX"
2251 if test -n "$CXX"; then
2252 echo "$ac_t""$CXX" 1>&6
2253 else
2254 echo "$ac_t""no" 1>&6
2257 test -n "$CXX" && break
2258 done
2259 test -n "$CXX" || CXX="gcc"
2262 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2263 echo "configure:2264: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2265 ac_ext=C
2266 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2267 ac_cpp='$CXXCPP $CPPFLAGS'
2268 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2269 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2270 cross_compiling=$ac_cv_prog_cxx_cross
2272 cat > conftest.$ac_ext << EOF
2274 #line 2275 "configure"
2275 #include "confdefs.h"
2277 int main(){return(0);}
2279 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2280 ac_cv_prog_cxx_works=yes
2281 # If we can't run a trivial program, we are probably using a cross compiler.
2282 if (./conftest; exit) 2>/dev/null; then
2283 ac_cv_prog_cxx_cross=no
2284 else
2285 ac_cv_prog_cxx_cross=yes
2287 else
2288 echo "configure: failed program was:" >&5
2289 cat conftest.$ac_ext >&5
2290 ac_cv_prog_cxx_works=no
2292 rm -fr conftest*
2293 ac_ext=c
2294 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2295 ac_cpp='$CPP $CPPFLAGS'
2296 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2297 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2298 cross_compiling=$ac_cv_prog_cc_cross
2300 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2301 if test $ac_cv_prog_cxx_works = no; then
2302 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2304 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2305 echo "configure:2306: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2306 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2307 cross_compiling=$ac_cv_prog_cxx_cross
2309 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2310 echo "configure:2311: checking whether we are using GNU C++" >&5
2311 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2312 echo $ac_n "(cached) $ac_c" 1>&6
2313 else
2314 cat > conftest.C <<EOF
2315 #ifdef __GNUC__
2316 yes;
2317 #endif
2319 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2320 ac_cv_prog_gxx=yes
2321 else
2322 ac_cv_prog_gxx=no
2326 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2328 if test $ac_cv_prog_gxx = yes; then
2329 GXX=yes
2330 else
2331 GXX=
2334 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2335 ac_save_CXXFLAGS="$CXXFLAGS"
2336 CXXFLAGS=
2337 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2338 echo "configure:2339: checking whether ${CXX-g++} accepts -g" >&5
2339 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2340 echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342 echo 'void f(){}' > conftest.cc
2343 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2344 ac_cv_prog_cxx_g=yes
2345 else
2346 ac_cv_prog_cxx_g=no
2348 rm -f conftest*
2352 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2353 if test "$ac_test_CXXFLAGS" = set; then
2354 CXXFLAGS="$ac_save_CXXFLAGS"
2355 elif test $ac_cv_prog_cxx_g = yes; then
2356 if test "$GXX" = yes; then
2357 CXXFLAGS="-g -O2"
2358 else
2359 CXXFLAGS="-g"
2361 else
2362 if test "$GXX" = yes; then
2363 CXXFLAGS="-O2"
2364 else
2365 CXXFLAGS=
2371 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2372 echo "configure:2373: checking how to run the C preprocessor" >&5
2373 # On Suns, sometimes $CPP names a directory.
2374 if test -n "$CPP" && test -d "$CPP"; then
2375 CPP=
2377 if test -z "$CPP"; then
2378 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2379 echo $ac_n "(cached) $ac_c" 1>&6
2380 else
2381 # This must be in double quotes, not single quotes, because CPP may get
2382 # substituted into the Makefile and "${CC-cc}" will confuse make.
2383 CPP="${CC-cc} -E"
2384 # On the NeXT, cc -E runs the code through the compiler's parser,
2385 # not just through cpp.
2386 cat > conftest.$ac_ext <<EOF
2387 #line 2388 "configure"
2388 #include "confdefs.h"
2389 #include <assert.h>
2390 Syntax Error
2392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2393 { (eval echo configure:2394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2395 if test -z "$ac_err"; then
2397 else
2398 echo "$ac_err" >&5
2399 echo "configure: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 rm -rf conftest*
2402 CPP="${CC-cc} -E -traditional-cpp"
2403 cat > conftest.$ac_ext <<EOF
2404 #line 2405 "configure"
2405 #include "confdefs.h"
2406 #include <assert.h>
2407 Syntax Error
2409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2410 { (eval echo configure:2411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2412 if test -z "$ac_err"; then
2414 else
2415 echo "$ac_err" >&5
2416 echo "configure: failed program was:" >&5
2417 cat conftest.$ac_ext >&5
2418 rm -rf conftest*
2419 CPP="${CC-cc} -nologo -E"
2420 cat > conftest.$ac_ext <<EOF
2421 #line 2422 "configure"
2422 #include "confdefs.h"
2423 #include <assert.h>
2424 Syntax Error
2426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2427 { (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2429 if test -z "$ac_err"; then
2431 else
2432 echo "$ac_err" >&5
2433 echo "configure: failed program was:" >&5
2434 cat conftest.$ac_ext >&5
2435 rm -rf conftest*
2436 CPP=/lib/cpp
2438 rm -f conftest*
2440 rm -f conftest*
2442 rm -f conftest*
2443 ac_cv_prog_CPP="$CPP"
2445 CPP="$ac_cv_prog_CPP"
2446 else
2447 ac_cv_prog_CPP="$CPP"
2449 echo "$ac_t""$CPP" 1>&6
2451 # Extract the first word of "ranlib", so it can be a program name with args.
2452 set dummy ranlib; ac_word=$2
2453 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2454 echo "configure:2455: checking for $ac_word" >&5
2455 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2456 echo $ac_n "(cached) $ac_c" 1>&6
2457 else
2458 if test -n "$RANLIB"; then
2459 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2460 else
2461 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2462 ac_dummy="$PATH"
2463 for ac_dir in $ac_dummy; do
2464 test -z "$ac_dir" && ac_dir=.
2465 if test -f $ac_dir/$ac_word; then
2466 ac_cv_prog_RANLIB="ranlib"
2467 break
2469 done
2470 IFS="$ac_save_ifs"
2471 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2474 RANLIB="$ac_cv_prog_RANLIB"
2475 if test -n "$RANLIB"; then
2476 echo "$ac_t""$RANLIB" 1>&6
2477 else
2478 echo "$ac_t""no" 1>&6
2481 for ac_prog in as
2483 # Extract the first word of "$ac_prog", so it can be a program name with args.
2484 set dummy $ac_prog; ac_word=$2
2485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_word" >&5
2487 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
2488 echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490 case "$AS" in
2492 ac_cv_path_AS="$AS" # Let the user override the test with a path.
2494 ?:/*)
2495 ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
2498 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2499 ac_dummy="$PATH"
2500 for ac_dir in $ac_dummy; do
2501 test -z "$ac_dir" && ac_dir=.
2502 if test -f $ac_dir/$ac_word; then
2503 ac_cv_path_AS="$ac_dir/$ac_word"
2504 break
2506 done
2507 IFS="$ac_save_ifs"
2509 esac
2511 AS="$ac_cv_path_AS"
2512 if test -n "$AS"; then
2513 echo "$ac_t""$AS" 1>&6
2514 else
2515 echo "$ac_t""no" 1>&6
2518 test -n "$AS" && break
2519 done
2520 test -n "$AS" || AS="$CC"
2522 for ac_prog in ar
2524 # Extract the first word of "$ac_prog", so it can be a program name with args.
2525 set dummy $ac_prog; ac_word=$2
2526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2527 echo "configure:2528: checking for $ac_word" >&5
2528 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
2529 echo $ac_n "(cached) $ac_c" 1>&6
2530 else
2531 case "$AR" in
2533 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2535 ?:/*)
2536 ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
2539 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2540 ac_dummy="$PATH"
2541 for ac_dir in $ac_dummy; do
2542 test -z "$ac_dir" && ac_dir=.
2543 if test -f $ac_dir/$ac_word; then
2544 ac_cv_path_AR="$ac_dir/$ac_word"
2545 break
2547 done
2548 IFS="$ac_save_ifs"
2550 esac
2552 AR="$ac_cv_path_AR"
2553 if test -n "$AR"; then
2554 echo "$ac_t""$AR" 1>&6
2555 else
2556 echo "$ac_t""no" 1>&6
2559 test -n "$AR" && break
2560 done
2561 test -n "$AR" || AR="echo not_ar"
2563 for ac_prog in ld link
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566 set dummy $ac_prog; ac_word=$2
2567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2568 echo "configure:2569: checking for $ac_word" >&5
2569 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2570 echo $ac_n "(cached) $ac_c" 1>&6
2571 else
2572 case "$LD" in
2574 ac_cv_path_LD="$LD" # Let the user override the test with a path.
2576 ?:/*)
2577 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
2580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2581 ac_dummy="$PATH"
2582 for ac_dir in $ac_dummy; do
2583 test -z "$ac_dir" && ac_dir=.
2584 if test -f $ac_dir/$ac_word; then
2585 ac_cv_path_LD="$ac_dir/$ac_word"
2586 break
2588 done
2589 IFS="$ac_save_ifs"
2591 esac
2593 LD="$ac_cv_path_LD"
2594 if test -n "$LD"; then
2595 echo "$ac_t""$LD" 1>&6
2596 else
2597 echo "$ac_t""no" 1>&6
2600 test -n "$LD" && break
2601 done
2602 test -n "$LD" || LD="echo not_ld"
2604 for ac_prog in strip
2606 # Extract the first word of "$ac_prog", so it can be a program name with args.
2607 set dummy $ac_prog; ac_word=$2
2608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2609 echo "configure:2610: checking for $ac_word" >&5
2610 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
2611 echo $ac_n "(cached) $ac_c" 1>&6
2612 else
2613 case "$STRIP" in
2615 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
2617 ?:/*)
2618 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
2621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2622 ac_dummy="$PATH"
2623 for ac_dir in $ac_dummy; do
2624 test -z "$ac_dir" && ac_dir=.
2625 if test -f $ac_dir/$ac_word; then
2626 ac_cv_path_STRIP="$ac_dir/$ac_word"
2627 break
2629 done
2630 IFS="$ac_save_ifs"
2632 esac
2634 STRIP="$ac_cv_path_STRIP"
2635 if test -n "$STRIP"; then
2636 echo "$ac_t""$STRIP" 1>&6
2637 else
2638 echo "$ac_t""no" 1>&6
2641 test -n "$STRIP" && break
2642 done
2643 test -n "$STRIP" || STRIP="echo not_strip"
2645 for ac_prog in windres
2647 # Extract the first word of "$ac_prog", so it can be a program name with args.
2648 set dummy $ac_prog; ac_word=$2
2649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2650 echo "configure:2651: checking for $ac_word" >&5
2651 if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
2652 echo $ac_n "(cached) $ac_c" 1>&6
2653 else
2654 case "$WINDRES" in
2656 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
2658 ?:/*)
2659 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a dos path.
2662 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2663 ac_dummy="$PATH"
2664 for ac_dir in $ac_dummy; do
2665 test -z "$ac_dir" && ac_dir=.
2666 if test -f $ac_dir/$ac_word; then
2667 ac_cv_path_WINDRES="$ac_dir/$ac_word"
2668 break
2670 done
2671 IFS="$ac_save_ifs"
2673 esac
2675 WINDRES="$ac_cv_path_WINDRES"
2676 if test -n "$WINDRES"; then
2677 echo "$ac_t""$WINDRES" 1>&6
2678 else
2679 echo "$ac_t""no" 1>&6
2682 test -n "$WINDRES" && break
2683 done
2684 test -n "$WINDRES" || WINDRES="echo not_windres"
2686 if test -z "$HOST_CC"; then
2687 HOST_CC="$CC"
2689 if test -z "$HOST_CFLAGS"; then
2690 HOST_CFLAGS="$CFLAGS"
2694 if test "$GCC" = "yes"; then
2695 GNU_CC=1
2697 if test "$GXX" = "yes"; then
2698 GNU_CXX=1
2700 if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
2701 GNU_AS=1
2703 rm -f a.out
2705 case "$build:$target" in
2706 i?86-apple-darwin*:powerpc-apple-darwin*)
2707 cross_compiling=yes
2709 esac
2711 if test "$cross_compiling" = "yes"; then
2712 CROSS_COMPILE=1
2713 else
2714 CROSS_COMPILE=
2717 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
2718 echo "configure:2719: checking for gcc -pipe support" >&5
2719 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
2720 echo '#include <stdio.h>' > dummy-hello.c
2721 echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
2722 ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
2723 cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
2724 if test $? = 0; then
2725 _res_as_stdin="yes"
2726 else
2727 _res_as_stdin="no"
2729 if test "$_res_as_stdin" = "yes"; then
2730 _SAVE_CFLAGS=$CFLAGS
2731 CFLAGS="$CFLAGS -pipe"
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 #include <stdio.h>
2736 int main() {
2737 printf("Hello World\n");
2738 ; return 0; }
2740 if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2741 rm -rf conftest*
2742 _res_gcc_pipe="yes"
2743 else
2744 echo "configure: failed program was:" >&5
2745 cat conftest.$ac_ext >&5
2746 rm -rf conftest*
2747 _res_gcc_pipe="no"
2749 rm -f conftest*
2750 CFLAGS=$_SAVE_CFLAGS
2752 if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
2753 _res="yes";
2754 CFLAGS="$CFLAGS -pipe"
2755 CXXFLAGS="$CXXFLAGS -pipe"
2756 else
2757 _res="no"
2759 rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
2760 echo "$ac_t""$_res" 1>&6
2761 else
2762 echo "$ac_t""no" 1>&6
2766 _SAVE_CFLAGS="$CFLAGS"
2767 CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
2769 echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
2770 echo "configure:2771: checking whether C compiler supports -fprofile-generate" >&5
2771 cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2775 int main() {
2776 return 0;
2777 ; return 0; }
2779 if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2780 rm -rf conftest*
2781 PROFILE_GEN_CFLAGS="-fprofile-generate"
2782 result="yes"
2783 else
2784 echo "configure: failed program was:" >&5
2785 cat conftest.$ac_ext >&5
2786 rm -rf conftest*
2787 result="no"
2789 rm -f conftest*
2790 echo "$ac_t""$result" 1>&6
2792 if test $result = "yes"; then
2793 PROFILE_GEN_LDFLAGS="-fprofile-generate"
2794 PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch -freorder-blocks-and-partition"
2795 PROFILE_USE_LDFLAGS="-fprofile-use"
2798 CFLAGS="$_SAVE_CFLAGS"
2800 if test "$GNU_CC"; then
2801 echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
2802 echo "configure:2803: checking for visibility(hidden) attribute" >&5
2803 if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
2804 echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806 cat > conftest.c <<EOF
2807 int foo __attribute__ ((visibility ("hidden"))) = 1;
2809 ac_cv_visibility_hidden=no
2810 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2811 if grep '\.hidden.*foo' conftest.s >/dev/null; then
2812 ac_cv_visibility_hidden=yes
2815 rm -f conftest.cs
2819 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
2820 if test "$ac_cv_visibility_hidden" = "yes"; then
2821 cat >> confdefs.h <<\EOF
2822 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
2825 echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
2826 echo "configure:2827: checking for visibility pragma support" >&5
2827 if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
2828 echo $ac_n "(cached) $ac_c" 1>&6
2829 else
2830 cat > conftest.c <<EOF
2831 #pragma GCC visibility push(hidden)
2832 int foo_hidden = 1;
2833 #pragma GCC visibility push(default)
2834 int foo_default = 1;
2836 ac_cv_visibility_pragma=no
2837 if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
2838 if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
2839 if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
2840 ac_cv_visibility_pragma=yes
2844 rm -f conftest.cs
2848 echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
2849 if test "$ac_cv_visibility_pragma" = "yes"; then
2850 cat >> confdefs.h <<\EOF
2851 #define HAVE_VISIBILITY_PRAGMA 1
2854 # To work around a build problem on Linux x86-64 (Bugzilla bug
2855 # 293438), we use the -fvisibility=hidden flag. This flag is less
2856 # optimal than #pragma GCC visibility push(hidden) because the flag
2857 # assumes that symbols defined outside the current source file have
2858 # the default visibility. This has the advantage that we don't need
2859 # to wrap system header files, but has the disadvantage that calls
2860 # to hidden symbols defined in other source files cannot be
2861 # optimized by the compiler. The -fvisibility=hidden flag does
2862 # hide and export symbols correctly.
2863 #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
2864 #WRAP_SYSTEM_INCLUDES=1
2865 VISIBILITY_FLAGS="-fvisibility=hidden"
2866 WRAP_SYSTEM_INCLUDES=
2869 fi # GNU_CC
2871 fi # SKIP_COMPILER_CHECKS
2873 if test -z "$SKIP_PATH_CHECKS"; then
2874 for ac_prog in perl5 perl
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877 set dummy $ac_prog; ac_word=$2
2878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2879 echo "configure:2880: checking for $ac_word" >&5
2880 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
2881 echo $ac_n "(cached) $ac_c" 1>&6
2882 else
2883 case "$PERL" in
2885 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2887 ?:/*)
2888 ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
2891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2892 ac_dummy="$PATH"
2893 for ac_dir in $ac_dummy; do
2894 test -z "$ac_dir" && ac_dir=.
2895 if test -f $ac_dir/$ac_word; then
2896 ac_cv_path_PERL="$ac_dir/$ac_word"
2897 break
2899 done
2900 IFS="$ac_save_ifs"
2902 esac
2904 PERL="$ac_cv_path_PERL"
2905 if test -n "$PERL"; then
2906 echo "$ac_t""$PERL" 1>&6
2907 else
2908 echo "$ac_t""no" 1>&6
2911 test -n "$PERL" && break
2912 done
2913 test -n "$PERL" || PERL="echo not_perl"
2915 elif test -z "$PERL"; then
2916 PERL=perl
2919 OBJ_SUFFIX=o
2920 LIB_SUFFIX=a
2921 DLL_SUFFIX=so
2922 ASM_SUFFIX=s
2923 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
2924 PR_MD_ASFILES=
2925 PR_MD_CSRCS=
2926 PR_MD_ARCH_DIR=unix
2927 AR_FLAGS='cr $@'
2928 AS='$(CC)'
2929 ASFLAGS='$(CFLAGS)'
2931 if test -n "$CROSS_COMPILE"; then
2932 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2933 OS_RELEASE=
2934 OS_TEST="${target_cpu}"
2935 case "${target_os}" in
2936 linux*) OS_ARCH=Linux ;;
2937 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2938 mingw*) OS_ARCH=WINNT ;;
2939 wince*) OS_ARCH=WINCE ;;
2940 winmo*) OS_ARCH=WINCE ;;
2941 darwin*) OS_ARCH=Darwin ;;
2942 riscos*) OS_ARCH=RISCOS ;;
2943 esac
2944 else
2945 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2946 OS_RELEASE=`uname -r`
2947 OS_TEST=`uname -m`
2950 if test "$OS_ARCH" = "IRIX64"; then
2951 OS_ARCH=IRIX
2954 if test "$OS_ARCH" = "AIX"; then
2955 OS_RELEASE=`uname -v`.`uname -r`
2958 if test "$OS_ARCH" = "FreeBSD"; then
2959 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2962 if test "$OS_ARCH" = "Linux"; then
2963 OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
2964 OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
2967 #######################################################################
2968 # Master "Core Components" macros for getting the OS target #
2969 #######################################################################
2972 # Note: OS_TARGET should be specified on the command line for gmake.
2973 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
2974 # The difference between the Win95 target and the WinNT target is that
2975 # the WinNT target uses Windows NT specific features not available
2976 # in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
2977 # at lesser performance (the Win95 target uses threads; the WinNT target
2978 # uses fibers).
2980 # If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
2981 # cross-compilation.
2985 # The following hack allows one to build on a WIN95 machine (as if
2986 # s/he were cross-compiling on a WINNT host for a WIN95 target).
2987 # It also accomodates for MKS's uname.exe. If you never intend
2988 # to do development on a WIN95 machine, you don't need this hack.
2990 case "$OS_ARCH" in
2991 WIN95)
2992 OS_ARCH=WINNT
2993 OS_TARGET=WIN95
2995 Windows_95)
2996 OS_ARCH=Windows_NT
2997 OS_TARGET=WIN95
2999 Windows_98)
3000 OS_ARCH=Windows_NT
3001 OS_TARGET=WIN95
3003 CYGWIN_9*|CYGWIN_ME*)
3004 OS_ARCH='CYGWIN_NT-4.0'
3005 OS_TARGET=WIN95
3007 OS_2)
3008 OS_ARCH=OS2
3009 OS_TARGET=OS2
3011 esac
3014 # On WIN32, we also define the variable CPU_ARCH.
3017 case "$OS_ARCH" in
3018 WINNT)
3019 CPU_ARCH=`uname -p`
3020 if test "$CPU_ARCH" = "I386"; then
3021 CPU_ARCH=x86
3024 Windows_NT)
3026 # If uname -s returns "Windows_NT", we assume that we are using
3027 # the uname.exe in MKS toolkit.
3029 # The -r option of MKS uname only returns the major version number.
3030 # So we need to use its -v option to get the minor version number.
3031 # Moreover, it doesn't have the -p option, so we need to use uname -m.
3033 OS_ARCH=WINNT
3034 OS_MINOR_RELEASE=`uname -v`
3035 if test "$OS_MINOR_RELEASE" = "00"; then
3036 OS_MINOR_RELEASE=0
3038 OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
3039 CPU_ARCH=`uname -m`
3041 # MKS's uname -m returns "586" on a Pentium machine.
3043 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3044 CPU_ARCH=x86
3047 CYGWIN_NT*|MINGW*_NT*)
3049 # If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
3050 # the uname.exe in the Cygwin tools.
3051 # If uname -s returns MINGW32_NT-5.1, we assume that we are using
3052 # the uname.exe in the MSYS tools.
3054 OS_RELEASE=`expr $OS_ARCH : '.*NT-\(.*\)'`
3055 OS_ARCH=WINNT
3056 CPU_ARCH=`uname -m`
3058 # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
3060 if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
3061 CPU_ARCH=x86
3064 esac
3066 if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
3067 OS_TARGET=WIN95
3068 if test -n "$MOZ_DEBUG"; then
3069 USE_DEBUG_RTL=1
3072 if test -z "$OS_TARGET"; then
3073 OS_TARGET=$OS_ARCH
3075 if test "$OS_TARGET" = "WIN95"; then
3076 OS_RELEASE="4.0"
3078 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
3080 # Check whether --enable-os2-high-mem or --disable-os2-high-mem was given.
3081 if test "${enable_os2_high_mem+set}" = set; then
3082 enableval="$enable_os2_high_mem"
3083 if test "$enableval" = "no"; then
3084 MOZ_OS2_HIGH_MEMORY=
3085 else
3086 MOZ_OS2_HIGH_MEMORY=1
3091 # Check whether --enable-thumb2 or --disable-thumb2 was given.
3092 if test "${enable_thumb2+set}" = set; then
3093 enableval="$enable_thumb2"
3094 if test "$enableval" = "yes"; then
3095 MOZ_THUMB2=1,
3100 if test -n "$MOZ_THUMB2"; then
3101 case "$target_cpu" in
3102 arm*)
3103 if test "$GNU_CC"; then
3104 CFLAGS="$CFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb"
3105 CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb"
3106 ASFLAGS="$ASFLAGS -march=armv7-a -mthumb"
3107 else
3108 { echo "configure: error: --enable-thumb2 is not supported for non-GNU toolchains" 1>&2; exit 1; }
3112 { echo "configure: error: --enable-thumb2 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
3114 esac
3115 else
3116 case "$target_cpu" in
3117 arm*)
3118 if test "$GNU_CC"; then
3119 CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork"
3120 CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork"
3121 ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork"
3124 esac
3127 case "$host" in
3128 *-mingw*)
3129 NSINSTALL=nsinstall
3131 *-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*)
3132 NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
3133 if test `echo "${PATH}" | grep -c \;` = 0; then
3134 CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
3137 *-beos*)
3138 HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
3140 *os2*)
3143 HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
3145 esac
3147 case "$target" in
3149 *-aix*)
3150 cat >> confdefs.h <<\EOF
3151 #define XP_UNIX 1
3154 cat >> confdefs.h <<\EOF
3155 #define AIX 1
3158 cat >> confdefs.h <<\EOF
3159 #define SYSV 1
3162 DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
3163 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
3164 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
3165 echo "configure:3166: checking for sys/atomic_op.h" >&5
3166 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3167 echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169 cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <sys/atomic_op.h>
3174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3175 { (eval echo configure:3176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3177 if test -z "$ac_err"; then
3178 rm -rf conftest*
3179 eval "ac_cv_header_$ac_safe=yes"
3180 else
3181 echo "$ac_err" >&5
3182 echo "configure: failed program was:" >&5
3183 cat conftest.$ac_ext >&5
3184 rm -rf conftest*
3185 eval "ac_cv_header_$ac_safe=no"
3187 rm -f conftest*
3189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3190 echo "$ac_t""yes" 1>&6
3191 cat >> confdefs.h <<\EOF
3192 #define AIX_HAVE_ATOMIC_OP_H 1
3195 else
3196 echo "$ac_t""no" 1>&6
3199 case "${target_os}" in
3200 aix3.2*)
3201 cat >> confdefs.h <<\EOF
3202 #define AIX_RENAME_SELECT 1
3205 cat >> confdefs.h <<\EOF
3206 #define _PR_NO_LARGE_FILES 1
3209 AIX_LINK_OPTS='-bnso -berok'
3210 PR_MD_ASFILES=os_AIX.s
3212 aix4.1*)
3213 cat >> confdefs.h <<\EOF
3214 #define AIX_TIMERS 1
3217 cat >> confdefs.h <<\EOF
3218 #define _PR_NO_LARGE_FILES 1
3221 cat >> confdefs.h <<\EOF
3222 #define AIX4_1 1
3225 MKSHLIB=
3226 DSO_LDOPTS=
3227 AIX_LINK_OPTS='-bnso -berok'
3228 LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
3229 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)_shr'
3231 aix4.2*)
3232 cat >> confdefs.h <<\EOF
3233 #define AIX_TIMERS 1
3236 cat >> confdefs.h <<\EOF
3237 #define _PR_HAVE_OFF64_T 1
3240 AIX_LINK_OPTS='-brtl -bnso -berok'
3242 aix4.3*)
3243 cat >> confdefs.h <<\EOF
3244 #define AIX_TIMERS 1
3247 cat >> confdefs.h <<\EOF
3248 #define _PR_HAVE_OFF64_T 1
3251 cat >> confdefs.h <<\EOF
3252 #define AIX4_3_PLUS 1
3255 cat >> confdefs.h <<\EOF
3256 #define HAVE_SOCKLEN_T 1
3259 cat >> confdefs.h <<\EOF
3260 #define HAVE_FCNTL_FILE_LOCKING 1
3263 USE_IPV6=1
3264 AIX_LINK_OPTS='-brtl -bnso -berok'
3267 cat >> confdefs.h <<\EOF
3268 #define AIX_TIMERS 1
3271 cat >> confdefs.h <<\EOF
3272 #define _PR_HAVE_OFF64_T 1
3275 cat >> confdefs.h <<\EOF
3276 #define AIX4_3_PLUS 1
3279 cat >> confdefs.h <<\EOF
3280 #define HAVE_SOCKLEN_T 1
3283 cat >> confdefs.h <<\EOF
3284 #define HAVE_FCNTL_FILE_LOCKING 1
3287 USE_IPV6=1
3288 AIX_LINK_OPTS='-brtl -bnso -berok'
3290 esac
3291 CFLAGS="$CFLAGS -qro -qroconst"
3292 AIX_WRAP='$(DIST)/lib/aixwrap.o'
3293 AIX_TMP='./_aix_tmp.o'
3294 if test -n "$USE_64"; then
3295 MDCPUCFG_H=_aix64.cfg
3296 OBJECT_MODE=64
3297 else
3298 MDCPUCFG_H=_aix32.cfg
3300 PR_MD_CSRCS=aix.c
3301 RESOLVE_LINK_SYMBOLS=1
3304 *-beos*)
3305 cat >> confdefs.h <<\EOF
3306 #define XP_BEOS 1
3309 cat >> confdefs.h <<\EOF
3310 #define BeOS 1
3313 cat >> confdefs.h <<\EOF
3314 #define BEOS 1
3317 cat >> confdefs.h <<\EOF
3318 #define _POSIX_SOURCE 1
3321 DSO_LDOPTS=-nostart
3322 MDCPUCFG_H=_beos.cfg
3323 USE_BTHREADS=1
3324 PR_MD_ARCH_DIR=beos
3325 RESOLVE_LINK_SYMBOLS=1
3326 case "${target_cpu}" in
3327 i*86)
3328 _OPTIMIZE_FLAGS=-O2
3329 _DEBUG_FLAGS='-gdwarf-2 -O0'
3330 MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
3331 echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
3332 echo "configure:3333: checking for gethostbyaddr in -lbind" >&5
3333 ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
3334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3335 echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337 ac_save_LIBS="$LIBS"
3338 LIBS="-lbind $LIBS"
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 /* Override any gcc2 internal prototype to avoid an error. */
3343 /* We use char because int might match the return type of a gcc2
3344 builtin and then its argument prototype would still apply. */
3345 char gethostbyaddr();
3347 int main() {
3348 gethostbyaddr()
3349 ; return 0; }
3351 if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3352 rm -rf conftest*
3353 eval "ac_cv_lib_$ac_lib_var=yes"
3354 else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 rm -rf conftest*
3358 eval "ac_cv_lib_$ac_lib_var=no"
3360 rm -f conftest*
3361 LIBS="$ac_save_LIBS"
3364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3365 echo "$ac_t""yes" 1>&6
3366 OS_LIBS="$OS_LIBS -lbind -lsocket"
3367 else
3368 echo "$ac_t""no" 1>&6
3372 powerpc)
3373 CC=mwcc
3374 CCC=mwcc
3375 LD=mwld
3376 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'
3377 _OPTIMIZE_FLAGS=-O2
3378 _DEBUG_FLAGS='-g -O0'
3380 esac
3383 *-bsdi*)
3384 cat >> confdefs.h <<\EOF
3385 #define XP_UNIX 1
3388 cat >> confdefs.h <<\EOF
3389 #define BSDI 1
3392 cat >> confdefs.h <<\EOF
3393 #define NEED_BSDREGEX 1
3397 CFLAGS="$CFLAGS -Wall -Wno-format"
3398 CXXFLAGS="$CXXFLAGS -Wall -Wno-format"
3400 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
3401 CPU_ARCH=x86
3402 elif echo "$OS_TEST" | grep -c sparc >/dev/null; then
3403 CPU_ARCH=sparc
3406 MDCPUCFG_H=_bsdi.cfg
3407 PR_MD_CSRCS=bsdi.c
3409 DSO_LDOPTS=-r
3411 case "$target_os" in
3412 bsdi1.1*)
3413 cat >> confdefs.h <<\EOF
3414 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3417 cat >> confdefs.h <<\EOF
3418 #define _PR_STAT_HAS_ONLY_ST_ATIME 1
3421 cat >> confdefs.h <<\EOF
3422 #define _PR_NEED_H_ERRNO 1
3425 MKSHLIB=
3426 DSO_CFLAGS=
3427 DSO_LDOPTS=
3430 bsdi2.1*)
3431 cat >> confdefs.h <<\EOF
3432 #define _PR_TIMESPEC_HAS_TS_SEC 1
3435 cat >> confdefs.h <<\EOF
3436 #define _PR_BSDI_JMPBUF_IS_ARRAY 1
3439 cat >> confdefs.h <<\EOF
3440 #define HAVE_DLL 1
3443 cat >> confdefs.h <<\EOF
3444 #define USE_DLFCN 1
3447 cat >> confdefs.h <<\EOF
3448 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3451 PR_MD_ASFILES=os_BSD_OS_386_2.s
3454 bsdi4.* | bsdi5.*)
3455 cat >> confdefs.h <<\EOF
3456 #define _PR_SELECT_CONST_TIMEVAL 1
3459 cat >> confdefs.h <<\EOF
3460 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3463 cat >> confdefs.h <<\EOF
3464 #define HAVE_DLL 1
3467 cat >> confdefs.h <<\EOF
3468 #define USE_DLFCN 1
3471 cat >> confdefs.h <<\EOF
3472 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3475 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
3476 DSO_CFLAGS=-fPIC
3477 DSO_LDOPTS='-shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)'
3478 STRIP="$STRIP -d"
3479 case "$target_os" in
3480 bsdi4.2* | bsdi4.3* | bsdi5.*)
3481 cat >> confdefs.h <<\EOF
3482 #define _PR_HAVE_GETPROTO_R 1
3485 cat >> confdefs.h <<\EOF
3486 #define _PR_HAVE_GETPROTO_R_POINTER 1
3490 esac
3493 cat >> confdefs.h <<\EOF
3494 #define _PR_SELECT_CONST_TIMEVAL 1
3497 cat >> confdefs.h <<\EOF
3498 #define _PR_BSDI_JMPBUF_IS_STRUCT 1
3501 cat >> confdefs.h <<\EOF
3502 #define HAVE_DLL 1
3505 cat >> confdefs.h <<\EOF
3506 #define USE_DLFCN 1
3509 cat >> confdefs.h <<\EOF
3510 #define _PR_STAT_HAS_ST_ATIMESPEC 1
3514 esac
3518 *-darwin*)
3519 cat >> confdefs.h <<\EOF
3520 #define XP_UNIX 1
3523 cat >> confdefs.h <<\EOF
3524 #define DARWIN 1
3527 cat >> confdefs.h <<\EOF
3528 #define HAVE_BSD_FLOCK 1
3531 cat >> confdefs.h <<\EOF
3532 #define HAVE_SOCKLEN_T 1
3535 AS='$(CC) -x assembler-with-cpp'
3536 CFLAGS="$CFLAGS -Wall -fno-common"
3537 case "${target_cpu}" in
3538 i*86*)
3539 if test -n "$USE_64"; then
3540 CPU_ARCH=x86_64
3541 CC="$CC -arch x86_64"
3542 else
3543 CPU_ARCH=i386
3547 CPU_ARCH=ppc
3549 esac
3550 DSO_CFLAGS=-fPIC
3551 DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
3552 _OPTIMIZE_FLAGS=-O2
3553 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3554 STRIP="$STRIP -x -S"
3555 DLL_SUFFIX=dylib
3556 USE_PTHREADS=1
3557 MDCPUCFG_H=_darwin.cfg
3558 PR_MD_CSRCS=darwin.c
3559 PR_MD_ASFILES=os_Darwin.s
3561 # Add Mac OS X support for loading CFM & CFBundle plugins
3562 if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
3563 cat >> confdefs.h <<\EOF
3564 #define XP_MACOSX 1
3567 OS_TARGET=MacOSX
3569 if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
3570 export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
3571 elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
3572 case "${target_cpu}" in
3573 powerpc*)
3574 export MACOSX_DEPLOYMENT_TARGET=10.2
3576 i*86*)
3577 export MACOSX_DEPLOYMENT_TARGET=10.4
3579 esac
3583 if test "$MACOS_SDK_DIR"; then
3585 if test ! -d "$MACOS_SDK_DIR"; then
3586 { echo "configure: error: SDK not found. When using --with-macos-sdk, you must
3587 specify a valid SDK. SDKs are installed when the optional cross-development
3588 tools are selected during the Xcode/Developer Tools installation." 1>&2; exit 1; }
3592 CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
3593 GCC_VERSION_FULL=`echo $CC_VERSION | $PERL -pe 's/^.*gcc version ([^ ]*).*/$1/'`
3594 GCC_VERSION=`echo $GCC_VERSION_FULL | $PERL -pe '(split(/\./))[0]>=4&&s/(^\d*\.\d*).*/$1/;'`
3596 GCC_VERSION_MAJOR=`echo $GCC_VERSION_FULL | $PERL -pe 's/(^\d*).*/$1/;'`
3597 if test "$GCC_VERSION_MAJOR" -lt "4" ; then
3598 SDK_C_FRAMEWORK="-F${MACOS_SDK_DIR}/System/Library/Frameworks"
3599 if test -d "${MACOS_SDK_DIR}/Library/Frameworks" ; then
3600 SDK_C_FRAMEWORK="$SDK_C_FRAMEWORK -F${MACOS_SDK_DIR}/Library/Frameworks"
3603 SDK_C_INCLUDE="-isystem ${MACOS_SDK_DIR}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOS_SDK_DIR}/usr/include ${SDK_C_FRAMEWORK}"
3605 CFLAGS="$CFLAGS -nostdinc ${SDK_C_INCLUDE}"
3607 CPP="$CPP -nostdinc ${SDK_C_INCLUDE}"
3610 HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
3612 if test "$HOST_DARWIN_MAJOR" -lt 9 ; then
3613 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}"
3614 else
3615 MACOS_SDK_LIBS="-Wl,-syslibroot,${MACOS_SDK_DIR}"
3618 LDFLAGS="${MACOS_SDK_LIBS} $LDFLAGS"
3619 export NEXT_ROOT=$MACOS_SDK_DIR
3621 if test -n "$CROSS_COMPILE" ; then
3622 HOST_CC="NEXT_ROOT= $HOST_CC"
3623 HOST_CXX="NEXT_ROOT= $HOST_CXX"
3625 else
3626 CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
3628 CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
3630 if test "$GCC_VERSION_FULL" != "4.0.0" ; then
3631 LDFLAGS="$LDFLAGS -isysroot ${MACOS_SDK_DIR}"
3632 else
3633 LDFLAGS="$LDFLAGS -Wl,-syslibroot,${MACOS_SDK_DIR}"
3640 *-dgux*)
3641 cat >> confdefs.h <<\EOF
3642 #define XP_UNIX 1
3645 cat >> confdefs.h <<\EOF
3646 #define _PR_LOCAL_THREADS_ONLY 1
3649 cat >> confdefs.h <<\EOF
3650 #define SVR4 1
3653 cat >> confdefs.h <<\EOF
3654 #define SYSV 1
3657 cat >> confdefs.h <<\EOF
3658 #define DGUX 1
3661 cat >> confdefs.h <<\EOF
3662 #define _DGUX_SOURCE 1
3665 cat >> confdefs.h <<\EOF
3666 #define _POSIX4A_DRAFT6_SOURCE 1
3669 DSO_LDOPTS=-G
3670 _OPTIMIZE_FLAGS=-O2
3671 _DEBUG_FLAGS=
3672 MDCPUCFG_H=_dgux.cfg
3673 PR_MD_CSRCS=dgux.c
3676 *-freebsd*)
3677 if test -z "$USE_NSPR_THREADS"; then
3678 USE_PTHREADS=1
3680 cat >> confdefs.h <<\EOF
3681 #define XP_UNIX 1
3684 cat >> confdefs.h <<\EOF
3685 #define FREEBSD 1
3688 cat >> confdefs.h <<\EOF
3689 #define HAVE_BSD_FLOCK 1
3692 cat >> confdefs.h <<\EOF
3693 #define HAVE_SOCKLEN_T 1
3696 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3697 MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
3698 if test "$MOZ_OBJFORMAT" = "elf"; then
3699 DLL_SUFFIX=so
3700 else
3701 DLL_SUFFIX=so.1.0
3703 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3704 DSO_CFLAGS=-fPIC
3705 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3706 MDCPUCFG_H=_freebsd.cfg
3707 PR_MD_CSRCS=freebsd.c
3710 *-hpux*)
3711 cat >> confdefs.h <<\EOF
3712 #define XP_UNIX 1
3715 cat >> confdefs.h <<\EOF
3716 #define HPUX 1
3719 cat >> confdefs.h <<\EOF
3720 #define _HPUX_SOURCE 1
3723 # OSF1 and HPUX report the POLLHUP event for a socket when the
3724 # shutdown(SHUT_WR) operation is called for the remote end, even though
3725 # the socket is still writeable. Use select(), instead of poll(), to
3726 # workaround this problem.
3727 cat >> confdefs.h <<\EOF
3728 #define _PR_POLL_WITH_SELECT 1
3731 cat >> confdefs.h <<\EOF
3732 #define _USE_BIG_FDS 1
3735 DSO_LDOPTS='-b +h $(notdir $@)'
3736 PR_MD_CSRCS=hpux.c
3737 if test "$OS_TEST" = "ia64"; then
3738 DLL_SUFFIX=so
3739 DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
3740 CPU_ARCH_TAG=_$OS_TEST
3741 if test -z "$USE_64"; then
3742 COMPILER_TAG=_32
3744 PR_MD_ASFILES=os_HPUX_ia64.s
3745 else
3746 cat >> confdefs.h <<\EOF
3747 #define hppa 1
3750 DLL_SUFFIX=sl
3751 PR_MD_ASFILES=os_HPUX.s
3753 if test -n "$USE_64"; then
3754 MDCPUCFG_H=_hpux64.cfg
3755 else
3756 MDCPUCFG_H=_hpux32.cfg
3758 if test -z "$GNU_CC"; then
3759 CC="$CC -Ae"
3760 CXX="$CXX -ext"
3761 DSO_CFLAGS=+Z
3762 else
3763 DSO_CFLAGS=-fPIC
3764 ASFLAGS="$ASFLAGS -x assembler-with-cpp"
3767 if test -n "$MOZILLA_CLIENT"; then
3768 DEFAULT_IMPL_STRATEGY=_EMU
3771 if echo "$OS_RELEASE" | grep ^A.09 >/dev/null; then
3772 cat >> confdefs.h <<\EOF
3773 #define _PR_NEED_H_ERRNO 1
3776 cat >> confdefs.h <<\EOF
3777 #define HPUX9 1
3780 DEFAULT_IMPL_STRATEGY=_EMU
3781 USE_NSPR_THREADS=1
3784 if echo "$OS_RELEASE" | egrep '^(A.09|B.10)' >/dev/null; then
3785 cat >> confdefs.h <<\EOF
3786 #define _PR_NO_LARGE_FILES 1
3791 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3792 cat >> confdefs.h <<\EOF
3793 #define _PR_NEED_H_ERRNO 1
3798 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
3799 cat >> confdefs.h <<\EOF
3800 #define HAVE_INT_LOCALTIME_R 1
3805 if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
3806 cat >> confdefs.h <<\EOF
3807 #define HAVE_POINTER_LOCALTIME_R 1
3812 # HP-UX 11i v2 (B.11.23) or higher
3814 case "$OS_RELEASE" in
3815 [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
3816 USE_IPV6=1
3818 esac
3821 if test "$OS_RELEASE" = "B.10.01"; then
3822 cat >> confdefs.h <<\EOF
3823 #define HPUX10 1
3826 DEFAULT_IMPL_STRATEGY=_EMU
3829 if test "$OS_RELEASE" = "B.10.10"; then
3830 cat >> confdefs.h <<\EOF
3831 #define HPUX10 1
3834 cat >> confdefs.h <<\EOF
3835 #define HPUX10_10 1
3838 DEFAULT_IMPL_STRATEGY=_PTH
3841 if test "$OS_RELEASE" = "B.10.20"; then
3842 cat >> confdefs.h <<\EOF
3843 #define HPUX10 1
3846 cat >> confdefs.h <<\EOF
3847 #define HPUX10_20 1
3850 if test -z "$GNU_CC"; then
3851 CFLAGS="$CFLAGS +DAportable +DS1.1"
3852 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3854 DEFAULT_IMPL_STRATEGY=_PTH
3857 if test "$OS_RELEASE" = "B.10.30"; then
3858 cat >> confdefs.h <<\EOF
3859 #define HPUX10 1
3862 cat >> confdefs.h <<\EOF
3863 #define HPUX10_30 1
3866 if test -z "$GNU_CC"; then
3867 CFLAGS="$CFLAGS +DAportable +DS1.1"
3868 CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
3870 DEFAULT_IMPL_STRATEGY=_PTH
3873 if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
3874 cat >> confdefs.h <<\EOF
3875 #define HPUX10 1
3878 cat >> confdefs.h <<\EOF
3879 #define HPUX11 1
3882 cat >> confdefs.h <<\EOF
3883 #define _LARGEFILE64_SOURCE 1
3886 cat >> confdefs.h <<\EOF
3887 #define _PR_HAVE_OFF64_T 1
3890 cat >> confdefs.h <<\EOF
3891 #define HAVE_FCNTL_FILE_LOCKING 1
3894 if test -z "$GNU_CC"; then
3895 if test -z "$USE_64"; then
3896 if test "$OS_TEST" = "ia64"; then
3897 CFLAGS="$CFLAGS +DD32"
3898 CXXFLAGS="$CXXFLAGS +DD32"
3899 else
3900 CFLAGS="$CFLAGS +DAportable +DS2.0"
3901 CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
3903 else
3904 if test "$OS_TEST" = "ia64"; then
3905 CFLAGS="$CFLAGS +DD64"
3906 CXXFLAGS="$CXXFLAGS +DD64"
3907 else
3908 CFLAGS="$CFLAGS +DA2.0W +DS2.0"
3909 CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
3913 DEFAULT_IMPL_STRATEGY=_PTH
3916 if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
3917 USE_NSPR_THREADS=1
3918 USE_PTHREADS=
3919 USE_USER_PTHREADS=
3920 elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
3921 USE_PTHREADS=1
3922 if test "$USE_NSPR_THREADS"; then
3923 USE_PTHREADS=
3925 if test "$USE_USER_PTHREADS"; then
3926 USE_PTHREADS=
3931 *-irix*)
3932 cat >> confdefs.h <<\EOF
3933 #define XP_UNIX 1
3936 cat >> confdefs.h <<\EOF
3937 #define IRIX 1
3940 cat >> confdefs.h <<\EOF
3941 #define SVR4 1
3944 cat >> confdefs.h <<\EOF
3945 #define _SGI_MP_SOURCE 1
3948 cat >> confdefs.h <<\EOF
3949 #define HAVE_FCNTL_FILE_LOCKING 1
3952 PR_MD_CSRCS=irix.c
3953 PR_MD_ASFILES=os_Irix.s
3954 MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
3955 STRIP="$STRIP -f"
3956 RESOLVE_LINK_SYMBOLS=1
3957 if test -n "$USE_64"; then
3958 MDCPUCFG_H=_irix64.cfg
3959 else
3960 MDCPUCFG_H=_irix32.cfg
3962 case "${target_os}" in
3963 irix6*)
3964 cat >> confdefs.h <<\EOF
3965 #define IRIX6 1
3968 USE_PTHREADS=1
3969 USE_N32=1
3970 COMPILER_TAG=_n32
3971 IMPL_STRATEGY=_PTH
3973 irix5*)
3974 cat >> confdefs.h <<\EOF
3975 #define IRIX5 1
3978 USE_NSPR_THREADS=1
3981 USE_PTHREADS=1
3982 USE_N32=1
3984 esac
3985 if test "$GNU_CC"; then
3986 AS='$(CC) -Wp,-P -x assembler-with-cpp -D_ASM -mips2 $(INCLUDES)'
3987 CFLAGS="$CFLAGS -Wall -Wno-format"
3988 _OPTIMIZE_FLAGS="-O6"
3989 else
3990 if test -n "$USE_N32"; then
3991 AS='as -D_ASM $(INCLUDES) -n32'
3992 else
3993 AS='as -D_ASM $(INCLUDES)'
3995 CFLAGS="$CFLAGS -fullwarn -xansi"
3996 if test "$USE_N32"; then
3997 _OPTIMIZE_FLAGS="-O -OPT:Olimit=4000"
3998 else
3999 _OPTIMIZE_FLAGS="-O -Olimit 4000"
4001 if test "$USE_MDUPDATE"; then
4002 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4004 case "${target}" in
4005 *-irix6.*)
4006 CFLAGS="$CFLAGS -multigot"
4007 DSO_LDOPTS="-no_unresolved"
4008 if test "$USE_N32"; then
4009 CFLAGS="$CFLAGS -n32 -woff 1209"
4010 DSO_LDOPTS="$DSO_LDOPTS -n32"
4011 else
4012 if test "$USE_64"; then
4013 CFLAGS="$CFLAGS -64"
4014 else
4015 CFLAGS="$CFLAGS -32"
4020 CFLAGS="$CFLAGS -xgot"
4022 esac
4024 if test "${target_os}" = "irix5.3"; then
4025 cat >> confdefs.h <<\EOF
4026 #define IRIX5_3 1
4030 case "${target_os}" in
4031 irix6.5)
4032 if test -z "$GNU_CC"; then
4033 CFLAGS="$CFLAGS -mips3"
4035 cat >> confdefs.h <<\EOF
4036 #define _PR_HAVE_GETPROTO_R 1
4039 cat >> confdefs.h <<\EOF
4040 #define _PR_HAVE_GETPROTO_R_POINTER 1
4043 cat >> confdefs.h <<\EOF
4044 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4048 irix5*)
4051 cat >> confdefs.h <<\EOF
4052 #define _PR_HAVE_SGI_PRDA_PROCMASK 1
4056 esac
4059 arm-android-eabi)
4060 if test -z "$USE_NSPR_THREADS"; then
4061 USE_PTHREADS=1
4062 IMPL_STRATEGY=_PTH
4064 cat >> confdefs.h <<\EOF
4065 #define XP_UNIX 1
4068 cat >> confdefs.h <<\EOF
4069 #define _GNU_SOURCE 1
4072 cat >> confdefs.h <<\EOF
4073 #define HAVE_FCNTL_FILE_LOCKING 1
4076 cat >> confdefs.h <<\EOF
4077 #define LINUX 1
4080 CFLAGS="$CFLAGS -Wall"
4081 CXXFLAGS="$CXXFLAGS -Wall"
4082 MDCPUCFG_H=_linux.cfg
4083 PR_MD_CSRCS=linux.c
4084 MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
4085 DSO_CFLAGS=-fPIC
4086 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4087 _OPTIMIZE_FLAGS=-O2
4088 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4089 # combo is not yet good at debugging inlined
4090 # functions (even when using DWARF2 as the
4091 # debugging format)
4092 COMPILER_TAG=_glibc
4093 CPU_ARCH=arm
4094 CPU_ARCH_TAG=_arm
4095 OS_TARGET=Android
4098 *-linux*|*-gnu*|*-k*bsd*-gnu)
4099 if test -z "$USE_NSPR_THREADS"; then
4100 USE_PTHREADS=1
4101 IMPL_STRATEGY=_PTH
4103 cat >> confdefs.h <<\EOF
4104 #define XP_UNIX 1
4107 cat >> confdefs.h <<\EOF
4108 #define _GNU_SOURCE 1
4111 cat >> confdefs.h <<\EOF
4112 #define HAVE_FCNTL_FILE_LOCKING 1
4115 case "${target_os}" in
4116 linux*)
4117 cat >> confdefs.h <<\EOF
4118 #define LINUX 1
4122 esac
4123 CFLAGS="$CFLAGS -Wall"
4124 CXXFLAGS="$CXXFLAGS -Wall"
4125 MDCPUCFG_H=_linux.cfg
4126 PR_MD_CSRCS=linux.c
4127 MKSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_LIB) -o $@'
4128 DSO_CFLAGS=-fPIC
4129 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4130 _OPTIMIZE_FLAGS=-O2
4131 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
4132 # combo is not yet good at debugging inlined
4133 # functions (even when using DWARF2 as the
4134 # debugging format)
4135 COMPILER_TAG=_glibc
4136 if echo "$OS_TEST" | grep -c 86 >/dev/null; then
4137 CPU_ARCH=x86
4138 else
4139 CPU_ARCH=$OS_TEST
4141 CPU_ARCH_TAG=_${CPU_ARCH}
4142 case "${target_cpu}" in
4143 alpha)
4144 cat >> confdefs.h <<\EOF
4145 #define _ALPHA_ 1
4148 cat >> confdefs.h <<\EOF
4149 #define __alpha 1
4152 CFLAGS="$CFLAGS -mieee"
4153 CXXFLAGS="$CXXFLAGS -mieee"
4155 i*86)
4156 cat >> confdefs.h <<\EOF
4157 #define i386 1
4160 PR_MD_ASFILES=os_Linux_x86.s
4162 ia64)
4163 PR_MD_ASFILES=os_Linux_ia64.s
4165 x86_64)
4166 if test -n "$USE_64"; then
4167 PR_MD_ASFILES=os_Linux_x86_64.s
4168 else
4169 cat >> confdefs.h <<\EOF
4170 #define i386 1
4173 PR_MD_ASFILES=os_Linux_x86.s
4174 CC="$CC -m32"
4175 CXX="$CXX -m32"
4178 ppc|powerpc)
4179 PR_MD_ASFILES=os_Linux_ppc.s
4181 powerpc64)
4182 if test -n "$USE_64"; then
4183 CC="$CC -m64"
4184 CXX="$CXX -m64"
4185 else
4186 PR_MD_ASFILES=os_Linux_ppc.s
4189 m68k)
4190 CFLAGS="$CFLAGS -m68020-60"
4191 CXXFLAGS="$CXXFLAGS -m68020-60"
4193 esac
4196 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
4197 cat >> confdefs.h <<\EOF
4198 #define XP_PC 1
4201 cat >> confdefs.h <<\EOF
4202 #define WIN32 1
4205 PR_MD_ARCH_DIR=windows
4206 RESOLVE_LINK_SYMBOLS=1
4208 if test -n "$GNU_CC"; then
4209 CC="$CC -mno-cygwin"
4210 CXX="$CXX -mno-cygwin"
4211 DLL_SUFFIX=dll
4212 MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
4213 RC=$WINDRES
4214 # Use temp file for windres (bug 213281)
4215 RCFLAGS='-O coff --use-temp-file'
4216 else
4217 CC=cl
4218 CXX=cl
4219 LD=link
4220 AR='lib -NOLOGO -OUT:"$@"'
4221 AR_FLAGS=
4222 RANLIB='echo not_ranlib'
4223 STRIP='echo not_strip'
4224 RC=rc.exe
4225 GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
4226 OBJ_SUFFIX=obj
4227 LIB_SUFFIX=lib
4228 DLL_SUFFIX=dll
4230 # Determine compiler version
4232 _MSVC_VER_FILTER='s|.* \([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).*|\1|p'
4234 CC_VERSION=`"${CC}" -v 2>&1 | sed -ne "$_MSVC_VER_FILTER"`
4235 _CC_MAJOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $1 }'`
4236 _CC_MINOR_VERSION=`echo ${CC_VERSION} | awk -F\. '{ print $2 }'`
4237 _CC_RELEASE=`echo ${CC_VERSION} | awk -F\. '{ print $3 }'`
4238 _CC_BUILD=`echo ${CC_VERSION} | awk -F\. '{ print $4 }'`
4239 MSC_VER=${_CC_MAJOR_VERSION}${_CC_MINOR_VERSION}
4241 if test "$_CC_MAJOR_VERSION" -eq "14"; then
4242 if test $_CC_RELEASE -gt 50727; then
4243 _USE_DYNAMICBASE=1
4244 elif test $_CC_BUILD -ge 762; then
4245 _USE_DYNAMICBASE=1
4247 cat >> confdefs.h <<\EOF
4248 #define _CRT_SECURE_NO_DEPRECATE 1
4251 cat >> confdefs.h <<\EOF
4252 #define _CRT_NONSTDC_NO_DEPRECATE 1
4255 elif test $_CC_MAJOR_VERSION -ge 15; then
4256 _USE_DYNAMICBASE=1
4257 cat >> confdefs.h <<\EOF
4258 #define _CRT_SECURE_NO_WARNINGS 1
4261 cat >> confdefs.h <<\EOF
4262 #define _CRT_NONSTDC_NO_WARNINGS 1
4267 if test -n "$_USE_DYNAMICBASE"; then
4268 DLLFLAGS="$DLLFLAGS -DYNAMICBASE"
4271 # Ensure that mt is Microsoft (R) Manifest Tool and not magnetic
4272 # tape manipulation utility (or something else)
4273 if test "$MSC_VER" -ge "1400"; then
4275 _MSMT_VER_FILTER='s|.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
4278 MSMT_TOOL=`mt 2>&1|grep 'Microsoft (R) Manifest Tool'`
4279 if test -n "$MSMT_TOOL"; then
4280 MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
4281 if test -z "$MSMANIFEST_TOOL_VERSION"; then
4282 echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
4284 MT=mt
4285 unset MSMT_TOOL
4286 else
4287 { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; exit 1; }
4291 CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
4292 DLLFLAGS="$DLLFLAGS -OUT:\"\$@\""
4293 _DEBUG_FLAGS=-Zi
4294 _OPTIMIZE_FLAGS=-O2
4296 PROFILE_GEN_CFLAGS="-GL"
4297 PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
4298 PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
4299 PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
4301 if test -z "$MOZ_OPTIMIZE"; then
4302 CFLAGS="$CFLAGS -Od"
4305 if test -n "$USE_DEBUG_RTL"; then
4306 CFLAGS="$CFLAGS -MDd"
4307 else
4308 CFLAGS="$CFLAGS -MD"
4311 if test -n "$MOZ_DEBUG"; then
4312 cat >> confdefs.h <<\EOF
4313 #define _DEBUG 1
4316 else
4317 DEFINES="$DEFINES -U_DEBUG"
4320 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4321 if test -n "$MOZ_OPTIMIZE"; then
4322 DLLFLAGS="$DLLFLAGS -DEBUG -OPT:REF"
4323 LDFLAGS="$LDFLAGS -DEBUG -OPT:REF"
4324 else
4325 DLLFLAGS="$DLLFLAGS -DEBUG"
4326 LDFLAGS="$LDFLAGS -DEBUG"
4330 OS_DLLFLAGS="-nologo -DLL -SUBSYSTEM:WINDOWS"
4331 if test "$MSC_VER" -le "1200" -a -z "$MOZ_DEBUG_SYMBOLS"; then
4332 OS_DLLFLAGS="$OS_DLLFLAGS -PDB:NONE"
4335 if test "$OS_TARGET" = "WINNT"; then
4336 CFLAGS="$CFLAGS -GT"
4337 LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4338 LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4339 else
4340 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4341 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4343 fi # GNU_CC
4345 if test -n "$USE_STATIC_TLS"; then
4346 cat >> confdefs.h <<\EOF
4347 #define _PR_USE_STATIC_TLS 1
4352 if test "$OS_TARGET" = "WINNT"; then
4353 cat >> confdefs.h <<\EOF
4354 #define WINNT 1
4357 else
4358 cat >> confdefs.h <<\EOF
4359 #define WIN95 1
4362 # undefine WINNT as some versions of mingw gcc define it by default
4363 DEFINES="$DEFINES -UWINNT"
4364 cat >> confdefs.h <<\EOF
4365 #define _PR_GLOBAL_THREADS_ONLY 1
4370 if test "$CPU_ARCH" = "x86"; then
4371 CPU_ARCH_TAG=
4372 else
4373 CPU_ARCH_TAG=$CPU_ARCH
4376 if test -n "$USE_DEBUG_RTL"; then
4377 OBJDIR_SUFFIX=OBJD
4380 case "$OS_TARGET" in
4381 WINNT)
4382 MDCPUCFG_H=_winnt.cfg
4384 WIN95)
4385 MDCPUCFG_H=_win95.cfg
4388 { echo "configure: error: Missing OS_TARGET for ${target}. Use --enable-win32-target to set." 1>&2; exit 1; }
4390 esac
4392 case "$target_cpu" in
4393 i*86)
4394 if test -n "$USE_64"; then
4395 cat >> confdefs.h <<\EOF
4396 #define _AMD64_ 1
4399 else
4400 cat >> confdefs.h <<\EOF
4401 #define _X86_ 1
4406 x86_64)
4407 cat >> confdefs.h <<\EOF
4408 #define _AMD64_ 1
4411 USE_64=1
4413 ia64)
4414 cat >> confdefs.h <<\EOF
4415 #define _IA64_ 1
4418 USE_64=1
4421 cat >> confdefs.h <<\EOF
4422 #define _CPU_ARCH_NOT_DEFINED 1
4426 esac
4429 *-wince*|*-winmo*)
4430 cat >> confdefs.h <<\EOF
4431 #define XP_PC 1
4434 cat >> confdefs.h <<\EOF
4435 #define WIN32 1
4438 cat >> confdefs.h <<\EOF
4439 #define WINCE 1
4442 cat >> confdefs.h <<\EOF
4443 #define _PR_GLOBAL_THREADS_ONLY 1
4447 AR_FLAGS='-NOLOGO -OUT:"$@"'
4449 OBJ_SUFFIX=obj
4450 LIB_SUFFIX=lib
4451 DLL_SUFFIX=dll
4452 MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
4454 PR_MD_ARCH_DIR=windows
4455 RESOLVE_LINK_SYMBOLS=1
4457 MDCPUCFG_H=_win95.cfg
4458 LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4459 LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
4461 DLLFLAGS='-OUT:"$@"'
4462 if test -n "$MOZ_DEBUG_SYMBOLS"; then
4463 OS_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
4464 OS_DLLFLAGS='-DEBUG -DEBUGTYPE:CV'
4465 DSO_LDOPTS='-DEBUG -DEBUGTYPE:CV'
4467 _DEBUG_FLAGS=-Zi
4468 _OPTIMIZE_FLAGS=-O2
4471 *-ncr-sysv*)
4472 cat >> confdefs.h <<\EOF
4473 #define XP_UNIX 1
4476 cat >> confdefs.h <<\EOF
4477 #define SVR4 1
4480 cat >> confdefs.h <<\EOF
4481 #define SYSV 1
4484 cat >> confdefs.h <<\EOF
4485 #define NCR 1
4488 USE_NSPR_THREADS=1
4489 if test "$OS_RELEASE" = "2.03"; then
4490 cat >> confdefs.h <<\EOF
4491 #define _PR_STAT_HAS_ST_ATIM 1
4494 else
4495 cat >> confdefs.h <<\EOF
4496 #define _PR_STAT_HAS_ST_ATIM_UNION 1
4501 if test -z "$GNU_CC"; then
4502 CFLAGS="$CFLAGS -Hnocopyr"
4503 CXXFLAGS="$CXXFLAGS -Hnocopyr"
4504 else
4505 CFLAGS="$CFLAGS -fPIC -Wall"
4506 CXXFLAGS="$CXXFLAGS -fPIC -Wall"
4507 DSO_LDOPTS=-G
4509 MDCPUCFG_H=_ncr.cfg
4510 PR_MD_CSRCS=ncr.c
4513 mips-nec-sysv*)
4514 cat >> confdefs.h <<\EOF
4515 #define XP_UNIX 1
4518 cat >> confdefs.h <<\EOF
4519 #define SVR4 1
4522 cat >> confdefs.h <<\EOF
4523 #define __SVR4 1
4526 cat >> confdefs.h <<\EOF
4527 #define NEC 1
4530 cat >> confdefs.h <<\EOF
4531 #define nec_ews 1
4534 USE_NSPR_THREADS=1
4535 if test -z "$GNU_CC"; then
4536 CC='$(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000'
4537 CXX=g++
4539 OS_LIBS="$OS_LIBS -lsocket -lnsl -ldl"
4540 DSO_LDOPTS=-G
4541 MDCPUCFG_H=_nec.cfg
4542 PR_MD_CSRCS=nec.c
4545 *-netbsd*)
4546 cat >> confdefs.h <<\EOF
4547 #define XP_UNIX 1
4550 cat >> confdefs.h <<\EOF
4551 #define NETBSD 1
4554 cat >> confdefs.h <<\EOF
4555 #define HAVE_BSD_FLOCK 1
4558 if test -z "$USE_NSPR_THREADS"; then
4559 USE_PTHREADS=1
4561 MDCPUCFG_H=_netbsd.cfg
4562 PR_MD_CSRCS=netbsd.c
4564 DSO_CFLAGS='-fPIC -DPIC'
4565 CFLAGS="$CFLAGS -ansi -Wall"
4566 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4567 MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
4569 if test -z "$OBJECT_FMT"; then
4570 if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2>/dev/null; then
4571 OBJECT_FMT=a.out
4572 DLL_SUFFIX=so.1.0
4573 DSO_LDOPTS='-shared'
4574 else
4575 OBJECT_FMT=ELF
4576 DLL_SUFFIX=so
4577 DSO_LDOPTS='-shared -Wl,-soname,$(notdir $@)'
4581 if test "$LIBRUNPATH"; then
4582 DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
4586 mips-sony-newsos*)
4587 cat >> confdefs.h <<\EOF
4588 #define XP_UNIX 1
4591 cat >> confdefs.h <<\EOF
4592 #define SONY 1
4595 cat >> confdefs.h <<\EOF
4596 #define SYSV 1
4599 cat >> confdefs.h <<\EOF
4600 #define SVR4 1
4603 cat >> confdefs.h <<\EOF
4604 #define __svr4 1
4607 cat >> confdefs.h <<\EOF
4608 #define __svr4__ 1
4611 cat >> confdefs.h <<\EOF
4612 #define HAVE_SVID_GETTOD 1
4615 USE_NSPR_THREADS=1
4616 CFLAGS="$CFLAGS -Xa -fullwarn"
4617 CXXFLAGS="$CXXFLAGS -Xa -fullwarn"
4618 DSO_LDOPTS=-G
4619 MDCPUCFG_H=_sony.cfg
4620 PR_MD_CSRCS=sony.c
4623 *-nextstep*|*-openstep*)
4624 cat >> confdefs.h <<\EOF
4625 #define XP_UNIX 1
4628 cat >> confdefs.h <<\EOF
4629 #define NEXTSTEP 1
4632 cat >> confdefs.h <<\EOF
4633 #define HAVE_BSD_FLOCK 1
4636 cat >> confdefs.h <<\EOF
4637 #define _POSIX_SOURCE 1
4640 CFLAGS="$CFLAGS -Wall -fno-common -traditional-cpp -posix"
4641 CXXFLAGS="$CXXFLAGS -Wall -fno-common -traditional-cpp -posix"
4642 USE_NSPR_THREADS=1
4643 DLL_SUFFIX=dylib
4644 MDCPUCFG_H=_nextstep.cfg
4645 PR_MD_CSRCS=nextstep.c
4649 *-nto*)
4650 cat >> confdefs.h <<\EOF
4651 #define XP_UNIX 1
4654 cat >> confdefs.h <<\EOF
4655 #define NTO 1
4658 cat >> confdefs.h <<\EOF
4659 #define _QNX_SOURCE 1
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_POINTER_LOCALTIME_R 1
4666 MDCPUCFG_H=_nto.cfg
4667 PR_MD_CSRCS=nto.c
4668 MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
4669 DSO_CFLAGS=-fPIC
4670 DSO_LDOPTS=-shared
4671 OS_LIBS="$OS_LIBS -lsocket"
4672 _OPTIMIZE_FLAGS="-O1"
4673 _DEBUG_FLAGS="-gstabs"
4676 *-openbsd*)
4677 cat >> confdefs.h <<\EOF
4678 #define XP_UNIX 1
4681 cat >> confdefs.h <<\EOF
4682 #define OPENBSD 1
4685 cat >> confdefs.h <<\EOF
4686 #define HAVE_BSD_FLOCK 1
4689 cat >> confdefs.h <<\EOF
4690 #define HAVE_SOCKLEN_T 1
4693 CFLAGS="$CFLAGS -ansi -Wall"
4694 CXXFLAGS="$CXXFLAGS -ansi -Wall"
4695 DLL_SUFFIX=so.1.0
4696 DSO_CFLAGS=-fPIC
4697 MDCPUCFG_H=_openbsd.cfg
4698 PR_MD_CSRCS=openbsd.c
4699 OS_LIBS="-lc"
4700 if test -z "$USE_NSPR_THREADS"; then
4701 USE_PTHREADS=1
4703 DSO_LDOPTS='-shared -fPIC'
4704 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4707 *-osf*)
4708 SHELL_OVERRIDE="SHELL = /usr/bin/ksh"
4709 cat >> confdefs.h <<\EOF
4710 #define XP_UNIX 1
4713 cat >> confdefs.h <<\EOF
4714 #define OSF1 1
4717 cat >> confdefs.h <<\EOF
4718 #define _REENTRANT 1
4721 # OSF1 and HPUX report the POLLHUP event for a socket when the
4722 # shutdown(SHUT_WR) operation is called for the remote end, even though
4723 # the socket is still writeable. Use select(), instead of poll(), to
4724 # workaround this problem.
4725 cat >> confdefs.h <<\EOF
4726 #define _PR_POLL_WITH_SELECT 1
4730 if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
4731 USE_NSPR_THREADS=1
4734 if test -z "$GNU_CC"; then
4735 CC="$CC -std1 -ieee_with_inexact"
4736 if test "$OS_RELEASE" != "V2.0"; then
4737 CC="$CC -readonly_strings"
4739 _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
4740 ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
4741 echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
4742 echo "configure:4743: checking for machine/builtins.h" >&5
4743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746 cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749 #include <machine/builtins.h>
4751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4752 { (eval echo configure:4753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4754 if test -z "$ac_err"; then
4755 rm -rf conftest*
4756 eval "ac_cv_header_$ac_safe=yes"
4757 else
4758 echo "$ac_err" >&5
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 rm -rf conftest*
4762 eval "ac_cv_header_$ac_safe=no"
4764 rm -f conftest*
4766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6
4768 cat >> confdefs.h <<\EOF
4769 #define OSF1_HAVE_MACHINE_BUILTINS_H 1
4772 else
4773 echo "$ac_t""no" 1>&6
4776 else
4777 CFLAGS="$CFLAGS -mieee"
4778 CXXFLAGS="$CXXFLAGS -mieee"
4781 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
4782 cat >> confdefs.h <<\EOF
4783 #define HAVE_INT_LOCALTIME_R 1
4786 else
4787 cat >> confdefs.h <<\EOF
4788 #define HAVE_FCNTL_FILE_LOCKING 1
4791 cat >> confdefs.h <<\EOF
4792 #define HAVE_POINTER_LOCALTIME_R 1
4796 if echo $OS_RELEASE | grep -c V4.0 >/dev/null; then
4797 cat >> confdefs.h <<\EOF
4798 #define OSF1V4_MAP_PRIVATE_BUG 1
4802 DSO_LDOPTS='-shared -all -expect_unresolved "*" -soname $(notdir $@)'
4803 MDCPUCFG_H=_osf1.cfg
4804 PR_MD_CSRCS=osf1.c
4807 *-qnx*)
4808 cat >> confdefs.h <<\EOF
4809 #define XP_UNIX 1
4812 cat >> confdefs.h <<\EOF
4813 #define QNX 1
4816 cat >> confdefs.h <<\EOF
4817 #define _PR_NEED_H_ERRNO 1
4820 USE_NSPR_THREADS=1
4821 MDCPUCFG_H=_qnx.cfg
4822 PR_MD_CSRCS=qnx.c
4825 *-riscos*)
4826 cat >> confdefs.h <<\EOF
4827 #define XP_UNIX 1
4830 cat >> confdefs.h <<\EOF
4831 #define RISCOS 1
4834 cat >> confdefs.h <<\EOF
4835 #define _PR_NEED_H_ERRNO 1
4838 USE_PTHREADS=1
4839 MDCPUCFG_H=_riscos.cfg
4840 PR_MD_CSRCS=riscos.c
4841 DSO_CFLAGS=-fPIC
4842 DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
4843 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
4846 *-*-sco*)
4847 cat >> confdefs.h <<\EOF
4848 #define XP_UNIX 1
4851 cat >> confdefs.h <<\EOF
4852 #define SCO 1
4855 cat >> confdefs.h <<\EOF
4856 #define sco 1
4859 cat >> confdefs.h <<\EOF
4860 #define SYSV 1
4863 cat >> confdefs.h <<\EOF
4864 #define _SVID3 1
4867 cat >> confdefs.h <<\EOF
4868 #define _PR_NEED_H_ERRNO 1
4871 CC='cc -b elf -KPIC'
4872 CXX='$(NSDEPTH)/build/hcpp CC +.cpp +w'
4873 USE_NSPR_THREADS=1
4874 CPU_ARCH=x86
4875 DSO_LDOPTS='-b elf -G'
4876 MDCPUCFG_H=_scoos.cfg
4877 PR_MD_SRCS=scoos.c
4880 *-sinix*)
4881 cat >> confdefs.h <<\EOF
4882 #define XP_UNIX 1
4885 cat >> confdefs.h <<\EOF
4886 #define SVR4 1
4889 cat >> confdefs.h <<\EOF
4890 #define SNI 1
4893 cat >> confdefs.h <<\EOF
4894 #define RELIANTUNIX 1
4897 cat >> confdefs.h <<\EOF
4898 #define sinix 1
4901 cat >> confdefs.h <<\EOF
4902 #define HAVE_SVID_GETTOD 1
4905 if echo "$OS_TEST" | grep -c 86 2>/dev/null; then
4906 cat >> confdefs.h <<\EOF
4907 #define i386 1
4910 CPU_ARCH=x86
4911 else
4912 CPU_ARCH=mips
4915 if test "$GNU_CC"; then
4916 AS='$(CC) -x assembler-with-cpp'
4917 if test "$CPU_ARCH" = "mips"; then
4918 LD=gld
4920 CFLAGS="$CFLAGS -Wall -Wno-format"
4921 else
4922 AS='/usr/bin/cc'
4923 _OPTIMIZE_FLAGS='-O -F Olimit,4000'
4926 DSO_LDOPTS='-G -z defs -h $(@:$(OBJDIR)/%.so=%.so)'
4928 if test "$OS_RELEASE" = "5.43"; then
4929 cat >> confdefs.h <<\EOF
4930 #define IP_MULTICAST 1
4935 OS_LIBS="$OS_LIBS -lsocket -lnsl -lresolv -ldl -lc"
4936 USE_NSPR_THREADS=1
4937 MDCPUCFG_H=_reliantunix.cfg
4938 PR_MD_CSRCS=reliantunix.c
4939 if test "${OS_ARCH}" = "mips"; then
4940 PR_MD_ASFILES=os_ReliantUNIX.s
4944 *-sunos*)
4945 cat >> confdefs.h <<\EOF
4946 #define XP_UNIX 1
4949 cat >> confdefs.h <<\EOF
4950 #define SUNOS4 1
4953 CFLAGS="$CFLAGS -Wall -Wno-format"
4954 if test "$USE_MDUPDATE"; then
4955 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
4957 CPU_ARCH=sparc
4958 DLL_SUFFIX=so.1.0
4959 DSO_LDOPTS=
4960 DSO_CFLAGS=-fPIC
4961 USE_NSPR_THREADS=1
4962 if test "$OS_RELEASE" = "4.1.3_U1"; then
4963 _OPTIMIZE_FLAGS=
4964 OS_LIBS="$OS_LIBS -lm"
4966 MDCPUCFG_H=_sunos4.cfg
4967 PR_MD_CSRCS=sunos4.c
4970 *-solaris*)
4971 if test -z "$USE_NSPR_THREADS"; then
4972 USE_PTHREADS=1
4974 cat >> confdefs.h <<\EOF
4975 #define XP_UNIX 1
4978 cat >> confdefs.h <<\EOF
4979 #define SVR4 1
4982 cat >> confdefs.h <<\EOF
4983 #define SYSV 1
4986 cat >> confdefs.h <<\EOF
4987 #define __svr4 1
4990 cat >> confdefs.h <<\EOF
4991 #define __svr4__ 1
4994 cat >> confdefs.h <<\EOF
4995 #define SOLARIS 1
4998 cat >> confdefs.h <<\EOF
4999 #define HAVE_FCNTL_FILE_LOCKING 1
5002 CPU_ARCH=`uname -p`
5003 MDCPUCFG_H=_solaris.cfg
5004 PR_MD_CSRCS=solaris.c
5005 LD=/usr/ccs/bin/ld
5006 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5007 RESOLVE_LINK_SYMBOLS=1
5008 case "${OS_RELEASE}" in
5009 5.8|5.9)
5012 # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
5013 USE_B_DIRECT=1
5015 esac
5016 if test -n "$GNU_CC"; then
5017 DSO_CFLAGS=-fPIC
5018 if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
5019 GCC_USE_GNU_LD=1
5021 DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
5022 if test -n "$USE_B_DIRECT"; then
5023 DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
5025 else
5026 DSO_CFLAGS=-KPIC
5027 DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
5028 if test -n "$USE_B_DIRECT"; then
5029 DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
5032 if test -n "$GNU_CC"; then
5033 CFLAGS="$CFLAGS -Wall"
5034 CXXFLAGS="$CXXFLAGS -Wall"
5035 if test -n "$USE_MDUPDATE"; then
5036 CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
5037 CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
5039 GCC_AS=`$CC -print-prog-name=as`
5040 if test "`echo | $GCC_AS -v 2>&1 | grep -c GNU`" != "0"; then
5041 GNU_AS=1
5043 else
5044 CFLAGS="$CFLAGS -xstrconst"
5045 CXXFLAGS="$CXXFLAGS -Qoption cg -xstrconst -features=tmplife"
5046 if test -z "$MOZ_OPTIMIZE"; then
5047 CFLAGS="$CFLAGS -xs"
5048 CXXFLAGS="$CXXFLAGS -xs"
5050 _OPTIMIZE_FLAGS=-xO4
5052 if test -z "$GNU_AS"; then
5053 ASFLAGS="$ASFLAGS -Wa,-P"
5055 if test -n "$USE_64"; then
5056 if test -n "$GNU_CC"; then
5057 CC="$CC -m64"
5058 CXX="$CXX -m64"
5059 else
5060 if test "$OS_TEST" = "i86pc"; then
5061 CC="$CC -xarch=amd64"
5062 CXX="$CXX -xarch=amd64"
5063 else
5064 CC="$CC -xarch=v9"
5065 CXX="$CXX -xarch=v9"
5069 if test "$OS_TEST" = "i86pc"; then
5070 if test -z "$USE_64"; then
5071 cat >> confdefs.h <<\EOF
5072 #define i386 1
5076 CPU_ARCH_TAG=_$OS_TEST
5077 # The default debug format, DWARF (-g), is not supported by gcc
5078 # on i386-ANY-sysv4/solaris, but the stabs format is. It is
5079 # assumed that the Solaris assembler /usr/ccs/bin/as is used.
5080 # If your gcc uses GNU as, you do not need the -Wa,-s option.
5081 if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
5082 _DEBUG_FLAGS=-gstabs
5083 if test -z "$GNU_AS"; then
5084 _DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
5088 case "${target_os}" in
5089 solaris2.3*)
5090 cat >> confdefs.h <<\EOF
5091 #define _PR_NO_LARGE_FILES 1
5095 solaris2.4*)
5096 cat >> confdefs.h <<\EOF
5097 #define _PR_NO_LARGE_FILES 1
5101 solaris2.5*)
5102 cat >> confdefs.h <<\EOF
5103 #define SOLARIS2_5 1
5108 cat >> confdefs.h <<\EOF
5109 #define _PR_HAVE_OFF64_T 1
5112 # The lfcompile64(5) man page on Solaris 2.6 says:
5113 # For applications that do not wish to conform to the POSIX or
5114 # X/Open specifications, the 64-bit transitional interfaces
5115 # are available by default. No compile-time flags need to be
5116 # set.
5117 # But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
5118 # The native compiler, gcc 2.8.x, and egcs don't have this problem.
5119 if test -n "$GNU_CC"; then
5120 cat >> confdefs.h <<\EOF
5121 #define _LARGEFILE64_SOURCE 1
5126 esac
5127 case "${target_os}" in
5128 solaris2.3*)
5130 solaris2.4*)
5132 solaris2.5*)
5134 solaris2.6*)
5136 solaris2.7*)
5139 # Solaris 8 or higher has IPv6.
5140 cat >> confdefs.h <<\EOF
5141 #define _PR_INET6 1
5145 esac
5146 if test "$CPU_ARCH" = "sparc"; then
5147 # 64-bit Solaris SPARC requires V9 architecture, so the following
5148 # is not needed.
5149 if test -z "$USE_64"; then
5150 ULTRASPARC_LIBRARY=nspr_flt
5153 # Purify requires that binaries linked against nspr also
5154 # be linked against -lrt (or -lposix4) so add it to OS_LIBS
5155 _rev=`uname -r`
5156 _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
5157 OS_LIBS="$OS_LIBS $_librt"
5160 *-sco-sysv5*)
5161 cat >> confdefs.h <<\EOF
5162 #define XP_UNIX 1
5165 cat >> confdefs.h <<\EOF
5166 #define UNIXWARE 1
5169 cat >> confdefs.h <<\EOF
5170 #define SVR4 1
5173 cat >> confdefs.h <<\EOF
5174 #define SYSV 1
5177 USE_NSPR_THREADS=1
5178 if echo $OS_RELEASE | grep -c 2.1 2>/dev/null; then
5179 cat >> confdefs.h <<\EOF
5180 #define _PR_NO_LARGE_FILES 1
5183 CC='$(NSDEPTH)/build/hcc cc'
5184 CXX='$(NSDEPTH)/build/hcpp CC'
5185 MDCPUCFG_H=_unixware.cfg
5186 else
5187 cat >> confdefs.h <<\EOF
5188 #define _LARGEFILE64_SOURCE 1
5191 cat >> confdefs.h <<\EOF
5192 #define _PR_HAVE_OFF64_T 1
5195 cat >> confdefs.h <<\EOF
5196 #define _PR_HAVE_SOCKADDR_LEN 1
5199 MDCPUCFG_H=_unixware7.cfg
5201 PR_MD_CSRCS=unixware.c
5202 DSO_LDOPTS=-G
5203 CPU_ARCH=x86
5206 *-symbian*)
5207 # Check whether --with-symbian-sdk or --without-symbian-sdk was given.
5208 if test "${with_symbian_sdk+set}" = set; then
5209 withval="$with_symbian_sdk"
5210 SYMBIAN_SDK_DIR=$withval
5214 echo -----------------------------------------------------------------------------
5215 echo Building with Symbian SDK in: $SYMBIAN_SDK_DIR
5216 echo -----------------------------------------------------------------------------
5218 cat >> confdefs.h <<\EOF
5219 #define XP_UNIX 1
5222 cat >> confdefs.h <<\EOF
5223 #define SYMBIAN 1
5226 cat >> confdefs.h <<\EOF
5227 #define __arm__ 1
5230 cat >> confdefs.h <<\EOF
5231 #define __SYMBIAN32__ 1
5234 cat >> confdefs.h <<\EOF
5235 #define _UNICODE 1
5238 cat >> confdefs.h <<\EOF
5239 #define NDEBUG 1
5242 cat >> confdefs.h <<\EOF
5243 #define __SUPPORT_CPP_EXCEPTIONS__ 1
5246 cat >> confdefs.h <<\EOF
5247 #define MOZ_STDERR_TO_STDOUT 1
5250 cat >> confdefs.h <<\EOF
5251 #define HAVE_FCNTL_FILE_LOCKING 1
5254 cat >> confdefs.h <<\EOF
5255 #define HAVE_SOCKLEN_T 1
5258 USE_PTHREADS=1
5259 LIB_SUFFIX=lib
5260 DLL_SUFFIX=dll
5261 MKSHLIB=
5262 DSO_LDOPTS=
5263 DSO_CFLAGS=
5264 VISIBILITY_FLAGS=
5265 MDCPUCFG_H=_symbian.cfg
5266 PR_MD_CSRCS=symbian.c
5267 NSINSTALL=nsinstall
5268 RANLIB='echo no ranlib '
5269 CPU_ARCH=ARM
5270 OS_ARCH=SYMBIAN
5271 OS_EXE_CFLAGS="$OS_EXE_CFLAGS -D__EXE__"
5272 CFLAGS="$CFLAGS -MD -nostdinc"
5273 SYMBIAN_SYS_INCLUDE="-I$SYMBIAN_SDK_DIR/Epoc32/include/variant -I$SYMBIAN_SDK_DIR/Epoc32/include -I$SYMBIAN_SDK_DIR/Epoc32/include/stdapis"
5274 echo -------------------------------------------------------
5275 echo SYMBIAN_SYS_INCLUDE is: $SYMBIAN_SYS_INCLUDE
5276 echo -------------------------------------------------------
5277 case "$OS_TARGET" in
5278 WINSCW)
5279 CC=mwccsym2.exe
5280 CXX=mwccsym2.exe
5281 LD=mwldsym2.exe
5282 AR=mwldsym2.exe
5283 WINSCW_LD_DIR="\$(SYMBIAN_SDK_DIR)/EPOC32/RELEASE/WINSCW/UDEB"
5284 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)"
5285 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include Symbian_OS_v9.2.hrh"
5286 AR_FLAGS="-library -msgstyle gcc -stdlib -subsystem windows -noimplib -o \$@"
5287 cat >> confdefs.h <<\EOF
5288 #define _DEBUG 1
5291 cat >> confdefs.h <<\EOF
5292 #define __CW32__ 1
5295 cat >> confdefs.h <<\EOF
5296 #define __WINS__ 1
5299 cat >> confdefs.h <<\EOF
5300 #define __WINSCW__ 1
5303 DEFINES="$DEFINES -U_WIN32"
5305 GCCE)
5306 CFLAGS="$CFLAGS -Wall -Wno-unknown-pragmas -fexceptions -march=armv5t -mapcs -pipe -x c -msoft-float"
5307 CXXFLAGS="$CXXFLAGS $CFLAGS -Wno-ctor-dtor-privacy"
5308 SYMBIAN_SYS_INCLUDE="$SYMBIAN_SYS_INCLUDE -include $SYMBIAN_SDK_DIR/EPOC32/INCLUDE/GCCE/GCCE.h"
5309 cat >> confdefs.h <<\EOF
5310 #define __GCCE__ 1
5313 cat >> confdefs.h <<\EOF
5314 #define __EABI__ 1
5317 DEFINES="$DEFINES -D__PRODUCT_INCLUDE__=$SYMBIAN_SDK_DIR/Epoc32/include/variant/Symbian_OS_v9.2.hrh"
5320 { echo "configure: error: Missing OS_TARGET for ${target}. Set --enable-symbian-target to with 'WINSCW' or 'GCCE'." 1>&2; exit 1; }
5322 esac
5323 CFLAGS="$CFLAGS ${SYMBIAN_SYS_INCLUDE}"
5326 *-os2*)
5327 cat >> confdefs.h <<\EOF
5328 #define XP_OS2 1
5331 cat >> confdefs.h <<\EOF
5332 #define XP_PC 1
5335 cat >> confdefs.h <<\EOF
5336 #define BSD_SELECT 1
5339 cat >> confdefs.h <<\EOF
5340 #define TCPV40HDRS 1
5343 LIB_SUFFIX=lib
5344 DLL_SUFFIX=dll
5345 RC=rc.exe
5346 PR_MD_ARCH_DIR=os2
5347 PROG_SUFFIX=.exe
5348 NSINSTALL=nsinstall
5349 MDCPUCFG_H=_os2.cfg
5350 RESOLVE_LINK_SYMBOLS=1
5352 cat >> confdefs.h <<\EOF
5353 #define OS2 1
5356 AR=emxomfar
5357 AR_FLAGS='r $@'
5358 CFLAGS="$CFLAGS -Wall -Zomf"
5359 CXXFLAGS="$CFLAGS -Wall -Zomf"
5360 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
5361 DSO_CFLAGS=
5362 DSO_LDOPTS='-Zomf -Zdll'
5363 LDFLAGS='-Zmap'
5364 _OPTIMIZE_FLAGS="-O2 -s"
5365 _DEBUG_FLAGS="-g -fno-inline"
5366 if test -n "$MOZ_OPTIMIZE"; then
5367 DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
5369 IMPLIB='emximp -o'
5370 FILTER='emxexp -o'
5371 if test -n "$MOZ_OS2_HIGH_MEMORY"; then
5372 LDFLAGS="$LDFLAGS -Zhigh-mem"
5373 cat >> confdefs.h <<\EOF
5374 #define MOZ_OS2_HIGH_MEMORY 1
5379 # GCC for OS/2 currently predefines these, but we don't want them
5380 DEFINES="$DEFINES -Uunix -U__unix -U__unix__"
5384 cat >> confdefs.h <<\EOF
5385 #define XP_UNIX 1
5390 esac
5392 if test -z "$SKIP_LIBRARY_CHECKS"; then
5396 case $target in
5397 *-darwin*|*-beos*|*-os2*)
5400 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5401 echo "configure:5402: checking for dlopen in -ldl" >&5
5402 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5404 echo $ac_n "(cached) $ac_c" 1>&6
5405 else
5406 ac_save_LIBS="$LIBS"
5407 LIBS="-ldl $LIBS"
5408 cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411 /* Override any gcc2 internal prototype to avoid an error. */
5412 /* We use char because int might match the return type of a gcc2
5413 builtin and then its argument prototype would still apply. */
5414 char dlopen();
5416 int main() {
5417 dlopen()
5418 ; return 0; }
5420 if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5421 rm -rf conftest*
5422 eval "ac_cv_lib_$ac_lib_var=yes"
5423 else
5424 echo "configure: failed program was:" >&5
5425 cat conftest.$ac_ext >&5
5426 rm -rf conftest*
5427 eval "ac_cv_lib_$ac_lib_var=no"
5429 rm -f conftest*
5430 LIBS="$ac_save_LIBS"
5433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5434 echo "$ac_t""yes" 1>&6
5435 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
5436 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
5437 echo "configure:5438: checking for dlfcn.h" >&5
5438 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5439 echo $ac_n "(cached) $ac_c" 1>&6
5440 else
5441 cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 #include <dlfcn.h>
5446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5447 { (eval echo configure:5448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5449 if test -z "$ac_err"; then
5450 rm -rf conftest*
5451 eval "ac_cv_header_$ac_safe=yes"
5452 else
5453 echo "$ac_err" >&5
5454 echo "configure: failed program was:" >&5
5455 cat conftest.$ac_ext >&5
5456 rm -rf conftest*
5457 eval "ac_cv_header_$ac_safe=no"
5459 rm -f conftest*
5461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5462 echo "$ac_t""yes" 1>&6
5463 OS_LIBS="-ldl $OS_LIBS"
5464 else
5465 echo "$ac_t""no" 1>&6
5468 else
5469 echo "$ac_t""no" 1>&6
5473 esac
5478 if test $ac_cv_prog_gcc = yes; then
5479 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
5480 echo "configure:5481: checking whether ${CC-cc} needs -traditional" >&5
5481 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
5482 echo $ac_n "(cached) $ac_c" 1>&6
5483 else
5484 ac_pattern="Autoconf.*'x'"
5485 cat > conftest.$ac_ext <<EOF
5486 #line 5487 "configure"
5487 #include "confdefs.h"
5488 #include <sgtty.h>
5489 Autoconf TIOCGETP
5491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5492 egrep "$ac_pattern" >/dev/null 2>&1; then
5493 rm -rf conftest*
5494 ac_cv_prog_gcc_traditional=yes
5495 else
5496 rm -rf conftest*
5497 ac_cv_prog_gcc_traditional=no
5499 rm -f conftest*
5502 if test $ac_cv_prog_gcc_traditional = no; then
5503 cat > conftest.$ac_ext <<EOF
5504 #line 5505 "configure"
5505 #include "confdefs.h"
5506 #include <termio.h>
5507 Autoconf TCGETA
5509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5510 egrep "$ac_pattern" >/dev/null 2>&1; then
5511 rm -rf conftest*
5512 ac_cv_prog_gcc_traditional=yes
5514 rm -f conftest*
5519 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
5520 if test $ac_cv_prog_gcc_traditional = yes; then
5521 CC="$CC -traditional"
5525 for ac_func in lchown strerror
5527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5528 echo "configure:5529: checking for $ac_func" >&5
5529 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5530 echo $ac_n "(cached) $ac_c" 1>&6
5531 else
5532 cat > conftest.$ac_ext <<EOF
5533 #line 5534 "configure"
5534 #include "confdefs.h"
5535 /* System header to define __stub macros and hopefully few prototypes,
5536 which can conflict with char $ac_func(); below. */
5537 #include <assert.h>
5538 /* Override any gcc2 internal prototype to avoid an error. */
5539 /* We use char because int might match the return type of a gcc2
5540 builtin and then its argument prototype would still apply. */
5541 char $ac_func();
5543 int main() {
5545 /* The GNU C library defines this for functions which it implements
5546 to always fail with ENOSYS. Some functions are actually named
5547 something starting with __ and the normal name is an alias. */
5548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5549 choke me
5550 #else
5551 $ac_func();
5552 #endif
5554 ; return 0; }
5556 if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5557 rm -rf conftest*
5558 eval "ac_cv_func_$ac_func=yes"
5559 else
5560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5562 rm -rf conftest*
5563 eval "ac_cv_func_$ac_func=no"
5565 rm -f conftest*
5568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5569 echo "$ac_t""yes" 1>&6
5570 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5571 cat >> confdefs.h <<EOF
5572 #define $ac_tr_func 1
5575 else
5576 echo "$ac_t""no" 1>&6
5578 done
5583 # Check whether --with-ccache or --without-ccache was given.
5584 if test "${with_ccache+set}" = set; then
5585 withval="$with_ccache"
5586 CCACHE=$withval
5587 else
5588 CCACHE="no"
5592 if test "$CCACHE" != "no"; then
5593 if test -n "$CCACHE"; then
5594 if test "$CCACHE" = "yes"; then
5595 CCACHE=
5596 else
5597 if test ! -e "$CCACHE"; then
5598 { echo "configure: error: $CCACHE not found" 1>&2; exit 1; }
5602 for ac_prog in $CCACHE ccache
5604 # Extract the first word of "$ac_prog", so it can be a program name with args.
5605 set dummy $ac_prog; ac_word=$2
5606 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5607 echo "configure:5608: checking for $ac_word" >&5
5608 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
5609 echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611 case "$CCACHE" in
5613 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
5615 ?:/*)
5616 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a dos path.
5619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5620 ac_dummy="$PATH"
5621 for ac_dir in $ac_dummy; do
5622 test -z "$ac_dir" && ac_dir=.
5623 if test -f $ac_dir/$ac_word; then
5624 ac_cv_path_CCACHE="$ac_dir/$ac_word"
5625 break
5627 done
5628 IFS="$ac_save_ifs"
5630 esac
5632 CCACHE="$ac_cv_path_CCACHE"
5633 if test -n "$CCACHE"; then
5634 echo "$ac_t""$CCACHE" 1>&6
5635 else
5636 echo "$ac_t""no" 1>&6
5639 test -n "$CCACHE" && break
5640 done
5642 if test -z "$CCACHE" -o "$CCACHE" = ":"; then
5643 { echo "configure: error: ccache not found" 1>&2; exit 1; }
5644 elif test -x "$CCACHE"; then
5645 CC="$CCACHE $CC"
5646 CXX="$CCACHE $CXX"
5647 else
5648 { echo "configure: error: $CCACHE is not executable" 1>&2; exit 1; }
5652 # Check whether --enable-strip or --disable-strip was given.
5653 if test "${enable_strip+set}" = set; then
5654 enableval="$enable_strip"
5655 if test "$enableval" = "yes"; then
5656 ENABLE_STRIP=1
5661 case "${target_os}" in
5662 hpux*)
5663 if test -z "$GNU_CC"; then
5665 echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
5666 echo "configure:5667: checking for +Olit support" >&5
5667 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
5668 echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670 ac_cv_hpux_usable_olit_option=no
5671 rm -f conftest*
5672 echo 'int main() { return 0; }' | cat > conftest.c
5673 ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
5674 if test $? -eq 0; then
5675 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then
5676 ac_cv_hpux_usable_olit_option=yes
5679 rm -f conftest*
5683 echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6
5685 if test "$ac_cv_hpux_usable_olit_option" = "yes"; then
5686 CFLAGS="$CFLAGS +Olit=all"
5687 CXXFLAGS="$CXXFLAGS +Olit=all"
5688 else
5689 CFLAGS="$CFLAGS +ESlit"
5690 CXXFLAGS="$CXXFLAGS +ESlit"
5694 esac
5698 case "$target_os" in
5699 darwin*)
5700 _HAVE_PTHREADS=1
5702 wince*)
5703 _HAVE_PTHREADS=
5707 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
5708 echo "configure:5709: checking for pthread_create in -lpthreads" >&5
5709 echo "
5710 #include <pthread.h>
5711 void *foo(void *v) { return v; }
5712 int main() {
5713 pthread_t t;
5714 if (!pthread_create(&t, 0, &foo, 0)) {
5715 pthread_join(t, 0);
5717 return 0;
5718 }" > dummy.c ;
5719 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
5720 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
5721 _res=$? ;
5722 rm -f dummy.c dummy${ac_exeext} ;
5723 if test "$_res" = "0"; then
5724 echo "$ac_t""yes" 1>&6
5725 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
5726 else
5727 echo "$ac_t""no" 1>&6
5729 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
5730 echo "configure:5731: checking for pthread_create in -lpthread" >&5
5731 echo "
5732 #include <pthread.h>
5733 void *foo(void *v) { return v; }
5734 int main() {
5735 pthread_t t;
5736 if (!pthread_create(&t, 0, &foo, 0)) {
5737 pthread_join(t, 0);
5739 return 0;
5740 }" > dummy.c ;
5741 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
5742 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
5743 _res=$? ;
5744 rm -f dummy.c dummy${ac_exeext} ;
5745 if test "$_res" = "0"; then
5746 echo "$ac_t""yes" 1>&6
5747 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
5748 else
5749 echo "$ac_t""no" 1>&6
5751 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
5752 echo "configure:5753: checking for pthread_create in -lc_r" >&5
5753 echo "
5754 #include <pthread.h>
5755 void *foo(void *v) { return v; }
5756 int main() {
5757 pthread_t t;
5758 if (!pthread_create(&t, 0, &foo, 0)) {
5759 pthread_join(t, 0);
5761 return 0;
5762 }" > dummy.c ;
5763 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
5764 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
5765 _res=$? ;
5766 rm -f dummy.c dummy${ac_exeext} ;
5767 if test "$_res" = "0"; then
5768 echo "$ac_t""yes" 1>&6
5769 _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
5770 else
5771 echo "$ac_t""no" 1>&6
5773 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
5774 echo "configure:5775: checking for pthread_create in -lc" >&5
5775 echo "
5776 #include <pthread.h>
5777 void *foo(void *v) { return v; }
5778 int main() {
5779 pthread_t t;
5780 if (!pthread_create(&t, 0, &foo, 0)) {
5781 pthread_join(t, 0);
5783 return 0;
5784 }" > dummy.c ;
5785 echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
5786 ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
5787 _res=$? ;
5788 rm -f dummy.c dummy${ac_exeext} ;
5789 if test "$_res" = "0"; then
5790 echo "$ac_t""yes" 1>&6
5791 _HAVE_PTHREADS=1
5793 else
5794 echo "$ac_t""no" 1>&6
5808 esac
5810 # Check whether --with-pthreads or --without-pthreads was given.
5811 if test "${with_pthreads+set}" = set; then
5812 withval="$with_pthreads"
5813 if test "$withval" = "yes"; then
5814 if test -n "$_HAVE_PTHREADS"; then
5815 USE_PTHREADS=1
5816 USE_USER_PTHREADS=
5817 USE_NSPR_THREADS=
5818 else
5819 { echo "configure: error: --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5821 else
5822 USE_PTHREADS=
5823 _PTHREAD_LDFLAGS=
5825 else
5826 if test -n "$_HAVE_PTHREADS" && test -z "$USE_USER_PTHREADS" && test -z "$USE_NSPR_THREADS"; then
5827 USE_PTHREADS=1
5828 USE_USER_PTHREADS=
5829 USE_NSPR_THREADS=
5834 # Check whether --enable-user-pthreads or --disable-user-pthreads was given.
5835 if test "${enable_user_pthreads+set}" = set; then
5836 enableval="$enable_user_pthreads"
5837 if test "$enableval" = "yes"; then
5838 if test -n "$_HAVE_PTHREADS"; then
5839 USE_PTHREADS=
5840 USE_USER_PTHREADS=1
5841 USE_NSPR_THREADS=
5842 else
5843 { echo "configure: error: --enable-user-pthreads specified for a system without pthread support " 1>&2; exit 1; };
5849 # Check whether --enable-nspr-threads or --disable-nspr-threads was given.
5850 if test "${enable_nspr_threads+set}" = set; then
5851 enableval="$enable_nspr_threads"
5852 if test "$enableval" = "yes"; then
5853 USE_PTHREADS=
5854 USE_USER_PTHREADS=
5855 USE_NSPR_THREADS=1
5860 case "$target" in
5861 *-beos*)
5862 # Check whether --with-bthreads or --without-bthreads was given.
5863 if test "${with_bthreads+set}" = set; then
5864 withval="$with_bthreads"
5865 if test "$withval" = "yes"; then
5866 USE_BTHREADS=1
5867 USE_USER_PTHREADS=
5868 USE_PTHREADS=
5873 esac
5875 fi # SKIP_LIBRARY_CHECKS
5877 # Check whether --enable-ipv6 or --disable-ipv6 was given.
5878 if test "${enable_ipv6+set}" = set; then
5879 enableval="$enable_ipv6"
5880 if test "$enableval" = "yes"; then
5881 USE_IPV6=1
5882 else
5883 USE_IPV6=
5888 if test -n "$USE_PTHREADS"; then
5889 rm -f conftest*
5890 ac_cv_have_dash_pthread=no
5891 echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
5892 echo "configure:5893: checking whether ${CC-cc} accepts -pthread" >&5
5893 echo 'int main() { return 0; }' | cat > conftest.c
5894 ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
5895 if test $? -eq 0; then
5896 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5897 ac_cv_have_dash_pthread=yes
5898 case "$target_os" in
5899 freebsd*)
5900 # Freebsd doesn't use -pthread for compiles, it uses them for linking
5903 CFLAGS="$CFLAGS -pthread"
5904 CXXFLAGS="$CXXFLAGS -pthread"
5906 esac
5909 rm -f conftest*
5910 echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
5912 ac_cv_have_dash_pthreads=no
5913 if test "$ac_cv_have_dash_pthread" = "no"; then
5914 echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
5915 echo "configure:5916: checking whether ${CC-cc} accepts -pthreads" >&5
5916 echo 'int main() { return 0; }' | cat > conftest.c
5917 ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
5918 if test $? -eq 0; then
5919 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
5920 ac_cv_have_dash_pthreads=yes
5921 CFLAGS="$CFLAGS -pthreads"
5922 CXXFLAGS="$CXXFLAGS -pthreads"
5925 rm -f conftest*
5926 echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
5929 case "$target" in
5930 *-solaris*)
5931 if test "$ac_cv_have_dash_pthreads" = "yes"; then
5932 _PTHREAD_LDFLAGS=
5935 *-freebsd*)
5936 cat >> confdefs.h <<\EOF
5937 #define _REENTRANT 1
5940 cat >> confdefs.h <<\EOF
5941 #define _THREAD_SAFE 1
5944 if test "$ac_cv_have_dash_pthread" = "yes"; then
5945 _PTHREAD_LDFLAGS="-pthread"
5946 else
5947 _PTHREAD_LDFLAGS="-lc_r"
5950 *-netbsd*)
5951 if test "$ac_cv_have_dash_pthread" = "yes"; then
5952 _PTHREAD_LDFLAGS="-pthread"
5955 *-bsdi*)
5956 cat >> confdefs.h <<\EOF
5957 #define _THREAD_SAFE 1
5960 if test "$ac_cv_have_dash_pthread" = "yes"; then
5961 _PTHREAD_LDFLAGS=
5964 *-openbsd*)
5965 if test "$ac_cv_have_dash_pthread" = "yes"; then
5966 _PTHREAD_LDFLAGS=-pthread
5969 *-linux*|*-gnu*|*-k*bsd*-gnu)
5970 cat >> confdefs.h <<\EOF
5971 #define _REENTRANT 1
5975 esac
5977 else
5978 if test -n "$USE_USER_PTHREADS"; then
5979 USE_PTHREADS=
5980 USE_NSPR_THREADS=
5981 else
5982 _PTHREAD_LDFLAGS=
5986 case "$target" in
5987 *-aix*)
5988 if test -n "$USE_NSPR_THREADS"; then
5989 cat >> confdefs.h <<\EOF
5990 #define _PR_LOCAL_THREADS_ONLY 1
5994 case "$target_os" in
5995 aix4.1*)
5996 if test -z "$USE_PTHREADS"; then
5997 cat >> confdefs.h <<\EOF
5998 #define AIX_RENAME_SELECT 1
6003 aix4.2*)
6004 if test -z "$USE_NSPR_THREADS"; then
6005 cat >> confdefs.h <<\EOF
6006 #define HAVE_POINTER_LOCALTIME_R 1
6011 aix4.3*)
6012 if test -z "$USE_NSPR_THREADS"; then
6013 cat >> confdefs.h <<\EOF
6014 #define HAVE_POINTER_LOCALTIME_R 1
6018 if test -n "$USE_PTHREADS"; then
6019 cat >> confdefs.h <<\EOF
6020 #define _PR_HAVE_THREADSAFE_GETHOST 1
6026 if test -z "$USE_NSPR_THREADS"; then
6027 cat >> confdefs.h <<\EOF
6028 #define HAVE_POINTER_LOCALTIME_R 1
6032 if test -n "$USE_PTHREADS"; then
6033 cat >> confdefs.h <<\EOF
6034 #define _PR_HAVE_THREADSAFE_GETHOST 1
6039 esac
6041 *-bsdi*)
6042 if test -n "$USE_PTHREADS"; then
6043 cat >> confdefs.h <<\EOF
6044 #define _PR_NEED_PTHREAD_INIT 1
6049 *-freebsd*)
6050 if test -n "$USE_NSPR_THREADS"; then
6051 cat >> confdefs.h <<\EOF
6052 #define _PR_LOCAL_THREADS_ONLY 1
6057 *-hpux*)
6058 if test -n "$USE_NSPR_THREADS"; then
6059 cat >> confdefs.h <<\EOF
6060 #define _PR_LOCAL_THREADS_ONLY 1
6064 if test "$USE_PTHREADS"; then
6065 if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
6066 cat >> confdefs.h <<\EOF
6067 #define _REENTRANT 1
6070 cat >> confdefs.h <<\EOF
6071 #define _PR_DCETHREADS 1
6074 else
6075 cat >> confdefs.h <<EOF
6076 #define _POSIX_C_SOURCE 199506L
6079 cat >> confdefs.h <<\EOF
6080 #define _PR_HAVE_THREADSAFE_GETHOST 1
6085 if test "$USE_USER_PTHREADS"; then
6086 cat >> confdefs.h <<EOF
6087 #define _POSIX_C_SOURCE 199506L
6092 *-irix*)
6093 if test "${target_os}" = "irix6.5"; then
6094 if test -n "$USE_PTHREADS"; then
6095 cat >> confdefs.h <<\EOF
6096 #define _PR_HAVE_GETHOST_R 1
6099 cat >> confdefs.h <<\EOF
6100 #define _PR_HAVE_GETHOST_R_POINTER 1
6106 *-linux*|*-gnu*|*-k*bsd*-gnu)
6107 if test -n "$USE_NSPR_THREADS"; then
6108 cat >> confdefs.h <<\EOF
6109 #define _PR_LOCAL_THREADS_ONLY 1
6114 *-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-winmo*|*-os2*|*-beos*)
6115 USE_PTHREADS=
6116 _PTHREAD_LDFLAGS=
6117 USE_USER_PTHREADS=
6119 *-netbsd*|*-openbsd*)
6120 if test -n "$USE_NSPR_THREADS"; then
6121 cat >> confdefs.h <<\EOF
6122 #define _PR_LOCAL_THREADS_ONLY 1
6127 *-osf*)
6128 if test -n "$USE_NSPR_THREADS"; then
6129 cat >> confdefs.h <<\EOF
6130 #define _PR_LOCAL_THREADS_ONLY 1
6134 if test -n "$USE_PTHREADS"; then
6135 if echo $OS_RELEASE | egrep -c '(V2.0|V3.2)' 2>/dev/null; then
6137 else
6138 cat >> confdefs.h <<\EOF
6139 #define _PR_HAVE_THREADSAFE_GETHOST 1
6145 *-solaris*)
6146 if test -n "$USE_NSPR_THREADS"; then
6147 cat >> confdefs.h <<\EOF
6148 #define _PR_LOCAL_THREADS_ONLY 1
6152 if test -n "$USE_PTHREADS"; then
6153 cat >> confdefs.h <<\EOF
6154 #define _REENTRANT 1
6157 cat >> confdefs.h <<\EOF
6158 #define HAVE_POINTER_LOCALTIME_R 1
6161 if test "$OS_TEST" = "i86pc"; then
6162 if test -n "$USE_64"; then
6163 PR_MD_ASFILES=os_SunOS_x86_64.s
6164 else
6165 PR_MD_ASFILES=os_SunOS_x86.s
6167 else
6168 if test -n "$USE_64"; then
6169 PR_MD_ASFILES=os_SunOS_sparcv9.s
6174 *-nto*)
6175 if test -n "$USE_PTHREADS"; then
6176 cat >> confdefs.h <<\EOF
6177 #define _PR_HAVE_GETHOST_R 1
6180 cat >> confdefs.h <<\EOF
6181 #define _PR_HAVE_GETHOST_R_POINTER 1
6186 esac
6188 OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
6190 if test -n "$_SAVE_OPTIMIZE_FLAGS"; then
6191 _OPTIMIZE_FLAGS="$_SAVE_OPTIMIZE_FLAGS"
6194 if test -n "$_SAVE_DEBUG_FLAGS"; then
6195 _DEBUG_FLAGS="$_SAVE_DEBUG_FLAGS"
6198 if test -n "$MOZ_OPTIMIZE"; then
6199 CFLAGS="$CFLAGS $_OPTIMIZE_FLAGS"
6200 CXXFLAGS="$CXXFLAGS $_OPTIMIZE_FLAGS"
6203 if test -n "$MOZ_DEBUG_SYMBOLS"; then
6204 CFLAGS="$CFLAGS $_DEBUG_FLAGS"
6205 CXXFLAGS="$CXXFLAGS $_DEBUG_FLAGS"
6208 if test -n "$MOZ_OPTIMIZE"; then
6209 OBJDIR_TAG=_OPT
6210 else
6211 OBJDIR_TAG=_DBG
6214 if test -n "$USE_64"; then
6215 COMPILER_TAG=_64
6218 RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"
6220 case "$target_os" in
6221 cygwin*|msvc*|mks*)
6222 CC="\$(CYGWIN_WRAPPER) $CC"
6223 CXX="\$(CYGWIN_WRAPPER) $CXX"
6224 RC="\$(CYGWIN_WRAPPER) $RC"
6226 esac
6228 # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
6229 if test "${enable_wrap_malloc+set}" = set; then
6230 enableval="$enable_wrap_malloc"
6231 if test "$enableval" = "yes"; then
6232 _WRAP_MALLOC=1
6237 if test -n "$_WRAP_MALLOC"; then
6238 if test "$GNU_CC"; then
6239 WRAP_MALLOC_CFLAGS="${LDFLAGS} ${WRAP_MALLOC_CFLAGS} -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"
6240 DSO_LDOPTS="$DSO_LDOPTS $WRAP_MALLOC_CFLAGS"
6241 else
6242 { echo "configure: error: --enable-wrap-malloc is not supported for non-GNU toolchains" 1>&2; exit 1; }
6246 # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
6247 if test "${with_wrap_malloc+set}" = set; then
6248 withval="$with_wrap_malloc"
6249 WRAP_MALLOC_LIB=$withval
6358 MAKEFILES="
6359 Makefile
6360 config/Makefile
6361 config/autoconf.mk
6362 config/nsprincl.mk
6363 config/nsprincl.sh
6364 config/nspr-config
6365 lib/Makefile
6366 lib/ds/Makefile
6367 lib/libc/Makefile
6368 lib/libc/include/Makefile
6369 lib/libc/src/Makefile
6370 lib/tests/Makefile
6371 pkg/Makefile
6372 pkg/linux/Makefile
6373 pkg/solaris/Makefile
6374 pkg/solaris/SUNWpr/Makefile
6375 pkg/solaris/SUNWprd/Makefile
6376 pr/Makefile
6377 pr/include/Makefile
6378 pr/include/md/Makefile
6379 pr/include/obsolete/Makefile
6380 pr/include/private/Makefile
6381 pr/src/Makefile
6382 pr/src/io/Makefile
6383 pr/src/linking/Makefile
6384 pr/src/malloc/Makefile
6385 pr/src/md/Makefile
6386 pr/src/md/${PR_MD_ARCH_DIR}/Makefile
6387 pr/src/memory/Makefile
6388 pr/src/misc/Makefile
6389 pr/src/threads/Makefile
6390 pr/tests/Makefile
6391 pr/tests/dll/Makefile
6395 if test -z "$USE_PTHREADS" && test -z "$USE_BTHREADS"; then
6396 MAKEFILES="$MAKEFILES pr/src/threads/combined/Makefile"
6397 elif test -n "$USE_PTHREADS"; then
6398 MAKEFILES="$MAKEFILES pr/src/pthreads/Makefile"
6399 elif test -n "$USE_BTHREADS"; then
6400 MAKEFILES="$MAKEFILES pr/src/bthreads/Makefile"
6403 if test -n "$USE_CPLUS"; then
6404 MAKEFILES="$MAKEFILES pr/src/cplus/Makefile pr/src/cplus/tests/Makefile"
6407 echo $MAKEFILES > unallmakefiles
6409 trap '' 1 2 15
6410 cat > confcache <<\EOF
6411 # This file is a shell script that caches the results of configure
6412 # tests run on this system so they can be shared between configure
6413 # scripts and configure runs. It is not useful on other systems.
6414 # If it contains results you don't want to keep, you may remove or edit it.
6416 # By default, configure uses ./config.cache as the cache file,
6417 # creating it if it does not exist already. You can give configure
6418 # the --cache-file=FILE option to use a different cache file; that is
6419 # what configure does when it calls configure scripts in
6420 # subdirectories, so they share the cache.
6421 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6422 # config.status only pays attention to the cache file if you give it the
6423 # --recheck option to rerun configure.
6426 # The following way of writing the cache mishandles newlines in values,
6427 # but we know of no workaround that is simple, portable, and efficient.
6428 # So, don't put newlines in cache variables' values.
6429 # Ultrix sh set writes to stderr and can't be redirected directly,
6430 # and sets the high bit in the cache file unless we assign to the vars.
6431 (set) 2>&1 |
6432 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6433 *ac_space=\ *)
6434 # `set' does not quote correctly, so add quotes (double-quote substitution
6435 # turns \\\\ into \\, and sed turns \\ into \).
6436 sed -n \
6437 -e "s/'/'\\\\''/g" \
6438 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6441 # `set' quotes correctly as required by POSIX, so do not add quotes.
6442 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6444 esac >> confcache
6445 if cmp -s $cache_file confcache; then
6447 else
6448 if test -w $cache_file; then
6449 echo "updating cache $cache_file"
6450 cat confcache > $cache_file
6451 else
6452 echo "not updating unwritable cache $cache_file"
6455 rm -f confcache
6457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6459 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6460 # Let make expand exec_prefix.
6461 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6463 # Any assignment to VPATH causes Sun make to only execute
6464 # the first set of double-colon rules, so remove it if not needed.
6465 # If there is a colon in the path, we need to keep it.
6466 if test "x$srcdir" = x.; then
6467 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6470 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6472 # Transform confdefs.h into DEFS.
6473 # Protect against shell expansion while executing Makefile rules.
6474 # Protect against Makefile macro expansion.
6475 cat > conftest.defs <<\EOF
6476 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6477 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6478 s%\[%\\&%g
6479 s%\]%\\&%g
6480 s%\$%$$%g
6482 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '` # Manually modified for MKS support.
6483 rm -f conftest.defs
6486 # Without the "./", some shells look in PATH for config.status.
6487 : ${CONFIG_STATUS=./config.status}
6489 echo creating $CONFIG_STATUS
6490 rm -f $CONFIG_STATUS
6491 cat > $CONFIG_STATUS <<EOF
6492 #! /bin/sh
6493 # Generated automatically by configure.
6494 # Run this file to recreate the current configuration.
6495 # This directory was configured as follows,
6496 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6498 # $0 $ac_configure_args
6500 # Compiler output produced by configure, useful for debugging
6501 # configure, is in ./config.log if it exists.
6503 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6504 for ac_option
6506 case "\$ac_option" in
6507 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6508 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6509 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6510 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6511 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6512 exit 0 ;;
6513 -help | --help | --hel | --he | --h)
6514 echo "\$ac_cs_usage"; exit 0 ;;
6515 *) echo "\$ac_cs_usage"; exit 1 ;;
6516 esac
6517 done
6519 ac_given_srcdir=$srcdir
6521 trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6523 cat >> $CONFIG_STATUS <<EOF
6527 # Protect against being on the right side of a sed subst in config.status.
6528 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6529 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6530 $ac_vpsub
6531 $extrasub
6532 s%@SHELL@%$SHELL%g
6533 s%@CFLAGS@%$CFLAGS%g
6534 s%@CPPFLAGS@%$CPPFLAGS%g
6535 s%@CXXFLAGS@%$CXXFLAGS%g
6536 s%@FFLAGS@%$FFLAGS%g
6537 s%@DEFS@%$DEFS%g
6538 s%@LDFLAGS@%$LDFLAGS%g
6539 s%@LIBS@%$LIBS%g
6540 s%@exec_prefix@%$exec_prefix%g
6541 s%@prefix@%$prefix%g
6542 s%@program_transform_name@%$program_transform_name%g
6543 s%@bindir@%$bindir%g
6544 s%@sbindir@%$sbindir%g
6545 s%@libexecdir@%$libexecdir%g
6546 s%@datadir@%$datadir%g
6547 s%@sysconfdir@%$sysconfdir%g
6548 s%@sharedstatedir@%$sharedstatedir%g
6549 s%@localstatedir@%$localstatedir%g
6550 s%@libdir@%$libdir%g
6551 s%@includedir@%$includedir%g
6552 s%@oldincludedir@%$oldincludedir%g
6553 s%@infodir@%$infodir%g
6554 s%@mandir@%$mandir%g
6555 s%@host@%$host%g
6556 s%@host_alias@%$host_alias%g
6557 s%@host_cpu@%$host_cpu%g
6558 s%@host_vendor@%$host_vendor%g
6559 s%@host_os@%$host_os%g
6560 s%@target@%$target%g
6561 s%@target_alias@%$target_alias%g
6562 s%@target_cpu@%$target_cpu%g
6563 s%@target_vendor@%$target_vendor%g
6564 s%@target_os@%$target_os%g
6565 s%@build@%$build%g
6566 s%@build_alias@%$build_alias%g
6567 s%@build_cpu@%$build_cpu%g
6568 s%@build_vendor@%$build_vendor%g
6569 s%@build_os@%$build_os%g
6570 s%@CC@%$CC%g
6571 s%@dist_prefix@%$dist_prefix%g
6572 s%@dist_bindir@%$dist_bindir%g
6573 s%@dist_includedir@%$dist_includedir%g
6574 s%@dist_libdir@%$dist_libdir%g
6575 s%@WHOAMI@%$WHOAMI%g
6576 s%@HOST_CC@%$HOST_CC%g
6577 s%@CXX@%$CXX%g
6578 s%@RANLIB@%$RANLIB%g
6579 s%@AR@%$AR%g
6580 s%@AS@%$AS%g
6581 s%@LD@%$LD%g
6582 s%@STRIP@%$STRIP%g
6583 s%@WINDRES@%$WINDRES%g
6584 s%@CPP@%$CPP%g
6585 s%@PERL@%$PERL%g
6586 s%@CCACHE@%$CCACHE%g
6587 s%@SHELL_OVERRIDE@%$SHELL_OVERRIDE%g
6588 s%@MOZILLA_CLIENT@%$MOZILLA_CLIENT%g
6589 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
6590 s%@HOST_LDFLAGS@%$HOST_LDFLAGS%g
6591 s%@GNU_CC@%$GNU_CC%g
6592 s%@GCC_USE_GNU_LD@%$GCC_USE_GNU_LD%g
6593 s%@MSC_VER@%$MSC_VER%g
6594 s%@CROSS_COMPILE@%$CROSS_COMPILE%g
6595 s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
6596 s%@MOZ_DEBUG@%$MOZ_DEBUG%g
6597 s%@MOZ_DEBUG_SYMBOLS@%$MOZ_DEBUG_SYMBOLS%g
6598 s%@USE_CPLUS@%$USE_CPLUS%g
6599 s%@USE_IPV6@%$USE_IPV6%g
6600 s%@USE_N32@%$USE_N32%g
6601 s%@USE_64@%$USE_64%g
6602 s%@OBJECT_MODE@%$OBJECT_MODE%g
6603 s%@ENABLE_STRIP@%$ENABLE_STRIP%g
6604 s%@USE_PTHREADS@%$USE_PTHREADS%g
6605 s%@USE_BTHREADS@%$USE_BTHREADS%g
6606 s%@USE_USER_PTHREADS@%$USE_USER_PTHREADS%g
6607 s%@USE_NSPR_THREADS@%$USE_NSPR_THREADS%g
6608 s%@LIBNSPR@%$LIBNSPR%g
6609 s%@LIBPLC@%$LIBPLC%g
6610 s%@MOD_MAJOR_VERSION@%$MOD_MAJOR_VERSION%g
6611 s%@MOD_MINOR_VERSION@%$MOD_MINOR_VERSION%g
6612 s%@MOD_PATCH_VERSION@%$MOD_PATCH_VERSION%g
6613 s%@NSPR_MODNAME@%$NSPR_MODNAME%g
6614 s%@MDCPUCFG_H@%$MDCPUCFG_H%g
6615 s%@PR_MD_CSRCS@%$PR_MD_CSRCS%g
6616 s%@PR_MD_ASFILES@%$PR_MD_ASFILES%g
6617 s%@PR_MD_ARCH_DIR@%$PR_MD_ARCH_DIR%g
6618 s%@CPU_ARCH@%$CPU_ARCH%g
6619 s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
6620 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
6621 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
6622 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
6623 s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
6624 s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
6625 s%@MKSHLIB@%$MKSHLIB%g
6626 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
6627 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
6628 s%@OS_TARGET@%$OS_TARGET%g
6629 s%@OS_ARCH@%$OS_ARCH%g
6630 s%@OS_RELEASE@%$OS_RELEASE%g
6631 s%@OS_TEST@%$OS_TEST%g
6632 s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
6633 s%@DEFINES@%$DEFINES%g
6634 s%@AR_FLAGS@%$AR_FLAGS%g
6635 s%@ASFLAGS@%$ASFLAGS%g
6636 s%@FILTER@%$FILTER%g
6637 s%@IMPLIB@%$IMPLIB%g
6638 s%@PROFILE_GEN_CFLAGS@%$PROFILE_GEN_CFLAGS%g
6639 s%@PROFILE_GEN_LDFLAGS@%$PROFILE_GEN_LDFLAGS%g
6640 s%@PROFILE_USE_CFLAGS@%$PROFILE_USE_CFLAGS%g
6641 s%@PROFILE_USE_LDFLAGS@%$PROFILE_USE_LDFLAGS%g
6642 s%@OS_LIBS@%$OS_LIBS%g
6643 s%@RESOLVE_LINK_SYMBOLS@%$RESOLVE_LINK_SYMBOLS%g
6644 s%@AIX_LINK_OPTS@%$AIX_LINK_OPTS%g
6645 s%@NOSUCHFILE@%$NOSUCHFILE%g
6646 s%@MOZ_OBJFORMAT@%$MOZ_OBJFORMAT%g
6647 s%@ULTRASPARC_LIBRARY@%$ULTRASPARC_LIBRARY%g
6648 s%@OBJDIR@%$OBJDIR%g
6649 s%@OBJDIR_NAME@%$OBJDIR_NAME%g
6650 s%@RELEASE_OBJDIR_NAME@%$RELEASE_OBJDIR_NAME%g
6651 s%@NSINSTALL@%$NSINSTALL%g
6652 s%@OPTIMIZER@%$OPTIMIZER%g
6653 s%@RC@%$RC%g
6654 s%@RCFLAGS@%$RCFLAGS%g
6655 s%@DLLFLAGS@%$DLLFLAGS%g
6656 s%@EXEFLAGS@%$EXEFLAGS%g
6657 s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
6658 s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
6659 s%@VISIBILITY_FLAGS@%$VISIBILITY_FLAGS%g
6660 s%@WRAP_SYSTEM_INCLUDES@%$WRAP_SYSTEM_INCLUDES%g
6661 s%@MACOS_SDK_DIR@%$MACOS_SDK_DIR%g
6662 s%@SYMBIAN_SDK_DIR@%$SYMBIAN_SDK_DIR%g
6663 s%@NEXT_ROOT@%$NEXT_ROOT%g
6664 s%@MT@%$MT%g
6666 CEOF
6669 cat >> $CONFIG_STATUS <<\EOF
6671 # Split the substitutions into bite-sized pieces for seds with
6672 # small command number limits, like on Digital OSF/1 and HP-UX.
6673 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6674 ac_file=1 # Number of current file.
6675 ac_beg=1 # First line for current file.
6676 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6677 ac_more_lines=:
6678 ac_sed_cmds=""
6679 while $ac_more_lines; do
6680 if test $ac_beg -gt 1; then
6681 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6682 else
6683 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6685 if test ! -s conftest.s$ac_file; then
6686 ac_more_lines=false
6687 rm -f conftest.s$ac_file
6688 else
6689 if test -z "$ac_sed_cmds"; then
6690 ac_sed_cmds="sed -f conftest.s$ac_file"
6691 else
6692 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6694 ac_file=`expr $ac_file + 1`
6695 ac_beg=$ac_end
6696 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6698 done
6699 if test -z "$ac_sed_cmds"; then
6700 ac_sed_cmds=cat
6704 cat >> $CONFIG_STATUS <<EOF
6706 CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
6708 cat >> $CONFIG_STATUS <<\EOF
6709 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6710 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6711 case "$ac_file" in
6712 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6713 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6714 *) ac_file_in="${ac_file}.in" ;;
6715 esac
6717 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6719 # Remove last slash and all that follows it. Not all systems have dirname.
6720 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6721 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6722 # The file is in a subdirectory.
6723 test ! -d "$ac_dir" && mkdir "$ac_dir"
6724 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6725 # A "../" for each directory in $ac_dir_suffix.
6726 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6727 else
6728 ac_dir_suffix= ac_dots=
6731 case "$ac_given_srcdir" in
6732 .) srcdir=.
6733 if test -z "$ac_dots"; then top_srcdir=.
6734 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6735 /* | ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6736 *) # Relative path.
6737 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6738 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6739 esac
6742 echo creating "$ac_file"
6743 rm -f "$ac_file"
6744 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6745 case "$ac_file" in
6746 *Makefile*) ac_comsub="1i\\
6747 # $configure_input" ;;
6748 *) ac_comsub= ;;
6749 esac
6751 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" `
6752 sed -e "$ac_comsub
6753 s%@configure_input@%$configure_input%g
6754 s%@srcdir@%$srcdir%g
6755 s%@top_srcdir@%$top_srcdir%g
6756 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6757 fi; done
6758 rm -f conftest.s*
6763 cat >> $CONFIG_STATUS <<EOF
6766 cat >> $CONFIG_STATUS <<\EOF
6767 chmod +x config/nspr-config
6768 exit 0
6770 chmod +x $CONFIG_STATUS
6771 rm -fr confdefs* $ac_clean_files
6772 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1