OSDN Git Service

1999-04-13 Andrew Haley <aph@cygnus.com>
[pf3gnuchains/gcc-fork.git] / libjava / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-target-subdir=SUBDIR      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.13"
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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
728
729 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
730
731 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
732 echo "configure:733: checking whether build environment is sane" >&5
733 # Just in case
734 sleep 1
735 echo timestamp > conftestfile
736 # Do `set' in a subshell so we don't clobber the current shell's
737 # arguments.  Must try -L first in case configure is actually a
738 # symlink; some systems play weird games with the mod time of symlinks
739 # (eg FreeBSD returns the mod time of the symlink's containing
740 # directory).
741 if (
742    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
743    if test "$*" = "X"; then
744       # -L didn't work.
745       set X `ls -t $srcdir/configure conftestfile`
746    fi
747    if test "$*" != "X $srcdir/configure conftestfile" \
748       && test "$*" != "X conftestfile $srcdir/configure"; then
749
750       # If neither matched, then we have a broken ls.  This can happen
751       # if, for instance, CONFIG_SHELL is bash and it inherits a
752       # broken ls alias from the environment.  This has actually
753       # happened.  Such a system could not be considered "sane".
754       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
755 alias in your environment" 1>&2; exit 1; }
756    fi
757
758    test "$2" = conftestfile
759    )
760 then
761    # Ok.
762    :
763 else
764    { echo "configure: error: newly created file is older than distributed files!
765 Check your system clock" 1>&2; exit 1; }
766 fi
767 rm -f conftest*
768 echo "$ac_t""yes" 1>&6
769 if test "$program_transform_name" = s,x,x,; then
770   program_transform_name=
771 else
772   # Double any \ or $.  echo might interpret backslashes.
773   cat <<\EOF_SED > conftestsed
774 s,\\,\\\\,g; s,\$,$$,g
775 EOF_SED
776   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
777   rm -f conftestsed
778 fi
779 test "$program_prefix" != NONE &&
780   program_transform_name="s,^,${program_prefix},; $program_transform_name"
781 # Use a double $ so make ignores it.
782 test "$program_suffix" != NONE &&
783   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
784
785 # sed with no file args requires a program.
786 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
787
788 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
789 echo "configure:790: checking whether ${MAKE-make} sets \${MAKE}" >&5
790 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
791 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
792   echo $ac_n "(cached) $ac_c" 1>&6
793 else
794   cat > conftestmake <<\EOF
795 all:
796         @echo 'ac_maketemp="${MAKE}"'
797 EOF
798 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
799 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
800 if test -n "$ac_maketemp"; then
801   eval ac_cv_prog_make_${ac_make}_set=yes
802 else
803   eval ac_cv_prog_make_${ac_make}_set=no
804 fi
805 rm -f conftestmake
806 fi
807 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
808   echo "$ac_t""yes" 1>&6
809   SET_MAKE=
810 else
811   echo "$ac_t""no" 1>&6
812   SET_MAKE="MAKE=${MAKE-make}"
813 fi
814
815 if test $host != $build; then
816   ac_tool_prefix=${host_alias}-
817 else
818   ac_tool_prefix=
819 fi
820
821 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
822 echo "configure:823: checking for Cygwin environment" >&5
823 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
824   echo $ac_n "(cached) $ac_c" 1>&6
825 else
826   cat > conftest.$ac_ext <<EOF
827 #line 828 "configure"
828 #include "confdefs.h"
829
830 int main() {
831
832 #ifndef __CYGWIN__
833 #define __CYGWIN__ __CYGWIN32__
834 #endif
835 return __CYGWIN__;
836 ; return 0; }
837 EOF
838 if { (eval echo configure:839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
839   rm -rf conftest*
840   ac_cv_cygwin=yes
841 else
842   echo "configure: failed program was:" >&5
843   cat conftest.$ac_ext >&5
844   rm -rf conftest*
845   ac_cv_cygwin=no
846 fi
847 rm -f conftest*
848 rm -f conftest*
849 fi
850
851 echo "$ac_t""$ac_cv_cygwin" 1>&6
852 CYGWIN=
853 test "$ac_cv_cygwin" = yes && CYGWIN=yes
854 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
855 echo "configure:856: checking for mingw32 environment" >&5
856 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
857   echo $ac_n "(cached) $ac_c" 1>&6
858 else
859   cat > conftest.$ac_ext <<EOF
860 #line 861 "configure"
861 #include "confdefs.h"
862
863 int main() {
864 return __MINGW32__;
865 ; return 0; }
866 EOF
867 if { (eval echo configure:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
868   rm -rf conftest*
869   ac_cv_mingw32=yes
870 else
871   echo "configure: failed program was:" >&5
872   cat conftest.$ac_ext >&5
873   rm -rf conftest*
874   ac_cv_mingw32=no
875 fi
876 rm -f conftest*
877 rm -f conftest*
878 fi
879
880 echo "$ac_t""$ac_cv_mingw32" 1>&6
881 MINGW32=
882 test "$ac_cv_mingw32" = yes && MINGW32=yes
883
884 # Check whether --enable-multilib or --disable-multilib was given.
885 if test "${enable_multilib+set}" = set; then
886   enableval="$enable_multilib"
887   case "${enableval}" in
888   yes) multilib=yes ;;
889   no)  multilib=no ;;
890   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
891  esac
892 else
893   multilib=yes
894 fi
895
896
897 if test "${srcdir}" = "."; then
898   if test "${with_target_subdir}" != "."; then
899     libgcj_basedir="${srcdir}/${with_multisrctop}../."
900   else
901     libgcj_basedir="${srcdir}/${with_multisrctop}."
902   fi
903 else
904   libgcj_basedir="${srcdir}/."
905 fi
906
907
908
909 # Make sure we can run config.sub.
910 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
911 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
912 fi
913
914 echo $ac_n "checking host system type""... $ac_c" 1>&6
915 echo "configure:916: checking host system type" >&5
916
917 host_alias=$host
918 case "$host_alias" in
919 NONE)
920   case $nonopt in
921   NONE)
922     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
923     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
924     fi ;;
925   *) host_alias=$nonopt ;;
926   esac ;;
927 esac
928
929 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
930 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
931 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
932 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
933 echo "$ac_t""$host" 1>&6
934
935
936
937 PACKAGE=libjava
938
939 VERSION=0.0.7
940
941 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
942   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
943 fi
944 cat >> confdefs.h <<EOF
945 #define PACKAGE "$PACKAGE"
946 EOF
947
948 cat >> confdefs.h <<EOF
949 #define VERSION "$VERSION"
950 EOF
951
952
953
954 missing_dir=`cd $ac_aux_dir && pwd`
955 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
956 echo "configure:957: checking for working aclocal" >&5
957 # Run test in a subshell; some versions of sh will print an error if
958 # an executable is not found, even if stderr is redirected.
959 # Redirect stdin to placate older versions of autoconf.  Sigh.
960 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
961    ACLOCAL=aclocal
962    echo "$ac_t""found" 1>&6
963 else
964    ACLOCAL="$missing_dir/missing aclocal"
965    echo "$ac_t""missing" 1>&6
966 fi
967
968 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
969 echo "configure:970: checking for working autoconf" >&5
970 # Run test in a subshell; some versions of sh will print an error if
971 # an executable is not found, even if stderr is redirected.
972 # Redirect stdin to placate older versions of autoconf.  Sigh.
973 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
974    AUTOCONF=autoconf
975    echo "$ac_t""found" 1>&6
976 else
977    AUTOCONF="$missing_dir/missing autoconf"
978    echo "$ac_t""missing" 1>&6
979 fi
980
981 echo $ac_n "checking for working automake""... $ac_c" 1>&6
982 echo "configure:983: checking for working automake" >&5
983 # Run test in a subshell; some versions of sh will print an error if
984 # an executable is not found, even if stderr is redirected.
985 # Redirect stdin to placate older versions of autoconf.  Sigh.
986 if (automake --version) < /dev/null > /dev/null 2>&1; then
987    AUTOMAKE=automake
988    echo "$ac_t""found" 1>&6
989 else
990    AUTOMAKE="$missing_dir/missing automake"
991    echo "$ac_t""missing" 1>&6
992 fi
993
994 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
995 echo "configure:996: checking for working autoheader" >&5
996 # Run test in a subshell; some versions of sh will print an error if
997 # an executable is not found, even if stderr is redirected.
998 # Redirect stdin to placate older versions of autoconf.  Sigh.
999 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1000    AUTOHEADER=autoheader
1001    echo "$ac_t""found" 1>&6
1002 else
1003    AUTOHEADER="$missing_dir/missing autoheader"
1004    echo "$ac_t""missing" 1>&6
1005 fi
1006
1007 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1008 echo "configure:1009: checking for working makeinfo" >&5
1009 # Run test in a subshell; some versions of sh will print an error if
1010 # an executable is not found, even if stderr is redirected.
1011 # Redirect stdin to placate older versions of autoconf.  Sigh.
1012 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1013    MAKEINFO=makeinfo
1014    echo "$ac_t""found" 1>&6
1015 else
1016    MAKEINFO="$missing_dir/missing makeinfo"
1017    echo "$ac_t""missing" 1>&6
1018 fi
1019
1020
1021
1022 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
1023 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
1024 # are probably using a cross compiler, which will not be able to fully
1025 # link an executable.  This should really be fixed in autoconf
1026 # itself.
1027
1028
1029
1030 # Extract the first word of "gcc", so it can be a program name with args.
1031 set dummy gcc; ac_word=$2
1032 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1033 echo "configure:1034: checking for $ac_word" >&5
1034 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1035   echo $ac_n "(cached) $ac_c" 1>&6
1036 else
1037   if test -n "$CC"; then
1038   ac_cv_prog_CC="$CC" # Let the user override the test.
1039 else
1040   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1041   ac_dummy="$PATH"
1042   for ac_dir in $ac_dummy; do
1043     test -z "$ac_dir" && ac_dir=.
1044     if test -f $ac_dir/$ac_word; then
1045       ac_cv_prog_CC="gcc"
1046       break
1047     fi
1048   done
1049   IFS="$ac_save_ifs"
1050 fi
1051 fi
1052 CC="$ac_cv_prog_CC"
1053 if test -n "$CC"; then
1054   echo "$ac_t""$CC" 1>&6
1055 else
1056   echo "$ac_t""no" 1>&6
1057 fi
1058
1059 if test -z "$CC"; then
1060   # Extract the first word of "cc", so it can be a program name with args.
1061 set dummy cc; ac_word=$2
1062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1063 echo "configure:1064: checking for $ac_word" >&5
1064 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1065   echo $ac_n "(cached) $ac_c" 1>&6
1066 else
1067   if test -n "$CC"; then
1068   ac_cv_prog_CC="$CC" # Let the user override the test.
1069 else
1070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1071   ac_prog_rejected=no
1072   ac_dummy="$PATH"
1073   for ac_dir in $ac_dummy; do
1074     test -z "$ac_dir" && ac_dir=.
1075     if test -f $ac_dir/$ac_word; then
1076       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1077         ac_prog_rejected=yes
1078         continue
1079       fi
1080       ac_cv_prog_CC="cc"
1081       break
1082     fi
1083   done
1084   IFS="$ac_save_ifs"
1085 if test $ac_prog_rejected = yes; then
1086   # We found a bogon in the path, so make sure we never use it.
1087   set dummy $ac_cv_prog_CC
1088   shift
1089   if test $# -gt 0; then
1090     # We chose a different compiler from the bogus one.
1091     # However, it has the same basename, so the bogon will be chosen
1092     # first if we set CC to just the basename; use the full file name.
1093     shift
1094     set dummy "$ac_dir/$ac_word" "$@"
1095     shift
1096     ac_cv_prog_CC="$@"
1097   fi
1098 fi
1099 fi
1100 fi
1101 CC="$ac_cv_prog_CC"
1102 if test -n "$CC"; then
1103   echo "$ac_t""$CC" 1>&6
1104 else
1105   echo "$ac_t""no" 1>&6
1106 fi
1107
1108   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1109 fi
1110
1111 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1112 echo "configure:1113: checking whether we are using GNU C" >&5
1113 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1114   echo $ac_n "(cached) $ac_c" 1>&6
1115 else
1116   cat > conftest.c <<EOF
1117 #ifdef __GNUC__
1118   yes;
1119 #endif
1120 EOF
1121 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1122   ac_cv_prog_gcc=yes
1123 else
1124   ac_cv_prog_gcc=no
1125 fi
1126 fi
1127
1128 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1129
1130 if test $ac_cv_prog_gcc = yes; then
1131   GCC=yes
1132   ac_test_CFLAGS="${CFLAGS+set}"
1133   ac_save_CFLAGS="$CFLAGS"
1134   CFLAGS=
1135   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1136 echo "configure:1137: checking whether ${CC-cc} accepts -g" >&5
1137 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1138   echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140   echo 'void f(){}' > conftest.c
1141 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1142   ac_cv_prog_cc_g=yes
1143 else
1144   ac_cv_prog_cc_g=no
1145 fi
1146 rm -f conftest*
1147
1148 fi
1149
1150 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1151   if test "$ac_test_CFLAGS" = set; then
1152     CFLAGS="$ac_save_CFLAGS"
1153   elif test $ac_cv_prog_cc_g = yes; then
1154     CFLAGS="-g -O2"
1155   else
1156     CFLAGS="-O2"
1157   fi
1158 else
1159   GCC=
1160   test "${CFLAGS+set}" = set || CFLAGS="-g"
1161 fi
1162
1163
1164 # Likewise for AC_PROG_CXX.
1165
1166
1167 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1168 do
1169 # Extract the first word of "$ac_prog", so it can be a program name with args.
1170 set dummy $ac_prog; ac_word=$2
1171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1172 echo "configure:1173: checking for $ac_word" >&5
1173 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1174   echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176   if test -n "$CXX"; then
1177   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1178 else
1179   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1180   ac_dummy="$PATH"
1181   for ac_dir in $ac_dummy; do
1182     test -z "$ac_dir" && ac_dir=.
1183     if test -f $ac_dir/$ac_word; then
1184       ac_cv_prog_CXX="$ac_prog"
1185       break
1186     fi
1187   done
1188   IFS="$ac_save_ifs"
1189 fi
1190 fi
1191 CXX="$ac_cv_prog_CXX"
1192 if test -n "$CXX"; then
1193   echo "$ac_t""$CXX" 1>&6
1194 else
1195   echo "$ac_t""no" 1>&6
1196 fi
1197
1198 test -n "$CXX" && break
1199 done
1200 test -n "$CXX" || CXX="gcc"
1201
1202 test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1203
1204 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1205 echo "configure:1206: checking whether we are using GNU C++" >&5
1206 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1207   echo $ac_n "(cached) $ac_c" 1>&6
1208 else
1209   cat > conftest.C <<EOF
1210 #ifdef __GNUC__
1211   yes;
1212 #endif
1213 EOF
1214 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1215   ac_cv_prog_gxx=yes
1216 else
1217   ac_cv_prog_gxx=no
1218 fi
1219 fi
1220
1221 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1222
1223 if test $ac_cv_prog_gxx = yes; then
1224   GXX=yes
1225   ac_test_CXXFLAGS="${CXXFLAGS+set}"
1226   ac_save_CXXFLAGS="$CXXFLAGS"
1227   CXXFLAGS=
1228   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1229 echo "configure:1230: checking whether ${CXX-g++} accepts -g" >&5
1230 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1231   echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233   echo 'void f(){}' > conftest.cc
1234 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1235   ac_cv_prog_cxx_g=yes
1236 else
1237   ac_cv_prog_cxx_g=no
1238 fi
1239 rm -f conftest*
1240
1241 fi
1242
1243 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1244   if test "$ac_test_CXXFLAGS" = set; then
1245     CXXFLAGS="$ac_save_CXXFLAGS"
1246   elif test $ac_cv_prog_cxx_g = yes; then
1247     CXXFLAGS="-g -O2"
1248   else
1249     CXXFLAGS="-O2"
1250   fi
1251 else
1252   GXX=
1253   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1254 fi
1255
1256
1257 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we dont
1258 # run it explicitly here, it will be run implicitly before
1259 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1260 # be run before AC_CANONICAL_HOST.
1261 echo $ac_n "checking build system type""... $ac_c" 1>&6
1262 echo "configure:1263: checking build system type" >&5
1263
1264 build_alias=$build
1265 case "$build_alias" in
1266 NONE)
1267   case $nonopt in
1268   NONE) build_alias=$host_alias ;;
1269   *) build_alias=$nonopt ;;
1270   esac ;;
1271 esac
1272
1273 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1274 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1275 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1276 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1277 echo "$ac_t""$build" 1>&6
1278
1279
1280 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1281 set dummy ${ac_tool_prefix}as; ac_word=$2
1282 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1283 echo "configure:1284: checking for $ac_word" >&5
1284 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1285   echo $ac_n "(cached) $ac_c" 1>&6
1286 else
1287   if test -n "$AS"; then
1288   ac_cv_prog_AS="$AS" # Let the user override the test.
1289 else
1290   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1291   ac_dummy="$PATH"
1292   for ac_dir in $ac_dummy; do
1293     test -z "$ac_dir" && ac_dir=.
1294     if test -f $ac_dir/$ac_word; then
1295       ac_cv_prog_AS="${ac_tool_prefix}as"
1296       break
1297     fi
1298   done
1299   IFS="$ac_save_ifs"
1300   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1301 fi
1302 fi
1303 AS="$ac_cv_prog_AS"
1304 if test -n "$AS"; then
1305   echo "$ac_t""$AS" 1>&6
1306 else
1307   echo "$ac_t""no" 1>&6
1308 fi
1309
1310
1311
1312 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1313 set dummy ${ac_tool_prefix}ar; ac_word=$2
1314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1315 echo "configure:1316: checking for $ac_word" >&5
1316 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1317   echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319   if test -n "$AR"; then
1320   ac_cv_prog_AR="$AR" # Let the user override the test.
1321 else
1322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1323   ac_dummy="$PATH"
1324   for ac_dir in $ac_dummy; do
1325     test -z "$ac_dir" && ac_dir=.
1326     if test -f $ac_dir/$ac_word; then
1327       ac_cv_prog_AR="${ac_tool_prefix}ar"
1328       break
1329     fi
1330   done
1331   IFS="$ac_save_ifs"
1332   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1333 fi
1334 fi
1335 AR="$ac_cv_prog_AR"
1336 if test -n "$AR"; then
1337   echo "$ac_t""$AR" 1>&6
1338 else
1339   echo "$ac_t""no" 1>&6
1340 fi
1341
1342
1343
1344 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1345 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1347 echo "configure:1348: checking for $ac_word" >&5
1348 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1349   echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351   if test -n "$RANLIB"; then
1352   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1353 else
1354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1355   ac_dummy="$PATH"
1356   for ac_dir in $ac_dummy; do
1357     test -z "$ac_dir" && ac_dir=.
1358     if test -f $ac_dir/$ac_word; then
1359       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1360       break
1361     fi
1362   done
1363   IFS="$ac_save_ifs"
1364 fi
1365 fi
1366 RANLIB="$ac_cv_prog_RANLIB"
1367 if test -n "$RANLIB"; then
1368   echo "$ac_t""$RANLIB" 1>&6
1369 else
1370   echo "$ac_t""no" 1>&6
1371 fi
1372
1373
1374 if test -z "$ac_cv_prog_RANLIB"; then
1375 if test -n "$ac_tool_prefix"; then
1376   # Extract the first word of "ranlib", so it can be a program name with args.
1377 set dummy ranlib; ac_word=$2
1378 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1379 echo "configure:1380: checking for $ac_word" >&5
1380 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1381   echo $ac_n "(cached) $ac_c" 1>&6
1382 else
1383   if test -n "$RANLIB"; then
1384   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1385 else
1386   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1387   ac_dummy="$PATH"
1388   for ac_dir in $ac_dummy; do
1389     test -z "$ac_dir" && ac_dir=.
1390     if test -f $ac_dir/$ac_word; then
1391       ac_cv_prog_RANLIB="ranlib"
1392       break
1393     fi
1394   done
1395   IFS="$ac_save_ifs"
1396   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1397 fi
1398 fi
1399 RANLIB="$ac_cv_prog_RANLIB"
1400 if test -n "$RANLIB"; then
1401   echo "$ac_t""$RANLIB" 1>&6
1402 else
1403   echo "$ac_t""no" 1>&6
1404 fi
1405
1406 else
1407   RANLIB=":"
1408 fi
1409 fi
1410
1411
1412 # Find a good install program.  We prefer a C program (faster),
1413 # so one script is as good as another.  But avoid the broken or
1414 # incompatible versions:
1415 # SysV /etc/install, /usr/sbin/install
1416 # SunOS /usr/etc/install
1417 # IRIX /sbin/install
1418 # AIX /bin/install
1419 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1420 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1421 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1422 # ./install, which can be erroneously created by make from ./install.sh.
1423 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1424 echo "configure:1425: checking for a BSD compatible install" >&5
1425 if test -z "$INSTALL"; then
1426 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1427   echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1430   for ac_dir in $PATH; do
1431     # Account for people who put trailing slashes in PATH elements.
1432     case "$ac_dir/" in
1433     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1434     *)
1435       # OSF1 and SCO ODT 3.0 have their own names for install.
1436       # Don't use installbsd from OSF since it installs stuff as root
1437       # by default.
1438       for ac_prog in ginstall scoinst install; do
1439         if test -f $ac_dir/$ac_prog; then
1440           if test $ac_prog = install &&
1441             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1442             # AIX install.  It has an incompatible calling convention.
1443             :
1444           else
1445             ac_cv_path_install="$ac_dir/$ac_prog -c"
1446             break 2
1447           fi
1448         fi
1449       done
1450       ;;
1451     esac
1452   done
1453   IFS="$ac_save_IFS"
1454
1455 fi
1456   if test "${ac_cv_path_install+set}" = set; then
1457     INSTALL="$ac_cv_path_install"
1458   else
1459     # As a last resort, use the slow shell script.  We don't cache a
1460     # path for INSTALL within a source directory, because that will
1461     # break other packages using the cache if that directory is
1462     # removed, or if the path is relative.
1463     INSTALL="$ac_install_sh"
1464   fi
1465 fi
1466 echo "$ac_t""$INSTALL" 1>&6
1467
1468 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1469 # It thinks the first close brace ends the variable substitution.
1470 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1471
1472 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1473
1474 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1475
1476
1477 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1478 echo "configure:1479: checking whether to enable maintainer-specific portions of Makefiles" >&5
1479     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1480 if test "${enable_maintainer_mode+set}" = set; then
1481   enableval="$enable_maintainer_mode"
1482   USE_MAINTAINER_MODE=$enableval
1483 else
1484   USE_MAINTAINER_MODE=no
1485 fi
1486
1487   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1488   
1489
1490 if test $USE_MAINTAINER_MODE = yes; then
1491   MAINTAINER_MODE_TRUE=
1492   MAINTAINER_MODE_FALSE='#'
1493 else
1494   MAINTAINER_MODE_TRUE='#'
1495   MAINTAINER_MODE_FALSE=
1496 fi
1497   MAINT=$MAINTAINER_MODE_TRUE
1498   
1499
1500
1501 # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
1502 # at least currently, we never actually build a program, so we never
1503 # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
1504 # fails, because we are probably configuring with a cross compiler
1505 # which cant create executables.  So we include AC_EXEEXT to keep
1506 # automake happy, but we dont execute it, since we dont care about
1507 # the result.
1508 if false; then
1509   
1510
1511 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1512 echo "configure:1513: checking for executable suffix" >&5
1513 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1514   echo $ac_n "(cached) $ac_c" 1>&6
1515 else
1516   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1517   ac_cv_exeext=.exe
1518 else
1519   rm -f conftest*
1520   echo 'int main () { return 0; }' > conftest.$ac_ext
1521   ac_cv_exeext=
1522   if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1523     for file in conftest.*; do
1524       case $file in
1525       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1526       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1527       esac
1528     done
1529   else
1530     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1531   fi
1532   rm -f conftest*
1533   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1534 fi
1535 fi
1536
1537 EXEEXT=""
1538 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1539 echo "$ac_t""${ac_cv_exeext}" 1>&6
1540 ac_exeext=$EXEEXT
1541
1542 fi
1543
1544 # configure.host sets the following important variables
1545 #       libgcj_cflags    - host specific C compiler flags
1546 #       libgcj_cxxflags  - host specific C++ compiler flags
1547 #       libgcj_javaflags - host specific Java compiler flags
1548
1549 libgcj_cflags=
1550 libgcj_cxxflags=
1551 libgcj_javaflags=
1552
1553 . ${libgcj_basedir}/configure.host
1554
1555 case ${libgcj_basedir} in
1556 /* | A-Za-z:/\\*) libgcj_flagbasedir=${libgcj_basedir} ;;
1557 *) libgcj_flagbasedir='$(top_builddir)/'${libgcj_basedir} ;;
1558 esac
1559
1560 LIBGCJ_CFLAGS="${libgcj_cflags}"
1561 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1562 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
1573    COMPPATH=.
1574 else
1575    COMPPATH=..
1576 fi
1577
1578
1579
1580
1581 if test -d $srcdir/testsuite; then
1582   TESTSUBDIR_TRUE=
1583   TESTSUBDIR_FALSE='#'
1584 else
1585   TESTSUBDIR_TRUE='#'
1586   TESTSUBDIR_FALSE=
1587 fi
1588
1589 # Check whether --enable-fast-character or --disable-fast-character was given.
1590 if test "${enable_fast_character+set}" = set; then
1591   enableval="$enable_fast_character"
1592   # Nothing
1593
1594 else
1595   cat >> confdefs.h <<\EOF
1596 #define COMPACT_CHARACTER 1
1597 EOF
1598
1599 fi
1600
1601
1602 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
1603 if test "${enable_libgcj_debug+set}" = set; then
1604   enableval="$enable_libgcj_debug"
1605   if test "$enable_libgcj_debug" = yes; then
1606      cat >> confdefs.h <<\EOF
1607 #define DEBUG 1
1608 EOF
1609
1610   fi
1611 fi
1612
1613
1614 TARGET_ECOS="no"
1615 # Check whether --with-ecos or --without-ecos was given.
1616 if test "${with_ecos+set}" = set; then
1617   withval="$with_ecos"
1618   TARGET_ECOS="$with_ecos"
1619
1620 fi
1621
1622
1623 case "$TARGET_ECOS" in
1624    no)
1625       FILE_DESCRIPTOR=natFileDescriptorPosix.cc
1626       ;;
1627    *)
1628       FILE_DESCRIPTOR=natFileDescriptorEcos.cc
1629       cat >> confdefs.h <<\EOF
1630 #define ECOS 1
1631 EOF
1632
1633       ;;
1634 esac
1635
1636 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1637 echo "configure:1638: checking how to run the C preprocessor" >&5
1638 # On Suns, sometimes $CPP names a directory.
1639 if test -n "$CPP" && test -d "$CPP"; then
1640   CPP=
1641 fi
1642 if test -z "$CPP"; then
1643 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1644   echo $ac_n "(cached) $ac_c" 1>&6
1645 else
1646     # This must be in double quotes, not single quotes, because CPP may get
1647   # substituted into the Makefile and "${CC-cc}" will confuse make.
1648   CPP="${CC-cc} -E"
1649   # On the NeXT, cc -E runs the code through the compiler's parser,
1650   # not just through cpp.
1651   cat > conftest.$ac_ext <<EOF
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1654 #include <assert.h>
1655 Syntax Error
1656 EOF
1657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1658 { (eval echo configure:1659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1660 if test -z "$ac_err"; then
1661   :
1662 else
1663   echo "$ac_err" >&5
1664   echo "configure: failed program was:" >&5
1665   cat conftest.$ac_ext >&5
1666   rm -rf conftest*
1667   CPP="${CC-cc} -E -traditional-cpp"
1668   cat > conftest.$ac_ext <<EOF
1669 #line 1670 "configure"
1670 #include "confdefs.h"
1671 #include <assert.h>
1672 Syntax Error
1673 EOF
1674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1675 { (eval echo configure:1676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1677 if test -z "$ac_err"; then
1678   :
1679 else
1680   echo "$ac_err" >&5
1681   echo "configure: failed program was:" >&5
1682   cat conftest.$ac_ext >&5
1683   rm -rf conftest*
1684   CPP="${CC-cc} -nologo -E"
1685   cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 #include <assert.h>
1689 Syntax Error
1690 EOF
1691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1692 { (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1694 if test -z "$ac_err"; then
1695   :
1696 else
1697   echo "$ac_err" >&5
1698   echo "configure: failed program was:" >&5
1699   cat conftest.$ac_ext >&5
1700   rm -rf conftest*
1701   CPP=/lib/cpp
1702 fi
1703 rm -f conftest*
1704 fi
1705 rm -f conftest*
1706 fi
1707 rm -f conftest*
1708   ac_cv_prog_CPP="$CPP"
1709 fi
1710   CPP="$ac_cv_prog_CPP"
1711 else
1712   ac_cv_prog_CPP="$CPP"
1713 fi
1714 echo "$ac_t""$CPP" 1>&6
1715
1716 cat > conftest.$ac_ext <<EOF
1717 #line 1718 "configure"
1718 #include "confdefs.h"
1719 #include <sys/types.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 cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #include <sys/config.h>
1735 EOF
1736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1737   egrep "__uint32_t" >/dev/null 2>&1; then
1738   rm -rf conftest*
1739   cat >> confdefs.h <<\EOF
1740 #define HAVE_INT32_DEFINED 1
1741 EOF
1742
1743 fi
1744 rm -f conftest*
1745
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 "mktime" >/dev/null 2>&1; then
1754   rm -rf conftest*
1755   cat >> confdefs.h <<\EOF
1756 #define HAVE_MKTIME 1
1757 EOF
1758
1759 fi
1760 rm -f conftest*
1761
1762 cat > conftest.$ac_ext <<EOF
1763 #line 1764 "configure"
1764 #include "confdefs.h"
1765 #include <time.h>
1766 EOF
1767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1768   egrep "localtime" >/dev/null 2>&1; then
1769   rm -rf conftest*
1770   cat >> confdefs.h <<\EOF
1771 #define HAVE_LOCALTIME 1
1772 EOF
1773
1774 fi
1775 rm -f conftest*
1776
1777
1778 test -d java || mkdir java
1779 test -d java/io || mkdir java/io
1780
1781
1782 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
1783 echo "configure:1784: checking for garbage collector to use" >&5
1784 # Check whether --enable-java-gc or --disable-java-gc was given.
1785 if test "${enable_java_gc+set}" = set; then
1786   enableval="$enable_java_gc"
1787   
1788   GC=$enableval
1789 else
1790   GC=boehm
1791 fi
1792
1793 GCLIBS=
1794 GCINCS=
1795 GCDEPS=
1796 GCOBJS=
1797 case "$GC" in
1798  boehm)
1799     echo "$ac_t""boehm" 1>&6
1800     GCLIBS='-L$(top_builddir)/../boehm-gc -lgcjgc'
1801     GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.a'
1802     GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
1803             GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
1804     GCOBJS=boehm.o
1805     GCHDR=boehm-gc.h
1806         cat >> confdefs.h <<\EOF
1807 #define HAVE_BOEHM_GC 1
1808 EOF
1809
1810     ;;
1811  no)
1812     echo "$ac_t""none" 1>&6
1813     GCOBJS=nogc.o
1814     GCHDR=no-gc.h
1815     ;;
1816  *)
1817     { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
1818     ;;
1819 esac
1820
1821
1822
1823
1824
1825
1826
1827 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
1828 echo "configure:1829: checking for threads package to use" >&5
1829 # Check whether --enable-threads or --disable-threads was given.
1830 if test "${enable_threads+set}" = set; then
1831   enableval="$enable_threads"
1832   THREADS=$enableval
1833 else
1834     THREADS=no
1835 fi
1836
1837
1838 if test "$THREADS" = yes; then
1839    case "$host" in
1840     *-*-vxworks*)
1841        THREADS=vxworks
1842        ;;
1843     *-*-linux*)
1844        # FIXME: this isn't correct in all cases.
1845        THREADS=posix
1846        ;;
1847     *-*-win*)
1848        THREADS=win32
1849        ;;
1850     *-*-irix*)
1851        THREADS=irix
1852        ;;
1853     *-*-solaris*)
1854        # FIXME: for now, choose POSIX, because we implement that.
1855        # Later, choose solaris threads.
1856        THREADS=posix
1857        ;;
1858     *)
1859        # For now.
1860        THREADS=none
1861        ;;
1862    esac
1863 fi
1864
1865 case "$THREADS" in
1866  no | none | single)
1867     THREADS=none
1868     ;;
1869  posix | pthreads)
1870     THREADS=posix
1871     case "$host" in
1872      *-*-linux*)
1873         cat >> confdefs.h <<\EOF
1874 #define LINUX_THREADS 1
1875 EOF
1876
1877         ;;
1878     esac
1879     ;;
1880  qt)
1881     ;;
1882  decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
1883     { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
1884     ;;
1885  *)
1886     { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
1887     ;;
1888 esac
1889 echo "$ac_t""$THREADS" 1>&6
1890
1891 THREADLIBS=
1892 THREADINCS=
1893 THREADDEPS=
1894 THREADOBJS=
1895 THREADH=
1896 case "$THREADS" in
1897  posix)
1898     THREADLIBS=-lpthread
1899     THREADOBJS=posix-threads.o
1900     THREADH=posix-threads.h
1901     # MIT pthreads doesn't seem to have the mutexattr functions.
1902     # But for now we don't check for it.  We just assume you aren't
1903     # using MIT pthreads.
1904     cat >> confdefs.h <<\EOF
1905 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
1906 EOF
1907
1908     ;;
1909
1910  qt)
1911     THREADLIBS='-L$(top_builddir)/../qthreads -lgcjcoop'
1912     THREADOBJS=quick-threads.o
1913     THREADINCS='-I$(top_srcdir)/../qthreads'
1914     THREADH=quick-threads.h
1915     THREADDEPS='$(top_builddir)/../qthreads/libgcjcoop.a'
1916     ;;
1917
1918  none)
1919     THREADOBJS=no-threads.o
1920     THREADH=no-threads.h
1921     ;;
1922 esac
1923
1924
1925
1926
1927
1928
1929
1930
1931 if test "$GCC" = yes; then
1932   USING_GCC_TRUE=
1933   USING_GCC_FALSE='#'
1934 else
1935   USING_GCC_TRUE='#'
1936   USING_GCC_FALSE=
1937 fi
1938
1939 CANADIAN=no
1940 NULL_TARGET=no
1941
1942 # Find eh-common.h and support headers.  If we're in the tree with
1943 # gcc, then look there.  Otherwise look in compat-include.  If all else
1944 # fails, just hope the user has set things up somehow.
1945 if test -r $srcdir/../gcc/eh-common.h; then
1946    EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
1947 else
1948    if test -d $srcdir/../compat-include; then
1949       EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
1950    else
1951       EH_COMMON_INCLUDE=
1952    fi
1953 fi
1954
1955 if test -n "${with_cross_host}"; then
1956    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
1957    # may not work correctly, because the compiler may not be able to
1958    # link executables.
1959
1960    # We assume newlib.  This lets us hard-code the functions we know
1961    # we'll have.
1962    cat >> confdefs.h <<\EOF
1963 #define HAVE_MEMMOVE 1
1964 EOF
1965
1966    cat >> confdefs.h <<\EOF
1967 #define HAVE_MEMCPY 1
1968 EOF
1969
1970    cat >> confdefs.h <<\EOF
1971 #define HAVE_STRERROR 1
1972 EOF
1973
1974    cat >> confdefs.h <<\EOF
1975 #define HAVE_CTIME_R 1
1976 EOF
1977
1978    cat >> confdefs.h <<\EOF
1979 #define HAVE_GMTIME_R 1
1980 EOF
1981
1982    cat >> confdefs.h <<\EOF
1983 #define HAVE_LOCALTIME_R 1
1984 EOF
1985
1986       cat >> confdefs.h <<\EOF
1987 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
1988 EOF
1989
1990       cat >> confdefs.h <<\EOF
1991 #define HAVE_ALLOCA 1
1992 EOF
1993
1994
1995    # If Canadian cross, then don't pick up tools from the build
1996    # directory.
1997    if test "$build" != "$with_cross_host"; then
1998       CANADIAN=yes
1999       EH_COMMON_INCLUDE=
2000    fi
2001 else
2002    # Some POSIX thread systems don't have pthread_mutexattr_settype.
2003    # E.g., Solaris.
2004    for ac_func in strerror ioctl select open fsync sleep
2005 do
2006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2007 echo "configure:2008: checking for $ac_func" >&5
2008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2009   echo $ac_n "(cached) $ac_c" 1>&6
2010 else
2011   cat > conftest.$ac_ext <<EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2014 /* System header to define __stub macros and hopefully few prototypes,
2015     which can conflict with char $ac_func(); below.  */
2016 #include <assert.h>
2017 /* Override any gcc2 internal prototype to avoid an error.  */
2018 /* We use char because int might match the return type of a gcc2
2019     builtin and then its argument prototype would still apply.  */
2020 char $ac_func();
2021
2022 int main() {
2023
2024 /* The GNU C library defines this for functions which it implements
2025     to always fail with ENOSYS.  Some functions are actually named
2026     something starting with __ and the normal name is an alias.  */
2027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2028 choke me
2029 #else
2030 $ac_func();
2031 #endif
2032
2033 ; return 0; }
2034 EOF
2035 if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2036   rm -rf conftest*
2037   eval "ac_cv_func_$ac_func=yes"
2038 else
2039   echo "configure: failed program was:" >&5
2040   cat conftest.$ac_ext >&5
2041   rm -rf conftest*
2042   eval "ac_cv_func_$ac_func=no"
2043 fi
2044 rm -f conftest*
2045 fi
2046
2047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2048   echo "$ac_t""yes" 1>&6
2049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2050   cat >> confdefs.h <<EOF
2051 #define $ac_tr_func 1
2052 EOF
2053  
2054 else
2055   echo "$ac_t""no" 1>&6
2056 fi
2057 done
2058
2059    for ac_func in ctime_r ctime
2060 do
2061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2062 echo "configure:2063: checking for $ac_func" >&5
2063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2064   echo $ac_n "(cached) $ac_c" 1>&6
2065 else
2066   cat > conftest.$ac_ext <<EOF
2067 #line 2068 "configure"
2068 #include "confdefs.h"
2069 /* System header to define __stub macros and hopefully few prototypes,
2070     which can conflict with char $ac_func(); below.  */
2071 #include <assert.h>
2072 /* Override any gcc2 internal prototype to avoid an error.  */
2073 /* We use char because int might match the return type of a gcc2
2074     builtin and then its argument prototype would still apply.  */
2075 char $ac_func();
2076
2077 int main() {
2078
2079 /* The GNU C library defines this for functions which it implements
2080     to always fail with ENOSYS.  Some functions are actually named
2081     something starting with __ and the normal name is an alias.  */
2082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2083 choke me
2084 #else
2085 $ac_func();
2086 #endif
2087
2088 ; return 0; }
2089 EOF
2090 if { (eval echo configure:2091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2091   rm -rf conftest*
2092   eval "ac_cv_func_$ac_func=yes"
2093 else
2094   echo "configure: failed program was:" >&5
2095   cat conftest.$ac_ext >&5
2096   rm -rf conftest*
2097   eval "ac_cv_func_$ac_func=no"
2098 fi
2099 rm -f conftest*
2100 fi
2101
2102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2103   echo "$ac_t""yes" 1>&6
2104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2105   cat >> confdefs.h <<EOF
2106 #define $ac_tr_func 1
2107 EOF
2108  break
2109 else
2110   echo "$ac_t""no" 1>&6
2111 fi
2112 done
2113
2114    for ac_func in gmtime_r localtime_r readdir_r getpwuid_r
2115 do
2116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2117 echo "configure:2118: checking for $ac_func" >&5
2118 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2119   echo $ac_n "(cached) $ac_c" 1>&6
2120 else
2121   cat > conftest.$ac_ext <<EOF
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124 /* System header to define __stub macros and hopefully few prototypes,
2125     which can conflict with char $ac_func(); below.  */
2126 #include <assert.h>
2127 /* Override any gcc2 internal prototype to avoid an error.  */
2128 /* We use char because int might match the return type of a gcc2
2129     builtin and then its argument prototype would still apply.  */
2130 char $ac_func();
2131
2132 int main() {
2133
2134 /* The GNU C library defines this for functions which it implements
2135     to always fail with ENOSYS.  Some functions are actually named
2136     something starting with __ and the normal name is an alias.  */
2137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2138 choke me
2139 #else
2140 $ac_func();
2141 #endif
2142
2143 ; return 0; }
2144 EOF
2145 if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2146   rm -rf conftest*
2147   eval "ac_cv_func_$ac_func=yes"
2148 else
2149   echo "configure: failed program was:" >&5
2150   cat conftest.$ac_ext >&5
2151   rm -rf conftest*
2152   eval "ac_cv_func_$ac_func=no"
2153 fi
2154 rm -f conftest*
2155 fi
2156
2157 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2158   echo "$ac_t""yes" 1>&6
2159     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2160   cat >> confdefs.h <<EOF
2161 #define $ac_tr_func 1
2162 EOF
2163  
2164 else
2165   echo "$ac_t""no" 1>&6
2166 fi
2167 done
2168
2169    for ac_func in access stat mkdir rename rmdir unlink realpath
2170 do
2171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2172 echo "configure:2173: checking for $ac_func" >&5
2173 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2174   echo $ac_n "(cached) $ac_c" 1>&6
2175 else
2176   cat > conftest.$ac_ext <<EOF
2177 #line 2178 "configure"
2178 #include "confdefs.h"
2179 /* System header to define __stub macros and hopefully few prototypes,
2180     which can conflict with char $ac_func(); below.  */
2181 #include <assert.h>
2182 /* Override any gcc2 internal prototype to avoid an error.  */
2183 /* We use char because int might match the return type of a gcc2
2184     builtin and then its argument prototype would still apply.  */
2185 char $ac_func();
2186
2187 int main() {
2188
2189 /* The GNU C library defines this for functions which it implements
2190     to always fail with ENOSYS.  Some functions are actually named
2191     something starting with __ and the normal name is an alias.  */
2192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2193 choke me
2194 #else
2195 $ac_func();
2196 #endif
2197
2198 ; return 0; }
2199 EOF
2200 if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2201   rm -rf conftest*
2202   eval "ac_cv_func_$ac_func=yes"
2203 else
2204   echo "configure: failed program was:" >&5
2205   cat conftest.$ac_ext >&5
2206   rm -rf conftest*
2207   eval "ac_cv_func_$ac_func=no"
2208 fi
2209 rm -f conftest*
2210 fi
2211
2212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2213   echo "$ac_t""yes" 1>&6
2214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2215   cat >> confdefs.h <<EOF
2216 #define $ac_tr_func 1
2217 EOF
2218  
2219 else
2220   echo "$ac_t""no" 1>&6
2221 fi
2222 done
2223
2224    for ac_func in inet_aton inet_addr
2225 do
2226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2227 echo "configure:2228: checking for $ac_func" >&5
2228 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2229   echo $ac_n "(cached) $ac_c" 1>&6
2230 else
2231   cat > conftest.$ac_ext <<EOF
2232 #line 2233 "configure"
2233 #include "confdefs.h"
2234 /* System header to define __stub macros and hopefully few prototypes,
2235     which can conflict with char $ac_func(); below.  */
2236 #include <assert.h>
2237 /* Override any gcc2 internal prototype to avoid an error.  */
2238 /* We use char because int might match the return type of a gcc2
2239     builtin and then its argument prototype would still apply.  */
2240 char $ac_func();
2241
2242 int main() {
2243
2244 /* The GNU C library defines this for functions which it implements
2245     to always fail with ENOSYS.  Some functions are actually named
2246     something starting with __ and the normal name is an alias.  */
2247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2248 choke me
2249 #else
2250 $ac_func();
2251 #endif
2252
2253 ; return 0; }
2254 EOF
2255 if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2256   rm -rf conftest*
2257   eval "ac_cv_func_$ac_func=yes"
2258 else
2259   echo "configure: failed program was:" >&5
2260   cat conftest.$ac_ext >&5
2261   rm -rf conftest*
2262   eval "ac_cv_func_$ac_func=no"
2263 fi
2264 rm -f conftest*
2265 fi
2266
2267 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2268   echo "$ac_t""yes" 1>&6
2269     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2270   cat >> confdefs.h <<EOF
2271 #define $ac_tr_func 1
2272 EOF
2273  break
2274 else
2275   echo "$ac_t""no" 1>&6
2276 fi
2277 done
2278
2279    for ac_func in inet_pton uname
2280 do
2281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2282 echo "configure:2283: checking for $ac_func" >&5
2283 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2284   echo $ac_n "(cached) $ac_c" 1>&6
2285 else
2286   cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289 /* System header to define __stub macros and hopefully few prototypes,
2290     which can conflict with char $ac_func(); below.  */
2291 #include <assert.h>
2292 /* Override any gcc2 internal prototype to avoid an error.  */
2293 /* We use char because int might match the return type of a gcc2
2294     builtin and then its argument prototype would still apply.  */
2295 char $ac_func();
2296
2297 int main() {
2298
2299 /* The GNU C library defines this for functions which it implements
2300     to always fail with ENOSYS.  Some functions are actually named
2301     something starting with __ and the normal name is an alias.  */
2302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2303 choke me
2304 #else
2305 $ac_func();
2306 #endif
2307
2308 ; return 0; }
2309 EOF
2310 if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2311   rm -rf conftest*
2312   eval "ac_cv_func_$ac_func=yes"
2313 else
2314   echo "configure: failed program was:" >&5
2315   cat conftest.$ac_ext >&5
2316   rm -rf conftest*
2317   eval "ac_cv_func_$ac_func=no"
2318 fi
2319 rm -f conftest*
2320 fi
2321
2322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2323   echo "$ac_t""yes" 1>&6
2324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2325   cat >> confdefs.h <<EOF
2326 #define $ac_tr_func 1
2327 EOF
2328  
2329 else
2330   echo "$ac_t""no" 1>&6
2331 fi
2332 done
2333
2334
2335    for ac_func in gethostbyname_r
2336 do
2337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2338 echo "configure:2339: checking for $ac_func" >&5
2339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2340   echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342   cat > conftest.$ac_ext <<EOF
2343 #line 2344 "configure"
2344 #include "confdefs.h"
2345 /* System header to define __stub macros and hopefully few prototypes,
2346     which can conflict with char $ac_func(); below.  */
2347 #include <assert.h>
2348 /* Override any gcc2 internal prototype to avoid an error.  */
2349 /* We use char because int might match the return type of a gcc2
2350     builtin and then its argument prototype would still apply.  */
2351 char $ac_func();
2352
2353 int main() {
2354
2355 /* The GNU C library defines this for functions which it implements
2356     to always fail with ENOSYS.  Some functions are actually named
2357     something starting with __ and the normal name is an alias.  */
2358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2359 choke me
2360 #else
2361 $ac_func();
2362 #endif
2363
2364 ; return 0; }
2365 EOF
2366 if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2367   rm -rf conftest*
2368   eval "ac_cv_func_$ac_func=yes"
2369 else
2370   echo "configure: failed program was:" >&5
2371   cat conftest.$ac_ext >&5
2372   rm -rf conftest*
2373   eval "ac_cv_func_$ac_func=no"
2374 fi
2375 rm -f conftest*
2376 fi
2377
2378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2379   echo "$ac_t""yes" 1>&6
2380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2381   cat >> confdefs.h <<EOF
2382 #define $ac_tr_func 1
2383 EOF
2384  
2385      cat >> confdefs.h <<\EOF
2386 #define HAVE_GETHOSTBYNAME_R 1
2387 EOF
2388
2389      # There are two different kinds of gethostbyname_r.
2390      # We look for the one that returns `int'.
2391      # Hopefully this check is robust enough.
2392      cat > conftest.$ac_ext <<EOF
2393 #line 2394 "configure"
2394 #include "confdefs.h"
2395 #include <netdb.h>
2396 EOF
2397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2398   egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
2399   rm -rf conftest*
2400   
2401        cat >> confdefs.h <<\EOF
2402 #define GETHOSTBYNAME_R_RETURNS_INT 1
2403 EOF
2404
2405 fi
2406 rm -f conftest*
2407
2408 else
2409   echo "$ac_t""no" 1>&6
2410 fi
2411 done
2412
2413
2414    for ac_func in gethostbyaddr_r
2415 do
2416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2417 echo "configure:2418: checking for $ac_func" >&5
2418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2419   echo $ac_n "(cached) $ac_c" 1>&6
2420 else
2421   cat > conftest.$ac_ext <<EOF
2422 #line 2423 "configure"
2423 #include "confdefs.h"
2424 /* System header to define __stub macros and hopefully few prototypes,
2425     which can conflict with char $ac_func(); below.  */
2426 #include <assert.h>
2427 /* Override any gcc2 internal prototype to avoid an error.  */
2428 /* We use char because int might match the return type of a gcc2
2429     builtin and then its argument prototype would still apply.  */
2430 char $ac_func();
2431
2432 int main() {
2433
2434 /* The GNU C library defines this for functions which it implements
2435     to always fail with ENOSYS.  Some functions are actually named
2436     something starting with __ and the normal name is an alias.  */
2437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2438 choke me
2439 #else
2440 $ac_func();
2441 #endif
2442
2443 ; return 0; }
2444 EOF
2445 if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2446   rm -rf conftest*
2447   eval "ac_cv_func_$ac_func=yes"
2448 else
2449   echo "configure: failed program was:" >&5
2450   cat conftest.$ac_ext >&5
2451   rm -rf conftest*
2452   eval "ac_cv_func_$ac_func=no"
2453 fi
2454 rm -f conftest*
2455 fi
2456
2457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2458   echo "$ac_t""yes" 1>&6
2459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2460   cat >> confdefs.h <<EOF
2461 #define $ac_tr_func 1
2462 EOF
2463  
2464      cat >> confdefs.h <<\EOF
2465 #define HAVE_GETHOSTBYADDR_R 1
2466 EOF
2467
2468      # There are two different kinds of gethostbyaddr_r.
2469      # We look for the one that returns `int'.
2470      # Hopefully this check is robust enough.
2471      cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 #include <netdb.h>
2475 EOF
2476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2477   egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
2478   rm -rf conftest*
2479   
2480        cat >> confdefs.h <<\EOF
2481 #define GETHOSTBYADDR_R_RETURNS_INT 1
2482 EOF
2483
2484 fi
2485 rm -f conftest*
2486
2487 else
2488   echo "$ac_t""no" 1>&6
2489 fi
2490 done
2491
2492
2493    for ac_func in gethostname
2494 do
2495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2496 echo "configure:2497: checking for $ac_func" >&5
2497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2498   echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500   cat > conftest.$ac_ext <<EOF
2501 #line 2502 "configure"
2502 #include "confdefs.h"
2503 /* System header to define __stub macros and hopefully few prototypes,
2504     which can conflict with char $ac_func(); below.  */
2505 #include <assert.h>
2506 /* Override any gcc2 internal prototype to avoid an error.  */
2507 /* We use char because int might match the return type of a gcc2
2508     builtin and then its argument prototype would still apply.  */
2509 char $ac_func();
2510
2511 int main() {
2512
2513 /* The GNU C library defines this for functions which it implements
2514     to always fail with ENOSYS.  Some functions are actually named
2515     something starting with __ and the normal name is an alias.  */
2516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2517 choke me
2518 #else
2519 $ac_func();
2520 #endif
2521
2522 ; return 0; }
2523 EOF
2524 if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2525   rm -rf conftest*
2526   eval "ac_cv_func_$ac_func=yes"
2527 else
2528   echo "configure: failed program was:" >&5
2529   cat conftest.$ac_ext >&5
2530   rm -rf conftest*
2531   eval "ac_cv_func_$ac_func=no"
2532 fi
2533 rm -f conftest*
2534 fi
2535
2536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2537   echo "$ac_t""yes" 1>&6
2538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2539   cat >> confdefs.h <<EOF
2540 #define $ac_tr_func 1
2541 EOF
2542  
2543      cat >> confdefs.h <<\EOF
2544 #define HAVE_GETHOSTNAME 1
2545 EOF
2546
2547      cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550 #include <unistd.h>
2551 EOF
2552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2553   egrep "gethostname" >/dev/null 2>&1; then
2554   rm -rf conftest*
2555   
2556        cat >> confdefs.h <<\EOF
2557 #define HAVE_GETHOSTNAME_DECL 1
2558 EOF
2559
2560 fi
2561 rm -f conftest*
2562
2563 else
2564   echo "$ac_t""no" 1>&6
2565 fi
2566 done
2567
2568
2569    # Look for these functions in the thread library.
2570    save_LIBS="$LIBS"
2571    LIBS="$LIBS $THREADLIBS"
2572    for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np sched_yield
2573 do
2574 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2575 echo "configure:2576: checking for $ac_func" >&5
2576 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   cat > conftest.$ac_ext <<EOF
2580 #line 2581 "configure"
2581 #include "confdefs.h"
2582 /* System header to define __stub macros and hopefully few prototypes,
2583     which can conflict with char $ac_func(); below.  */
2584 #include <assert.h>
2585 /* Override any gcc2 internal prototype to avoid an error.  */
2586 /* We use char because int might match the return type of a gcc2
2587     builtin and then its argument prototype would still apply.  */
2588 char $ac_func();
2589
2590 int main() {
2591
2592 /* The GNU C library defines this for functions which it implements
2593     to always fail with ENOSYS.  Some functions are actually named
2594     something starting with __ and the normal name is an alias.  */
2595 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2596 choke me
2597 #else
2598 $ac_func();
2599 #endif
2600
2601 ; return 0; }
2602 EOF
2603 if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2604   rm -rf conftest*
2605   eval "ac_cv_func_$ac_func=yes"
2606 else
2607   echo "configure: failed program was:" >&5
2608   cat conftest.$ac_ext >&5
2609   rm -rf conftest*
2610   eval "ac_cv_func_$ac_func=no"
2611 fi
2612 rm -f conftest*
2613 fi
2614
2615 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2616   echo "$ac_t""yes" 1>&6
2617     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2618   cat >> confdefs.h <<EOF
2619 #define $ac_tr_func 1
2620 EOF
2621  
2622 else
2623   echo "$ac_t""no" 1>&6
2624 fi
2625 done
2626
2627    LIBS="$save_LIBS"
2628
2629    # We require a way to get the time.
2630    time_found=no
2631    for ac_func in gettimeofday time ftime
2632 do
2633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2634 echo "configure:2635: checking for $ac_func" >&5
2635 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641 /* System header to define __stub macros and hopefully few prototypes,
2642     which can conflict with char $ac_func(); below.  */
2643 #include <assert.h>
2644 /* Override any gcc2 internal prototype to avoid an error.  */
2645 /* We use char because int might match the return type of a gcc2
2646     builtin and then its argument prototype would still apply.  */
2647 char $ac_func();
2648
2649 int main() {
2650
2651 /* The GNU C library defines this for functions which it implements
2652     to always fail with ENOSYS.  Some functions are actually named
2653     something starting with __ and the normal name is an alias.  */
2654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2655 choke me
2656 #else
2657 $ac_func();
2658 #endif
2659
2660 ; return 0; }
2661 EOF
2662 if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2663   rm -rf conftest*
2664   eval "ac_cv_func_$ac_func=yes"
2665 else
2666   echo "configure: failed program was:" >&5
2667   cat conftest.$ac_ext >&5
2668   rm -rf conftest*
2669   eval "ac_cv_func_$ac_func=no"
2670 fi
2671 rm -f conftest*
2672 fi
2673
2674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2675   echo "$ac_t""yes" 1>&6
2676     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2677   cat >> confdefs.h <<EOF
2678 #define $ac_tr_func 1
2679 EOF
2680  time_found=yes
2681 else
2682   echo "$ac_t""no" 1>&6
2683 fi
2684 done
2685
2686    if test "$time_found" = no; then
2687       { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
2688    fi
2689
2690    # We require memmove.
2691    memmove_found=no
2692    for ac_func in memmove
2693 do
2694 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2695 echo "configure:2696: checking for $ac_func" >&5
2696 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 /* System header to define __stub macros and hopefully few prototypes,
2703     which can conflict with char $ac_func(); below.  */
2704 #include <assert.h>
2705 /* Override any gcc2 internal prototype to avoid an error.  */
2706 /* We use char because int might match the return type of a gcc2
2707     builtin and then its argument prototype would still apply.  */
2708 char $ac_func();
2709
2710 int main() {
2711
2712 /* The GNU C library defines this for functions which it implements
2713     to always fail with ENOSYS.  Some functions are actually named
2714     something starting with __ and the normal name is an alias.  */
2715 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2716 choke me
2717 #else
2718 $ac_func();
2719 #endif
2720
2721 ; return 0; }
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2724   rm -rf conftest*
2725   eval "ac_cv_func_$ac_func=yes"
2726 else
2727   echo "configure: failed program was:" >&5
2728   cat conftest.$ac_ext >&5
2729   rm -rf conftest*
2730   eval "ac_cv_func_$ac_func=no"
2731 fi
2732 rm -f conftest*
2733 fi
2734
2735 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2736   echo "$ac_t""yes" 1>&6
2737     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2738   cat >> confdefs.h <<EOF
2739 #define $ac_tr_func 1
2740 EOF
2741  memmove_found=yes
2742 else
2743   echo "$ac_t""no" 1>&6
2744 fi
2745 done
2746
2747    if test "$memmove_found" = no; then
2748       { echo "configure: error: memmove is required" 1>&2; exit 1; }
2749    fi
2750
2751    # We require memcpy.
2752    memcpy_found=no
2753    for ac_func in memcpy
2754 do
2755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2756 echo "configure:2757: checking for $ac_func" >&5
2757 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760   cat > conftest.$ac_ext <<EOF
2761 #line 2762 "configure"
2762 #include "confdefs.h"
2763 /* System header to define __stub macros and hopefully few prototypes,
2764     which can conflict with char $ac_func(); below.  */
2765 #include <assert.h>
2766 /* Override any gcc2 internal prototype to avoid an error.  */
2767 /* We use char because int might match the return type of a gcc2
2768     builtin and then its argument prototype would still apply.  */
2769 char $ac_func();
2770
2771 int main() {
2772
2773 /* The GNU C library defines this for functions which it implements
2774     to always fail with ENOSYS.  Some functions are actually named
2775     something starting with __ and the normal name is an alias.  */
2776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2777 choke me
2778 #else
2779 $ac_func();
2780 #endif
2781
2782 ; return 0; }
2783 EOF
2784 if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2785   rm -rf conftest*
2786   eval "ac_cv_func_$ac_func=yes"
2787 else
2788   echo "configure: failed program was:" >&5
2789   cat conftest.$ac_ext >&5
2790   rm -rf conftest*
2791   eval "ac_cv_func_$ac_func=no"
2792 fi
2793 rm -f conftest*
2794 fi
2795
2796 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2797   echo "$ac_t""yes" 1>&6
2798     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2799   cat >> confdefs.h <<EOF
2800 #define $ac_tr_func 1
2801 EOF
2802  memcpy_found=yes
2803 else
2804   echo "$ac_t""no" 1>&6
2805 fi
2806 done
2807
2808    if test "$memcpy_found" = no; then
2809       { echo "configure: error: memcpy is required" 1>&2; exit 1; }
2810    fi
2811
2812    test -d "$libgcj_basedir/../gcc/java" || {
2813       CANADIAN=yes
2814       NULL_TARGET=yes
2815    }
2816 fi
2817
2818
2819
2820 if test "$CANADIAN" = yes; then
2821   CANADIAN_TRUE=
2822   CANADIAN_FALSE='#'
2823 else
2824   CANADIAN_TRUE='#'
2825   CANADIAN_FALSE=
2826 fi
2827
2828
2829 if test "$NULL_TARGET" = yes; then
2830   NULL_TARGET_TRUE=
2831   NULL_TARGET_FALSE='#'
2832 else
2833   NULL_TARGET_TRUE='#'
2834   NULL_TARGET_FALSE=
2835 fi
2836
2837
2838 if test "$CANADIAN" = no || test "$NULL_TARGET" = yes; then
2839   NATIVE_TRUE=
2840   NATIVE_FALSE='#'
2841 else
2842   NATIVE_TRUE='#'
2843   NATIVE_FALSE=
2844 fi
2845
2846
2847
2848
2849
2850 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
2851 do
2852 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2854 echo "configure:2855: checking for $ac_hdr" >&5
2855 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2856   echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858   cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <$ac_hdr>
2862 EOF
2863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2864 { (eval echo configure:2865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2866 if test -z "$ac_err"; then
2867   rm -rf conftest*
2868   eval "ac_cv_header_$ac_safe=yes"
2869 else
2870   echo "$ac_err" >&5
2871   echo "configure: failed program was:" >&5
2872   cat conftest.$ac_ext >&5
2873   rm -rf conftest*
2874   eval "ac_cv_header_$ac_safe=no"
2875 fi
2876 rm -f conftest*
2877 fi
2878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2879   echo "$ac_t""yes" 1>&6
2880     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2881   cat >> confdefs.h <<EOF
2882 #define $ac_tr_hdr 1
2883 EOF
2884  
2885 else
2886   echo "$ac_t""no" 1>&6
2887 fi
2888 done
2889
2890 for ac_hdr in dirent.h
2891 do
2892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2894 echo "configure:2895: checking for $ac_hdr" >&5
2895 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <$ac_hdr>
2902 EOF
2903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2904 { (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2906 if test -z "$ac_err"; then
2907   rm -rf conftest*
2908   eval "ac_cv_header_$ac_safe=yes"
2909 else
2910   echo "$ac_err" >&5
2911   echo "configure: failed program was:" >&5
2912   cat conftest.$ac_ext >&5
2913   rm -rf conftest*
2914   eval "ac_cv_header_$ac_safe=no"
2915 fi
2916 rm -f conftest*
2917 fi
2918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2919   echo "$ac_t""yes" 1>&6
2920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2921   cat >> confdefs.h <<EOF
2922 #define $ac_tr_hdr 1
2923 EOF
2924  
2925 else
2926   echo "$ac_t""no" 1>&6
2927 fi
2928 done
2929
2930
2931 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
2932 echo "configure:2933: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
2933 cat > conftest.$ac_ext <<EOF
2934 #line 2935 "configure"
2935 #include "confdefs.h"
2936 #include <netinet/in.h>
2937 int main() {
2938 struct sockaddr_in6 addr6;
2939 ; return 0; }
2940 EOF
2941 if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2942   rm -rf conftest*
2943   cat >> confdefs.h <<\EOF
2944 #define HAVE_INET6 1
2945 EOF
2946
2947    echo "$ac_t""yes" 1>&6
2948 else
2949   echo "configure: failed program was:" >&5
2950   cat conftest.$ac_ext >&5
2951   rm -rf conftest*
2952   echo "$ac_t""no" 1>&6
2953 fi
2954 rm -f conftest*
2955
2956 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
2957 echo "configure:2958: checking for socklen_t in sys/socket.h" >&5
2958 cat > conftest.$ac_ext <<EOF
2959 #line 2960 "configure"
2960 #include "confdefs.h"
2961 #include <sys/socket.h>
2962 int main() {
2963 socklen_t x = 5;
2964 ; return 0; }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2967   rm -rf conftest*
2968   cat >> confdefs.h <<\EOF
2969 #define HAVE_SOCKLEN_T 1
2970 EOF
2971
2972    echo "$ac_t""yes" 1>&6
2973 else
2974   echo "configure: failed program was:" >&5
2975   cat conftest.$ac_ext >&5
2976   rm -rf conftest*
2977   echo "$ac_t""no" 1>&6
2978 fi
2979 rm -f conftest*
2980
2981 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
2982 echo "configure:2983: checking for tm_gmtoff in struct tm" >&5
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 #include <time.h>
2987 int main() {
2988 struct tm tim; tim.tm_gmtoff = 0;
2989 ; return 0; }
2990 EOF
2991 if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2992   rm -rf conftest*
2993   cat >> confdefs.h <<\EOF
2994 #define STRUCT_TM_HAS_GMTOFF 1
2995 EOF
2996
2997    echo "$ac_t""yes" 1>&6
2998 else
2999   echo "configure: failed program was:" >&5
3000   cat conftest.$ac_ext >&5
3001   rm -rf conftest*
3002   echo "$ac_t""no" 1>&6
3003    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
3004 echo "configure:3005: checking for global timezone variable" >&5
3005             cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008 #include <time.h>
3009 int main() {
3010 long z2 = timezone;
3011 ; return 0; }
3012 EOF
3013 if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3014   rm -rf conftest*
3015   cat >> confdefs.h <<\EOF
3016 #define HAVE_TIMEZONE 1
3017 EOF
3018
3019       echo "$ac_t""yes" 1>&6
3020 else
3021   echo "configure: failed program was:" >&5
3022   cat conftest.$ac_ext >&5
3023   rm -rf conftest*
3024   echo "$ac_t""no" 1>&6
3025 fi
3026 rm -f conftest*
3027 fi
3028 rm -f conftest*
3029
3030 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3031 # for constant arguments.  Useless!
3032 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3033 echo "configure:3034: checking for working alloca.h" >&5
3034 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040 #include <alloca.h>
3041 int main() {
3042 char *p = alloca(2 * sizeof(int));
3043 ; return 0; }
3044 EOF
3045 if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3046   rm -rf conftest*
3047   ac_cv_header_alloca_h=yes
3048 else
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   ac_cv_header_alloca_h=no
3053 fi
3054 rm -f conftest*
3055 fi
3056
3057 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3058 if test $ac_cv_header_alloca_h = yes; then
3059   cat >> confdefs.h <<\EOF
3060 #define HAVE_ALLOCA_H 1
3061 EOF
3062
3063 fi
3064
3065 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3066 echo "configure:3067: checking for alloca" >&5
3067 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073
3074 #ifdef __GNUC__
3075 # define alloca __builtin_alloca
3076 #else
3077 # ifdef _MSC_VER
3078 #  include <malloc.h>
3079 #  define alloca _alloca
3080 # else
3081 #  if HAVE_ALLOCA_H
3082 #   include <alloca.h>
3083 #  else
3084 #   ifdef _AIX
3085  #pragma alloca
3086 #   else
3087 #    ifndef alloca /* predefined by HP cc +Olibcalls */
3088 char *alloca ();
3089 #    endif
3090 #   endif
3091 #  endif
3092 # endif
3093 #endif
3094
3095 int main() {
3096 char *p = (char *) alloca(1);
3097 ; return 0; }
3098 EOF
3099 if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3100   rm -rf conftest*
3101   ac_cv_func_alloca_works=yes
3102 else
3103   echo "configure: failed program was:" >&5
3104   cat conftest.$ac_ext >&5
3105   rm -rf conftest*
3106   ac_cv_func_alloca_works=no
3107 fi
3108 rm -f conftest*
3109 fi
3110
3111 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3112 if test $ac_cv_func_alloca_works = yes; then
3113   cat >> confdefs.h <<\EOF
3114 #define HAVE_ALLOCA 1
3115 EOF
3116
3117 fi
3118
3119 if test $ac_cv_func_alloca_works = no; then
3120   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3121   # that cause trouble.  Some versions do not even contain alloca or
3122   # contain a buggy version.  If you still want to use their alloca,
3123   # use ar to extract alloca.o from them instead of compiling alloca.c.
3124   ALLOCA=alloca.${ac_objext}
3125   cat >> confdefs.h <<\EOF
3126 #define C_ALLOCA 1
3127 EOF
3128
3129
3130 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3131 echo "configure:3132: checking whether alloca needs Cray hooks" >&5
3132 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #if defined(CRAY) && ! defined(CRAY2)
3139 webecray
3140 #else
3141 wenotbecray
3142 #endif
3143
3144 EOF
3145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3146   egrep "webecray" >/dev/null 2>&1; then
3147   rm -rf conftest*
3148   ac_cv_os_cray=yes
3149 else
3150   rm -rf conftest*
3151   ac_cv_os_cray=no
3152 fi
3153 rm -f conftest*
3154
3155 fi
3156
3157 echo "$ac_t""$ac_cv_os_cray" 1>&6
3158 if test $ac_cv_os_cray = yes; then
3159 for ac_func in _getb67 GETB67 getb67; do
3160   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3161 echo "configure:3162: checking for $ac_func" >&5
3162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3163   echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165   cat > conftest.$ac_ext <<EOF
3166 #line 3167 "configure"
3167 #include "confdefs.h"
3168 /* System header to define __stub macros and hopefully few prototypes,
3169     which can conflict with char $ac_func(); below.  */
3170 #include <assert.h>
3171 /* Override any gcc2 internal prototype to avoid an error.  */
3172 /* We use char because int might match the return type of a gcc2
3173     builtin and then its argument prototype would still apply.  */
3174 char $ac_func();
3175
3176 int main() {
3177
3178 /* The GNU C library defines this for functions which it implements
3179     to always fail with ENOSYS.  Some functions are actually named
3180     something starting with __ and the normal name is an alias.  */
3181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3182 choke me
3183 #else
3184 $ac_func();
3185 #endif
3186
3187 ; return 0; }
3188 EOF
3189 if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3190   rm -rf conftest*
3191   eval "ac_cv_func_$ac_func=yes"
3192 else
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195   rm -rf conftest*
3196   eval "ac_cv_func_$ac_func=no"
3197 fi
3198 rm -f conftest*
3199 fi
3200
3201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3202   echo "$ac_t""yes" 1>&6
3203   cat >> confdefs.h <<EOF
3204 #define CRAY_STACKSEG_END $ac_func
3205 EOF
3206
3207   break
3208 else
3209   echo "$ac_t""no" 1>&6
3210 fi
3211
3212 done
3213 fi
3214
3215 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3216 echo "configure:3217: checking stack direction for C alloca" >&5
3217 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   if test "$cross_compiling" = yes; then
3221   ac_cv_c_stack_direction=0
3222 else
3223   cat > conftest.$ac_ext <<EOF
3224 #line 3225 "configure"
3225 #include "confdefs.h"
3226 find_stack_direction ()
3227 {
3228   static char *addr = 0;
3229   auto char dummy;
3230   if (addr == 0)
3231     {
3232       addr = &dummy;
3233       return find_stack_direction ();
3234     }
3235   else
3236     return (&dummy > addr) ? 1 : -1;
3237 }
3238 main ()
3239 {
3240   exit (find_stack_direction() < 0);
3241 }
3242 EOF
3243 if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3244 then
3245   ac_cv_c_stack_direction=1
3246 else
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -fr conftest*
3250   ac_cv_c_stack_direction=-1
3251 fi
3252 rm -fr conftest*
3253 fi
3254
3255 fi
3256
3257 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3258 cat >> confdefs.h <<EOF
3259 #define STACK_DIRECTION $ac_cv_c_stack_direction
3260 EOF
3261
3262 fi
3263
3264
3265 for ac_prog in perl
3266 do
3267 # Extract the first word of "$ac_prog", so it can be a program name with args.
3268 set dummy $ac_prog; ac_word=$2
3269 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3270 echo "configure:3271: checking for $ac_word" >&5
3271 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
3272   echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274   if test -n "$PERL"; then
3275   ac_cv_prog_PERL="$PERL" # Let the user override the test.
3276 else
3277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3278   ac_dummy="$PATH"
3279   for ac_dir in $ac_dummy; do
3280     test -z "$ac_dir" && ac_dir=.
3281     if test -f $ac_dir/$ac_word; then
3282       ac_cv_prog_PERL="$ac_prog"
3283       break
3284     fi
3285   done
3286   IFS="$ac_save_ifs"
3287 fi
3288 fi
3289 PERL="$ac_cv_prog_PERL"
3290 if test -n "$PERL"; then
3291   echo "$ac_t""$PERL" 1>&6
3292 else
3293   echo "$ac_t""no" 1>&6
3294 fi
3295
3296 test -n "$PERL" && break
3297 done
3298 test -n "$PERL" || PERL="false"
3299
3300
3301 case "${host}" in
3302   i?86-*-linux*)
3303     SIGNAL_HANDLER=include/i386-signal.h
3304         ;;
3305   *)
3306     SIGNAL_HANDLER=include/default-signal.h
3307         ;;
3308 esac
3309
3310
3311
3312 if test "${multilib}" = "yes"; then
3313   multilib_arg="--enable-multilib"
3314 else
3315   multilib_arg=
3316 fi
3317
3318 here=`pwd`
3319
3320
3321 trap '' 1 2 15
3322 cat > confcache <<\EOF
3323 # This file is a shell script that caches the results of configure
3324 # tests run on this system so they can be shared between configure
3325 # scripts and configure runs.  It is not useful on other systems.
3326 # If it contains results you don't want to keep, you may remove or edit it.
3327 #
3328 # By default, configure uses ./config.cache as the cache file,
3329 # creating it if it does not exist already.  You can give configure
3330 # the --cache-file=FILE option to use a different cache file; that is
3331 # what configure does when it calls configure scripts in
3332 # subdirectories, so they share the cache.
3333 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3334 # config.status only pays attention to the cache file if you give it the
3335 # --recheck option to rerun configure.
3336 #
3337 EOF
3338 # The following way of writing the cache mishandles newlines in values,
3339 # but we know of no workaround that is simple, portable, and efficient.
3340 # So, don't put newlines in cache variables' values.
3341 # Ultrix sh set writes to stderr and can't be redirected directly,
3342 # and sets the high bit in the cache file unless we assign to the vars.
3343 (set) 2>&1 |
3344   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3345   *ac_space=\ *)
3346     # `set' does not quote correctly, so add quotes (double-quote substitution
3347     # turns \\\\ into \\, and sed turns \\ into \).
3348     sed -n \
3349       -e "s/'/'\\\\''/g" \
3350       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3351     ;;
3352   *)
3353     # `set' quotes correctly as required by POSIX, so do not add quotes.
3354     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3355     ;;
3356   esac >> confcache
3357 if cmp -s $cache_file confcache; then
3358   :
3359 else
3360   if test -w $cache_file; then
3361     echo "updating cache $cache_file"
3362     cat confcache > $cache_file
3363   else
3364     echo "not updating unwritable cache $cache_file"
3365   fi
3366 fi
3367 rm -f confcache
3368
3369 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3370
3371 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3372 # Let make expand exec_prefix.
3373 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3374
3375 # Any assignment to VPATH causes Sun make to only execute
3376 # the first set of double-colon rules, so remove it if not needed.
3377 # If there is a colon in the path, we need to keep it.
3378 if test "x$srcdir" = x.; then
3379   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3380 fi
3381
3382 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3383
3384 DEFS=-DHAVE_CONFIG_H
3385
3386 # Without the "./", some shells look in PATH for config.status.
3387 : ${CONFIG_STATUS=./config.status}
3388
3389 echo creating $CONFIG_STATUS
3390 rm -f $CONFIG_STATUS
3391 cat > $CONFIG_STATUS <<EOF
3392 #! /bin/sh
3393 # Generated automatically by configure.
3394 # Run this file to recreate the current configuration.
3395 # This directory was configured as follows,
3396 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3397 #
3398 # $0 $ac_configure_args
3399 #
3400 # Compiler output produced by configure, useful for debugging
3401 # configure, is in ./config.log if it exists.
3402
3403 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3404 for ac_option
3405 do
3406   case "\$ac_option" in
3407   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3408     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3409     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3410   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3411     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3412     exit 0 ;;
3413   -help | --help | --hel | --he | --h)
3414     echo "\$ac_cs_usage"; exit 0 ;;
3415   *) echo "\$ac_cs_usage"; exit 1 ;;
3416   esac
3417 done
3418
3419 ac_given_srcdir=$srcdir
3420 ac_given_INSTALL="$INSTALL"
3421
3422 trap 'rm -fr `echo "Makefile testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3423 EOF
3424 cat >> $CONFIG_STATUS <<EOF
3425
3426 # Protect against being on the right side of a sed subst in config.status.
3427 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3428  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3429 $ac_vpsub
3430 $extrasub
3431 s%@SHELL@%$SHELL%g
3432 s%@CFLAGS@%$CFLAGS%g
3433 s%@CPPFLAGS@%$CPPFLAGS%g
3434 s%@CXXFLAGS@%$CXXFLAGS%g
3435 s%@FFLAGS@%$FFLAGS%g
3436 s%@DEFS@%$DEFS%g
3437 s%@LDFLAGS@%$LDFLAGS%g
3438 s%@LIBS@%$LIBS%g
3439 s%@exec_prefix@%$exec_prefix%g
3440 s%@prefix@%$prefix%g
3441 s%@program_transform_name@%$program_transform_name%g
3442 s%@bindir@%$bindir%g
3443 s%@sbindir@%$sbindir%g
3444 s%@libexecdir@%$libexecdir%g
3445 s%@datadir@%$datadir%g
3446 s%@sysconfdir@%$sysconfdir%g
3447 s%@sharedstatedir@%$sharedstatedir%g
3448 s%@localstatedir@%$localstatedir%g
3449 s%@libdir@%$libdir%g
3450 s%@includedir@%$includedir%g
3451 s%@oldincludedir@%$oldincludedir%g
3452 s%@infodir@%$infodir%g
3453 s%@mandir@%$mandir%g
3454 s%@host@%$host%g
3455 s%@host_alias@%$host_alias%g
3456 s%@host_cpu@%$host_cpu%g
3457 s%@host_vendor@%$host_vendor%g
3458 s%@host_os@%$host_os%g
3459 s%@target@%$target%g
3460 s%@target_alias@%$target_alias%g
3461 s%@target_cpu@%$target_cpu%g
3462 s%@target_vendor@%$target_vendor%g
3463 s%@target_os@%$target_os%g
3464 s%@build@%$build%g
3465 s%@build_alias@%$build_alias%g
3466 s%@build_cpu@%$build_cpu%g
3467 s%@build_vendor@%$build_vendor%g
3468 s%@build_os@%$build_os%g
3469 s%@libgcj_basedir@%$libgcj_basedir%g
3470 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3471 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3472 s%@INSTALL_DATA@%$INSTALL_DATA%g
3473 s%@PACKAGE@%$PACKAGE%g
3474 s%@VERSION@%$VERSION%g
3475 s%@ACLOCAL@%$ACLOCAL%g
3476 s%@AUTOCONF@%$AUTOCONF%g
3477 s%@AUTOMAKE@%$AUTOMAKE%g
3478 s%@AUTOHEADER@%$AUTOHEADER%g
3479 s%@MAKEINFO@%$MAKEINFO%g
3480 s%@SET_MAKE@%$SET_MAKE%g
3481 s%@CC@%$CC%g
3482 s%@CXX@%$CXX%g
3483 s%@AS@%$AS%g
3484 s%@AR@%$AR%g
3485 s%@RANLIB@%$RANLIB%g
3486 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3487 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3488 s%@MAINT@%$MAINT%g
3489 s%@EXEEXT@%$EXEEXT%g
3490 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
3491 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
3492 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
3493 s%@COMPPATH@%$COMPPATH%g
3494 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
3495 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
3496 s%@CPP@%$CPP%g
3497 s%@GCLIBS@%$GCLIBS%g
3498 s%@GCINCS@%$GCINCS%g
3499 s%@GCDEPS@%$GCDEPS%g
3500 s%@GCOBJS@%$GCOBJS%g
3501 s%@THREADLIBS@%$THREADLIBS%g
3502 s%@THREADINCS@%$THREADINCS%g
3503 s%@THREADDEPS@%$THREADDEPS%g
3504 s%@THREADOBJS@%$THREADOBJS%g
3505 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
3506 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
3507 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
3508 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
3509 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
3510 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
3511 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
3512 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
3513 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
3514 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
3515 s%@ALLOCA@%$ALLOCA%g
3516 s%@PERL@%$PERL%g
3517 s%@here@%$here%g
3518
3519 CEOF
3520 EOF
3521
3522 cat >> $CONFIG_STATUS <<\EOF
3523
3524 # Split the substitutions into bite-sized pieces for seds with
3525 # small command number limits, like on Digital OSF/1 and HP-UX.
3526 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3527 ac_file=1 # Number of current file.
3528 ac_beg=1 # First line for current file.
3529 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3530 ac_more_lines=:
3531 ac_sed_cmds=""
3532 while $ac_more_lines; do
3533   if test $ac_beg -gt 1; then
3534     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3535   else
3536     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3537   fi
3538   if test ! -s conftest.s$ac_file; then
3539     ac_more_lines=false
3540     rm -f conftest.s$ac_file
3541   else
3542     if test -z "$ac_sed_cmds"; then
3543       ac_sed_cmds="sed -f conftest.s$ac_file"
3544     else
3545       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3546     fi
3547     ac_file=`expr $ac_file + 1`
3548     ac_beg=$ac_end
3549     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3550   fi
3551 done
3552 if test -z "$ac_sed_cmds"; then
3553   ac_sed_cmds=cat
3554 fi
3555 EOF
3556
3557 cat >> $CONFIG_STATUS <<EOF
3558
3559 CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
3560 EOF
3561 cat >> $CONFIG_STATUS <<\EOF
3562 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3563   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3564   case "$ac_file" in
3565   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3566        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3567   *) ac_file_in="${ac_file}.in" ;;
3568   esac
3569
3570   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3571
3572   # Remove last slash and all that follows it.  Not all systems have dirname.
3573   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3574   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3575     # The file is in a subdirectory.
3576     test ! -d "$ac_dir" && mkdir "$ac_dir"
3577     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3578     # A "../" for each directory in $ac_dir_suffix.
3579     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3580   else
3581     ac_dir_suffix= ac_dots=
3582   fi
3583
3584   case "$ac_given_srcdir" in
3585   .)  srcdir=.
3586       if test -z "$ac_dots"; then top_srcdir=.
3587       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3588   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3589   *) # Relative path.
3590     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3591     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3592   esac
3593
3594   case "$ac_given_INSTALL" in
3595   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3596   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3597   esac
3598
3599   echo creating "$ac_file"
3600   rm -f "$ac_file"
3601   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3602   case "$ac_file" in
3603   *Makefile*) ac_comsub="1i\\
3604 # $configure_input" ;;
3605   *) ac_comsub= ;;
3606   esac
3607
3608   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3609   sed -e "$ac_comsub
3610 s%@configure_input@%$configure_input%g
3611 s%@srcdir@%$srcdir%g
3612 s%@top_srcdir@%$top_srcdir%g
3613 s%@INSTALL@%$INSTALL%g
3614 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3615 fi; done
3616 rm -f conftest.s*
3617
3618 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3619 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3620 #
3621 # ac_d sets the value in "#define NAME VALUE" lines.
3622 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3623 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3624 ac_dC='\3'
3625 ac_dD='%g'
3626 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3627 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3628 ac_uB='\([      ]\)%\1#\2define\3'
3629 ac_uC=' '
3630 ac_uD='\4%g'
3631 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3632 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3633 ac_eB='$%\1#\2define\3'
3634 ac_eC=' '
3635 ac_eD='%g'
3636
3637 if test "${CONFIG_HEADERS+set}" != set; then
3638 EOF
3639 cat >> $CONFIG_STATUS <<EOF
3640   CONFIG_HEADERS="include/config.h"
3641 EOF
3642 cat >> $CONFIG_STATUS <<\EOF
3643 fi
3644 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3645   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3646   case "$ac_file" in
3647   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3648        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3649   *) ac_file_in="${ac_file}.in" ;;
3650   esac
3651
3652   echo creating $ac_file
3653
3654   rm -f conftest.frag conftest.in conftest.out
3655   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3656   cat $ac_file_inputs > conftest.in
3657
3658 EOF
3659
3660 # Transform confdefs.h into a sed script conftest.vals that substitutes
3661 # the proper values into config.h.in to produce config.h.  And first:
3662 # Protect against being on the right side of a sed subst in config.status.
3663 # Protect against being in an unquoted here document in config.status.
3664 rm -f conftest.vals
3665 cat > conftest.hdr <<\EOF
3666 s/[\\&%]/\\&/g
3667 s%[\\$`]%\\&%g
3668 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3669 s%ac_d%ac_u%gp
3670 s%ac_u%ac_e%gp
3671 EOF
3672 sed -n -f conftest.hdr confdefs.h > conftest.vals
3673 rm -f conftest.hdr
3674
3675 # This sed command replaces #undef with comments.  This is necessary, for
3676 # example, in the case of _POSIX_SOURCE, which is predefined and required
3677 # on some systems where configure will not decide to define it.
3678 cat >> conftest.vals <<\EOF
3679 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3680 EOF
3681
3682 # Break up conftest.vals because some shells have a limit on
3683 # the size of here documents, and old seds have small limits too.
3684
3685 rm -f conftest.tail
3686 while :
3687 do
3688   ac_lines=`grep -c . conftest.vals`
3689   # grep -c gives empty output for an empty file on some AIX systems.
3690   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3691   # Write a limited-size here document to conftest.frag.
3692   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3693   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3694   echo 'CEOF
3695   sed -f conftest.frag conftest.in > conftest.out
3696   rm -f conftest.in
3697   mv conftest.out conftest.in
3698 ' >> $CONFIG_STATUS
3699   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3700   rm -f conftest.vals
3701   mv conftest.tail conftest.vals
3702 done
3703 rm -f conftest.vals
3704
3705 cat >> $CONFIG_STATUS <<\EOF
3706   rm -f conftest.frag conftest.h
3707   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3708   cat conftest.in >> conftest.h
3709   rm -f conftest.in
3710   if cmp -s $ac_file conftest.h 2>/dev/null; then
3711     echo "$ac_file is unchanged"
3712     rm -f conftest.h
3713   else
3714     # Remove last slash and all that follows it.  Not all systems have dirname.
3715       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3716       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3717       # The file is in a subdirectory.
3718       test ! -d "$ac_dir" && mkdir "$ac_dir"
3719     fi
3720     rm -f $ac_file
3721     mv conftest.h $ac_file
3722   fi
3723 fi; done
3724
3725 EOF
3726
3727 cat >> $CONFIG_STATUS <<EOF
3728 ac_sources="java/io/$FILE_DESCRIPTOR include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
3729 ac_dests="java/io/natFileDescriptor.cc include/java-gc.h include/java-threads.h include/java-signal.h"
3730 EOF
3731
3732 cat >> $CONFIG_STATUS <<\EOF
3733 srcdir=$ac_given_srcdir
3734 while test -n "$ac_sources"; do
3735   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3736   set $ac_sources; ac_source=$1; shift; ac_sources=$*
3737
3738   echo "linking $srcdir/$ac_source to $ac_dest"
3739
3740   if test ! -r $srcdir/$ac_source; then
3741     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3742   fi
3743   rm -f $ac_dest
3744
3745   # Make relative symlinks.
3746   # Remove last slash and all that follows it.  Not all systems have dirname.
3747   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3748   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3749     # The dest file is in a subdirectory.
3750     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3751     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3752     # A "../" for each directory in $ac_dest_dir_suffix.
3753     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3754   else
3755     ac_dest_dir_suffix= ac_dots=
3756   fi
3757
3758   case "$srcdir" in
3759   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3760   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3761   esac
3762
3763   # Make a symlink if possible; otherwise try a hard link.
3764   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3765     ln $srcdir/$ac_source $ac_dest; then :
3766   else
3767     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3768   fi
3769 done
3770 EOF
3771 cat >> $CONFIG_STATUS <<EOF
3772
3773 srcdir=${srcdir}
3774 host=${host}
3775 target=${target}
3776 with_multisubdir=${with_multisubdir}
3777 ac_configure_args="${multilib_arg} ${ac_configure_args}"
3778 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3779 libgcj_basedir=${libgcj_basedir}
3780 CC="${CC}"
3781 CXX="${CXX}"
3782
3783 EOF
3784 cat >> $CONFIG_STATUS <<\EOF
3785 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
3786 if test -n "$CONFIG_FILES"; then
3787   ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
3788 fi
3789 exit 0
3790 EOF
3791 chmod +x $CONFIG_STATUS
3792 rm -fr confdefs* $ac_clean_files
3793 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3794