OSDN Git Service

2000-01-18 Bryce McKinlay <bryce@albatross.co.nz>
[pf3gnuchains/gcc-fork.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 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
4342 do
4343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4345 echo "configure:4346: checking for $ac_hdr" >&5
4346 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4347   echo $ac_n "(cached) $ac_c" 1>&6
4348 else
4349   cat > conftest.$ac_ext <<EOF
4350 #line 4351 "configure"
4351 #include "confdefs.h"
4352 #include <$ac_hdr>
4353 EOF
4354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4355 { (eval echo configure:4356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4357 if test -z "$ac_err"; then
4358   rm -rf conftest*
4359   eval "ac_cv_header_$ac_safe=yes"
4360 else
4361   echo "$ac_err" >&5
4362   echo "configure: failed program was:" >&5
4363   cat conftest.$ac_ext >&5
4364   rm -rf conftest*
4365   eval "ac_cv_header_$ac_safe=no"
4366 fi
4367 rm -f conftest*
4368 fi
4369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4370   echo "$ac_t""yes" 1>&6
4371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4372   cat >> confdefs.h <<EOF
4373 #define $ac_tr_hdr 1
4374 EOF
4375  
4376 else
4377   echo "$ac_t""no" 1>&6
4378 fi
4379 done
4380
4381 for ac_hdr in dirent.h
4382 do
4383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4385 echo "configure:4386: checking for $ac_hdr" >&5
4386 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   cat > conftest.$ac_ext <<EOF
4390 #line 4391 "configure"
4391 #include "confdefs.h"
4392 #include <$ac_hdr>
4393 EOF
4394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4395 { (eval echo configure:4396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4397 if test -z "$ac_err"; then
4398   rm -rf conftest*
4399   eval "ac_cv_header_$ac_safe=yes"
4400 else
4401   echo "$ac_err" >&5
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   eval "ac_cv_header_$ac_safe=no"
4406 fi
4407 rm -f conftest*
4408 fi
4409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4410   echo "$ac_t""yes" 1>&6
4411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4412   cat >> confdefs.h <<EOF
4413 #define $ac_tr_hdr 1
4414 EOF
4415  
4416 else
4417   echo "$ac_t""no" 1>&6
4418 fi
4419 done
4420
4421
4422 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4423 echo "configure:4424: checking for ANSI C header files" >&5
4424 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <stdlib.h>
4431 #include <stdarg.h>
4432 #include <string.h>
4433 #include <float.h>
4434 EOF
4435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4436 { (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4438 if test -z "$ac_err"; then
4439   rm -rf conftest*
4440   ac_cv_header_stdc=yes
4441 else
4442   echo "$ac_err" >&5
4443   echo "configure: failed program was:" >&5
4444   cat conftest.$ac_ext >&5
4445   rm -rf conftest*
4446   ac_cv_header_stdc=no
4447 fi
4448 rm -f conftest*
4449
4450 if test $ac_cv_header_stdc = yes; then
4451   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4452 cat > conftest.$ac_ext <<EOF
4453 #line 4454 "configure"
4454 #include "confdefs.h"
4455 #include <string.h>
4456 EOF
4457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4458   egrep "memchr" >/dev/null 2>&1; then
4459   :
4460 else
4461   rm -rf conftest*
4462   ac_cv_header_stdc=no
4463 fi
4464 rm -f conftest*
4465
4466 fi
4467
4468 if test $ac_cv_header_stdc = yes; then
4469   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4470 cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
4472 #include "confdefs.h"
4473 #include <stdlib.h>
4474 EOF
4475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4476   egrep "free" >/dev/null 2>&1; then
4477   :
4478 else
4479   rm -rf conftest*
4480   ac_cv_header_stdc=no
4481 fi
4482 rm -f conftest*
4483
4484 fi
4485
4486 if test $ac_cv_header_stdc = yes; then
4487   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4488 if test "$cross_compiling" = yes; then
4489   :
4490 else
4491   cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494 #include <ctype.h>
4495 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4496 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4497 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4498 int main () { int i; for (i = 0; i < 256; i++)
4499 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4500 exit (0); }
4501
4502 EOF
4503 if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4504 then
4505   :
4506 else
4507   echo "configure: failed program was:" >&5
4508   cat conftest.$ac_ext >&5
4509   rm -fr conftest*
4510   ac_cv_header_stdc=no
4511 fi
4512 rm -fr conftest*
4513 fi
4514
4515 fi
4516 fi
4517
4518 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4519 if test $ac_cv_header_stdc = yes; then
4520   cat >> confdefs.h <<\EOF
4521 #define STDC_HEADERS 1
4522 EOF
4523
4524 fi
4525
4526 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4527 echo "configure:4528: checking for ssize_t" >&5
4528 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 #include <sys/types.h>
4535 #if STDC_HEADERS
4536 #include <stdlib.h>
4537 #include <stddef.h>
4538 #endif
4539 EOF
4540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4541   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4542   rm -rf conftest*
4543   ac_cv_type_ssize_t=yes
4544 else
4545   rm -rf conftest*
4546   ac_cv_type_ssize_t=no
4547 fi
4548 rm -f conftest*
4549
4550 fi
4551 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4552 if test $ac_cv_type_ssize_t = no; then
4553   cat >> confdefs.h <<\EOF
4554 #define ssize_t int
4555 EOF
4556
4557 fi
4558
4559
4560 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
4561 echo "configure:4562: checking for in_addr_t" >&5
4562 cat > conftest.$ac_ext <<EOF
4563 #line 4564 "configure"
4564 #include "confdefs.h"
4565 #include <sys/types.h>
4566 #if STDC_HEADERS
4567 #include <stdlib.h>
4568 #include <stddef.h>
4569 #endif
4570 #if HAVE_NETINET_IN_H
4571 #include <netinet/in.h>
4572 #endif
4573 int main() {
4574 in_addr_t foo;
4575 ; return 0; }
4576 EOF
4577 if { (eval echo configure:4578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4578   rm -rf conftest*
4579   cat >> confdefs.h <<\EOF
4580 #define HAVE_IN_ADDR_T 1
4581 EOF
4582
4583    echo "$ac_t""yes" 1>&6
4584 else
4585   echo "configure: failed program was:" >&5
4586   cat conftest.$ac_ext >&5
4587   rm -rf conftest*
4588   echo "$ac_t""no" 1>&6
4589 fi
4590 rm -f conftest*
4591
4592 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
4593 echo "configure:4594: checking whether struct ip_mreq is in netinet/in.h" >&5
4594 cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597 #include <netinet/in.h>
4598 int main() {
4599 struct ip_mreq mreq;
4600 ; return 0; }
4601 EOF
4602 if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4603   rm -rf conftest*
4604   cat >> confdefs.h <<\EOF
4605 #define HAVE_STRUCT_IP_MREQ 1
4606 EOF
4607
4608    echo "$ac_t""yes" 1>&6
4609 else
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   echo "$ac_t""no" 1>&6
4614 fi
4615 rm -f conftest*
4616
4617 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
4618 echo "configure:4619: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
4619 cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 #include <netinet/in.h>
4623 int main() {
4624 struct sockaddr_in6 addr6;
4625 ; return 0; }
4626 EOF
4627 if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4628   rm -rf conftest*
4629   cat >> confdefs.h <<\EOF
4630 #define HAVE_INET6 1
4631 EOF
4632
4633    echo "$ac_t""yes" 1>&6
4634 else
4635   echo "configure: failed program was:" >&5
4636   cat conftest.$ac_ext >&5
4637   rm -rf conftest*
4638   echo "$ac_t""no" 1>&6
4639 fi
4640 rm -f conftest*
4641
4642 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
4643 echo "configure:4644: checking for socklen_t in sys/socket.h" >&5
4644 cat > conftest.$ac_ext <<EOF
4645 #line 4646 "configure"
4646 #include "confdefs.h"
4647 #include <sys/socket.h>
4648 int main() {
4649 socklen_t x = 5;
4650 ; return 0; }
4651 EOF
4652 if { (eval echo configure:4653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4653   rm -rf conftest*
4654   cat >> confdefs.h <<\EOF
4655 #define HAVE_SOCKLEN_T 1
4656 EOF
4657
4658    echo "$ac_t""yes" 1>&6
4659 else
4660   echo "configure: failed program was:" >&5
4661   cat conftest.$ac_ext >&5
4662   rm -rf conftest*
4663   echo "$ac_t""no" 1>&6
4664 fi
4665 rm -f conftest*
4666
4667 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4668 echo "configure:4669: checking for tm_gmtoff in struct tm" >&5
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672 #include <time.h>
4673 int main() {
4674 struct tm tim; tim.tm_gmtoff = 0;
4675 ; return 0; }
4676 EOF
4677 if { (eval echo configure:4678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4678   rm -rf conftest*
4679   cat >> confdefs.h <<\EOF
4680 #define STRUCT_TM_HAS_GMTOFF 1
4681 EOF
4682
4683    echo "$ac_t""yes" 1>&6
4684 else
4685   echo "configure: failed program was:" >&5
4686   cat conftest.$ac_ext >&5
4687   rm -rf conftest*
4688   echo "$ac_t""no" 1>&6
4689    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
4690 echo "configure:4691: checking for global timezone variable" >&5
4691             cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 #include <time.h>
4695 int main() {
4696 long z2 = timezone;
4697 ; return 0; }
4698 EOF
4699 if { (eval echo configure:4700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4700   rm -rf conftest*
4701   cat >> confdefs.h <<\EOF
4702 #define HAVE_TIMEZONE 1
4703 EOF
4704
4705       echo "$ac_t""yes" 1>&6
4706 else
4707   echo "configure: failed program was:" >&5
4708   cat conftest.$ac_ext >&5
4709   rm -rf conftest*
4710   echo "$ac_t""no" 1>&6
4711 fi
4712 rm -f conftest*
4713 fi
4714 rm -f conftest*
4715
4716 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4717 # for constant arguments.  Useless!
4718 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4719 echo "configure:4720: checking for working alloca.h" >&5
4720 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 #include <alloca.h>
4727 int main() {
4728 char *p = alloca(2 * sizeof(int));
4729 ; return 0; }
4730 EOF
4731 if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4732   rm -rf conftest*
4733   ac_cv_header_alloca_h=yes
4734 else
4735   echo "configure: failed program was:" >&5
4736   cat conftest.$ac_ext >&5
4737   rm -rf conftest*
4738   ac_cv_header_alloca_h=no
4739 fi
4740 rm -f conftest*
4741 fi
4742
4743 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4744 if test $ac_cv_header_alloca_h = yes; then
4745   cat >> confdefs.h <<\EOF
4746 #define HAVE_ALLOCA_H 1
4747 EOF
4748
4749 fi
4750
4751 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4752 echo "configure:4753: checking for alloca" >&5
4753 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4754   echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756   cat > conftest.$ac_ext <<EOF
4757 #line 4758 "configure"
4758 #include "confdefs.h"
4759
4760 #ifdef __GNUC__
4761 # define alloca __builtin_alloca
4762 #else
4763 # ifdef _MSC_VER
4764 #  include <malloc.h>
4765 #  define alloca _alloca
4766 # else
4767 #  if HAVE_ALLOCA_H
4768 #   include <alloca.h>
4769 #  else
4770 #   ifdef _AIX
4771  #pragma alloca
4772 #   else
4773 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4774 char *alloca ();
4775 #    endif
4776 #   endif
4777 #  endif
4778 # endif
4779 #endif
4780
4781 int main() {
4782 char *p = (char *) alloca(1);
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786   rm -rf conftest*
4787   ac_cv_func_alloca_works=yes
4788 else
4789   echo "configure: failed program was:" >&5
4790   cat conftest.$ac_ext >&5
4791   rm -rf conftest*
4792   ac_cv_func_alloca_works=no
4793 fi
4794 rm -f conftest*
4795 fi
4796
4797 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4798 if test $ac_cv_func_alloca_works = yes; then
4799   cat >> confdefs.h <<\EOF
4800 #define HAVE_ALLOCA 1
4801 EOF
4802
4803 fi
4804
4805 if test $ac_cv_func_alloca_works = no; then
4806   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4807   # that cause trouble.  Some versions do not even contain alloca or
4808   # contain a buggy version.  If you still want to use their alloca,
4809   # use ar to extract alloca.o from them instead of compiling alloca.c.
4810   ALLOCA=alloca.${ac_objext}
4811   cat >> confdefs.h <<\EOF
4812 #define C_ALLOCA 1
4813 EOF
4814
4815
4816 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4817 echo "configure:4818: checking whether alloca needs Cray hooks" >&5
4818 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4819   echo $ac_n "(cached) $ac_c" 1>&6
4820 else
4821   cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 #if defined(CRAY) && ! defined(CRAY2)
4825 webecray
4826 #else
4827 wenotbecray
4828 #endif
4829
4830 EOF
4831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4832   egrep "webecray" >/dev/null 2>&1; then
4833   rm -rf conftest*
4834   ac_cv_os_cray=yes
4835 else
4836   rm -rf conftest*
4837   ac_cv_os_cray=no
4838 fi
4839 rm -f conftest*
4840
4841 fi
4842
4843 echo "$ac_t""$ac_cv_os_cray" 1>&6
4844 if test $ac_cv_os_cray = yes; then
4845 for ac_func in _getb67 GETB67 getb67; do
4846   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4847 echo "configure:4848: checking for $ac_func" >&5
4848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851   cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 /* System header to define __stub macros and hopefully few prototypes,
4855     which can conflict with char $ac_func(); below.  */
4856 #include <assert.h>
4857 /* Override any gcc2 internal prototype to avoid an error.  */
4858 /* We use char because int might match the return type of a gcc2
4859     builtin and then its argument prototype would still apply.  */
4860 char $ac_func();
4861
4862 int main() {
4863
4864 /* The GNU C library defines this for functions which it implements
4865     to always fail with ENOSYS.  Some functions are actually named
4866     something starting with __ and the normal name is an alias.  */
4867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4868 choke me
4869 #else
4870 $ac_func();
4871 #endif
4872
4873 ; return 0; }
4874 EOF
4875 if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4876   rm -rf conftest*
4877   eval "ac_cv_func_$ac_func=yes"
4878 else
4879   echo "configure: failed program was:" >&5
4880   cat conftest.$ac_ext >&5
4881   rm -rf conftest*
4882   eval "ac_cv_func_$ac_func=no"
4883 fi
4884 rm -f conftest*
4885 fi
4886
4887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889   cat >> confdefs.h <<EOF
4890 #define CRAY_STACKSEG_END $ac_func
4891 EOF
4892
4893   break
4894 else
4895   echo "$ac_t""no" 1>&6
4896 fi
4897
4898 done
4899 fi
4900
4901 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4902 echo "configure:4903: checking stack direction for C alloca" >&5
4903 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4904   echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906   if test "$cross_compiling" = yes; then
4907   ac_cv_c_stack_direction=0
4908 else
4909   cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912 find_stack_direction ()
4913 {
4914   static char *addr = 0;
4915   auto char dummy;
4916   if (addr == 0)
4917     {
4918       addr = &dummy;
4919       return find_stack_direction ();
4920     }
4921   else
4922     return (&dummy > addr) ? 1 : -1;
4923 }
4924 main ()
4925 {
4926   exit (find_stack_direction() < 0);
4927 }
4928 EOF
4929 if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4930 then
4931   ac_cv_c_stack_direction=1
4932 else
4933   echo "configure: failed program was:" >&5
4934   cat conftest.$ac_ext >&5
4935   rm -fr conftest*
4936   ac_cv_c_stack_direction=-1
4937 fi
4938 rm -fr conftest*
4939 fi
4940
4941 fi
4942
4943 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4944 cat >> confdefs.h <<EOF
4945 #define STACK_DIRECTION $ac_cv_c_stack_direction
4946 EOF
4947
4948 fi
4949
4950
4951 for ac_prog in perl
4952 do
4953 # Extract the first word of "$ac_prog", so it can be a program name with args.
4954 set dummy $ac_prog; ac_word=$2
4955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4956 echo "configure:4957: checking for $ac_word" >&5
4957 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
4958   echo $ac_n "(cached) $ac_c" 1>&6
4959 else
4960   if test -n "$PERL"; then
4961   ac_cv_prog_PERL="$PERL" # Let the user override the test.
4962 else
4963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4964   ac_dummy="$PATH"
4965   for ac_dir in $ac_dummy; do
4966     test -z "$ac_dir" && ac_dir=.
4967     if test -f $ac_dir/$ac_word; then
4968       ac_cv_prog_PERL="$ac_prog"
4969       break
4970     fi
4971   done
4972   IFS="$ac_save_ifs"
4973 fi
4974 fi
4975 PERL="$ac_cv_prog_PERL"
4976 if test -n "$PERL"; then
4977   echo "$ac_t""$PERL" 1>&6
4978 else
4979   echo "$ac_t""no" 1>&6
4980 fi
4981
4982 test -n "$PERL" && break
4983 done
4984 test -n "$PERL" || PERL="false"
4985
4986
4987 if test "$enable_sjlj_exceptions" = yes; then
4988    SIGNAL_HANDLER=include/default-signal.h
4989 else
4990    case "${host}" in
4991     i?86-*-linux*)
4992        SIGNAL_HANDLER=include/i386-signal.h
4993        ;;
4994     sparc-sun-solaris*)
4995        SIGNAL_HANDLER=include/sparc-signal.h
4996        ;;
4997     *)
4998        SIGNAL_HANDLER=include/default-signal.h
4999        ;;
5000    esac
5001 fi
5002
5003
5004
5005 if test "${multilib}" = "yes"; then
5006   multilib_arg="--enable-multilib"
5007 else
5008   multilib_arg=
5009 fi
5010
5011 here=`pwd`
5012
5013
5014 trap '' 1 2 15
5015 cat > confcache <<\EOF
5016 # This file is a shell script that caches the results of configure
5017 # tests run on this system so they can be shared between configure
5018 # scripts and configure runs.  It is not useful on other systems.
5019 # If it contains results you don't want to keep, you may remove or edit it.
5020 #
5021 # By default, configure uses ./config.cache as the cache file,
5022 # creating it if it does not exist already.  You can give configure
5023 # the --cache-file=FILE option to use a different cache file; that is
5024 # what configure does when it calls configure scripts in
5025 # subdirectories, so they share the cache.
5026 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5027 # config.status only pays attention to the cache file if you give it the
5028 # --recheck option to rerun configure.
5029 #
5030 EOF
5031 # The following way of writing the cache mishandles newlines in values,
5032 # but we know of no workaround that is simple, portable, and efficient.
5033 # So, don't put newlines in cache variables' values.
5034 # Ultrix sh set writes to stderr and can't be redirected directly,
5035 # and sets the high bit in the cache file unless we assign to the vars.
5036 (set) 2>&1 |
5037   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5038   *ac_space=\ *)
5039     # `set' does not quote correctly, so add quotes (double-quote substitution
5040     # turns \\\\ into \\, and sed turns \\ into \).
5041     sed -n \
5042       -e "s/'/'\\\\''/g" \
5043       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5044     ;;
5045   *)
5046     # `set' quotes correctly as required by POSIX, so do not add quotes.
5047     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5048     ;;
5049   esac >> confcache
5050 if cmp -s $cache_file confcache; then
5051   :
5052 else
5053   if test -w $cache_file; then
5054     echo "updating cache $cache_file"
5055     cat confcache > $cache_file
5056   else
5057     echo "not updating unwritable cache $cache_file"
5058   fi
5059 fi
5060 rm -f confcache
5061
5062 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5063
5064 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5065 # Let make expand exec_prefix.
5066 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5067
5068 # Any assignment to VPATH causes Sun make to only execute
5069 # the first set of double-colon rules, so remove it if not needed.
5070 # If there is a colon in the path, we need to keep it.
5071 if test "x$srcdir" = x.; then
5072   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5073 fi
5074
5075 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5076
5077 DEFS=-DHAVE_CONFIG_H
5078
5079 # Without the "./", some shells look in PATH for config.status.
5080 : ${CONFIG_STATUS=./config.status}
5081
5082 echo creating $CONFIG_STATUS
5083 rm -f $CONFIG_STATUS
5084 cat > $CONFIG_STATUS <<EOF
5085 #! /bin/sh
5086 # Generated automatically by configure.
5087 # Run this file to recreate the current configuration.
5088 # This directory was configured as follows,
5089 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5090 #
5091 # $0 $ac_configure_args
5092 #
5093 # Compiler output produced by configure, useful for debugging
5094 # configure, is in ./config.log if it exists.
5095
5096 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5097 for ac_option
5098 do
5099   case "\$ac_option" in
5100   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5101     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5102     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5103   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5104     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5105     exit 0 ;;
5106   -help | --help | --hel | --he | --h)
5107     echo "\$ac_cs_usage"; exit 0 ;;
5108   *) echo "\$ac_cs_usage"; exit 1 ;;
5109   esac
5110 done
5111
5112 ac_given_srcdir=$srcdir
5113 ac_given_INSTALL="$INSTALL"
5114
5115 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
5116 EOF
5117 cat >> $CONFIG_STATUS <<EOF
5118
5119 # Protect against being on the right side of a sed subst in config.status.
5120 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5121  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5122 $ac_vpsub
5123 $extrasub
5124 s%@SHELL@%$SHELL%g
5125 s%@CFLAGS@%$CFLAGS%g
5126 s%@CPPFLAGS@%$CPPFLAGS%g
5127 s%@CXXFLAGS@%$CXXFLAGS%g
5128 s%@FFLAGS@%$FFLAGS%g
5129 s%@DEFS@%$DEFS%g
5130 s%@LDFLAGS@%$LDFLAGS%g
5131 s%@LIBS@%$LIBS%g
5132 s%@exec_prefix@%$exec_prefix%g
5133 s%@prefix@%$prefix%g
5134 s%@program_transform_name@%$program_transform_name%g
5135 s%@bindir@%$bindir%g
5136 s%@sbindir@%$sbindir%g
5137 s%@libexecdir@%$libexecdir%g
5138 s%@datadir@%$datadir%g
5139 s%@sysconfdir@%$sysconfdir%g
5140 s%@sharedstatedir@%$sharedstatedir%g
5141 s%@localstatedir@%$localstatedir%g
5142 s%@libdir@%$libdir%g
5143 s%@includedir@%$includedir%g
5144 s%@oldincludedir@%$oldincludedir%g
5145 s%@infodir@%$infodir%g
5146 s%@mandir@%$mandir%g
5147 s%@host@%$host%g
5148 s%@host_alias@%$host_alias%g
5149 s%@host_cpu@%$host_cpu%g
5150 s%@host_vendor@%$host_vendor%g
5151 s%@host_os@%$host_os%g
5152 s%@target@%$target%g
5153 s%@target_alias@%$target_alias%g
5154 s%@target_cpu@%$target_cpu%g
5155 s%@target_vendor@%$target_vendor%g
5156 s%@target_os@%$target_os%g
5157 s%@build@%$build%g
5158 s%@build_alias@%$build_alias%g
5159 s%@build_cpu@%$build_cpu%g
5160 s%@build_vendor@%$build_vendor%g
5161 s%@build_os@%$build_os%g
5162 s%@libgcj_basedir@%$libgcj_basedir%g
5163 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5164 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5165 s%@INSTALL_DATA@%$INSTALL_DATA%g
5166 s%@PACKAGE@%$PACKAGE%g
5167 s%@VERSION@%$VERSION%g
5168 s%@ACLOCAL@%$ACLOCAL%g
5169 s%@AUTOCONF@%$AUTOCONF%g
5170 s%@AUTOMAKE@%$AUTOMAKE%g
5171 s%@AUTOHEADER@%$AUTOHEADER%g
5172 s%@MAKEINFO@%$MAKEINFO%g
5173 s%@SET_MAKE@%$SET_MAKE%g
5174 s%@CC@%$CC%g
5175 s%@CXX@%$CXX%g
5176 s%@AS@%$AS%g
5177 s%@AR@%$AR%g
5178 s%@RANLIB@%$RANLIB%g
5179 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5180 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5181 s%@MAINT@%$MAINT%g
5182 s%@EXEEXT@%$EXEEXT%g
5183 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
5184 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
5185 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
5186 s%@INCLTDL@%$INCLTDL%g
5187 s%@LIBLTDL@%$LIBLTDL%g
5188 s%@DIRLTDL@%$DIRLTDL%g
5189 s%@LN_S@%$LN_S%g
5190 s%@LIBTOOL@%$LIBTOOL%g
5191 s%@subdirs@%$subdirs%g
5192 s%@COMPPATH@%$COMPPATH%g
5193 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
5194 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
5195 s%@LIBDATASTARTSPEC@%$LIBDATASTARTSPEC%g
5196 s%@CPP@%$CPP%g
5197 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
5198 s%@ZLIBSPEC@%$ZLIBSPEC%g
5199 s%@GCLIBS@%$GCLIBS%g
5200 s%@GCINCS@%$GCINCS%g
5201 s%@GCDEPS@%$GCDEPS%g
5202 s%@GCOBJS@%$GCOBJS%g
5203 s%@GCSPEC@%$GCSPEC%g
5204 s%@THREADLIBS@%$THREADLIBS%g
5205 s%@THREADINCS@%$THREADINCS%g
5206 s%@THREADDEPS@%$THREADDEPS%g
5207 s%@THREADOBJS@%$THREADOBJS%g
5208 s%@THREADSPEC@%$THREADSPEC%g
5209 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
5210 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
5211 s%@ZLIBS@%$ZLIBS%g
5212 s%@ZDEPS@%$ZDEPS%g
5213 s%@ZINCS@%$ZINCS%g
5214 s%@DIVIDESPEC@%$DIVIDESPEC%g
5215 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
5216 s%@FORCELIBGCCSPEC@%$FORCELIBGCCSPEC%g
5217 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
5218 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
5219 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
5220 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
5221 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
5222 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
5223 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
5224 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
5225 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
5226 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
5227 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
5228 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
5229 s%@ALLOCA@%$ALLOCA%g
5230 s%@PERL@%$PERL%g
5231 s%@here@%$here%g
5232
5233 CEOF
5234 EOF
5235
5236 cat >> $CONFIG_STATUS <<\EOF
5237
5238 # Split the substitutions into bite-sized pieces for seds with
5239 # small command number limits, like on Digital OSF/1 and HP-UX.
5240 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5241 ac_file=1 # Number of current file.
5242 ac_beg=1 # First line for current file.
5243 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5244 ac_more_lines=:
5245 ac_sed_cmds=""
5246 while $ac_more_lines; do
5247   if test $ac_beg -gt 1; then
5248     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5249   else
5250     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5251   fi
5252   if test ! -s conftest.s$ac_file; then
5253     ac_more_lines=false
5254     rm -f conftest.s$ac_file
5255   else
5256     if test -z "$ac_sed_cmds"; then
5257       ac_sed_cmds="sed -f conftest.s$ac_file"
5258     else
5259       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5260     fi
5261     ac_file=`expr $ac_file + 1`
5262     ac_beg=$ac_end
5263     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5264   fi
5265 done
5266 if test -z "$ac_sed_cmds"; then
5267   ac_sed_cmds=cat
5268 fi
5269 EOF
5270
5271 cat >> $CONFIG_STATUS <<EOF
5272
5273 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec gcj/Makefile include/Makefile testsuite/Makefile"}
5274 EOF
5275 cat >> $CONFIG_STATUS <<\EOF
5276 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5277   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5278   case "$ac_file" in
5279   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5280        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5281   *) ac_file_in="${ac_file}.in" ;;
5282   esac
5283
5284   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5285
5286   # Remove last slash and all that follows it.  Not all systems have dirname.
5287   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5288   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5289     # The file is in a subdirectory.
5290     test ! -d "$ac_dir" && mkdir "$ac_dir"
5291     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5292     # A "../" for each directory in $ac_dir_suffix.
5293     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5294   else
5295     ac_dir_suffix= ac_dots=
5296   fi
5297
5298   case "$ac_given_srcdir" in
5299   .)  srcdir=.
5300       if test -z "$ac_dots"; then top_srcdir=.
5301       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5302   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5303   *) # Relative path.
5304     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5305     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5306   esac
5307
5308   case "$ac_given_INSTALL" in
5309   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5310   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5311   esac
5312
5313   echo creating "$ac_file"
5314   rm -f "$ac_file"
5315   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5316   case "$ac_file" in
5317   *Makefile*) ac_comsub="1i\\
5318 # $configure_input" ;;
5319   *) ac_comsub= ;;
5320   esac
5321
5322   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5323   sed -e "$ac_comsub
5324 s%@configure_input@%$configure_input%g
5325 s%@srcdir@%$srcdir%g
5326 s%@top_srcdir@%$top_srcdir%g
5327 s%@INSTALL@%$INSTALL%g
5328 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5329 fi; done
5330 rm -f conftest.s*
5331
5332 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5333 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5334 #
5335 # ac_d sets the value in "#define NAME VALUE" lines.
5336 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5337 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5338 ac_dC='\3'
5339 ac_dD='%g'
5340 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5341 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5342 ac_uB='\([      ]\)%\1#\2define\3'
5343 ac_uC=' '
5344 ac_uD='\4%g'
5345 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5346 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5347 ac_eB='$%\1#\2define\3'
5348 ac_eC=' '
5349 ac_eD='%g'
5350
5351 if test "${CONFIG_HEADERS+set}" != set; then
5352 EOF
5353 cat >> $CONFIG_STATUS <<EOF
5354   CONFIG_HEADERS="include/config.h"
5355 EOF
5356 cat >> $CONFIG_STATUS <<\EOF
5357 fi
5358 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5359   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5360   case "$ac_file" in
5361   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5362        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5363   *) ac_file_in="${ac_file}.in" ;;
5364   esac
5365
5366   echo creating $ac_file
5367
5368   rm -f conftest.frag conftest.in conftest.out
5369   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5370   cat $ac_file_inputs > conftest.in
5371
5372 EOF
5373
5374 # Transform confdefs.h into a sed script conftest.vals that substitutes
5375 # the proper values into config.h.in to produce config.h.  And first:
5376 # Protect against being on the right side of a sed subst in config.status.
5377 # Protect against being in an unquoted here document in config.status.
5378 rm -f conftest.vals
5379 cat > conftest.hdr <<\EOF
5380 s/[\\&%]/\\&/g
5381 s%[\\$`]%\\&%g
5382 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5383 s%ac_d%ac_u%gp
5384 s%ac_u%ac_e%gp
5385 EOF
5386 sed -n -f conftest.hdr confdefs.h > conftest.vals
5387 rm -f conftest.hdr
5388
5389 # This sed command replaces #undef with comments.  This is necessary, for
5390 # example, in the case of _POSIX_SOURCE, which is predefined and required
5391 # on some systems where configure will not decide to define it.
5392 cat >> conftest.vals <<\EOF
5393 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5394 EOF
5395
5396 # Break up conftest.vals because some shells have a limit on
5397 # the size of here documents, and old seds have small limits too.
5398
5399 rm -f conftest.tail
5400 while :
5401 do
5402   ac_lines=`grep -c . conftest.vals`
5403   # grep -c gives empty output for an empty file on some AIX systems.
5404   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5405   # Write a limited-size here document to conftest.frag.
5406   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5407   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5408   echo 'CEOF
5409   sed -f conftest.frag conftest.in > conftest.out
5410   rm -f conftest.in
5411   mv conftest.out conftest.in
5412 ' >> $CONFIG_STATUS
5413   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5414   rm -f conftest.vals
5415   mv conftest.tail conftest.vals
5416 done
5417 rm -f conftest.vals
5418
5419 cat >> $CONFIG_STATUS <<\EOF
5420   rm -f conftest.frag conftest.h
5421   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5422   cat conftest.in >> conftest.h
5423   rm -f conftest.in
5424   if cmp -s $ac_file conftest.h 2>/dev/null; then
5425     echo "$ac_file is unchanged"
5426     rm -f conftest.h
5427   else
5428     # Remove last slash and all that follows it.  Not all systems have dirname.
5429       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5430       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5431       # The file is in a subdirectory.
5432       test ! -d "$ac_dir" && mkdir "$ac_dir"
5433     fi
5434     rm -f $ac_file
5435     mv conftest.h $ac_file
5436   fi
5437 fi; done
5438
5439 EOF
5440
5441 cat >> $CONFIG_STATUS <<EOF
5442 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
5443 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"
5444 EOF
5445
5446 cat >> $CONFIG_STATUS <<\EOF
5447 srcdir=$ac_given_srcdir
5448 while test -n "$ac_sources"; do
5449   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5450   set $ac_sources; ac_source=$1; shift; ac_sources=$*
5451
5452   echo "linking $srcdir/$ac_source to $ac_dest"
5453
5454   if test ! -r $srcdir/$ac_source; then
5455     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5456   fi
5457   rm -f $ac_dest
5458
5459   # Make relative symlinks.
5460   # Remove last slash and all that follows it.  Not all systems have dirname.
5461   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5462   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5463     # The dest file is in a subdirectory.
5464     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5465     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5466     # A "../" for each directory in $ac_dest_dir_suffix.
5467     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5468   else
5469     ac_dest_dir_suffix= ac_dots=
5470   fi
5471
5472   case "$srcdir" in
5473   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5474   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5475   esac
5476
5477   # Make a symlink if possible; otherwise try a hard link.
5478   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5479     ln $srcdir/$ac_source $ac_dest; then :
5480   else
5481     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5482   fi
5483 done
5484 EOF
5485 cat >> $CONFIG_STATUS <<EOF
5486
5487 srcdir=${srcdir}
5488 host=${host}
5489 target=${target}
5490 with_multisubdir=${with_multisubdir}
5491 ac_configure_args="${multilib_arg} ${ac_configure_args}"
5492 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5493 libgcj_basedir=${libgcj_basedir}
5494 CC="${CC}"
5495 CXX="${CXX}"
5496
5497 EOF
5498 cat >> $CONFIG_STATUS <<\EOF
5499 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
5500 if test -n "$CONFIG_FILES"; then
5501   ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
5502 fi
5503 exit 0
5504 EOF
5505 chmod +x $CONFIG_STATUS
5506 rm -fr confdefs* $ac_clean_files
5507 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5508
5509 if test "$no_recursion" != yes; then
5510
5511   # Remove --cache-file and --srcdir arguments so they do not pile up.
5512   ac_sub_configure_args=
5513   ac_prev=
5514   for ac_arg in $ac_configure_args; do
5515     if test -n "$ac_prev"; then
5516       ac_prev=
5517       continue
5518     fi
5519     case "$ac_arg" in
5520     -cache-file | --cache-file | --cache-fil | --cache-fi \
5521     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5522       ac_prev=cache_file ;;
5523     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5524     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
5525       ;;
5526     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5527       ac_prev=srcdir ;;
5528     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5529       ;;
5530     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
5531     esac
5532   done
5533
5534   for ac_config_dir in $DIRLTDL; do
5535
5536     # Do not complain, so a configure script can configure whichever
5537     # parts of a large source tree are present.
5538     if test ! -d $srcdir/$ac_config_dir; then
5539       continue
5540     fi
5541
5542     echo configuring in $ac_config_dir
5543
5544     case "$srcdir" in
5545     .) ;;
5546     *)
5547       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
5548       else
5549         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
5550       fi
5551       ;;
5552     esac
5553
5554     ac_popdir=`pwd`
5555     cd $ac_config_dir
5556
5557       # A "../" for each directory in /$ac_config_dir.
5558       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
5559
5560     case "$srcdir" in
5561     .) # No --srcdir option.  We are building in place.
5562       ac_sub_srcdir=$srcdir ;;
5563     /*) # Absolute path.
5564       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
5565     *) # Relative path.
5566       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5567     esac
5568
5569     # Check for guested configure; otherwise get Cygnus style configure.
5570     if test -f $ac_sub_srcdir/configure; then
5571       ac_sub_configure=$ac_sub_srcdir/configure
5572     elif test -f $ac_sub_srcdir/configure.in; then
5573       ac_sub_configure=$ac_configure
5574     else
5575       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
5576       ac_sub_configure=
5577     fi
5578
5579     # The recursion is here.
5580     if test -n "$ac_sub_configure"; then
5581
5582       # Make the cache file name correct relative to the subdirectory.
5583       case "$cache_file" in
5584       /*) ac_sub_cache_file=$cache_file ;;
5585       *) # Relative path.
5586         ac_sub_cache_file="$ac_dots$cache_file" ;;
5587       esac
5588   case "$ac_given_INSTALL" in
5589         [/$]*) INSTALL="$ac_given_INSTALL" ;;
5590         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5591         esac
5592
5593       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
5594       # The eval makes quoting arguments work.
5595       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
5596       then :
5597       else
5598         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
5599       fi
5600     fi
5601
5602     cd $ac_popdir
5603   done
5604 fi
5605