config.h.in: Rebuilt.
[gcc.git] / libjava / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17 ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19 ac_help="$ac_help
20 --enable-multilib build many library versions (default)"
21 ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24 ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26 ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28 ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30 ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32 ac_help="$ac_help
33 --disable-libtool-lock avoid locking (might break parallel builds)"
34 ac_help="$ac_help
35 --enable-fast-character prefer speed over size for Character"
36 ac_help="$ac_help
37 --disable-getenv-properties
38 don't set system properties from GCJ_PROPERTIES"
39 ac_help="$ac_help
40 --enable-libgcj-debug enable runtime debugging code"
41 ac_help="$ac_help
42 --enable-interpreter enable interpreter"
43 ac_help="$ac_help
44 --enable-sjlj-exceptions use setjmp/longjmp exceptions"
45 ac_help="$ac_help
46 --disable-java-net disable java.net"
47 ac_help="$ac_help
48 --with-ecos enable runtime eCos target support"
49 ac_help="$ac_help
50 --with-system-zlib use installed libz"
51 ac_help="$ac_help
52 --enable-java-gc=TYPE choose garbage collector [boehm]"
53 ac_help="$ac_help
54 --enable-threads=TYPE choose threading package"
55
56 # Initialize some variables set by options.
57 # The variables have the same names as the options, with
58 # dashes changed to underlines.
59 build=NONE
60 cache_file=./config.cache
61 exec_prefix=NONE
62 host=NONE
63 no_create=
64 nonopt=NONE
65 no_recursion=
66 prefix=NONE
67 program_prefix=NONE
68 program_suffix=NONE
69 program_transform_name=s,x,x,
70 silent=
71 site=
72 sitefile=
73 srcdir=
74 target=NONE
75 verbose=
76 x_includes=NONE
77 x_libraries=NONE
78 bindir='${exec_prefix}/bin'
79 sbindir='${exec_prefix}/sbin'
80 libexecdir='${exec_prefix}/libexec'
81 datadir='${prefix}/share'
82 sysconfdir='${prefix}/etc'
83 sharedstatedir='${prefix}/com'
84 localstatedir='${prefix}/var'
85 libdir='${exec_prefix}/lib'
86 includedir='${prefix}/include'
87 oldincludedir='/usr/include'
88 infodir='${prefix}/info'
89 mandir='${prefix}/man'
90
91 # Initialize some other variables.
92 subdirs=
93 MFLAGS= MAKEFLAGS=
94 SHELL=${CONFIG_SHELL-/bin/sh}
95 # Maximum number of lines to put in a shell here document.
96 ac_max_here_lines=12
97
98 ac_prev=
99 for ac_option
100 do
101
102 # If the previous option needs an argument, assign it.
103 if test -n "$ac_prev"; then
104 eval "$ac_prev=\$ac_option"
105 ac_prev=
106 continue
107 fi
108
109 case "$ac_option" in
110 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111 *) ac_optarg= ;;
112 esac
113
114 # Accept the important Cygnus configure options, so we can diagnose typos.
115
116 case "$ac_option" in
117
118 -bindir | --bindir | --bindi | --bind | --bin | --bi)
119 ac_prev=bindir ;;
120 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
121 bindir="$ac_optarg" ;;
122
123 -build | --build | --buil | --bui | --bu)
124 ac_prev=build ;;
125 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
126 build="$ac_optarg" ;;
127
128 -cache-file | --cache-file | --cache-fil | --cache-fi \
129 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
130 ac_prev=cache_file ;;
131 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
132 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
133 cache_file="$ac_optarg" ;;
134
135 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
136 ac_prev=datadir ;;
137 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
138 | --da=*)
139 datadir="$ac_optarg" ;;
140
141 -disable-* | --disable-*)
142 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
143 # Reject names that are not valid shell variable names.
144 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
145 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
146 fi
147 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148 eval "enable_${ac_feature}=no" ;;
149
150 -enable-* | --enable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
152 # Reject names that are not valid shell variable names.
153 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 case "$ac_option" in
158 *=*) ;;
159 *) ac_optarg=yes ;;
160 esac
161 eval "enable_${ac_feature}='$ac_optarg'" ;;
162
163 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
164 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
165 | --exec | --exe | --ex)
166 ac_prev=exec_prefix ;;
167 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
168 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
169 | --exec=* | --exe=* | --ex=*)
170 exec_prefix="$ac_optarg" ;;
171
172 -gas | --gas | --ga | --g)
173 # Obsolete; use --with-gas.
174 with_gas=yes ;;
175
176 -help | --help | --hel | --he)
177 # Omit some internal or obsolete options to make the list less imposing.
178 # This message is too long to be a string in the A/UX 3.1 sh.
179 cat << EOF
180 Usage: configure [options] [host]
181 Options: [defaults in brackets after descriptions]
182 Configuration:
183 --cache-file=FILE cache test results in FILE
184 --help print this message
185 --no-create do not create output files
186 --quiet, --silent do not print \`checking...' messages
187 --site-file=FILE use FILE as the site file
188 --version print the version of autoconf that created configure
189 Directory and file names:
190 --prefix=PREFIX install architecture-independent files in PREFIX
191 [$ac_default_prefix]
192 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
193 [same as prefix]
194 --bindir=DIR user executables in DIR [EPREFIX/bin]
195 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
196 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
197 --datadir=DIR read-only architecture-independent data in DIR
198 [PREFIX/share]
199 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
200 --sharedstatedir=DIR modifiable architecture-independent data in DIR
201 [PREFIX/com]
202 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
203 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
204 --includedir=DIR C header files in DIR [PREFIX/include]
205 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
206 --infodir=DIR info documentation in DIR [PREFIX/info]
207 --mandir=DIR man documentation in DIR [PREFIX/man]
208 --srcdir=DIR find the sources in DIR [configure dir or ..]
209 --program-prefix=PREFIX prepend PREFIX to installed program names
210 --program-suffix=SUFFIX append SUFFIX to installed program names
211 --program-transform-name=PROGRAM
212 run sed PROGRAM on installed program names
213 EOF
214 cat << EOF
215 Host type:
216 --build=BUILD configure for building on BUILD [BUILD=HOST]
217 --host=HOST configure for HOST [guessed]
218 --target=TARGET configure for TARGET [TARGET=HOST]
219 Features and packages:
220 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
221 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
222 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
223 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
224 --x-includes=DIR X include files are in DIR
225 --x-libraries=DIR X library files are in DIR
226 EOF
227 if test -n "$ac_help"; then
228 echo "--enable and --with options recognized:$ac_help"
229 fi
230 exit 0 ;;
231
232 -host | --host | --hos | --ho)
233 ac_prev=host ;;
234 -host=* | --host=* | --hos=* | --ho=*)
235 host="$ac_optarg" ;;
236
237 -includedir | --includedir | --includedi | --included | --include \
238 | --includ | --inclu | --incl | --inc)
239 ac_prev=includedir ;;
240 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
241 | --includ=* | --inclu=* | --incl=* | --inc=*)
242 includedir="$ac_optarg" ;;
243
244 -infodir | --infodir | --infodi | --infod | --info | --inf)
245 ac_prev=infodir ;;
246 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
247 infodir="$ac_optarg" ;;
248
249 -libdir | --libdir | --libdi | --libd)
250 ac_prev=libdir ;;
251 -libdir=* | --libdir=* | --libdi=* | --libd=*)
252 libdir="$ac_optarg" ;;
253
254 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
255 | --libexe | --libex | --libe)
256 ac_prev=libexecdir ;;
257 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
258 | --libexe=* | --libex=* | --libe=*)
259 libexecdir="$ac_optarg" ;;
260
261 -localstatedir | --localstatedir | --localstatedi | --localstated \
262 | --localstate | --localstat | --localsta | --localst \
263 | --locals | --local | --loca | --loc | --lo)
264 ac_prev=localstatedir ;;
265 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
266 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
267 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
268 localstatedir="$ac_optarg" ;;
269
270 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
271 ac_prev=mandir ;;
272 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
273 mandir="$ac_optarg" ;;
274
275 -nfp | --nfp | --nf)
276 # Obsolete; use --without-fp.
277 with_fp=no ;;
278
279 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
280 | --no-cr | --no-c)
281 no_create=yes ;;
282
283 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
284 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
285 no_recursion=yes ;;
286
287 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
288 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
289 | --oldin | --oldi | --old | --ol | --o)
290 ac_prev=oldincludedir ;;
291 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
292 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
293 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
294 oldincludedir="$ac_optarg" ;;
295
296 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
297 ac_prev=prefix ;;
298 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
299 prefix="$ac_optarg" ;;
300
301 -program-prefix | --program-prefix | --program-prefi | --program-pref \
302 | --program-pre | --program-pr | --program-p)
303 ac_prev=program_prefix ;;
304 -program-prefix=* | --program-prefix=* | --program-prefi=* \
305 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
306 program_prefix="$ac_optarg" ;;
307
308 -program-suffix | --program-suffix | --program-suffi | --program-suff \
309 | --program-suf | --program-su | --program-s)
310 ac_prev=program_suffix ;;
311 -program-suffix=* | --program-suffix=* | --program-suffi=* \
312 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
313 program_suffix="$ac_optarg" ;;
314
315 -program-transform-name | --program-transform-name \
316 | --program-transform-nam | --program-transform-na \
317 | --program-transform-n | --program-transform- \
318 | --program-transform | --program-transfor \
319 | --program-transfo | --program-transf \
320 | --program-trans | --program-tran \
321 | --progr-tra | --program-tr | --program-t)
322 ac_prev=program_transform_name ;;
323 -program-transform-name=* | --program-transform-name=* \
324 | --program-transform-nam=* | --program-transform-na=* \
325 | --program-transform-n=* | --program-transform-=* \
326 | --program-transform=* | --program-transfor=* \
327 | --program-transfo=* | --program-transf=* \
328 | --program-trans=* | --program-tran=* \
329 | --progr-tra=* | --program-tr=* | --program-t=*)
330 program_transform_name="$ac_optarg" ;;
331
332 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
333 | -silent | --silent | --silen | --sile | --sil)
334 silent=yes ;;
335
336 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
337 ac_prev=sbindir ;;
338 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
339 | --sbi=* | --sb=*)
340 sbindir="$ac_optarg" ;;
341
342 -sharedstatedir | --sharedstatedir | --sharedstatedi \
343 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
344 | --sharedst | --shareds | --shared | --share | --shar \
345 | --sha | --sh)
346 ac_prev=sharedstatedir ;;
347 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
348 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
349 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
350 | --sha=* | --sh=*)
351 sharedstatedir="$ac_optarg" ;;
352
353 -site | --site | --sit)
354 ac_prev=site ;;
355 -site=* | --site=* | --sit=*)
356 site="$ac_optarg" ;;
357
358 -site-file | --site-file | --site-fil | --site-fi | --site-f)
359 ac_prev=sitefile ;;
360 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
361 sitefile="$ac_optarg" ;;
362
363 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
364 ac_prev=srcdir ;;
365 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
366 srcdir="$ac_optarg" ;;
367
368 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
369 | --syscon | --sysco | --sysc | --sys | --sy)
370 ac_prev=sysconfdir ;;
371 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
372 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
373 sysconfdir="$ac_optarg" ;;
374
375 -target | --target | --targe | --targ | --tar | --ta | --t)
376 ac_prev=target ;;
377 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
378 target="$ac_optarg" ;;
379
380 -v | -verbose | --verbose | --verbos | --verbo | --verb)
381 verbose=yes ;;
382
383 -version | --version | --versio | --versi | --vers)
384 echo "configure generated by autoconf version 2.13"
385 exit 0 ;;
386
387 -with-* | --with-*)
388 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
389 # Reject names that are not valid shell variable names.
390 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
391 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
392 fi
393 ac_package=`echo $ac_package| sed 's/-/_/g'`
394 case "$ac_option" in
395 *=*) ;;
396 *) ac_optarg=yes ;;
397 esac
398 eval "with_${ac_package}='$ac_optarg'" ;;
399
400 -without-* | --without-*)
401 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
402 # Reject names that are not valid shell variable names.
403 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
404 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405 fi
406 ac_package=`echo $ac_package| sed 's/-/_/g'`
407 eval "with_${ac_package}=no" ;;
408
409 --x)
410 # Obsolete; use --with-x.
411 with_x=yes ;;
412
413 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414 | --x-incl | --x-inc | --x-in | --x-i)
415 ac_prev=x_includes ;;
416 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418 x_includes="$ac_optarg" ;;
419
420 -x-libraries | --x-libraries | --x-librarie | --x-librari \
421 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422 ac_prev=x_libraries ;;
423 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425 x_libraries="$ac_optarg" ;;
426
427 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
428 ;;
429
430 *)
431 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
432 echo "configure: warning: $ac_option: invalid host type" 1>&2
433 fi
434 if test "x$nonopt" != xNONE; then
435 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
436 fi
437 nonopt="$ac_option"
438 ;;
439
440 esac
441 done
442
443 if test -n "$ac_prev"; then
444 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
445 fi
446
447 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
448
449 # File descriptor usage:
450 # 0 standard input
451 # 1 file creation
452 # 2 errors and warnings
453 # 3 some systems may open it to /dev/tty
454 # 4 used on the Kubota Titan
455 # 6 checking for... messages and results
456 # 5 compiler messages saved in config.log
457 if test "$silent" = yes; then
458 exec 6>/dev/null
459 else
460 exec 6>&1
461 fi
462 exec 5>./config.log
463
464 echo "\
465 This file contains any messages produced by compilers while
466 running configure, to aid debugging if configure makes a mistake.
467 " 1>&5
468
469 # Strip out --no-create and --no-recursion so they do not pile up.
470 # Also quote any args containing shell metacharacters.
471 ac_configure_args=
472 for ac_arg
473 do
474 case "$ac_arg" in
475 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
476 | --no-cr | --no-c) ;;
477 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
478 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
479 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
480 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
481 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
482 esac
483 done
484
485 # NLS nuisances.
486 # Only set these to C if already set. These must not be set unconditionally
487 # because not all systems understand e.g. LANG=C (notably SCO).
488 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
489 # Non-C LC_CTYPE values break the ctype check.
490 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
491 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
492 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
493 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
494
495 # confdefs.h avoids OS command line length limits that DEFS can exceed.
496 rm -rf conftest* confdefs.h
497 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
498 echo > confdefs.h
499
500 # A filename unique to this package, relative to the directory that
501 # configure is in, which we can look for to find out if srcdir is correct.
502 ac_unique_file=java/lang/System.java
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506 ac_srcdir_defaulted=yes
507 # Try the directory containing this script, then its parent.
508 ac_prog=$0
509 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
510 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511 srcdir=$ac_confdir
512 if test ! -r $srcdir/$ac_unique_file; then
513 srcdir=..
514 fi
515 else
516 ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519 if test "$ac_srcdir_defaulted" = yes; then
520 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
521 else
522 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
523 fi
524 fi
525 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
526
527 # Prefer explicitly selected file to automatically selected ones.
528 if test -z "$sitefile"; then
529 if test -z "$CONFIG_SITE"; then
530 if test "x$prefix" != xNONE; then
531 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532 else
533 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 fi
535 fi
536 else
537 CONFIG_SITE="$sitefile"
538 fi
539 for ac_site_file in $CONFIG_SITE; do
540 if test -r "$ac_site_file"; then
541 echo "loading site script $ac_site_file"
542 . "$ac_site_file"
543 fi
544 done
545
546 if test -r "$cache_file"; then
547 echo "loading cache $cache_file"
548 . $cache_file
549 else
550 echo "creating cache $cache_file"
551 > $cache_file
552 fi
553
554 ac_ext=c
555 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
556 ac_cpp='$CPP $CPPFLAGS'
557 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
558 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
559 cross_compiling=$ac_cv_prog_cc_cross
560
561 ac_exeext=
562 ac_objext=o
563 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
564 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
565 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
566 ac_n= ac_c='
567 ' ac_t=' '
568 else
569 ac_n=-n ac_c= ac_t=
570 fi
571 else
572 ac_n= ac_c='\c' ac_t=
573 fi
574
575
576
577 ac_aux_dir=
578 for ac_dir in .. $srcdir/..; do
579 if test -f $ac_dir/install-sh; then
580 ac_aux_dir=$ac_dir
581 ac_install_sh="$ac_aux_dir/install-sh -c"
582 break
583 elif test -f $ac_dir/install.sh; then
584 ac_aux_dir=$ac_dir
585 ac_install_sh="$ac_aux_dir/install.sh -c"
586 break
587 fi
588 done
589 if test -z "$ac_aux_dir"; then
590 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
591 fi
592 ac_config_guess=$ac_aux_dir/config.guess
593 ac_config_sub=$ac_aux_dir/config.sub
594 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
595
596
597
598 # Do some error checking and defaulting for the host and target type.
599 # The inputs are:
600 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
601 #
602 # The rules are:
603 # 1. You are not allowed to specify --host, --target, and nonopt at the
604 # same time.
605 # 2. Host defaults to nonopt.
606 # 3. If nonopt is not specified, then host defaults to the current host,
607 # as determined by config.guess.
608 # 4. Target and build default to nonopt.
609 # 5. If nonopt is not specified, then target and build default to host.
610
611 # The aliases save the names the user supplied, while $host etc.
612 # will get canonicalized.
613 case $host---$target---$nonopt in
614 NONE---*---* | *---NONE---* | *---*---NONE) ;;
615 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
616 esac
617
618
619 # Make sure we can run config.sub.
620 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
621 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
622 fi
623
624 echo $ac_n "checking host system type""... $ac_c" 1>&6
625 echo "configure:626: checking host system type" >&5
626
627 host_alias=$host
628 case "$host_alias" in
629 NONE)
630 case $nonopt in
631 NONE)
632 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
633 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
634 fi ;;
635 *) host_alias=$nonopt ;;
636 esac ;;
637 esac
638
639 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
640 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
641 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
642 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
643 echo "$ac_t""$host" 1>&6
644
645 echo $ac_n "checking target system type""... $ac_c" 1>&6
646 echo "configure:647: checking target system type" >&5
647
648 target_alias=$target
649 case "$target_alias" in
650 NONE)
651 case $nonopt in
652 NONE) target_alias=$host_alias ;;
653 *) target_alias=$nonopt ;;
654 esac ;;
655 esac
656
657 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
658 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
659 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
660 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
661 echo "$ac_t""$target" 1>&6
662
663 echo $ac_n "checking build system type""... $ac_c" 1>&6
664 echo "configure:665: checking build system type" >&5
665
666 build_alias=$build
667 case "$build_alias" in
668 NONE)
669 case $nonopt in
670 NONE) build_alias=$host_alias ;;
671 *) build_alias=$nonopt ;;
672 esac ;;
673 esac
674
675 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
676 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
677 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
678 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
679 echo "$ac_t""$build" 1>&6
680
681 test "$host_alias" != "$target_alias" &&
682 test "$program_prefix$program_suffix$program_transform_name" = \
683 NONENONEs,x,x, &&
684 program_prefix=${target_alias}-
685
686
687 # Check whether --with-target-subdir or --without-target-subdir was given.
688 if test "${with_target_subdir+set}" = set; then
689 withval="$with_target_subdir"
690 :
691 fi
692
693 # Check whether --with-cross-host or --without-cross-host was given.
694 if test "${with_cross_host+set}" = set; then
695 withval="$with_cross_host"
696 :
697 fi
698
699
700 # Find a good install program. We prefer a C program (faster),
701 # so one script is as good as another. But avoid the broken or
702 # incompatible versions:
703 # SysV /etc/install, /usr/sbin/install
704 # SunOS /usr/etc/install
705 # IRIX /sbin/install
706 # AIX /bin/install
707 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
708 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
709 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
710 # ./install, which can be erroneously created by make from ./install.sh.
711 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
712 echo "configure:713: checking for a BSD compatible install" >&5
713 if test -z "$INSTALL"; then
714 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
715 echo $ac_n "(cached) $ac_c" 1>&6
716 else
717 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
718 for ac_dir in $PATH; do
719 # Account for people who put trailing slashes in PATH elements.
720 case "$ac_dir/" in
721 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
722 *)
723 # OSF1 and SCO ODT 3.0 have their own names for install.
724 # Don't use installbsd from OSF since it installs stuff as root
725 # by default.
726 for ac_prog in ginstall scoinst install; do
727 if test -f $ac_dir/$ac_prog; then
728 if test $ac_prog = install &&
729 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
730 # AIX install. It has an incompatible calling convention.
731 :
732 else
733 ac_cv_path_install="$ac_dir/$ac_prog -c"
734 break 2
735 fi
736 fi
737 done
738 ;;
739 esac
740 done
741 IFS="$ac_save_IFS"
742
743 fi
744 if test "${ac_cv_path_install+set}" = set; then
745 INSTALL="$ac_cv_path_install"
746 else
747 # As a last resort, use the slow shell script. We don't cache a
748 # path for INSTALL within a source directory, because that will
749 # break other packages using the cache if that directory is
750 # removed, or if the path is relative.
751 INSTALL="$ac_install_sh"
752 fi
753 fi
754 echo "$ac_t""$INSTALL" 1>&6
755
756 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
757 # It thinks the first close brace ends the variable substitution.
758 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
759
760 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
761
762 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
763
764 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
765 echo "configure:766: checking whether build environment is sane" >&5
766 # Just in case
767 sleep 1
768 echo timestamp > conftestfile
769 # Do `set' in a subshell so we don't clobber the current shell's
770 # arguments. Must try -L first in case configure is actually a
771 # symlink; some systems play weird games with the mod time of symlinks
772 # (eg FreeBSD returns the mod time of the symlink's containing
773 # directory).
774 if (
775 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
776 if test "$*" = "X"; then
777 # -L didn't work.
778 set X `ls -t $srcdir/configure conftestfile`
779 fi
780 if test "$*" != "X $srcdir/configure conftestfile" \
781 && test "$*" != "X conftestfile $srcdir/configure"; then
782
783 # If neither matched, then we have a broken ls. This can happen
784 # if, for instance, CONFIG_SHELL is bash and it inherits a
785 # broken ls alias from the environment. This has actually
786 # happened. Such a system could not be considered "sane".
787 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
788 alias in your environment" 1>&2; exit 1; }
789 fi
790
791 test "$2" = conftestfile
792 )
793 then
794 # Ok.
795 :
796 else
797 { echo "configure: error: newly created file is older than distributed files!
798 Check your system clock" 1>&2; exit 1; }
799 fi
800 rm -f conftest*
801 echo "$ac_t""yes" 1>&6
802 if test "$program_transform_name" = s,x,x,; then
803 program_transform_name=
804 else
805 # Double any \ or $. echo might interpret backslashes.
806 cat <<\EOF_SED > conftestsed
807 s,\\,\\\\,g; s,\$,$$,g
808 EOF_SED
809 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
810 rm -f conftestsed
811 fi
812 test "$program_prefix" != NONE &&
813 program_transform_name="s,^,${program_prefix},; $program_transform_name"
814 # Use a double $ so make ignores it.
815 test "$program_suffix" != NONE &&
816 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
817
818 # sed with no file args requires a program.
819 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
820
821 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
822 echo "configure:823: checking whether ${MAKE-make} sets \${MAKE}" >&5
823 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
824 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
826 else
827 cat > conftestmake <<\EOF
828 all:
829 @echo 'ac_maketemp="${MAKE}"'
830 EOF
831 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
832 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
833 if test -n "$ac_maketemp"; then
834 eval ac_cv_prog_make_${ac_make}_set=yes
835 else
836 eval ac_cv_prog_make_${ac_make}_set=no
837 fi
838 rm -f conftestmake
839 fi
840 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
841 echo "$ac_t""yes" 1>&6
842 SET_MAKE=
843 else
844 echo "$ac_t""no" 1>&6
845 SET_MAKE="MAKE=${MAKE-make}"
846 fi
847
848 if test $host != $build; then
849 ac_tool_prefix=${host_alias}-
850 else
851 ac_tool_prefix=
852 fi
853
854 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
855 echo "configure:856: checking for Cygwin environment" >&5
856 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
857 echo $ac_n "(cached) $ac_c" 1>&6
858 else
859 cat > conftest.$ac_ext <<EOF
860 #line 861 "configure"
861 #include "confdefs.h"
862
863 int main() {
864
865 #ifndef __CYGWIN__
866 #define __CYGWIN__ __CYGWIN32__
867 #endif
868 return __CYGWIN__;
869 ; return 0; }
870 EOF
871 if { (eval echo configure:872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
872 rm -rf conftest*
873 ac_cv_cygwin=yes
874 else
875 echo "configure: failed program was:" >&5
876 cat conftest.$ac_ext >&5
877 rm -rf conftest*
878 ac_cv_cygwin=no
879 fi
880 rm -f conftest*
881 rm -f conftest*
882 fi
883
884 echo "$ac_t""$ac_cv_cygwin" 1>&6
885 CYGWIN=
886 test "$ac_cv_cygwin" = yes && CYGWIN=yes
887 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
888 echo "configure:889: checking for mingw32 environment" >&5
889 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
890 echo $ac_n "(cached) $ac_c" 1>&6
891 else
892 cat > conftest.$ac_ext <<EOF
893 #line 894 "configure"
894 #include "confdefs.h"
895
896 int main() {
897 return __MINGW32__;
898 ; return 0; }
899 EOF
900 if { (eval echo configure:901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
901 rm -rf conftest*
902 ac_cv_mingw32=yes
903 else
904 echo "configure: failed program was:" >&5
905 cat conftest.$ac_ext >&5
906 rm -rf conftest*
907 ac_cv_mingw32=no
908 fi
909 rm -f conftest*
910 rm -f conftest*
911 fi
912
913 echo "$ac_t""$ac_cv_mingw32" 1>&6
914 MINGW32=
915 test "$ac_cv_mingw32" = yes && MINGW32=yes
916
917 # Check whether --enable-multilib or --disable-multilib was given.
918 if test "${enable_multilib+set}" = set; then
919 enableval="$enable_multilib"
920 case "${enableval}" in
921 yes) multilib=yes ;;
922 no) multilib=no ;;
923 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
924 esac
925 else
926 multilib=yes
927 fi
928
929
930 if test "${srcdir}" = "."; then
931 if test "${with_target_subdir}" != "."; then
932 libgcj_basedir="${srcdir}/${with_multisrctop}../."
933 else
934 libgcj_basedir="${srcdir}/${with_multisrctop}."
935 fi
936 else
937 libgcj_basedir="${srcdir}/."
938 fi
939
940
941
942 # Make sure we can run config.sub.
943 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
944 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
945 fi
946
947 echo $ac_n "checking host system type""... $ac_c" 1>&6
948 echo "configure:949: checking host system type" >&5
949
950 host_alias=$host
951 case "$host_alias" in
952 NONE)
953 case $nonopt in
954 NONE)
955 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
956 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
957 fi ;;
958 *) host_alias=$nonopt ;;
959 esac ;;
960 esac
961
962 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
963 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
964 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
965 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
966 echo "$ac_t""$host" 1>&6
967
968
969 version=0.0.7
970
971 PACKAGE=libjava
972
973 VERSION=$version
974
975 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
976 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
977 fi
978 cat >> confdefs.h <<EOF
979 #define PACKAGE "$PACKAGE"
980 EOF
981
982 cat >> confdefs.h <<EOF
983 #define VERSION "$VERSION"
984 EOF
985
986
987
988 missing_dir=`cd $ac_aux_dir && pwd`
989 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
990 echo "configure:991: checking for working aclocal" >&5
991 # Run test in a subshell; some versions of sh will print an error if
992 # an executable is not found, even if stderr is redirected.
993 # Redirect stdin to placate older versions of autoconf. Sigh.
994 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
995 ACLOCAL=aclocal
996 echo "$ac_t""found" 1>&6
997 else
998 ACLOCAL="$missing_dir/missing aclocal"
999 echo "$ac_t""missing" 1>&6
1000 fi
1001
1002 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1003 echo "configure:1004: checking for working autoconf" >&5
1004 # Run test in a subshell; some versions of sh will print an error if
1005 # an executable is not found, even if stderr is redirected.
1006 # Redirect stdin to placate older versions of autoconf. Sigh.
1007 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1008 AUTOCONF=autoconf
1009 echo "$ac_t""found" 1>&6
1010 else
1011 AUTOCONF="$missing_dir/missing autoconf"
1012 echo "$ac_t""missing" 1>&6
1013 fi
1014
1015 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1016 echo "configure:1017: checking for working automake" >&5
1017 # Run test in a subshell; some versions of sh will print an error if
1018 # an executable is not found, even if stderr is redirected.
1019 # Redirect stdin to placate older versions of autoconf. Sigh.
1020 if (automake --version) < /dev/null > /dev/null 2>&1; then
1021 AUTOMAKE=automake
1022 echo "$ac_t""found" 1>&6
1023 else
1024 AUTOMAKE="$missing_dir/missing automake"
1025 echo "$ac_t""missing" 1>&6
1026 fi
1027
1028 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1029 echo "configure:1030: checking for working autoheader" >&5
1030 # Run test in a subshell; some versions of sh will print an error if
1031 # an executable is not found, even if stderr is redirected.
1032 # Redirect stdin to placate older versions of autoconf. Sigh.
1033 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1034 AUTOHEADER=autoheader
1035 echo "$ac_t""found" 1>&6
1036 else
1037 AUTOHEADER="$missing_dir/missing autoheader"
1038 echo "$ac_t""missing" 1>&6
1039 fi
1040
1041 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1042 echo "configure:1043: checking for working makeinfo" >&5
1043 # Run test in a subshell; some versions of sh will print an error if
1044 # an executable is not found, even if stderr is redirected.
1045 # Redirect stdin to placate older versions of autoconf. Sigh.
1046 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1047 MAKEINFO=makeinfo
1048 echo "$ac_t""found" 1>&6
1049 else
1050 MAKEINFO="$missing_dir/missing makeinfo"
1051 echo "$ac_t""missing" 1>&6
1052 fi
1053
1054
1055
1056 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
1057 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
1058 # are probably using a cross compiler, which will not be able to fully
1059 # link an executable. This should really be fixed in autoconf
1060 # itself.
1061
1062
1063
1064
1065 # Extract the first word of "gcc", so it can be a program name with args.
1066 set dummy gcc; ac_word=$2
1067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1068 echo "configure:1069: checking for $ac_word" >&5
1069 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1070 echo $ac_n "(cached) $ac_c" 1>&6
1071 else
1072 if test -n "$CC"; then
1073 ac_cv_prog_CC="$CC" # Let the user override the test.
1074 else
1075 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1076 ac_dummy="$PATH"
1077 for ac_dir in $ac_dummy; do
1078 test -z "$ac_dir" && ac_dir=.
1079 if test -f $ac_dir/$ac_word; then
1080 ac_cv_prog_CC="gcc"
1081 break
1082 fi
1083 done
1084 IFS="$ac_save_ifs"
1085 fi
1086 fi
1087 CC="$ac_cv_prog_CC"
1088 if test -n "$CC"; then
1089 echo "$ac_t""$CC" 1>&6
1090 else
1091 echo "$ac_t""no" 1>&6
1092 fi
1093
1094 if test -z "$CC"; then
1095 # Extract the first word of "cc", so it can be a program name with args.
1096 set dummy cc; ac_word=$2
1097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1098 echo "configure:1099: checking for $ac_word" >&5
1099 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1100 echo $ac_n "(cached) $ac_c" 1>&6
1101 else
1102 if test -n "$CC"; then
1103 ac_cv_prog_CC="$CC" # Let the user override the test.
1104 else
1105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1106 ac_prog_rejected=no
1107 ac_dummy="$PATH"
1108 for ac_dir in $ac_dummy; do
1109 test -z "$ac_dir" && ac_dir=.
1110 if test -f $ac_dir/$ac_word; then
1111 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1112 ac_prog_rejected=yes
1113 continue
1114 fi
1115 ac_cv_prog_CC="cc"
1116 break
1117 fi
1118 done
1119 IFS="$ac_save_ifs"
1120 if test $ac_prog_rejected = yes; then
1121 # We found a bogon in the path, so make sure we never use it.
1122 set dummy $ac_cv_prog_CC
1123 shift
1124 if test $# -gt 0; then
1125 # We chose a different compiler from the bogus one.
1126 # However, it has the same basename, so the bogon will be chosen
1127 # first if we set CC to just the basename; use the full file name.
1128 shift
1129 set dummy "$ac_dir/$ac_word" "$@"
1130 shift
1131 ac_cv_prog_CC="$@"
1132 fi
1133 fi
1134 fi
1135 fi
1136 CC="$ac_cv_prog_CC"
1137 if test -n "$CC"; then
1138 echo "$ac_t""$CC" 1>&6
1139 else
1140 echo "$ac_t""no" 1>&6
1141 fi
1142
1143 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1144 fi
1145
1146 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1147 echo "configure:1148: checking whether we are using GNU C" >&5
1148 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1149 echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151 cat > conftest.c <<EOF
1152 #ifdef __GNUC__
1153 yes;
1154 #endif
1155 EOF
1156 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1157 ac_cv_prog_gcc=yes
1158 else
1159 ac_cv_prog_gcc=no
1160 fi
1161 fi
1162
1163 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1164
1165 if test $ac_cv_prog_gcc = yes; then
1166 GCC=yes
1167 ac_test_CFLAGS="${CFLAGS+set}"
1168 ac_save_CFLAGS="$CFLAGS"
1169 CFLAGS=
1170 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1171 echo "configure:1172: checking whether ${CC-cc} accepts -g" >&5
1172 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1173 echo $ac_n "(cached) $ac_c" 1>&6
1174 else
1175 echo 'void f(){}' > conftest.c
1176 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1177 ac_cv_prog_cc_g=yes
1178 else
1179 ac_cv_prog_cc_g=no
1180 fi
1181 rm -f conftest*
1182
1183 fi
1184
1185 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1186 if test "$ac_test_CFLAGS" = set; then
1187 CFLAGS="$ac_save_CFLAGS"
1188 elif test $ac_cv_prog_cc_g = yes; then
1189 CFLAGS="-g -O2"
1190 else
1191 CFLAGS="-O2"
1192 fi
1193 else
1194 GCC=
1195 test "${CFLAGS+set}" = set || CFLAGS="-g"
1196 fi
1197
1198
1199 # Likewise for AC_PROG_CXX.
1200
1201
1202
1203 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1204 do
1205 # Extract the first word of "$ac_prog", so it can be a program name with args.
1206 set dummy $ac_prog; ac_word=$2
1207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1208 echo "configure:1209: checking for $ac_word" >&5
1209 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1211 else
1212 if test -n "$CXX"; then
1213 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1214 else
1215 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1216 ac_dummy="$PATH"
1217 for ac_dir in $ac_dummy; do
1218 test -z "$ac_dir" && ac_dir=.
1219 if test -f $ac_dir/$ac_word; then
1220 ac_cv_prog_CXX="$ac_prog"
1221 break
1222 fi
1223 done
1224 IFS="$ac_save_ifs"
1225 fi
1226 fi
1227 CXX="$ac_cv_prog_CXX"
1228 if test -n "$CXX"; then
1229 echo "$ac_t""$CXX" 1>&6
1230 else
1231 echo "$ac_t""no" 1>&6
1232 fi
1233
1234 test -n "$CXX" && break
1235 done
1236 test -n "$CXX" || CXX="gcc"
1237
1238 test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1239
1240 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1241 echo "configure:1242: checking whether we are using GNU C++" >&5
1242 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1243 echo $ac_n "(cached) $ac_c" 1>&6
1244 else
1245 cat > conftest.C <<EOF
1246 #ifdef __GNUC__
1247 yes;
1248 #endif
1249 EOF
1250 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1251 ac_cv_prog_gxx=yes
1252 else
1253 ac_cv_prog_gxx=no
1254 fi
1255 fi
1256
1257 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1258
1259 if test $ac_cv_prog_gxx = yes; then
1260 GXX=yes
1261 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1262 ac_save_CXXFLAGS="$CXXFLAGS"
1263 CXXFLAGS=
1264 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1265 echo "configure:1266: checking whether ${CXX-g++} accepts -g" >&5
1266 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269 echo 'void f(){}' > conftest.cc
1270 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1271 ac_cv_prog_cxx_g=yes
1272 else
1273 ac_cv_prog_cxx_g=no
1274 fi
1275 rm -f conftest*
1276
1277 fi
1278
1279 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1280 if test "$ac_test_CXXFLAGS" = set; then
1281 CXXFLAGS="$ac_save_CXXFLAGS"
1282 elif test $ac_cv_prog_cxx_g = yes; then
1283 CXXFLAGS="-g -O2"
1284 else
1285 CXXFLAGS="-O2"
1286 fi
1287 else
1288 GXX=
1289 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1290 fi
1291
1292
1293 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
1294 # run it explicitly here, it will be run implicitly before
1295 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1296 # be run before AC_CANONICAL_HOST.
1297 echo $ac_n "checking build system type""... $ac_c" 1>&6
1298 echo "configure:1299: checking build system type" >&5
1299
1300 build_alias=$build
1301 case "$build_alias" in
1302 NONE)
1303 case $nonopt in
1304 NONE) build_alias=$host_alias ;;
1305 *) build_alias=$nonopt ;;
1306 esac ;;
1307 esac
1308
1309 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1310 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313 echo "$ac_t""$build" 1>&6
1314
1315
1316 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1317 set dummy ${ac_tool_prefix}as; ac_word=$2
1318 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1319 echo "configure:1320: checking for $ac_word" >&5
1320 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1321 echo $ac_n "(cached) $ac_c" 1>&6
1322 else
1323 if test -n "$AS"; then
1324 ac_cv_prog_AS="$AS" # Let the user override the test.
1325 else
1326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1327 ac_dummy="$PATH"
1328 for ac_dir in $ac_dummy; do
1329 test -z "$ac_dir" && ac_dir=.
1330 if test -f $ac_dir/$ac_word; then
1331 ac_cv_prog_AS="${ac_tool_prefix}as"
1332 break
1333 fi
1334 done
1335 IFS="$ac_save_ifs"
1336 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1337 fi
1338 fi
1339 AS="$ac_cv_prog_AS"
1340 if test -n "$AS"; then
1341 echo "$ac_t""$AS" 1>&6
1342 else
1343 echo "$ac_t""no" 1>&6
1344 fi
1345
1346
1347
1348 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1349 set dummy ${ac_tool_prefix}ar; ac_word=$2
1350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1351 echo "configure:1352: checking for $ac_word" >&5
1352 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1353 echo $ac_n "(cached) $ac_c" 1>&6
1354 else
1355 if test -n "$AR"; then
1356 ac_cv_prog_AR="$AR" # Let the user override the test.
1357 else
1358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1359 ac_dummy="$PATH"
1360 for ac_dir in $ac_dummy; do
1361 test -z "$ac_dir" && ac_dir=.
1362 if test -f $ac_dir/$ac_word; then
1363 ac_cv_prog_AR="${ac_tool_prefix}ar"
1364 break
1365 fi
1366 done
1367 IFS="$ac_save_ifs"
1368 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1369 fi
1370 fi
1371 AR="$ac_cv_prog_AR"
1372 if test -n "$AR"; then
1373 echo "$ac_t""$AR" 1>&6
1374 else
1375 echo "$ac_t""no" 1>&6
1376 fi
1377
1378
1379
1380 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1381 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1383 echo "configure:1384: checking for $ac_word" >&5
1384 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1385 echo $ac_n "(cached) $ac_c" 1>&6
1386 else
1387 if test -n "$RANLIB"; then
1388 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1389 else
1390 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1391 ac_dummy="$PATH"
1392 for ac_dir in $ac_dummy; do
1393 test -z "$ac_dir" && ac_dir=.
1394 if test -f $ac_dir/$ac_word; then
1395 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1396 break
1397 fi
1398 done
1399 IFS="$ac_save_ifs"
1400 fi
1401 fi
1402 RANLIB="$ac_cv_prog_RANLIB"
1403 if test -n "$RANLIB"; then
1404 echo "$ac_t""$RANLIB" 1>&6
1405 else
1406 echo "$ac_t""no" 1>&6
1407 fi
1408
1409
1410 if test -z "$ac_cv_prog_RANLIB"; then
1411 if test -n "$ac_tool_prefix"; then
1412 # Extract the first word of "ranlib", so it can be a program name with args.
1413 set dummy ranlib; ac_word=$2
1414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1415 echo "configure:1416: checking for $ac_word" >&5
1416 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1417 echo $ac_n "(cached) $ac_c" 1>&6
1418 else
1419 if test -n "$RANLIB"; then
1420 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1421 else
1422 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1423 ac_dummy="$PATH"
1424 for ac_dir in $ac_dummy; do
1425 test -z "$ac_dir" && ac_dir=.
1426 if test -f $ac_dir/$ac_word; then
1427 ac_cv_prog_RANLIB="ranlib"
1428 break
1429 fi
1430 done
1431 IFS="$ac_save_ifs"
1432 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1433 fi
1434 fi
1435 RANLIB="$ac_cv_prog_RANLIB"
1436 if test -n "$RANLIB"; then
1437 echo "$ac_t""$RANLIB" 1>&6
1438 else
1439 echo "$ac_t""no" 1>&6
1440 fi
1441
1442 else
1443 RANLIB=":"
1444 fi
1445 fi
1446
1447
1448 # Find a good install program. We prefer a C program (faster),
1449 # so one script is as good as another. But avoid the broken or
1450 # incompatible versions:
1451 # SysV /etc/install, /usr/sbin/install
1452 # SunOS /usr/etc/install
1453 # IRIX /sbin/install
1454 # AIX /bin/install
1455 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1456 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1457 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1458 # ./install, which can be erroneously created by make from ./install.sh.
1459 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1460 echo "configure:1461: checking for a BSD compatible install" >&5
1461 if test -z "$INSTALL"; then
1462 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464 else
1465 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1466 for ac_dir in $PATH; do
1467 # Account for people who put trailing slashes in PATH elements.
1468 case "$ac_dir/" in
1469 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1470 *)
1471 # OSF1 and SCO ODT 3.0 have their own names for install.
1472 # Don't use installbsd from OSF since it installs stuff as root
1473 # by default.
1474 for ac_prog in ginstall scoinst install; do
1475 if test -f $ac_dir/$ac_prog; then
1476 if test $ac_prog = install &&
1477 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1478 # AIX install. It has an incompatible calling convention.
1479 :
1480 else
1481 ac_cv_path_install="$ac_dir/$ac_prog -c"
1482 break 2
1483 fi
1484 fi
1485 done
1486 ;;
1487 esac
1488 done
1489 IFS="$ac_save_IFS"
1490
1491 fi
1492 if test "${ac_cv_path_install+set}" = set; then
1493 INSTALL="$ac_cv_path_install"
1494 else
1495 # As a last resort, use the slow shell script. We don't cache a
1496 # path for INSTALL within a source directory, because that will
1497 # break other packages using the cache if that directory is
1498 # removed, or if the path is relative.
1499 INSTALL="$ac_install_sh"
1500 fi
1501 fi
1502 echo "$ac_t""$INSTALL" 1>&6
1503
1504 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1505 # It thinks the first close brace ends the variable substitution.
1506 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1507
1508 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1509
1510 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1511
1512
1513 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1514 echo "configure:1515: checking whether to enable maintainer-specific portions of Makefiles" >&5
1515 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1516 if test "${enable_maintainer_mode+set}" = set; then
1517 enableval="$enable_maintainer_mode"
1518 USE_MAINTAINER_MODE=$enableval
1519 else
1520 USE_MAINTAINER_MODE=no
1521 fi
1522
1523 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1524
1525
1526 if test $USE_MAINTAINER_MODE = yes; then
1527 MAINTAINER_MODE_TRUE=
1528 MAINTAINER_MODE_FALSE='#'
1529 else
1530 MAINTAINER_MODE_TRUE='#'
1531 MAINTAINER_MODE_FALSE=
1532 fi
1533 MAINT=$MAINTAINER_MODE_TRUE
1534
1535
1536
1537 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1538 # at least currently, we never actually build a program, so we never
1539 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1540 # fails, because we are probably configuring with a cross compiler
1541 # which cant create executables. So we include AC_EXEEXT to keep
1542 # automake happy, but we dont execute it, since we dont care about
1543 # the result.
1544 if false; then
1545
1546
1547 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1548 echo "configure:1549: checking for executable suffix" >&5
1549 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1550 echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1553 ac_cv_exeext=.exe
1554 else
1555 rm -f conftest*
1556 echo 'int main () { return 0; }' > conftest.$ac_ext
1557 ac_cv_exeext=
1558 if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1559 for file in conftest.*; do
1560 case $file in
1561 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1562 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1563 esac
1564 done
1565 else
1566 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1567 fi
1568 rm -f conftest*
1569 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1570 fi
1571 fi
1572
1573 EXEEXT=""
1574 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1575 echo "$ac_t""${ac_cv_exeext}" 1>&6
1576 ac_exeext=$EXEEXT
1577
1578 fi
1579
1580 # configure.host sets the following important variables
1581 # libgcj_cflags - host specific C compiler flags
1582 # libgcj_cxxflags - host specific C++ compiler flags
1583 # libgcj_javaflags - host specific Java compiler flags
1584
1585 libgcj_cflags=
1586 libgcj_cxxflags=
1587 libgcj_javaflags=
1588
1589 . ${libgcj_basedir}/configure.host
1590
1591 case ${libgcj_basedir} in
1592 /* | A-Za-z:/\\*) libgcj_flagbasedir=${libgcj_basedir} ;;
1593 *) libgcj_flagbasedir='$(top_builddir)/'${libgcj_basedir} ;;
1594 esac
1595
1596 LIBGCJ_CFLAGS="${libgcj_cflags}"
1597 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1598 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608 # Only use libltdl for native builds.
1609 if test -z "${with_cross_host}"; then
1610 case "$enable_ltdl_convenience" in
1611 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1612 "") enable_ltdl_convenience=yes
1613 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1614 esac
1615 LIBLTDL='${top_builddir}/libltdl'/libltdlc.la
1616 INCLTDL='-I${top_builddir}/libltdl'
1617
1618
1619 DIRLTDL=libltdl
1620 cat >> confdefs.h <<\EOF
1621 #define USE_LTDL 1
1622 EOF
1623
1624 # Sigh. Libtool's macro doesn't do the right thing.
1625 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1626 fi
1627
1628
1629
1630 # Check whether --enable-shared or --disable-shared was given.
1631 if test "${enable_shared+set}" = set; then
1632 enableval="$enable_shared"
1633 p=${PACKAGE-default}
1634 case "$enableval" in
1635 yes) enable_shared=yes ;;
1636 no) enable_shared=no ;;
1637 *)
1638 enable_shared=no
1639 # Look at the argument we got. We use all the common list separators.
1640 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1641 for pkg in $enableval; do
1642 if test "X$pkg" = "X$p"; then
1643 enable_shared=yes
1644 fi
1645 done
1646 IFS="$ac_save_ifs"
1647 ;;
1648 esac
1649 else
1650 enable_shared=yes
1651 fi
1652
1653 # Check whether --enable-static or --disable-static was given.
1654 if test "${enable_static+set}" = set; then
1655 enableval="$enable_static"
1656 p=${PACKAGE-default}
1657 case "$enableval" in
1658 yes) enable_static=yes ;;
1659 no) enable_static=no ;;
1660 *)
1661 enable_static=no
1662 # Look at the argument we got. We use all the common list separators.
1663 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1664 for pkg in $enableval; do
1665 if test "X$pkg" = "X$p"; then
1666 enable_static=yes
1667 fi
1668 done
1669 IFS="$ac_save_ifs"
1670 ;;
1671 esac
1672 else
1673 enable_static=yes
1674 fi
1675
1676 # Check whether --enable-fast-install or --disable-fast-install was given.
1677 if test "${enable_fast_install+set}" = set; then
1678 enableval="$enable_fast_install"
1679 p=${PACKAGE-default}
1680 case "$enableval" in
1681 yes) enable_fast_install=yes ;;
1682 no) enable_fast_install=no ;;
1683 *)
1684 enable_fast_install=no
1685 # Look at the argument we got. We use all the common list separators.
1686 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1687 for pkg in $enableval; do
1688 if test "X$pkg" = "X$p"; then
1689 enable_fast_install=yes
1690 fi
1691 done
1692 IFS="$ac_save_ifs"
1693 ;;
1694 esac
1695 else
1696 enable_fast_install=yes
1697 fi
1698
1699 # Extract the first word of "ranlib", so it can be a program name with args.
1700 set dummy ranlib; ac_word=$2
1701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1702 echo "configure:1703: checking for $ac_word" >&5
1703 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705 else
1706 if test -n "$RANLIB"; then
1707 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1708 else
1709 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1710 ac_dummy="$PATH"
1711 for ac_dir in $ac_dummy; do
1712 test -z "$ac_dir" && ac_dir=.
1713 if test -f $ac_dir/$ac_word; then
1714 ac_cv_prog_RANLIB="ranlib"
1715 break
1716 fi
1717 done
1718 IFS="$ac_save_ifs"
1719 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1720 fi
1721 fi
1722 RANLIB="$ac_cv_prog_RANLIB"
1723 if test -n "$RANLIB"; then
1724 echo "$ac_t""$RANLIB" 1>&6
1725 else
1726 echo "$ac_t""no" 1>&6
1727 fi
1728
1729 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1730 if test "${with_gnu_ld+set}" = set; then
1731 withval="$with_gnu_ld"
1732 test "$withval" = no || with_gnu_ld=yes
1733 else
1734 with_gnu_ld=no
1735 fi
1736
1737 ac_prog=ld
1738 if test "$ac_cv_prog_gcc" = yes; then
1739 # Check if gcc -print-prog-name=ld gives a path.
1740 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1741 echo "configure:1742: checking for ld used by GCC" >&5
1742 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1743 case "$ac_prog" in
1744 # Accept absolute paths.
1745 [\\/]* | [A-Za-z]:[\\/]*)
1746 re_direlt='/[^/][^/]*/\.\./'
1747 # Canonicalize the path of ld
1748 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1749 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1750 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1751 done
1752 test -z "$LD" && LD="$ac_prog"
1753 ;;
1754 "")
1755 # If it fails, then pretend we aren't using GCC.
1756 ac_prog=ld
1757 ;;
1758 *)
1759 # If it is relative, then search for the first ld in PATH.
1760 with_gnu_ld=unknown
1761 ;;
1762 esac
1763 elif test "$with_gnu_ld" = yes; then
1764 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1765 echo "configure:1766: checking for GNU ld" >&5
1766 else
1767 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1768 echo "configure:1769: checking for non-GNU ld" >&5
1769 fi
1770 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1771 echo $ac_n "(cached) $ac_c" 1>&6
1772 else
1773 if test -z "$LD"; then
1774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1775 for ac_dir in $PATH; do
1776 test -z "$ac_dir" && ac_dir=.
1777 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1778 ac_cv_path_LD="$ac_dir/$ac_prog"
1779 # Check to see if the program is GNU ld. I'd rather use --version,
1780 # but apparently some GNU ld's only accept -v.
1781 # Break only if it was the GNU/non-GNU ld that we prefer.
1782 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1783 test "$with_gnu_ld" != no && break
1784 else
1785 test "$with_gnu_ld" != yes && break
1786 fi
1787 fi
1788 done
1789 IFS="$ac_save_ifs"
1790 else
1791 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1792 fi
1793 fi
1794
1795 LD="$ac_cv_path_LD"
1796 if test -n "$LD"; then
1797 echo "$ac_t""$LD" 1>&6
1798 else
1799 echo "$ac_t""no" 1>&6
1800 fi
1801 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1802 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1803 echo "configure:1804: checking if the linker ($LD) is GNU ld" >&5
1804 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1805 echo $ac_n "(cached) $ac_c" 1>&6
1806 else
1807 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1808 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1809 ac_cv_prog_gnu_ld=yes
1810 else
1811 ac_cv_prog_gnu_ld=no
1812 fi
1813 fi
1814
1815 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1816
1817
1818 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1819 echo "configure:1820: checking for BSD-compatible nm" >&5
1820 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1821 echo $ac_n "(cached) $ac_c" 1>&6
1822 else
1823 if test -n "$NM"; then
1824 # Let the user override the test.
1825 ac_cv_path_NM="$NM"
1826 else
1827 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1828 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1829 test -z "$ac_dir" && ac_dir=.
1830 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1831 # Check to see if the nm accepts a BSD-compat flag.
1832 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1833 # nm: unknown option "B" ignored
1834 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1835 ac_cv_path_NM="$ac_dir/nm -B"
1836 break
1837 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1838 ac_cv_path_NM="$ac_dir/nm -p"
1839 break
1840 else
1841 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1842 continue # so that we can try to find one that supports BSD flags
1843 fi
1844 fi
1845 done
1846 IFS="$ac_save_ifs"
1847 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1848 fi
1849 fi
1850
1851 NM="$ac_cv_path_NM"
1852 echo "$ac_t""$NM" 1>&6
1853
1854 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1855 echo "configure:1856: checking whether ln -s works" >&5
1856 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1857 echo $ac_n "(cached) $ac_c" 1>&6
1858 else
1859 rm -f conftestdata
1860 if ln -s X conftestdata 2>/dev/null
1861 then
1862 rm -f conftestdata
1863 ac_cv_prog_LN_S="ln -s"
1864 else
1865 ac_cv_prog_LN_S=ln
1866 fi
1867 fi
1868 LN_S="$ac_cv_prog_LN_S"
1869 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1870 echo "$ac_t""yes" 1>&6
1871 else
1872 echo "$ac_t""no" 1>&6
1873 fi
1874
1875
1876 case "$target" in
1877 NONE) lt_target="$host" ;;
1878 *) lt_target="$target" ;;
1879 esac
1880
1881 # Check for any special flags to pass to ltconfig.
1882 libtool_flags="--cache-file=$cache_file"
1883 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1884 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1885 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1886 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1887 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1888 libtool_flags="$libtool_flags --enable-dlopen"
1889
1890 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1891 if test "${enable_libtool_lock+set}" = set; then
1892 enableval="$enable_libtool_lock"
1893 :
1894 fi
1895
1896 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1897 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1898
1899 # Some flags need to be propagated to the compiler or linker for good
1900 # libtool support.
1901 case "$lt_target" in
1902 *-*-irix6*)
1903 # Find out which ABI we are using.
1904 echo '#line 1905 "configure"' > conftest.$ac_ext
1905 if { (eval echo configure:1906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1906 case "`/usr/bin/file conftest.o`" in
1907 *32-bit*)
1908 LD="${LD-ld} -32"
1909 ;;
1910 *N32*)
1911 LD="${LD-ld} -n32"
1912 ;;
1913 *64-bit*)
1914 LD="${LD-ld} -64"
1915 ;;
1916 esac
1917 fi
1918 rm -rf conftest*
1919 ;;
1920
1921 *-*-sco3.2v5*)
1922 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1923 SAVE_CFLAGS="$CFLAGS"
1924 CFLAGS="$CFLAGS -belf"
1925 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1926 echo "configure:1927: checking whether the C compiler needs -belf" >&5
1927 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1928 echo $ac_n "(cached) $ac_c" 1>&6
1929 else
1930 cat > conftest.$ac_ext <<EOF
1931 #line 1932 "configure"
1932 #include "confdefs.h"
1933
1934 int main() {
1935
1936 ; return 0; }
1937 EOF
1938 if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1939 rm -rf conftest*
1940 lt_cv_cc_needs_belf=yes
1941 else
1942 echo "configure: failed program was:" >&5
1943 cat conftest.$ac_ext >&5
1944 rm -rf conftest*
1945 lt_cv_cc_needs_belf=no
1946 fi
1947 rm -f conftest*
1948 fi
1949
1950 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1951 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1952 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1953 CFLAGS="$SAVE_CFLAGS"
1954 fi
1955 ;;
1956
1957
1958 esac
1959
1960
1961 # Save cache, so that ltconfig can load it
1962 cat > confcache <<\EOF
1963 # This file is a shell script that caches the results of configure
1964 # tests run on this system so they can be shared between configure
1965 # scripts and configure runs. It is not useful on other systems.
1966 # If it contains results you don't want to keep, you may remove or edit it.
1967 #
1968 # By default, configure uses ./config.cache as the cache file,
1969 # creating it if it does not exist already. You can give configure
1970 # the --cache-file=FILE option to use a different cache file; that is
1971 # what configure does when it calls configure scripts in
1972 # subdirectories, so they share the cache.
1973 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1974 # config.status only pays attention to the cache file if you give it the
1975 # --recheck option to rerun configure.
1976 #
1977 EOF
1978 # The following way of writing the cache mishandles newlines in values,
1979 # but we know of no workaround that is simple, portable, and efficient.
1980 # So, don't put newlines in cache variables' values.
1981 # Ultrix sh set writes to stderr and can't be redirected directly,
1982 # and sets the high bit in the cache file unless we assign to the vars.
1983 (set) 2>&1 |
1984 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1985 *ac_space=\ *)
1986 # `set' does not quote correctly, so add quotes (double-quote substitution
1987 # turns \\\\ into \\, and sed turns \\ into \).
1988 sed -n \
1989 -e "s/'/'\\\\''/g" \
1990 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1991 ;;
1992 *)
1993 # `set' quotes correctly as required by POSIX, so do not add quotes.
1994 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1995 ;;
1996 esac >> confcache
1997 if cmp -s $cache_file confcache; then
1998 :
1999 else
2000 if test -w $cache_file; then
2001 echo "updating cache $cache_file"
2002 cat confcache > $cache_file
2003 else
2004 echo "not updating unwritable cache $cache_file"
2005 fi
2006 fi
2007 rm -f confcache
2008
2009
2010 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2011 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2012 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2013 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2014 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2015 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2016 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
2017 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2018
2019 # Reload cache, that may have been modified by ltconfig
2020 if test -r "$cache_file"; then
2021 echo "loading cache $cache_file"
2022 . $cache_file
2023 else
2024 echo "creating cache $cache_file"
2025 > $cache_file
2026 fi
2027
2028
2029 # This can be used to rebuild libtool when needed
2030 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2031
2032 # Always use our own libtool.
2033 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2034
2035 # Redirect the config.log output again, so that the ltconfig log is not
2036 # clobbered by the next message.
2037 exec 5>>./config.log
2038
2039 subdirs="$DIRLTDL"
2040
2041
2042 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2043 COMPPATH=.
2044 else
2045 COMPPATH=..
2046 fi
2047
2048
2049
2050
2051 if test -d $srcdir/testsuite; then
2052 TESTSUBDIR_TRUE=
2053 TESTSUBDIR_FALSE='#'
2054 else
2055 TESTSUBDIR_TRUE='#'
2056 TESTSUBDIR_FALSE=
2057 fi
2058
2059 # Check whether --enable-fast-character or --disable-fast-character was given.
2060 if test "${enable_fast_character+set}" = set; then
2061 enableval="$enable_fast_character"
2062 # Nothing
2063
2064 else
2065 cat >> confdefs.h <<\EOF
2066 #define COMPACT_CHARACTER 1
2067 EOF
2068
2069 fi
2070
2071
2072 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2073 if test "${enable_getenv_properties+set}" = set; then
2074 enableval="$enable_getenv_properties"
2075 :
2076 fi
2077
2078
2079 if test -n "$enable_getenv_properties"; then
2080 enable_getenv_properties=${enable_getenv_properties_default-yes}
2081 fi
2082 if test "$enable_getenv_properties" = no; then
2083 cat >> confdefs.h <<\EOF
2084 #define DISABLE_GETENV_PROPERTIES 1
2085 EOF
2086
2087 fi
2088
2089 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2090 if test "${enable_libgcj_debug+set}" = set; then
2091 enableval="$enable_libgcj_debug"
2092 if test "$enable_libgcj_debug" = yes; then
2093 cat >> confdefs.h <<\EOF
2094 #define DEBUG 1
2095 EOF
2096
2097 fi
2098 fi
2099
2100
2101 # Check whether --enable-interpreter or --disable-interpreter was given.
2102 if test "${enable_interpreter+set}" = set; then
2103 enableval="$enable_interpreter"
2104 if test "$enable_interpreter" = yes; then
2105 # This can also be set in configure.host.
2106 libgcj_interpreter=yes
2107 elif test "$enable_interpreter" = no; then
2108 libgcj_interpreter=no
2109 fi
2110 fi
2111
2112
2113 if test "$libgcj_interpreter" = yes; then
2114 cat >> confdefs.h <<\EOF
2115 #define INTERPRETER 1
2116 EOF
2117
2118 fi
2119
2120 EXCEPTIONSPEC=
2121 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2122 if test "${enable_sjlj_exceptions+set}" = set; then
2123 enableval="$enable_sjlj_exceptions"
2124 if test "$enable_sjlj_exceptions" = yes; then
2125 # This can be set in configure.host.
2126 libgcj_sjlj=yes
2127 fi
2128 fi
2129
2130
2131 if test "$libgcj_sjlj" = yes; then
2132 EXCEPTIONSPEC="-fsjlj-exceptions"
2133 cat >> confdefs.h <<\EOF
2134 #define SJLJ_EXCEPTIONS 1
2135 EOF
2136
2137 fi
2138
2139 FORCELIBGCCSPEC=
2140 if test "$ac_cv_prog_gnu_ld" = yes; then
2141 FORCELIBGCCSPEC="-u __rethrow -u __frame_state_for -lgcc"
2142 fi
2143
2144 echo $ac_n "checking for data_start""... $ac_c" 1>&6
2145 echo "configure:2146: checking for data_start" >&5
2146 LIBDATASTARTSPEC=
2147 NEEDS_DATA_START=
2148 cat > conftest.$ac_ext <<EOF
2149 #line 2150 "configure"
2150 #include "confdefs.h"
2151 extern int data_start;
2152 int main() {
2153 return ((int) &data_start);
2154 ; return 0; }
2155 EOF
2156 if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2157 rm -rf conftest*
2158 echo "$ac_t""found it" 1>&6
2159 else
2160 echo "configure: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 rm -rf conftest*
2163 LIBDATASTARTSPEC="-u data_start -lgcjdata"
2164 NEEDS_DATA_START=yes
2165 echo "$ac_t""missing" 1>&6
2166 fi
2167 rm -f conftest*
2168
2169
2170 # Check whether --enable-java-net or --disable-java-net was given.
2171 if test "${enable_java_net+set}" = set; then
2172 enableval="$enable_java_net"
2173 :
2174 fi
2175
2176
2177 if test -n "$enable_java_net"; then
2178 enable_java_net=${enable_java_net_default-yes}
2179 fi
2180 if test "$enable_java_net" = no; then
2181 cat >> confdefs.h <<\EOF
2182 #define DISABLE_JAVA_NET 1
2183 EOF
2184
2185 fi
2186
2187 TARGET_ECOS="no"
2188 # Check whether --with-ecos or --without-ecos was given.
2189 if test "${with_ecos+set}" = set; then
2190 withval="$with_ecos"
2191 TARGET_ECOS="$with_ecos"
2192
2193 fi
2194
2195
2196 case "$TARGET_ECOS" in
2197 no)
2198 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2199 PROCESS=${PROCESS-Posix}
2200 ;;
2201 *)
2202 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2203 PROCESS=Ecos
2204 cat >> confdefs.h <<\EOF
2205 #define ECOS 1
2206 EOF
2207
2208 ;;
2209 esac
2210
2211 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2212 echo "configure:2213: checking how to run the C preprocessor" >&5
2213 # On Suns, sometimes $CPP names a directory.
2214 if test -n "$CPP" && test -d "$CPP"; then
2215 CPP=
2216 fi
2217 if test -z "$CPP"; then
2218 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2219 echo $ac_n "(cached) $ac_c" 1>&6
2220 else
2221 # This must be in double quotes, not single quotes, because CPP may get
2222 # substituted into the Makefile and "${CC-cc}" will confuse make.
2223 CPP="${CC-cc} -E"
2224 # On the NeXT, cc -E runs the code through the compiler's parser,
2225 # not just through cpp.
2226 cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 #include <assert.h>
2230 Syntax Error
2231 EOF
2232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2233 { (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2235 if test -z "$ac_err"; then
2236 :
2237 else
2238 echo "$ac_err" >&5
2239 echo "configure: failed program was:" >&5
2240 cat conftest.$ac_ext >&5
2241 rm -rf conftest*
2242 CPP="${CC-cc} -E -traditional-cpp"
2243 cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 #include <assert.h>
2247 Syntax Error
2248 EOF
2249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2250 { (eval echo configure:2251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2252 if test -z "$ac_err"; then
2253 :
2254 else
2255 echo "$ac_err" >&5
2256 echo "configure: failed program was:" >&5
2257 cat conftest.$ac_ext >&5
2258 rm -rf conftest*
2259 CPP="${CC-cc} -nologo -E"
2260 cat > conftest.$ac_ext <<EOF
2261 #line 2262 "configure"
2262 #include "confdefs.h"
2263 #include <assert.h>
2264 Syntax Error
2265 EOF
2266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2267 { (eval echo configure:2268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2269 if test -z "$ac_err"; then
2270 :
2271 else
2272 echo "$ac_err" >&5
2273 echo "configure: failed program was:" >&5
2274 cat conftest.$ac_ext >&5
2275 rm -rf conftest*
2276 CPP=/lib/cpp
2277 fi
2278 rm -f conftest*
2279 fi
2280 rm -f conftest*
2281 fi
2282 rm -f conftest*
2283 ac_cv_prog_CPP="$CPP"
2284 fi
2285 CPP="$ac_cv_prog_CPP"
2286 else
2287 ac_cv_prog_CPP="$CPP"
2288 fi
2289 echo "$ac_t""$CPP" 1>&6
2290
2291 cat > conftest.$ac_ext <<EOF
2292 #line 2293 "configure"
2293 #include "confdefs.h"
2294 #include <stdint.h>
2295 EOF
2296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2297 egrep "uint32_t" >/dev/null 2>&1; then
2298 rm -rf conftest*
2299 cat >> confdefs.h <<\EOF
2300 #define HAVE_INT32_DEFINED 1
2301 EOF
2302
2303 fi
2304 rm -f conftest*
2305
2306 cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <inttypes.h>
2310 EOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312 egrep "uint32_t" >/dev/null 2>&1; then
2313 rm -rf conftest*
2314 cat >> confdefs.h <<\EOF
2315 #define HAVE_INT32_DEFINED 1
2316 EOF
2317
2318 fi
2319 rm -f conftest*
2320
2321 cat > conftest.$ac_ext <<EOF
2322 #line 2323 "configure"
2323 #include "confdefs.h"
2324 #include <sys/types.h>
2325 EOF
2326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2327 egrep "u_int32_t" >/dev/null 2>&1; then
2328 rm -rf conftest*
2329 cat >> confdefs.h <<\EOF
2330 #define HAVE_BSD_INT32_DEFINED 1
2331 EOF
2332
2333 fi
2334 rm -f conftest*
2335
2336 cat > conftest.$ac_ext <<EOF
2337 #line 2338 "configure"
2338 #include "confdefs.h"
2339 #include <sys/config.h>
2340 EOF
2341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2342 egrep "u_int32_t" >/dev/null 2>&1; then
2343 rm -rf conftest*
2344 cat >> confdefs.h <<\EOF
2345 #define HAVE_BSD_INT32_DEFINED 1
2346 EOF
2347
2348 fi
2349 rm -f conftest*
2350
2351
2352
2353 cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 #include <time.h>
2357 EOF
2358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2359 egrep "mktime" >/dev/null 2>&1; then
2360 rm -rf conftest*
2361 cat >> confdefs.h <<\EOF
2362 #define HAVE_MKTIME 1
2363 EOF
2364
2365 fi
2366 rm -f conftest*
2367
2368 cat > conftest.$ac_ext <<EOF
2369 #line 2370 "configure"
2370 #include "confdefs.h"
2371 #include <time.h>
2372 EOF
2373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2374 egrep "localtime" >/dev/null 2>&1; then
2375 rm -rf conftest*
2376 cat >> confdefs.h <<\EOF
2377 #define HAVE_LOCALTIME 1
2378 EOF
2379
2380 fi
2381 rm -f conftest*
2382
2383
2384 test -d java || mkdir java
2385 test -d java/io || mkdir java/io
2386
2387
2388 test -d java/lang || mkdir java/lang
2389
2390
2391
2392 SYSTEMSPEC=
2393
2394
2395 # Check whether --with-system-zlib or --without-system-zlib was given.
2396 if test "${with_system_zlib+set}" = set; then
2397 withval="$with_system_zlib"
2398 :
2399 fi
2400
2401 ZLIBSPEC=
2402
2403
2404 libsubdir=.libs
2405
2406 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
2407 echo "configure:2408: checking for garbage collector to use" >&5
2408 # Check whether --enable-java-gc or --disable-java-gc was given.
2409 if test "${enable_java_gc+set}" = set; then
2410 enableval="$enable_java_gc"
2411
2412 GC=$enableval
2413 else
2414 GC=boehm
2415 fi
2416
2417 GCLIBS=
2418 GCINCS=
2419 GCDEPS=
2420 GCOBJS=
2421 GCSPEC=
2422 case "$GC" in
2423 boehm)
2424 echo "$ac_t""boehm" 1>&6
2425 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
2426 # We include the path to the boehm-gc build directory.
2427 # See Makefile.am to understand why.
2428 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
2429 GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
2430 GCSPEC='-lgcjgc'
2431 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
2432 GCOBJS=boehm.lo
2433 GCHDR=boehm-gc.h
2434 cat >> confdefs.h <<\EOF
2435 #define HAVE_BOEHM_GC 1
2436 EOF
2437
2438 ;;
2439 no)
2440 echo "$ac_t""none" 1>&6
2441 GCOBJS=nogc.lo
2442 GCHDR=no-gc.h
2443 ;;
2444 *)
2445 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
2446 ;;
2447 esac
2448
2449
2450
2451
2452
2453
2454
2455
2456 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
2457 echo "configure:2458: checking for threads package to use" >&5
2458 # Check whether --enable-threads or --disable-threads was given.
2459 if test "${enable_threads+set}" = set; then
2460 enableval="$enable_threads"
2461 THREADS=$enableval
2462 else
2463 THREADS=no
2464 fi
2465
2466
2467 if test "$THREADS" = yes; then
2468 case "$host" in
2469 *-*-vxworks*)
2470 THREADS=vxworks
2471 ;;
2472 *-*-linux*)
2473 # FIXME: this isn't correct in all cases.
2474 THREADS=posix
2475 ;;
2476 *-*-win*)
2477 THREADS=win32
2478 ;;
2479 *-*-irix*)
2480 # FIXME: for now, choose POSIX, because we implement that.
2481 # Later, choose irix threads.
2482 THREADS=posix
2483 ;;
2484 *-*-solaris*)
2485 # FIXME: for now, choose POSIX, because we implement that.
2486 # Later, choose solaris threads.
2487 THREADS=posix
2488 ;;
2489 *)
2490 # For now.
2491 THREADS=none
2492 ;;
2493 esac
2494 fi
2495
2496 case "$THREADS" in
2497 no | none | single)
2498 THREADS=none
2499 ;;
2500 posix | pthreads)
2501 THREADS=posix
2502 case "$host" in
2503 *-*-linux*)
2504 cat >> confdefs.h <<\EOF
2505 #define LINUX_THREADS 1
2506 EOF
2507
2508 ;;
2509 esac
2510 ;;
2511 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
2512 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
2513 ;;
2514 *)
2515 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
2516 ;;
2517 esac
2518 echo "$ac_t""$THREADS" 1>&6
2519
2520 THREADLIBS=
2521 THREADINCS=
2522 THREADDEPS=
2523 THREADOBJS=
2524 THREADH=
2525 THREADSPEC=
2526 case "$THREADS" in
2527 posix)
2528 THREADLIBS=-lpthread
2529 THREADSPEC=-lpthread
2530 THREADOBJS=posix-threads.lo
2531 THREADH=posix-threads.h
2532 # MIT pthreads doesn't seem to have the mutexattr functions.
2533 # But for now we don't check for it. We just assume you aren't
2534 # using MIT pthreads.
2535 cat >> confdefs.h <<\EOF
2536 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
2537 EOF
2538
2539 ;;
2540
2541 none)
2542 THREADOBJS=no-threads.lo
2543 THREADH=no-threads.h
2544 ;;
2545 esac
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555 if test "$GCC" = yes; then
2556 USING_GCC_TRUE=
2557 USING_GCC_FALSE='#'
2558 else
2559 USING_GCC_TRUE='#'
2560 USING_GCC_FALSE=
2561 fi
2562
2563 CANADIAN=no
2564 NULL_TARGET=no
2565 NATIVE=yes
2566
2567 # Find eh-common.h and support headers. If we're in the tree with
2568 # gcc, then look there. Otherwise look in compat-include. If all else
2569 # fails, just hope the user has set things up somehow.
2570 if test -r $srcdir/../gcc/eh-common.h; then
2571 EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
2572 else
2573 if test -d $srcdir/../compat-include; then
2574 EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
2575 else
2576 EH_COMMON_INCLUDE=
2577 fi
2578 fi
2579
2580 if test -n "${with_cross_host}"; then
2581 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
2582 # may not work correctly, because the compiler may not be able to
2583 # link executables.
2584
2585 # We assume newlib. This lets us hard-code the functions we know
2586 # we'll have.
2587 cat >> confdefs.h <<\EOF
2588 #define HAVE_MEMMOVE 1
2589 EOF
2590
2591 cat >> confdefs.h <<\EOF
2592 #define HAVE_MEMCPY 1
2593 EOF
2594
2595 cat >> confdefs.h <<\EOF
2596 #define HAVE_STRERROR 1
2597 EOF
2598
2599 cat >> confdefs.h <<\EOF
2600 #define HAVE_GMTIME_R 1
2601 EOF
2602
2603 cat >> confdefs.h <<\EOF
2604 #define HAVE_LOCALTIME_R 1
2605 EOF
2606
2607 cat >> confdefs.h <<\EOF
2608 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
2609 EOF
2610
2611 cat >> confdefs.h <<\EOF
2612 #define HAVE_ALLOCA 1
2613 EOF
2614
2615
2616 cat >> confdefs.h <<\EOF
2617 #define NO_GETUID 1
2618 EOF
2619
2620
2621 ZLIBSPEC=-lzgcj
2622
2623 # If Canadian cross, then don't pick up tools from the build
2624 # directory.
2625 if test "$build" != "$with_cross_host"; then
2626 CANADIAN=yes
2627 EH_COMMON_INCLUDE=
2628 GCJ="${target_alias}-gcj"
2629 else
2630 GCJ=
2631 fi
2632 NATIVE=no
2633 else
2634 for ac_func in strerror ioctl select fstat open fsync sleep
2635 do
2636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2637 echo "configure:2638: checking for $ac_func" >&5
2638 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2639 echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641 cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 /* System header to define __stub macros and hopefully few prototypes,
2645 which can conflict with char $ac_func(); below. */
2646 #include <assert.h>
2647 /* Override any gcc2 internal prototype to avoid an error. */
2648 /* We use char because int might match the return type of a gcc2
2649 builtin and then its argument prototype would still apply. */
2650 char $ac_func();
2651
2652 int main() {
2653
2654 /* The GNU C library defines this for functions which it implements
2655 to always fail with ENOSYS. Some functions are actually named
2656 something starting with __ and the normal name is an alias. */
2657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2658 choke me
2659 #else
2660 $ac_func();
2661 #endif
2662
2663 ; return 0; }
2664 EOF
2665 if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2666 rm -rf conftest*
2667 eval "ac_cv_func_$ac_func=yes"
2668 else
2669 echo "configure: failed program was:" >&5
2670 cat conftest.$ac_ext >&5
2671 rm -rf conftest*
2672 eval "ac_cv_func_$ac_func=no"
2673 fi
2674 rm -f conftest*
2675 fi
2676
2677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2678 echo "$ac_t""yes" 1>&6
2679 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2680 cat >> confdefs.h <<EOF
2681 #define $ac_tr_func 1
2682 EOF
2683
2684 else
2685 echo "$ac_t""no" 1>&6
2686 fi
2687 done
2688
2689 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
2690 do
2691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2692 echo "configure:2693: checking for $ac_func" >&5
2693 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2698 "configure"
2698 #include "confdefs.h"
2699 /* System header to define __stub macros and hopefully few prototypes,
2700 which can conflict with char $ac_func(); below. */
2701 #include <assert.h>
2702 /* Override any gcc2 internal prototype to avoid an error. */
2703 /* We use char because int might match the return type of a gcc2
2704 builtin and then its argument prototype would still apply. */
2705 char $ac_func();
2706
2707 int main() {
2708
2709 /* The GNU C library defines this for functions which it implements
2710 to always fail with ENOSYS. Some functions are actually named
2711 something starting with __ and the normal name is an alias. */
2712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2713 choke me
2714 #else
2715 $ac_func();
2716 #endif
2717
2718 ; return 0; }
2719 EOF
2720 if { (eval echo configure:2721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2721 rm -rf conftest*
2722 eval "ac_cv_func_$ac_func=yes"
2723 else
2724 echo "configure: failed program was:" >&5
2725 cat conftest.$ac_ext >&5
2726 rm -rf conftest*
2727 eval "ac_cv_func_$ac_func=no"
2728 fi
2729 rm -f conftest*
2730 fi
2731
2732 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2733 echo "$ac_t""yes" 1>&6
2734 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2735 cat >> confdefs.h <<EOF
2736 #define $ac_tr_func 1
2737 EOF
2738
2739 else
2740 echo "$ac_t""no" 1>&6
2741 fi
2742 done
2743
2744 for ac_func in access stat mkdir rename rmdir unlink realpath
2745 do
2746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2747 echo "configure:2748: checking for $ac_func" >&5
2748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2749 echo $ac_n "(cached) $ac_c" 1>&6
2750 else
2751 cat > conftest.$ac_ext <<EOF
2752 #line 2753 "configure"
2753 #include "confdefs.h"
2754 /* System header to define __stub macros and hopefully few prototypes,
2755 which can conflict with char $ac_func(); below. */
2756 #include <assert.h>
2757 /* Override any gcc2 internal prototype to avoid an error. */
2758 /* We use char because int might match the return type of a gcc2
2759 builtin and then its argument prototype would still apply. */
2760 char $ac_func();
2761
2762 int main() {
2763
2764 /* The GNU C library defines this for functions which it implements
2765 to always fail with ENOSYS. Some functions are actually named
2766 something starting with __ and the normal name is an alias. */
2767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2768 choke me
2769 #else
2770 $ac_func();
2771 #endif
2772
2773 ; return 0; }
2774 EOF
2775 if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2776 rm -rf conftest*
2777 eval "ac_cv_func_$ac_func=yes"
2778 else
2779 echo "configure: failed program was:" >&5
2780 cat conftest.$ac_ext >&5
2781 rm -rf conftest*
2782 eval "ac_cv_func_$ac_func=no"
2783 fi
2784 rm -f conftest*
2785 fi
2786
2787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2788 echo "$ac_t""yes" 1>&6
2789 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2790 cat >> confdefs.h <<EOF
2791 #define $ac_tr_func 1
2792 EOF
2793
2794 else
2795 echo "$ac_t""no" 1>&6
2796 fi
2797 done
2798
2799 for ac_func in inet_aton inet_addr
2800 do
2801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2802 echo "configure:2803: checking for $ac_func" >&5
2803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2804 echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806 cat > conftest.$ac_ext <<EOF
2807 #line 2808 "configure"
2808 #include "confdefs.h"
2809 /* System header to define __stub macros and hopefully few prototypes,
2810 which can conflict with char $ac_func(); below. */
2811 #include <assert.h>
2812 /* Override any gcc2 internal prototype to avoid an error. */
2813 /* We use char because int might match the return type of a gcc2
2814 builtin and then its argument prototype would still apply. */
2815 char $ac_func();
2816
2817 int main() {
2818
2819 /* The GNU C library defines this for functions which it implements
2820 to always fail with ENOSYS. Some functions are actually named
2821 something starting with __ and the normal name is an alias. */
2822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2823 choke me
2824 #else
2825 $ac_func();
2826 #endif
2827
2828 ; return 0; }
2829 EOF
2830 if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2831 rm -rf conftest*
2832 eval "ac_cv_func_$ac_func=yes"
2833 else
2834 echo "configure: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2836 rm -rf conftest*
2837 eval "ac_cv_func_$ac_func=no"
2838 fi
2839 rm -f conftest*
2840 fi
2841
2842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2843 echo "$ac_t""yes" 1>&6
2844 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2845 cat >> confdefs.h <<EOF
2846 #define $ac_tr_func 1
2847 EOF
2848 break
2849 else
2850 echo "$ac_t""no" 1>&6
2851 fi
2852 done
2853
2854 for ac_func in inet_pton uname inet_ntoa
2855 do
2856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2857 echo "configure:2858: checking for $ac_func" >&5
2858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2859 echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861 cat > conftest.$ac_ext <<EOF
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2864 /* System header to define __stub macros and hopefully few prototypes,
2865 which can conflict with char $ac_func(); below. */
2866 #include <assert.h>
2867 /* Override any gcc2 internal prototype to avoid an error. */
2868 /* We use char because int might match the return type of a gcc2
2869 builtin and then its argument prototype would still apply. */
2870 char $ac_func();
2871
2872 int main() {
2873
2874 /* The GNU C library defines this for functions which it implements
2875 to always fail with ENOSYS. Some functions are actually named
2876 something starting with __ and the normal name is an alias. */
2877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2878 choke me
2879 #else
2880 $ac_func();
2881 #endif
2882
2883 ; return 0; }
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2886 rm -rf conftest*
2887 eval "ac_cv_func_$ac_func=yes"
2888 else
2889 echo "configure: failed program was:" >&5
2890 cat conftest.$ac_ext >&5
2891 rm -rf conftest*
2892 eval "ac_cv_func_$ac_func=no"
2893 fi
2894 rm -f conftest*
2895 fi
2896
2897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2898 echo "$ac_t""yes" 1>&6
2899 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2900 cat >> confdefs.h <<EOF
2901 #define $ac_tr_func 1
2902 EOF
2903
2904 else
2905 echo "$ac_t""no" 1>&6
2906 fi
2907 done
2908
2909 for ac_func in backtrace fork execvp pipe
2910 do
2911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2912 echo "configure:2913: checking for $ac_func" >&5
2913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2914 echo $ac_n "(cached) $ac_c" 1>&6
2915 else
2916 cat > conftest.$ac_ext <<EOF
2917 #line 2918 "configure"
2918 #include "confdefs.h"
2919 /* System header to define __stub macros and hopefully few prototypes,
2920 which can conflict with char $ac_func(); below. */
2921 #include <assert.h>
2922 /* Override any gcc2 internal prototype to avoid an error. */
2923 /* We use char because int might match the return type of a gcc2
2924 builtin and then its argument prototype would still apply. */
2925 char $ac_func();
2926
2927 int main() {
2928
2929 /* The GNU C library defines this for functions which it implements
2930 to always fail with ENOSYS. Some functions are actually named
2931 something starting with __ and the normal name is an alias. */
2932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2933 choke me
2934 #else
2935 $ac_func();
2936 #endif
2937
2938 ; return 0; }
2939 EOF
2940 if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2941 rm -rf conftest*
2942 eval "ac_cv_func_$ac_func=yes"
2943 else
2944 echo "configure: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
2946 rm -rf conftest*
2947 eval "ac_cv_func_$ac_func=no"
2948 fi
2949 rm -f conftest*
2950 fi
2951
2952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2953 echo "$ac_t""yes" 1>&6
2954 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2955 cat >> confdefs.h <<EOF
2956 #define $ac_tr_func 1
2957 EOF
2958
2959 else
2960 echo "$ac_t""no" 1>&6
2961 fi
2962 done
2963
2964 for ac_hdr in execinfo.h unistd.h dlfcn.h
2965 do
2966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2968 echo "configure:2969: checking for $ac_hdr" >&5
2969 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2970 echo $ac_n "(cached) $ac_c" 1>&6
2971 else
2972 cat > conftest.$ac_ext <<EOF
2973 #line 2974 "configure"
2974 #include "confdefs.h"
2975 #include <$ac_hdr>
2976 EOF
2977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2978 { (eval echo configure:2979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2980 if test -z "$ac_err"; then
2981 rm -rf conftest*
2982 eval "ac_cv_header_$ac_safe=yes"
2983 else
2984 echo "$ac_err" >&5
2985 echo "configure: failed program was:" >&5
2986 cat conftest.$ac_ext >&5
2987 rm -rf conftest*
2988 eval "ac_cv_header_$ac_safe=no"
2989 fi
2990 rm -f conftest*
2991 fi
2992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2993 echo "$ac_t""yes" 1>&6
2994 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2995 cat >> confdefs.h <<EOF
2996 #define $ac_tr_hdr 1
2997 EOF
2998
2999 else
3000 echo "$ac_t""no" 1>&6
3001 fi
3002 done
3003
3004 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3005 echo "configure:3006: checking for dladdr in -ldl" >&5
3006 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3007 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3008 echo $ac_n "(cached) $ac_c" 1>&6
3009 else
3010 ac_save_LIBS="$LIBS"
3011 LIBS="-ldl $LIBS"
3012 cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3015 /* Override any gcc2 internal prototype to avoid an error. */
3016 /* We use char because int might match the return type of a gcc2
3017 builtin and then its argument prototype would still apply. */
3018 char dladdr();
3019
3020 int main() {
3021 dladdr()
3022 ; return 0; }
3023 EOF
3024 if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3025 rm -rf conftest*
3026 eval "ac_cv_lib_$ac_lib_var=yes"
3027 else
3028 echo "configure: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3030 rm -rf conftest*
3031 eval "ac_cv_lib_$ac_lib_var=no"
3032 fi
3033 rm -f conftest*
3034 LIBS="$ac_save_LIBS"
3035
3036 fi
3037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3038 echo "$ac_t""yes" 1>&6
3039
3040 cat >> confdefs.h <<\EOF
3041 #define HAVE_DLADDR 1
3042 EOF
3043
3044 else
3045 echo "$ac_t""no" 1>&6
3046 fi
3047
3048 for ac_file in /proc/self/exe
3049 do
3050
3051 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3052 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3053 echo "configure:3054: checking for $ac_file" >&5
3054 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3055 echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057 if test "$cross_compiling" = yes; then
3058 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3059 else
3060 if test -r $ac_file; then
3061 eval "ac_cv_file_$ac_safe=yes"
3062 else
3063 eval "ac_cv_file_$ac_safe=no"
3064 fi
3065 fi
3066 fi
3067 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3068 echo "$ac_t""yes" 1>&6
3069 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3070 cat >> confdefs.h <<EOF
3071 #define $ac_tr_file 1
3072 EOF
3073
3074 cat >> confdefs.h <<\EOF
3075 #define HAVE_PROC_SELF_EXE 1
3076 EOF
3077
3078 else
3079 echo "$ac_t""no" 1>&6
3080
3081 fi
3082 done
3083
3084
3085 for ac_func in gethostbyname_r
3086 do
3087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3088 echo "configure:3089: checking for $ac_func" >&5
3089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3090 echo $ac_n "(cached) $ac_c" 1>&6
3091 else
3092 cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 /* System header to define __stub macros and hopefully few prototypes,
3096 which can conflict with char $ac_func(); below. */
3097 #include <assert.h>
3098 /* Override any gcc2 internal prototype to avoid an error. */
3099 /* We use char because int might match the return type of a gcc2
3100 builtin and then its argument prototype would still apply. */
3101 char $ac_func();
3102
3103 int main() {
3104
3105 /* The GNU C library defines this for functions which it implements
3106 to always fail with ENOSYS. Some functions are actually named
3107 something starting with __ and the normal name is an alias. */
3108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3109 choke me
3110 #else
3111 $ac_func();
3112 #endif
3113
3114 ; return 0; }
3115 EOF
3116 if { (eval echo configure:3117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3117 rm -rf conftest*
3118 eval "ac_cv_func_$ac_func=yes"
3119 else
3120 echo "configure: failed program was:" >&5
3121 cat conftest.$ac_ext >&5
3122 rm -rf conftest*
3123 eval "ac_cv_func_$ac_func=no"
3124 fi
3125 rm -f conftest*
3126 fi
3127
3128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3129 echo "$ac_t""yes" 1>&6
3130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3131 cat >> confdefs.h <<EOF
3132 #define $ac_tr_func 1
3133 EOF
3134
3135 cat >> confdefs.h <<\EOF
3136 #define HAVE_GETHOSTBYNAME_R 1
3137 EOF
3138
3139 # There are two different kinds of gethostbyname_r.
3140 # We look for the one that returns `int'.
3141 # Hopefully this check is robust enough.
3142 cat > conftest.$ac_ext <<EOF
3143 #line 3144 "configure"
3144 #include "confdefs.h"
3145 #include <netdb.h>
3146 EOF
3147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3148 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
3149 rm -rf conftest*
3150
3151 cat >> confdefs.h <<\EOF
3152 #define GETHOSTBYNAME_R_RETURNS_INT 1
3153 EOF
3154
3155 fi
3156 rm -f conftest*
3157
3158
3159 case " $GCINCS " in
3160 *" -D_REENTRANT "*) ;;
3161 *)
3162 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
3163 echo "configure:3164: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
3164 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
3165 echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167
3168 ac_ext=C
3169 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3170 ac_cpp='$CXXCPP $CPPFLAGS'
3171 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3172 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3173 cross_compiling=$ac_cv_prog_cxx_cross
3174
3175 cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178 #include <netdb.h>
3179 int main() {
3180 gethostbyname_r("", 0, 0);
3181 ; return 0; }
3182 EOF
3183 if { (eval echo configure:3184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3184 rm -rf conftest*
3185 libjava_cv_gethostbyname_r_needs_reentrant=no
3186 else
3187 echo "configure: failed program was:" >&5
3188 cat conftest.$ac_ext >&5
3189 rm -rf conftest*
3190 CPPFLAGS_SAVE="$CPPFLAGS"
3191 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3192 cat > conftest.$ac_ext <<EOF
3193 #line 3194 "configure"
3194 #include "confdefs.h"
3195 #include <netdb.h>
3196 int main() {
3197 gethostbyname_r("", 0, 0);
3198 ; return 0; }
3199 EOF
3200 if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3201 rm -rf conftest*
3202 libjava_cv_gethostbyname_r_needs_reentrant=yes
3203 else
3204 echo "configure: failed program was:" >&5
3205 cat conftest.$ac_ext >&5
3206 rm -rf conftest*
3207 libjava_cv_gethostbyname_r_needs_reentrant=fail
3208 fi
3209 rm -f conftest*
3210 CPPFLAGS="$CPPFLAGS_SAVE"
3211
3212 fi
3213 rm -f conftest*
3214 ac_ext=c
3215 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3216 ac_cpp='$CPP $CPPFLAGS'
3217 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3218 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3219 cross_compiling=$ac_cv_prog_cc_cross
3220
3221
3222 fi
3223
3224 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
3225 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
3226 cat >> confdefs.h <<\EOF
3227 #define GETHOSTBYNAME_R_NEEDS_REENTRANT 1
3228 EOF
3229
3230 fi
3231 ;;
3232 esac
3233
3234 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
3235 echo "configure:3236: checking for struct hostent_data" >&5
3236 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
3237 echo $ac_n "(cached) $ac_c" 1>&6
3238 else
3239 cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242
3243 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
3244 # define _REENTRANT 1
3245 #endif
3246 #include <netdb.h>
3247 int main() {
3248 struct hostent_data data;
3249 ; return 0; }
3250 EOF
3251 if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3252 rm -rf conftest*
3253 libjava_cv_struct_hostent_data=yes
3254 else
3255 echo "configure: failed program was:" >&5
3256 cat conftest.$ac_ext >&5
3257 rm -rf conftest*
3258 libjava_cv_struct_hostent_data=no
3259 fi
3260 rm -f conftest*
3261 fi
3262
3263 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
3264 if test "x$libjava_cv_struct_hostent_data" = xyes; then
3265 cat >> confdefs.h <<\EOF
3266 #define HAVE_STRUCT_HOSTENT_DATA 1
3267 EOF
3268
3269 fi
3270
3271 else
3272 echo "$ac_t""no" 1>&6
3273 fi
3274 done
3275
3276
3277 for ac_func in gethostbyaddr_r
3278 do
3279 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3280 echo "configure:3281: checking for $ac_func" >&5
3281 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3282 echo $ac_n "(cached) $ac_c" 1>&6
3283 else
3284 cat > conftest.$ac_ext <<EOF
3285 #line 3286 "configure"
3286 #include "confdefs.h"
3287 /* System header to define __stub macros and hopefully few prototypes,
3288 which can conflict with char $ac_func(); below. */
3289 #include <assert.h>
3290 /* Override any gcc2 internal prototype to avoid an error. */
3291 /* We use char because int might match the return type of a gcc2
3292 builtin and then its argument prototype would still apply. */
3293 char $ac_func();
3294
3295 int main() {
3296
3297 /* The GNU C library defines this for functions which it implements
3298 to always fail with ENOSYS. Some functions are actually named
3299 something starting with __ and the normal name is an alias. */
3300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3301 choke me
3302 #else
3303 $ac_func();
3304 #endif
3305
3306 ; return 0; }
3307 EOF
3308 if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3309 rm -rf conftest*
3310 eval "ac_cv_func_$ac_func=yes"
3311 else
3312 echo "configure: failed program was:" >&5
3313 cat conftest.$ac_ext >&5
3314 rm -rf conftest*
3315 eval "ac_cv_func_$ac_func=no"
3316 fi
3317 rm -f conftest*
3318 fi
3319
3320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3321 echo "$ac_t""yes" 1>&6
3322 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3323 cat >> confdefs.h <<EOF
3324 #define $ac_tr_func 1
3325 EOF
3326
3327 cat >> confdefs.h <<\EOF
3328 #define HAVE_GETHOSTBYADDR_R 1
3329 EOF
3330
3331 # There are two different kinds of gethostbyaddr_r.
3332 # We look for the one that returns `int'.
3333 # Hopefully this check is robust enough.
3334 cat > conftest.$ac_ext <<EOF
3335 #line 3336 "configure"
3336 #include "confdefs.h"
3337 #include <netdb.h>
3338 EOF
3339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3340 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
3341 rm -rf conftest*
3342
3343 cat >> confdefs.h <<\EOF
3344 #define GETHOSTBYADDR_R_RETURNS_INT 1
3345 EOF
3346
3347 fi
3348 rm -f conftest*
3349
3350 else
3351 echo "$ac_t""no" 1>&6
3352 fi
3353 done
3354
3355
3356 for ac_func in gethostname
3357 do
3358 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3359 echo "configure:3360: checking for $ac_func" >&5
3360 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3361 echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363 cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366 /* System header to define __stub macros and hopefully few prototypes,
3367 which can conflict with char $ac_func(); below. */
3368 #include <assert.h>
3369 /* Override any gcc2 internal prototype to avoid an error. */
3370 /* We use char because int might match the return type of a gcc2
3371 builtin and then its argument prototype would still apply. */
3372 char $ac_func();
3373
3374 int main() {
3375
3376 /* The GNU C library defines this for functions which it implements
3377 to always fail with ENOSYS. Some functions are actually named
3378 something starting with __ and the normal name is an alias. */
3379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3380 choke me
3381 #else
3382 $ac_func();
3383 #endif
3384
3385 ; return 0; }
3386 EOF
3387 if { (eval echo configure:3388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3388 rm -rf conftest*
3389 eval "ac_cv_func_$ac_func=yes"
3390 else
3391 echo "configure: failed program was:" >&5
3392 cat conftest.$ac_ext >&5
3393 rm -rf conftest*
3394 eval "ac_cv_func_$ac_func=no"
3395 fi
3396 rm -f conftest*
3397 fi
3398
3399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3400 echo "$ac_t""yes" 1>&6
3401 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3402 cat >> confdefs.h <<EOF
3403 #define $ac_tr_func 1
3404 EOF
3405
3406 cat >> confdefs.h <<\EOF
3407 #define HAVE_GETHOSTNAME 1
3408 EOF
3409
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <unistd.h>
3414 EOF
3415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3416 egrep "gethostname" >/dev/null 2>&1; then
3417 rm -rf conftest*
3418
3419 cat >> confdefs.h <<\EOF
3420 #define HAVE_GETHOSTNAME_DECL 1
3421 EOF
3422
3423 fi
3424 rm -f conftest*
3425
3426 else
3427 echo "$ac_t""no" 1>&6
3428 fi
3429 done
3430
3431
3432 # Look for these functions in the thread library, but only bother
3433 # if using POSIX threads.
3434 if test "$THREADS" = posix; then
3435 save_LIBS="$LIBS"
3436 LIBS="$LIBS $THREADLIBS"
3437 # Some POSIX thread systems don't have pthread_mutexattr_settype.
3438 # E.g., Solaris.
3439 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
3440 do
3441 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3442 echo "configure:3443: checking for $ac_func" >&5
3443 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3444 echo $ac_n "(cached) $ac_c" 1>&6
3445 else
3446 cat > conftest.$ac_ext <<EOF
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449 /* System header to define __stub macros and hopefully few prototypes,
3450 which can conflict with char $ac_func(); below. */
3451 #include <assert.h>
3452 /* Override any gcc2 internal prototype to avoid an error. */
3453 /* We use char because int might match the return type of a gcc2
3454 builtin and then its argument prototype would still apply. */
3455 char $ac_func();
3456
3457 int main() {
3458
3459 /* The GNU C library defines this for functions which it implements
3460 to always fail with ENOSYS. Some functions are actually named
3461 something starting with __ and the normal name is an alias. */
3462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3463 choke me
3464 #else
3465 $ac_func();
3466 #endif
3467
3468 ; return 0; }
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3471 rm -rf conftest*
3472 eval "ac_cv_func_$ac_func=yes"
3473 else
3474 echo "configure: failed program was:" >&5
3475 cat conftest.$ac_ext >&5
3476 rm -rf conftest*
3477 eval "ac_cv_func_$ac_func=no"
3478 fi
3479 rm -f conftest*
3480 fi
3481
3482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3483 echo "$ac_t""yes" 1>&6
3484 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3485 cat >> confdefs.h <<EOF
3486 #define $ac_tr_func 1
3487 EOF
3488
3489 else
3490 echo "$ac_t""no" 1>&6
3491 fi
3492 done
3493
3494
3495 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
3496 # Solaris 7 the name librt is preferred.
3497 for ac_func in sched_yield
3498 do
3499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3500 echo "configure:3501: checking for $ac_func" >&5
3501 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3502 echo $ac_n "(cached) $ac_c" 1>&6
3503 else
3504 cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507 /* System header to define __stub macros and hopefully few prototypes,
3508 which can conflict with char $ac_func(); below. */
3509 #include <assert.h>
3510 /* Override any gcc2 internal prototype to avoid an error. */
3511 /* We use char because int might match the return type of a gcc2
3512 builtin and then its argument prototype would still apply. */
3513 char $ac_func();
3514
3515 int main() {
3516
3517 /* The GNU C library defines this for functions which it implements
3518 to always fail with ENOSYS. Some functions are actually named
3519 something starting with __ and the normal name is an alias. */
3520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3521 choke me
3522 #else
3523 $ac_func();
3524 #endif
3525
3526 ; return 0; }
3527 EOF
3528 if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3529 rm -rf conftest*
3530 eval "ac_cv_func_$ac_func=yes"
3531 else
3532 echo "configure: failed program was:" >&5
3533 cat conftest.$ac_ext >&5
3534 rm -rf conftest*
3535 eval "ac_cv_func_$ac_func=no"
3536 fi
3537 rm -f conftest*
3538 fi
3539
3540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3541 echo "$ac_t""yes" 1>&6
3542 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3543 cat >> confdefs.h <<EOF
3544 #define $ac_tr_func 1
3545 EOF
3546
3547 else
3548 echo "$ac_t""no" 1>&6
3549 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
3550 echo "configure:3551: checking for sched_yield in -lrt" >&5
3551 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
3552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3553 echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555 ac_save_LIBS="$LIBS"
3556 LIBS="-lrt $LIBS"
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 /* Override any gcc2 internal prototype to avoid an error. */
3561 /* We use char because int might match the return type of a gcc2
3562 builtin and then its argument prototype would still apply. */
3563 char sched_yield();
3564
3565 int main() {
3566 sched_yield()
3567 ; return 0; }
3568 EOF
3569 if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3570 rm -rf conftest*
3571 eval "ac_cv_lib_$ac_lib_var=yes"
3572 else
3573 echo "configure: failed program was:" >&5
3574 cat conftest.$ac_ext >&5
3575 rm -rf conftest*
3576 eval "ac_cv_lib_$ac_lib_var=no"
3577 fi
3578 rm -f conftest*
3579 LIBS="$ac_save_LIBS"
3580
3581 fi
3582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3583 echo "$ac_t""yes" 1>&6
3584
3585 cat >> confdefs.h <<\EOF
3586 #define HAVE_SCHED_YIELD 1
3587 EOF
3588
3589 THREADLIBS="$THREADLIBS -lrt"
3590 THREADSPEC="$THREADSPEC -lrt"
3591 else
3592 echo "$ac_t""no" 1>&6
3593
3594 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
3595 echo "configure:3596: checking for sched_yield in -lposix4" >&5
3596 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
3597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3598 echo $ac_n "(cached) $ac_c" 1>&6
3599 else
3600 ac_save_LIBS="$LIBS"
3601 LIBS="-lposix4 $LIBS"
3602 cat > conftest.$ac_ext <<EOF
3603 #line 3604 "configure"
3604 #include "confdefs.h"
3605 /* Override any gcc2 internal prototype to avoid an error. */
3606 /* We use char because int might match the return type of a gcc2
3607 builtin and then its argument prototype would still apply. */
3608 char sched_yield();
3609
3610 int main() {
3611 sched_yield()
3612 ; return 0; }
3613 EOF
3614 if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3615 rm -rf conftest*
3616 eval "ac_cv_lib_$ac_lib_var=yes"
3617 else
3618 echo "configure: failed program was:" >&5
3619 cat conftest.$ac_ext >&5
3620 rm -rf conftest*
3621 eval "ac_cv_lib_$ac_lib_var=no"
3622 fi
3623 rm -f conftest*
3624 LIBS="$ac_save_LIBS"
3625
3626 fi
3627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3628 echo "$ac_t""yes" 1>&6
3629
3630 cat >> confdefs.h <<\EOF
3631 #define HAVE_SCHED_YIELD 1
3632 EOF
3633
3634 THREADLIBS="$THREADLIBS -lposix4"
3635 THREADSPEC="$THREADSPEC -lposix4"
3636 else
3637 echo "$ac_t""no" 1>&6
3638 fi
3639
3640 fi
3641
3642 fi
3643 done
3644
3645 LIBS="$save_LIBS"
3646
3647 # We can save a little space at runtime if the mutex has m_count
3648 # or __m_count. This is a nice hack for Linux.
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 #include <pthread.h>
3653 int main() {
3654
3655 extern pthread_mutex_t *mutex; int q = mutex->m_count;
3656
3657 ; return 0; }
3658 EOF
3659 if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3660 rm -rf conftest*
3661 cat >> confdefs.h <<\EOF
3662 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
3663 EOF
3664
3665 else
3666 echo "configure: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 rm -rf conftest*
3669
3670 cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 #include <pthread.h>
3674 int main() {
3675
3676 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
3677
3678 ; return 0; }
3679 EOF
3680 if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3681 rm -rf conftest*
3682 cat >> confdefs.h <<\EOF
3683 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
3684 EOF
3685
3686 else
3687 echo "configure: failed program was:" >&5
3688 cat conftest.$ac_ext >&5
3689 fi
3690 rm -f conftest*
3691 fi
3692 rm -f conftest*
3693 fi
3694
3695 # We require a way to get the time.
3696 time_found=no
3697 for ac_func in gettimeofday time ftime
3698 do
3699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3700 echo "configure:3701: checking for $ac_func" >&5
3701 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3702 echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704 cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 /* System header to define __stub macros and hopefully few prototypes,
3708 which can conflict with char $ac_func(); below. */
3709 #include <assert.h>
3710 /* Override any gcc2 internal prototype to avoid an error. */
3711 /* We use char because int might match the return type of a gcc2
3712 builtin and then its argument prototype would still apply. */
3713 char $ac_func();
3714
3715 int main() {
3716
3717 /* The GNU C library defines this for functions which it implements
3718 to always fail with ENOSYS. Some functions are actually named
3719 something starting with __ and the normal name is an alias. */
3720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3721 choke me
3722 #else
3723 $ac_func();
3724 #endif
3725
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3729 rm -rf conftest*
3730 eval "ac_cv_func_$ac_func=yes"
3731 else
3732 echo "configure: failed program was:" >&5
3733 cat conftest.$ac_ext >&5
3734 rm -rf conftest*
3735 eval "ac_cv_func_$ac_func=no"
3736 fi
3737 rm -f conftest*
3738 fi
3739
3740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3741 echo "$ac_t""yes" 1>&6
3742 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3743 cat >> confdefs.h <<EOF
3744 #define $ac_tr_func 1
3745 EOF
3746 time_found=yes
3747 else
3748 echo "$ac_t""no" 1>&6
3749 fi
3750 done
3751
3752 if test "$time_found" = no; then
3753 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
3754 fi
3755
3756 for ac_func in memmove
3757 do
3758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3759 echo "configure:3760: checking for $ac_func" >&5
3760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3761 echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763 cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766 /* System header to define __stub macros and hopefully few prototypes,
3767 which can conflict with char $ac_func(); below. */
3768 #include <assert.h>
3769 /* Override any gcc2 internal prototype to avoid an error. */
3770 /* We use char because int might match the return type of a gcc2
3771 builtin and then its argument prototype would still apply. */
3772 char $ac_func();
3773
3774 int main() {
3775
3776 /* The GNU C library defines this for functions which it implements
3777 to always fail with ENOSYS. Some functions are actually named
3778 something starting with __ and the normal name is an alias. */
3779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3780 choke me
3781 #else
3782 $ac_func();
3783 #endif
3784
3785 ; return 0; }
3786 EOF
3787 if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3788 rm -rf conftest*
3789 eval "ac_cv_func_$ac_func=yes"
3790 else
3791 echo "configure: failed program was:" >&5
3792 cat conftest.$ac_ext >&5
3793 rm -rf conftest*
3794 eval "ac_cv_func_$ac_func=no"
3795 fi
3796 rm -f conftest*
3797 fi
3798
3799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3800 echo "$ac_t""yes" 1>&6
3801 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3802 cat >> confdefs.h <<EOF
3803 #define $ac_tr_func 1
3804 EOF
3805
3806 else
3807 echo "$ac_t""no" 1>&6
3808 fi
3809 done
3810
3811
3812 # We require memcpy.
3813 memcpy_found=no
3814 for ac_func in memcpy
3815 do
3816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3817 echo "configure:3818: checking for $ac_func" >&5
3818 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3819 echo $ac_n "(cached) $ac_c" 1>&6
3820 else
3821 cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 /* System header to define __stub macros and hopefully few prototypes,
3825 which can conflict with char $ac_func(); below. */
3826 #include <assert.h>
3827 /* Override any gcc2 internal prototype to avoid an error. */
3828 /* We use char because int might match the return type of a gcc2
3829 builtin and then its argument prototype would still apply. */
3830 char $ac_func();
3831
3832 int main() {
3833
3834 /* The GNU C library defines this for functions which it implements
3835 to always fail with ENOSYS. Some functions are actually named
3836 something starting with __ and the normal name is an alias. */
3837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3838 choke me
3839 #else
3840 $ac_func();
3841 #endif
3842
3843 ; return 0; }
3844 EOF
3845 if { (eval echo configure:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3846 rm -rf conftest*
3847 eval "ac_cv_func_$ac_func=yes"
3848 else
3849 echo "configure: failed program was:" >&5
3850 cat conftest.$ac_ext >&5
3851 rm -rf conftest*
3852 eval "ac_cv_func_$ac_func=no"
3853 fi
3854 rm -f conftest*
3855 fi
3856
3857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3858 echo "$ac_t""yes" 1>&6
3859 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3860 cat >> confdefs.h <<EOF
3861 #define $ac_tr_func 1
3862 EOF
3863 memcpy_found=yes
3864 else
3865 echo "$ac_t""no" 1>&6
3866 fi
3867 done
3868
3869 if test "$memcpy_found" = no; then
3870 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
3871 fi
3872
3873 # Some library-finding code we stole from Tcl.
3874 #--------------------------------------------------------------------
3875 # Check for the existence of the -lsocket and -lnsl libraries.
3876 # The order here is important, so that they end up in the right
3877 # order in the command line generated by make. Here are some
3878 # special considerations:
3879 # 1. Use "connect" and "accept" to check for -lsocket, and
3880 # "gethostbyname" to check for -lnsl.
3881 # 2. Use each function name only once: can't redo a check because
3882 # autoconf caches the results of the last check and won't redo it.
3883 # 3. Use -lnsl and -lsocket only if they supply procedures that
3884 # aren't already present in the normal libraries. This is because
3885 # IRIX 5.2 has libraries, but they aren't needed and they're
3886 # bogus: they goof up name resolution if used.
3887 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
3888 # To get around this problem, check for both libraries together
3889 # if -lsocket doesn't work by itself.
3890 #--------------------------------------------------------------------
3891
3892 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
3893 echo "configure:3894: checking for socket libraries" >&5
3894 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
3895 echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897 gcj_cv_lib_sockets=
3898 gcj_checkBoth=0
3899 unset ac_cv_func_connect
3900 echo $ac_n "checking for connect""... $ac_c" 1>&6
3901 echo "configure:3902: checking for connect" >&5
3902 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3903 echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 /* System header to define __stub macros and hopefully few prototypes,
3909 which can conflict with char connect(); below. */
3910 #include <assert.h>
3911 /* Override any gcc2 internal prototype to avoid an error. */
3912 /* We use char because int might match the return type of a gcc2
3913 builtin and then its argument prototype would still apply. */
3914 char connect();
3915
3916 int main() {
3917
3918 /* The GNU C library defines this for functions which it implements
3919 to always fail with ENOSYS. Some functions are actually named
3920 something starting with __ and the normal name is an alias. */
3921 #if defined (__stub_connect) || defined (__stub___connect)
3922 choke me
3923 #else
3924 connect();
3925 #endif
3926
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3930 rm -rf conftest*
3931 eval "ac_cv_func_connect=yes"
3932 else
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 eval "ac_cv_func_connect=no"
3937 fi
3938 rm -f conftest*
3939 fi
3940
3941 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3942 echo "$ac_t""yes" 1>&6
3943 gcj_checkSocket=0
3944 else
3945 echo "$ac_t""no" 1>&6
3946 gcj_checkSocket=1
3947 fi
3948
3949 if test "$gcj_checkSocket" = 1; then
3950 unset ac_cv_func_connect
3951 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3952 echo "configure:3953: checking for main in -lsocket" >&5
3953 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3954 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3955 echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957 ac_save_LIBS="$LIBS"
3958 LIBS="-lsocket $LIBS"
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962
3963 int main() {
3964 main()
3965 ; return 0; }
3966 EOF
3967 if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3968 rm -rf conftest*
3969 eval "ac_cv_lib_$ac_lib_var=yes"
3970 else
3971 echo "configure: failed program was:" >&5
3972 cat conftest.$ac_ext >&5
3973 rm -rf conftest*
3974 eval "ac_cv_lib_$ac_lib_var=no"
3975 fi
3976 rm -f conftest*
3977 LIBS="$ac_save_LIBS"
3978
3979 fi
3980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3981 echo "$ac_t""yes" 1>&6
3982 gcj_cv_lib_sockets="-lsocket"
3983 else
3984 echo "$ac_t""no" 1>&6
3985 gcj_checkBoth=1
3986 fi
3987
3988 fi
3989 if test "$gcj_checkBoth" = 1; then
3990 gcj_oldLibs=$LIBS
3991 LIBS="$LIBS -lsocket -lnsl"
3992 unset ac_cv_func_accept
3993 echo $ac_n "checking for accept""... $ac_c" 1>&6
3994 echo "configure:3995: checking for accept" >&5
3995 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
3996 echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998 cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 /* System header to define __stub macros and hopefully few prototypes,
4002 which can conflict with char accept(); below. */
4003 #include <assert.h>
4004 /* Override any gcc2 internal prototype to avoid an error. */
4005 /* We use char because int might match the return type of a gcc2
4006 builtin and then its argument prototype would still apply. */
4007 char accept();
4008
4009 int main() {
4010
4011 /* The GNU C library defines this for functions which it implements
4012 to always fail with ENOSYS. Some functions are actually named
4013 something starting with __ and the normal name is an alias. */
4014 #if defined (__stub_accept) || defined (__stub___accept)
4015 choke me
4016 #else
4017 accept();
4018 #endif
4019
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4023 rm -rf conftest*
4024 eval "ac_cv_func_accept=yes"
4025 else
4026 echo "configure: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 rm -rf conftest*
4029 eval "ac_cv_func_accept=no"
4030 fi
4031 rm -f conftest*
4032 fi
4033
4034 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4035 echo "$ac_t""yes" 1>&6
4036 gcj_checkNsl=0
4037 gcj_cv_lib_sockets="-lsocket -lnsl"
4038 else
4039 echo "$ac_t""no" 1>&6
4040 fi
4041
4042 unset ac_cv_func_accept
4043 LIBS=$gcj_oldLibs
4044 fi
4045 unset ac_cv_func_gethostbyname
4046 gcj_oldLibs=$LIBS
4047 LIBS="$LIBS $gcj_cv_lib_sockets"
4048 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4049 echo "configure:4050: checking for gethostbyname" >&5
4050 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4051 echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 /* System header to define __stub macros and hopefully few prototypes,
4057 which can conflict with char gethostbyname(); below. */
4058 #include <assert.h>
4059 /* Override any gcc2 internal prototype to avoid an error. */
4060 /* We use char because int might match the return type of a gcc2
4061 builtin and then its argument prototype would still apply. */
4062 char gethostbyname();
4063
4064 int main() {
4065
4066 /* The GNU C library defines this for functions which it implements
4067 to always fail with ENOSYS. Some functions are actually named
4068 something starting with __ and the normal name is an alias. */
4069 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4070 choke me
4071 #else
4072 gethostbyname();
4073 #endif
4074
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4078 rm -rf conftest*
4079 eval "ac_cv_func_gethostbyname=yes"
4080 else
4081 echo "configure: failed program was:" >&5
4082 cat conftest.$ac_ext >&5
4083 rm -rf conftest*
4084 eval "ac_cv_func_gethostbyname=no"
4085 fi
4086 rm -f conftest*
4087 fi
4088
4089 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4090 echo "$ac_t""yes" 1>&6
4091 :
4092 else
4093 echo "$ac_t""no" 1>&6
4094 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4095 echo "configure:4096: checking for main in -lnsl" >&5
4096 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4098 echo $ac_n "(cached) $ac_c" 1>&6
4099 else
4100 ac_save_LIBS="$LIBS"
4101 LIBS="-lnsl $LIBS"
4102 cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105
4106 int main() {
4107 main()
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4111 rm -rf conftest*
4112 eval "ac_cv_lib_$ac_lib_var=yes"
4113 else
4114 echo "configure: failed program was:" >&5
4115 cat conftest.$ac_ext >&5
4116 rm -rf conftest*
4117 eval "ac_cv_lib_$ac_lib_var=no"
4118 fi
4119 rm -f conftest*
4120 LIBS="$ac_save_LIBS"
4121
4122 fi
4123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4124 echo "$ac_t""yes" 1>&6
4125 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4126 else
4127 echo "$ac_t""no" 1>&6
4128 fi
4129
4130 fi
4131
4132 unset ac_cv_func_gethostbyname
4133 LIBS=$gcj_oldLIBS
4134
4135 fi
4136
4137 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4138 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4139
4140 if test "$with_system_zlib" = yes; then
4141 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
4142 echo "configure:4143: checking for deflate in -lz" >&5
4143 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4145 echo $ac_n "(cached) $ac_c" 1>&6
4146 else
4147 ac_save_LIBS="$LIBS"
4148 LIBS="-lz $LIBS"
4149 cat > conftest.$ac_ext <<EOF
4150 #line 4151 "configure"
4151 #include "confdefs.h"
4152 /* Override any gcc2 internal prototype to avoid an error. */
4153 /* We use char because int might match the return type of a gcc2
4154 builtin and then its argument prototype would still apply. */
4155 char deflate();
4156
4157 int main() {
4158 deflate()
4159 ; return 0; }
4160 EOF
4161 if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4162 rm -rf conftest*
4163 eval "ac_cv_lib_$ac_lib_var=yes"
4164 else
4165 echo "configure: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 rm -rf conftest*
4168 eval "ac_cv_lib_$ac_lib_var=no"
4169 fi
4170 rm -f conftest*
4171 LIBS="$ac_save_LIBS"
4172
4173 fi
4174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4175 echo "$ac_t""yes" 1>&6
4176 ZLIBSPEC=-lz
4177 else
4178 echo "$ac_t""no" 1>&6
4179 ZLIBSPEC=-lzgcj
4180 fi
4181
4182 else
4183 ZLIBSPEC=-lzgcj
4184 fi
4185
4186 # On Solaris, and maybe other architectures, the Boehm collector
4187 # requires -ldl.
4188 if test "$GC" = boehm; then
4189 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
4190 echo "configure:4191: checking for main in -ldl" >&5
4191 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
4192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4193 echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195 ac_save_LIBS="$LIBS"
4196 LIBS="-ldl $LIBS"
4197 cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200
4201 int main() {
4202 main()
4203 ; return 0; }
4204 EOF
4205 if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4206 rm -rf conftest*
4207 eval "ac_cv_lib_$ac_lib_var=yes"
4208 else
4209 echo "configure: failed program was:" >&5
4210 cat conftest.$ac_ext >&5
4211 rm -rf conftest*
4212 eval "ac_cv_lib_$ac_lib_var=no"
4213 fi
4214 rm -f conftest*
4215 LIBS="$ac_save_LIBS"
4216
4217 fi
4218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4219 echo "$ac_t""yes" 1>&6
4220 SYSTEMSPEC="$SYSTEMSPEC -ldl"
4221 else
4222 echo "$ac_t""no" 1>&6
4223 fi
4224
4225 fi
4226
4227 if test -d "$libgcj_basedir/../gcc/java"; then
4228 GCJ=
4229 else
4230 CANADIAN=yes
4231 NULL_TARGET=yes
4232 GCJ=gcj
4233 fi
4234 fi
4235
4236 ZLIBS=
4237 ZDEPS=
4238 ZINCS=
4239 if test "x$ZLIBSPEC" = "x-lzgcj"; then
4240 # We include the path to the zlib build directory.
4241 # See Makefile.am to understand why.
4242 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
4243 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
4244 ZINCS='-I$(top_srcdir)/../zlib'
4245 else
4246 ZLIBS="$ZLIBSPEC"
4247 fi
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257 if test "$CANADIAN" = yes; then
4258 CANADIAN_TRUE=
4259 CANADIAN_FALSE='#'
4260 else
4261 CANADIAN_TRUE='#'
4262 CANADIAN_FALSE=
4263 fi
4264
4265
4266 if test "$NULL_TARGET" = yes; then
4267 NULL_TARGET_TRUE=
4268 NULL_TARGET_FALSE='#'
4269 else
4270 NULL_TARGET_TRUE='#'
4271 NULL_TARGET_FALSE=
4272 fi
4273
4274
4275 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
4276 NATIVE_TRUE=
4277 NATIVE_FALSE='#'
4278 else
4279 NATIVE_TRUE='#'
4280 NATIVE_FALSE=
4281 fi
4282
4283
4284 if test -z "$with_cross_host"; then
4285 USE_LIBDIR_TRUE=
4286 USE_LIBDIR_FALSE='#'
4287 else
4288 USE_LIBDIR_TRUE='#'
4289 USE_LIBDIR_FALSE=
4290 fi
4291
4292
4293 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
4294 NEEDS_DATA_START_TRUE=
4295 NEEDS_DATA_START_FALSE='#'
4296 else
4297 NEEDS_DATA_START_TRUE='#'
4298 NEEDS_DATA_START_FALSE=
4299 fi
4300
4301
4302 # Determine gcj version number.
4303 if test "$GCJ" = ""; then
4304 if test -z "${with_multisubdir}"; then
4305 builddotdot=.
4306 else
4307
4308 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
4309
4310 fi
4311 dir="`cd ${builddotdot}/../../gcc && pwd`"
4312 GCJ="$dir/gcj -B$dir/"
4313 fi
4314
4315 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
4316
4317 cat >> confdefs.h <<EOF
4318 #define GCJVERSION "$gcjvers"
4319 EOF
4320
4321
4322 # See if gcj supports -fuse-divide-subroutine. gcc 2.95 does not, and
4323 # we want to continue to support that version.
4324 echo $ac_n "checking whether gcj supports -fuse-divide-subroutine""... $ac_c" 1>&6
4325 echo "configure:4326: checking whether gcj supports -fuse-divide-subroutine" >&5
4326 cat > conftest.java << 'END'
4327 public class conftest { }
4328 END
4329 use_fuse=yes
4330 $GCJ -classpath $srcdir -fuse-divide-subroutine -fsyntax-only \
4331 conftest.java > /dev/null 2>&1 \
4332 || use_fuse=no
4333 rm -f conftest.java
4334 if test "$use_fuse" = no; then
4335 DIVIDESPEC=
4336 fi
4337 echo "$ac_t""$use_fuse" 1>&6
4338
4339
4340
4341 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
4342 echo "configure:4343: checking for g++ -ffloat-store bug" >&5
4343 save_CFLAGS="$CFLAGS"
4344 CFLAGS="-x c++ -O2 -ffloat-store"
4345 cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <math.h>
4349 int main() {
4350
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4354 rm -rf conftest*
4355 echo "$ac_t""no" 1>&6
4356 else
4357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
4359 rm -rf conftest*
4360 cat >> confdefs.h <<\EOF
4361 #define __NO_MATH_INLINES 1
4362 EOF
4363
4364 echo "$ac_t""yes" 1>&6
4365 fi
4366 rm -f conftest*
4367 CFLAGS="$save_CFLAGS"
4368
4369 for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pwd.h sys/config.h inttypes.h stdint.h
4370 do
4371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_hdr" >&5
4374 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4375 echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377 cat > conftest.$ac_ext <<EOF
4378 #line 4379 "configure"
4379 #include "confdefs.h"
4380 #include <$ac_hdr>
4381 EOF
4382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4383 { (eval echo configure:4384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4385 if test -z "$ac_err"; then
4386 rm -rf conftest*
4387 eval "ac_cv_header_$ac_safe=yes"
4388 else
4389 echo "$ac_err" >&5
4390 echo "configure: failed program was:" >&5
4391 cat conftest.$ac_ext >&5
4392 rm -rf conftest*
4393 eval "ac_cv_header_$ac_safe=no"
4394 fi
4395 rm -f conftest*
4396 fi
4397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4398 echo "$ac_t""yes" 1>&6
4399 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4400 cat >> confdefs.h <<EOF
4401 #define $ac_tr_hdr 1
4402 EOF
4403
4404 else
4405 echo "$ac_t""no" 1>&6
4406 fi
4407 done
4408
4409 for ac_hdr in dirent.h
4410 do
4411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_hdr" >&5
4414 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <$ac_hdr>
4421 EOF
4422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4423 { (eval echo configure:4424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4425 if test -z "$ac_err"; then
4426 rm -rf conftest*
4427 eval "ac_cv_header_$ac_safe=yes"
4428 else
4429 echo "$ac_err" >&5
4430 echo "configure: failed program was:" >&5
4431 cat conftest.$ac_ext >&5
4432 rm -rf conftest*
4433 eval "ac_cv_header_$ac_safe=no"
4434 fi
4435 rm -f conftest*
4436 fi
4437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4438 echo "$ac_t""yes" 1>&6
4439 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4440 cat >> confdefs.h <<EOF
4441 #define $ac_tr_hdr 1
4442 EOF
4443
4444 else
4445 echo "$ac_t""no" 1>&6
4446 fi
4447 done
4448
4449
4450 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4451 echo "configure:4452: checking for ANSI C header files" >&5
4452 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4453 echo $ac_n "(cached) $ac_c" 1>&6
4454 else
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 #include <stdlib.h>
4459 #include <stdarg.h>
4460 #include <string.h>
4461 #include <float.h>
4462 EOF
4463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4464 { (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4466 if test -z "$ac_err"; then
4467 rm -rf conftest*
4468 ac_cv_header_stdc=yes
4469 else
4470 echo "$ac_err" >&5
4471 echo "configure: failed program was:" >&5
4472 cat conftest.$ac_ext >&5
4473 rm -rf conftest*
4474 ac_cv_header_stdc=no
4475 fi
4476 rm -f conftest*
4477
4478 if test $ac_cv_header_stdc = yes; then
4479 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4480 cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 #include <string.h>
4484 EOF
4485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4486 egrep "memchr" >/dev/null 2>&1; then
4487 :
4488 else
4489 rm -rf conftest*
4490 ac_cv_header_stdc=no
4491 fi
4492 rm -f conftest*
4493
4494 fi
4495
4496 if test $ac_cv_header_stdc = yes; then
4497 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 #include <stdlib.h>
4502 EOF
4503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4504 egrep "free" >/dev/null 2>&1; then
4505 :
4506 else
4507 rm -rf conftest*
4508 ac_cv_header_stdc=no
4509 fi
4510 rm -f conftest*
4511
4512 fi
4513
4514 if test $ac_cv_header_stdc = yes; then
4515 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4516 if test "$cross_compiling" = yes; then
4517 :
4518 else
4519 cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 #include <ctype.h>
4523 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4524 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4525 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4526 int main () { int i; for (i = 0; i < 256; i++)
4527 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4528 exit (0); }
4529
4530 EOF
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4532 then
4533 :
4534 else
4535 echo "configure: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
4537 rm -fr conftest*
4538 ac_cv_header_stdc=no
4539 fi
4540 rm -fr conftest*
4541 fi
4542
4543 fi
4544 fi
4545
4546 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4547 if test $ac_cv_header_stdc = yes; then
4548 cat >> confdefs.h <<\EOF
4549 #define STDC_HEADERS 1
4550 EOF
4551
4552 fi
4553
4554 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4555 echo "configure:4556: checking for ssize_t" >&5
4556 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
4557 echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <sys/types.h>
4563 #if STDC_HEADERS
4564 #include <stdlib.h>
4565 #include <stddef.h>
4566 #endif
4567 EOF
4568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4569 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4570 rm -rf conftest*
4571 ac_cv_type_ssize_t=yes
4572 else
4573 rm -rf conftest*
4574 ac_cv_type_ssize_t=no
4575 fi
4576 rm -f conftest*
4577
4578 fi
4579 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4580 if test $ac_cv_type_ssize_t = no; then
4581 cat >> confdefs.h <<\EOF
4582 #define ssize_t int
4583 EOF
4584
4585 fi
4586
4587
4588 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
4589 echo "configure:4590: checking for in_addr_t" >&5
4590 cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <sys/types.h>
4594 #if STDC_HEADERS
4595 #include <stdlib.h>
4596 #include <stddef.h>
4597 #endif
4598 #if HAVE_NETINET_IN_H
4599 #include <netinet/in.h>
4600 #endif
4601 int main() {
4602 in_addr_t foo;
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4606 rm -rf conftest*
4607 cat >> confdefs.h <<\EOF
4608 #define HAVE_IN_ADDR_T 1
4609 EOF
4610
4611 echo "$ac_t""yes" 1>&6
4612 else
4613 echo "configure: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4615 rm -rf conftest*
4616 echo "$ac_t""no" 1>&6
4617 fi
4618 rm -f conftest*
4619
4620 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
4621 echo "configure:4622: checking whether struct ip_mreq is in netinet/in.h" >&5
4622 cat > conftest.$ac_ext <<EOF
4623 #line 4624 "configure"
4624 #include "confdefs.h"
4625 #include <netinet/in.h>
4626 int main() {
4627 struct ip_mreq mreq;
4628 ; return 0; }
4629 EOF
4630 if { (eval echo configure:4631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4631 rm -rf conftest*
4632 cat >> confdefs.h <<\EOF
4633 #define HAVE_STRUCT_IP_MREQ 1
4634 EOF
4635
4636 echo "$ac_t""yes" 1>&6
4637 else
4638 echo "configure: failed program was:" >&5
4639 cat conftest.$ac_ext >&5
4640 rm -rf conftest*
4641 echo "$ac_t""no" 1>&6
4642 fi
4643 rm -f conftest*
4644
4645 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
4646 echo "configure:4647: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
4647 cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <netinet/in.h>
4651 int main() {
4652 struct sockaddr_in6 addr6;
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4656 rm -rf conftest*
4657 cat >> confdefs.h <<\EOF
4658 #define HAVE_INET6 1
4659 EOF
4660
4661 echo "$ac_t""yes" 1>&6
4662 else
4663 echo "configure: failed program was:" >&5
4664 cat conftest.$ac_ext >&5
4665 rm -rf conftest*
4666 echo "$ac_t""no" 1>&6
4667 fi
4668 rm -f conftest*
4669
4670 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
4671 echo "configure:4672: checking for socklen_t in sys/socket.h" >&5
4672 cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 #include <sys/socket.h>
4676 int main() {
4677 socklen_t x = 5;
4678 ; return 0; }
4679 EOF
4680 if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4681 rm -rf conftest*
4682 cat >> confdefs.h <<\EOF
4683 #define HAVE_SOCKLEN_T 1
4684 EOF
4685
4686 echo "$ac_t""yes" 1>&6
4687 else
4688 echo "configure: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 rm -rf conftest*
4691 echo "$ac_t""no" 1>&6
4692 fi
4693 rm -f conftest*
4694
4695 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4696 echo "configure:4697: checking for tm_gmtoff in struct tm" >&5
4697 cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <time.h>
4701 int main() {
4702 struct tm tim; tim.tm_gmtoff = 0;
4703 ; return 0; }
4704 EOF
4705 if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4706 rm -rf conftest*
4707 cat >> confdefs.h <<\EOF
4708 #define STRUCT_TM_HAS_GMTOFF 1
4709 EOF
4710
4711 echo "$ac_t""yes" 1>&6
4712 else
4713 echo "configure: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4715 rm -rf conftest*
4716 echo "$ac_t""no" 1>&6
4717 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
4718 echo "configure:4719: checking for global timezone variable" >&5
4719 cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 #include <time.h>
4723 int main() {
4724 long z2 = timezone;
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4728 rm -rf conftest*
4729 cat >> confdefs.h <<\EOF
4730 #define HAVE_TIMEZONE 1
4731 EOF
4732
4733 echo "$ac_t""yes" 1>&6
4734 else
4735 echo "configure: failed program was:" >&5
4736 cat conftest.$ac_ext >&5
4737 rm -rf conftest*
4738 echo "$ac_t""no" 1>&6
4739 fi
4740 rm -f conftest*
4741 fi
4742 rm -f conftest*
4743
4744 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4745 # for constant arguments. Useless!
4746 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4747 echo "configure:4748: checking for working alloca.h" >&5
4748 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4749 echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751 cat > conftest.$ac_ext <<EOF
4752 #line 4753 "configure"
4753 #include "confdefs.h"
4754 #include <alloca.h>
4755 int main() {
4756 char *p = alloca(2 * sizeof(int));
4757 ; return 0; }
4758 EOF
4759 if { (eval echo configure:4760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4760 rm -rf conftest*
4761 ac_cv_header_alloca_h=yes
4762 else
4763 echo "configure: failed program was:" >&5
4764 cat conftest.$ac_ext >&5
4765 rm -rf conftest*
4766 ac_cv_header_alloca_h=no
4767 fi
4768 rm -f conftest*
4769 fi
4770
4771 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4772 if test $ac_cv_header_alloca_h = yes; then
4773 cat >> confdefs.h <<\EOF
4774 #define HAVE_ALLOCA_H 1
4775 EOF
4776
4777 fi
4778
4779 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4780 echo "configure:4781: checking for alloca" >&5
4781 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4782 echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787
4788 #ifdef __GNUC__
4789 # define alloca __builtin_alloca
4790 #else
4791 # ifdef _MSC_VER
4792 # include <malloc.h>
4793 # define alloca _alloca
4794 # else
4795 # if HAVE_ALLOCA_H
4796 # include <alloca.h>
4797 # else
4798 # ifdef _AIX
4799 #pragma alloca
4800 # else
4801 # ifndef alloca /* predefined by HP cc +Olibcalls */
4802 char *alloca ();
4803 # endif
4804 # endif
4805 # endif
4806 # endif
4807 #endif
4808
4809 int main() {
4810 char *p = (char *) alloca(1);
4811 ; return 0; }
4812 EOF
4813 if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4814 rm -rf conftest*
4815 ac_cv_func_alloca_works=yes
4816 else
4817 echo "configure: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 rm -rf conftest*
4820 ac_cv_func_alloca_works=no
4821 fi
4822 rm -f conftest*
4823 fi
4824
4825 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4826 if test $ac_cv_func_alloca_works = yes; then
4827 cat >> confdefs.h <<\EOF
4828 #define HAVE_ALLOCA 1
4829 EOF
4830
4831 fi
4832
4833 if test $ac_cv_func_alloca_works = no; then
4834 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4835 # that cause trouble. Some versions do not even contain alloca or
4836 # contain a buggy version. If you still want to use their alloca,
4837 # use ar to extract alloca.o from them instead of compiling alloca.c.
4838 ALLOCA=alloca.${ac_objext}
4839 cat >> confdefs.h <<\EOF
4840 #define C_ALLOCA 1
4841 EOF
4842
4843
4844 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4845 echo "configure:4846: checking whether alloca needs Cray hooks" >&5
4846 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4847 echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849 cat > conftest.$ac_ext <<EOF
4850 #line 4851 "configure"
4851 #include "confdefs.h"
4852 #if defined(CRAY) && ! defined(CRAY2)
4853 webecray
4854 #else
4855 wenotbecray
4856 #endif
4857
4858 EOF
4859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4860 egrep "webecray" >/dev/null 2>&1; then
4861 rm -rf conftest*
4862 ac_cv_os_cray=yes
4863 else
4864 rm -rf conftest*
4865 ac_cv_os_cray=no
4866 fi
4867 rm -f conftest*
4868
4869 fi
4870
4871 echo "$ac_t""$ac_cv_os_cray" 1>&6
4872 if test $ac_cv_os_cray = yes; then
4873 for ac_func in _getb67 GETB67 getb67; do
4874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4875 echo "configure:4876: checking for $ac_func" >&5
4876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4877 echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 /* System header to define __stub macros and hopefully few prototypes,
4883 which can conflict with char $ac_func(); below. */
4884 #include <assert.h>
4885 /* Override any gcc2 internal prototype to avoid an error. */
4886 /* We use char because int might match the return type of a gcc2
4887 builtin and then its argument prototype would still apply. */
4888 char $ac_func();
4889
4890 int main() {
4891
4892 /* The GNU C library defines this for functions which it implements
4893 to always fail with ENOSYS. Some functions are actually named
4894 something starting with __ and the normal name is an alias. */
4895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4896 choke me
4897 #else
4898 $ac_func();
4899 #endif
4900
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4904 rm -rf conftest*
4905 eval "ac_cv_func_$ac_func=yes"
4906 else
4907 echo "configure: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
4909 rm -rf conftest*
4910 eval "ac_cv_func_$ac_func=no"
4911 fi
4912 rm -f conftest*
4913 fi
4914
4915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4916 echo "$ac_t""yes" 1>&6
4917 cat >> confdefs.h <<EOF
4918 #define CRAY_STACKSEG_END $ac_func
4919 EOF
4920
4921 break
4922 else
4923 echo "$ac_t""no" 1>&6
4924 fi
4925
4926 done
4927 fi
4928
4929 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4930 echo "configure:4931: checking stack direction for C alloca" >&5
4931 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4932 echo $ac_n "(cached) $ac_c" 1>&6
4933 else
4934 if test "$cross_compiling" = yes; then
4935 ac_cv_c_stack_direction=0
4936 else
4937 cat > conftest.$ac_ext <<EOF
4938 #line 4939 "configure"
4939 #include "confdefs.h"
4940 find_stack_direction ()
4941 {
4942 static char *addr = 0;
4943 auto char dummy;
4944 if (addr == 0)
4945 {
4946 addr = &dummy;
4947 return find_stack_direction ();
4948 }
4949 else
4950 return (&dummy > addr) ? 1 : -1;
4951 }
4952 main ()
4953 {
4954 exit (find_stack_direction() < 0);
4955 }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4958 then
4959 ac_cv_c_stack_direction=1
4960 else
4961 echo "configure: failed program was:" >&5
4962 cat conftest.$ac_ext >&5
4963 rm -fr conftest*
4964 ac_cv_c_stack_direction=-1
4965 fi
4966 rm -fr conftest*
4967 fi
4968
4969 fi
4970
4971 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4972 cat >> confdefs.h <<EOF
4973 #define STACK_DIRECTION $ac_cv_c_stack_direction
4974 EOF
4975
4976 fi
4977
4978
4979 for ac_prog in perl
4980 do
4981 # Extract the first word of "$ac_prog", so it can be a program name with args.
4982 set dummy $ac_prog; ac_word=$2
4983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4984 echo "configure:4985: checking for $ac_word" >&5
4985 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
4986 echo $ac_n "(cached) $ac_c" 1>&6
4987 else
4988 if test -n "$PERL"; then
4989 ac_cv_prog_PERL="$PERL" # Let the user override the test.
4990 else
4991 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4992 ac_dummy="$PATH"
4993 for ac_dir in $ac_dummy; do
4994 test -z "$ac_dir" && ac_dir=.
4995 if test -f $ac_dir/$ac_word; then
4996 ac_cv_prog_PERL="$ac_prog"
4997 break
4998 fi
4999 done
5000 IFS="$ac_save_ifs"
5001 fi
5002 fi
5003 PERL="$ac_cv_prog_PERL"
5004 if test -n "$PERL"; then
5005 echo "$ac_t""$PERL" 1>&6
5006 else
5007 echo "$ac_t""no" 1>&6
5008 fi
5009
5010 test -n "$PERL" && break
5011 done
5012 test -n "$PERL" || PERL="false"
5013
5014
5015 if test "$enable_sjlj_exceptions" = yes; then
5016 SIGNAL_HANDLER=include/default-signal.h
5017 else
5018 case "${host}" in
5019 i?86-*-linux*)
5020 SIGNAL_HANDLER=include/i386-signal.h
5021 ;;
5022 sparc-sun-solaris*)
5023 SIGNAL_HANDLER=include/sparc-signal.h
5024 ;;
5025 *)
5026 SIGNAL_HANDLER=include/default-signal.h
5027 ;;
5028 esac
5029 fi
5030
5031
5032
5033 if test "${multilib}" = "yes"; then
5034 multilib_arg="--enable-multilib"
5035 else
5036 multilib_arg=
5037 fi
5038
5039 here=`pwd`
5040
5041
5042 trap '' 1 2 15
5043 cat > confcache <<\EOF
5044 # This file is a shell script that caches the results of configure
5045 # tests run on this system so they can be shared between configure
5046 # scripts and configure runs. It is not useful on other systems.
5047 # If it contains results you don't want to keep, you may remove or edit it.
5048 #
5049 # By default, configure uses ./config.cache as the cache file,
5050 # creating it if it does not exist already. You can give configure
5051 # the --cache-file=FILE option to use a different cache file; that is
5052 # what configure does when it calls configure scripts in
5053 # subdirectories, so they share the cache.
5054 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5055 # config.status only pays attention to the cache file if you give it the
5056 # --recheck option to rerun configure.
5057 #
5058 EOF
5059 # The following way of writing the cache mishandles newlines in values,
5060 # but we know of no workaround that is simple, portable, and efficient.
5061 # So, don't put newlines in cache variables' values.
5062 # Ultrix sh set writes to stderr and can't be redirected directly,
5063 # and sets the high bit in the cache file unless we assign to the vars.
5064 (set) 2>&1 |
5065 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5066 *ac_space=\ *)
5067 # `set' does not quote correctly, so add quotes (double-quote substitution
5068 # turns \\\\ into \\, and sed turns \\ into \).
5069 sed -n \
5070 -e "s/'/'\\\\''/g" \
5071 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5072 ;;
5073 *)
5074 # `set' quotes correctly as required by POSIX, so do not add quotes.
5075 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5076 ;;
5077 esac >> confcache
5078 if cmp -s $cache_file confcache; then
5079 :
5080 else
5081 if test -w $cache_file; then
5082 echo "updating cache $cache_file"
5083 cat confcache > $cache_file
5084 else
5085 echo "not updating unwritable cache $cache_file"
5086 fi
5087 fi
5088 rm -f confcache
5089
5090 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5091
5092 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5093 # Let make expand exec_prefix.
5094 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5095
5096 # Any assignment to VPATH causes Sun make to only execute
5097 # the first set of double-colon rules, so remove it if not needed.
5098 # If there is a colon in the path, we need to keep it.
5099 if test "x$srcdir" = x.; then
5100 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5101 fi
5102
5103 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5104
5105 DEFS=-DHAVE_CONFIG_H
5106
5107 # Without the "./", some shells look in PATH for config.status.
5108 : ${CONFIG_STATUS=./config.status}
5109
5110 echo creating $CONFIG_STATUS
5111 rm -f $CONFIG_STATUS
5112 cat > $CONFIG_STATUS <<EOF
5113 #! /bin/sh
5114 # Generated automatically by configure.
5115 # Run this file to recreate the current configuration.
5116 # This directory was configured as follows,
5117 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5118 #
5119 # $0 $ac_configure_args
5120 #
5121 # Compiler output produced by configure, useful for debugging
5122 # configure, is in ./config.log if it exists.
5123
5124 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5125 for ac_option
5126 do
5127 case "\$ac_option" in
5128 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5129 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5130 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5131 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5132 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5133 exit 0 ;;
5134 -help | --help | --hel | --he | --h)
5135 echo "\$ac_cs_usage"; exit 0 ;;
5136 *) echo "\$ac_cs_usage"; exit 1 ;;
5137 esac
5138 done
5139
5140 ac_given_srcdir=$srcdir
5141 ac_given_INSTALL="$INSTALL"
5142
5143 trap 'rm -fr `echo "Makefile libgcj.spec gcj/Makefile include/Makefile testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5144 EOF
5145 cat >> $CONFIG_STATUS <<EOF
5146
5147 # Protect against being on the right side of a sed subst in config.status.
5148 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5149 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5150 $ac_vpsub
5151 $extrasub
5152 s%@SHELL@%$SHELL%g
5153 s%@CFLAGS@%$CFLAGS%g
5154 s%@CPPFLAGS@%$CPPFLAGS%g
5155 s%@CXXFLAGS@%$CXXFLAGS%g
5156 s%@FFLAGS@%$FFLAGS%g
5157 s%@DEFS@%$DEFS%g
5158 s%@LDFLAGS@%$LDFLAGS%g
5159 s%@LIBS@%$LIBS%g
5160 s%@exec_prefix@%$exec_prefix%g
5161 s%@prefix@%$prefix%g
5162 s%@program_transform_name@%$program_transform_name%g
5163 s%@bindir@%$bindir%g
5164 s%@sbindir@%$sbindir%g
5165 s%@libexecdir@%$libexecdir%g
5166 s%@datadir@%$datadir%g
5167 s%@sysconfdir@%$sysconfdir%g
5168 s%@sharedstatedir@%$sharedstatedir%g
5169 s%@localstatedir@%$localstatedir%g
5170 s%@libdir@%$libdir%g
5171 s%@includedir@%$includedir%g
5172 s%@oldincludedir@%$oldincludedir%g
5173 s%@infodir@%$infodir%g
5174 s%@mandir@%$mandir%g
5175 s%@host@%$host%g
5176 s%@host_alias@%$host_alias%g
5177 s%@host_cpu@%$host_cpu%g
5178 s%@host_vendor@%$host_vendor%g
5179 s%@host_os@%$host_os%g
5180 s%@target@%$target%g
5181 s%@target_alias@%$target_alias%g
5182 s%@target_cpu@%$target_cpu%g
5183 s%@target_vendor@%$target_vendor%g
5184 s%@target_os@%$target_os%g
5185 s%@build@%$build%g
5186 s%@build_alias@%$build_alias%g
5187 s%@build_cpu@%$build_cpu%g
5188 s%@build_vendor@%$build_vendor%g
5189 s%@build_os@%$build_os%g
5190 s%@libgcj_basedir@%$libgcj_basedir%g
5191 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5192 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5193 s%@INSTALL_DATA@%$INSTALL_DATA%g
5194 s%@PACKAGE@%$PACKAGE%g
5195 s%@VERSION@%$VERSION%g
5196 s%@ACLOCAL@%$ACLOCAL%g
5197 s%@AUTOCONF@%$AUTOCONF%g
5198 s%@AUTOMAKE@%$AUTOMAKE%g
5199 s%@AUTOHEADER@%$AUTOHEADER%g
5200 s%@MAKEINFO@%$MAKEINFO%g
5201 s%@SET_MAKE@%$SET_MAKE%g
5202 s%@CC@%$CC%g
5203 s%@CXX@%$CXX%g
5204 s%@AS@%$AS%g
5205 s%@AR@%$AR%g
5206 s%@RANLIB@%$RANLIB%g
5207 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5208 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5209 s%@MAINT@%$MAINT%g
5210 s%@EXEEXT@%$EXEEXT%g
5211 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
5212 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
5213 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
5214 s%@INCLTDL@%$INCLTDL%g
5215 s%@LIBLTDL@%$LIBLTDL%g
5216 s%@DIRLTDL@%$DIRLTDL%g
5217 s%@LN_S@%$LN_S%g
5218 s%@LIBTOOL@%$LIBTOOL%g
5219 s%@subdirs@%$subdirs%g
5220 s%@COMPPATH@%$COMPPATH%g
5221 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
5222 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
5223 s%@LIBDATASTARTSPEC@%$LIBDATASTARTSPEC%g
5224 s%@CPP@%$CPP%g
5225 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
5226 s%@ZLIBSPEC@%$ZLIBSPEC%g
5227 s%@GCLIBS@%$GCLIBS%g
5228 s%@GCINCS@%$GCINCS%g
5229 s%@GCDEPS@%$GCDEPS%g
5230 s%@GCOBJS@%$GCOBJS%g
5231 s%@GCSPEC@%$GCSPEC%g
5232 s%@THREADLIBS@%$THREADLIBS%g
5233 s%@THREADINCS@%$THREADINCS%g
5234 s%@THREADDEPS@%$THREADDEPS%g
5235 s%@THREADOBJS@%$THREADOBJS%g
5236 s%@THREADSPEC@%$THREADSPEC%g
5237 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
5238 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
5239 s%@ZLIBS@%$ZLIBS%g
5240 s%@ZDEPS@%$ZDEPS%g
5241 s%@ZINCS@%$ZINCS%g
5242 s%@DIVIDESPEC@%$DIVIDESPEC%g
5243 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
5244 s%@FORCELIBGCCSPEC@%$FORCELIBGCCSPEC%g
5245 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
5246 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
5247 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
5248 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
5249 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
5250 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
5251 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
5252 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
5253 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
5254 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
5255 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
5256 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
5257 s%@ALLOCA@%$ALLOCA%g
5258 s%@PERL@%$PERL%g
5259 s%@here@%$here%g
5260
5261 CEOF
5262 EOF
5263
5264 cat >> $CONFIG_STATUS <<\EOF
5265
5266 # Split the substitutions into bite-sized pieces for seds with
5267 # small command number limits, like on Digital OSF/1 and HP-UX.
5268 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5269 ac_file=1 # Number of current file.
5270 ac_beg=1 # First line for current file.
5271 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5272 ac_more_lines=:
5273 ac_sed_cmds=""
5274 while $ac_more_lines; do
5275 if test $ac_beg -gt 1; then
5276 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5277 else
5278 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5279 fi
5280 if test ! -s conftest.s$ac_file; then
5281 ac_more_lines=false
5282 rm -f conftest.s$ac_file
5283 else
5284 if test -z "$ac_sed_cmds"; then
5285 ac_sed_cmds="sed -f conftest.s$ac_file"
5286 else
5287 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5288 fi
5289 ac_file=`expr $ac_file + 1`
5290 ac_beg=$ac_end
5291 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5292 fi
5293 done
5294 if test -z "$ac_sed_cmds"; then
5295 ac_sed_cmds=cat
5296 fi
5297 EOF
5298
5299 cat >> $CONFIG_STATUS <<EOF
5300
5301 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec gcj/Makefile include/Makefile testsuite/Makefile"}
5302 EOF
5303 cat >> $CONFIG_STATUS <<\EOF
5304 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5305 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5306 case "$ac_file" in
5307 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5308 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5309 *) ac_file_in="${ac_file}.in" ;;
5310 esac
5311
5312 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5313
5314 # Remove last slash and all that follows it. Not all systems have dirname.
5315 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5316 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5317 # The file is in a subdirectory.
5318 test ! -d "$ac_dir" && mkdir "$ac_dir"
5319 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5320 # A "../" for each directory in $ac_dir_suffix.
5321 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5322 else
5323 ac_dir_suffix= ac_dots=
5324 fi
5325
5326 case "$ac_given_srcdir" in
5327 .) srcdir=.
5328 if test -z "$ac_dots"; then top_srcdir=.
5329 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5330 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5331 *) # Relative path.
5332 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5333 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5334 esac
5335
5336 case "$ac_given_INSTALL" in
5337 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5338 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5339 esac
5340
5341 echo creating "$ac_file"
5342 rm -f "$ac_file"
5343 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5344 case "$ac_file" in
5345 *Makefile*) ac_comsub="1i\\
5346 # $configure_input" ;;
5347 *) ac_comsub= ;;
5348 esac
5349
5350 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5351 sed -e "$ac_comsub
5352 s%@configure_input@%$configure_input%g
5353 s%@srcdir@%$srcdir%g
5354 s%@top_srcdir@%$top_srcdir%g
5355 s%@INSTALL@%$INSTALL%g
5356 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5357 fi; done
5358 rm -f conftest.s*
5359
5360 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5361 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5362 #
5363 # ac_d sets the value in "#define NAME VALUE" lines.
5364 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5365 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5366 ac_dC='\3'
5367 ac_dD='%g'
5368 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5369 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5370 ac_uB='\([ ]\)%\1#\2define\3'
5371 ac_uC=' '
5372 ac_uD='\4%g'
5373 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5374 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5375 ac_eB='$%\1#\2define\3'
5376 ac_eC=' '
5377 ac_eD='%g'
5378
5379 if test "${CONFIG_HEADERS+set}" != set; then
5380 EOF
5381 cat >> $CONFIG_STATUS <<EOF
5382 CONFIG_HEADERS="include/config.h"
5383 EOF
5384 cat >> $CONFIG_STATUS <<\EOF
5385 fi
5386 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5387 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5388 case "$ac_file" in
5389 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5390 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5391 *) ac_file_in="${ac_file}.in" ;;
5392 esac
5393
5394 echo creating $ac_file
5395
5396 rm -f conftest.frag conftest.in conftest.out
5397 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5398 cat $ac_file_inputs > conftest.in
5399
5400 EOF
5401
5402 # Transform confdefs.h into a sed script conftest.vals that substitutes
5403 # the proper values into config.h.in to produce config.h. And first:
5404 # Protect against being on the right side of a sed subst in config.status.
5405 # Protect against being in an unquoted here document in config.status.
5406 rm -f conftest.vals
5407 cat > conftest.hdr <<\EOF
5408 s/[\\&%]/\\&/g
5409 s%[\\$`]%\\&%g
5410 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5411 s%ac_d%ac_u%gp
5412 s%ac_u%ac_e%gp
5413 EOF
5414 sed -n -f conftest.hdr confdefs.h > conftest.vals
5415 rm -f conftest.hdr
5416
5417 # This sed command replaces #undef with comments. This is necessary, for
5418 # example, in the case of _POSIX_SOURCE, which is predefined and required
5419 # on some systems where configure will not decide to define it.
5420 cat >> conftest.vals <<\EOF
5421 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5422 EOF
5423
5424 # Break up conftest.vals because some shells have a limit on
5425 # the size of here documents, and old seds have small limits too.
5426
5427 rm -f conftest.tail
5428 while :
5429 do
5430 ac_lines=`grep -c . conftest.vals`
5431 # grep -c gives empty output for an empty file on some AIX systems.
5432 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5433 # Write a limited-size here document to conftest.frag.
5434 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5435 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5436 echo 'CEOF
5437 sed -f conftest.frag conftest.in > conftest.out
5438 rm -f conftest.in
5439 mv conftest.out conftest.in
5440 ' >> $CONFIG_STATUS
5441 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5442 rm -f conftest.vals
5443 mv conftest.tail conftest.vals
5444 done
5445 rm -f conftest.vals
5446
5447 cat >> $CONFIG_STATUS <<\EOF
5448 rm -f conftest.frag conftest.h
5449 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5450 cat conftest.in >> conftest.h
5451 rm -f conftest.in
5452 if cmp -s $ac_file conftest.h 2>/dev/null; then
5453 echo "$ac_file is unchanged"
5454 rm -f conftest.h
5455 else
5456 # Remove last slash and all that follows it. Not all systems have dirname.
5457 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5458 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5459 # The file is in a subdirectory.
5460 test ! -d "$ac_dir" && mkdir "$ac_dir"
5461 fi
5462 rm -f $ac_file
5463 mv conftest.h $ac_file
5464 fi
5465 fi; done
5466
5467 EOF
5468
5469 cat >> $CONFIG_STATUS <<EOF
5470 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
5471 ac_dests="java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc include/java-gc.h include/java-threads.h include/java-signal.h"
5472 EOF
5473
5474 cat >> $CONFIG_STATUS <<\EOF
5475 srcdir=$ac_given_srcdir
5476 while test -n "$ac_sources"; do
5477 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5478 set $ac_sources; ac_source=$1; shift; ac_sources=$*
5479
5480 echo "linking $srcdir/$ac_source to $ac_dest"
5481
5482 if test ! -r $srcdir/$ac_source; then
5483 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5484 fi
5485 rm -f $ac_dest
5486
5487 # Make relative symlinks.
5488 # Remove last slash and all that follows it. Not all systems have dirname.
5489 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5490 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5491 # The dest file is in a subdirectory.
5492 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5493 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5494 # A "../" for each directory in $ac_dest_dir_suffix.
5495 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5496 else
5497 ac_dest_dir_suffix= ac_dots=
5498 fi
5499
5500 case "$srcdir" in
5501 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5502 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5503 esac
5504
5505 # Make a symlink if possible; otherwise try a hard link.
5506 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5507 ln $srcdir/$ac_source $ac_dest; then :
5508 else
5509 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5510 fi
5511 done
5512 EOF
5513 cat >> $CONFIG_STATUS <<EOF
5514
5515 srcdir=${srcdir}
5516 host=${host}
5517 target=${target}
5518 with_multisubdir=${with_multisubdir}
5519 ac_configure_args="${multilib_arg} ${ac_configure_args}"
5520 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5521 libgcj_basedir=${libgcj_basedir}
5522 CC="${CC}"
5523 CXX="${CXX}"
5524
5525 EOF
5526 cat >> $CONFIG_STATUS <<\EOF
5527 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
5528 if test -n "$CONFIG_FILES"; then
5529 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
5530 fi
5531 exit 0
5532 EOF
5533 chmod +x $CONFIG_STATUS
5534 rm -fr confdefs* $ac_clean_files
5535 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5536
5537 if test "$no_recursion" != yes; then
5538
5539 # Remove --cache-file and --srcdir arguments so they do not pile up.
5540 ac_sub_configure_args=
5541 ac_prev=
5542 for ac_arg in $ac_configure_args; do
5543 if test -n "$ac_prev"; then
5544 ac_prev=
5545 continue
5546 fi
5547 case "$ac_arg" in
5548 -cache-file | --cache-file | --cache-fil | --cache-fi \
5549 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5550 ac_prev=cache_file ;;
5551 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5552 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
5553 ;;
5554 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5555 ac_prev=srcdir ;;
5556 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5557 ;;
5558 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
5559 esac
5560 done
5561
5562 for ac_config_dir in $DIRLTDL; do
5563
5564 # Do not complain, so a configure script can configure whichever
5565 # parts of a large source tree are present.
5566 if test ! -d $srcdir/$ac_config_dir; then
5567 continue
5568 fi
5569
5570 echo configuring in $ac_config_dir
5571
5572 case "$srcdir" in
5573 .) ;;
5574 *)
5575 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
5576 else
5577 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
5578 fi
5579 ;;
5580 esac
5581
5582 ac_popdir=`pwd`
5583 cd $ac_config_dir
5584
5585 # A "../" for each directory in /$ac_config_dir.
5586 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
5587
5588 case "$srcdir" in
5589 .) # No --srcdir option. We are building in place.
5590 ac_sub_srcdir=$srcdir ;;
5591 /*) # Absolute path.
5592 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
5593 *) # Relative path.
5594 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5595 esac
5596
5597 # Check for guested configure; otherwise get Cygnus style configure.
5598 if test -f $ac_sub_srcdir/configure; then
5599 ac_sub_configure=$ac_sub_srcdir/configure
5600 elif test -f $ac_sub_srcdir/configure.in; then
5601 ac_sub_configure=$ac_configure
5602 else
5603 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
5604 ac_sub_configure=
5605 fi
5606
5607 # The recursion is here.
5608 if test -n "$ac_sub_configure"; then
5609
5610 # Make the cache file name correct relative to the subdirectory.
5611 case "$cache_file" in
5612 /*) ac_sub_cache_file=$cache_file ;;
5613 *) # Relative path.
5614 ac_sub_cache_file="$ac_dots$cache_file" ;;
5615 esac
5616 case "$ac_given_INSTALL" in
5617 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5618 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5619 esac
5620
5621 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
5622 # The eval makes quoting arguments work.
5623 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
5624 then :
5625 else
5626 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
5627 fi
5628 fi
5629
5630 cd $ac_popdir
5631 done
5632 fi
5633