OSDN Git Service

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