OSDN Git Service

1999-04-20 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.12.2 
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      Configuring in a subdirectory"
16 ac_help="$ac_help
17   --with-cross-host=HOST           Configuring with a cross compiler"
18 ac_help="$ac_help
19   --enable-multilib         build many library versions (default)"
20 ac_help="$ac_help
21   --enable-maintainer-mode enable make rules and dependencies not useful
22                           (and sometimes confusing) to the casual installer"
23 ac_help="$ac_help
24   --enable-fast-character          Prefer speed over size for Character"
25 ac_help="$ac_help
26   --enable-libgcj-debug           Enable runtime debugging code"
27 ac_help="$ac_help
28   --with-ecos      Enable runtime eCos target support."
29 ac_help="$ac_help
30   --enable-java-gc=TYPE    choose garbage collector [boehm]"
31 ac_help="$ac_help
32   --enable-threads=TYPE    choose threading package"
33
34 # Initialize some variables set by options.
35 # The variables have the same names as the options, with
36 # dashes changed to underlines.
37 build=NONE
38 cache_file=./config.cache
39 exec_prefix=NONE
40 host=NONE
41 no_create=
42 nonopt=NONE
43 no_recursion=
44 prefix=NONE
45 program_prefix=NONE
46 program_suffix=NONE
47 program_transform_name=s,x,x,
48 silent=
49 site=
50 srcdir=
51 target=NONE
52 verbose=
53 x_includes=NONE
54 x_libraries=NONE
55 bindir='${exec_prefix}/bin'
56 sbindir='${exec_prefix}/sbin'
57 libexecdir='${exec_prefix}/libexec'
58 datadir='${prefix}/share'
59 sysconfdir='${prefix}/etc'
60 sharedstatedir='${prefix}/com'
61 localstatedir='${prefix}/var'
62 libdir='${exec_prefix}/lib'
63 includedir='${prefix}/include'
64 oldincludedir='/usr/include'
65 infodir='${prefix}/info'
66 mandir='${prefix}/man'
67
68 # Initialize some other variables.
69 subdirs=
70 MFLAGS= MAKEFLAGS=
71 SHELL=${CONFIG_SHELL-/bin/sh}
72 # Maximum number of lines to put in a shell here document.
73 ac_max_here_lines=12
74
75 ac_prev=
76 for ac_option
77 do
78
79   # If the previous option needs an argument, assign it.
80   if test -n "$ac_prev"; then
81     eval "$ac_prev=\$ac_option"
82     ac_prev=
83     continue
84   fi
85
86   case "$ac_option" in
87   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
88   *) ac_optarg= ;;
89   esac
90
91   # Accept the important Cygnus configure options, so we can diagnose typos.
92
93   case "$ac_option" in
94
95   -bindir | --bindir | --bindi | --bind | --bin | --bi)
96     ac_prev=bindir ;;
97   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
98     bindir="$ac_optarg" ;;
99
100   -build | --build | --buil | --bui | --bu)
101     ac_prev=build ;;
102   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
103     build="$ac_optarg" ;;
104
105   -cache-file | --cache-file | --cache-fil | --cache-fi \
106   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
107     ac_prev=cache_file ;;
108   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
109   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
110     cache_file="$ac_optarg" ;;
111
112   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
113     ac_prev=datadir ;;
114   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
115   | --da=*)
116     datadir="$ac_optarg" ;;
117
118   -disable-* | --disable-*)
119     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
120     # Reject names that are not valid shell variable names.
121     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
122       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123     fi
124     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125     eval "enable_${ac_feature}=no" ;;
126
127   -enable-* | --enable-*)
128     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
129     # Reject names that are not valid shell variable names.
130     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
131       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132     fi
133     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134     case "$ac_option" in
135       *=*) ;;
136       *) ac_optarg=yes ;;
137     esac
138     eval "enable_${ac_feature}='$ac_optarg'" ;;
139
140   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
141   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
142   | --exec | --exe | --ex)
143     ac_prev=exec_prefix ;;
144   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
145   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
146   | --exec=* | --exe=* | --ex=*)
147     exec_prefix="$ac_optarg" ;;
148
149   -gas | --gas | --ga | --g)
150     # Obsolete; use --with-gas.
151     with_gas=yes ;;
152
153   -help | --help | --hel | --he)
154     # Omit some internal or obsolete options to make the list less imposing.
155     # This message is too long to be a string in the A/UX 3.1 sh.
156     cat << EOF
157 Usage: configure [options] [host]
158 Options: [defaults in brackets after descriptions]
159 Configuration:
160   --cache-file=FILE       cache test results in FILE
161   --help                  print this message
162   --no-create             do not create output files
163   --quiet, --silent       do not print \`checking...' messages
164   --version               print the version of autoconf that created configure
165 Directory and file names:
166   --prefix=PREFIX         install architecture-independent files in PREFIX
167                           [$ac_default_prefix]
168   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
169                           [same as prefix]
170   --bindir=DIR            user executables in DIR [EPREFIX/bin]
171   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
172   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
173   --datadir=DIR           read-only architecture-independent data in DIR
174                           [PREFIX/share]
175   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
176   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
177                           [PREFIX/com]
178   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
179   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
180   --includedir=DIR        C header files in DIR [PREFIX/include]
181   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
182   --infodir=DIR           info documentation in DIR [PREFIX/info]
183   --mandir=DIR            man documentation in DIR [PREFIX/man]
184   --srcdir=DIR            find the sources in DIR [configure dir or ..]
185   --program-prefix=PREFIX prepend PREFIX to installed program names
186   --program-suffix=SUFFIX append SUFFIX to installed program names
187   --program-transform-name=PROGRAM
188                           run sed PROGRAM on installed program names
189 EOF
190     cat << EOF
191 Host type:
192   --build=BUILD           configure for building on BUILD [BUILD=HOST]
193   --host=HOST             configure for HOST [guessed]
194   --target=TARGET         configure for TARGET [TARGET=HOST]
195 Features and packages:
196   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
197   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
198   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
199   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
200   --x-includes=DIR        X include files are in DIR
201   --x-libraries=DIR       X library files are in DIR
202 EOF
203     if test -n "$ac_help"; then
204       echo "--enable and --with options recognized:$ac_help"
205     fi
206     exit 0 ;;
207
208   -host | --host | --hos | --ho)
209     ac_prev=host ;;
210   -host=* | --host=* | --hos=* | --ho=*)
211     host="$ac_optarg" ;;
212
213   -includedir | --includedir | --includedi | --included | --include \
214   | --includ | --inclu | --incl | --inc)
215     ac_prev=includedir ;;
216   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
217   | --includ=* | --inclu=* | --incl=* | --inc=*)
218     includedir="$ac_optarg" ;;
219
220   -infodir | --infodir | --infodi | --infod | --info | --inf)
221     ac_prev=infodir ;;
222   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
223     infodir="$ac_optarg" ;;
224
225   -libdir | --libdir | --libdi | --libd)
226     ac_prev=libdir ;;
227   -libdir=* | --libdir=* | --libdi=* | --libd=*)
228     libdir="$ac_optarg" ;;
229
230   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
231   | --libexe | --libex | --libe)
232     ac_prev=libexecdir ;;
233   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
234   | --libexe=* | --libex=* | --libe=*)
235     libexecdir="$ac_optarg" ;;
236
237   -localstatedir | --localstatedir | --localstatedi | --localstated \
238   | --localstate | --localstat | --localsta | --localst \
239   | --locals | --local | --loca | --loc | --lo)
240     ac_prev=localstatedir ;;
241   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
242   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
243   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
244     localstatedir="$ac_optarg" ;;
245
246   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
247     ac_prev=mandir ;;
248   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
249     mandir="$ac_optarg" ;;
250
251   -nfp | --nfp | --nf)
252     # Obsolete; use --without-fp.
253     with_fp=no ;;
254
255   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
256   | --no-cr | --no-c)
257     no_create=yes ;;
258
259   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
260   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
261     no_recursion=yes ;;
262
263   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
264   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
265   | --oldin | --oldi | --old | --ol | --o)
266     ac_prev=oldincludedir ;;
267   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
268   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
269   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
270     oldincludedir="$ac_optarg" ;;
271
272   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
273     ac_prev=prefix ;;
274   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
275     prefix="$ac_optarg" ;;
276
277   -program-prefix | --program-prefix | --program-prefi | --program-pref \
278   | --program-pre | --program-pr | --program-p)
279     ac_prev=program_prefix ;;
280   -program-prefix=* | --program-prefix=* | --program-prefi=* \
281   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
282     program_prefix="$ac_optarg" ;;
283
284   -program-suffix | --program-suffix | --program-suffi | --program-suff \
285   | --program-suf | --program-su | --program-s)
286     ac_prev=program_suffix ;;
287   -program-suffix=* | --program-suffix=* | --program-suffi=* \
288   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
289     program_suffix="$ac_optarg" ;;
290
291   -program-transform-name | --program-transform-name \
292   | --program-transform-nam | --program-transform-na \
293   | --program-transform-n | --program-transform- \
294   | --program-transform | --program-transfor \
295   | --program-transfo | --program-transf \
296   | --program-trans | --program-tran \
297   | --progr-tra | --program-tr | --program-t)
298     ac_prev=program_transform_name ;;
299   -program-transform-name=* | --program-transform-name=* \
300   | --program-transform-nam=* | --program-transform-na=* \
301   | --program-transform-n=* | --program-transform-=* \
302   | --program-transform=* | --program-transfor=* \
303   | --program-transfo=* | --program-transf=* \
304   | --program-trans=* | --program-tran=* \
305   | --progr-tra=* | --program-tr=* | --program-t=*)
306     program_transform_name="$ac_optarg" ;;
307
308   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
309   | -silent | --silent | --silen | --sile | --sil)
310     silent=yes ;;
311
312   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
313     ac_prev=sbindir ;;
314   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
315   | --sbi=* | --sb=*)
316     sbindir="$ac_optarg" ;;
317
318   -sharedstatedir | --sharedstatedir | --sharedstatedi \
319   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
320   | --sharedst | --shareds | --shared | --share | --shar \
321   | --sha | --sh)
322     ac_prev=sharedstatedir ;;
323   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
324   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
325   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
326   | --sha=* | --sh=*)
327     sharedstatedir="$ac_optarg" ;;
328
329   -site | --site | --sit)
330     ac_prev=site ;;
331   -site=* | --site=* | --sit=*)
332     site="$ac_optarg" ;;
333
334   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
335     ac_prev=srcdir ;;
336   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
337     srcdir="$ac_optarg" ;;
338
339   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
340   | --syscon | --sysco | --sysc | --sys | --sy)
341     ac_prev=sysconfdir ;;
342   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
343   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
344     sysconfdir="$ac_optarg" ;;
345
346   -target | --target | --targe | --targ | --tar | --ta | --t)
347     ac_prev=target ;;
348   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
349     target="$ac_optarg" ;;
350
351   -v | -verbose | --verbose | --verbos | --verbo | --verb)
352     verbose=yes ;;
353
354   -version | --version | --versio | --versi | --vers)
355     echo "configure generated by autoconf version 2.12.2"
356     exit 0 ;;
357
358   -with-* | --with-*)
359     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
360     # Reject names that are not valid shell variable names.
361     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
362       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363     fi
364     ac_package=`echo $ac_package| sed 's/-/_/g'`
365     case "$ac_option" in
366       *=*) ;;
367       *) ac_optarg=yes ;;
368     esac
369     eval "with_${ac_package}='$ac_optarg'" ;;
370
371   -without-* | --without-*)
372     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
373     # Reject names that are not valid shell variable names.
374     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
375       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376     fi
377     ac_package=`echo $ac_package| sed 's/-/_/g'`
378     eval "with_${ac_package}=no" ;;
379
380   --x)
381     # Obsolete; use --with-x.
382     with_x=yes ;;
383
384   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
385   | --x-incl | --x-inc | --x-in | --x-i)
386     ac_prev=x_includes ;;
387   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
388   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
389     x_includes="$ac_optarg" ;;
390
391   -x-libraries | --x-libraries | --x-librarie | --x-librari \
392   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
393     ac_prev=x_libraries ;;
394   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
395   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
396     x_libraries="$ac_optarg" ;;
397
398   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
399     ;;
400
401   *)
402     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
403       echo "configure: warning: $ac_option: invalid host type" 1>&2
404     fi
405     if test "x$nonopt" != xNONE; then
406       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
407     fi
408     nonopt="$ac_option"
409     ;;
410
411   esac
412 done
413
414 if test -n "$ac_prev"; then
415   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
416 fi
417
418 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
419
420 # File descriptor usage:
421 # 0 standard input
422 # 1 file creation
423 # 2 errors and warnings
424 # 3 some systems may open it to /dev/tty
425 # 4 used on the Kubota Titan
426 # 6 checking for... messages and results
427 # 5 compiler messages saved in config.log
428 if test "$silent" = yes; then
429   exec 6>/dev/null
430 else
431   exec 6>&1
432 fi
433 exec 5>./config.log
434
435 echo "\
436 This file contains any messages produced by compilers while
437 running configure, to aid debugging if configure makes a mistake.
438 " 1>&5
439
440 # Strip out --no-create and --no-recursion so they do not pile up.
441 # Also quote any args containing shell metacharacters.
442 ac_configure_args=
443 for ac_arg
444 do
445   case "$ac_arg" in
446   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
447   | --no-cr | --no-c) ;;
448   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
449   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
450   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
451   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
452   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
453   esac
454 done
455
456 # NLS nuisances.
457 # Only set these to C if already set.  These must not be set unconditionally
458 # because not all systems understand e.g. LANG=C (notably SCO).
459 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
460 # Non-C LC_CTYPE values break the ctype check.
461 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
462 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
463 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
464 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
465
466 # confdefs.h avoids OS command line length limits that DEFS can exceed.
467 rm -rf conftest* confdefs.h
468 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
469 echo > confdefs.h
470
471 # A filename unique to this package, relative to the directory that
472 # configure is in, which we can look for to find out if srcdir is correct.
473 ac_unique_file=java/lang/System.java
474
475 # Find the source files, if location was not specified.
476 if test -z "$srcdir"; then
477   ac_srcdir_defaulted=yes
478   # Try the directory containing this script, then its parent.
479   ac_prog=$0
480   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
481   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
482   srcdir=$ac_confdir
483   if test ! -r $srcdir/$ac_unique_file; then
484     srcdir=..
485   fi
486 else
487   ac_srcdir_defaulted=no
488 fi
489 if test ! -r $srcdir/$ac_unique_file; then
490   if test "$ac_srcdir_defaulted" = yes; then
491     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
492   else
493     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
494   fi
495 fi
496 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
497
498 # Prefer explicitly selected file to automatically selected ones.
499 if test -z "$CONFIG_SITE"; then
500   if test "x$prefix" != xNONE; then
501     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
502   else
503     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
504   fi
505 fi
506 for ac_site_file in $CONFIG_SITE; do
507   if test -r "$ac_site_file"; then
508     echo "loading site script $ac_site_file"
509     . "$ac_site_file"
510   fi
511 done
512
513 if test -r "$cache_file"; then
514   echo "loading cache $cache_file"
515   . $cache_file
516 else
517   echo "creating cache $cache_file"
518   > $cache_file
519 fi
520
521 ac_ext=c
522 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
523 ac_cpp='$CPP $CPPFLAGS'
524 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
525 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
526 cross_compiling=$ac_cv_prog_cc_cross
527
528 ac_exeext=
529 ac_objext=o
530 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
531   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
532   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
533     ac_n= ac_c='
534 ' ac_t='        '
535   else
536     ac_n=-n ac_c= ac_t=
537   fi
538 else
539   ac_n= ac_c='\c' ac_t=
540 fi
541
542
543
544 ac_aux_dir=
545 for ac_dir in .. $srcdir/..; do
546   if test -f $ac_dir/install-sh; then
547     ac_aux_dir=$ac_dir
548     ac_install_sh="$ac_aux_dir/install-sh -c"
549     break
550   elif test -f $ac_dir/install.sh; then
551     ac_aux_dir=$ac_dir
552     ac_install_sh="$ac_aux_dir/install.sh -c"
553     break
554   fi
555 done
556 if test -z "$ac_aux_dir"; then
557   { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
558 fi
559 ac_config_guess=$ac_aux_dir/config.guess
560 ac_config_sub=$ac_aux_dir/config.sub
561 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
562
563
564
565 # Do some error checking and defaulting for the host and target type.
566 # The inputs are:
567 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
568 #
569 # The rules are:
570 # 1. You are not allowed to specify --host, --target, and nonopt at the
571 #    same time.
572 # 2. Host defaults to nonopt.
573 # 3. If nonopt is not specified, then host defaults to the current host,
574 #    as determined by config.guess.
575 # 4. Target and build default to nonopt.
576 # 5. If nonopt is not specified, then target and build default to host.
577
578 # The aliases save the names the user supplied, while $host etc.
579 # will get canonicalized.
580 case $host---$target---$nonopt in
581 NONE---*---* | *---NONE---* | *---*---NONE) ;;
582 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
583 esac
584
585
586 # Make sure we can run config.sub.
587 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
588 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
589 fi
590
591 echo $ac_n "checking host system type""... $ac_c" 1>&6
592 echo "configure:593: checking host system type" >&5
593
594 host_alias=$host
595 case "$host_alias" in
596 NONE)
597   case $nonopt in
598   NONE)
599     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
600     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
601     fi ;;
602   *) host_alias=$nonopt ;;
603   esac ;;
604 esac
605
606 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
607 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
608 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
609 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
610 echo "$ac_t""$host" 1>&6
611
612 echo $ac_n "checking target system type""... $ac_c" 1>&6
613 echo "configure:614: checking target system type" >&5
614
615 target_alias=$target
616 case "$target_alias" in
617 NONE)
618   case $nonopt in
619   NONE) target_alias=$host_alias ;;
620   *) target_alias=$nonopt ;;
621   esac ;;
622 esac
623
624 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
625 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628 echo "$ac_t""$target" 1>&6
629
630 echo $ac_n "checking build system type""... $ac_c" 1>&6
631 echo "configure:632: checking build system type" >&5
632
633 build_alias=$build
634 case "$build_alias" in
635 NONE)
636   case $nonopt in
637   NONE) build_alias=$host_alias ;;
638   *) build_alias=$nonopt ;;
639   esac ;;
640 esac
641
642 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
643 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646 echo "$ac_t""$build" 1>&6
647
648 test "$host_alias" != "$target_alias" &&
649   test "$program_prefix$program_suffix$program_transform_name" = \
650     NONENONEs,x,x, &&
651   program_prefix=${target_alias}-
652
653
654 # Check whether --with-target-subdir or --without-target-subdir was given.
655 if test "${with_target_subdir+set}" = set; then
656   withval="$with_target_subdir"
657   :
658 fi
659
660 # Check whether --with-cross-host or --without-cross-host was given.
661 if test "${with_cross_host+set}" = set; then
662   withval="$with_cross_host"
663   :
664 fi
665
666
667 # Find a good install program.  We prefer a C program (faster),
668 # so one script is as good as another.  But avoid the broken or
669 # incompatible versions:
670 # SysV /etc/install, /usr/sbin/install
671 # SunOS /usr/etc/install
672 # IRIX /sbin/install
673 # AIX /bin/install
674 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
675 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
676 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
677 # ./install, which can be erroneously created by make from ./install.sh.
678 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
679 echo "configure:680: checking for a BSD compatible install" >&5
680 if test -z "$INSTALL"; then
681 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
682   echo $ac_n "(cached) $ac_c" 1>&6
683 else
684     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
685   for ac_dir in $PATH; do
686     # Account for people who put trailing slashes in PATH elements.
687     case "$ac_dir/" in
688     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
689     *)
690       # OSF1 and SCO ODT 3.0 have their own names for install.
691       # Don't use installbsd from OSF since it installs stuff as root
692       # by default.
693       for ac_prog in ginstall scoinst install; do
694         if test -f $ac_dir/$ac_prog; then
695           if test $ac_prog = install &&
696             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
697             # AIX install.  It has an incompatible calling convention.
698             :
699           else
700             ac_cv_path_install="$ac_dir/$ac_prog -c"
701             break 2
702           fi
703         fi
704       done
705       ;;
706     esac
707   done
708   IFS="$ac_save_IFS"
709
710 fi
711   if test "${ac_cv_path_install+set}" = set; then
712     INSTALL="$ac_cv_path_install"
713   else
714     # As a last resort, use the slow shell script.  We don't cache a
715     # path for INSTALL within a source directory, because that will
716     # break other packages using the cache if that directory is
717     # removed, or if the path is relative.
718     INSTALL="$ac_install_sh"
719   fi
720 fi
721 echo "$ac_t""$INSTALL" 1>&6
722
723 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
724 # It thinks the first close brace ends the variable substitution.
725 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
726
727 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
728
729 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
730 echo "configure:731: checking whether build environment is sane" >&5
731 # Just in case
732 sleep 1
733 echo timestamp > conftestfile
734 # Do `set' in a subshell so we don't clobber the current shell's
735 # arguments.  Must try -L first in case configure is actually a
736 # symlink; some systems play weird games with the mod time of symlinks
737 # (eg FreeBSD returns the mod time of the symlink's containing
738 # directory).
739 if (
740    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
741    if test "$*" = "X"; then
742       # -L didn't work.
743       set X `ls -t $srcdir/configure conftestfile`
744    fi
745    if test "$*" != "X $srcdir/configure conftestfile" \
746       && test "$*" != "X conftestfile $srcdir/configure"; then
747
748       # If neither matched, then we have a broken ls.  This can happen
749       # if, for instance, CONFIG_SHELL is bash and it inherits a
750       # broken ls alias from the environment.  This has actually
751       # happened.  Such a system could not be considered "sane".
752       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
753 alias in your environment" 1>&2; exit 1; }
754    fi
755
756    test "$2" = conftestfile
757    )
758 then
759    # Ok.
760    :
761 else
762    { echo "configure: error: newly created file is older than distributed files!
763 Check your system clock" 1>&2; exit 1; }
764 fi
765 rm -f conftest*
766 echo "$ac_t""yes" 1>&6
767 if test "$program_transform_name" = s,x,x,; then
768   program_transform_name=
769 else
770   # Double any \ or $.  echo might interpret backslashes.
771   cat <<\EOF_SED > conftestsed
772 s,\\,\\\\,g; s,\$,$$,g
773 EOF_SED
774   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
775   rm -f conftestsed
776 fi
777 test "$program_prefix" != NONE &&
778   program_transform_name="s,^,${program_prefix},; $program_transform_name"
779 # Use a double $ so make ignores it.
780 test "$program_suffix" != NONE &&
781   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
782
783 # sed with no file args requires a program.
784 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
785
786 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
787 echo "configure:788: checking whether ${MAKE-make} sets \${MAKE}" >&5
788 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
789 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   cat > conftestmake <<\EOF
793 all:
794         @echo 'ac_maketemp="${MAKE}"'
795 EOF
796 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
797 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
798 if test -n "$ac_maketemp"; then
799   eval ac_cv_prog_make_${ac_make}_set=yes
800 else
801   eval ac_cv_prog_make_${ac_make}_set=no
802 fi
803 rm -f conftestmake
804 fi
805 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
806   echo "$ac_t""yes" 1>&6
807   SET_MAKE=
808 else
809   echo "$ac_t""no" 1>&6
810   SET_MAKE="MAKE=${MAKE-make}"
811 fi
812
813 if test $host != $build; then
814   ac_tool_prefix=${host_alias}-
815 else
816   ac_tool_prefix=
817 fi
818
819 echo $ac_n "checking for cygwin32 environment""... $ac_c" 1>&6
820 echo "configure:821: checking for cygwin32 environment" >&5
821 if eval "test \"`echo '$''{'ac_cv_cygwin32'+set}'`\" = set"; then
822   echo $ac_n "(cached) $ac_c" 1>&6
823 else
824   cat > conftest.$ac_ext <<EOF
825 #line 826 "configure"
826 #include "confdefs.h"
827
828 int main() {
829 return __CYGWIN32__;
830 ; return 0; }
831 EOF
832 if { (eval echo configure:833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
833   rm -rf conftest*
834   ac_cv_cygwin32=yes
835 else
836   echo "configure: failed program was:" >&5
837   cat conftest.$ac_ext >&5
838   rm -rf conftest*
839   ac_cv_cygwin32=no
840 fi
841 rm -f conftest*
842 rm -f conftest*
843 fi
844
845 echo "$ac_t""$ac_cv_cygwin32" 1>&6
846 CYGWIN32=
847 test "$ac_cv_cygwin32" = yes && CYGWIN32=yes
848 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
849 echo "configure:850: checking for mingw32 environment" >&5
850 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
851   echo $ac_n "(cached) $ac_c" 1>&6
852 else
853   cat > conftest.$ac_ext <<EOF
854 #line 855 "configure"
855 #include "confdefs.h"
856
857 int main() {
858 return __MINGW32__;
859 ; return 0; }
860 EOF
861 if { (eval echo configure:862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
862   rm -rf conftest*
863   ac_cv_mingw32=yes
864 else
865   echo "configure: failed program was:" >&5
866   cat conftest.$ac_ext >&5
867   rm -rf conftest*
868   ac_cv_mingw32=no
869 fi
870 rm -f conftest*
871 rm -f conftest*
872 fi
873
874 echo "$ac_t""$ac_cv_mingw32" 1>&6
875 MINGW32=
876 test "$ac_cv_mingw32" = yes && MINGW32=yes
877
878 # Check whether --enable-multilib or --disable-multilib was given.
879 if test "${enable_multilib+set}" = set; then
880   enableval="$enable_multilib"
881   case "${enableval}" in
882   yes) multilib=yes ;;
883   no)  multilib=no ;;
884   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
885  esac
886 else
887   multilib=yes
888 fi
889
890
891 if test "${srcdir}" = "."; then
892   if test "${with_target_subdir}" != "."; then
893     libgcj_basedir="${srcdir}/${with_multisrctop}../."
894   else
895     libgcj_basedir="${srcdir}/${with_multisrctop}."
896   fi
897 else
898   libgcj_basedir="${srcdir}/."
899 fi
900
901
902
903 # Make sure we can run config.sub.
904 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
905 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
906 fi
907
908 echo $ac_n "checking host system type""... $ac_c" 1>&6
909 echo "configure:910: checking host system type" >&5
910
911 host_alias=$host
912 case "$host_alias" in
913 NONE)
914   case $nonopt in
915   NONE)
916     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
917     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
918     fi ;;
919   *) host_alias=$nonopt ;;
920   esac ;;
921 esac
922
923 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
924 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
925 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
926 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
927 echo "$ac_t""$host" 1>&6
928
929
930
931 PACKAGE=libjava
932
933 VERSION=0.0.7
934
935 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
936   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
937 fi
938 cat >> confdefs.h <<EOF
939 #define PACKAGE 1
940 EOF
941
942 cat >> confdefs.h <<EOF
943 #define VERSION 1
944 EOF
945
946
947
948 missing_dir=`cd $ac_aux_dir && pwd`
949 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
950 echo "configure:951: checking for working aclocal" >&5
951 # Run test in a subshell; some versions of sh will print an error if
952 # an executable is not found, even if stderr is redirected.
953 # Redirect stdin to placate older versions of autoconf.  Sigh.
954 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
955    ACLOCAL=aclocal
956    echo "$ac_t""found" 1>&6
957 else
958    ACLOCAL="$missing_dir/missing aclocal"
959    echo "$ac_t""missing" 1>&6
960 fi
961
962 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
963 echo "configure:964: checking for working autoconf" >&5
964 # Run test in a subshell; some versions of sh will print an error if
965 # an executable is not found, even if stderr is redirected.
966 # Redirect stdin to placate older versions of autoconf.  Sigh.
967 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
968    AUTOCONF=autoconf
969    echo "$ac_t""found" 1>&6
970 else
971    AUTOCONF="$missing_dir/missing autoconf"
972    echo "$ac_t""missing" 1>&6
973 fi
974
975 echo $ac_n "checking for working automake""... $ac_c" 1>&6
976 echo "configure:977: checking for working automake" >&5
977 # Run test in a subshell; some versions of sh will print an error if
978 # an executable is not found, even if stderr is redirected.
979 # Redirect stdin to placate older versions of autoconf.  Sigh.
980 if (automake --version) < /dev/null > /dev/null 2>&1; then
981    AUTOMAKE=automake
982    echo "$ac_t""found" 1>&6
983 else
984    AUTOMAKE="$missing_dir/missing automake"
985    echo "$ac_t""missing" 1>&6
986 fi
987
988 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
989 echo "configure:990: checking for working autoheader" >&5
990 # Run test in a subshell; some versions of sh will print an error if
991 # an executable is not found, even if stderr is redirected.
992 # Redirect stdin to placate older versions of autoconf.  Sigh.
993 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
994    AUTOHEADER=autoheader
995    echo "$ac_t""found" 1>&6
996 else
997    AUTOHEADER="$missing_dir/missing autoheader"
998    echo "$ac_t""missing" 1>&6
999 fi
1000
1001 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1002 echo "configure:1003: checking for working makeinfo" >&5
1003 # Run test in a subshell; some versions of sh will print an error if
1004 # an executable is not found, even if stderr is redirected.
1005 # Redirect stdin to placate older versions of autoconf.  Sigh.
1006 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1007    MAKEINFO=makeinfo
1008    echo "$ac_t""found" 1>&6
1009 else
1010    MAKEINFO="$missing_dir/missing makeinfo"
1011    echo "$ac_t""missing" 1>&6
1012 fi
1013
1014
1015
1016 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
1017 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
1018 # are probably using a cross compiler, which will not be able to fully
1019 # link an executable.  This should really be fixed in autoconf
1020 # itself.
1021
1022
1023
1024 # Extract the first word of "gcc", so it can be a program name with args.
1025 set dummy gcc; ac_word=$2
1026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1027 echo "configure:1028: checking for $ac_word" >&5
1028 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1029   echo $ac_n "(cached) $ac_c" 1>&6
1030 else
1031   if test -n "$CC"; then
1032   ac_cv_prog_CC="$CC" # Let the user override the test.
1033 else
1034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1035   for ac_dir in $PATH; do
1036     test -z "$ac_dir" && ac_dir=.
1037     if test -f $ac_dir/$ac_word; then
1038       ac_cv_prog_CC="gcc"
1039       break
1040     fi
1041   done
1042   IFS="$ac_save_ifs"
1043 fi
1044 fi
1045 CC="$ac_cv_prog_CC"
1046 if test -n "$CC"; then
1047   echo "$ac_t""$CC" 1>&6
1048 else
1049   echo "$ac_t""no" 1>&6
1050 fi
1051
1052 if test -z "$CC"; then
1053   # Extract the first word of "cc", so it can be a program name with args.
1054 set dummy cc; ac_word=$2
1055 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1056 echo "configure:1057: checking for $ac_word" >&5
1057 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1058   echo $ac_n "(cached) $ac_c" 1>&6
1059 else
1060   if test -n "$CC"; then
1061   ac_cv_prog_CC="$CC" # Let the user override the test.
1062 else
1063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1064   ac_prog_rejected=no
1065   for ac_dir in $PATH; do
1066     test -z "$ac_dir" && ac_dir=.
1067     if test -f $ac_dir/$ac_word; then
1068       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1069         ac_prog_rejected=yes
1070         continue
1071       fi
1072       ac_cv_prog_CC="cc"
1073       break
1074     fi
1075   done
1076   IFS="$ac_save_ifs"
1077 if test $ac_prog_rejected = yes; then
1078   # We found a bogon in the path, so make sure we never use it.
1079   set dummy $ac_cv_prog_CC
1080   shift
1081   if test $# -gt 0; then
1082     # We chose a different compiler from the bogus one.
1083     # However, it has the same basename, so the bogon will be chosen
1084     # first if we set CC to just the basename; use the full file name.
1085     shift
1086     set dummy "$ac_dir/$ac_word" "$@"
1087     shift
1088     ac_cv_prog_CC="$@"
1089   fi
1090 fi
1091 fi
1092 fi
1093 CC="$ac_cv_prog_CC"
1094 if test -n "$CC"; then
1095   echo "$ac_t""$CC" 1>&6
1096 else
1097   echo "$ac_t""no" 1>&6
1098 fi
1099
1100   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1101 fi
1102
1103 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether we are using GNU C" >&5
1105 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1106   echo $ac_n "(cached) $ac_c" 1>&6
1107 else
1108   cat > conftest.c <<EOF
1109 #ifdef __GNUC__
1110   yes;
1111 #endif
1112 EOF
1113 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1114   ac_cv_prog_gcc=yes
1115 else
1116   ac_cv_prog_gcc=no
1117 fi
1118 fi
1119
1120 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1121
1122 if test $ac_cv_prog_gcc = yes; then
1123   GCC=yes
1124   ac_test_CFLAGS="${CFLAGS+set}"
1125   ac_save_CFLAGS="$CFLAGS"
1126   CFLAGS=
1127   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1128 echo "configure:1129: checking whether ${CC-cc} accepts -g" >&5
1129 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1130   echo $ac_n "(cached) $ac_c" 1>&6
1131 else
1132   echo 'void f(){}' > conftest.c
1133 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1134   ac_cv_prog_cc_g=yes
1135 else
1136   ac_cv_prog_cc_g=no
1137 fi
1138 rm -f conftest*
1139
1140 fi
1141
1142 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1143   if test "$ac_test_CFLAGS" = set; then
1144     CFLAGS="$ac_save_CFLAGS"
1145   elif test $ac_cv_prog_cc_g = yes; then
1146     CFLAGS="-g -O2"
1147   else
1148     CFLAGS="-O2"
1149   fi
1150 else
1151   GCC=
1152   test "${CFLAGS+set}" = set || CFLAGS="-g"
1153 fi
1154
1155
1156 # Likewise for AC_PROG_CXX.
1157
1158
1159 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1160 do
1161 # Extract the first word of "$ac_prog", so it can be a program name with args.
1162 set dummy $ac_prog; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1166   echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168   if test -n "$CXX"; then
1169   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1170 else
1171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1172   for ac_dir in $PATH; do
1173     test -z "$ac_dir" && ac_dir=.
1174     if test -f $ac_dir/$ac_word; then
1175       ac_cv_prog_CXX="$ac_prog"
1176       break
1177     fi
1178   done
1179   IFS="$ac_save_ifs"
1180 fi
1181 fi
1182 CXX="$ac_cv_prog_CXX"
1183 if test -n "$CXX"; then
1184   echo "$ac_t""$CXX" 1>&6
1185 else
1186   echo "$ac_t""no" 1>&6
1187 fi
1188
1189 test -n "$CXX" && break
1190 done
1191 test -n "$CXX" || CXX="gcc"
1192
1193 test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1194
1195 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether we are using GNU C++" >&5
1197 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   cat > conftest.C <<EOF
1201 #ifdef __GNUC__
1202   yes;
1203 #endif
1204 EOF
1205 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1206   ac_cv_prog_gxx=yes
1207 else
1208   ac_cv_prog_gxx=no
1209 fi
1210 fi
1211
1212 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1213
1214 if test $ac_cv_prog_gxx = yes; then
1215   GXX=yes
1216   ac_test_CXXFLAGS="${CXXFLAGS+set}"
1217   ac_save_CXXFLAGS="$CXXFLAGS"
1218   CXXFLAGS=
1219   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1220 echo "configure:1221: checking whether ${CXX-g++} accepts -g" >&5
1221 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1222   echo $ac_n "(cached) $ac_c" 1>&6
1223 else
1224   echo 'void f(){}' > conftest.cc
1225 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1226   ac_cv_prog_cxx_g=yes
1227 else
1228   ac_cv_prog_cxx_g=no
1229 fi
1230 rm -f conftest*
1231
1232 fi
1233
1234 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1235   if test "$ac_test_CXXFLAGS" = set; then
1236     CXXFLAGS="$ac_save_CXXFLAGS"
1237   elif test $ac_cv_prog_cxx_g = yes; then
1238     CXXFLAGS="-g -O2"
1239   else
1240     CXXFLAGS="-O2"
1241   fi
1242 else
1243   GXX=
1244   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1245 fi
1246
1247
1248 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we dont
1249 # run it explicitly here, it will be run implicitly before
1250 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1251 # be run before AC_CANONICAL_HOST.
1252 echo $ac_n "checking build system type""... $ac_c" 1>&6
1253 echo "configure:1254: checking build system type" >&5
1254
1255 build_alias=$build
1256 case "$build_alias" in
1257 NONE)
1258   case $nonopt in
1259   NONE) build_alias=$host_alias ;;
1260   *) build_alias=$nonopt ;;
1261   esac ;;
1262 esac
1263
1264 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1265 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1266 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1267 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1268 echo "$ac_t""$build" 1>&6
1269
1270
1271 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1272 set dummy ${ac_tool_prefix}as; ac_word=$2
1273 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1274 echo "configure:1275: checking for $ac_word" >&5
1275 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1276   echo $ac_n "(cached) $ac_c" 1>&6
1277 else
1278   if test -n "$AS"; then
1279   ac_cv_prog_AS="$AS" # Let the user override the test.
1280 else
1281   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1282   for ac_dir in $PATH; do
1283     test -z "$ac_dir" && ac_dir=.
1284     if test -f $ac_dir/$ac_word; then
1285       ac_cv_prog_AS="${ac_tool_prefix}as"
1286       break
1287     fi
1288   done
1289   IFS="$ac_save_ifs"
1290   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1291 fi
1292 fi
1293 AS="$ac_cv_prog_AS"
1294 if test -n "$AS"; then
1295   echo "$ac_t""$AS" 1>&6
1296 else
1297   echo "$ac_t""no" 1>&6
1298 fi
1299
1300
1301
1302 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1303 set dummy ${ac_tool_prefix}ar; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   if test -n "$AR"; then
1310   ac_cv_prog_AR="$AR" # Let the user override the test.
1311 else
1312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1313   for ac_dir in $PATH; do
1314     test -z "$ac_dir" && ac_dir=.
1315     if test -f $ac_dir/$ac_word; then
1316       ac_cv_prog_AR="${ac_tool_prefix}ar"
1317       break
1318     fi
1319   done
1320   IFS="$ac_save_ifs"
1321   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1322 fi
1323 fi
1324 AR="$ac_cv_prog_AR"
1325 if test -n "$AR"; then
1326   echo "$ac_t""$AR" 1>&6
1327 else
1328   echo "$ac_t""no" 1>&6
1329 fi
1330
1331
1332
1333 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1334 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1335 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1336 echo "configure:1337: checking for $ac_word" >&5
1337 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1338   echo $ac_n "(cached) $ac_c" 1>&6
1339 else
1340   if test -n "$RANLIB"; then
1341   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1342 else
1343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1344   for ac_dir in $PATH; do
1345     test -z "$ac_dir" && ac_dir=.
1346     if test -f $ac_dir/$ac_word; then
1347       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1348       break
1349     fi
1350   done
1351   IFS="$ac_save_ifs"
1352 fi
1353 fi
1354 RANLIB="$ac_cv_prog_RANLIB"
1355 if test -n "$RANLIB"; then
1356   echo "$ac_t""$RANLIB" 1>&6
1357 else
1358   echo "$ac_t""no" 1>&6
1359 fi
1360
1361
1362 if test -z "$ac_cv_prog_RANLIB"; then
1363 if test -n "$ac_tool_prefix"; then
1364   # Extract the first word of "ranlib", so it can be a program name with args.
1365 set dummy ranlib; ac_word=$2
1366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1367 echo "configure:1368: checking for $ac_word" >&5
1368 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1369   echo $ac_n "(cached) $ac_c" 1>&6
1370 else
1371   if test -n "$RANLIB"; then
1372   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1373 else
1374   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1375   for ac_dir in $PATH; do
1376     test -z "$ac_dir" && ac_dir=.
1377     if test -f $ac_dir/$ac_word; then
1378       ac_cv_prog_RANLIB="ranlib"
1379       break
1380     fi
1381   done
1382   IFS="$ac_save_ifs"
1383   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1384 fi
1385 fi
1386 RANLIB="$ac_cv_prog_RANLIB"
1387 if test -n "$RANLIB"; then
1388   echo "$ac_t""$RANLIB" 1>&6
1389 else
1390   echo "$ac_t""no" 1>&6
1391 fi
1392
1393 else
1394   RANLIB=":"
1395 fi
1396 fi
1397
1398
1399 # Find a good install program.  We prefer a C program (faster),
1400 # so one script is as good as another.  But avoid the broken or
1401 # incompatible versions:
1402 # SysV /etc/install, /usr/sbin/install
1403 # SunOS /usr/etc/install
1404 # IRIX /sbin/install
1405 # AIX /bin/install
1406 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1407 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1408 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1409 # ./install, which can be erroneously created by make from ./install.sh.
1410 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1411 echo "configure:1412: checking for a BSD compatible install" >&5
1412 if test -z "$INSTALL"; then
1413 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1414   echo $ac_n "(cached) $ac_c" 1>&6
1415 else
1416     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1417   for ac_dir in $PATH; do
1418     # Account for people who put trailing slashes in PATH elements.
1419     case "$ac_dir/" in
1420     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1421     *)
1422       # OSF1 and SCO ODT 3.0 have their own names for install.
1423       # Don't use installbsd from OSF since it installs stuff as root
1424       # by default.
1425       for ac_prog in ginstall scoinst install; do
1426         if test -f $ac_dir/$ac_prog; then
1427           if test $ac_prog = install &&
1428             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1429             # AIX install.  It has an incompatible calling convention.
1430             :
1431           else
1432             ac_cv_path_install="$ac_dir/$ac_prog -c"
1433             break 2
1434           fi
1435         fi
1436       done
1437       ;;
1438     esac
1439   done
1440   IFS="$ac_save_IFS"
1441
1442 fi
1443   if test "${ac_cv_path_install+set}" = set; then
1444     INSTALL="$ac_cv_path_install"
1445   else
1446     # As a last resort, use the slow shell script.  We don't cache a
1447     # path for INSTALL within a source directory, because that will
1448     # break other packages using the cache if that directory is
1449     # removed, or if the path is relative.
1450     INSTALL="$ac_install_sh"
1451   fi
1452 fi
1453 echo "$ac_t""$INSTALL" 1>&6
1454
1455 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1456 # It thinks the first close brace ends the variable substitution.
1457 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1458
1459 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1460
1461
1462 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1463 echo "configure:1464: checking whether to enable maintainer-specific portions of Makefiles" >&5
1464     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1465 if test "${enable_maintainer_mode+set}" = set; then
1466   enableval="$enable_maintainer_mode"
1467   USE_MAINTAINER_MODE=$enableval
1468 else
1469   USE_MAINTAINER_MODE=no
1470 fi
1471
1472   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1473   
1474
1475 if test $USE_MAINTAINER_MODE = yes; then
1476   MAINTAINER_MODE_TRUE=
1477   MAINTAINER_MODE_FALSE='#'
1478 else
1479   MAINTAINER_MODE_TRUE='#'
1480   MAINTAINER_MODE_FALSE=
1481 fi
1482   MAINT=$MAINTAINER_MODE_TRUE
1483   
1484
1485
1486 # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
1487 # at least currently, we never actually build a program, so we never
1488 # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
1489 # fails, because we are probably configuring with a cross compiler
1490 # which cant create executables.  So we include AC_EXEEXT to keep
1491 # automake happy, but we dont execute it, since we dont care about
1492 # the result.
1493 if false; then
1494   
1495
1496 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1497 echo "configure:1498: checking for executable suffix" >&5
1498 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1499   echo $ac_n "(cached) $ac_c" 1>&6
1500 else
1501   if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
1502   ac_cv_exeext=.exe
1503 else
1504   rm -f conftest*
1505   echo 'int main () { return 0; }' > conftest.$ac_ext
1506   ac_cv_exeext=
1507   if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1508     for file in conftest.*; do
1509       case $file in
1510       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1511       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1512       esac
1513     done
1514   else
1515     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1516   fi
1517   rm -f conftest*
1518   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1519 fi
1520 fi
1521
1522 EXEEXT=""
1523 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1524 echo "$ac_t""${ac_cv_exeext}" 1>&6
1525 ac_exeext=$EXEEXT
1526
1527 fi
1528
1529 # configure.host sets the following important variables
1530 #       libgcj_cflags    - host specific C compiler flags
1531 #       libgcj_cxxflags  - host specific C++ compiler flags
1532 #       libgcj_javaflags - host specific Java compiler flags
1533
1534 libgcj_cflags=
1535 libgcj_cxxflags=
1536 libgcj_javaflags=
1537
1538 . ${libgcj_basedir}/configure.host
1539
1540 case ${libgcj_basedir} in
1541 /* | A-Za-z:/\\*) libgcj_flagbasedir=${libgcj_basedir} ;;
1542 *) libgcj_flagbasedir='$(top_builddir)/'${libgcj_basedir} ;;
1543 esac
1544
1545 LIBGCJ_CFLAGS="${libgcj_cflags}"
1546 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1547 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
1558    COMPPATH=.
1559 else
1560    COMPPATH=..
1561 fi
1562
1563
1564
1565
1566 if test -d $srcdir/testsuite; then
1567   TESTSUBDIR_TRUE=
1568   TESTSUBDIR_FALSE='#'
1569 else
1570   TESTSUBDIR_TRUE='#'
1571   TESTSUBDIR_FALSE=
1572 fi
1573
1574 # Check whether --enable-fast-character or --disable-fast-character was given.
1575 if test "${enable_fast_character+set}" = set; then
1576   enableval="$enable_fast_character"
1577   # Nothing
1578
1579 else
1580   cat >> confdefs.h <<\EOF
1581 #define COMPACT_CHARACTER 1
1582 EOF
1583
1584 fi
1585
1586
1587 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
1588 if test "${enable_libgcj_debug+set}" = set; then
1589   enableval="$enable_libgcj_debug"
1590   if test "$enable_libgcj_debug" = yes; then
1591      cat >> confdefs.h <<\EOF
1592 #define DEBUG 1
1593 EOF
1594
1595   fi
1596 fi
1597
1598
1599 TARGET_ECOS="no"
1600 # Check whether --with-ecos or --without-ecos was given.
1601 if test "${with_ecos+set}" = set; then
1602   withval="$with_ecos"
1603   TARGET_ECOS="$with_ecos"
1604
1605 fi
1606
1607
1608 case "$TARGET_ECOS" in
1609    no)
1610       FILE_DESCRIPTOR=natFileDescriptorPosix.cc
1611       ;;
1612    *)
1613       FILE_DESCRIPTOR=natFileDescriptorEcos.cc
1614       cat >> confdefs.h <<\EOF
1615 #define ECOS 1
1616 EOF
1617
1618       ;;
1619 esac
1620
1621 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1622 echo "configure:1623: checking how to run the C preprocessor" >&5
1623 # On Suns, sometimes $CPP names a directory.
1624 if test -n "$CPP" && test -d "$CPP"; then
1625   CPP=
1626 fi
1627 if test -z "$CPP"; then
1628 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1629   echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631     # This must be in double quotes, not single quotes, because CPP may get
1632   # substituted into the Makefile and "${CC-cc}" will confuse make.
1633   CPP="${CC-cc} -E"
1634   # On the NeXT, cc -E runs the code through the compiler's parser,
1635   # not just through cpp.
1636   cat > conftest.$ac_ext <<EOF
1637 #line 1638 "configure"
1638 #include "confdefs.h"
1639 #include <assert.h>
1640 Syntax Error
1641 EOF
1642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1643 { (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1645 if test -z "$ac_err"; then
1646   :
1647 else
1648   echo "$ac_err" >&5
1649   echo "configure: failed program was:" >&5
1650   cat conftest.$ac_ext >&5
1651   rm -rf conftest*
1652   CPP="${CC-cc} -E -traditional-cpp"
1653   cat > conftest.$ac_ext <<EOF
1654 #line 1655 "configure"
1655 #include "confdefs.h"
1656 #include <assert.h>
1657 Syntax Error
1658 EOF
1659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1660 { (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1662 if test -z "$ac_err"; then
1663   :
1664 else
1665   echo "$ac_err" >&5
1666   echo "configure: failed program was:" >&5
1667   cat conftest.$ac_ext >&5
1668   rm -rf conftest*
1669   CPP="${CC-cc} -nologo -E"
1670   cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include <assert.h>
1674 Syntax Error
1675 EOF
1676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1677 { (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1679 if test -z "$ac_err"; then
1680   :
1681 else
1682   echo "$ac_err" >&5
1683   echo "configure: failed program was:" >&5
1684   cat conftest.$ac_ext >&5
1685   rm -rf conftest*
1686   CPP=/lib/cpp
1687 fi
1688 rm -f conftest*
1689 fi
1690 rm -f conftest*
1691 fi
1692 rm -f conftest*
1693   ac_cv_prog_CPP="$CPP"
1694 fi
1695   CPP="$ac_cv_prog_CPP"
1696 else
1697   ac_cv_prog_CPP="$CPP"
1698 fi
1699 echo "$ac_t""$CPP" 1>&6
1700
1701 cat > conftest.$ac_ext <<EOF
1702 #line 1703 "configure"
1703 #include "confdefs.h"
1704 #include <sys/types.h>
1705 EOF
1706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1707   egrep "__uint32_t" >/dev/null 2>&1; then
1708   rm -rf conftest*
1709   cat >> confdefs.h <<\EOF
1710 #define HAVE_INT32_DEFINED 1
1711 EOF
1712
1713 fi
1714 rm -f conftest*
1715
1716 cat > conftest.$ac_ext <<EOF
1717 #line 1718 "configure"
1718 #include "confdefs.h"
1719 #include <sys/config.h>
1720 EOF
1721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1722   egrep "__uint32_t" >/dev/null 2>&1; then
1723   rm -rf conftest*
1724   cat >> confdefs.h <<\EOF
1725 #define HAVE_INT32_DEFINED 1
1726 EOF
1727
1728 fi
1729 rm -f conftest*
1730
1731
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1734 "configure"
1734 #include "confdefs.h"
1735 #include <time.h>
1736 EOF
1737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1738   egrep "mktime" >/dev/null 2>&1; then
1739   rm -rf conftest*
1740   cat >> confdefs.h <<\EOF
1741 #define HAVE_MKTIME 1
1742 EOF
1743
1744 fi
1745 rm -f conftest*
1746
1747 cat > conftest.$ac_ext <<EOF
1748 #line 1749 "configure"
1749 #include "confdefs.h"
1750 #include <time.h>
1751 EOF
1752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1753   egrep "localtime" >/dev/null 2>&1; then
1754   rm -rf conftest*
1755   cat >> confdefs.h <<\EOF
1756 #define HAVE_LOCALTIME 1
1757 EOF
1758
1759 fi
1760 rm -f conftest*
1761
1762
1763 test -d java || mkdir java
1764 test -d java/io || mkdir java/io
1765
1766
1767 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
1768 echo "configure:1769: checking for garbage collector to use" >&5
1769 # Check whether --enable-java-gc or --disable-java-gc was given.
1770 if test "${enable_java_gc+set}" = set; then
1771   enableval="$enable_java_gc"
1772   
1773   GC=$enableval
1774 else
1775   GC=boehm
1776 fi
1777
1778 GCLIBS=
1779 GCINCS=
1780 GCDEPS=
1781 GCOBJS=
1782 case "$GC" in
1783  boehm)
1784     echo "$ac_t""boehm" 1>&6
1785     GCLIBS='-L$(top_builddir)/../boehm-gc -lgcjgc'
1786     GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.a'
1787     GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
1788             GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
1789     GCOBJS=boehm.o
1790     GCHDR=boehm-gc.h
1791         cat >> confdefs.h <<\EOF
1792 #define HAVE_BOEHM_GC 1
1793 EOF
1794
1795     ;;
1796  no)
1797     echo "$ac_t""none" 1>&6
1798     GCOBJS=nogc.o
1799     GCHDR=no-gc.h
1800     ;;
1801  *)
1802     { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
1803     ;;
1804 esac
1805
1806
1807
1808
1809
1810
1811
1812 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
1813 echo "configure:1814: checking for threads package to use" >&5
1814 # Check whether --enable-threads or --disable-threads was given.
1815 if test "${enable_threads+set}" = set; then
1816   enableval="$enable_threads"
1817   THREADS=$enableval
1818 else
1819     THREADS=no
1820 fi
1821
1822
1823 if test "$THREADS" = yes; then
1824    case "$host" in
1825     *-*-vxworks*)
1826        THREADS=vxworks
1827        ;;
1828     *-*-linux*)
1829        # FIXME: this isn't correct in all cases.
1830        THREADS=posix
1831        ;;
1832     *-*-win*)
1833        THREADS=win32
1834        ;;
1835     *-*-irix*)
1836        THREADS=irix
1837        ;;
1838     *-*-solaris*)
1839        # FIXME: for now, choose POSIX, because we implement that.
1840        # Later, choose solaris threads.
1841        THREADS=posix
1842        ;;
1843     *)
1844        # For now.
1845        THREADS=none
1846        ;;
1847    esac
1848 fi
1849
1850 case "$THREADS" in
1851  no | none | single)
1852     THREADS=none
1853     ;;
1854  posix | pthreads)
1855     THREADS=posix
1856     case "$host" in
1857      *-*-linux*)
1858         cat >> confdefs.h <<\EOF
1859 #define LINUX_THREADS 1
1860 EOF
1861
1862         ;;
1863     esac
1864     ;;
1865  qt)
1866     ;;
1867  decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
1868     { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
1869     ;;
1870  *)
1871     { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
1872     ;;
1873 esac
1874 echo "$ac_t""$THREADS" 1>&6
1875
1876 THREADLIBS=
1877 THREADINCS=
1878 THREADDEPS=
1879 THREADOBJS=
1880 THREADH=
1881 case "$THREADS" in
1882  posix)
1883     THREADLIBS=-lpthread
1884     THREADOBJS=posix-threads.o
1885     THREADH=posix-threads.h
1886     # MIT pthreads doesn't seem to have the mutexattr functions.
1887     # But for now we don't check for it.  We just assume you aren't
1888     # using MIT pthreads.
1889     cat >> confdefs.h <<\EOF
1890 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
1891 EOF
1892
1893     ;;
1894
1895  qt)
1896     THREADLIBS='-L$(top_builddir)/../qthreads -lgcjcoop'
1897     THREADOBJS=quick-threads.o
1898     THREADINCS='-I$(top_srcdir)/../qthreads'
1899     THREADH=quick-threads.h
1900     THREADDEPS='$(top_builddir)/../qthreads/libgcjcoop.a'
1901     ;;
1902
1903  none)
1904     THREADOBJS=no-threads.o
1905     THREADH=no-threads.h
1906     ;;
1907 esac
1908
1909
1910
1911
1912
1913
1914
1915
1916 if test "$GCC" = yes; then
1917   USING_GCC_TRUE=
1918   USING_GCC_FALSE='#'
1919 else
1920   USING_GCC_TRUE='#'
1921   USING_GCC_FALSE=
1922 fi
1923
1924 CANADIAN=no
1925 NULL_TARGET=no
1926
1927 # Find eh-common.h and support headers.  If we're in the tree with
1928 # gcc, then look there.  Otherwise look in compat-include.  If all else
1929 # fails, just hope the user has set things up somehow.
1930 if test -r $srcdir/../gcc/eh-common.h; then
1931    EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
1932 else
1933    if test -d $srcdir/../compat-include; then
1934       EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
1935    else
1936       EH_COMMON_INCLUDE=
1937    fi
1938 fi
1939
1940 if test -n "${with_cross_host}"; then
1941    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
1942    # may not work correctly, because the compiler may not be able to
1943    # link executables.
1944
1945    # We assume newlib.  This lets us hard-code the functions we know
1946    # we'll have.
1947    cat >> confdefs.h <<\EOF
1948 #define HAVE_MEMMOVE 1
1949 EOF
1950
1951    cat >> confdefs.h <<\EOF
1952 #define HAVE_MEMCPY 1
1953 EOF
1954
1955    cat >> confdefs.h <<\EOF
1956 #define HAVE_STRERROR 1
1957 EOF
1958
1959    cat >> confdefs.h <<\EOF
1960 #define HAVE_CTIME_R 1
1961 EOF
1962
1963    cat >> confdefs.h <<\EOF
1964 #define HAVE_GMTIME_R 1
1965 EOF
1966
1967    cat >> confdefs.h <<\EOF
1968 #define HAVE_LOCALTIME_R 1
1969 EOF
1970
1971       cat >> confdefs.h <<\EOF
1972 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
1973 EOF
1974
1975       cat >> confdefs.h <<\EOF
1976 #define HAVE_ALLOCA 1
1977 EOF
1978
1979
1980    # If Canadian cross, then don't pick up tools from the build
1981    # directory.
1982    if test "$build" != "$with_cross_host"; then
1983       CANADIAN=yes
1984       EH_COMMON_INCLUDE=
1985    fi
1986 else
1987    # Some POSIX thread systems don't have pthread_mutexattr_settype.
1988    # E.g., Solaris.
1989    for ac_func in strerror ioctl select open fsync sleep
1990 do
1991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1992 echo "configure:1993: checking for $ac_func" >&5
1993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1994   echo $ac_n "(cached) $ac_c" 1>&6
1995 else
1996   cat > conftest.$ac_ext <<EOF
1997 #line 1998 "configure"
1998 #include "confdefs.h"
1999 /* System header to define __stub macros and hopefully few prototypes,
2000     which can conflict with char $ac_func(); below.  */
2001 #include <assert.h>
2002 /* Override any gcc2 internal prototype to avoid an error.  */
2003 /* We use char because int might match the return type of a gcc2
2004     builtin and then its argument prototype would still apply.  */
2005 char $ac_func();
2006
2007 int main() {
2008
2009 /* The GNU C library defines this for functions which it implements
2010     to always fail with ENOSYS.  Some functions are actually named
2011     something starting with __ and the normal name is an alias.  */
2012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2013 choke me
2014 #else
2015 $ac_func();
2016 #endif
2017
2018 ; return 0; }
2019 EOF
2020 if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2021   rm -rf conftest*
2022   eval "ac_cv_func_$ac_func=yes"
2023 else
2024   echo "configure: failed program was:" >&5
2025   cat conftest.$ac_ext >&5
2026   rm -rf conftest*
2027   eval "ac_cv_func_$ac_func=no"
2028 fi
2029 rm -f conftest*
2030 fi
2031
2032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2033   echo "$ac_t""yes" 1>&6
2034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2035   cat >> confdefs.h <<EOF
2036 #define $ac_tr_func 1
2037 EOF
2038  
2039 else
2040   echo "$ac_t""no" 1>&6
2041 fi
2042 done
2043
2044    for ac_func in ctime_r ctime
2045 do
2046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_func" >&5
2048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2049   echo $ac_n "(cached) $ac_c" 1>&6
2050 else
2051   cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 /* System header to define __stub macros and hopefully few prototypes,
2055     which can conflict with char $ac_func(); below.  */
2056 #include <assert.h>
2057 /* Override any gcc2 internal prototype to avoid an error.  */
2058 /* We use char because int might match the return type of a gcc2
2059     builtin and then its argument prototype would still apply.  */
2060 char $ac_func();
2061
2062 int main() {
2063
2064 /* The GNU C library defines this for functions which it implements
2065     to always fail with ENOSYS.  Some functions are actually named
2066     something starting with __ and the normal name is an alias.  */
2067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2068 choke me
2069 #else
2070 $ac_func();
2071 #endif
2072
2073 ; return 0; }
2074 EOF
2075 if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2076   rm -rf conftest*
2077   eval "ac_cv_func_$ac_func=yes"
2078 else
2079   echo "configure: failed program was:" >&5
2080   cat conftest.$ac_ext >&5
2081   rm -rf conftest*
2082   eval "ac_cv_func_$ac_func=no"
2083 fi
2084 rm -f conftest*
2085 fi
2086
2087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2088   echo "$ac_t""yes" 1>&6
2089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2090   cat >> confdefs.h <<EOF
2091 #define $ac_tr_func 1
2092 EOF
2093  break
2094 else
2095   echo "$ac_t""no" 1>&6
2096 fi
2097 done
2098
2099    for ac_func in gmtime_r localtime_r readdir_r getpwuid_r
2100 do
2101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2102 echo "configure:2103: checking for $ac_func" >&5
2103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109 /* System header to define __stub macros and hopefully few prototypes,
2110     which can conflict with char $ac_func(); below.  */
2111 #include <assert.h>
2112 /* Override any gcc2 internal prototype to avoid an error.  */
2113 /* We use char because int might match the return type of a gcc2
2114     builtin and then its argument prototype would still apply.  */
2115 char $ac_func();
2116
2117 int main() {
2118
2119 /* The GNU C library defines this for functions which it implements
2120     to always fail with ENOSYS.  Some functions are actually named
2121     something starting with __ and the normal name is an alias.  */
2122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2123 choke me
2124 #else
2125 $ac_func();
2126 #endif
2127
2128 ; return 0; }
2129 EOF
2130 if { (eval echo configure:2131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2131   rm -rf conftest*
2132   eval "ac_cv_func_$ac_func=yes"
2133 else
2134   echo "configure: failed program was:" >&5
2135   cat conftest.$ac_ext >&5
2136   rm -rf conftest*
2137   eval "ac_cv_func_$ac_func=no"
2138 fi
2139 rm -f conftest*
2140 fi
2141
2142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2143   echo "$ac_t""yes" 1>&6
2144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2145   cat >> confdefs.h <<EOF
2146 #define $ac_tr_func 1
2147 EOF
2148  
2149 else
2150   echo "$ac_t""no" 1>&6
2151 fi
2152 done
2153
2154    for ac_func in access stat mkdir rename rmdir unlink realpath
2155 do
2156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2157 echo "configure:2158: checking for $ac_func" >&5
2158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2159   echo $ac_n "(cached) $ac_c" 1>&6
2160 else
2161   cat > conftest.$ac_ext <<EOF
2162 #line 2163 "configure"
2163 #include "confdefs.h"
2164 /* System header to define __stub macros and hopefully few prototypes,
2165     which can conflict with char $ac_func(); below.  */
2166 #include <assert.h>
2167 /* Override any gcc2 internal prototype to avoid an error.  */
2168 /* We use char because int might match the return type of a gcc2
2169     builtin and then its argument prototype would still apply.  */
2170 char $ac_func();
2171
2172 int main() {
2173
2174 /* The GNU C library defines this for functions which it implements
2175     to always fail with ENOSYS.  Some functions are actually named
2176     something starting with __ and the normal name is an alias.  */
2177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2178 choke me
2179 #else
2180 $ac_func();
2181 #endif
2182
2183 ; return 0; }
2184 EOF
2185 if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2186   rm -rf conftest*
2187   eval "ac_cv_func_$ac_func=yes"
2188 else
2189   echo "configure: failed program was:" >&5
2190   cat conftest.$ac_ext >&5
2191   rm -rf conftest*
2192   eval "ac_cv_func_$ac_func=no"
2193 fi
2194 rm -f conftest*
2195 fi
2196
2197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2198   echo "$ac_t""yes" 1>&6
2199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2200   cat >> confdefs.h <<EOF
2201 #define $ac_tr_func 1
2202 EOF
2203  
2204 else
2205   echo "$ac_t""no" 1>&6
2206 fi
2207 done
2208
2209    for ac_func in inet_aton inet_addr
2210 do
2211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2212 echo "configure:2213: checking for $ac_func" >&5
2213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2214   echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216   cat > conftest.$ac_ext <<EOF
2217 #line 2218 "configure"
2218 #include "confdefs.h"
2219 /* System header to define __stub macros and hopefully few prototypes,
2220     which can conflict with char $ac_func(); below.  */
2221 #include <assert.h>
2222 /* Override any gcc2 internal prototype to avoid an error.  */
2223 /* We use char because int might match the return type of a gcc2
2224     builtin and then its argument prototype would still apply.  */
2225 char $ac_func();
2226
2227 int main() {
2228
2229 /* The GNU C library defines this for functions which it implements
2230     to always fail with ENOSYS.  Some functions are actually named
2231     something starting with __ and the normal name is an alias.  */
2232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2233 choke me
2234 #else
2235 $ac_func();
2236 #endif
2237
2238 ; return 0; }
2239 EOF
2240 if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2241   rm -rf conftest*
2242   eval "ac_cv_func_$ac_func=yes"
2243 else
2244   echo "configure: failed program was:" >&5
2245   cat conftest.$ac_ext >&5
2246   rm -rf conftest*
2247   eval "ac_cv_func_$ac_func=no"
2248 fi
2249 rm -f conftest*
2250 fi
2251
2252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2253   echo "$ac_t""yes" 1>&6
2254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2255   cat >> confdefs.h <<EOF
2256 #define $ac_tr_func 1
2257 EOF
2258  break
2259 else
2260   echo "$ac_t""no" 1>&6
2261 fi
2262 done
2263
2264    for ac_func in inet_pton uname
2265 do
2266 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2267 echo "configure:2268: checking for $ac_func" >&5
2268 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2269   echo $ac_n "(cached) $ac_c" 1>&6
2270 else
2271   cat > conftest.$ac_ext <<EOF
2272 #line 2273 "configure"
2273 #include "confdefs.h"
2274 /* System header to define __stub macros and hopefully few prototypes,
2275     which can conflict with char $ac_func(); below.  */
2276 #include <assert.h>
2277 /* Override any gcc2 internal prototype to avoid an error.  */
2278 /* We use char because int might match the return type of a gcc2
2279     builtin and then its argument prototype would still apply.  */
2280 char $ac_func();
2281
2282 int main() {
2283
2284 /* The GNU C library defines this for functions which it implements
2285     to always fail with ENOSYS.  Some functions are actually named
2286     something starting with __ and the normal name is an alias.  */
2287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2288 choke me
2289 #else
2290 $ac_func();
2291 #endif
2292
2293 ; return 0; }
2294 EOF
2295 if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2296   rm -rf conftest*
2297   eval "ac_cv_func_$ac_func=yes"
2298 else
2299   echo "configure: failed program was:" >&5
2300   cat conftest.$ac_ext >&5
2301   rm -rf conftest*
2302   eval "ac_cv_func_$ac_func=no"
2303 fi
2304 rm -f conftest*
2305 fi
2306
2307 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2308   echo "$ac_t""yes" 1>&6
2309     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2310   cat >> confdefs.h <<EOF
2311 #define $ac_tr_func 1
2312 EOF
2313  
2314 else
2315   echo "$ac_t""no" 1>&6
2316 fi
2317 done
2318
2319
2320    for ac_func in gethostbyname_r
2321 do
2322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2323 echo "configure:2324: checking for $ac_func" >&5
2324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2325   echo $ac_n "(cached) $ac_c" 1>&6
2326 else
2327   cat > conftest.$ac_ext <<EOF
2328 #line 2329 "configure"
2329 #include "confdefs.h"
2330 /* System header to define __stub macros and hopefully few prototypes,
2331     which can conflict with char $ac_func(); below.  */
2332 #include <assert.h>
2333 /* Override any gcc2 internal prototype to avoid an error.  */
2334 /* We use char because int might match the return type of a gcc2
2335     builtin and then its argument prototype would still apply.  */
2336 char $ac_func();
2337
2338 int main() {
2339
2340 /* The GNU C library defines this for functions which it implements
2341     to always fail with ENOSYS.  Some functions are actually named
2342     something starting with __ and the normal name is an alias.  */
2343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2344 choke me
2345 #else
2346 $ac_func();
2347 #endif
2348
2349 ; return 0; }
2350 EOF
2351 if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2352   rm -rf conftest*
2353   eval "ac_cv_func_$ac_func=yes"
2354 else
2355   echo "configure: failed program was:" >&5
2356   cat conftest.$ac_ext >&5
2357   rm -rf conftest*
2358   eval "ac_cv_func_$ac_func=no"
2359 fi
2360 rm -f conftest*
2361 fi
2362
2363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2364   echo "$ac_t""yes" 1>&6
2365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2366   cat >> confdefs.h <<EOF
2367 #define $ac_tr_func 1
2368 EOF
2369  
2370      cat >> confdefs.h <<\EOF
2371 #define HAVE_GETHOSTBYNAME_R 1
2372 EOF
2373
2374      # There are two different kinds of gethostbyname_r.
2375      # We look for the one that returns `int'.
2376      # Hopefully this check is robust enough.
2377      cat > conftest.$ac_ext <<EOF
2378 #line 2379 "configure"
2379 #include "confdefs.h"
2380 #include <netdb.h>
2381 EOF
2382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2383   egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
2384   rm -rf conftest*
2385   
2386        cat >> confdefs.h <<\EOF
2387 #define GETHOSTBYNAME_R_RETURNS_INT 1
2388 EOF
2389
2390 fi
2391 rm -f conftest*
2392
2393 else
2394   echo "$ac_t""no" 1>&6
2395 fi
2396 done
2397
2398
2399    for ac_func in gethostbyaddr_r
2400 do
2401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2402 echo "configure:2403: checking for $ac_func" >&5
2403 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2404   echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406   cat > conftest.$ac_ext <<EOF
2407 #line 2408 "configure"
2408 #include "confdefs.h"
2409 /* System header to define __stub macros and hopefully few prototypes,
2410     which can conflict with char $ac_func(); below.  */
2411 #include <assert.h>
2412 /* Override any gcc2 internal prototype to avoid an error.  */
2413 /* We use char because int might match the return type of a gcc2
2414     builtin and then its argument prototype would still apply.  */
2415 char $ac_func();
2416
2417 int main() {
2418
2419 /* The GNU C library defines this for functions which it implements
2420     to always fail with ENOSYS.  Some functions are actually named
2421     something starting with __ and the normal name is an alias.  */
2422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2423 choke me
2424 #else
2425 $ac_func();
2426 #endif
2427
2428 ; return 0; }
2429 EOF
2430 if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2431   rm -rf conftest*
2432   eval "ac_cv_func_$ac_func=yes"
2433 else
2434   echo "configure: failed program was:" >&5
2435   cat conftest.$ac_ext >&5
2436   rm -rf conftest*
2437   eval "ac_cv_func_$ac_func=no"
2438 fi
2439 rm -f conftest*
2440 fi
2441
2442 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2443   echo "$ac_t""yes" 1>&6
2444     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2445   cat >> confdefs.h <<EOF
2446 #define $ac_tr_func 1
2447 EOF
2448  
2449      cat >> confdefs.h <<\EOF
2450 #define HAVE_GETHOSTBYADDR_R 1
2451 EOF
2452
2453      # There are two different kinds of gethostbyaddr_r.
2454      # We look for the one that returns `int'.
2455      # Hopefully this check is robust enough.
2456      cat > conftest.$ac_ext <<EOF
2457 #line 2458 "configure"
2458 #include "confdefs.h"
2459 #include <netdb.h>
2460 EOF
2461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2462   egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
2463   rm -rf conftest*
2464   
2465        cat >> confdefs.h <<\EOF
2466 #define GETHOSTBYADDR_R_RETURNS_INT 1
2467 EOF
2468
2469 fi
2470 rm -f conftest*
2471
2472 else
2473   echo "$ac_t""no" 1>&6
2474 fi
2475 done
2476
2477
2478    for ac_func in gethostname
2479 do
2480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2481 echo "configure:2482: checking for $ac_func" >&5
2482 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2483   echo $ac_n "(cached) $ac_c" 1>&6
2484 else
2485   cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 /* System header to define __stub macros and hopefully few prototypes,
2489     which can conflict with char $ac_func(); below.  */
2490 #include <assert.h>
2491 /* Override any gcc2 internal prototype to avoid an error.  */
2492 /* We use char because int might match the return type of a gcc2
2493     builtin and then its argument prototype would still apply.  */
2494 char $ac_func();
2495
2496 int main() {
2497
2498 /* The GNU C library defines this for functions which it implements
2499     to always fail with ENOSYS.  Some functions are actually named
2500     something starting with __ and the normal name is an alias.  */
2501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2502 choke me
2503 #else
2504 $ac_func();
2505 #endif
2506
2507 ; return 0; }
2508 EOF
2509 if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2510   rm -rf conftest*
2511   eval "ac_cv_func_$ac_func=yes"
2512 else
2513   echo "configure: failed program was:" >&5
2514   cat conftest.$ac_ext >&5
2515   rm -rf conftest*
2516   eval "ac_cv_func_$ac_func=no"
2517 fi
2518 rm -f conftest*
2519 fi
2520
2521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2522   echo "$ac_t""yes" 1>&6
2523     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2524   cat >> confdefs.h <<EOF
2525 #define $ac_tr_func 1
2526 EOF
2527  
2528      cat >> confdefs.h <<\EOF
2529 #define HAVE_GETHOSTNAME 1
2530 EOF
2531
2532      cat > conftest.$ac_ext <<EOF
2533 #line 2534 "configure"
2534 #include "confdefs.h"
2535 #include <unistd.h>
2536 EOF
2537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2538   egrep "gethostname" >/dev/null 2>&1; then
2539   rm -rf conftest*
2540   
2541        cat >> confdefs.h <<\EOF
2542 #define HAVE_GETHOSTNAME_DECL 1
2543 EOF
2544
2545 fi
2546 rm -f conftest*
2547
2548 else
2549   echo "$ac_t""no" 1>&6
2550 fi
2551 done
2552
2553
2554    # Look for these functions in the thread library.
2555    save_LIBS="$LIBS"
2556    LIBS="$LIBS $THREADLIBS"
2557    for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np sched_yield
2558 do
2559 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2560 echo "configure:2561: checking for $ac_func" >&5
2561 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2562   echo $ac_n "(cached) $ac_c" 1>&6
2563 else
2564   cat > conftest.$ac_ext <<EOF
2565 #line 2566 "configure"
2566 #include "confdefs.h"
2567 /* System header to define __stub macros and hopefully few prototypes,
2568     which can conflict with char $ac_func(); below.  */
2569 #include <assert.h>
2570 /* Override any gcc2 internal prototype to avoid an error.  */
2571 /* We use char because int might match the return type of a gcc2
2572     builtin and then its argument prototype would still apply.  */
2573 char $ac_func();
2574
2575 int main() {
2576
2577 /* The GNU C library defines this for functions which it implements
2578     to always fail with ENOSYS.  Some functions are actually named
2579     something starting with __ and the normal name is an alias.  */
2580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2581 choke me
2582 #else
2583 $ac_func();
2584 #endif
2585
2586 ; return 0; }
2587 EOF
2588 if { (eval echo configure:2589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2589   rm -rf conftest*
2590   eval "ac_cv_func_$ac_func=yes"
2591 else
2592   echo "configure: failed program was:" >&5
2593   cat conftest.$ac_ext >&5
2594   rm -rf conftest*
2595   eval "ac_cv_func_$ac_func=no"
2596 fi
2597 rm -f conftest*
2598 fi
2599
2600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2601   echo "$ac_t""yes" 1>&6
2602     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2603   cat >> confdefs.h <<EOF
2604 #define $ac_tr_func 1
2605 EOF
2606  
2607 else
2608   echo "$ac_t""no" 1>&6
2609 fi
2610 done
2611
2612    LIBS="$save_LIBS"
2613
2614    # We require a way to get the time.
2615    time_found=no
2616    for ac_func in gettimeofday time ftime
2617 do
2618 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2619 echo "configure:2620: checking for $ac_func" >&5
2620 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2621   echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623   cat > conftest.$ac_ext <<EOF
2624 #line 2625 "configure"
2625 #include "confdefs.h"
2626 /* System header to define __stub macros and hopefully few prototypes,
2627     which can conflict with char $ac_func(); below.  */
2628 #include <assert.h>
2629 /* Override any gcc2 internal prototype to avoid an error.  */
2630 /* We use char because int might match the return type of a gcc2
2631     builtin and then its argument prototype would still apply.  */
2632 char $ac_func();
2633
2634 int main() {
2635
2636 /* The GNU C library defines this for functions which it implements
2637     to always fail with ENOSYS.  Some functions are actually named
2638     something starting with __ and the normal name is an alias.  */
2639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2640 choke me
2641 #else
2642 $ac_func();
2643 #endif
2644
2645 ; return 0; }
2646 EOF
2647 if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2648   rm -rf conftest*
2649   eval "ac_cv_func_$ac_func=yes"
2650 else
2651   echo "configure: failed program was:" >&5
2652   cat conftest.$ac_ext >&5
2653   rm -rf conftest*
2654   eval "ac_cv_func_$ac_func=no"
2655 fi
2656 rm -f conftest*
2657 fi
2658
2659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2660   echo "$ac_t""yes" 1>&6
2661     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2662   cat >> confdefs.h <<EOF
2663 #define $ac_tr_func 1
2664 EOF
2665  time_found=yes
2666 else
2667   echo "$ac_t""no" 1>&6
2668 fi
2669 done
2670
2671    if test "$time_found" = no; then
2672       { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
2673    fi
2674
2675    # We require memmove.
2676    memmove_found=no
2677    for ac_func in memmove
2678 do
2679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2680 echo "configure:2681: checking for $ac_func" >&5
2681 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 /* System header to define __stub macros and hopefully few prototypes,
2688     which can conflict with char $ac_func(); below.  */
2689 #include <assert.h>
2690 /* Override any gcc2 internal prototype to avoid an error.  */
2691 /* We use char because int might match the return type of a gcc2
2692     builtin and then its argument prototype would still apply.  */
2693 char $ac_func();
2694
2695 int main() {
2696
2697 /* The GNU C library defines this for functions which it implements
2698     to always fail with ENOSYS.  Some functions are actually named
2699     something starting with __ and the normal name is an alias.  */
2700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2701 choke me
2702 #else
2703 $ac_func();
2704 #endif
2705
2706 ; return 0; }
2707 EOF
2708 if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2709   rm -rf conftest*
2710   eval "ac_cv_func_$ac_func=yes"
2711 else
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -rf conftest*
2715   eval "ac_cv_func_$ac_func=no"
2716 fi
2717 rm -f conftest*
2718 fi
2719
2720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2721   echo "$ac_t""yes" 1>&6
2722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2723   cat >> confdefs.h <<EOF
2724 #define $ac_tr_func 1
2725 EOF
2726  memmove_found=yes
2727 else
2728   echo "$ac_t""no" 1>&6
2729 fi
2730 done
2731
2732    if test "$memmove_found" = no; then
2733       { echo "configure: error: memmove is required" 1>&2; exit 1; }
2734    fi
2735
2736    # We require memcpy.
2737    memcpy_found=no
2738    for ac_func in memcpy
2739 do
2740 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2741 echo "configure:2742: checking for $ac_func" >&5
2742 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2743   echo $ac_n "(cached) $ac_c" 1>&6
2744 else
2745   cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* System header to define __stub macros and hopefully few prototypes,
2749     which can conflict with char $ac_func(); below.  */
2750 #include <assert.h>
2751 /* Override any gcc2 internal prototype to avoid an error.  */
2752 /* We use char because int might match the return type of a gcc2
2753     builtin and then its argument prototype would still apply.  */
2754 char $ac_func();
2755
2756 int main() {
2757
2758 /* The GNU C library defines this for functions which it implements
2759     to always fail with ENOSYS.  Some functions are actually named
2760     something starting with __ and the normal name is an alias.  */
2761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2762 choke me
2763 #else
2764 $ac_func();
2765 #endif
2766
2767 ; return 0; }
2768 EOF
2769 if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2770   rm -rf conftest*
2771   eval "ac_cv_func_$ac_func=yes"
2772 else
2773   echo "configure: failed program was:" >&5
2774   cat conftest.$ac_ext >&5
2775   rm -rf conftest*
2776   eval "ac_cv_func_$ac_func=no"
2777 fi
2778 rm -f conftest*
2779 fi
2780
2781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2782   echo "$ac_t""yes" 1>&6
2783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2784   cat >> confdefs.h <<EOF
2785 #define $ac_tr_func 1
2786 EOF
2787  memcpy_found=yes
2788 else
2789   echo "$ac_t""no" 1>&6
2790 fi
2791 done
2792
2793    if test "$memcpy_found" = no; then
2794       { echo "configure: error: memcpy is required" 1>&2; exit 1; }
2795    fi
2796
2797    test -d "$libgcj_basedir/../gcc/java" || {
2798       CANADIAN=yes
2799       NULL_TARGET=yes
2800    }
2801 fi
2802
2803
2804
2805 if test "$CANADIAN" = yes; then
2806   CANADIAN_TRUE=
2807   CANADIAN_FALSE='#'
2808 else
2809   CANADIAN_TRUE='#'
2810   CANADIAN_FALSE=
2811 fi
2812
2813
2814 if test "$NULL_TARGET" = yes; then
2815   NULL_TARGET_TRUE=
2816   NULL_TARGET_FALSE='#'
2817 else
2818   NULL_TARGET_TRUE='#'
2819   NULL_TARGET_FALSE=
2820 fi
2821
2822
2823 if test "$CANADIAN" = no || test "$NULL_TARGET" = yes; then
2824   NATIVE_TRUE=
2825   NATIVE_FALSE='#'
2826 else
2827   NATIVE_TRUE='#'
2828   NATIVE_FALSE=
2829 fi
2830
2831
2832
2833
2834
2835 for ac_hdr in unistd.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
2836 do
2837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2838 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2839 echo "configure:2840: checking for $ac_hdr" >&5
2840 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2841   echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843   cat > conftest.$ac_ext <<EOF
2844 #line 2845 "configure"
2845 #include "confdefs.h"
2846 #include <$ac_hdr>
2847 EOF
2848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2849 { (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2851 if test -z "$ac_err"; then
2852   rm -rf conftest*
2853   eval "ac_cv_header_$ac_safe=yes"
2854 else
2855   echo "$ac_err" >&5
2856   echo "configure: failed program was:" >&5
2857   cat conftest.$ac_ext >&5
2858   rm -rf conftest*
2859   eval "ac_cv_header_$ac_safe=no"
2860 fi
2861 rm -f conftest*
2862 fi
2863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2864   echo "$ac_t""yes" 1>&6
2865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2866   cat >> confdefs.h <<EOF
2867 #define $ac_tr_hdr 1
2868 EOF
2869  
2870 else
2871   echo "$ac_t""no" 1>&6
2872 fi
2873 done
2874
2875 for ac_hdr in dirent.h
2876 do
2877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2879 echo "configure:2880: checking for $ac_hdr" >&5
2880 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2881   echo $ac_n "(cached) $ac_c" 1>&6
2882 else
2883   cat > conftest.$ac_ext <<EOF
2884 #line 2885 "configure"
2885 #include "confdefs.h"
2886 #include <$ac_hdr>
2887 EOF
2888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2889 { (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2891 if test -z "$ac_err"; then
2892   rm -rf conftest*
2893   eval "ac_cv_header_$ac_safe=yes"
2894 else
2895   echo "$ac_err" >&5
2896   echo "configure: failed program was:" >&5
2897   cat conftest.$ac_ext >&5
2898   rm -rf conftest*
2899   eval "ac_cv_header_$ac_safe=no"
2900 fi
2901 rm -f conftest*
2902 fi
2903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2904   echo "$ac_t""yes" 1>&6
2905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2906   cat >> confdefs.h <<EOF
2907 #define $ac_tr_hdr 1
2908 EOF
2909  
2910 else
2911   echo "$ac_t""no" 1>&6
2912 fi
2913 done
2914
2915
2916 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
2917 echo "configure:2918: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
2918 cat > conftest.$ac_ext <<EOF
2919 #line 2920 "configure"
2920 #include "confdefs.h"
2921 #include <netinet/in.h>
2922 int main() {
2923 struct sockaddr_in6 addr6;
2924 ; return 0; }
2925 EOF
2926 if { (eval echo configure:2927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2927   rm -rf conftest*
2928   cat >> confdefs.h <<\EOF
2929 #define HAVE_INET6 1
2930 EOF
2931
2932    echo "$ac_t""yes" 1>&6
2933 else
2934   echo "configure: failed program was:" >&5
2935   cat conftest.$ac_ext >&5
2936   rm -rf conftest*
2937   echo "$ac_t""no" 1>&6
2938 fi
2939 rm -f conftest*
2940
2941 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
2942 echo "configure:2943: checking for socklen_t in sys/socket.h" >&5
2943 cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 #include <sys/socket.h>
2947 int main() {
2948 socklen_t x = 5;
2949 ; return 0; }
2950 EOF
2951 if { (eval echo configure:2952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2952   rm -rf conftest*
2953   cat >> confdefs.h <<\EOF
2954 #define HAVE_SOCKLEN_T 1
2955 EOF
2956
2957    echo "$ac_t""yes" 1>&6
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   echo "$ac_t""no" 1>&6
2963 fi
2964 rm -f conftest*
2965
2966 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
2967 echo "configure:2968: checking for tm_gmtoff in struct tm" >&5
2968 cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971 #include <time.h>
2972 int main() {
2973 struct tm tim; tim.tm_gmtoff = 0;
2974 ; return 0; }
2975 EOF
2976 if { (eval echo configure:2977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2977   rm -rf conftest*
2978   cat >> confdefs.h <<\EOF
2979 #define STRUCT_TM_HAS_GMTOFF 1
2980 EOF
2981
2982    echo "$ac_t""yes" 1>&6
2983 else
2984   echo "configure: failed program was:" >&5
2985   cat conftest.$ac_ext >&5
2986   rm -rf conftest*
2987   echo "$ac_t""no" 1>&6
2988    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
2989 echo "configure:2990: checking for global timezone variable" >&5
2990             cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <time.h>
2994 int main() {
2995 long z2 = timezone;
2996 ; return 0; }
2997 EOF
2998 if { (eval echo configure:2999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2999   rm -rf conftest*
3000   cat >> confdefs.h <<\EOF
3001 #define HAVE_TIMEZONE 1
3002 EOF
3003
3004       echo "$ac_t""yes" 1>&6
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -rf conftest*
3009   echo "$ac_t""no" 1>&6
3010 fi
3011 rm -f conftest*
3012 fi
3013 rm -f conftest*
3014
3015 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3016 # for constant arguments.  Useless!
3017 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3018 echo "configure:3019: checking for working alloca.h" >&5
3019 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025 #include <alloca.h>
3026 int main() {
3027 char *p = alloca(2 * sizeof(int));
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3031   rm -rf conftest*
3032   ac_cv_header_alloca_h=yes
3033 else
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   ac_cv_header_alloca_h=no
3038 fi
3039 rm -f conftest*
3040 fi
3041
3042 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3043 if test $ac_cv_header_alloca_h = yes; then
3044   cat >> confdefs.h <<\EOF
3045 #define HAVE_ALLOCA_H 1
3046 EOF
3047
3048 fi
3049
3050 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3051 echo "configure:3052: checking for alloca" >&5
3052 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058
3059 #ifdef __GNUC__
3060 # define alloca __builtin_alloca
3061 #else
3062 # ifdef _MSC_VER
3063 #  include <malloc.h>
3064 #  define alloca _alloca
3065 # else
3066 #  if HAVE_ALLOCA_H
3067 #   include <alloca.h>
3068 #  else
3069 #   ifdef _AIX
3070  #pragma alloca
3071 #   else
3072 #    ifndef alloca /* predefined by HP cc +Olibcalls */
3073 char *alloca ();
3074 #    endif
3075 #   endif
3076 #  endif
3077 # endif
3078 #endif
3079
3080 int main() {
3081 char *p = (char *) alloca(1);
3082 ; return 0; }
3083 EOF
3084 if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085   rm -rf conftest*
3086   ac_cv_func_alloca_works=yes
3087 else
3088   echo "configure: failed program was:" >&5
3089   cat conftest.$ac_ext >&5
3090   rm -rf conftest*
3091   ac_cv_func_alloca_works=no
3092 fi
3093 rm -f conftest*
3094 fi
3095
3096 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3097 if test $ac_cv_func_alloca_works = yes; then
3098   cat >> confdefs.h <<\EOF
3099 #define HAVE_ALLOCA 1
3100 EOF
3101
3102 fi
3103
3104 if test $ac_cv_func_alloca_works = no; then
3105   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3106   # that cause trouble.  Some versions do not even contain alloca or
3107   # contain a buggy version.  If you still want to use their alloca,
3108   # use ar to extract alloca.o from them instead of compiling alloca.c.
3109   ALLOCA=alloca.${ac_objext}
3110   cat >> confdefs.h <<\EOF
3111 #define C_ALLOCA 1
3112 EOF
3113
3114
3115 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3116 echo "configure:3117: checking whether alloca needs Cray hooks" >&5
3117 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123 #if defined(CRAY) && ! defined(CRAY2)
3124 webecray
3125 #else
3126 wenotbecray
3127 #endif
3128
3129 EOF
3130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3131   egrep "webecray" >/dev/null 2>&1; then
3132   rm -rf conftest*
3133   ac_cv_os_cray=yes
3134 else
3135   rm -rf conftest*
3136   ac_cv_os_cray=no
3137 fi
3138 rm -f conftest*
3139
3140 fi
3141
3142 echo "$ac_t""$ac_cv_os_cray" 1>&6
3143 if test $ac_cv_os_cray = yes; then
3144 for ac_func in _getb67 GETB67 getb67; do
3145   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3146 echo "configure:3147: checking for $ac_func" >&5
3147 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 /* System header to define __stub macros and hopefully few prototypes,
3154     which can conflict with char $ac_func(); below.  */
3155 #include <assert.h>
3156 /* Override any gcc2 internal prototype to avoid an error.  */
3157 /* We use char because int might match the return type of a gcc2
3158     builtin and then its argument prototype would still apply.  */
3159 char $ac_func();
3160
3161 int main() {
3162
3163 /* The GNU C library defines this for functions which it implements
3164     to always fail with ENOSYS.  Some functions are actually named
3165     something starting with __ and the normal name is an alias.  */
3166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3167 choke me
3168 #else
3169 $ac_func();
3170 #endif
3171
3172 ; return 0; }
3173 EOF
3174 if { (eval echo configure:3175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3175   rm -rf conftest*
3176   eval "ac_cv_func_$ac_func=yes"
3177 else
3178   echo "configure: failed program was:" >&5
3179   cat conftest.$ac_ext >&5
3180   rm -rf conftest*
3181   eval "ac_cv_func_$ac_func=no"
3182 fi
3183 rm -f conftest*
3184 fi
3185
3186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3187   echo "$ac_t""yes" 1>&6
3188   cat >> confdefs.h <<EOF
3189 #define CRAY_STACKSEG_END $ac_func
3190 EOF
3191
3192   break
3193 else
3194   echo "$ac_t""no" 1>&6
3195 fi
3196
3197 done
3198 fi
3199
3200 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3201 echo "configure:3202: checking stack direction for C alloca" >&5
3202 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3203   echo $ac_n "(cached) $ac_c" 1>&6
3204 else
3205   if test "$cross_compiling" = yes; then
3206   ac_cv_c_stack_direction=0
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 find_stack_direction ()
3212 {
3213   static char *addr = 0;
3214   auto char dummy;
3215   if (addr == 0)
3216     {
3217       addr = &dummy;
3218       return find_stack_direction ();
3219     }
3220   else
3221     return (&dummy > addr) ? 1 : -1;
3222 }
3223 main ()
3224 {
3225   exit (find_stack_direction() < 0);
3226 }
3227 EOF
3228 if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3229 then
3230   ac_cv_c_stack_direction=1
3231 else
3232   echo "configure: failed program was:" >&5
3233   cat conftest.$ac_ext >&5
3234   rm -fr conftest*
3235   ac_cv_c_stack_direction=-1
3236 fi
3237 rm -fr conftest*
3238 fi
3239
3240 fi
3241
3242 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3243 cat >> confdefs.h <<EOF
3244 #define STACK_DIRECTION $ac_cv_c_stack_direction
3245 EOF
3246
3247 fi
3248
3249
3250 for ac_prog in perl
3251 do
3252 # Extract the first word of "$ac_prog", so it can be a program name with args.
3253 set dummy $ac_prog; ac_word=$2
3254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3255 echo "configure:3256: checking for $ac_word" >&5
3256 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   if test -n "$PERL"; then
3260   ac_cv_prog_PERL="$PERL" # Let the user override the test.
3261 else
3262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3263   for ac_dir in $PATH; do
3264     test -z "$ac_dir" && ac_dir=.
3265     if test -f $ac_dir/$ac_word; then
3266       ac_cv_prog_PERL="$ac_prog"
3267       break
3268     fi
3269   done
3270   IFS="$ac_save_ifs"
3271 fi
3272 fi
3273 PERL="$ac_cv_prog_PERL"
3274 if test -n "$PERL"; then
3275   echo "$ac_t""$PERL" 1>&6
3276 else
3277   echo "$ac_t""no" 1>&6
3278 fi
3279
3280 test -n "$PERL" && break
3281 done
3282 test -n "$PERL" || PERL="false"
3283
3284
3285 case "${host}" in
3286   i?86-*-linux*)
3287     SIGNAL_HANDLER=include/i386-signal.h
3288         ;;
3289   sparc-sun-solaris*)
3290     SIGNAL_HANDLER=include/sparc-signal.h
3291         ;;
3292   *)
3293     SIGNAL_HANDLER=include/default-signal.h
3294         ;;
3295 esac
3296
3297
3298
3299 if test "${multilib}" = "yes"; then
3300   multilib_arg="--enable-multilib"
3301 else
3302   multilib_arg=
3303 fi
3304
3305 here=`pwd`
3306
3307
3308 trap '' 1 2 15
3309 cat > confcache <<\EOF
3310 # This file is a shell script that caches the results of configure
3311 # tests run on this system so they can be shared between configure
3312 # scripts and configure runs.  It is not useful on other systems.
3313 # If it contains results you don't want to keep, you may remove or edit it.
3314 #
3315 # By default, configure uses ./config.cache as the cache file,
3316 # creating it if it does not exist already.  You can give configure
3317 # the --cache-file=FILE option to use a different cache file; that is
3318 # what configure does when it calls configure scripts in
3319 # subdirectories, so they share the cache.
3320 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3321 # config.status only pays attention to the cache file if you give it the
3322 # --recheck option to rerun configure.
3323 #
3324 EOF
3325 # The following way of writing the cache mishandles newlines in values,
3326 # but we know of no workaround that is simple, portable, and efficient.
3327 # So, don't put newlines in cache variables' values.
3328 # Ultrix sh set writes to stderr and can't be redirected directly,
3329 # and sets the high bit in the cache file unless we assign to the vars.
3330 (set) 2>&1 |
3331   case `(ac_space=' '; set) 2>&1 | grep ac_space` in
3332   *ac_space=\ *)
3333     # `set' does not quote correctly, so add quotes (double-quote substitution
3334     # turns \\\\ into \\, and sed turns \\ into \).
3335     sed -n \
3336       -e "s/'/'\\\\''/g" \
3337       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3338     ;;
3339   *)
3340     # `set' quotes correctly as required by POSIX, so do not add quotes.
3341     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3342     ;;
3343   esac >> confcache
3344 if cmp -s $cache_file confcache; then
3345   :
3346 else
3347   if test -w $cache_file; then
3348     echo "updating cache $cache_file"
3349     cat confcache > $cache_file
3350   else
3351     echo "not updating unwritable cache $cache_file"
3352   fi
3353 fi
3354 rm -f confcache
3355
3356 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3357
3358 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3359 # Let make expand exec_prefix.
3360 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3361
3362 # Any assignment to VPATH causes Sun make to only execute
3363 # the first set of double-colon rules, so remove it if not needed.
3364 # If there is a colon in the path, we need to keep it.
3365 if test "x$srcdir" = x.; then
3366   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3367 fi
3368
3369 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3370
3371 DEFS=-DHAVE_CONFIG_H
3372
3373 # Without the "./", some shells look in PATH for config.status.
3374 : ${CONFIG_STATUS=./config.status}
3375
3376 echo creating $CONFIG_STATUS
3377 rm -f $CONFIG_STATUS
3378 cat > $CONFIG_STATUS <<EOF
3379 #! /bin/sh
3380 # Generated automatically by configure.
3381 # Run this file to recreate the current configuration.
3382 # This directory was configured as follows,
3383 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3384 #
3385 # $0 $ac_configure_args
3386 #
3387 # Compiler output produced by configure, useful for debugging
3388 # configure, is in ./config.log if it exists.
3389
3390 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3391 for ac_option
3392 do
3393   case "\$ac_option" in
3394   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3395     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3396     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3397   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3398     echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
3399     exit 0 ;;
3400   -help | --help | --hel | --he | --h)
3401     echo "\$ac_cs_usage"; exit 0 ;;
3402   *) echo "\$ac_cs_usage"; exit 1 ;;
3403   esac
3404 done
3405
3406 ac_given_srcdir=$srcdir
3407 ac_given_INSTALL="$INSTALL"
3408
3409 trap 'rm -fr `echo "Makefile testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3410 EOF
3411 cat >> $CONFIG_STATUS <<EOF
3412
3413 # Protect against being on the right side of a sed subst in config.status.
3414 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3415  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3416 $ac_vpsub
3417 $extrasub
3418 s%@SHELL@%$SHELL%g
3419 s%@CFLAGS@%$CFLAGS%g
3420 s%@CPPFLAGS@%$CPPFLAGS%g
3421 s%@CXXFLAGS@%$CXXFLAGS%g
3422 s%@DEFS@%$DEFS%g
3423 s%@LDFLAGS@%$LDFLAGS%g
3424 s%@LIBS@%$LIBS%g
3425 s%@exec_prefix@%$exec_prefix%g
3426 s%@prefix@%$prefix%g
3427 s%@program_transform_name@%$program_transform_name%g
3428 s%@bindir@%$bindir%g
3429 s%@sbindir@%$sbindir%g
3430 s%@libexecdir@%$libexecdir%g
3431 s%@datadir@%$datadir%g
3432 s%@sysconfdir@%$sysconfdir%g
3433 s%@sharedstatedir@%$sharedstatedir%g
3434 s%@localstatedir@%$localstatedir%g
3435 s%@libdir@%$libdir%g
3436 s%@includedir@%$includedir%g
3437 s%@oldincludedir@%$oldincludedir%g
3438 s%@infodir@%$infodir%g
3439 s%@mandir@%$mandir%g
3440 s%@host@%$host%g
3441 s%@host_alias@%$host_alias%g
3442 s%@host_cpu@%$host_cpu%g
3443 s%@host_vendor@%$host_vendor%g
3444 s%@host_os@%$host_os%g
3445 s%@target@%$target%g
3446 s%@target_alias@%$target_alias%g
3447 s%@target_cpu@%$target_cpu%g
3448 s%@target_vendor@%$target_vendor%g
3449 s%@target_os@%$target_os%g
3450 s%@build@%$build%g
3451 s%@build_alias@%$build_alias%g
3452 s%@build_cpu@%$build_cpu%g
3453 s%@build_vendor@%$build_vendor%g
3454 s%@build_os@%$build_os%g
3455 s%@libgcj_basedir@%$libgcj_basedir%g
3456 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3457 s%@INSTALL_DATA@%$INSTALL_DATA%g
3458 s%@PACKAGE@%$PACKAGE%g
3459 s%@VERSION@%$VERSION%g
3460 s%@ACLOCAL@%$ACLOCAL%g
3461 s%@AUTOCONF@%$AUTOCONF%g
3462 s%@AUTOMAKE@%$AUTOMAKE%g
3463 s%@AUTOHEADER@%$AUTOHEADER%g
3464 s%@MAKEINFO@%$MAKEINFO%g
3465 s%@SET_MAKE@%$SET_MAKE%g
3466 s%@CC@%$CC%g
3467 s%@CXX@%$CXX%g
3468 s%@AS@%$AS%g
3469 s%@AR@%$AR%g
3470 s%@RANLIB@%$RANLIB%g
3471 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3472 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3473 s%@MAINT@%$MAINT%g
3474 s%@EXEEXT@%$EXEEXT%g
3475 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
3476 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
3477 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
3478 s%@COMPPATH@%$COMPPATH%g
3479 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
3480 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
3481 s%@CPP@%$CPP%g
3482 s%@GCLIBS@%$GCLIBS%g
3483 s%@GCINCS@%$GCINCS%g
3484 s%@GCDEPS@%$GCDEPS%g
3485 s%@GCOBJS@%$GCOBJS%g
3486 s%@THREADLIBS@%$THREADLIBS%g
3487 s%@THREADINCS@%$THREADINCS%g
3488 s%@THREADDEPS@%$THREADDEPS%g
3489 s%@THREADOBJS@%$THREADOBJS%g
3490 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
3491 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
3492 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
3493 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
3494 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
3495 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
3496 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
3497 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
3498 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
3499 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
3500 s%@ALLOCA@%$ALLOCA%g
3501 s%@PERL@%$PERL%g
3502 s%@here@%$here%g
3503
3504 CEOF
3505 EOF
3506
3507 cat >> $CONFIG_STATUS <<\EOF
3508
3509 # Split the substitutions into bite-sized pieces for seds with
3510 # small command number limits, like on Digital OSF/1 and HP-UX.
3511 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3512 ac_file=1 # Number of current file.
3513 ac_beg=1 # First line for current file.
3514 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3515 ac_more_lines=:
3516 ac_sed_cmds=""
3517 while $ac_more_lines; do
3518   if test $ac_beg -gt 1; then
3519     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3520   else
3521     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3522   fi
3523   if test ! -s conftest.s$ac_file; then
3524     ac_more_lines=false
3525     rm -f conftest.s$ac_file
3526   else
3527     if test -z "$ac_sed_cmds"; then
3528       ac_sed_cmds="sed -f conftest.s$ac_file"
3529     else
3530       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3531     fi
3532     ac_file=`expr $ac_file + 1`
3533     ac_beg=$ac_end
3534     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3535   fi
3536 done
3537 if test -z "$ac_sed_cmds"; then
3538   ac_sed_cmds=cat
3539 fi
3540 EOF
3541
3542 cat >> $CONFIG_STATUS <<EOF
3543
3544 CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
3545 EOF
3546 cat >> $CONFIG_STATUS <<\EOF
3547 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3548   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3549   case "$ac_file" in
3550   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3551        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3552   *) ac_file_in="${ac_file}.in" ;;
3553   esac
3554
3555   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3556
3557   # Remove last slash and all that follows it.  Not all systems have dirname.
3558   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3559   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3560     # The file is in a subdirectory.
3561     test ! -d "$ac_dir" && mkdir "$ac_dir"
3562     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3563     # A "../" for each directory in $ac_dir_suffix.
3564     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3565   else
3566     ac_dir_suffix= ac_dots=
3567   fi
3568
3569   case "$ac_given_srcdir" in
3570   .)  srcdir=.
3571       if test -z "$ac_dots"; then top_srcdir=.
3572       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3573   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3574   *) # Relative path.
3575     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3576     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3577   esac
3578
3579   case "$ac_given_INSTALL" in
3580   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3581   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3582   esac
3583
3584   echo creating "$ac_file"
3585   rm -f "$ac_file"
3586   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3587   case "$ac_file" in
3588   *Makefile*) ac_comsub="1i\\
3589 # $configure_input" ;;
3590   *) ac_comsub= ;;
3591   esac
3592
3593   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3594   sed -e "$ac_comsub
3595 s%@configure_input@%$configure_input%g
3596 s%@srcdir@%$srcdir%g
3597 s%@top_srcdir@%$top_srcdir%g
3598 s%@INSTALL@%$INSTALL%g
3599 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3600 fi; done
3601 rm -f conftest.s*
3602
3603 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3604 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3605 #
3606 # ac_d sets the value in "#define NAME VALUE" lines.
3607 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3608 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3609 ac_dC='\3'
3610 ac_dD='%g'
3611 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3612 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3613 ac_uB='\([      ]\)%\1#\2define\3'
3614 ac_uC=' '
3615 ac_uD='\4%g'
3616 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3617 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3618 ac_eB='$%\1#\2define\3'
3619 ac_eC=' '
3620 ac_eD='%g'
3621
3622 if test "${CONFIG_HEADERS+set}" != set; then
3623 EOF
3624 cat >> $CONFIG_STATUS <<EOF
3625   CONFIG_HEADERS="include/config.h"
3626 EOF
3627 cat >> $CONFIG_STATUS <<\EOF
3628 fi
3629 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3630   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3631   case "$ac_file" in
3632   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3633        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3634   *) ac_file_in="${ac_file}.in" ;;
3635   esac
3636
3637   echo creating $ac_file
3638
3639   rm -f conftest.frag conftest.in conftest.out
3640   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3641   cat $ac_file_inputs > conftest.in
3642
3643 EOF
3644
3645 # Transform confdefs.h into a sed script conftest.vals that substitutes
3646 # the proper values into config.h.in to produce config.h.  And first:
3647 # Protect against being on the right side of a sed subst in config.status.
3648 # Protect against being in an unquoted here document in config.status.
3649 rm -f conftest.vals
3650 cat > conftest.hdr <<\EOF
3651 s/[\\&%]/\\&/g
3652 s%[\\$`]%\\&%g
3653 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3654 s%ac_d%ac_u%gp
3655 s%ac_u%ac_e%gp
3656 EOF
3657 sed -n -f conftest.hdr confdefs.h > conftest.vals
3658 rm -f conftest.hdr
3659
3660 # This sed command replaces #undef with comments.  This is necessary, for
3661 # example, in the case of _POSIX_SOURCE, which is predefined and required
3662 # on some systems where configure will not decide to define it.
3663 cat >> conftest.vals <<\EOF
3664 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3665 EOF
3666
3667 # Break up conftest.vals because some shells have a limit on
3668 # the size of here documents, and old seds have small limits too.
3669
3670 rm -f conftest.tail
3671 while :
3672 do
3673   ac_lines=`grep -c . conftest.vals`
3674   # grep -c gives empty output for an empty file on some AIX systems.
3675   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3676   # Write a limited-size here document to conftest.frag.
3677   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3678   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3679   echo 'CEOF
3680   sed -f conftest.frag conftest.in > conftest.out
3681   rm -f conftest.in
3682   mv conftest.out conftest.in
3683 ' >> $CONFIG_STATUS
3684   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3685   rm -f conftest.vals
3686   mv conftest.tail conftest.vals
3687 done
3688 rm -f conftest.vals
3689
3690 cat >> $CONFIG_STATUS <<\EOF
3691   rm -f conftest.frag conftest.h
3692   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3693   cat conftest.in >> conftest.h
3694   rm -f conftest.in
3695   if cmp -s $ac_file conftest.h 2>/dev/null; then
3696     echo "$ac_file is unchanged"
3697     rm -f conftest.h
3698   else
3699     # Remove last slash and all that follows it.  Not all systems have dirname.
3700       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3701       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3702       # The file is in a subdirectory.
3703       test ! -d "$ac_dir" && mkdir "$ac_dir"
3704     fi
3705     rm -f $ac_file
3706     mv conftest.h $ac_file
3707   fi
3708 fi; done
3709
3710 EOF
3711
3712 cat >> $CONFIG_STATUS <<EOF
3713 ac_sources="java/io/$FILE_DESCRIPTOR include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
3714 ac_dests="java/io/natFileDescriptor.cc include/java-gc.h include/java-threads.h include/java-signal.h"
3715 EOF
3716
3717 cat >> $CONFIG_STATUS <<\EOF
3718 srcdir=$ac_given_srcdir
3719 while test -n "$ac_sources"; do
3720   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3721   set $ac_sources; ac_source=$1; shift; ac_sources=$*
3722
3723   echo "linking $srcdir/$ac_source to $ac_dest"
3724
3725   if test ! -r $srcdir/$ac_source; then
3726     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3727   fi
3728   rm -f $ac_dest
3729
3730   # Make relative symlinks.
3731   # Remove last slash and all that follows it.  Not all systems have dirname.
3732   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3733   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3734     # The dest file is in a subdirectory.
3735     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3736     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3737     # A "../" for each directory in $ac_dest_dir_suffix.
3738     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3739   else
3740     ac_dest_dir_suffix= ac_dots=
3741   fi
3742
3743   case "$srcdir" in
3744   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3745   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3746   esac
3747
3748   # Make a symlink if possible; otherwise try a hard link.
3749   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3750     ln $srcdir/$ac_source $ac_dest; then :
3751   else
3752     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3753   fi
3754 done
3755 EOF
3756 cat >> $CONFIG_STATUS <<EOF
3757
3758 srcdir=${srcdir}
3759 host=${host}
3760 target=${target}
3761 with_multisubdir=${with_multisubdir}
3762 ac_configure_args="${multilib_arg} ${ac_configure_args}"
3763 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3764 libgcj_basedir=${libgcj_basedir}
3765 CC="${CC}"
3766 CXX="${CXX}"
3767
3768 EOF
3769 cat >> $CONFIG_STATUS <<\EOF
3770 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
3771 if test -n "$CONFIG_FILES"; then
3772   ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
3773 fi
3774 exit 0
3775 EOF
3776 chmod +x $CONFIG_STATUS
3777 rm -fr confdefs* $ac_clean_files
3778 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3779