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
3481      case " $GCINCS " in
3482      *" -D_REENTRANT "*) ;;
3483      *)
3484                 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
3485 echo "configure:3486: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
3486 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489    
3490           ac_ext=C
3491 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3492 ac_cpp='$CXXCPP $CPPFLAGS'
3493 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3494 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3495 cross_compiling=$ac_cv_prog_cxx_cross
3496
3497           cat > conftest.$ac_ext <<EOF
3498 #line 3499 "configure"
3499 #include "confdefs.h"
3500 #include <netdb.h>
3501 int main() {
3502 gethostbyname_r("", 0, 0);
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506   rm -rf conftest*
3507   libjava_cv_gethostbyname_r_needs_reentrant=no
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512                 CPPFLAGS_SAVE="$CPPFLAGS"
3513                 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3514                 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517 #include <netdb.h>
3518 int main() {
3519 gethostbyname_r("", 0, 0);
3520 ; return 0; }
3521 EOF
3522 if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3523   rm -rf conftest*
3524   libjava_cv_gethostbyname_r_needs_reentrant=yes
3525 else
3526   echo "configure: failed program was:" >&5
3527   cat conftest.$ac_ext >&5
3528   rm -rf conftest*
3529   libjava_cv_gethostbyname_r_needs_reentrant=fail
3530 fi
3531 rm -f conftest*
3532                 CPPFLAGS="$CPPFLAGS_SAVE"
3533           
3534 fi
3535 rm -f conftest*
3536           ac_ext=c
3537 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3538 ac_cpp='$CPP $CPPFLAGS'
3539 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3540 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3541 cross_compiling=$ac_cv_prog_cc_cross
3542
3543         
3544 fi
3545
3546 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
3547         if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
3548           cat >> confdefs.h <<\EOF
3549 #define GETHOSTBYNAME_R_NEEDS_REENTRANT 1
3550 EOF
3551
3552         fi
3553      ;;
3554      esac
3555
3556      echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
3557 echo "configure:3558: checking for struct hostent_data" >&5
3558 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
3559   echo $ac_n "(cached) $ac_c" 1>&6
3560 else
3561         cat > conftest.$ac_ext <<EOF
3562 #line 3563 "configure"
3563 #include "confdefs.h"
3564
3565 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
3566 # define _REENTRANT 1
3567 #endif
3568 #include <netdb.h>
3569 int main() {
3570 struct hostent_data data;
3571 ; return 0; }
3572 EOF
3573 if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3574   rm -rf conftest*
3575   libjava_cv_struct_hostent_data=yes
3576 else
3577   echo "configure: failed program was:" >&5
3578   cat conftest.$ac_ext >&5
3579   rm -rf conftest*
3580   libjava_cv_struct_hostent_data=no
3581 fi
3582 rm -f conftest*
3583 fi
3584
3585 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
3586      if test "x$libjava_cv_struct_hostent_data" = xyes; then
3587        cat >> confdefs.h <<\EOF
3588 #define HAVE_STRUCT_HOSTENT_DATA 1
3589 EOF
3590
3591      fi
3592    
3593 else
3594   echo "$ac_t""no" 1>&6
3595 fi
3596 done
3597
3598
3599    for ac_func in gethostbyaddr_r
3600 do
3601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3602 echo "configure:3603: checking for $ac_func" >&5
3603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 /* System header to define __stub macros and hopefully few prototypes,
3610     which can conflict with char $ac_func(); below.  */
3611 #include <assert.h>
3612 /* Override any gcc2 internal prototype to avoid an error.  */
3613 /* We use char because int might match the return type of a gcc2
3614     builtin and then its argument prototype would still apply.  */
3615 char $ac_func();
3616
3617 int main() {
3618
3619 /* The GNU C library defines this for functions which it implements
3620     to always fail with ENOSYS.  Some functions are actually named
3621     something starting with __ and the normal name is an alias.  */
3622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3623 choke me
3624 #else
3625 $ac_func();
3626 #endif
3627
3628 ; return 0; }
3629 EOF
3630 if { (eval echo configure:3631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3631   rm -rf conftest*
3632   eval "ac_cv_func_$ac_func=yes"
3633 else
3634   echo "configure: failed program was:" >&5
3635   cat conftest.$ac_ext >&5
3636   rm -rf conftest*
3637   eval "ac_cv_func_$ac_func=no"
3638 fi
3639 rm -f conftest*
3640 fi
3641
3642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3643   echo "$ac_t""yes" 1>&6
3644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3645   cat >> confdefs.h <<EOF
3646 #define $ac_tr_func 1
3647 EOF
3648  
3649      cat >> confdefs.h <<\EOF
3650 #define HAVE_GETHOSTBYADDR_R 1
3651 EOF
3652
3653      # There are two different kinds of gethostbyaddr_r.
3654      # We look for the one that returns `int'.
3655      # Hopefully this check is robust enough.
3656      cat > conftest.$ac_ext <<EOF
3657 #line 3658 "configure"
3658 #include "confdefs.h"
3659 #include <netdb.h>
3660 EOF
3661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3662   egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
3663   rm -rf conftest*
3664   
3665        cat >> confdefs.h <<\EOF
3666 #define GETHOSTBYADDR_R_RETURNS_INT 1
3667 EOF
3668
3669 fi
3670 rm -f conftest*
3671
3672 else
3673   echo "$ac_t""no" 1>&6
3674 fi
3675 done
3676
3677
3678    for ac_func in gethostname
3679 do
3680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $ac_func" >&5
3682 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 /* System header to define __stub macros and hopefully few prototypes,
3689     which can conflict with char $ac_func(); below.  */
3690 #include <assert.h>
3691 /* Override any gcc2 internal prototype to avoid an error.  */
3692 /* We use char because int might match the return type of a gcc2
3693     builtin and then its argument prototype would still apply.  */
3694 char $ac_func();
3695
3696 int main() {
3697
3698 /* The GNU C library defines this for functions which it implements
3699     to always fail with ENOSYS.  Some functions are actually named
3700     something starting with __ and the normal name is an alias.  */
3701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3702 choke me
3703 #else
3704 $ac_func();
3705 #endif
3706
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3710   rm -rf conftest*
3711   eval "ac_cv_func_$ac_func=yes"
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   eval "ac_cv_func_$ac_func=no"
3717 fi
3718 rm -f conftest*
3719 fi
3720
3721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3722   echo "$ac_t""yes" 1>&6
3723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3724   cat >> confdefs.h <<EOF
3725 #define $ac_tr_func 1
3726 EOF
3727  
3728      cat >> confdefs.h <<\EOF
3729 #define HAVE_GETHOSTNAME 1
3730 EOF
3731
3732      cat > conftest.$ac_ext <<EOF
3733 #line 3734 "configure"
3734 #include "confdefs.h"
3735 #include <unistd.h>
3736 EOF
3737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3738   egrep "gethostname" >/dev/null 2>&1; then
3739   rm -rf conftest*
3740   
3741        cat >> confdefs.h <<\EOF
3742 #define HAVE_GETHOSTNAME_DECL 1
3743 EOF
3744
3745 fi
3746 rm -f conftest*
3747
3748 else
3749   echo "$ac_t""no" 1>&6
3750 fi
3751 done
3752
3753
3754    # Look for these functions in the thread library.
3755    save_LIBS="$LIBS"
3756    LIBS="$LIBS $THREADLIBS"
3757    for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np sched_yield
3758 do
3759 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3760 echo "configure:3761: checking for $ac_func" >&5
3761 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3762   echo $ac_n "(cached) $ac_c" 1>&6
3763 else
3764   cat > conftest.$ac_ext <<EOF
3765 #line 3766 "configure"
3766 #include "confdefs.h"
3767 /* System header to define __stub macros and hopefully few prototypes,
3768     which can conflict with char $ac_func(); below.  */
3769 #include <assert.h>
3770 /* Override any gcc2 internal prototype to avoid an error.  */
3771 /* We use char because int might match the return type of a gcc2
3772     builtin and then its argument prototype would still apply.  */
3773 char $ac_func();
3774
3775 int main() {
3776
3777 /* The GNU C library defines this for functions which it implements
3778     to always fail with ENOSYS.  Some functions are actually named
3779     something starting with __ and the normal name is an alias.  */
3780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3781 choke me
3782 #else
3783 $ac_func();
3784 #endif
3785
3786 ; return 0; }
3787 EOF
3788 if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3789   rm -rf conftest*
3790   eval "ac_cv_func_$ac_func=yes"
3791 else
3792   echo "configure: failed program was:" >&5
3793   cat conftest.$ac_ext >&5
3794   rm -rf conftest*
3795   eval "ac_cv_func_$ac_func=no"
3796 fi
3797 rm -f conftest*
3798 fi
3799
3800 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3801   echo "$ac_t""yes" 1>&6
3802     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3803   cat >> confdefs.h <<EOF
3804 #define $ac_tr_func 1
3805 EOF
3806  
3807 else
3808   echo "$ac_t""no" 1>&6
3809 fi
3810 done
3811
3812    # Look for sched_yield.  Sometimes it is in the posix4 library.
3813    for ac_func in sched_yield
3814 do
3815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3816 echo "configure:3817: checking for $ac_func" >&5
3817 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 /* System header to define __stub macros and hopefully few prototypes,
3824     which can conflict with char $ac_func(); below.  */
3825 #include <assert.h>
3826 /* Override any gcc2 internal prototype to avoid an error.  */
3827 /* We use char because int might match the return type of a gcc2
3828     builtin and then its argument prototype would still apply.  */
3829 char $ac_func();
3830
3831 int main() {
3832
3833 /* The GNU C library defines this for functions which it implements
3834     to always fail with ENOSYS.  Some functions are actually named
3835     something starting with __ and the normal name is an alias.  */
3836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3837 choke me
3838 #else
3839 $ac_func();
3840 #endif
3841
3842 ; return 0; }
3843 EOF
3844 if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3845   rm -rf conftest*
3846   eval "ac_cv_func_$ac_func=yes"
3847 else
3848   echo "configure: failed program was:" >&5
3849   cat conftest.$ac_ext >&5
3850   rm -rf conftest*
3851   eval "ac_cv_func_$ac_func=no"
3852 fi
3853 rm -f conftest*
3854 fi
3855
3856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3857   echo "$ac_t""yes" 1>&6
3858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3859   cat >> confdefs.h <<EOF
3860 #define $ac_tr_func 1
3861 EOF
3862  
3863 else
3864   echo "$ac_t""no" 1>&6
3865 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
3866 echo "configure:3867: checking for sched_yield in -lposix4" >&5
3867 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
3868 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3869   echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871   ac_save_LIBS="$LIBS"
3872 LIBS="-lposix4  $LIBS"
3873 cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.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 sched_yield();
3880
3881 int main() {
3882 sched_yield()
3883 ; return 0; }
3884 EOF
3885 if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3886   rm -rf conftest*
3887   eval "ac_cv_lib_$ac_lib_var=yes"
3888 else
3889   echo "configure: failed program was:" >&5
3890   cat conftest.$ac_ext >&5
3891   rm -rf conftest*
3892   eval "ac_cv_lib_$ac_lib_var=no"
3893 fi
3894 rm -f conftest*
3895 LIBS="$ac_save_LIBS"
3896
3897 fi
3898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3899   echo "$ac_t""yes" 1>&6
3900   
3901        cat >> confdefs.h <<\EOF
3902 #define HAVE_SCHED_YIELD 1
3903 EOF
3904
3905        THREADLIBS="$THREADLIBS -lposix4"
3906 else
3907   echo "$ac_t""no" 1>&6
3908 fi
3909
3910 fi
3911 done
3912
3913    LIBS="$save_LIBS"
3914
3915    # We require a way to get the time.
3916    time_found=no
3917    for ac_func in gettimeofday time ftime
3918 do
3919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3920 echo "configure:3921: checking for $ac_func" >&5
3921 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3922   echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924   cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 /* System header to define __stub macros and hopefully few prototypes,
3928     which can conflict with char $ac_func(); below.  */
3929 #include <assert.h>
3930 /* Override any gcc2 internal prototype to avoid an error.  */
3931 /* We use char because int might match the return type of a gcc2
3932     builtin and then its argument prototype would still apply.  */
3933 char $ac_func();
3934
3935 int main() {
3936
3937 /* The GNU C library defines this for functions which it implements
3938     to always fail with ENOSYS.  Some functions are actually named
3939     something starting with __ and the normal name is an alias.  */
3940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3941 choke me
3942 #else
3943 $ac_func();
3944 #endif
3945
3946 ; return 0; }
3947 EOF
3948 if { (eval echo configure:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3949   rm -rf conftest*
3950   eval "ac_cv_func_$ac_func=yes"
3951 else
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   eval "ac_cv_func_$ac_func=no"
3956 fi
3957 rm -f conftest*
3958 fi
3959
3960 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3961   echo "$ac_t""yes" 1>&6
3962     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3963   cat >> confdefs.h <<EOF
3964 #define $ac_tr_func 1
3965 EOF
3966  time_found=yes
3967 else
3968   echo "$ac_t""no" 1>&6
3969 fi
3970 done
3971
3972    if test "$time_found" = no; then
3973       { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
3974    fi
3975
3976    for ac_func in memmove
3977 do
3978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3979 echo "configure:3980: checking for $ac_func" >&5
3980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3981   echo $ac_n "(cached) $ac_c" 1>&6
3982 else
3983   cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 /* System header to define __stub macros and hopefully few prototypes,
3987     which can conflict with char $ac_func(); below.  */
3988 #include <assert.h>
3989 /* Override any gcc2 internal prototype to avoid an error.  */
3990 /* We use char because int might match the return type of a gcc2
3991     builtin and then its argument prototype would still apply.  */
3992 char $ac_func();
3993
3994 int main() {
3995
3996 /* The GNU C library defines this for functions which it implements
3997     to always fail with ENOSYS.  Some functions are actually named
3998     something starting with __ and the normal name is an alias.  */
3999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4000 choke me
4001 #else
4002 $ac_func();
4003 #endif
4004
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4008   rm -rf conftest*
4009   eval "ac_cv_func_$ac_func=yes"
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -rf conftest*
4014   eval "ac_cv_func_$ac_func=no"
4015 fi
4016 rm -f conftest*
4017 fi
4018
4019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4020   echo "$ac_t""yes" 1>&6
4021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4022   cat >> confdefs.h <<EOF
4023 #define $ac_tr_func 1
4024 EOF
4025  
4026 else
4027   echo "$ac_t""no" 1>&6
4028 fi
4029 done
4030
4031
4032    # We require memcpy.
4033    memcpy_found=no
4034    for ac_func in memcpy
4035 do
4036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4037 echo "configure:4038: checking for $ac_func" >&5
4038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4039   echo $ac_n "(cached) $ac_c" 1>&6
4040 else
4041   cat > conftest.$ac_ext <<EOF
4042 #line 4043 "configure"
4043 #include "confdefs.h"
4044 /* System header to define __stub macros and hopefully few prototypes,
4045     which can conflict with char $ac_func(); below.  */
4046 #include <assert.h>
4047 /* Override any gcc2 internal prototype to avoid an error.  */
4048 /* We use char because int might match the return type of a gcc2
4049     builtin and then its argument prototype would still apply.  */
4050 char $ac_func();
4051
4052 int main() {
4053
4054 /* The GNU C library defines this for functions which it implements
4055     to always fail with ENOSYS.  Some functions are actually named
4056     something starting with __ and the normal name is an alias.  */
4057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4058 choke me
4059 #else
4060 $ac_func();
4061 #endif
4062
4063 ; return 0; }
4064 EOF
4065 if { (eval echo configure:4066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4066   rm -rf conftest*
4067   eval "ac_cv_func_$ac_func=yes"
4068 else
4069   echo "configure: failed program was:" >&5
4070   cat conftest.$ac_ext >&5
4071   rm -rf conftest*
4072   eval "ac_cv_func_$ac_func=no"
4073 fi
4074 rm -f conftest*
4075 fi
4076
4077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4078   echo "$ac_t""yes" 1>&6
4079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4080   cat >> confdefs.h <<EOF
4081 #define $ac_tr_func 1
4082 EOF
4083  memcpy_found=yes
4084 else
4085   echo "$ac_t""no" 1>&6
4086 fi
4087 done
4088
4089    if test "$memcpy_found" = no; then
4090       { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4091    fi
4092
4093    # Some library-finding code we stole from Tcl.
4094    #--------------------------------------------------------------------
4095    #    Check for the existence of the -lsocket and -lnsl libraries.
4096    #    The order here is important, so that they end up in the right
4097    #    order in the command line generated by make.  Here are some
4098    #    special considerations:
4099    #    1. Use "connect" and "accept" to check for -lsocket, and
4100    #       "gethostbyname" to check for -lnsl.
4101    #    2. Use each function name only once:  can't redo a check because
4102    #       autoconf caches the results of the last check and won't redo it.
4103    #    3. Use -lnsl and -lsocket only if they supply procedures that
4104    #       aren't already present in the normal libraries.  This is because
4105    #       IRIX 5.2 has libraries, but they aren't needed and they're
4106    #       bogus:  they goof up name resolution if used.
4107    #    4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4108    #       To get around this problem, check for both libraries together
4109    #       if -lsocket doesn't work by itself.
4110    #--------------------------------------------------------------------
4111
4112    echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4113 echo "configure:4114: checking for socket libraries" >&5
4114 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   gcj_cv_lib_sockets=
4118      gcj_checkBoth=0
4119      unset ac_cv_func_connect
4120      echo $ac_n "checking for connect""... $ac_c" 1>&6
4121 echo "configure:4122: checking for connect" >&5
4122 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4123   echo $ac_n "(cached) $ac_c" 1>&6
4124 else
4125   cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128 /* System header to define __stub macros and hopefully few prototypes,
4129     which can conflict with char connect(); below.  */
4130 #include <assert.h>
4131 /* Override any gcc2 internal prototype to avoid an error.  */
4132 /* We use char because int might match the return type of a gcc2
4133     builtin and then its argument prototype would still apply.  */
4134 char connect();
4135
4136 int main() {
4137
4138 /* The GNU C library defines this for functions which it implements
4139     to always fail with ENOSYS.  Some functions are actually named
4140     something starting with __ and the normal name is an alias.  */
4141 #if defined (__stub_connect) || defined (__stub___connect)
4142 choke me
4143 #else
4144 connect();
4145 #endif
4146
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4150   rm -rf conftest*
4151   eval "ac_cv_func_connect=yes"
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   eval "ac_cv_func_connect=no"
4157 fi
4158 rm -f conftest*
4159 fi
4160
4161 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4162   echo "$ac_t""yes" 1>&6
4163   gcj_checkSocket=0
4164 else
4165   echo "$ac_t""no" 1>&6
4166 gcj_checkSocket=1
4167 fi
4168
4169      if test "$gcj_checkSocket" = 1; then
4170          unset ac_cv_func_connect
4171          echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4172 echo "configure:4173: checking for main in -lsocket" >&5
4173 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   ac_save_LIBS="$LIBS"
4178 LIBS="-lsocket  $LIBS"
4179 cat > conftest.$ac_ext <<EOF
4180 #line 4181 "configure"
4181 #include "confdefs.h"
4182
4183 int main() {
4184 main()
4185 ; return 0; }
4186 EOF
4187 if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4188   rm -rf conftest*
4189   eval "ac_cv_lib_$ac_lib_var=yes"
4190 else
4191   echo "configure: failed program was:" >&5
4192   cat conftest.$ac_ext >&5
4193   rm -rf conftest*
4194   eval "ac_cv_lib_$ac_lib_var=no"
4195 fi
4196 rm -f conftest*
4197 LIBS="$ac_save_LIBS"
4198
4199 fi
4200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4201   echo "$ac_t""yes" 1>&6
4202   gcj_cv_lib_sockets="-lsocket"
4203 else
4204   echo "$ac_t""no" 1>&6
4205 gcj_checkBoth=1
4206 fi
4207
4208      fi
4209      if test "$gcj_checkBoth" = 1; then
4210          gcj_oldLibs=$LIBS
4211          LIBS="$LIBS -lsocket -lnsl"
4212          unset ac_cv_func_accept
4213          echo $ac_n "checking for accept""... $ac_c" 1>&6
4214 echo "configure:4215: checking for accept" >&5
4215 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4216   echo $ac_n "(cached) $ac_c" 1>&6
4217 else
4218   cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 /* System header to define __stub macros and hopefully few prototypes,
4222     which can conflict with char accept(); below.  */
4223 #include <assert.h>
4224 /* Override any gcc2 internal prototype to avoid an error.  */
4225 /* We use char because int might match the return type of a gcc2
4226     builtin and then its argument prototype would still apply.  */
4227 char accept();
4228
4229 int main() {
4230
4231 /* The GNU C library defines this for functions which it implements
4232     to always fail with ENOSYS.  Some functions are actually named
4233     something starting with __ and the normal name is an alias.  */
4234 #if defined (__stub_accept) || defined (__stub___accept)
4235 choke me
4236 #else
4237 accept();
4238 #endif
4239
4240 ; return 0; }
4241 EOF
4242 if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4243   rm -rf conftest*
4244   eval "ac_cv_func_accept=yes"
4245 else
4246   echo "configure: failed program was:" >&5
4247   cat conftest.$ac_ext >&5
4248   rm -rf conftest*
4249   eval "ac_cv_func_accept=no"
4250 fi
4251 rm -f conftest*
4252 fi
4253
4254 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4255   echo "$ac_t""yes" 1>&6
4256   gcj_checkNsl=0
4257                         gcj_cv_lib_sockets="-lsocket -lnsl"
4258 else
4259   echo "$ac_t""no" 1>&6
4260 fi
4261
4262          unset ac_cv_func_accept
4263          LIBS=$gcj_oldLibs
4264      fi
4265      unset ac_cv_func_gethostbyname
4266      gcj_oldLibs=$LIBS
4267      LIBS="$LIBS $gcj_cv_lib_sockets"
4268      echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4269 echo "configure:4270: checking for gethostbyname" >&5
4270 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4271   echo $ac_n "(cached) $ac_c" 1>&6
4272 else
4273   cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276 /* System header to define __stub macros and hopefully few prototypes,
4277     which can conflict with char gethostbyname(); below.  */
4278 #include <assert.h>
4279 /* Override any gcc2 internal prototype to avoid an error.  */
4280 /* We use char because int might match the return type of a gcc2
4281     builtin and then its argument prototype would still apply.  */
4282 char gethostbyname();
4283
4284 int main() {
4285
4286 /* The GNU C library defines this for functions which it implements
4287     to always fail with ENOSYS.  Some functions are actually named
4288     something starting with __ and the normal name is an alias.  */
4289 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4290 choke me
4291 #else
4292 gethostbyname();
4293 #endif
4294
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4298   rm -rf conftest*
4299   eval "ac_cv_func_gethostbyname=yes"
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   eval "ac_cv_func_gethostbyname=no"
4305 fi
4306 rm -f conftest*
4307 fi
4308
4309 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4310   echo "$ac_t""yes" 1>&6
4311   :
4312 else
4313   echo "$ac_t""no" 1>&6
4314 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4315 echo "configure:4316: checking for main in -lnsl" >&5
4316 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4317 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   ac_save_LIBS="$LIBS"
4321 LIBS="-lnsl  $LIBS"
4322 cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325
4326 int main() {
4327 main()
4328 ; return 0; }
4329 EOF
4330 if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4331   rm -rf conftest*
4332   eval "ac_cv_lib_$ac_lib_var=yes"
4333 else
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -rf conftest*
4337   eval "ac_cv_lib_$ac_lib_var=no"
4338 fi
4339 rm -f conftest*
4340 LIBS="$ac_save_LIBS"
4341
4342 fi
4343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4344   echo "$ac_t""yes" 1>&6
4345   gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4346 else
4347   echo "$ac_t""no" 1>&6
4348 fi
4349
4350 fi
4351
4352      unset ac_cv_func_gethostbyname
4353      LIBS=$gcj_oldLIBS
4354    
4355 fi
4356
4357 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4358    SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4359
4360    if test "$with_system_zlib" = yes; then
4361       echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
4362 echo "configure:4363: checking for deflate in -lz" >&5
4363 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4364 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4365   echo $ac_n "(cached) $ac_c" 1>&6
4366 else
4367   ac_save_LIBS="$LIBS"
4368 LIBS="-lz  $LIBS"
4369 cat > conftest.$ac_ext <<EOF
4370 #line 4371 "configure"
4371 #include "confdefs.h"
4372 /* Override any gcc2 internal prototype to avoid an error.  */
4373 /* We use char because int might match the return type of a gcc2
4374     builtin and then its argument prototype would still apply.  */
4375 char deflate();
4376
4377 int main() {
4378 deflate()
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4382   rm -rf conftest*
4383   eval "ac_cv_lib_$ac_lib_var=yes"
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -rf conftest*
4388   eval "ac_cv_lib_$ac_lib_var=no"
4389 fi
4390 rm -f conftest*
4391 LIBS="$ac_save_LIBS"
4392
4393 fi
4394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4395   echo "$ac_t""yes" 1>&6
4396   ZLIBSPEC=-lz
4397 else
4398   echo "$ac_t""no" 1>&6
4399 ZLIBSPEC=-lzgcj
4400 fi
4401
4402    else
4403       ZLIBSPEC=-lzgcj
4404    fi
4405
4406    # On Solaris, and maybe other architectures, the Boehm collector
4407    # requires -ldl.
4408    if test "$GC" = boehm; then
4409       echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
4410 echo "configure:4411: checking for main in -ldl" >&5
4411 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
4412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   ac_save_LIBS="$LIBS"
4416 LIBS="-ldl  $LIBS"
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420
4421 int main() {
4422 main()
4423 ; return 0; }
4424 EOF
4425 if { (eval echo configure:4426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4426   rm -rf conftest*
4427   eval "ac_cv_lib_$ac_lib_var=yes"
4428 else
4429   echo "configure: failed program was:" >&5
4430   cat conftest.$ac_ext >&5
4431   rm -rf conftest*
4432   eval "ac_cv_lib_$ac_lib_var=no"
4433 fi
4434 rm -f conftest*
4435 LIBS="$ac_save_LIBS"
4436
4437 fi
4438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4439   echo "$ac_t""yes" 1>&6
4440   SYSTEMSPEC="$SYSTEMSPEC -ldl"
4441 else
4442   echo "$ac_t""no" 1>&6
4443 fi
4444
4445    fi
4446
4447    if test -d "$libgcj_basedir/../gcc/java"; then
4448       GCJ=
4449    else
4450       CANADIAN=yes
4451       NULL_TARGET=yes
4452       GCJ=gcj
4453    fi
4454 fi
4455
4456 ZLIBS=
4457 ZDEPS=
4458 ZINCS=
4459 if test "x$ZLIBSPEC" = "x-lzgcj"; then
4460    # We include the path to the zlib build directory.
4461    # See Makefile.am to understand why.
4462    ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
4463    ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
4464    ZINCS='-I$(top_srcdir)/../zlib'
4465 else
4466    ZLIBS="$ZLIBSPEC"
4467 fi
4468
4469
4470
4471
4472
4473
4474 if test "$CANADIAN" = yes; then
4475   CANADIAN_TRUE=
4476   CANADIAN_FALSE='#'
4477 else
4478   CANADIAN_TRUE='#'
4479   CANADIAN_FALSE=
4480 fi
4481
4482
4483 if test "$NULL_TARGET" = yes; then
4484   NULL_TARGET_TRUE=
4485   NULL_TARGET_FALSE='#'
4486 else
4487   NULL_TARGET_TRUE='#'
4488   NULL_TARGET_FALSE=
4489 fi
4490
4491
4492 if test "$CANADIAN" = no || test "$NULL_TARGET" = yes; then
4493   NATIVE_TRUE=
4494   NATIVE_FALSE='#'
4495 else
4496   NATIVE_TRUE='#'
4497   NATIVE_FALSE=
4498 fi
4499
4500
4501 if test -z "$with_cross_host"; then
4502   USE_LIBDIR_TRUE=
4503   USE_LIBDIR_FALSE='#'
4504 else
4505   USE_LIBDIR_TRUE='#'
4506   USE_LIBDIR_FALSE=
4507 fi
4508
4509
4510 # Determine gcj version number.
4511 if test "$GCJ" = ""; then
4512    if test -z "${with_multisubdir}"; then
4513       builddotdot=.
4514    else
4515       builddotdot=`echo ${with_multisubdir} | sed -e 's:^/^/*:..:g'`
4516    fi
4517    dir="`cd ${builddotdot}/../../gcc && pwd`"
4518    GCJ="$dir/gcj -B$dir/"
4519 fi
4520
4521 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
4522
4523 cat >> confdefs.h <<EOF
4524 #define GCJVERSION "$gcjvers"
4525 EOF
4526
4527
4528
4529
4530 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
4531 do
4532 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4533 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4534 echo "configure:4535: checking for $ac_hdr" >&5
4535 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4536   echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538   cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 #include <$ac_hdr>
4542 EOF
4543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4544 { (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4546 if test -z "$ac_err"; then
4547   rm -rf conftest*
4548   eval "ac_cv_header_$ac_safe=yes"
4549 else
4550   echo "$ac_err" >&5
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -rf conftest*
4554   eval "ac_cv_header_$ac_safe=no"
4555 fi
4556 rm -f conftest*
4557 fi
4558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4559   echo "$ac_t""yes" 1>&6
4560     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4561   cat >> confdefs.h <<EOF
4562 #define $ac_tr_hdr 1
4563 EOF
4564  
4565 else
4566   echo "$ac_t""no" 1>&6
4567 fi
4568 done
4569
4570 for ac_hdr in dirent.h
4571 do
4572 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4573 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4574 echo "configure:4575: checking for $ac_hdr" >&5
4575 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4576   echo $ac_n "(cached) $ac_c" 1>&6
4577 else
4578   cat > conftest.$ac_ext <<EOF
4579 #line 4580 "configure"
4580 #include "confdefs.h"
4581 #include <$ac_hdr>
4582 EOF
4583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4584 { (eval echo configure:4585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4586 if test -z "$ac_err"; then
4587   rm -rf conftest*
4588   eval "ac_cv_header_$ac_safe=yes"
4589 else
4590   echo "$ac_err" >&5
4591   echo "configure: failed program was:" >&5
4592   cat conftest.$ac_ext >&5
4593   rm -rf conftest*
4594   eval "ac_cv_header_$ac_safe=no"
4595 fi
4596 rm -f conftest*
4597 fi
4598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4599   echo "$ac_t""yes" 1>&6
4600     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4601   cat >> confdefs.h <<EOF
4602 #define $ac_tr_hdr 1
4603 EOF
4604  
4605 else
4606   echo "$ac_t""no" 1>&6
4607 fi
4608 done
4609
4610
4611 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
4612 echo "configure:4613: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
4613 cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 #include <netinet/in.h>
4617 int main() {
4618 struct sockaddr_in6 addr6;
4619 ; return 0; }
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4622   rm -rf conftest*
4623   cat >> confdefs.h <<\EOF
4624 #define HAVE_INET6 1
4625 EOF
4626
4627    echo "$ac_t""yes" 1>&6
4628 else
4629   echo "configure: failed program was:" >&5
4630   cat conftest.$ac_ext >&5
4631   rm -rf conftest*
4632   echo "$ac_t""no" 1>&6
4633 fi
4634 rm -f conftest*
4635
4636 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
4637 echo "configure:4638: checking for socklen_t in sys/socket.h" >&5
4638 cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 #include <sys/socket.h>
4642 int main() {
4643 socklen_t x = 5;
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4647   rm -rf conftest*
4648   cat >> confdefs.h <<\EOF
4649 #define HAVE_SOCKLEN_T 1
4650 EOF
4651
4652    echo "$ac_t""yes" 1>&6
4653 else
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   echo "$ac_t""no" 1>&6
4658 fi
4659 rm -f conftest*
4660
4661 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4662 echo "configure:4663: checking for tm_gmtoff in struct tm" >&5
4663 cat > conftest.$ac_ext <<EOF
4664 #line 4665 "configure"
4665 #include "confdefs.h"
4666 #include <time.h>
4667 int main() {
4668 struct tm tim; tim.tm_gmtoff = 0;
4669 ; return 0; }
4670 EOF
4671 if { (eval echo configure:4672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4672   rm -rf conftest*
4673   cat >> confdefs.h <<\EOF
4674 #define STRUCT_TM_HAS_GMTOFF 1
4675 EOF
4676
4677    echo "$ac_t""yes" 1>&6
4678 else
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   echo "$ac_t""no" 1>&6
4683    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
4684 echo "configure:4685: checking for global timezone variable" >&5
4685             cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 #include <time.h>
4689 int main() {
4690 long z2 = timezone;
4691 ; return 0; }
4692 EOF
4693 if { (eval echo configure:4694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4694   rm -rf conftest*
4695   cat >> confdefs.h <<\EOF
4696 #define HAVE_TIMEZONE 1
4697 EOF
4698
4699       echo "$ac_t""yes" 1>&6
4700 else
4701   echo "configure: failed program was:" >&5
4702   cat conftest.$ac_ext >&5
4703   rm -rf conftest*
4704   echo "$ac_t""no" 1>&6
4705 fi
4706 rm -f conftest*
4707 fi
4708 rm -f conftest*
4709
4710 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4711 # for constant arguments.  Useless!
4712 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4713 echo "configure:4714: checking for working alloca.h" >&5
4714 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <alloca.h>
4721 int main() {
4722 char *p = alloca(2 * sizeof(int));
4723 ; return 0; }
4724 EOF
4725 if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4726   rm -rf conftest*
4727   ac_cv_header_alloca_h=yes
4728 else
4729   echo "configure: failed program was:" >&5
4730   cat conftest.$ac_ext >&5
4731   rm -rf conftest*
4732   ac_cv_header_alloca_h=no
4733 fi
4734 rm -f conftest*
4735 fi
4736
4737 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4738 if test $ac_cv_header_alloca_h = yes; then
4739   cat >> confdefs.h <<\EOF
4740 #define HAVE_ALLOCA_H 1
4741 EOF
4742
4743 fi
4744
4745 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4746 echo "configure:4747: checking for alloca" >&5
4747 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753
4754 #ifdef __GNUC__
4755 # define alloca __builtin_alloca
4756 #else
4757 # ifdef _MSC_VER
4758 #  include <malloc.h>
4759 #  define alloca _alloca
4760 # else
4761 #  if HAVE_ALLOCA_H
4762 #   include <alloca.h>
4763 #  else
4764 #   ifdef _AIX
4765  #pragma alloca
4766 #   else
4767 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4768 char *alloca ();
4769 #    endif
4770 #   endif
4771 #  endif
4772 # endif
4773 #endif
4774
4775 int main() {
4776 char *p = (char *) alloca(1);
4777 ; return 0; }
4778 EOF
4779 if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4780   rm -rf conftest*
4781   ac_cv_func_alloca_works=yes
4782 else
4783   echo "configure: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   rm -rf conftest*
4786   ac_cv_func_alloca_works=no
4787 fi
4788 rm -f conftest*
4789 fi
4790
4791 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4792 if test $ac_cv_func_alloca_works = yes; then
4793   cat >> confdefs.h <<\EOF
4794 #define HAVE_ALLOCA 1
4795 EOF
4796
4797 fi
4798
4799 if test $ac_cv_func_alloca_works = no; then
4800   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4801   # that cause trouble.  Some versions do not even contain alloca or
4802   # contain a buggy version.  If you still want to use their alloca,
4803   # use ar to extract alloca.o from them instead of compiling alloca.c.
4804   ALLOCA=alloca.${ac_objext}
4805   cat >> confdefs.h <<\EOF
4806 #define C_ALLOCA 1
4807 EOF
4808
4809
4810 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4811 echo "configure:4812: checking whether alloca needs Cray hooks" >&5
4812 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4813   echo $ac_n "(cached) $ac_c" 1>&6
4814 else
4815   cat > conftest.$ac_ext <<EOF
4816 #line 4817 "configure"
4817 #include "confdefs.h"
4818 #if defined(CRAY) && ! defined(CRAY2)
4819 webecray
4820 #else
4821 wenotbecray
4822 #endif
4823
4824 EOF
4825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4826   egrep "webecray" >/dev/null 2>&1; then
4827   rm -rf conftest*
4828   ac_cv_os_cray=yes
4829 else
4830   rm -rf conftest*
4831   ac_cv_os_cray=no
4832 fi
4833 rm -f conftest*
4834
4835 fi
4836
4837 echo "$ac_t""$ac_cv_os_cray" 1>&6
4838 if test $ac_cv_os_cray = yes; then
4839 for ac_func in _getb67 GETB67 getb67; do
4840   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4841 echo "configure:4842: checking for $ac_func" >&5
4842 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   cat > conftest.$ac_ext <<EOF
4846 #line 4847 "configure"
4847 #include "confdefs.h"
4848 /* System header to define __stub macros and hopefully few prototypes,
4849     which can conflict with char $ac_func(); below.  */
4850 #include <assert.h>
4851 /* Override any gcc2 internal prototype to avoid an error.  */
4852 /* We use char because int might match the return type of a gcc2
4853     builtin and then its argument prototype would still apply.  */
4854 char $ac_func();
4855
4856 int main() {
4857
4858 /* The GNU C library defines this for functions which it implements
4859     to always fail with ENOSYS.  Some functions are actually named
4860     something starting with __ and the normal name is an alias.  */
4861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4862 choke me
4863 #else
4864 $ac_func();
4865 #endif
4866
4867 ; return 0; }
4868 EOF
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4870   rm -rf conftest*
4871   eval "ac_cv_func_$ac_func=yes"
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   eval "ac_cv_func_$ac_func=no"
4877 fi
4878 rm -f conftest*
4879 fi
4880
4881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4882   echo "$ac_t""yes" 1>&6
4883   cat >> confdefs.h <<EOF
4884 #define CRAY_STACKSEG_END $ac_func
4885 EOF
4886
4887   break
4888 else
4889   echo "$ac_t""no" 1>&6
4890 fi
4891
4892 done
4893 fi
4894
4895 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4896 echo "configure:4897: checking stack direction for C alloca" >&5
4897 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4898   echo $ac_n "(cached) $ac_c" 1>&6
4899 else
4900   if test "$cross_compiling" = yes; then
4901   ac_cv_c_stack_direction=0
4902 else
4903   cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 find_stack_direction ()
4907 {
4908   static char *addr = 0;
4909   auto char dummy;
4910   if (addr == 0)
4911     {
4912       addr = &dummy;
4913       return find_stack_direction ();
4914     }
4915   else
4916     return (&dummy > addr) ? 1 : -1;
4917 }
4918 main ()
4919 {
4920   exit (find_stack_direction() < 0);
4921 }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4924 then
4925   ac_cv_c_stack_direction=1
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -fr conftest*
4930   ac_cv_c_stack_direction=-1
4931 fi
4932 rm -fr conftest*
4933 fi
4934
4935 fi
4936
4937 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4938 cat >> confdefs.h <<EOF
4939 #define STACK_DIRECTION $ac_cv_c_stack_direction
4940 EOF
4941
4942 fi
4943
4944
4945 for ac_prog in perl
4946 do
4947 # Extract the first word of "$ac_prog", so it can be a program name with args.
4948 set dummy $ac_prog; ac_word=$2
4949 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4950 echo "configure:4951: checking for $ac_word" >&5
4951 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
4952   echo $ac_n "(cached) $ac_c" 1>&6
4953 else
4954   if test -n "$PERL"; then
4955   ac_cv_prog_PERL="$PERL" # Let the user override the test.
4956 else
4957   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4958   ac_dummy="$PATH"
4959   for ac_dir in $ac_dummy; do
4960     test -z "$ac_dir" && ac_dir=.
4961     if test -f $ac_dir/$ac_word; then
4962       ac_cv_prog_PERL="$ac_prog"
4963       break
4964     fi
4965   done
4966   IFS="$ac_save_ifs"
4967 fi
4968 fi
4969 PERL="$ac_cv_prog_PERL"
4970 if test -n "$PERL"; then
4971   echo "$ac_t""$PERL" 1>&6
4972 else
4973   echo "$ac_t""no" 1>&6
4974 fi
4975
4976 test -n "$PERL" && break
4977 done
4978 test -n "$PERL" || PERL="false"
4979
4980
4981 case "${host}" in
4982   i?86-*-linux*)
4983     SIGNAL_HANDLER=include/i386-signal.h
4984         ;;
4985   sparc-sun-solaris*)
4986     SIGNAL_HANDLER=include/sparc-signal.h
4987         ;;
4988   *)
4989     SIGNAL_HANDLER=include/default-signal.h
4990         ;;
4991 esac
4992
4993
4994
4995 if test "${multilib}" = "yes"; then
4996   multilib_arg="--enable-multilib"
4997 else
4998   multilib_arg=
4999 fi
5000
5001 here=`pwd`
5002
5003
5004 trap '' 1 2 15
5005 cat > confcache <<\EOF
5006 # This file is a shell script that caches the results of configure
5007 # tests run on this system so they can be shared between configure
5008 # scripts and configure runs.  It is not useful on other systems.
5009 # If it contains results you don't want to keep, you may remove or edit it.
5010 #
5011 # By default, configure uses ./config.cache as the cache file,
5012 # creating it if it does not exist already.  You can give configure
5013 # the --cache-file=FILE option to use a different cache file; that is
5014 # what configure does when it calls configure scripts in
5015 # subdirectories, so they share the cache.
5016 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5017 # config.status only pays attention to the cache file if you give it the
5018 # --recheck option to rerun configure.
5019 #
5020 EOF
5021 # The following way of writing the cache mishandles newlines in values,
5022 # but we know of no workaround that is simple, portable, and efficient.
5023 # So, don't put newlines in cache variables' values.
5024 # Ultrix sh set writes to stderr and can't be redirected directly,
5025 # and sets the high bit in the cache file unless we assign to the vars.
5026 (set) 2>&1 |
5027   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5028   *ac_space=\ *)
5029     # `set' does not quote correctly, so add quotes (double-quote substitution
5030     # turns \\\\ into \\, and sed turns \\ into \).
5031     sed -n \
5032       -e "s/'/'\\\\''/g" \
5033       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5034     ;;
5035   *)
5036     # `set' quotes correctly as required by POSIX, so do not add quotes.
5037     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5038     ;;
5039   esac >> confcache
5040 if cmp -s $cache_file confcache; then
5041   :
5042 else
5043   if test -w $cache_file; then
5044     echo "updating cache $cache_file"
5045     cat confcache > $cache_file
5046   else
5047     echo "not updating unwritable cache $cache_file"
5048   fi
5049 fi
5050 rm -f confcache
5051
5052 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5053
5054 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5055 # Let make expand exec_prefix.
5056 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5057
5058 # Any assignment to VPATH causes Sun make to only execute
5059 # the first set of double-colon rules, so remove it if not needed.
5060 # If there is a colon in the path, we need to keep it.
5061 if test "x$srcdir" = x.; then
5062   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5063 fi
5064
5065 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5066
5067 DEFS=-DHAVE_CONFIG_H
5068
5069 # Without the "./", some shells look in PATH for config.status.
5070 : ${CONFIG_STATUS=./config.status}
5071
5072 echo creating $CONFIG_STATUS
5073 rm -f $CONFIG_STATUS
5074 cat > $CONFIG_STATUS <<EOF
5075 #! /bin/sh
5076 # Generated automatically by configure.
5077 # Run this file to recreate the current configuration.
5078 # This directory was configured as follows,
5079 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5080 #
5081 # $0 $ac_configure_args
5082 #
5083 # Compiler output produced by configure, useful for debugging
5084 # configure, is in ./config.log if it exists.
5085
5086 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5087 for ac_option
5088 do
5089   case "\$ac_option" in
5090   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5091     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5092     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5093   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5094     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5095     exit 0 ;;
5096   -help | --help | --hel | --he | --h)
5097     echo "\$ac_cs_usage"; exit 0 ;;
5098   *) echo "\$ac_cs_usage"; exit 1 ;;
5099   esac
5100 done
5101
5102 ac_given_srcdir=$srcdir
5103 ac_given_INSTALL="$INSTALL"
5104
5105 trap 'rm -fr `echo "Makefile libgcj.spec testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5106 EOF
5107 cat >> $CONFIG_STATUS <<EOF
5108
5109 # Protect against being on the right side of a sed subst in config.status.
5110 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5111  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5112 $ac_vpsub
5113 $extrasub
5114 s%@SHELL@%$SHELL%g
5115 s%@CFLAGS@%$CFLAGS%g
5116 s%@CPPFLAGS@%$CPPFLAGS%g
5117 s%@CXXFLAGS@%$CXXFLAGS%g
5118 s%@FFLAGS@%$FFLAGS%g
5119 s%@DEFS@%$DEFS%g
5120 s%@LDFLAGS@%$LDFLAGS%g
5121 s%@LIBS@%$LIBS%g
5122 s%@exec_prefix@%$exec_prefix%g
5123 s%@prefix@%$prefix%g
5124 s%@program_transform_name@%$program_transform_name%g
5125 s%@bindir@%$bindir%g
5126 s%@sbindir@%$sbindir%g
5127 s%@libexecdir@%$libexecdir%g
5128 s%@datadir@%$datadir%g
5129 s%@sysconfdir@%$sysconfdir%g
5130 s%@sharedstatedir@%$sharedstatedir%g
5131 s%@localstatedir@%$localstatedir%g
5132 s%@libdir@%$libdir%g
5133 s%@includedir@%$includedir%g
5134 s%@oldincludedir@%$oldincludedir%g
5135 s%@infodir@%$infodir%g
5136 s%@mandir@%$mandir%g
5137 s%@host@%$host%g
5138 s%@host_alias@%$host_alias%g
5139 s%@host_cpu@%$host_cpu%g
5140 s%@host_vendor@%$host_vendor%g
5141 s%@host_os@%$host_os%g
5142 s%@target@%$target%g
5143 s%@target_alias@%$target_alias%g
5144 s%@target_cpu@%$target_cpu%g
5145 s%@target_vendor@%$target_vendor%g
5146 s%@target_os@%$target_os%g
5147 s%@build@%$build%g
5148 s%@build_alias@%$build_alias%g
5149 s%@build_cpu@%$build_cpu%g
5150 s%@build_vendor@%$build_vendor%g
5151 s%@build_os@%$build_os%g
5152 s%@libgcj_basedir@%$libgcj_basedir%g
5153 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5154 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5155 s%@INSTALL_DATA@%$INSTALL_DATA%g
5156 s%@PACKAGE@%$PACKAGE%g
5157 s%@VERSION@%$VERSION%g
5158 s%@ACLOCAL@%$ACLOCAL%g
5159 s%@AUTOCONF@%$AUTOCONF%g
5160 s%@AUTOMAKE@%$AUTOMAKE%g
5161 s%@AUTOHEADER@%$AUTOHEADER%g
5162 s%@MAKEINFO@%$MAKEINFO%g
5163 s%@SET_MAKE@%$SET_MAKE%g
5164 s%@CC@%$CC%g
5165 s%@CXX@%$CXX%g
5166 s%@AS@%$AS%g
5167 s%@AR@%$AR%g
5168 s%@RANLIB@%$RANLIB%g
5169 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5170 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5171 s%@MAINT@%$MAINT%g
5172 s%@EXEEXT@%$EXEEXT%g
5173 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
5174 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
5175 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
5176 s%@DIVIDESPEC@%$DIVIDESPEC%g
5177 s%@LD@%$LD%g
5178 s%@NM@%$NM%g
5179 s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
5180 s%@LN_S@%$LN_S%g
5181 s%@DLLTOOL@%$DLLTOOL%g
5182 s%@LIBTOOL@%$LIBTOOL%g
5183 s%@COMPPATH@%$COMPPATH%g
5184 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
5185 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
5186 s%@CPP@%$CPP%g
5187 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
5188 s%@ZLIBSPEC@%$ZLIBSPEC%g
5189 s%@GCLIBS@%$GCLIBS%g
5190 s%@GCINCS@%$GCINCS%g
5191 s%@GCDEPS@%$GCDEPS%g
5192 s%@GCOBJS@%$GCOBJS%g
5193 s%@GCSPEC@%$GCSPEC%g
5194 s%@THREADLIBS@%$THREADLIBS%g
5195 s%@THREADINCS@%$THREADINCS%g
5196 s%@THREADDEPS@%$THREADDEPS%g
5197 s%@THREADOBJS@%$THREADOBJS%g
5198 s%@THREADSPEC@%$THREADSPEC%g
5199 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
5200 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
5201 s%@ZLIBS@%$ZLIBS%g
5202 s%@ZDEPS@%$ZDEPS%g
5203 s%@ZINCS@%$ZINCS%g
5204 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
5205 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
5206 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
5207 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
5208 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
5209 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
5210 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
5211 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
5212 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
5213 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
5214 s%@ALLOCA@%$ALLOCA%g
5215 s%@PERL@%$PERL%g
5216 s%@here@%$here%g
5217
5218 CEOF
5219 EOF
5220
5221 cat >> $CONFIG_STATUS <<\EOF
5222
5223 # Split the substitutions into bite-sized pieces for seds with
5224 # small command number limits, like on Digital OSF/1 and HP-UX.
5225 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5226 ac_file=1 # Number of current file.
5227 ac_beg=1 # First line for current file.
5228 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5229 ac_more_lines=:
5230 ac_sed_cmds=""
5231 while $ac_more_lines; do
5232   if test $ac_beg -gt 1; then
5233     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5234   else
5235     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5236   fi
5237   if test ! -s conftest.s$ac_file; then
5238     ac_more_lines=false
5239     rm -f conftest.s$ac_file
5240   else
5241     if test -z "$ac_sed_cmds"; then
5242       ac_sed_cmds="sed -f conftest.s$ac_file"
5243     else
5244       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5245     fi
5246     ac_file=`expr $ac_file + 1`
5247     ac_beg=$ac_end
5248     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5249   fi
5250 done
5251 if test -z "$ac_sed_cmds"; then
5252   ac_sed_cmds=cat
5253 fi
5254 EOF
5255
5256 cat >> $CONFIG_STATUS <<EOF
5257
5258 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec testsuite/Makefile"}
5259 EOF
5260 cat >> $CONFIG_STATUS <<\EOF
5261 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5262   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5263   case "$ac_file" in
5264   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5265        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5266   *) ac_file_in="${ac_file}.in" ;;
5267   esac
5268
5269   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5270
5271   # Remove last slash and all that follows it.  Not all systems have dirname.
5272   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5273   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5274     # The file is in a subdirectory.
5275     test ! -d "$ac_dir" && mkdir "$ac_dir"
5276     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5277     # A "../" for each directory in $ac_dir_suffix.
5278     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5279   else
5280     ac_dir_suffix= ac_dots=
5281   fi
5282
5283   case "$ac_given_srcdir" in
5284   .)  srcdir=.
5285       if test -z "$ac_dots"; then top_srcdir=.
5286       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5287   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5288   *) # Relative path.
5289     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5290     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5291   esac
5292
5293   case "$ac_given_INSTALL" in
5294   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5295   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5296   esac
5297
5298   echo creating "$ac_file"
5299   rm -f "$ac_file"
5300   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5301   case "$ac_file" in
5302   *Makefile*) ac_comsub="1i\\
5303 # $configure_input" ;;
5304   *) ac_comsub= ;;
5305   esac
5306
5307   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5308   sed -e "$ac_comsub
5309 s%@configure_input@%$configure_input%g
5310 s%@srcdir@%$srcdir%g
5311 s%@top_srcdir@%$top_srcdir%g
5312 s%@INSTALL@%$INSTALL%g
5313 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5314 fi; done
5315 rm -f conftest.s*
5316
5317 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5318 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5319 #
5320 # ac_d sets the value in "#define NAME VALUE" lines.
5321 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5322 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5323 ac_dC='\3'
5324 ac_dD='%g'
5325 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5326 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5327 ac_uB='\([      ]\)%\1#\2define\3'
5328 ac_uC=' '
5329 ac_uD='\4%g'
5330 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5331 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5332 ac_eB='$%\1#\2define\3'
5333 ac_eC=' '
5334 ac_eD='%g'
5335
5336 if test "${CONFIG_HEADERS+set}" != set; then
5337 EOF
5338 cat >> $CONFIG_STATUS <<EOF
5339   CONFIG_HEADERS="include/config.h"
5340 EOF
5341 cat >> $CONFIG_STATUS <<\EOF
5342 fi
5343 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5344   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5345   case "$ac_file" in
5346   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5347        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5348   *) ac_file_in="${ac_file}.in" ;;
5349   esac
5350
5351   echo creating $ac_file
5352
5353   rm -f conftest.frag conftest.in conftest.out
5354   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5355   cat $ac_file_inputs > conftest.in
5356
5357 EOF
5358
5359 # Transform confdefs.h into a sed script conftest.vals that substitutes
5360 # the proper values into config.h.in to produce config.h.  And first:
5361 # Protect against being on the right side of a sed subst in config.status.
5362 # Protect against being in an unquoted here document in config.status.
5363 rm -f conftest.vals
5364 cat > conftest.hdr <<\EOF
5365 s/[\\&%]/\\&/g
5366 s%[\\$`]%\\&%g
5367 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5368 s%ac_d%ac_u%gp
5369 s%ac_u%ac_e%gp
5370 EOF
5371 sed -n -f conftest.hdr confdefs.h > conftest.vals
5372 rm -f conftest.hdr
5373
5374 # This sed command replaces #undef with comments.  This is necessary, for
5375 # example, in the case of _POSIX_SOURCE, which is predefined and required
5376 # on some systems where configure will not decide to define it.
5377 cat >> conftest.vals <<\EOF
5378 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5379 EOF
5380
5381 # Break up conftest.vals because some shells have a limit on
5382 # the size of here documents, and old seds have small limits too.
5383
5384 rm -f conftest.tail
5385 while :
5386 do
5387   ac_lines=`grep -c . conftest.vals`
5388   # grep -c gives empty output for an empty file on some AIX systems.
5389   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5390   # Write a limited-size here document to conftest.frag.
5391   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5392   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5393   echo 'CEOF
5394   sed -f conftest.frag conftest.in > conftest.out
5395   rm -f conftest.in
5396   mv conftest.out conftest.in
5397 ' >> $CONFIG_STATUS
5398   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5399   rm -f conftest.vals
5400   mv conftest.tail conftest.vals
5401 done
5402 rm -f conftest.vals
5403
5404 cat >> $CONFIG_STATUS <<\EOF
5405   rm -f conftest.frag conftest.h
5406   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5407   cat conftest.in >> conftest.h
5408   rm -f conftest.in
5409   if cmp -s $ac_file conftest.h 2>/dev/null; then
5410     echo "$ac_file is unchanged"
5411     rm -f conftest.h
5412   else
5413     # Remove last slash and all that follows it.  Not all systems have dirname.
5414       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5415       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5416       # The file is in a subdirectory.
5417       test ! -d "$ac_dir" && mkdir "$ac_dir"
5418     fi
5419     rm -f $ac_file
5420     mv conftest.h $ac_file
5421   fi
5422 fi; done
5423
5424 EOF
5425
5426 cat >> $CONFIG_STATUS <<EOF
5427 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
5428 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"
5429 EOF
5430
5431 cat >> $CONFIG_STATUS <<\EOF
5432 srcdir=$ac_given_srcdir
5433 while test -n "$ac_sources"; do
5434   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5435   set $ac_sources; ac_source=$1; shift; ac_sources=$*
5436
5437   echo "linking $srcdir/$ac_source to $ac_dest"
5438
5439   if test ! -r $srcdir/$ac_source; then
5440     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5441   fi
5442   rm -f $ac_dest
5443
5444   # Make relative symlinks.
5445   # Remove last slash and all that follows it.  Not all systems have dirname.
5446   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5447   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5448     # The dest file is in a subdirectory.
5449     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5450     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5451     # A "../" for each directory in $ac_dest_dir_suffix.
5452     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5453   else
5454     ac_dest_dir_suffix= ac_dots=
5455   fi
5456
5457   case "$srcdir" in
5458   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5459   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5460   esac
5461
5462   # Make a symlink if possible; otherwise try a hard link.
5463   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5464     ln $srcdir/$ac_source $ac_dest; then :
5465   else
5466     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5467   fi
5468 done
5469 EOF
5470 cat >> $CONFIG_STATUS <<EOF
5471
5472 srcdir=${srcdir}
5473 host=${host}
5474 target=${target}
5475 with_multisubdir=${with_multisubdir}
5476 ac_configure_args="${multilib_arg} ${ac_configure_args}"
5477 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5478 libgcj_basedir=${libgcj_basedir}
5479 CC="${CC}"
5480 CXX="${CXX}"
5481
5482 EOF
5483 cat >> $CONFIG_STATUS <<\EOF
5484 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
5485 if test -n "$CONFIG_FILES"; then
5486   ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
5487 fi
5488 exit 0
5489 EOF
5490 chmod +x $CONFIG_STATUS
5491 rm -fr confdefs* $ac_clean_files
5492 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5493