OSDN Git Service

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