OSDN Git Service

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