OSDN Git Service

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