OSDN Git Service

2000-01-18 Andrew Haley <aph@cygnus.com>
[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   fi
2108 fi
2109
2110
2111 if test "$libgcj_interpreter" = yes; then
2112    cat >> confdefs.h <<\EOF
2113 #define INTERPRETER 1
2114 EOF
2115
2116 fi
2117
2118 EXCEPTIONSPEC=
2119 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2120 if test "${enable_sjlj_exceptions+set}" = set; then
2121   enableval="$enable_sjlj_exceptions"
2122   if test "$enable_sjlj_exceptions" = yes; then
2123      # This can be set in configure.host.
2124      libgcj_sjlj=yes
2125   fi
2126 fi
2127
2128
2129 if test "$libgcj_sjlj" = yes; then
2130    EXCEPTIONSPEC="-fsjlj-exceptions"
2131    cat >> confdefs.h <<\EOF
2132 #define SJLJ_EXCEPTIONS 1
2133 EOF
2134
2135 fi
2136
2137 FORCELIBGCCSPEC=
2138 if test "$ac_cv_prog_gnu_ld" = yes; then
2139    FORCELIBGCCSPEC="-u __rethrow -u __frame_state_for -lgcc"
2140 fi   
2141
2142 echo $ac_n "checking for data_start""... $ac_c" 1>&6
2143 echo "configure:2144: checking for data_start" >&5
2144 LIBDATASTARTSPEC=
2145 NEEDS_DATA_START=
2146 cat > conftest.$ac_ext <<EOF
2147 #line 2148 "configure"
2148 #include "confdefs.h"
2149 extern int data_start;
2150 int main() {
2151 return ((int) &data_start);
2152 ; return 0; }
2153 EOF
2154 if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2155   rm -rf conftest*
2156   echo "$ac_t""found it" 1>&6
2157 else
2158   echo "configure: failed program was:" >&5
2159   cat conftest.$ac_ext >&5
2160   rm -rf conftest*
2161   LIBDATASTARTSPEC="-u data_start -lgcjdata"
2162    NEEDS_DATA_START=yes 
2163    echo "$ac_t""missing" 1>&6
2164 fi
2165 rm -f conftest*
2166
2167
2168 # Check whether --enable-java-net or --disable-java-net was given.
2169 if test "${enable_java_net+set}" = set; then
2170   enableval="$enable_java_net"
2171   :
2172 fi
2173
2174
2175 if test -n "$enable_java_net"; then
2176    enable_java_net=${enable_java_net_default-yes}
2177 fi
2178 if test "$enable_java_net" = no; then
2179    cat >> confdefs.h <<\EOF
2180 #define DISABLE_JAVA_NET 1
2181 EOF
2182
2183 fi
2184
2185 TARGET_ECOS="no"
2186 # Check whether --with-ecos or --without-ecos was given.
2187 if test "${with_ecos+set}" = set; then
2188   withval="$with_ecos"
2189   TARGET_ECOS="$with_ecos"
2190
2191 fi
2192
2193
2194 case "$TARGET_ECOS" in
2195    no)
2196       FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2197       PROCESS=${PROCESS-Posix}
2198       ;;
2199    *)
2200       FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2201       PROCESS=Ecos
2202       cat >> confdefs.h <<\EOF
2203 #define ECOS 1
2204 EOF
2205
2206       ;;
2207 esac
2208
2209 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2210 echo "configure:2211: checking how to run the C preprocessor" >&5
2211 # On Suns, sometimes $CPP names a directory.
2212 if test -n "$CPP" && test -d "$CPP"; then
2213   CPP=
2214 fi
2215 if test -z "$CPP"; then
2216 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2217   echo $ac_n "(cached) $ac_c" 1>&6
2218 else
2219     # This must be in double quotes, not single quotes, because CPP may get
2220   # substituted into the Makefile and "${CC-cc}" will confuse make.
2221   CPP="${CC-cc} -E"
2222   # On the NeXT, cc -E runs the code through the compiler's parser,
2223   # not just through cpp.
2224   cat > conftest.$ac_ext <<EOF
2225 #line 2226 "configure"
2226 #include "confdefs.h"
2227 #include <assert.h>
2228 Syntax Error
2229 EOF
2230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2231 { (eval echo configure:2232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2233 if test -z "$ac_err"; then
2234   :
2235 else
2236   echo "$ac_err" >&5
2237   echo "configure: failed program was:" >&5
2238   cat conftest.$ac_ext >&5
2239   rm -rf conftest*
2240   CPP="${CC-cc} -E -traditional-cpp"
2241   cat > conftest.$ac_ext <<EOF
2242 #line 2243 "configure"
2243 #include "confdefs.h"
2244 #include <assert.h>
2245 Syntax Error
2246 EOF
2247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2248 { (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2250 if test -z "$ac_err"; then
2251   :
2252 else
2253   echo "$ac_err" >&5
2254   echo "configure: failed program was:" >&5
2255   cat conftest.$ac_ext >&5
2256   rm -rf conftest*
2257   CPP="${CC-cc} -nologo -E"
2258   cat > conftest.$ac_ext <<EOF
2259 #line 2260 "configure"
2260 #include "confdefs.h"
2261 #include <assert.h>
2262 Syntax Error
2263 EOF
2264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2265 { (eval echo configure:2266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2267 if test -z "$ac_err"; then
2268   :
2269 else
2270   echo "$ac_err" >&5
2271   echo "configure: failed program was:" >&5
2272   cat conftest.$ac_ext >&5
2273   rm -rf conftest*
2274   CPP=/lib/cpp
2275 fi
2276 rm -f conftest*
2277 fi
2278 rm -f conftest*
2279 fi
2280 rm -f conftest*
2281   ac_cv_prog_CPP="$CPP"
2282 fi
2283   CPP="$ac_cv_prog_CPP"
2284 else
2285   ac_cv_prog_CPP="$CPP"
2286 fi
2287 echo "$ac_t""$CPP" 1>&6
2288
2289 cat > conftest.$ac_ext <<EOF
2290 #line 2291 "configure"
2291 #include "confdefs.h"
2292 #include <stdint.h>
2293 EOF
2294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2295   egrep "uint32_t" >/dev/null 2>&1; then
2296   rm -rf conftest*
2297   cat >> confdefs.h <<\EOF
2298 #define HAVE_INT32_DEFINED 1
2299 EOF
2300
2301 fi
2302 rm -f conftest*
2303
2304 cat > conftest.$ac_ext <<EOF
2305 #line 2306 "configure"
2306 #include "confdefs.h"
2307 #include <inttypes.h>
2308 EOF
2309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2310   egrep "uint32_t" >/dev/null 2>&1; then
2311   rm -rf conftest*
2312   cat >> confdefs.h <<\EOF
2313 #define HAVE_INT32_DEFINED 1
2314 EOF
2315
2316 fi
2317 rm -f conftest*
2318
2319 cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <sys/types.h>
2323 EOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "u_int32_t" >/dev/null 2>&1; then
2326   rm -rf conftest*
2327   cat >> confdefs.h <<\EOF
2328 #define HAVE_BSD_INT32_DEFINED 1
2329 EOF
2330
2331 fi
2332 rm -f conftest*
2333
2334 cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 #include <sys/config.h>
2338 EOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "u_int32_t" >/dev/null 2>&1; then
2341   rm -rf conftest*
2342   cat >> confdefs.h <<\EOF
2343 #define HAVE_BSD_INT32_DEFINED 1
2344 EOF
2345
2346 fi
2347 rm -f conftest*
2348
2349
2350
2351 cat > conftest.$ac_ext <<EOF
2352 #line 2353 "configure"
2353 #include "confdefs.h"
2354 #include <time.h>
2355 EOF
2356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2357   egrep "mktime" >/dev/null 2>&1; then
2358   rm -rf conftest*
2359   cat >> confdefs.h <<\EOF
2360 #define HAVE_MKTIME 1
2361 EOF
2362
2363 fi
2364 rm -f conftest*
2365
2366 cat > conftest.$ac_ext <<EOF
2367 #line 2368 "configure"
2368 #include "confdefs.h"
2369 #include <time.h>
2370 EOF
2371 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2372   egrep "localtime" >/dev/null 2>&1; then
2373   rm -rf conftest*
2374   cat >> confdefs.h <<\EOF
2375 #define HAVE_LOCALTIME 1
2376 EOF
2377
2378 fi
2379 rm -f conftest*
2380
2381
2382 test -d java || mkdir java
2383 test -d java/io || mkdir java/io
2384
2385
2386 test -d java/lang || mkdir java/lang
2387
2388
2389
2390 SYSTEMSPEC=
2391
2392
2393 # Check whether --with-system-zlib or --without-system-zlib was given.
2394 if test "${with_system_zlib+set}" = set; then
2395   withval="$with_system_zlib"
2396   :
2397 fi
2398
2399 ZLIBSPEC=
2400
2401
2402 libsubdir=.libs
2403
2404 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
2405 echo "configure:2406: checking for garbage collector to use" >&5
2406 # Check whether --enable-java-gc or --disable-java-gc was given.
2407 if test "${enable_java_gc+set}" = set; then
2408   enableval="$enable_java_gc"
2409   
2410   GC=$enableval
2411 else
2412   GC=boehm
2413 fi
2414
2415 GCLIBS=
2416 GCINCS=
2417 GCDEPS=
2418 GCOBJS=
2419 GCSPEC=
2420 case "$GC" in
2421  boehm)
2422     echo "$ac_t""boehm" 1>&6
2423     GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
2424     # We include the path to the boehm-gc build directory.
2425     # See Makefile.am to understand why.
2426     GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
2427     GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
2428     GCSPEC='-lgcjgc'
2429             GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
2430     GCOBJS=boehm.lo
2431     GCHDR=boehm-gc.h
2432         cat >> confdefs.h <<\EOF
2433 #define HAVE_BOEHM_GC 1
2434 EOF
2435
2436     ;;
2437  no)
2438     echo "$ac_t""none" 1>&6
2439     GCOBJS=nogc.lo
2440     GCHDR=no-gc.h
2441     ;;
2442  *)
2443     { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
2444     ;;
2445 esac
2446
2447
2448
2449
2450
2451
2452
2453
2454 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
2455 echo "configure:2456: checking for threads package to use" >&5
2456 # Check whether --enable-threads or --disable-threads was given.
2457 if test "${enable_threads+set}" = set; then
2458   enableval="$enable_threads"
2459   THREADS=$enableval
2460 else
2461     THREADS=no
2462 fi
2463
2464
2465 if test "$THREADS" = yes; then
2466    case "$host" in
2467     *-*-vxworks*)
2468        THREADS=vxworks
2469        ;;
2470     *-*-linux*)
2471        # FIXME: this isn't correct in all cases.
2472        THREADS=posix
2473        ;;
2474     *-*-win*)
2475        THREADS=win32
2476        ;;
2477     *-*-irix*)
2478        # FIXME: for now, choose POSIX, because we implement that.
2479        # Later, choose irix threads.
2480        THREADS=posix
2481        ;;
2482     *-*-solaris*)
2483        # FIXME: for now, choose POSIX, because we implement that.
2484        # Later, choose solaris threads.
2485        THREADS=posix
2486        ;;
2487     *)
2488        # For now.
2489        THREADS=none
2490        ;;
2491    esac
2492 fi
2493
2494 case "$THREADS" in
2495  no | none | single)
2496     THREADS=none
2497     ;;
2498  posix | pthreads)
2499     THREADS=posix
2500     case "$host" in
2501      *-*-linux*)
2502         cat >> confdefs.h <<\EOF
2503 #define LINUX_THREADS 1
2504 EOF
2505
2506         ;;
2507     esac
2508     ;;
2509  decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
2510     { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
2511     ;;
2512  *)
2513     { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
2514     ;;
2515 esac
2516 echo "$ac_t""$THREADS" 1>&6
2517
2518 THREADLIBS=
2519 THREADINCS=
2520 THREADDEPS=
2521 THREADOBJS=
2522 THREADH=
2523 THREADSPEC=
2524 case "$THREADS" in
2525  posix)
2526     THREADLIBS=-lpthread
2527     THREADSPEC=-lpthread
2528     THREADOBJS=posix-threads.lo
2529     THREADH=posix-threads.h
2530     # MIT pthreads doesn't seem to have the mutexattr functions.
2531     # But for now we don't check for it.  We just assume you aren't
2532     # using MIT pthreads.
2533     cat >> confdefs.h <<\EOF
2534 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
2535 EOF
2536
2537     ;;
2538
2539  none)
2540     THREADOBJS=no-threads.lo
2541     THREADH=no-threads.h
2542     ;;
2543 esac
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553 if test "$GCC" = yes; then
2554   USING_GCC_TRUE=
2555   USING_GCC_FALSE='#'
2556 else
2557   USING_GCC_TRUE='#'
2558   USING_GCC_FALSE=
2559 fi
2560
2561 CANADIAN=no
2562 NULL_TARGET=no
2563 NATIVE=yes
2564
2565 # Find eh-common.h and support headers.  If we're in the tree with
2566 # gcc, then look there.  Otherwise look in compat-include.  If all else
2567 # fails, just hope the user has set things up somehow.
2568 if test -r $srcdir/../gcc/eh-common.h; then
2569    EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
2570 else
2571    if test -d $srcdir/../compat-include; then
2572       EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
2573    else
2574       EH_COMMON_INCLUDE=
2575    fi
2576 fi
2577
2578 if test -n "${with_cross_host}"; then
2579    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
2580    # may not work correctly, because the compiler may not be able to
2581    # link executables.
2582
2583    # We assume newlib.  This lets us hard-code the functions we know
2584    # we'll have.
2585    cat >> confdefs.h <<\EOF
2586 #define HAVE_MEMMOVE 1
2587 EOF
2588
2589    cat >> confdefs.h <<\EOF
2590 #define HAVE_MEMCPY 1
2591 EOF
2592
2593    cat >> confdefs.h <<\EOF
2594 #define HAVE_STRERROR 1
2595 EOF
2596
2597    cat >> confdefs.h <<\EOF
2598 #define HAVE_GMTIME_R 1
2599 EOF
2600
2601    cat >> confdefs.h <<\EOF
2602 #define HAVE_LOCALTIME_R 1
2603 EOF
2604
2605       cat >> confdefs.h <<\EOF
2606 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
2607 EOF
2608
2609       cat >> confdefs.h <<\EOF
2610 #define HAVE_ALLOCA 1
2611 EOF
2612
2613
2614       cat >> confdefs.h <<\EOF
2615 #define NO_GETUID 1
2616 EOF
2617
2618
2619    ZLIBSPEC=-lzgcj
2620
2621    # If Canadian cross, then don't pick up tools from the build
2622    # directory.
2623    if test "$build" != "$with_cross_host"; then
2624       CANADIAN=yes
2625       EH_COMMON_INCLUDE=
2626       GCJ="${target_alias}-gcj"
2627    else
2628       GCJ=
2629    fi
2630    NATIVE=no
2631 else
2632    for ac_func in strerror ioctl select fstat open fsync sleep
2633 do
2634 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2635 echo "configure:2636: checking for $ac_func" >&5
2636 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2637   echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639   cat > conftest.$ac_ext <<EOF
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2642 /* System header to define __stub macros and hopefully few prototypes,
2643     which can conflict with char $ac_func(); below.  */
2644 #include <assert.h>
2645 /* Override any gcc2 internal prototype to avoid an error.  */
2646 /* We use char because int might match the return type of a gcc2
2647     builtin and then its argument prototype would still apply.  */
2648 char $ac_func();
2649
2650 int main() {
2651
2652 /* The GNU C library defines this for functions which it implements
2653     to always fail with ENOSYS.  Some functions are actually named
2654     something starting with __ and the normal name is an alias.  */
2655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2656 choke me
2657 #else
2658 $ac_func();
2659 #endif
2660
2661 ; return 0; }
2662 EOF
2663 if { (eval echo configure:2664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2664   rm -rf conftest*
2665   eval "ac_cv_func_$ac_func=yes"
2666 else
2667   echo "configure: failed program was:" >&5
2668   cat conftest.$ac_ext >&5
2669   rm -rf conftest*
2670   eval "ac_cv_func_$ac_func=no"
2671 fi
2672 rm -f conftest*
2673 fi
2674
2675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2676   echo "$ac_t""yes" 1>&6
2677     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2678   cat >> confdefs.h <<EOF
2679 #define $ac_tr_func 1
2680 EOF
2681  
2682 else
2683   echo "$ac_t""no" 1>&6
2684 fi
2685 done
2686
2687    for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
2688 do
2689 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2690 echo "configure:2691: checking for $ac_func" >&5
2691 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2692   echo $ac_n "(cached) $ac_c" 1>&6
2693 else
2694   cat > conftest.$ac_ext <<EOF
2695 #line 2696 "configure"
2696 #include "confdefs.h"
2697 /* System header to define __stub macros and hopefully few prototypes,
2698     which can conflict with char $ac_func(); below.  */
2699 #include <assert.h>
2700 /* Override any gcc2 internal prototype to avoid an error.  */
2701 /* We use char because int might match the return type of a gcc2
2702     builtin and then its argument prototype would still apply.  */
2703 char $ac_func();
2704
2705 int main() {
2706
2707 /* The GNU C library defines this for functions which it implements
2708     to always fail with ENOSYS.  Some functions are actually named
2709     something starting with __ and the normal name is an alias.  */
2710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2711 choke me
2712 #else
2713 $ac_func();
2714 #endif
2715
2716 ; return 0; }
2717 EOF
2718 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2719   rm -rf conftest*
2720   eval "ac_cv_func_$ac_func=yes"
2721 else
2722   echo "configure: failed program was:" >&5
2723   cat conftest.$ac_ext >&5
2724   rm -rf conftest*
2725   eval "ac_cv_func_$ac_func=no"
2726 fi
2727 rm -f conftest*
2728 fi
2729
2730 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2731   echo "$ac_t""yes" 1>&6
2732     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2733   cat >> confdefs.h <<EOF
2734 #define $ac_tr_func 1
2735 EOF
2736  
2737 else
2738   echo "$ac_t""no" 1>&6
2739 fi
2740 done
2741
2742    for ac_func in access stat mkdir rename rmdir unlink realpath
2743 do
2744 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2745 echo "configure:2746: checking for $ac_func" >&5
2746 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2747   echo $ac_n "(cached) $ac_c" 1>&6
2748 else
2749   cat > conftest.$ac_ext <<EOF
2750 #line 2751 "configure"
2751 #include "confdefs.h"
2752 /* System header to define __stub macros and hopefully few prototypes,
2753     which can conflict with char $ac_func(); below.  */
2754 #include <assert.h>
2755 /* Override any gcc2 internal prototype to avoid an error.  */
2756 /* We use char because int might match the return type of a gcc2
2757     builtin and then its argument prototype would still apply.  */
2758 char $ac_func();
2759
2760 int main() {
2761
2762 /* The GNU C library defines this for functions which it implements
2763     to always fail with ENOSYS.  Some functions are actually named
2764     something starting with __ and the normal name is an alias.  */
2765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2766 choke me
2767 #else
2768 $ac_func();
2769 #endif
2770
2771 ; return 0; }
2772 EOF
2773 if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2774   rm -rf conftest*
2775   eval "ac_cv_func_$ac_func=yes"
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779   rm -rf conftest*
2780   eval "ac_cv_func_$ac_func=no"
2781 fi
2782 rm -f conftest*
2783 fi
2784
2785 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2786   echo "$ac_t""yes" 1>&6
2787     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2788   cat >> confdefs.h <<EOF
2789 #define $ac_tr_func 1
2790 EOF
2791  
2792 else
2793   echo "$ac_t""no" 1>&6
2794 fi
2795 done
2796
2797    for ac_func in inet_aton inet_addr
2798 do
2799 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2800 echo "configure:2801: checking for $ac_func" >&5
2801 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2802   echo $ac_n "(cached) $ac_c" 1>&6
2803 else
2804   cat > conftest.$ac_ext <<EOF
2805 #line 2806 "configure"
2806 #include "confdefs.h"
2807 /* System header to define __stub macros and hopefully few prototypes,
2808     which can conflict with char $ac_func(); below.  */
2809 #include <assert.h>
2810 /* Override any gcc2 internal prototype to avoid an error.  */
2811 /* We use char because int might match the return type of a gcc2
2812     builtin and then its argument prototype would still apply.  */
2813 char $ac_func();
2814
2815 int main() {
2816
2817 /* The GNU C library defines this for functions which it implements
2818     to always fail with ENOSYS.  Some functions are actually named
2819     something starting with __ and the normal name is an alias.  */
2820 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2821 choke me
2822 #else
2823 $ac_func();
2824 #endif
2825
2826 ; return 0; }
2827 EOF
2828 if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2829   rm -rf conftest*
2830   eval "ac_cv_func_$ac_func=yes"
2831 else
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   eval "ac_cv_func_$ac_func=no"
2836 fi
2837 rm -f conftest*
2838 fi
2839
2840 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2841   echo "$ac_t""yes" 1>&6
2842     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2843   cat >> confdefs.h <<EOF
2844 #define $ac_tr_func 1
2845 EOF
2846  break
2847 else
2848   echo "$ac_t""no" 1>&6
2849 fi
2850 done
2851
2852    for ac_func in inet_pton uname inet_ntoa
2853 do
2854 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2855 echo "configure:2856: checking for $ac_func" >&5
2856 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859   cat > conftest.$ac_ext <<EOF
2860 #line 2861 "configure"
2861 #include "confdefs.h"
2862 /* System header to define __stub macros and hopefully few prototypes,
2863     which can conflict with char $ac_func(); below.  */
2864 #include <assert.h>
2865 /* Override any gcc2 internal prototype to avoid an error.  */
2866 /* We use char because int might match the return type of a gcc2
2867     builtin and then its argument prototype would still apply.  */
2868 char $ac_func();
2869
2870 int main() {
2871
2872 /* The GNU C library defines this for functions which it implements
2873     to always fail with ENOSYS.  Some functions are actually named
2874     something starting with __ and the normal name is an alias.  */
2875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2876 choke me
2877 #else
2878 $ac_func();
2879 #endif
2880
2881 ; return 0; }
2882 EOF
2883 if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2884   rm -rf conftest*
2885   eval "ac_cv_func_$ac_func=yes"
2886 else
2887   echo "configure: failed program was:" >&5
2888   cat conftest.$ac_ext >&5
2889   rm -rf conftest*
2890   eval "ac_cv_func_$ac_func=no"
2891 fi
2892 rm -f conftest*
2893 fi
2894
2895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2896   echo "$ac_t""yes" 1>&6
2897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2898   cat >> confdefs.h <<EOF
2899 #define $ac_tr_func 1
2900 EOF
2901  
2902 else
2903   echo "$ac_t""no" 1>&6
2904 fi
2905 done
2906
2907    for ac_func in backtrace fork execvp pipe
2908 do
2909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2910 echo "configure:2911: checking for $ac_func" >&5
2911 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914   cat > conftest.$ac_ext <<EOF
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917 /* System header to define __stub macros and hopefully few prototypes,
2918     which can conflict with char $ac_func(); below.  */
2919 #include <assert.h>
2920 /* Override any gcc2 internal prototype to avoid an error.  */
2921 /* We use char because int might match the return type of a gcc2
2922     builtin and then its argument prototype would still apply.  */
2923 char $ac_func();
2924
2925 int main() {
2926
2927 /* The GNU C library defines this for functions which it implements
2928     to always fail with ENOSYS.  Some functions are actually named
2929     something starting with __ and the normal name is an alias.  */
2930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2931 choke me
2932 #else
2933 $ac_func();
2934 #endif
2935
2936 ; return 0; }
2937 EOF
2938 if { (eval echo configure:2939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2939   rm -rf conftest*
2940   eval "ac_cv_func_$ac_func=yes"
2941 else
2942   echo "configure: failed program was:" >&5
2943   cat conftest.$ac_ext >&5
2944   rm -rf conftest*
2945   eval "ac_cv_func_$ac_func=no"
2946 fi
2947 rm -f conftest*
2948 fi
2949
2950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2951   echo "$ac_t""yes" 1>&6
2952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2953   cat >> confdefs.h <<EOF
2954 #define $ac_tr_func 1
2955 EOF
2956  
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960 done
2961
2962    for ac_hdr in execinfo.h unistd.h dlfcn.h
2963 do
2964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2966 echo "configure:2967: checking for $ac_hdr" >&5
2967 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2968   echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970   cat > conftest.$ac_ext <<EOF
2971 #line 2972 "configure"
2972 #include "confdefs.h"
2973 #include <$ac_hdr>
2974 EOF
2975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2976 { (eval echo configure:2977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2978 if test -z "$ac_err"; then
2979   rm -rf conftest*
2980   eval "ac_cv_header_$ac_safe=yes"
2981 else
2982   echo "$ac_err" >&5
2983   echo "configure: failed program was:" >&5
2984   cat conftest.$ac_ext >&5
2985   rm -rf conftest*
2986   eval "ac_cv_header_$ac_safe=no"
2987 fi
2988 rm -f conftest*
2989 fi
2990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2991   echo "$ac_t""yes" 1>&6
2992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2993   cat >> confdefs.h <<EOF
2994 #define $ac_tr_hdr 1
2995 EOF
2996  
2997 else
2998   echo "$ac_t""no" 1>&6
2999 fi
3000 done
3001  
3002    echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3003 echo "configure:3004: checking for dladdr in -ldl" >&5
3004 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3005 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3006   echo $ac_n "(cached) $ac_c" 1>&6
3007 else
3008   ac_save_LIBS="$LIBS"
3009 LIBS="-ldl  $LIBS"
3010 cat > conftest.$ac_ext <<EOF
3011 #line 3012 "configure"
3012 #include "confdefs.h"
3013 /* Override any gcc2 internal prototype to avoid an error.  */
3014 /* We use char because int might match the return type of a gcc2
3015     builtin and then its argument prototype would still apply.  */
3016 char dladdr();
3017
3018 int main() {
3019 dladdr()
3020 ; return 0; }
3021 EOF
3022 if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3023   rm -rf conftest*
3024   eval "ac_cv_lib_$ac_lib_var=yes"
3025 else
3026   echo "configure: failed program was:" >&5
3027   cat conftest.$ac_ext >&5
3028   rm -rf conftest*
3029   eval "ac_cv_lib_$ac_lib_var=no"
3030 fi
3031 rm -f conftest*
3032 LIBS="$ac_save_LIBS"
3033
3034 fi
3035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3036   echo "$ac_t""yes" 1>&6
3037   
3038      cat >> confdefs.h <<\EOF
3039 #define HAVE_DLADDR 1
3040 EOF
3041
3042 else
3043   echo "$ac_t""no" 1>&6
3044 fi
3045
3046    for ac_file in /proc/self/exe
3047 do
3048
3049 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3050 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3051 echo "configure:3052: checking for $ac_file" >&5
3052 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   if test "$cross_compiling" = yes; then
3056     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3057 else
3058   if test -r $ac_file; then
3059     eval "ac_cv_file_$ac_safe=yes"
3060   else
3061     eval "ac_cv_file_$ac_safe=no"
3062   fi
3063 fi
3064 fi
3065 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3066   echo "$ac_t""yes" 1>&6
3067     ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3068   cat >> confdefs.h <<EOF
3069 #define $ac_tr_file 1
3070 EOF
3071  
3072      cat >> confdefs.h <<\EOF
3073 #define HAVE_PROC_SELF_EXE 1
3074 EOF
3075
3076 else
3077   echo "$ac_t""no" 1>&6
3078
3079 fi
3080 done
3081
3082
3083    for ac_func in gethostbyname_r
3084 do
3085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3086 echo "configure:3087: checking for $ac_func" >&5
3087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3093 /* System header to define __stub macros and hopefully few prototypes,
3094     which can conflict with char $ac_func(); below.  */
3095 #include <assert.h>
3096 /* Override any gcc2 internal prototype to avoid an error.  */
3097 /* We use char because int might match the return type of a gcc2
3098     builtin and then its argument prototype would still apply.  */
3099 char $ac_func();
3100
3101 int main() {
3102
3103 /* The GNU C library defines this for functions which it implements
3104     to always fail with ENOSYS.  Some functions are actually named
3105     something starting with __ and the normal name is an alias.  */
3106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3107 choke me
3108 #else
3109 $ac_func();
3110 #endif
3111
3112 ; return 0; }
3113 EOF
3114 if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3115   rm -rf conftest*
3116   eval "ac_cv_func_$ac_func=yes"
3117 else
3118   echo "configure: failed program was:" >&5
3119   cat conftest.$ac_ext >&5
3120   rm -rf conftest*
3121   eval "ac_cv_func_$ac_func=no"
3122 fi
3123 rm -f conftest*
3124 fi
3125
3126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3127   echo "$ac_t""yes" 1>&6
3128     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3129   cat >> confdefs.h <<EOF
3130 #define $ac_tr_func 1
3131 EOF
3132  
3133      cat >> confdefs.h <<\EOF
3134 #define HAVE_GETHOSTBYNAME_R 1
3135 EOF
3136
3137      # There are two different kinds of gethostbyname_r.
3138      # We look for the one that returns `int'.
3139      # Hopefully this check is robust enough.
3140      cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143 #include <netdb.h>
3144 EOF
3145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3146   egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
3147   rm -rf conftest*
3148   
3149        cat >> confdefs.h <<\EOF
3150 #define GETHOSTBYNAME_R_RETURNS_INT 1
3151 EOF
3152
3153 fi
3154 rm -f conftest*
3155
3156
3157      case " $GCINCS " in
3158      *" -D_REENTRANT "*) ;;
3159      *)
3160                 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
3161 echo "configure:3162: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
3162 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
3163   echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165    
3166           ac_ext=C
3167 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3168 ac_cpp='$CXXCPP $CPPFLAGS'
3169 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3170 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3171 cross_compiling=$ac_cv_prog_cxx_cross
3172
3173           cat > conftest.$ac_ext <<EOF
3174 #line 3175 "configure"
3175 #include "confdefs.h"
3176 #include <netdb.h>
3177 int main() {
3178 gethostbyname_r("", 0, 0);
3179 ; return 0; }
3180 EOF
3181 if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3182   rm -rf conftest*
3183   libjava_cv_gethostbyname_r_needs_reentrant=no
3184 else
3185   echo "configure: failed program was:" >&5
3186   cat conftest.$ac_ext >&5
3187   rm -rf conftest*
3188                 CPPFLAGS_SAVE="$CPPFLAGS"
3189                 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3190                 cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <netdb.h>
3194 int main() {
3195 gethostbyname_r("", 0, 0);
3196 ; return 0; }
3197 EOF
3198 if { (eval echo configure:3199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3199   rm -rf conftest*
3200   libjava_cv_gethostbyname_r_needs_reentrant=yes
3201 else
3202   echo "configure: failed program was:" >&5
3203   cat conftest.$ac_ext >&5
3204   rm -rf conftest*
3205   libjava_cv_gethostbyname_r_needs_reentrant=fail
3206 fi
3207 rm -f conftest*
3208                 CPPFLAGS="$CPPFLAGS_SAVE"
3209           
3210 fi
3211 rm -f conftest*
3212           ac_ext=c
3213 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3214 ac_cpp='$CPP $CPPFLAGS'
3215 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3216 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3217 cross_compiling=$ac_cv_prog_cc_cross
3218
3219         
3220 fi
3221
3222 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
3223         if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
3224           cat >> confdefs.h <<\EOF
3225 #define GETHOSTBYNAME_R_NEEDS_REENTRANT 1
3226 EOF
3227
3228         fi
3229      ;;
3230      esac
3231
3232      echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
3233 echo "configure:3234: checking for struct hostent_data" >&5
3234 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
3235   echo $ac_n "(cached) $ac_c" 1>&6
3236 else
3237         cat > conftest.$ac_ext <<EOF
3238 #line 3239 "configure"
3239 #include "confdefs.h"
3240
3241 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
3242 # define _REENTRANT 1
3243 #endif
3244 #include <netdb.h>
3245 int main() {
3246 struct hostent_data data;
3247 ; return 0; }
3248 EOF
3249 if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3250   rm -rf conftest*
3251   libjava_cv_struct_hostent_data=yes
3252 else
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   libjava_cv_struct_hostent_data=no
3257 fi
3258 rm -f conftest*
3259 fi
3260
3261 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
3262      if test "x$libjava_cv_struct_hostent_data" = xyes; then
3263        cat >> confdefs.h <<\EOF
3264 #define HAVE_STRUCT_HOSTENT_DATA 1
3265 EOF
3266
3267      fi
3268    
3269 else
3270   echo "$ac_t""no" 1>&6
3271 fi
3272 done
3273
3274
3275    for ac_func in gethostbyaddr_r
3276 do
3277 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3278 echo "configure:3279: checking for $ac_func" >&5
3279 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3280   echo $ac_n "(cached) $ac_c" 1>&6
3281 else
3282   cat > conftest.$ac_ext <<EOF
3283 #line 3284 "configure"
3284 #include "confdefs.h"
3285 /* System header to define __stub macros and hopefully few prototypes,
3286     which can conflict with char $ac_func(); below.  */
3287 #include <assert.h>
3288 /* Override any gcc2 internal prototype to avoid an error.  */
3289 /* We use char because int might match the return type of a gcc2
3290     builtin and then its argument prototype would still apply.  */
3291 char $ac_func();
3292
3293 int main() {
3294
3295 /* The GNU C library defines this for functions which it implements
3296     to always fail with ENOSYS.  Some functions are actually named
3297     something starting with __ and the normal name is an alias.  */
3298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3299 choke me
3300 #else
3301 $ac_func();
3302 #endif
3303
3304 ; return 0; }
3305 EOF
3306 if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3307   rm -rf conftest*
3308   eval "ac_cv_func_$ac_func=yes"
3309 else
3310   echo "configure: failed program was:" >&5
3311   cat conftest.$ac_ext >&5
3312   rm -rf conftest*
3313   eval "ac_cv_func_$ac_func=no"
3314 fi
3315 rm -f conftest*
3316 fi
3317
3318 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3319   echo "$ac_t""yes" 1>&6
3320     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3321   cat >> confdefs.h <<EOF
3322 #define $ac_tr_func 1
3323 EOF
3324  
3325      cat >> confdefs.h <<\EOF
3326 #define HAVE_GETHOSTBYADDR_R 1
3327 EOF
3328
3329      # There are two different kinds of gethostbyaddr_r.
3330      # We look for the one that returns `int'.
3331      # Hopefully this check is robust enough.
3332      cat > conftest.$ac_ext <<EOF
3333 #line 3334 "configure"
3334 #include "confdefs.h"
3335 #include <netdb.h>
3336 EOF
3337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3338   egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
3339   rm -rf conftest*
3340   
3341        cat >> confdefs.h <<\EOF
3342 #define GETHOSTBYADDR_R_RETURNS_INT 1
3343 EOF
3344
3345 fi
3346 rm -f conftest*
3347
3348 else
3349   echo "$ac_t""no" 1>&6
3350 fi
3351 done
3352
3353
3354    for ac_func in gethostname
3355 do
3356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3357 echo "configure:3358: checking for $ac_func" >&5
3358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 /* System header to define __stub macros and hopefully few prototypes,
3365     which can conflict with char $ac_func(); below.  */
3366 #include <assert.h>
3367 /* Override any gcc2 internal prototype to avoid an error.  */
3368 /* We use char because int might match the return type of a gcc2
3369     builtin and then its argument prototype would still apply.  */
3370 char $ac_func();
3371
3372 int main() {
3373
3374 /* The GNU C library defines this for functions which it implements
3375     to always fail with ENOSYS.  Some functions are actually named
3376     something starting with __ and the normal name is an alias.  */
3377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3378 choke me
3379 #else
3380 $ac_func();
3381 #endif
3382
3383 ; return 0; }
3384 EOF
3385 if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3386   rm -rf conftest*
3387   eval "ac_cv_func_$ac_func=yes"
3388 else
3389   echo "configure: failed program was:" >&5
3390   cat conftest.$ac_ext >&5
3391   rm -rf conftest*
3392   eval "ac_cv_func_$ac_func=no"
3393 fi
3394 rm -f conftest*
3395 fi
3396
3397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3398   echo "$ac_t""yes" 1>&6
3399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3400   cat >> confdefs.h <<EOF
3401 #define $ac_tr_func 1
3402 EOF
3403  
3404      cat >> confdefs.h <<\EOF
3405 #define HAVE_GETHOSTNAME 1
3406 EOF
3407
3408      cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3411 #include <unistd.h>
3412 EOF
3413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3414   egrep "gethostname" >/dev/null 2>&1; then
3415   rm -rf conftest*
3416   
3417        cat >> confdefs.h <<\EOF
3418 #define HAVE_GETHOSTNAME_DECL 1
3419 EOF
3420
3421 fi
3422 rm -f conftest*
3423
3424 else
3425   echo "$ac_t""no" 1>&6
3426 fi
3427 done
3428
3429
3430    # Look for these functions in the thread library, but only bother
3431    # if using POSIX threads.
3432    if test "$THREADS" = posix; then
3433       save_LIBS="$LIBS"
3434       LIBS="$LIBS $THREADLIBS"
3435       # Some POSIX thread systems don't have pthread_mutexattr_settype.
3436       # E.g., Solaris.
3437       for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
3438 do
3439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3440 echo "configure:3441: checking for $ac_func" >&5
3441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3442   echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444   cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 /* System header to define __stub macros and hopefully few prototypes,
3448     which can conflict with char $ac_func(); below.  */
3449 #include <assert.h>
3450 /* Override any gcc2 internal prototype to avoid an error.  */
3451 /* We use char because int might match the return type of a gcc2
3452     builtin and then its argument prototype would still apply.  */
3453 char $ac_func();
3454
3455 int main() {
3456
3457 /* The GNU C library defines this for functions which it implements
3458     to always fail with ENOSYS.  Some functions are actually named
3459     something starting with __ and the normal name is an alias.  */
3460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3461 choke me
3462 #else
3463 $ac_func();
3464 #endif
3465
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3469   rm -rf conftest*
3470   eval "ac_cv_func_$ac_func=yes"
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   eval "ac_cv_func_$ac_func=no"
3476 fi
3477 rm -f conftest*
3478 fi
3479
3480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3481   echo "$ac_t""yes" 1>&6
3482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3483   cat >> confdefs.h <<EOF
3484 #define $ac_tr_func 1
3485 EOF
3486  
3487 else
3488   echo "$ac_t""no" 1>&6
3489 fi
3490 done
3491
3492
3493       # Look for sched_yield.  Up to Solaris 2.6, it is in libposix4, since
3494       # Solaris 7 the name librt is preferred.
3495       for ac_func in sched_yield
3496 do
3497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3498 echo "configure:3499: checking for $ac_func" >&5
3499 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 /* System header to define __stub macros and hopefully few prototypes,
3506     which can conflict with char $ac_func(); below.  */
3507 #include <assert.h>
3508 /* Override any gcc2 internal prototype to avoid an error.  */
3509 /* We use char because int might match the return type of a gcc2
3510     builtin and then its argument prototype would still apply.  */
3511 char $ac_func();
3512
3513 int main() {
3514
3515 /* The GNU C library defines this for functions which it implements
3516     to always fail with ENOSYS.  Some functions are actually named
3517     something starting with __ and the normal name is an alias.  */
3518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3519 choke me
3520 #else
3521 $ac_func();
3522 #endif
3523
3524 ; return 0; }
3525 EOF
3526 if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3527   rm -rf conftest*
3528   eval "ac_cv_func_$ac_func=yes"
3529 else
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   eval "ac_cv_func_$ac_func=no"
3534 fi
3535 rm -f conftest*
3536 fi
3537
3538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3539   echo "$ac_t""yes" 1>&6
3540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3541   cat >> confdefs.h <<EOF
3542 #define $ac_tr_func 1
3543 EOF
3544  
3545 else
3546   echo "$ac_t""no" 1>&6
3547 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
3548 echo "configure:3549: checking for sched_yield in -lrt" >&5
3549 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
3550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3551   echo $ac_n "(cached) $ac_c" 1>&6
3552 else
3553   ac_save_LIBS="$LIBS"
3554 LIBS="-lrt  $LIBS"
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 /* Override any gcc2 internal prototype to avoid an error.  */
3559 /* We use char because int might match the return type of a gcc2
3560     builtin and then its argument prototype would still apply.  */
3561 char sched_yield();
3562
3563 int main() {
3564 sched_yield()
3565 ; return 0; }
3566 EOF
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3568   rm -rf conftest*
3569   eval "ac_cv_lib_$ac_lib_var=yes"
3570 else
3571   echo "configure: failed program was:" >&5
3572   cat conftest.$ac_ext >&5
3573   rm -rf conftest*
3574   eval "ac_cv_lib_$ac_lib_var=no"
3575 fi
3576 rm -f conftest*
3577 LIBS="$ac_save_LIBS"
3578
3579 fi
3580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3581   echo "$ac_t""yes" 1>&6
3582   
3583           cat >> confdefs.h <<\EOF
3584 #define HAVE_SCHED_YIELD 1
3585 EOF
3586
3587           THREADLIBS="$THREADLIBS -lrt"
3588           THREADSPEC="$THREADSPEC -lrt"
3589 else
3590   echo "$ac_t""no" 1>&6
3591
3592           echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
3593 echo "configure:3594: checking for sched_yield in -lposix4" >&5
3594 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
3595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   ac_save_LIBS="$LIBS"
3599 LIBS="-lposix4  $LIBS"
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 /* Override any gcc2 internal prototype to avoid an error.  */
3604 /* We use char because int might match the return type of a gcc2
3605     builtin and then its argument prototype would still apply.  */
3606 char sched_yield();
3607
3608 int main() {
3609 sched_yield()
3610 ; return 0; }
3611 EOF
3612 if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3613   rm -rf conftest*
3614   eval "ac_cv_lib_$ac_lib_var=yes"
3615 else
3616   echo "configure: failed program was:" >&5
3617   cat conftest.$ac_ext >&5
3618   rm -rf conftest*
3619   eval "ac_cv_lib_$ac_lib_var=no"
3620 fi
3621 rm -f conftest*
3622 LIBS="$ac_save_LIBS"
3623
3624 fi
3625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3626   echo "$ac_t""yes" 1>&6
3627   
3628             cat >> confdefs.h <<\EOF
3629 #define HAVE_SCHED_YIELD 1
3630 EOF
3631
3632             THREADLIBS="$THREADLIBS -lposix4"
3633             THREADSPEC="$THREADSPEC -lposix4"
3634 else
3635   echo "$ac_t""no" 1>&6
3636 fi
3637
3638 fi
3639
3640 fi
3641 done
3642
3643       LIBS="$save_LIBS"
3644
3645       # We can save a little space at runtime if the mutex has m_count
3646       # or __m_count.  This is a nice hack for Linux.
3647       cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 #include <pthread.h>
3651 int main() {
3652
3653           extern pthread_mutex_t *mutex; int q = mutex->m_count;
3654         
3655 ; return 0; }
3656 EOF
3657 if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3658   rm -rf conftest*
3659   cat >> confdefs.h <<\EOF
3660 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
3661 EOF
3662
3663 else
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   
3668         cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3671 #include <pthread.h>
3672 int main() {
3673
3674             extern pthread_mutex_t *mutex; int q = mutex->__m_count;
3675           
3676 ; return 0; }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3679   rm -rf conftest*
3680   cat >> confdefs.h <<\EOF
3681 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
3682 EOF
3683
3684 else
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687 fi
3688 rm -f conftest*
3689 fi
3690 rm -f conftest*
3691    fi
3692
3693    # We require a way to get the time.
3694    time_found=no
3695    for ac_func in gettimeofday time ftime
3696 do
3697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3698 echo "configure:3699: checking for $ac_func" >&5
3699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3700   echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702   cat > conftest.$ac_ext <<EOF
3703 #line 3704 "configure"
3704 #include "confdefs.h"
3705 /* System header to define __stub macros and hopefully few prototypes,
3706     which can conflict with char $ac_func(); below.  */
3707 #include <assert.h>
3708 /* Override any gcc2 internal prototype to avoid an error.  */
3709 /* We use char because int might match the return type of a gcc2
3710     builtin and then its argument prototype would still apply.  */
3711 char $ac_func();
3712
3713 int main() {
3714
3715 /* The GNU C library defines this for functions which it implements
3716     to always fail with ENOSYS.  Some functions are actually named
3717     something starting with __ and the normal name is an alias.  */
3718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3719 choke me
3720 #else
3721 $ac_func();
3722 #endif
3723
3724 ; return 0; }
3725 EOF
3726 if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3727   rm -rf conftest*
3728   eval "ac_cv_func_$ac_func=yes"
3729 else
3730   echo "configure: failed program was:" >&5
3731   cat conftest.$ac_ext >&5
3732   rm -rf conftest*
3733   eval "ac_cv_func_$ac_func=no"
3734 fi
3735 rm -f conftest*
3736 fi
3737
3738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3739   echo "$ac_t""yes" 1>&6
3740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3741   cat >> confdefs.h <<EOF
3742 #define $ac_tr_func 1
3743 EOF
3744  time_found=yes
3745 else
3746   echo "$ac_t""no" 1>&6
3747 fi
3748 done
3749
3750    if test "$time_found" = no; then
3751       { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
3752    fi
3753
3754    for ac_func in memmove
3755 do
3756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3757 echo "configure:3758: checking for $ac_func" >&5
3758 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764 /* System header to define __stub macros and hopefully few prototypes,
3765     which can conflict with char $ac_func(); below.  */
3766 #include <assert.h>
3767 /* Override any gcc2 internal prototype to avoid an error.  */
3768 /* We use char because int might match the return type of a gcc2
3769     builtin and then its argument prototype would still apply.  */
3770 char $ac_func();
3771
3772 int main() {
3773
3774 /* The GNU C library defines this for functions which it implements
3775     to always fail with ENOSYS.  Some functions are actually named
3776     something starting with __ and the normal name is an alias.  */
3777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3778 choke me
3779 #else
3780 $ac_func();
3781 #endif
3782
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3786   rm -rf conftest*
3787   eval "ac_cv_func_$ac_func=yes"
3788 else
3789   echo "configure: failed program was:" >&5
3790   cat conftest.$ac_ext >&5
3791   rm -rf conftest*
3792   eval "ac_cv_func_$ac_func=no"
3793 fi
3794 rm -f conftest*
3795 fi
3796
3797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3798   echo "$ac_t""yes" 1>&6
3799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3800   cat >> confdefs.h <<EOF
3801 #define $ac_tr_func 1
3802 EOF
3803  
3804 else
3805   echo "$ac_t""no" 1>&6
3806 fi
3807 done
3808
3809
3810    # We require memcpy.
3811    memcpy_found=no
3812    for ac_func in memcpy
3813 do
3814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3815 echo "configure:3816: checking for $ac_func" >&5
3816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822 /* System header to define __stub macros and hopefully few prototypes,
3823     which can conflict with char $ac_func(); below.  */
3824 #include <assert.h>
3825 /* Override any gcc2 internal prototype to avoid an error.  */
3826 /* We use char because int might match the return type of a gcc2
3827     builtin and then its argument prototype would still apply.  */
3828 char $ac_func();
3829
3830 int main() {
3831
3832 /* The GNU C library defines this for functions which it implements
3833     to always fail with ENOSYS.  Some functions are actually named
3834     something starting with __ and the normal name is an alias.  */
3835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3836 choke me
3837 #else
3838 $ac_func();
3839 #endif
3840
3841 ; return 0; }
3842 EOF
3843 if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3844   rm -rf conftest*
3845   eval "ac_cv_func_$ac_func=yes"
3846 else
3847   echo "configure: failed program was:" >&5
3848   cat conftest.$ac_ext >&5
3849   rm -rf conftest*
3850   eval "ac_cv_func_$ac_func=no"
3851 fi
3852 rm -f conftest*
3853 fi
3854
3855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3856   echo "$ac_t""yes" 1>&6
3857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3858   cat >> confdefs.h <<EOF
3859 #define $ac_tr_func 1
3860 EOF
3861  memcpy_found=yes
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865 done
3866
3867    if test "$memcpy_found" = no; then
3868       { echo "configure: error: memcpy is required" 1>&2; exit 1; }
3869    fi
3870
3871    # Some library-finding code we stole from Tcl.
3872    #--------------------------------------------------------------------
3873    #    Check for the existence of the -lsocket and -lnsl libraries.
3874    #    The order here is important, so that they end up in the right
3875    #    order in the command line generated by make.  Here are some
3876    #    special considerations:
3877    #    1. Use "connect" and "accept" to check for -lsocket, and
3878    #       "gethostbyname" to check for -lnsl.
3879    #    2. Use each function name only once:  can't redo a check because
3880    #       autoconf caches the results of the last check and won't redo it.
3881    #    3. Use -lnsl and -lsocket only if they supply procedures that
3882    #       aren't already present in the normal libraries.  This is because
3883    #       IRIX 5.2 has libraries, but they aren't needed and they're
3884    #       bogus:  they goof up name resolution if used.
3885    #    4. On some SVR4 systems, can't use -lsocket without -lnsl too.
3886    #       To get around this problem, check for both libraries together
3887    #       if -lsocket doesn't work by itself.
3888    #--------------------------------------------------------------------
3889
3890    echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
3891 echo "configure:3892: checking for socket libraries" >&5
3892 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
3893   echo $ac_n "(cached) $ac_c" 1>&6
3894 else
3895   gcj_cv_lib_sockets=
3896      gcj_checkBoth=0
3897      unset ac_cv_func_connect
3898      echo $ac_n "checking for connect""... $ac_c" 1>&6
3899 echo "configure:3900: checking for connect" >&5
3900 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3901   echo $ac_n "(cached) $ac_c" 1>&6
3902 else
3903   cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906 /* System header to define __stub macros and hopefully few prototypes,
3907     which can conflict with char connect(); below.  */
3908 #include <assert.h>
3909 /* Override any gcc2 internal prototype to avoid an error.  */
3910 /* We use char because int might match the return type of a gcc2
3911     builtin and then its argument prototype would still apply.  */
3912 char connect();
3913
3914 int main() {
3915
3916 /* The GNU C library defines this for functions which it implements
3917     to always fail with ENOSYS.  Some functions are actually named
3918     something starting with __ and the normal name is an alias.  */
3919 #if defined (__stub_connect) || defined (__stub___connect)
3920 choke me
3921 #else
3922 connect();
3923 #endif
3924
3925 ; return 0; }
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928   rm -rf conftest*
3929   eval "ac_cv_func_connect=yes"
3930 else
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   eval "ac_cv_func_connect=no"
3935 fi
3936 rm -f conftest*
3937 fi
3938
3939 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3940   echo "$ac_t""yes" 1>&6
3941   gcj_checkSocket=0
3942 else
3943   echo "$ac_t""no" 1>&6
3944 gcj_checkSocket=1
3945 fi
3946
3947      if test "$gcj_checkSocket" = 1; then
3948          unset ac_cv_func_connect
3949          echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3950 echo "configure:3951: checking for main in -lsocket" >&5
3951 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3952 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   ac_save_LIBS="$LIBS"
3956 LIBS="-lsocket  $LIBS"
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960
3961 int main() {
3962 main()
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3966   rm -rf conftest*
3967   eval "ac_cv_lib_$ac_lib_var=yes"
3968 else
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   eval "ac_cv_lib_$ac_lib_var=no"
3973 fi
3974 rm -f conftest*
3975 LIBS="$ac_save_LIBS"
3976
3977 fi
3978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3979   echo "$ac_t""yes" 1>&6
3980   gcj_cv_lib_sockets="-lsocket"
3981 else
3982   echo "$ac_t""no" 1>&6
3983 gcj_checkBoth=1
3984 fi
3985
3986      fi
3987      if test "$gcj_checkBoth" = 1; then
3988          gcj_oldLibs=$LIBS
3989          LIBS="$LIBS -lsocket -lnsl"
3990          unset ac_cv_func_accept
3991          echo $ac_n "checking for accept""... $ac_c" 1>&6
3992 echo "configure:3993: checking for accept" >&5
3993 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999 /* System header to define __stub macros and hopefully few prototypes,
4000     which can conflict with char accept(); below.  */
4001 #include <assert.h>
4002 /* Override any gcc2 internal prototype to avoid an error.  */
4003 /* We use char because int might match the return type of a gcc2
4004     builtin and then its argument prototype would still apply.  */
4005 char accept();
4006
4007 int main() {
4008
4009 /* The GNU C library defines this for functions which it implements
4010     to always fail with ENOSYS.  Some functions are actually named
4011     something starting with __ and the normal name is an alias.  */
4012 #if defined (__stub_accept) || defined (__stub___accept)
4013 choke me
4014 #else
4015 accept();
4016 #endif
4017
4018 ; return 0; }
4019 EOF
4020 if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4021   rm -rf conftest*
4022   eval "ac_cv_func_accept=yes"
4023 else
4024   echo "configure: failed program was:" >&5
4025   cat conftest.$ac_ext >&5
4026   rm -rf conftest*
4027   eval "ac_cv_func_accept=no"
4028 fi
4029 rm -f conftest*
4030 fi
4031
4032 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4033   echo "$ac_t""yes" 1>&6
4034   gcj_checkNsl=0
4035                         gcj_cv_lib_sockets="-lsocket -lnsl"
4036 else
4037   echo "$ac_t""no" 1>&6
4038 fi
4039
4040          unset ac_cv_func_accept
4041          LIBS=$gcj_oldLibs
4042      fi
4043      unset ac_cv_func_gethostbyname
4044      gcj_oldLibs=$LIBS
4045      LIBS="$LIBS $gcj_cv_lib_sockets"
4046      echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4047 echo "configure:4048: checking for gethostbyname" >&5
4048 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 /* System header to define __stub macros and hopefully few prototypes,
4055     which can conflict with char gethostbyname(); below.  */
4056 #include <assert.h>
4057 /* Override any gcc2 internal prototype to avoid an error.  */
4058 /* We use char because int might match the return type of a gcc2
4059     builtin and then its argument prototype would still apply.  */
4060 char gethostbyname();
4061
4062 int main() {
4063
4064 /* The GNU C library defines this for functions which it implements
4065     to always fail with ENOSYS.  Some functions are actually named
4066     something starting with __ and the normal name is an alias.  */
4067 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4068 choke me
4069 #else
4070 gethostbyname();
4071 #endif
4072
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4076   rm -rf conftest*
4077   eval "ac_cv_func_gethostbyname=yes"
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   eval "ac_cv_func_gethostbyname=no"
4083 fi
4084 rm -f conftest*
4085 fi
4086
4087 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4088   echo "$ac_t""yes" 1>&6
4089   :
4090 else
4091   echo "$ac_t""no" 1>&6
4092 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4093 echo "configure:4094: checking for main in -lnsl" >&5
4094 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4095 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   ac_save_LIBS="$LIBS"
4099 LIBS="-lnsl  $LIBS"
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103
4104 int main() {
4105 main()
4106 ; return 0; }
4107 EOF
4108 if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4109   rm -rf conftest*
4110   eval "ac_cv_lib_$ac_lib_var=yes"
4111 else
4112   echo "configure: failed program was:" >&5
4113   cat conftest.$ac_ext >&5
4114   rm -rf conftest*
4115   eval "ac_cv_lib_$ac_lib_var=no"
4116 fi
4117 rm -f conftest*
4118 LIBS="$ac_save_LIBS"
4119
4120 fi
4121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4122   echo "$ac_t""yes" 1>&6
4123   gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128 fi
4129
4130      unset ac_cv_func_gethostbyname
4131      LIBS=$gcj_oldLIBS
4132    
4133 fi
4134
4135 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4136    SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4137
4138    if test "$with_system_zlib" = yes; then
4139       echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
4140 echo "configure:4141: checking for deflate in -lz" >&5
4141 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4142 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4143   echo $ac_n "(cached) $ac_c" 1>&6
4144 else
4145   ac_save_LIBS="$LIBS"
4146 LIBS="-lz  $LIBS"
4147 cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 /* Override any gcc2 internal prototype to avoid an error.  */
4151 /* We use char because int might match the return type of a gcc2
4152     builtin and then its argument prototype would still apply.  */
4153 char deflate();
4154
4155 int main() {
4156 deflate()
4157 ; return 0; }
4158 EOF
4159 if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4160   rm -rf conftest*
4161   eval "ac_cv_lib_$ac_lib_var=yes"
4162 else
4163   echo "configure: failed program was:" >&5
4164   cat conftest.$ac_ext >&5
4165   rm -rf conftest*
4166   eval "ac_cv_lib_$ac_lib_var=no"
4167 fi
4168 rm -f conftest*
4169 LIBS="$ac_save_LIBS"
4170
4171 fi
4172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4173   echo "$ac_t""yes" 1>&6
4174   ZLIBSPEC=-lz
4175 else
4176   echo "$ac_t""no" 1>&6
4177 ZLIBSPEC=-lzgcj
4178 fi
4179
4180    else
4181       ZLIBSPEC=-lzgcj
4182    fi
4183
4184    # On Solaris, and maybe other architectures, the Boehm collector
4185    # requires -ldl.
4186    if test "$GC" = boehm; then
4187       echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
4188 echo "configure:4189: checking for main in -ldl" >&5
4189 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
4190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4191   echo $ac_n "(cached) $ac_c" 1>&6
4192 else
4193   ac_save_LIBS="$LIBS"
4194 LIBS="-ldl  $LIBS"
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198
4199 int main() {
4200 main()
4201 ; return 0; }
4202 EOF
4203 if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4204   rm -rf conftest*
4205   eval "ac_cv_lib_$ac_lib_var=yes"
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_lib_$ac_lib_var=no"
4211 fi
4212 rm -f conftest*
4213 LIBS="$ac_save_LIBS"
4214
4215 fi
4216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4217   echo "$ac_t""yes" 1>&6
4218   SYSTEMSPEC="$SYSTEMSPEC -ldl"
4219 else
4220   echo "$ac_t""no" 1>&6
4221 fi
4222
4223    fi
4224
4225    if test -d "$libgcj_basedir/../gcc/java"; then
4226       GCJ=
4227    else
4228       CANADIAN=yes
4229       NULL_TARGET=yes
4230       GCJ=gcj
4231    fi
4232 fi
4233
4234 ZLIBS=
4235 ZDEPS=
4236 ZINCS=
4237 if test "x$ZLIBSPEC" = "x-lzgcj"; then
4238    # We include the path to the zlib build directory.
4239    # See Makefile.am to understand why.
4240    ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
4241    ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
4242    ZINCS='-I$(top_srcdir)/../zlib'
4243 else
4244    ZLIBS="$ZLIBSPEC"
4245 fi
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255 if test "$CANADIAN" = yes; then
4256   CANADIAN_TRUE=
4257   CANADIAN_FALSE='#'
4258 else
4259   CANADIAN_TRUE='#'
4260   CANADIAN_FALSE=
4261 fi
4262
4263
4264 if test "$NULL_TARGET" = yes; then
4265   NULL_TARGET_TRUE=
4266   NULL_TARGET_FALSE='#'
4267 else
4268   NULL_TARGET_TRUE='#'
4269   NULL_TARGET_FALSE=
4270 fi
4271
4272
4273 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
4274   NATIVE_TRUE=
4275   NATIVE_FALSE='#'
4276 else
4277   NATIVE_TRUE='#'
4278   NATIVE_FALSE=
4279 fi
4280
4281
4282 if test -z "$with_cross_host"; then
4283   USE_LIBDIR_TRUE=
4284   USE_LIBDIR_FALSE='#'
4285 else
4286   USE_LIBDIR_TRUE='#'
4287   USE_LIBDIR_FALSE=
4288 fi
4289
4290
4291 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
4292   NEEDS_DATA_START_TRUE=
4293   NEEDS_DATA_START_FALSE='#'
4294 else
4295   NEEDS_DATA_START_TRUE='#'
4296   NEEDS_DATA_START_FALSE=
4297 fi
4298
4299
4300 # Determine gcj version number.
4301 if test "$GCJ" = ""; then
4302    if test -z "${with_multisubdir}"; then
4303       builddotdot=.
4304    else
4305
4306       builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
4307
4308    fi
4309    dir="`cd ${builddotdot}/../../gcc && pwd`"
4310    GCJ="$dir/gcj -B$dir/"
4311 fi
4312
4313 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
4314
4315 cat >> confdefs.h <<EOF
4316 #define GCJVERSION "$gcjvers"
4317 EOF
4318
4319
4320 # See if gcj supports -fuse-divide-subroutine.  gcc 2.95 does not, and
4321 # we want to continue to support that version.
4322 echo $ac_n "checking whether gcj supports -fuse-divide-subroutine""... $ac_c" 1>&6
4323 echo "configure:4324: checking whether gcj supports -fuse-divide-subroutine" >&5
4324 cat > conftest.java << 'END'
4325 public class conftest { }
4326 END
4327 use_fuse=yes
4328 $GCJ -classpath $srcdir -fuse-divide-subroutine -fsyntax-only \
4329    conftest.java > /dev/null 2>&1 \
4330    || use_fuse=no
4331 rm -f conftest.java
4332 if test "$use_fuse" = no; then
4333    DIVIDESPEC=
4334 fi
4335 echo "$ac_t""$use_fuse" 1>&6
4336
4337
4338
4339 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
4340 do
4341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4343 echo "configure:4344: checking for $ac_hdr" >&5
4344 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4345   echo $ac_n "(cached) $ac_c" 1>&6
4346 else
4347   cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350 #include <$ac_hdr>
4351 EOF
4352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4353 { (eval echo configure:4354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4355 if test -z "$ac_err"; then
4356   rm -rf conftest*
4357   eval "ac_cv_header_$ac_safe=yes"
4358 else
4359   echo "$ac_err" >&5
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -rf conftest*
4363   eval "ac_cv_header_$ac_safe=no"
4364 fi
4365 rm -f conftest*
4366 fi
4367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4368   echo "$ac_t""yes" 1>&6
4369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4370   cat >> confdefs.h <<EOF
4371 #define $ac_tr_hdr 1
4372 EOF
4373  
4374 else
4375   echo "$ac_t""no" 1>&6
4376 fi
4377 done
4378
4379 for ac_hdr in dirent.h
4380 do
4381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4383 echo "configure:4384: checking for $ac_hdr" >&5
4384 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4385   echo $ac_n "(cached) $ac_c" 1>&6
4386 else
4387   cat > conftest.$ac_ext <<EOF
4388 #line 4389 "configure"
4389 #include "confdefs.h"
4390 #include <$ac_hdr>
4391 EOF
4392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4393 { (eval echo configure:4394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4395 if test -z "$ac_err"; then
4396   rm -rf conftest*
4397   eval "ac_cv_header_$ac_safe=yes"
4398 else
4399   echo "$ac_err" >&5
4400   echo "configure: failed program was:" >&5
4401   cat conftest.$ac_ext >&5
4402   rm -rf conftest*
4403   eval "ac_cv_header_$ac_safe=no"
4404 fi
4405 rm -f conftest*
4406 fi
4407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4408   echo "$ac_t""yes" 1>&6
4409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4410   cat >> confdefs.h <<EOF
4411 #define $ac_tr_hdr 1
4412 EOF
4413  
4414 else
4415   echo "$ac_t""no" 1>&6
4416 fi
4417 done
4418
4419
4420 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4421 echo "configure:4422: checking for ANSI C header files" >&5
4422 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4423   echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425   cat > conftest.$ac_ext <<EOF
4426 #line 4427 "configure"
4427 #include "confdefs.h"
4428 #include <stdlib.h>
4429 #include <stdarg.h>
4430 #include <string.h>
4431 #include <float.h>
4432 EOF
4433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4434 { (eval echo configure:4435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4436 if test -z "$ac_err"; then
4437   rm -rf conftest*
4438   ac_cv_header_stdc=yes
4439 else
4440   echo "$ac_err" >&5
4441   echo "configure: failed program was:" >&5
4442   cat conftest.$ac_ext >&5
4443   rm -rf conftest*
4444   ac_cv_header_stdc=no
4445 fi
4446 rm -f conftest*
4447
4448 if test $ac_cv_header_stdc = yes; then
4449   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4450 cat > conftest.$ac_ext <<EOF
4451 #line 4452 "configure"
4452 #include "confdefs.h"
4453 #include <string.h>
4454 EOF
4455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4456   egrep "memchr" >/dev/null 2>&1; then
4457   :
4458 else
4459   rm -rf conftest*
4460   ac_cv_header_stdc=no
4461 fi
4462 rm -f conftest*
4463
4464 fi
4465
4466 if test $ac_cv_header_stdc = yes; then
4467   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4468 cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 #include <stdlib.h>
4472 EOF
4473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4474   egrep "free" >/dev/null 2>&1; then
4475   :
4476 else
4477   rm -rf conftest*
4478   ac_cv_header_stdc=no
4479 fi
4480 rm -f conftest*
4481
4482 fi
4483
4484 if test $ac_cv_header_stdc = yes; then
4485   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4486 if test "$cross_compiling" = yes; then
4487   :
4488 else
4489   cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 #include <ctype.h>
4493 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4494 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4495 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4496 int main () { int i; for (i = 0; i < 256; i++)
4497 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4498 exit (0); }
4499
4500 EOF
4501 if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4502 then
4503   :
4504 else
4505   echo "configure: failed program was:" >&5
4506   cat conftest.$ac_ext >&5
4507   rm -fr conftest*
4508   ac_cv_header_stdc=no
4509 fi
4510 rm -fr conftest*
4511 fi
4512
4513 fi
4514 fi
4515
4516 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4517 if test $ac_cv_header_stdc = yes; then
4518   cat >> confdefs.h <<\EOF
4519 #define STDC_HEADERS 1
4520 EOF
4521
4522 fi
4523
4524 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4525 echo "configure:4526: checking for ssize_t" >&5
4526 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #include <sys/types.h>
4533 #if STDC_HEADERS
4534 #include <stdlib.h>
4535 #include <stddef.h>
4536 #endif
4537 EOF
4538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4539   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4540   rm -rf conftest*
4541   ac_cv_type_ssize_t=yes
4542 else
4543   rm -rf conftest*
4544   ac_cv_type_ssize_t=no
4545 fi
4546 rm -f conftest*
4547
4548 fi
4549 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4550 if test $ac_cv_type_ssize_t = no; then
4551   cat >> confdefs.h <<\EOF
4552 #define ssize_t int
4553 EOF
4554
4555 fi
4556
4557
4558 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
4559 echo "configure:4560: checking for in_addr_t" >&5
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <sys/types.h>
4564 #if STDC_HEADERS
4565 #include <stdlib.h>
4566 #include <stddef.h>
4567 #endif
4568 #if HAVE_NETINET_IN_H
4569 #include <netinet/in.h>
4570 #endif
4571 int main() {
4572 in_addr_t foo;
4573 ; return 0; }
4574 EOF
4575 if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4576   rm -rf conftest*
4577   cat >> confdefs.h <<\EOF
4578 #define HAVE_IN_ADDR_T 1
4579 EOF
4580
4581    echo "$ac_t""yes" 1>&6
4582 else
4583   echo "configure: failed program was:" >&5
4584   cat conftest.$ac_ext >&5
4585   rm -rf conftest*
4586   echo "$ac_t""no" 1>&6
4587 fi
4588 rm -f conftest*
4589
4590 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
4591 echo "configure:4592: checking whether struct ip_mreq is in netinet/in.h" >&5
4592 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 #include <netinet/in.h>
4596 int main() {
4597 struct ip_mreq mreq;
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4601   rm -rf conftest*
4602   cat >> confdefs.h <<\EOF
4603 #define HAVE_STRUCT_IP_MREQ 1
4604 EOF
4605
4606    echo "$ac_t""yes" 1>&6
4607 else
4608   echo "configure: failed program was:" >&5
4609   cat conftest.$ac_ext >&5
4610   rm -rf conftest*
4611   echo "$ac_t""no" 1>&6
4612 fi
4613 rm -f conftest*
4614
4615 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
4616 echo "configure:4617: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
4617 cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <netinet/in.h>
4621 int main() {
4622 struct sockaddr_in6 addr6;
4623 ; return 0; }
4624 EOF
4625 if { (eval echo configure:4626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4626   rm -rf conftest*
4627   cat >> confdefs.h <<\EOF
4628 #define HAVE_INET6 1
4629 EOF
4630
4631    echo "$ac_t""yes" 1>&6
4632 else
4633   echo "configure: failed program was:" >&5
4634   cat conftest.$ac_ext >&5
4635   rm -rf conftest*
4636   echo "$ac_t""no" 1>&6
4637 fi
4638 rm -f conftest*
4639
4640 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
4641 echo "configure:4642: checking for socklen_t in sys/socket.h" >&5
4642 cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645 #include <sys/socket.h>
4646 int main() {
4647 socklen_t x = 5;
4648 ; return 0; }
4649 EOF
4650 if { (eval echo configure:4651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4651   rm -rf conftest*
4652   cat >> confdefs.h <<\EOF
4653 #define HAVE_SOCKLEN_T 1
4654 EOF
4655
4656    echo "$ac_t""yes" 1>&6
4657 else
4658   echo "configure: failed program was:" >&5
4659   cat conftest.$ac_ext >&5
4660   rm -rf conftest*
4661   echo "$ac_t""no" 1>&6
4662 fi
4663 rm -f conftest*
4664
4665 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4666 echo "configure:4667: checking for tm_gmtoff in struct tm" >&5
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 #include <time.h>
4671 int main() {
4672 struct tm tim; tim.tm_gmtoff = 0;
4673 ; return 0; }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4676   rm -rf conftest*
4677   cat >> confdefs.h <<\EOF
4678 #define STRUCT_TM_HAS_GMTOFF 1
4679 EOF
4680
4681    echo "$ac_t""yes" 1>&6
4682 else
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -rf conftest*
4686   echo "$ac_t""no" 1>&6
4687    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
4688 echo "configure:4689: checking for global timezone variable" >&5
4689             cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 #include <time.h>
4693 int main() {
4694 long z2 = timezone;
4695 ; return 0; }
4696 EOF
4697 if { (eval echo configure:4698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4698   rm -rf conftest*
4699   cat >> confdefs.h <<\EOF
4700 #define HAVE_TIMEZONE 1
4701 EOF
4702
4703       echo "$ac_t""yes" 1>&6
4704 else
4705   echo "configure: failed program was:" >&5
4706   cat conftest.$ac_ext >&5
4707   rm -rf conftest*
4708   echo "$ac_t""no" 1>&6
4709 fi
4710 rm -f conftest*
4711 fi
4712 rm -f conftest*
4713
4714 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4715 # for constant arguments.  Useless!
4716 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4717 echo "configure:4718: checking for working alloca.h" >&5
4718 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
4724 #include <alloca.h>
4725 int main() {
4726 char *p = alloca(2 * sizeof(int));
4727 ; return 0; }
4728 EOF
4729 if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4730   rm -rf conftest*
4731   ac_cv_header_alloca_h=yes
4732 else
4733   echo "configure: failed program was:" >&5
4734   cat conftest.$ac_ext >&5
4735   rm -rf conftest*
4736   ac_cv_header_alloca_h=no
4737 fi
4738 rm -f conftest*
4739 fi
4740
4741 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4742 if test $ac_cv_header_alloca_h = yes; then
4743   cat >> confdefs.h <<\EOF
4744 #define HAVE_ALLOCA_H 1
4745 EOF
4746
4747 fi
4748
4749 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4750 echo "configure:4751: checking for alloca" >&5
4751 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4752   echo $ac_n "(cached) $ac_c" 1>&6
4753 else
4754   cat > conftest.$ac_ext <<EOF
4755 #line 4756 "configure"
4756 #include "confdefs.h"
4757
4758 #ifdef __GNUC__
4759 # define alloca __builtin_alloca
4760 #else
4761 # ifdef _MSC_VER
4762 #  include <malloc.h>
4763 #  define alloca _alloca
4764 # else
4765 #  if HAVE_ALLOCA_H
4766 #   include <alloca.h>
4767 #  else
4768 #   ifdef _AIX
4769  #pragma alloca
4770 #   else
4771 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4772 char *alloca ();
4773 #    endif
4774 #   endif
4775 #  endif
4776 # endif
4777 #endif
4778
4779 int main() {
4780 char *p = (char *) alloca(1);
4781 ; return 0; }
4782 EOF
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784   rm -rf conftest*
4785   ac_cv_func_alloca_works=yes
4786 else
4787   echo "configure: failed program was:" >&5
4788   cat conftest.$ac_ext >&5
4789   rm -rf conftest*
4790   ac_cv_func_alloca_works=no
4791 fi
4792 rm -f conftest*
4793 fi
4794
4795 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4796 if test $ac_cv_func_alloca_works = yes; then
4797   cat >> confdefs.h <<\EOF
4798 #define HAVE_ALLOCA 1
4799 EOF
4800
4801 fi
4802
4803 if test $ac_cv_func_alloca_works = no; then
4804   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4805   # that cause trouble.  Some versions do not even contain alloca or
4806   # contain a buggy version.  If you still want to use their alloca,
4807   # use ar to extract alloca.o from them instead of compiling alloca.c.
4808   ALLOCA=alloca.${ac_objext}
4809   cat >> confdefs.h <<\EOF
4810 #define C_ALLOCA 1
4811 EOF
4812
4813
4814 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4815 echo "configure:4816: checking whether alloca needs Cray hooks" >&5
4816 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #if defined(CRAY) && ! defined(CRAY2)
4823 webecray
4824 #else
4825 wenotbecray
4826 #endif
4827
4828 EOF
4829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4830   egrep "webecray" >/dev/null 2>&1; then
4831   rm -rf conftest*
4832   ac_cv_os_cray=yes
4833 else
4834   rm -rf conftest*
4835   ac_cv_os_cray=no
4836 fi
4837 rm -f conftest*
4838
4839 fi
4840
4841 echo "$ac_t""$ac_cv_os_cray" 1>&6
4842 if test $ac_cv_os_cray = yes; then
4843 for ac_func in _getb67 GETB67 getb67; do
4844   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4845 echo "configure:4846: checking for $ac_func" >&5
4846 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   cat > conftest.$ac_ext <<EOF
4850 #line 4851 "configure"
4851 #include "confdefs.h"
4852 /* System header to define __stub macros and hopefully few prototypes,
4853     which can conflict with char $ac_func(); below.  */
4854 #include <assert.h>
4855 /* Override any gcc2 internal prototype to avoid an error.  */
4856 /* We use char because int might match the return type of a gcc2
4857     builtin and then its argument prototype would still apply.  */
4858 char $ac_func();
4859
4860 int main() {
4861
4862 /* The GNU C library defines this for functions which it implements
4863     to always fail with ENOSYS.  Some functions are actually named
4864     something starting with __ and the normal name is an alias.  */
4865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4866 choke me
4867 #else
4868 $ac_func();
4869 #endif
4870
4871 ; return 0; }
4872 EOF
4873 if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4874   rm -rf conftest*
4875   eval "ac_cv_func_$ac_func=yes"
4876 else
4877   echo "configure: failed program was:" >&5
4878   cat conftest.$ac_ext >&5
4879   rm -rf conftest*
4880   eval "ac_cv_func_$ac_func=no"
4881 fi
4882 rm -f conftest*
4883 fi
4884
4885 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4886   echo "$ac_t""yes" 1>&6
4887   cat >> confdefs.h <<EOF
4888 #define CRAY_STACKSEG_END $ac_func
4889 EOF
4890
4891   break
4892 else
4893   echo "$ac_t""no" 1>&6
4894 fi
4895
4896 done
4897 fi
4898
4899 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4900 echo "configure:4901: checking stack direction for C alloca" >&5
4901 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4902   echo $ac_n "(cached) $ac_c" 1>&6
4903 else
4904   if test "$cross_compiling" = yes; then
4905   ac_cv_c_stack_direction=0
4906 else
4907   cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910 find_stack_direction ()
4911 {
4912   static char *addr = 0;
4913   auto char dummy;
4914   if (addr == 0)
4915     {
4916       addr = &dummy;
4917       return find_stack_direction ();
4918     }
4919   else
4920     return (&dummy > addr) ? 1 : -1;
4921 }
4922 main ()
4923 {
4924   exit (find_stack_direction() < 0);
4925 }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4928 then
4929   ac_cv_c_stack_direction=1
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -fr conftest*
4934   ac_cv_c_stack_direction=-1
4935 fi
4936 rm -fr conftest*
4937 fi
4938
4939 fi
4940
4941 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4942 cat >> confdefs.h <<EOF
4943 #define STACK_DIRECTION $ac_cv_c_stack_direction
4944 EOF
4945
4946 fi
4947
4948
4949 for ac_prog in perl
4950 do
4951 # Extract the first word of "$ac_prog", so it can be a program name with args.
4952 set dummy $ac_prog; ac_word=$2
4953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4954 echo "configure:4955: checking for $ac_word" >&5
4955 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
4956   echo $ac_n "(cached) $ac_c" 1>&6
4957 else
4958   if test -n "$PERL"; then
4959   ac_cv_prog_PERL="$PERL" # Let the user override the test.
4960 else
4961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4962   ac_dummy="$PATH"
4963   for ac_dir in $ac_dummy; do
4964     test -z "$ac_dir" && ac_dir=.
4965     if test -f $ac_dir/$ac_word; then
4966       ac_cv_prog_PERL="$ac_prog"
4967       break
4968     fi
4969   done
4970   IFS="$ac_save_ifs"
4971 fi
4972 fi
4973 PERL="$ac_cv_prog_PERL"
4974 if test -n "$PERL"; then
4975   echo "$ac_t""$PERL" 1>&6
4976 else
4977   echo "$ac_t""no" 1>&6
4978 fi
4979
4980 test -n "$PERL" && break
4981 done
4982 test -n "$PERL" || PERL="false"
4983
4984
4985 if test "$enable_sjlj_exceptions" = yes; then
4986    SIGNAL_HANDLER=include/default-signal.h
4987 else
4988    case "${host}" in
4989     i?86-*-linux*)
4990        SIGNAL_HANDLER=include/i386-signal.h
4991        ;;
4992     sparc-sun-solaris*)
4993        SIGNAL_HANDLER=include/sparc-signal.h
4994        ;;
4995     *)
4996        SIGNAL_HANDLER=include/default-signal.h
4997        ;;
4998    esac
4999 fi
5000
5001
5002
5003 if test "${multilib}" = "yes"; then
5004   multilib_arg="--enable-multilib"
5005 else
5006   multilib_arg=
5007 fi
5008
5009 here=`pwd`
5010
5011
5012 trap '' 1 2 15
5013 cat > confcache <<\EOF
5014 # This file is a shell script that caches the results of configure
5015 # tests run on this system so they can be shared between configure
5016 # scripts and configure runs.  It is not useful on other systems.
5017 # If it contains results you don't want to keep, you may remove or edit it.
5018 #
5019 # By default, configure uses ./config.cache as the cache file,
5020 # creating it if it does not exist already.  You can give configure
5021 # the --cache-file=FILE option to use a different cache file; that is
5022 # what configure does when it calls configure scripts in
5023 # subdirectories, so they share the cache.
5024 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5025 # config.status only pays attention to the cache file if you give it the
5026 # --recheck option to rerun configure.
5027 #
5028 EOF
5029 # The following way of writing the cache mishandles newlines in values,
5030 # but we know of no workaround that is simple, portable, and efficient.
5031 # So, don't put newlines in cache variables' values.
5032 # Ultrix sh set writes to stderr and can't be redirected directly,
5033 # and sets the high bit in the cache file unless we assign to the vars.
5034 (set) 2>&1 |
5035   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5036   *ac_space=\ *)
5037     # `set' does not quote correctly, so add quotes (double-quote substitution
5038     # turns \\\\ into \\, and sed turns \\ into \).
5039     sed -n \
5040       -e "s/'/'\\\\''/g" \
5041       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5042     ;;
5043   *)
5044     # `set' quotes correctly as required by POSIX, so do not add quotes.
5045     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5046     ;;
5047   esac >> confcache
5048 if cmp -s $cache_file confcache; then
5049   :
5050 else
5051   if test -w $cache_file; then
5052     echo "updating cache $cache_file"
5053     cat confcache > $cache_file
5054   else
5055     echo "not updating unwritable cache $cache_file"
5056   fi
5057 fi
5058 rm -f confcache
5059
5060 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5061
5062 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5063 # Let make expand exec_prefix.
5064 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5065
5066 # Any assignment to VPATH causes Sun make to only execute
5067 # the first set of double-colon rules, so remove it if not needed.
5068 # If there is a colon in the path, we need to keep it.
5069 if test "x$srcdir" = x.; then
5070   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5071 fi
5072
5073 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5074
5075 DEFS=-DHAVE_CONFIG_H
5076
5077 # Without the "./", some shells look in PATH for config.status.
5078 : ${CONFIG_STATUS=./config.status}
5079
5080 echo creating $CONFIG_STATUS
5081 rm -f $CONFIG_STATUS
5082 cat > $CONFIG_STATUS <<EOF
5083 #! /bin/sh
5084 # Generated automatically by configure.
5085 # Run this file to recreate the current configuration.
5086 # This directory was configured as follows,
5087 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5088 #
5089 # $0 $ac_configure_args
5090 #
5091 # Compiler output produced by configure, useful for debugging
5092 # configure, is in ./config.log if it exists.
5093
5094 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5095 for ac_option
5096 do
5097   case "\$ac_option" in
5098   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5099     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5100     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5101   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5102     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5103     exit 0 ;;
5104   -help | --help | --hel | --he | --h)
5105     echo "\$ac_cs_usage"; exit 0 ;;
5106   *) echo "\$ac_cs_usage"; exit 1 ;;
5107   esac
5108 done
5109
5110 ac_given_srcdir=$srcdir
5111 ac_given_INSTALL="$INSTALL"
5112
5113 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
5114 EOF
5115 cat >> $CONFIG_STATUS <<EOF
5116
5117 # Protect against being on the right side of a sed subst in config.status.
5118 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5119  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5120 $ac_vpsub
5121 $extrasub
5122 s%@SHELL@%$SHELL%g
5123 s%@CFLAGS@%$CFLAGS%g
5124 s%@CPPFLAGS@%$CPPFLAGS%g
5125 s%@CXXFLAGS@%$CXXFLAGS%g
5126 s%@FFLAGS@%$FFLAGS%g
5127 s%@DEFS@%$DEFS%g
5128 s%@LDFLAGS@%$LDFLAGS%g
5129 s%@LIBS@%$LIBS%g
5130 s%@exec_prefix@%$exec_prefix%g
5131 s%@prefix@%$prefix%g
5132 s%@program_transform_name@%$program_transform_name%g
5133 s%@bindir@%$bindir%g
5134 s%@sbindir@%$sbindir%g
5135 s%@libexecdir@%$libexecdir%g
5136 s%@datadir@%$datadir%g
5137 s%@sysconfdir@%$sysconfdir%g
5138 s%@sharedstatedir@%$sharedstatedir%g
5139 s%@localstatedir@%$localstatedir%g
5140 s%@libdir@%$libdir%g
5141 s%@includedir@%$includedir%g
5142 s%@oldincludedir@%$oldincludedir%g
5143 s%@infodir@%$infodir%g
5144 s%@mandir@%$mandir%g
5145 s%@host@%$host%g
5146 s%@host_alias@%$host_alias%g
5147 s%@host_cpu@%$host_cpu%g
5148 s%@host_vendor@%$host_vendor%g
5149 s%@host_os@%$host_os%g
5150 s%@target@%$target%g
5151 s%@target_alias@%$target_alias%g
5152 s%@target_cpu@%$target_cpu%g
5153 s%@target_vendor@%$target_vendor%g
5154 s%@target_os@%$target_os%g
5155 s%@build@%$build%g
5156 s%@build_alias@%$build_alias%g
5157 s%@build_cpu@%$build_cpu%g
5158 s%@build_vendor@%$build_vendor%g
5159 s%@build_os@%$build_os%g
5160 s%@libgcj_basedir@%$libgcj_basedir%g
5161 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5162 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5163 s%@INSTALL_DATA@%$INSTALL_DATA%g
5164 s%@PACKAGE@%$PACKAGE%g
5165 s%@VERSION@%$VERSION%g
5166 s%@ACLOCAL@%$ACLOCAL%g
5167 s%@AUTOCONF@%$AUTOCONF%g
5168 s%@AUTOMAKE@%$AUTOMAKE%g
5169 s%@AUTOHEADER@%$AUTOHEADER%g
5170 s%@MAKEINFO@%$MAKEINFO%g
5171 s%@SET_MAKE@%$SET_MAKE%g
5172 s%@CC@%$CC%g
5173 s%@CXX@%$CXX%g
5174 s%@AS@%$AS%g
5175 s%@AR@%$AR%g
5176 s%@RANLIB@%$RANLIB%g
5177 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5178 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5179 s%@MAINT@%$MAINT%g
5180 s%@EXEEXT@%$EXEEXT%g
5181 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
5182 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
5183 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
5184 s%@INCLTDL@%$INCLTDL%g
5185 s%@LIBLTDL@%$LIBLTDL%g
5186 s%@DIRLTDL@%$DIRLTDL%g
5187 s%@LN_S@%$LN_S%g
5188 s%@LIBTOOL@%$LIBTOOL%g
5189 s%@subdirs@%$subdirs%g
5190 s%@COMPPATH@%$COMPPATH%g
5191 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
5192 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
5193 s%@LIBDATASTARTSPEC@%$LIBDATASTARTSPEC%g
5194 s%@CPP@%$CPP%g
5195 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
5196 s%@ZLIBSPEC@%$ZLIBSPEC%g
5197 s%@GCLIBS@%$GCLIBS%g
5198 s%@GCINCS@%$GCINCS%g
5199 s%@GCDEPS@%$GCDEPS%g
5200 s%@GCOBJS@%$GCOBJS%g
5201 s%@GCSPEC@%$GCSPEC%g
5202 s%@THREADLIBS@%$THREADLIBS%g
5203 s%@THREADINCS@%$THREADINCS%g
5204 s%@THREADDEPS@%$THREADDEPS%g
5205 s%@THREADOBJS@%$THREADOBJS%g
5206 s%@THREADSPEC@%$THREADSPEC%g
5207 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
5208 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
5209 s%@ZLIBS@%$ZLIBS%g
5210 s%@ZDEPS@%$ZDEPS%g
5211 s%@ZINCS@%$ZINCS%g
5212 s%@DIVIDESPEC@%$DIVIDESPEC%g
5213 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
5214 s%@FORCELIBGCCSPEC@%$FORCELIBGCCSPEC%g
5215 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
5216 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
5217 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
5218 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
5219 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
5220 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
5221 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
5222 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
5223 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
5224 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
5225 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
5226 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
5227 s%@ALLOCA@%$ALLOCA%g
5228 s%@PERL@%$PERL%g
5229 s%@here@%$here%g
5230
5231 CEOF
5232 EOF
5233
5234 cat >> $CONFIG_STATUS <<\EOF
5235
5236 # Split the substitutions into bite-sized pieces for seds with
5237 # small command number limits, like on Digital OSF/1 and HP-UX.
5238 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5239 ac_file=1 # Number of current file.
5240 ac_beg=1 # First line for current file.
5241 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5242 ac_more_lines=:
5243 ac_sed_cmds=""
5244 while $ac_more_lines; do
5245   if test $ac_beg -gt 1; then
5246     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5247   else
5248     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5249   fi
5250   if test ! -s conftest.s$ac_file; then
5251     ac_more_lines=false
5252     rm -f conftest.s$ac_file
5253   else
5254     if test -z "$ac_sed_cmds"; then
5255       ac_sed_cmds="sed -f conftest.s$ac_file"
5256     else
5257       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5258     fi
5259     ac_file=`expr $ac_file + 1`
5260     ac_beg=$ac_end
5261     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5262   fi
5263 done
5264 if test -z "$ac_sed_cmds"; then
5265   ac_sed_cmds=cat
5266 fi
5267 EOF
5268
5269 cat >> $CONFIG_STATUS <<EOF
5270
5271 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec gcj/Makefile include/Makefile testsuite/Makefile"}
5272 EOF
5273 cat >> $CONFIG_STATUS <<\EOF
5274 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5275   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5276   case "$ac_file" in
5277   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5278        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5279   *) ac_file_in="${ac_file}.in" ;;
5280   esac
5281
5282   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5283
5284   # Remove last slash and all that follows it.  Not all systems have dirname.
5285   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5286   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5287     # The file is in a subdirectory.
5288     test ! -d "$ac_dir" && mkdir "$ac_dir"
5289     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5290     # A "../" for each directory in $ac_dir_suffix.
5291     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5292   else
5293     ac_dir_suffix= ac_dots=
5294   fi
5295
5296   case "$ac_given_srcdir" in
5297   .)  srcdir=.
5298       if test -z "$ac_dots"; then top_srcdir=.
5299       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5300   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5301   *) # Relative path.
5302     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5303     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5304   esac
5305
5306   case "$ac_given_INSTALL" in
5307   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5308   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5309   esac
5310
5311   echo creating "$ac_file"
5312   rm -f "$ac_file"
5313   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5314   case "$ac_file" in
5315   *Makefile*) ac_comsub="1i\\
5316 # $configure_input" ;;
5317   *) ac_comsub= ;;
5318   esac
5319
5320   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5321   sed -e "$ac_comsub
5322 s%@configure_input@%$configure_input%g
5323 s%@srcdir@%$srcdir%g
5324 s%@top_srcdir@%$top_srcdir%g
5325 s%@INSTALL@%$INSTALL%g
5326 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5327 fi; done
5328 rm -f conftest.s*
5329
5330 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5331 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5332 #
5333 # ac_d sets the value in "#define NAME VALUE" lines.
5334 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5335 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5336 ac_dC='\3'
5337 ac_dD='%g'
5338 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5339 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5340 ac_uB='\([      ]\)%\1#\2define\3'
5341 ac_uC=' '
5342 ac_uD='\4%g'
5343 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5344 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5345 ac_eB='$%\1#\2define\3'
5346 ac_eC=' '
5347 ac_eD='%g'
5348
5349 if test "${CONFIG_HEADERS+set}" != set; then
5350 EOF
5351 cat >> $CONFIG_STATUS <<EOF
5352   CONFIG_HEADERS="include/config.h"
5353 EOF
5354 cat >> $CONFIG_STATUS <<\EOF
5355 fi
5356 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5357   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5358   case "$ac_file" in
5359   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5360        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5361   *) ac_file_in="${ac_file}.in" ;;
5362   esac
5363
5364   echo creating $ac_file
5365
5366   rm -f conftest.frag conftest.in conftest.out
5367   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5368   cat $ac_file_inputs > conftest.in
5369
5370 EOF
5371
5372 # Transform confdefs.h into a sed script conftest.vals that substitutes
5373 # the proper values into config.h.in to produce config.h.  And first:
5374 # Protect against being on the right side of a sed subst in config.status.
5375 # Protect against being in an unquoted here document in config.status.
5376 rm -f conftest.vals
5377 cat > conftest.hdr <<\EOF
5378 s/[\\&%]/\\&/g
5379 s%[\\$`]%\\&%g
5380 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5381 s%ac_d%ac_u%gp
5382 s%ac_u%ac_e%gp
5383 EOF
5384 sed -n -f conftest.hdr confdefs.h > conftest.vals
5385 rm -f conftest.hdr
5386
5387 # This sed command replaces #undef with comments.  This is necessary, for
5388 # example, in the case of _POSIX_SOURCE, which is predefined and required
5389 # on some systems where configure will not decide to define it.
5390 cat >> conftest.vals <<\EOF
5391 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5392 EOF
5393
5394 # Break up conftest.vals because some shells have a limit on
5395 # the size of here documents, and old seds have small limits too.
5396
5397 rm -f conftest.tail
5398 while :
5399 do
5400   ac_lines=`grep -c . conftest.vals`
5401   # grep -c gives empty output for an empty file on some AIX systems.
5402   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5403   # Write a limited-size here document to conftest.frag.
5404   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5405   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5406   echo 'CEOF
5407   sed -f conftest.frag conftest.in > conftest.out
5408   rm -f conftest.in
5409   mv conftest.out conftest.in
5410 ' >> $CONFIG_STATUS
5411   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5412   rm -f conftest.vals
5413   mv conftest.tail conftest.vals
5414 done
5415 rm -f conftest.vals
5416
5417 cat >> $CONFIG_STATUS <<\EOF
5418   rm -f conftest.frag conftest.h
5419   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5420   cat conftest.in >> conftest.h
5421   rm -f conftest.in
5422   if cmp -s $ac_file conftest.h 2>/dev/null; then
5423     echo "$ac_file is unchanged"
5424     rm -f conftest.h
5425   else
5426     # Remove last slash and all that follows it.  Not all systems have dirname.
5427       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5428       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5429       # The file is in a subdirectory.
5430       test ! -d "$ac_dir" && mkdir "$ac_dir"
5431     fi
5432     rm -f $ac_file
5433     mv conftest.h $ac_file
5434   fi
5435 fi; done
5436
5437 EOF
5438
5439 cat >> $CONFIG_STATUS <<EOF
5440 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
5441 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"
5442 EOF
5443
5444 cat >> $CONFIG_STATUS <<\EOF
5445 srcdir=$ac_given_srcdir
5446 while test -n "$ac_sources"; do
5447   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5448   set $ac_sources; ac_source=$1; shift; ac_sources=$*
5449
5450   echo "linking $srcdir/$ac_source to $ac_dest"
5451
5452   if test ! -r $srcdir/$ac_source; then
5453     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5454   fi
5455   rm -f $ac_dest
5456
5457   # Make relative symlinks.
5458   # Remove last slash and all that follows it.  Not all systems have dirname.
5459   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5460   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5461     # The dest file is in a subdirectory.
5462     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5463     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5464     # A "../" for each directory in $ac_dest_dir_suffix.
5465     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5466   else
5467     ac_dest_dir_suffix= ac_dots=
5468   fi
5469
5470   case "$srcdir" in
5471   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5472   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5473   esac
5474
5475   # Make a symlink if possible; otherwise try a hard link.
5476   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5477     ln $srcdir/$ac_source $ac_dest; then :
5478   else
5479     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5480   fi
5481 done
5482 EOF
5483 cat >> $CONFIG_STATUS <<EOF
5484
5485 srcdir=${srcdir}
5486 host=${host}
5487 target=${target}
5488 with_multisubdir=${with_multisubdir}
5489 ac_configure_args="${multilib_arg} ${ac_configure_args}"
5490 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5491 libgcj_basedir=${libgcj_basedir}
5492 CC="${CC}"
5493 CXX="${CXX}"
5494
5495 EOF
5496 cat >> $CONFIG_STATUS <<\EOF
5497 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
5498 if test -n "$CONFIG_FILES"; then
5499   ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
5500 fi
5501 exit 0
5502 EOF
5503 chmod +x $CONFIG_STATUS
5504 rm -fr confdefs* $ac_clean_files
5505 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5506
5507 if test "$no_recursion" != yes; then
5508
5509   # Remove --cache-file and --srcdir arguments so they do not pile up.
5510   ac_sub_configure_args=
5511   ac_prev=
5512   for ac_arg in $ac_configure_args; do
5513     if test -n "$ac_prev"; then
5514       ac_prev=
5515       continue
5516     fi
5517     case "$ac_arg" in
5518     -cache-file | --cache-file | --cache-fil | --cache-fi \
5519     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5520       ac_prev=cache_file ;;
5521     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5522     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
5523       ;;
5524     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5525       ac_prev=srcdir ;;
5526     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5527       ;;
5528     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
5529     esac
5530   done
5531
5532   for ac_config_dir in $DIRLTDL; do
5533
5534     # Do not complain, so a configure script can configure whichever
5535     # parts of a large source tree are present.
5536     if test ! -d $srcdir/$ac_config_dir; then
5537       continue
5538     fi
5539
5540     echo configuring in $ac_config_dir
5541
5542     case "$srcdir" in
5543     .) ;;
5544     *)
5545       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
5546       else
5547         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
5548       fi
5549       ;;
5550     esac
5551
5552     ac_popdir=`pwd`
5553     cd $ac_config_dir
5554
5555       # A "../" for each directory in /$ac_config_dir.
5556       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
5557
5558     case "$srcdir" in
5559     .) # No --srcdir option.  We are building in place.
5560       ac_sub_srcdir=$srcdir ;;
5561     /*) # Absolute path.
5562       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
5563     *) # Relative path.
5564       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5565     esac
5566
5567     # Check for guested configure; otherwise get Cygnus style configure.
5568     if test -f $ac_sub_srcdir/configure; then
5569       ac_sub_configure=$ac_sub_srcdir/configure
5570     elif test -f $ac_sub_srcdir/configure.in; then
5571       ac_sub_configure=$ac_configure
5572     else
5573       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
5574       ac_sub_configure=
5575     fi
5576
5577     # The recursion is here.
5578     if test -n "$ac_sub_configure"; then
5579
5580       # Make the cache file name correct relative to the subdirectory.
5581       case "$cache_file" in
5582       /*) ac_sub_cache_file=$cache_file ;;
5583       *) # Relative path.
5584         ac_sub_cache_file="$ac_dots$cache_file" ;;
5585       esac
5586   case "$ac_given_INSTALL" in
5587         [/$]*) INSTALL="$ac_given_INSTALL" ;;
5588         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5589         esac
5590
5591       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
5592       # The eval makes quoting arguments work.
5593       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
5594       then :
5595       else
5596         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
5597       fi
5598     fi
5599
5600     cd $ac_popdir
5601   done
5602 fi
5603