OSDN Git Service

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