OSDN Git Service

For PR java/2812:
[pf3gnuchains/gcc-fork.git] / libjava / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-target-subdir=SUBDIR
16                            configuring in a subdirectory"
17 ac_help="$ac_help
18   --with-cross-host=HOST  configuring with a cross compiler"
19 ac_help="$ac_help
20   --enable-multilib       build many library versions (default)"
21 ac_help="$ac_help
22   --enable-maintainer-mode enable make rules and dependencies not useful
23                           (and sometimes confusing) to the casual installer"
24 ac_help="$ac_help
25   --enable-shared[=PKGS]  build shared libraries [default=yes]"
26 ac_help="$ac_help
27   --enable-static[=PKGS]  build static libraries [default=yes]"
28 ac_help="$ac_help
29   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
30 ac_help="$ac_help
31   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
32 ac_help="$ac_help
33   --disable-libtool-lock  avoid locking (might break parallel builds)"
34 ac_help="$ac_help
35   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
36 ac_help="$ac_help
37   --enable-fast-character prefer speed over size for Character"
38 ac_help="$ac_help
39   --disable-getenv-properties
40                           don't set system properties from GCJ_PROPERTIES"
41 ac_help="$ac_help
42   --enable-hash-synchronization
43                           Use global hash table for monitor locks"
44 ac_help="$ac_help
45   --enable-libgcj-debug   enable runtime debugging code"
46 ac_help="$ac_help
47   --enable-interpreter    enable interpreter"
48 ac_help="$ac_help
49   --enable-sjlj-exceptions  force use of builtin_setjmp for exceptions"
50 ac_help="$ac_help
51   --disable-java-net      disable java.net"
52 ac_help="$ac_help
53   --without-libffi        don't use libffi"
54 ac_help="$ac_help
55   --disable-jvmpi         disable JVMPI support"
56 ac_help="$ac_help
57   --with-ecos             enable runtime eCos target support"
58 ac_help="$ac_help
59   --with-system-zlib      use installed libz"
60 ac_help="$ac_help
61   --enable-java-gc=TYPE   choose garbage collector [boehm]"
62 ac_help="$ac_help
63   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
64 ac_help="$ac_help
65   --with-x                use the X Window System"
66 ac_help="$ac_help
67   --enable-java-awt       list of AWT peer implementations to be built"
68
69 # Initialize some variables set by options.
70 # The variables have the same names as the options, with
71 # dashes changed to underlines.
72 build=NONE
73 cache_file=./config.cache
74 exec_prefix=NONE
75 host=NONE
76 no_create=
77 nonopt=NONE
78 no_recursion=
79 prefix=NONE
80 program_prefix=NONE
81 program_suffix=NONE
82 program_transform_name=s,x,x,
83 silent=
84 site=
85 sitefile=
86 srcdir=
87 target=NONE
88 verbose=
89 x_includes=NONE
90 x_libraries=NONE
91 bindir='${exec_prefix}/bin'
92 sbindir='${exec_prefix}/sbin'
93 libexecdir='${exec_prefix}/libexec'
94 datadir='${prefix}/share'
95 sysconfdir='${prefix}/etc'
96 sharedstatedir='${prefix}/com'
97 localstatedir='${prefix}/var'
98 libdir='${exec_prefix}/lib'
99 includedir='${prefix}/include'
100 oldincludedir='/usr/include'
101 infodir='${prefix}/info'
102 mandir='${prefix}/man'
103
104 # Initialize some other variables.
105 subdirs=
106 MFLAGS= MAKEFLAGS=
107 SHELL=${CONFIG_SHELL-/bin/sh}
108 # Maximum number of lines to put in a shell here document.
109 ac_max_here_lines=12
110
111 ac_prev=
112 for ac_option
113 do
114
115   # If the previous option needs an argument, assign it.
116   if test -n "$ac_prev"; then
117     eval "$ac_prev=\$ac_option"
118     ac_prev=
119     continue
120   fi
121
122   case "$ac_option" in
123   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
124   *) ac_optarg= ;;
125   esac
126
127   # Accept the important Cygnus configure options, so we can diagnose typos.
128
129   case "$ac_option" in
130
131   -bindir | --bindir | --bindi | --bind | --bin | --bi)
132     ac_prev=bindir ;;
133   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
134     bindir="$ac_optarg" ;;
135
136   -build | --build | --buil | --bui | --bu)
137     ac_prev=build ;;
138   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
139     build="$ac_optarg" ;;
140
141   -cache-file | --cache-file | --cache-fil | --cache-fi \
142   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
143     ac_prev=cache_file ;;
144   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
145   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
146     cache_file="$ac_optarg" ;;
147
148   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
149     ac_prev=datadir ;;
150   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
151   | --da=*)
152     datadir="$ac_optarg" ;;
153
154   -disable-* | --disable-*)
155     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
156     # Reject names that are not valid shell variable names.
157     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
158       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
159     fi
160     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161     eval "enable_${ac_feature}=no" ;;
162
163   -enable-* | --enable-*)
164     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
165     # Reject names that are not valid shell variable names.
166     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
167       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
168     fi
169     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
170     case "$ac_option" in
171       *=*) ;;
172       *) ac_optarg=yes ;;
173     esac
174     eval "enable_${ac_feature}='$ac_optarg'" ;;
175
176   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
177   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
178   | --exec | --exe | --ex)
179     ac_prev=exec_prefix ;;
180   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
181   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
182   | --exec=* | --exe=* | --ex=*)
183     exec_prefix="$ac_optarg" ;;
184
185   -gas | --gas | --ga | --g)
186     # Obsolete; use --with-gas.
187     with_gas=yes ;;
188
189   -help | --help | --hel | --he)
190     # Omit some internal or obsolete options to make the list less imposing.
191     # This message is too long to be a string in the A/UX 3.1 sh.
192     cat << EOF
193 Usage: configure [options] [host]
194 Options: [defaults in brackets after descriptions]
195 Configuration:
196   --cache-file=FILE       cache test results in FILE
197   --help                  print this message
198   --no-create             do not create output files
199   --quiet, --silent       do not print \`checking...' messages
200   --site-file=FILE        use FILE as the site file
201   --version               print the version of autoconf that created configure
202 Directory and file names:
203   --prefix=PREFIX         install architecture-independent files in PREFIX
204                           [$ac_default_prefix]
205   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
206                           [same as prefix]
207   --bindir=DIR            user executables in DIR [EPREFIX/bin]
208   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
209   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
210   --datadir=DIR           read-only architecture-independent data in DIR
211                           [PREFIX/share]
212   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
213   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
214                           [PREFIX/com]
215   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
216   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
217   --includedir=DIR        C header files in DIR [PREFIX/include]
218   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
219   --infodir=DIR           info documentation in DIR [PREFIX/info]
220   --mandir=DIR            man documentation in DIR [PREFIX/man]
221   --srcdir=DIR            find the sources in DIR [configure dir or ..]
222   --program-prefix=PREFIX prepend PREFIX to installed program names
223   --program-suffix=SUFFIX append SUFFIX to installed program names
224   --program-transform-name=PROGRAM
225                           run sed PROGRAM on installed program names
226 EOF
227     cat << EOF
228 Host type:
229   --build=BUILD           configure for building on BUILD [BUILD=HOST]
230   --host=HOST             configure for HOST [guessed]
231   --target=TARGET         configure for TARGET [TARGET=HOST]
232 Features and packages:
233   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
234   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
235   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
236   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
237   --x-includes=DIR        X include files are in DIR
238   --x-libraries=DIR       X library files are in DIR
239 EOF
240     if test -n "$ac_help"; then
241       echo "--enable and --with options recognized:$ac_help"
242     fi
243     exit 0 ;;
244
245   -host | --host | --hos | --ho)
246     ac_prev=host ;;
247   -host=* | --host=* | --hos=* | --ho=*)
248     host="$ac_optarg" ;;
249
250   -includedir | --includedir | --includedi | --included | --include \
251   | --includ | --inclu | --incl | --inc)
252     ac_prev=includedir ;;
253   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
254   | --includ=* | --inclu=* | --incl=* | --inc=*)
255     includedir="$ac_optarg" ;;
256
257   -infodir | --infodir | --infodi | --infod | --info | --inf)
258     ac_prev=infodir ;;
259   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
260     infodir="$ac_optarg" ;;
261
262   -libdir | --libdir | --libdi | --libd)
263     ac_prev=libdir ;;
264   -libdir=* | --libdir=* | --libdi=* | --libd=*)
265     libdir="$ac_optarg" ;;
266
267   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
268   | --libexe | --libex | --libe)
269     ac_prev=libexecdir ;;
270   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
271   | --libexe=* | --libex=* | --libe=*)
272     libexecdir="$ac_optarg" ;;
273
274   -localstatedir | --localstatedir | --localstatedi | --localstated \
275   | --localstate | --localstat | --localsta | --localst \
276   | --locals | --local | --loca | --loc | --lo)
277     ac_prev=localstatedir ;;
278   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
279   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
280   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
281     localstatedir="$ac_optarg" ;;
282
283   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
284     ac_prev=mandir ;;
285   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
286     mandir="$ac_optarg" ;;
287
288   -nfp | --nfp | --nf)
289     # Obsolete; use --without-fp.
290     with_fp=no ;;
291
292   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
293   | --no-cr | --no-c)
294     no_create=yes ;;
295
296   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
297   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
298     no_recursion=yes ;;
299
300   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
301   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
302   | --oldin | --oldi | --old | --ol | --o)
303     ac_prev=oldincludedir ;;
304   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
305   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
306   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
307     oldincludedir="$ac_optarg" ;;
308
309   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
310     ac_prev=prefix ;;
311   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
312     prefix="$ac_optarg" ;;
313
314   -program-prefix | --program-prefix | --program-prefi | --program-pref \
315   | --program-pre | --program-pr | --program-p)
316     ac_prev=program_prefix ;;
317   -program-prefix=* | --program-prefix=* | --program-prefi=* \
318   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
319     program_prefix="$ac_optarg" ;;
320
321   -program-suffix | --program-suffix | --program-suffi | --program-suff \
322   | --program-suf | --program-su | --program-s)
323     ac_prev=program_suffix ;;
324   -program-suffix=* | --program-suffix=* | --program-suffi=* \
325   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
326     program_suffix="$ac_optarg" ;;
327
328   -program-transform-name | --program-transform-name \
329   | --program-transform-nam | --program-transform-na \
330   | --program-transform-n | --program-transform- \
331   | --program-transform | --program-transfor \
332   | --program-transfo | --program-transf \
333   | --program-trans | --program-tran \
334   | --progr-tra | --program-tr | --program-t)
335     ac_prev=program_transform_name ;;
336   -program-transform-name=* | --program-transform-name=* \
337   | --program-transform-nam=* | --program-transform-na=* \
338   | --program-transform-n=* | --program-transform-=* \
339   | --program-transform=* | --program-transfor=* \
340   | --program-transfo=* | --program-transf=* \
341   | --program-trans=* | --program-tran=* \
342   | --progr-tra=* | --program-tr=* | --program-t=*)
343     program_transform_name="$ac_optarg" ;;
344
345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
346   | -silent | --silent | --silen | --sile | --sil)
347     silent=yes ;;
348
349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
350     ac_prev=sbindir ;;
351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
352   | --sbi=* | --sb=*)
353     sbindir="$ac_optarg" ;;
354
355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
357   | --sharedst | --shareds | --shared | --share | --shar \
358   | --sha | --sh)
359     ac_prev=sharedstatedir ;;
360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
363   | --sha=* | --sh=*)
364     sharedstatedir="$ac_optarg" ;;
365
366   -site | --site | --sit)
367     ac_prev=site ;;
368   -site=* | --site=* | --sit=*)
369     site="$ac_optarg" ;;
370
371   -site-file | --site-file | --site-fil | --site-fi | --site-f)
372     ac_prev=sitefile ;;
373   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
374     sitefile="$ac_optarg" ;;
375
376   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
377     ac_prev=srcdir ;;
378   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
379     srcdir="$ac_optarg" ;;
380
381   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
382   | --syscon | --sysco | --sysc | --sys | --sy)
383     ac_prev=sysconfdir ;;
384   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
385   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
386     sysconfdir="$ac_optarg" ;;
387
388   -target | --target | --targe | --targ | --tar | --ta | --t)
389     ac_prev=target ;;
390   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
391     target="$ac_optarg" ;;
392
393   -v | -verbose | --verbose | --verbos | --verbo | --verb)
394     verbose=yes ;;
395
396   -version | --version | --versio | --versi | --vers)
397     echo "configure generated by autoconf version 2.13"
398     exit 0 ;;
399
400   -with-* | --with-*)
401     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
402     # Reject names that are not valid shell variable names.
403     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
404       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405     fi
406     ac_package=`echo $ac_package| sed 's/-/_/g'`
407     case "$ac_option" in
408       *=*) ;;
409       *) ac_optarg=yes ;;
410     esac
411     eval "with_${ac_package}='$ac_optarg'" ;;
412
413   -without-* | --without-*)
414     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
418     fi
419     ac_package=`echo $ac_package| sed 's/-/_/g'`
420     eval "with_${ac_package}=no" ;;
421
422   --x)
423     # Obsolete; use --with-x.
424     with_x=yes ;;
425
426   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
427   | --x-incl | --x-inc | --x-in | --x-i)
428     ac_prev=x_includes ;;
429   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
430   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
431     x_includes="$ac_optarg" ;;
432
433   -x-libraries | --x-libraries | --x-librarie | --x-librari \
434   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
435     ac_prev=x_libraries ;;
436   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
437   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
438     x_libraries="$ac_optarg" ;;
439
440   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
441     ;;
442
443   *)
444     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
445       echo "configure: warning: $ac_option: invalid host type" 1>&2
446     fi
447     if test "x$nonopt" != xNONE; then
448       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
449     fi
450     nonopt="$ac_option"
451     ;;
452
453   esac
454 done
455
456 if test -n "$ac_prev"; then
457   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
458 fi
459
460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
461
462 # File descriptor usage:
463 # 0 standard input
464 # 1 file creation
465 # 2 errors and warnings
466 # 3 some systems may open it to /dev/tty
467 # 4 used on the Kubota Titan
468 # 6 checking for... messages and results
469 # 5 compiler messages saved in config.log
470 if test "$silent" = yes; then
471   exec 6>/dev/null
472 else
473   exec 6>&1
474 fi
475 exec 5>./config.log
476
477 echo "\
478 This file contains any messages produced by compilers while
479 running configure, to aid debugging if configure makes a mistake.
480 " 1>&5
481
482 # Strip out --no-create and --no-recursion so they do not pile up.
483 # Also quote any args containing shell metacharacters.
484 ac_configure_args=
485 for ac_arg
486 do
487   case "$ac_arg" in
488   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
489   | --no-cr | --no-c) ;;
490   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
492   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
493   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
494   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
495   esac
496 done
497
498 # NLS nuisances.
499 # Only set these to C if already set.  These must not be set unconditionally
500 # because not all systems understand e.g. LANG=C (notably SCO).
501 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
502 # Non-C LC_CTYPE values break the ctype check.
503 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
504 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
505 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
506 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
507
508 # confdefs.h avoids OS command line length limits that DEFS can exceed.
509 rm -rf conftest* confdefs.h
510 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
511 echo > confdefs.h
512
513 # A filename unique to this package, relative to the directory that
514 # configure is in, which we can look for to find out if srcdir is correct.
515 ac_unique_file=java/lang/System.java
516
517 # Find the source files, if location was not specified.
518 if test -z "$srcdir"; then
519   ac_srcdir_defaulted=yes
520   # Try the directory containing this script, then its parent.
521   ac_prog=$0
522   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
523   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
524   srcdir=$ac_confdir
525   if test ! -r $srcdir/$ac_unique_file; then
526     srcdir=..
527   fi
528 else
529   ac_srcdir_defaulted=no
530 fi
531 if test ! -r $srcdir/$ac_unique_file; then
532   if test "$ac_srcdir_defaulted" = yes; then
533     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
534   else
535     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
536   fi
537 fi
538 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
539
540 # Prefer explicitly selected file to automatically selected ones.
541 if test -z "$sitefile"; then
542   if test -z "$CONFIG_SITE"; then
543     if test "x$prefix" != xNONE; then
544       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
545     else
546       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
547     fi
548   fi
549 else
550   CONFIG_SITE="$sitefile"
551 fi
552 for ac_site_file in $CONFIG_SITE; do
553   if test -r "$ac_site_file"; then
554     echo "loading site script $ac_site_file"
555     . "$ac_site_file"
556   fi
557 done
558
559 if test -r "$cache_file"; then
560   echo "loading cache $cache_file"
561   . $cache_file
562 else
563   echo "creating cache $cache_file"
564   > $cache_file
565 fi
566
567 ac_ext=c
568 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
569 ac_cpp='$CPP $CPPFLAGS'
570 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
571 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
572 cross_compiling=$ac_cv_prog_cc_cross
573
574 ac_exeext=
575 ac_objext=o
576 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
577   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
578   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
579     ac_n= ac_c='
580 ' ac_t='        '
581   else
582     ac_n=-n ac_c= ac_t=
583   fi
584 else
585   ac_n= ac_c='\c' ac_t=
586 fi
587
588
589
590 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
591 echo "configure:592: checking whether ln -s works" >&5
592 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
593   echo $ac_n "(cached) $ac_c" 1>&6
594 else
595   rm -f conftestdata
596 if ln -s X conftestdata 2>/dev/null
597 then
598   rm -f conftestdata
599   ac_cv_prog_LN_S="ln -s"
600 else
601   ac_cv_prog_LN_S=ln
602 fi
603 fi
604 LN_S="$ac_cv_prog_LN_S"
605 if test "$ac_cv_prog_LN_S" = "ln -s"; then
606   echo "$ac_t""yes" 1>&6
607 else
608   echo "$ac_t""no" 1>&6
609 fi
610
611
612 # Check whether --with-target-subdir or --without-target-subdir was given.
613 if test "${with_target_subdir+set}" = set; then
614   withval="$with_target_subdir"
615   :
616 fi
617
618 # Check whether --with-cross-host or --without-cross-host was given.
619 if test "${with_cross_host+set}" = set; then
620   withval="$with_cross_host"
621   :
622 fi
623
624
625 # Find a good install program.  We prefer a C program (faster),
626 # so one script is as good as another.  But avoid the broken or
627 # incompatible versions:
628 # SysV /etc/install, /usr/sbin/install
629 # SunOS /usr/etc/install
630 # IRIX /sbin/install
631 # AIX /bin/install
632 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
633 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
634 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
635 # ./install, which can be erroneously created by make from ./install.sh.
636 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
637 echo "configure:638: checking for a BSD compatible install" >&5
638 if test -z "$INSTALL"; then
639 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
640   echo $ac_n "(cached) $ac_c" 1>&6
641 else
642     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
643   for ac_dir in $PATH; do
644     # Account for people who put trailing slashes in PATH elements.
645     case "$ac_dir/" in
646     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
647     *)
648       # OSF1 and SCO ODT 3.0 have their own names for install.
649       # Don't use installbsd from OSF since it installs stuff as root
650       # by default.
651       for ac_prog in ginstall scoinst install; do
652         if test -f $ac_dir/$ac_prog; then
653           if test $ac_prog = install &&
654             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
655             # AIX install.  It has an incompatible calling convention.
656             :
657           else
658             ac_cv_path_install="$ac_dir/$ac_prog -c"
659             break 2
660           fi
661         fi
662       done
663       ;;
664     esac
665   done
666   IFS="$ac_save_IFS"
667
668 fi
669   if test "${ac_cv_path_install+set}" = set; then
670     INSTALL="$ac_cv_path_install"
671   else
672     # As a last resort, use the slow shell script.  We don't cache a
673     # path for INSTALL within a source directory, because that will
674     # break other packages using the cache if that directory is
675     # removed, or if the path is relative.
676     INSTALL="$ac_install_sh"
677   fi
678 fi
679 echo "$ac_t""$INSTALL" 1>&6
680
681 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
682 # It thinks the first close brace ends the variable substitution.
683 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
684
685 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
686
687 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
688
689 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
690 echo "configure:691: checking whether build environment is sane" >&5
691 # Just in case
692 sleep 1
693 echo timestamp > conftestfile
694 # Do `set' in a subshell so we don't clobber the current shell's
695 # arguments.  Must try -L first in case configure is actually a
696 # symlink; some systems play weird games with the mod time of symlinks
697 # (eg FreeBSD returns the mod time of the symlink's containing
698 # directory).
699 if (
700    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
701    if test "$*" = "X"; then
702       # -L didn't work.
703       set X `ls -t $srcdir/configure conftestfile`
704    fi
705    if test "$*" != "X $srcdir/configure conftestfile" \
706       && test "$*" != "X conftestfile $srcdir/configure"; then
707
708       # If neither matched, then we have a broken ls.  This can happen
709       # if, for instance, CONFIG_SHELL is bash and it inherits a
710       # broken ls alias from the environment.  This has actually
711       # happened.  Such a system could not be considered "sane".
712       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
713 alias in your environment" 1>&2; exit 1; }
714    fi
715
716    test "$2" = conftestfile
717    )
718 then
719    # Ok.
720    :
721 else
722    { echo "configure: error: newly created file is older than distributed files!
723 Check your system clock" 1>&2; exit 1; }
724 fi
725 rm -f conftest*
726 echo "$ac_t""yes" 1>&6
727 if test "$program_transform_name" = s,x,x,; then
728   program_transform_name=
729 else
730   # Double any \ or $.  echo might interpret backslashes.
731   cat <<\EOF_SED > conftestsed
732 s,\\,\\\\,g; s,\$,$$,g
733 EOF_SED
734   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
735   rm -f conftestsed
736 fi
737 test "$program_prefix" != NONE &&
738   program_transform_name="s,^,${program_prefix},; $program_transform_name"
739 # Use a double $ so make ignores it.
740 test "$program_suffix" != NONE &&
741   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
742
743 # sed with no file args requires a program.
744 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
745
746 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
747 echo "configure:748: checking whether ${MAKE-make} sets \${MAKE}" >&5
748 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
749 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
750   echo $ac_n "(cached) $ac_c" 1>&6
751 else
752   cat > conftestmake <<\EOF
753 all:
754         @echo 'ac_maketemp="${MAKE}"'
755 EOF
756 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
757 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
758 if test -n "$ac_maketemp"; then
759   eval ac_cv_prog_make_${ac_make}_set=yes
760 else
761   eval ac_cv_prog_make_${ac_make}_set=no
762 fi
763 rm -f conftestmake
764 fi
765 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
766   echo "$ac_t""yes" 1>&6
767   SET_MAKE=
768 else
769   echo "$ac_t""no" 1>&6
770   SET_MAKE="MAKE=${MAKE-make}"
771 fi
772
773 if test $host != $build; then
774   ac_tool_prefix=${host_alias}-
775 else
776   ac_tool_prefix=
777 fi
778
779 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
780 echo "configure:781: checking for Cygwin environment" >&5
781 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
782   echo $ac_n "(cached) $ac_c" 1>&6
783 else
784   cat > conftest.$ac_ext <<EOF
785 #line 786 "configure"
786 #include "confdefs.h"
787
788 int main() {
789
790 #ifndef __CYGWIN__
791 #define __CYGWIN__ __CYGWIN32__
792 #endif
793 return __CYGWIN__;
794 ; return 0; }
795 EOF
796 if { (eval echo configure:797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
797   rm -rf conftest*
798   ac_cv_cygwin=yes
799 else
800   echo "configure: failed program was:" >&5
801   cat conftest.$ac_ext >&5
802   rm -rf conftest*
803   ac_cv_cygwin=no
804 fi
805 rm -f conftest*
806 rm -f conftest*
807 fi
808
809 echo "$ac_t""$ac_cv_cygwin" 1>&6
810 CYGWIN=
811 test "$ac_cv_cygwin" = yes && CYGWIN=yes
812 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
813 echo "configure:814: checking for mingw32 environment" >&5
814 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
815   echo $ac_n "(cached) $ac_c" 1>&6
816 else
817   cat > conftest.$ac_ext <<EOF
818 #line 819 "configure"
819 #include "confdefs.h"
820
821 int main() {
822 return __MINGW32__;
823 ; return 0; }
824 EOF
825 if { (eval echo configure:826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
826   rm -rf conftest*
827   ac_cv_mingw32=yes
828 else
829   echo "configure: failed program was:" >&5
830   cat conftest.$ac_ext >&5
831   rm -rf conftest*
832   ac_cv_mingw32=no
833 fi
834 rm -f conftest*
835 rm -f conftest*
836 fi
837
838 echo "$ac_t""$ac_cv_mingw32" 1>&6
839 MINGW32=
840 test "$ac_cv_mingw32" = yes && MINGW32=yes
841
842 # Check whether --enable-multilib or --disable-multilib was given.
843 if test "${enable_multilib+set}" = set; then
844   enableval="$enable_multilib"
845   case "${enableval}" in
846   yes) multilib=yes ;;
847   no)  multilib=no ;;
848   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
849  esac
850 else
851   multilib=yes
852 fi
853
854
855 # When building with srcdir == objdir, links to the source files will
856 # be created in directories within the target_subdir.  We have to
857 # adjust toplevel_srcdir accordingly, so that configure finds
858 # install-sh and other auxiliary files that live in the top-level
859 # source directory.
860 if test "${srcdir}" = "."; then
861   if test -z "${with_target_subdir}"; then
862     toprel=".."
863   else
864     if test "${with_target_subdir}" != "."; then
865       toprel="${with_multisrctop}../.."
866     else
867       toprel="${with_multisrctop}.."
868     fi
869   fi
870 else
871   toprel=".."
872 fi
873
874 libgcj_basedir=$srcdir/$toprel/./libjava
875
876
877 ac_aux_dir=
878 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
879   if test -f $ac_dir/install-sh; then
880     ac_aux_dir=$ac_dir
881     ac_install_sh="$ac_aux_dir/install-sh -c"
882     break
883   elif test -f $ac_dir/install.sh; then
884     ac_aux_dir=$ac_dir
885     ac_install_sh="$ac_aux_dir/install.sh -c"
886     break
887   fi
888 done
889 if test -z "$ac_aux_dir"; then
890   { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
891 fi
892 ac_config_guess=$ac_aux_dir/config.guess
893 ac_config_sub=$ac_aux_dir/config.sub
894 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
895
896 if :; then :; else
897   # This overrides the previous occurrence for automake, but not for
898   # autoconf, which is exactly what we want.
899   ac_aux_dir=
900 for ac_dir in .. $srcdir/..; do
901   if test -f $ac_dir/install-sh; then
902     ac_aux_dir=$ac_dir
903     ac_install_sh="$ac_aux_dir/install-sh -c"
904     break
905   elif test -f $ac_dir/install.sh; then
906     ac_aux_dir=$ac_dir
907     ac_install_sh="$ac_aux_dir/install.sh -c"
908     break
909   fi
910 done
911 if test -z "$ac_aux_dir"; then
912   { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
913 fi
914 ac_config_guess=$ac_aux_dir/config.guess
915 ac_config_sub=$ac_aux_dir/config.sub
916 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
917
918 fi
919
920 # This works around an automake problem.
921 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
922
923
924
925 # Do some error checking and defaulting for the host and target type.
926 # The inputs are:
927 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
928 #
929 # The rules are:
930 # 1. You are not allowed to specify --host, --target, and nonopt at the
931 #    same time.
932 # 2. Host defaults to nonopt.
933 # 3. If nonopt is not specified, then host defaults to the current host,
934 #    as determined by config.guess.
935 # 4. Target and build default to nonopt.
936 # 5. If nonopt is not specified, then target and build default to host.
937
938 # The aliases save the names the user supplied, while $host etc.
939 # will get canonicalized.
940 case $host---$target---$nonopt in
941 NONE---*---* | *---NONE---* | *---*---NONE) ;;
942 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
943 esac
944
945
946 # Make sure we can run config.sub.
947 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
948 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
949 fi
950
951 echo $ac_n "checking host system type""... $ac_c" 1>&6
952 echo "configure:953: checking host system type" >&5
953
954 host_alias=$host
955 case "$host_alias" in
956 NONE)
957   case $nonopt in
958   NONE)
959     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
960     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
961     fi ;;
962   *) host_alias=$nonopt ;;
963   esac ;;
964 esac
965
966 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
967 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
968 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
969 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
970 echo "$ac_t""$host" 1>&6
971
972 echo $ac_n "checking target system type""... $ac_c" 1>&6
973 echo "configure:974: checking target system type" >&5
974
975 target_alias=$target
976 case "$target_alias" in
977 NONE)
978   case $nonopt in
979   NONE) target_alias=$host_alias ;;
980   *) target_alias=$nonopt ;;
981   esac ;;
982 esac
983
984 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
985 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 echo "$ac_t""$target" 1>&6
989
990 echo $ac_n "checking build system type""... $ac_c" 1>&6
991 echo "configure:992: checking build system type" >&5
992
993 build_alias=$build
994 case "$build_alias" in
995 NONE)
996   case $nonopt in
997   NONE) build_alias=$host_alias ;;
998   *) build_alias=$nonopt ;;
999   esac ;;
1000 esac
1001
1002 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1003 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1004 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1005 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1006 echo "$ac_t""$build" 1>&6
1007
1008 test "$host_alias" != "$target_alias" &&
1009   test "$program_prefix$program_suffix$program_transform_name" = \
1010     NONENONEs,x,x, &&
1011   program_prefix=${target_alias}-
1012
1013
1014
1015
1016
1017 # Extract the first word of "gcc", so it can be a program name with args.
1018 set dummy gcc; ac_word=$2
1019 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1020 echo "configure:1021: checking for $ac_word" >&5
1021 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1022   echo $ac_n "(cached) $ac_c" 1>&6
1023 else
1024   if test -n "$CC"; then
1025   ac_cv_prog_CC="$CC" # Let the user override the test.
1026 else
1027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1028   ac_dummy="$PATH"
1029   for ac_dir in $ac_dummy; do
1030     test -z "$ac_dir" && ac_dir=.
1031     if test -f $ac_dir/$ac_word; then
1032       ac_cv_prog_CC="gcc"
1033       break
1034     fi
1035   done
1036   IFS="$ac_save_ifs"
1037 fi
1038 fi
1039 CC="$ac_cv_prog_CC"
1040 if test -n "$CC"; then
1041   echo "$ac_t""$CC" 1>&6
1042 else
1043   echo "$ac_t""no" 1>&6
1044 fi
1045
1046 if test -z "$CC"; then
1047   # Extract the first word of "cc", so it can be a program name with args.
1048 set dummy cc; ac_word=$2
1049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1050 echo "configure:1051: checking for $ac_word" >&5
1051 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1052   echo $ac_n "(cached) $ac_c" 1>&6
1053 else
1054   if test -n "$CC"; then
1055   ac_cv_prog_CC="$CC" # Let the user override the test.
1056 else
1057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1058   ac_prog_rejected=no
1059   ac_dummy="$PATH"
1060   for ac_dir in $ac_dummy; do
1061     test -z "$ac_dir" && ac_dir=.
1062     if test -f $ac_dir/$ac_word; then
1063       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1064         ac_prog_rejected=yes
1065         continue
1066       fi
1067       ac_cv_prog_CC="cc"
1068       break
1069     fi
1070   done
1071   IFS="$ac_save_ifs"
1072 if test $ac_prog_rejected = yes; then
1073   # We found a bogon in the path, so make sure we never use it.
1074   set dummy $ac_cv_prog_CC
1075   shift
1076   if test $# -gt 0; then
1077     # We chose a different compiler from the bogus one.
1078     # However, it has the same basename, so the bogon will be chosen
1079     # first if we set CC to just the basename; use the full file name.
1080     shift
1081     set dummy "$ac_dir/$ac_word" "$@"
1082     shift
1083     ac_cv_prog_CC="$@"
1084   fi
1085 fi
1086 fi
1087 fi
1088 CC="$ac_cv_prog_CC"
1089 if test -n "$CC"; then
1090   echo "$ac_t""$CC" 1>&6
1091 else
1092   echo "$ac_t""no" 1>&6
1093 fi
1094
1095   if test -z "$CC"; then
1096     case "`uname -s`" in
1097     *win32* | *WIN32*)
1098       # Extract the first word of "cl", so it can be a program name with args.
1099 set dummy cl; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   if test -n "$CC"; then
1106   ac_cv_prog_CC="$CC" # Let the user override the test.
1107 else
1108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1109   ac_dummy="$PATH"
1110   for ac_dir in $ac_dummy; do
1111     test -z "$ac_dir" && ac_dir=.
1112     if test -f $ac_dir/$ac_word; then
1113       ac_cv_prog_CC="cl"
1114       break
1115     fi
1116   done
1117   IFS="$ac_save_ifs"
1118 fi
1119 fi
1120 CC="$ac_cv_prog_CC"
1121 if test -n "$CC"; then
1122   echo "$ac_t""$CC" 1>&6
1123 else
1124   echo "$ac_t""no" 1>&6
1125 fi
1126  ;;
1127     esac
1128   fi
1129   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1130 fi
1131
1132
1133 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1134 echo "configure:1135: checking whether we are using GNU C" >&5
1135 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1136   echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138   cat > conftest.c <<EOF
1139 #ifdef __GNUC__
1140   yes;
1141 #endif
1142 EOF
1143 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1144   ac_cv_prog_gcc=yes
1145 else
1146   ac_cv_prog_gcc=no
1147 fi
1148 fi
1149
1150 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1151
1152 if test $ac_cv_prog_gcc = yes; then
1153   GCC=yes
1154 else
1155   GCC=
1156 fi
1157
1158 ac_test_CFLAGS="${CFLAGS+set}"
1159 ac_save_CFLAGS="$CFLAGS"
1160 CFLAGS=
1161 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1162 echo "configure:1163: checking whether ${CC-cc} accepts -g" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1164   echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166   echo 'void f(){}' > conftest.c
1167 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1168   ac_cv_prog_cc_g=yes
1169 else
1170   ac_cv_prog_cc_g=no
1171 fi
1172 rm -f conftest*
1173
1174 fi
1175
1176 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1177 if test "$ac_test_CFLAGS" = set; then
1178   CFLAGS="$ac_save_CFLAGS"
1179 elif test $ac_cv_prog_cc_g = yes; then
1180   if test "$GCC" = yes; then
1181     CFLAGS="-g -O2"
1182   else
1183     CFLAGS="-g"
1184   fi
1185 else
1186   if test "$GCC" = yes; then
1187     CFLAGS="-O2"
1188   else
1189     CFLAGS=
1190   fi
1191 fi
1192
1193 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1194 do
1195 # Extract the first word of "$ac_prog", so it can be a program name with args.
1196 set dummy $ac_prog; ac_word=$2
1197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1198 echo "configure:1199: checking for $ac_word" >&5
1199 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1200   echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202   if test -n "$CXX"; then
1203   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1204 else
1205   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1206   ac_dummy="$PATH"
1207   for ac_dir in $ac_dummy; do
1208     test -z "$ac_dir" && ac_dir=.
1209     if test -f $ac_dir/$ac_word; then
1210       ac_cv_prog_CXX="$ac_prog"
1211       break
1212     fi
1213   done
1214   IFS="$ac_save_ifs"
1215 fi
1216 fi
1217 CXX="$ac_cv_prog_CXX"
1218 if test -n "$CXX"; then
1219   echo "$ac_t""$CXX" 1>&6
1220 else
1221   echo "$ac_t""no" 1>&6
1222 fi
1223
1224 test -n "$CXX" && break
1225 done
1226 test -n "$CXX" || CXX="gcc"
1227
1228
1229
1230 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1231 echo "configure:1232: checking whether we are using GNU C++" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1233   echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235   cat > conftest.C <<EOF
1236 #ifdef __GNUC__
1237   yes;
1238 #endif
1239 EOF
1240 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1241   ac_cv_prog_gxx=yes
1242 else
1243   ac_cv_prog_gxx=no
1244 fi
1245 fi
1246
1247 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1248
1249 if test $ac_cv_prog_gxx = yes; then
1250   GXX=yes
1251 else
1252   GXX=
1253 fi
1254
1255 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1256 ac_save_CXXFLAGS="$CXXFLAGS"
1257 CXXFLAGS=
1258 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1259 echo "configure:1260: checking whether ${CXX-g++} accepts -g" >&5
1260 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1261   echo $ac_n "(cached) $ac_c" 1>&6
1262 else
1263   echo 'void f(){}' > conftest.cc
1264 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1265   ac_cv_prog_cxx_g=yes
1266 else
1267   ac_cv_prog_cxx_g=no
1268 fi
1269 rm -f conftest*
1270
1271 fi
1272
1273 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1274 if test "$ac_test_CXXFLAGS" = set; then
1275   CXXFLAGS="$ac_save_CXXFLAGS"
1276 elif test $ac_cv_prog_cxx_g = yes; then
1277   if test "$GXX" = yes; then
1278     CXXFLAGS="-g -O2"
1279   else
1280     CXXFLAGS="-g"
1281   fi
1282 else
1283   if test "$GXX" = yes; then
1284     CXXFLAGS="-O2"
1285   else
1286     CXXFLAGS=
1287   fi
1288 fi
1289
1290
1291 version=0.0.7
1292
1293 PACKAGE=libjava
1294
1295 VERSION=$version
1296
1297 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1298   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1299 fi
1300 cat >> confdefs.h <<EOF
1301 #define PACKAGE "$PACKAGE"
1302 EOF
1303
1304 cat >> confdefs.h <<EOF
1305 #define VERSION "$VERSION"
1306 EOF
1307
1308
1309
1310 missing_dir=`cd $ac_aux_dir && pwd`
1311 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1312 echo "configure:1313: checking for working aclocal" >&5
1313 # Run test in a subshell; some versions of sh will print an error if
1314 # an executable is not found, even if stderr is redirected.
1315 # Redirect stdin to placate older versions of autoconf.  Sigh.
1316 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1317    ACLOCAL=aclocal
1318    echo "$ac_t""found" 1>&6
1319 else
1320    ACLOCAL="$missing_dir/missing aclocal"
1321    echo "$ac_t""missing" 1>&6
1322 fi
1323
1324 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1325 echo "configure:1326: checking for working autoconf" >&5
1326 # Run test in a subshell; some versions of sh will print an error if
1327 # an executable is not found, even if stderr is redirected.
1328 # Redirect stdin to placate older versions of autoconf.  Sigh.
1329 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1330    AUTOCONF=autoconf
1331    echo "$ac_t""found" 1>&6
1332 else
1333    AUTOCONF="$missing_dir/missing autoconf"
1334    echo "$ac_t""missing" 1>&6
1335 fi
1336
1337 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1338 echo "configure:1339: checking for working automake" >&5
1339 # Run test in a subshell; some versions of sh will print an error if
1340 # an executable is not found, even if stderr is redirected.
1341 # Redirect stdin to placate older versions of autoconf.  Sigh.
1342 if (automake --version) < /dev/null > /dev/null 2>&1; then
1343    AUTOMAKE=automake
1344    echo "$ac_t""found" 1>&6
1345 else
1346    AUTOMAKE="$missing_dir/missing automake"
1347    echo "$ac_t""missing" 1>&6
1348 fi
1349
1350 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1351 echo "configure:1352: checking for working autoheader" >&5
1352 # Run test in a subshell; some versions of sh will print an error if
1353 # an executable is not found, even if stderr is redirected.
1354 # Redirect stdin to placate older versions of autoconf.  Sigh.
1355 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1356    AUTOHEADER=autoheader
1357    echo "$ac_t""found" 1>&6
1358 else
1359    AUTOHEADER="$missing_dir/missing autoheader"
1360    echo "$ac_t""missing" 1>&6
1361 fi
1362
1363 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1364 echo "configure:1365: checking for working makeinfo" >&5
1365 # Run test in a subshell; some versions of sh will print an error if
1366 # an executable is not found, even if stderr is redirected.
1367 # Redirect stdin to placate older versions of autoconf.  Sigh.
1368 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1369    MAKEINFO=makeinfo
1370    echo "$ac_t""found" 1>&6
1371 else
1372    MAKEINFO="$missing_dir/missing makeinfo"
1373    echo "$ac_t""missing" 1>&6
1374 fi
1375
1376
1377
1378 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we dont
1379 # run it explicitly here, it will be run implicitly before
1380 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1381 # be run before AC_CANONICAL_HOST.
1382 echo $ac_n "checking build system type""... $ac_c" 1>&6
1383 echo "configure:1384: checking build system type" >&5
1384
1385 build_alias=$build
1386 case "$build_alias" in
1387 NONE)
1388   case $nonopt in
1389   NONE) build_alias=$host_alias ;;
1390   *) build_alias=$nonopt ;;
1391   esac ;;
1392 esac
1393
1394 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1395 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1396 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1397 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1398 echo "$ac_t""$build" 1>&6
1399
1400
1401 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1402 set dummy ${ac_tool_prefix}as; ac_word=$2
1403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1404 echo "configure:1405: checking for $ac_word" >&5
1405 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1406   echo $ac_n "(cached) $ac_c" 1>&6
1407 else
1408   if test -n "$AS"; then
1409   ac_cv_prog_AS="$AS" # Let the user override the test.
1410 else
1411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1412   ac_dummy="$PATH"
1413   for ac_dir in $ac_dummy; do
1414     test -z "$ac_dir" && ac_dir=.
1415     if test -f $ac_dir/$ac_word; then
1416       ac_cv_prog_AS="${ac_tool_prefix}as"
1417       break
1418     fi
1419   done
1420   IFS="$ac_save_ifs"
1421   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1422 fi
1423 fi
1424 AS="$ac_cv_prog_AS"
1425 if test -n "$AS"; then
1426   echo "$ac_t""$AS" 1>&6
1427 else
1428   echo "$ac_t""no" 1>&6
1429 fi
1430
1431
1432
1433 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1434 set dummy ${ac_tool_prefix}ar; ac_word=$2
1435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1436 echo "configure:1437: checking for $ac_word" >&5
1437 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1438   echo $ac_n "(cached) $ac_c" 1>&6
1439 else
1440   if test -n "$AR"; then
1441   ac_cv_prog_AR="$AR" # Let the user override the test.
1442 else
1443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1444   ac_dummy="$PATH"
1445   for ac_dir in $ac_dummy; do
1446     test -z "$ac_dir" && ac_dir=.
1447     if test -f $ac_dir/$ac_word; then
1448       ac_cv_prog_AR="${ac_tool_prefix}ar"
1449       break
1450     fi
1451   done
1452   IFS="$ac_save_ifs"
1453   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1454 fi
1455 fi
1456 AR="$ac_cv_prog_AR"
1457 if test -n "$AR"; then
1458   echo "$ac_t""$AR" 1>&6
1459 else
1460   echo "$ac_t""no" 1>&6
1461 fi
1462
1463
1464
1465 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1466 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1468 echo "configure:1469: checking for $ac_word" >&5
1469 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1470   echo $ac_n "(cached) $ac_c" 1>&6
1471 else
1472   if test -n "$RANLIB"; then
1473   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1474 else
1475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1476   ac_dummy="$PATH"
1477   for ac_dir in $ac_dummy; do
1478     test -z "$ac_dir" && ac_dir=.
1479     if test -f $ac_dir/$ac_word; then
1480       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1481       break
1482     fi
1483   done
1484   IFS="$ac_save_ifs"
1485 fi
1486 fi
1487 RANLIB="$ac_cv_prog_RANLIB"
1488 if test -n "$RANLIB"; then
1489   echo "$ac_t""$RANLIB" 1>&6
1490 else
1491   echo "$ac_t""no" 1>&6
1492 fi
1493
1494
1495 if test -z "$ac_cv_prog_RANLIB"; then
1496 if test -n "$ac_tool_prefix"; then
1497   # Extract the first word of "ranlib", so it can be a program name with args.
1498 set dummy ranlib; ac_word=$2
1499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1500 echo "configure:1501: checking for $ac_word" >&5
1501 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1502   echo $ac_n "(cached) $ac_c" 1>&6
1503 else
1504   if test -n "$RANLIB"; then
1505   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1506 else
1507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1508   ac_dummy="$PATH"
1509   for ac_dir in $ac_dummy; do
1510     test -z "$ac_dir" && ac_dir=.
1511     if test -f $ac_dir/$ac_word; then
1512       ac_cv_prog_RANLIB="ranlib"
1513       break
1514     fi
1515   done
1516   IFS="$ac_save_ifs"
1517   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1518 fi
1519 fi
1520 RANLIB="$ac_cv_prog_RANLIB"
1521 if test -n "$RANLIB"; then
1522   echo "$ac_t""$RANLIB" 1>&6
1523 else
1524   echo "$ac_t""no" 1>&6
1525 fi
1526
1527 else
1528   RANLIB=":"
1529 fi
1530 fi
1531
1532
1533 # Find a good install program.  We prefer a C program (faster),
1534 # so one script is as good as another.  But avoid the broken or
1535 # incompatible versions:
1536 # SysV /etc/install, /usr/sbin/install
1537 # SunOS /usr/etc/install
1538 # IRIX /sbin/install
1539 # AIX /bin/install
1540 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1541 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1542 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1543 # ./install, which can be erroneously created by make from ./install.sh.
1544 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1545 echo "configure:1546: checking for a BSD compatible install" >&5
1546 if test -z "$INSTALL"; then
1547 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1548   echo $ac_n "(cached) $ac_c" 1>&6
1549 else
1550     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1551   for ac_dir in $PATH; do
1552     # Account for people who put trailing slashes in PATH elements.
1553     case "$ac_dir/" in
1554     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1555     *)
1556       # OSF1 and SCO ODT 3.0 have their own names for install.
1557       # Don't use installbsd from OSF since it installs stuff as root
1558       # by default.
1559       for ac_prog in ginstall scoinst install; do
1560         if test -f $ac_dir/$ac_prog; then
1561           if test $ac_prog = install &&
1562             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1563             # AIX install.  It has an incompatible calling convention.
1564             :
1565           else
1566             ac_cv_path_install="$ac_dir/$ac_prog -c"
1567             break 2
1568           fi
1569         fi
1570       done
1571       ;;
1572     esac
1573   done
1574   IFS="$ac_save_IFS"
1575
1576 fi
1577   if test "${ac_cv_path_install+set}" = set; then
1578     INSTALL="$ac_cv_path_install"
1579   else
1580     # As a last resort, use the slow shell script.  We don't cache a
1581     # path for INSTALL within a source directory, because that will
1582     # break other packages using the cache if that directory is
1583     # removed, or if the path is relative.
1584     INSTALL="$ac_install_sh"
1585   fi
1586 fi
1587 echo "$ac_t""$INSTALL" 1>&6
1588
1589 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1590 # It thinks the first close brace ends the variable substitution.
1591 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1592
1593 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1594
1595 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1596
1597
1598 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1599 echo "configure:1600: checking whether to enable maintainer-specific portions of Makefiles" >&5
1600     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1601 if test "${enable_maintainer_mode+set}" = set; then
1602   enableval="$enable_maintainer_mode"
1603   USE_MAINTAINER_MODE=$enableval
1604 else
1605   USE_MAINTAINER_MODE=no
1606 fi
1607
1608   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1609   
1610
1611 if test $USE_MAINTAINER_MODE = yes; then
1612   MAINTAINER_MODE_TRUE=
1613   MAINTAINER_MODE_FALSE='#'
1614 else
1615   MAINTAINER_MODE_TRUE='#'
1616   MAINTAINER_MODE_FALSE=
1617 fi
1618   MAINT=$MAINTAINER_MODE_TRUE
1619   
1620
1621
1622 # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
1623 # at least currently, we never actually build a program, so we never
1624 # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
1625 # fails, because we are probably configuring with a cross compiler
1626 # which cant create executables.  So we include AC_EXEEXT to keep
1627 # automake happy, but we dont execute it, since we dont care about
1628 # the result.
1629 if false; then
1630   # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
1631   # to nothing, so nothing would remain between `then' and `fi' if it
1632   # were not for the `:' below.
1633   :
1634   
1635
1636 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1637 echo "configure:1638: checking for executable suffix" >&5
1638 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1639   echo $ac_n "(cached) $ac_c" 1>&6
1640 else
1641   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1642   ac_cv_exeext=.exe
1643 else
1644   rm -f conftest*
1645   echo 'int main () { return 0; }' > conftest.$ac_ext
1646   ac_cv_exeext=
1647   if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1648     for file in conftest.*; do
1649       case $file in
1650       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1651       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1652       esac
1653     done
1654   else
1655     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1656   fi
1657   rm -f conftest*
1658   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1659 fi
1660 fi
1661
1662 EXEEXT=""
1663 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1664 echo "$ac_t""${ac_cv_exeext}" 1>&6
1665 ac_exeext=$EXEEXT
1666
1667 fi
1668
1669 # configure.host sets the following important variables
1670 #       libgcj_cflags    - host specific C compiler flags
1671 #       libgcj_cxxflags  - host specific C++ compiler flags
1672 #       libgcj_javaflags - host specific Java compiler flags
1673
1674 libgcj_cflags=
1675 libgcj_cxxflags=
1676 libgcj_javaflags=
1677
1678 . ${srcdir}/configure.host
1679
1680 LIBGCJ_CFLAGS="${libgcj_cflags}"
1681 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1682 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692 # Only use libltdl for native builds.
1693 if test -z "${with_cross_host}"; then
1694      case $enable_ltdl_convenience in
1695   no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1696   "") enable_ltdl_convenience=yes
1697       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1698   esac
1699   LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1700   INCLTDL='-I${top_srcdir}/''libltdl'
1701
1702    
1703    DIRLTDL=libltdl
1704    cat >> confdefs.h <<\EOF
1705 #define USE_LTDL 1
1706 EOF
1707
1708    # Sigh.  Libtool's macro doesn't do the right thing.
1709    INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1710    # FIXME: this is a hack.
1711    sub_auxdir="`cd $ac_aux_dir && pwd`"
1712    ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1713 fi
1714
1715
1716
1717 # Check whether --enable-shared or --disable-shared was given.
1718 if test "${enable_shared+set}" = set; then
1719   enableval="$enable_shared"
1720   p=${PACKAGE-default}
1721 case $enableval in
1722 yes) enable_shared=yes ;;
1723 no) enable_shared=no ;;
1724 *)
1725   enable_shared=no
1726   # Look at the argument we got.  We use all the common list separators.
1727   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1728   for pkg in $enableval; do
1729     if test "X$pkg" = "X$p"; then
1730       enable_shared=yes
1731     fi
1732   done
1733   IFS="$ac_save_ifs"
1734   ;;
1735 esac
1736 else
1737   enable_shared=yes
1738 fi
1739
1740 # Check whether --enable-static or --disable-static was given.
1741 if test "${enable_static+set}" = set; then
1742   enableval="$enable_static"
1743   p=${PACKAGE-default}
1744 case $enableval in
1745 yes) enable_static=yes ;;
1746 no) enable_static=no ;;
1747 *)
1748   enable_static=no
1749   # Look at the argument we got.  We use all the common list separators.
1750   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1751   for pkg in $enableval; do
1752     if test "X$pkg" = "X$p"; then
1753       enable_static=yes
1754     fi
1755   done
1756   IFS="$ac_save_ifs"
1757   ;;
1758 esac
1759 else
1760   enable_static=yes
1761 fi
1762
1763 # Check whether --enable-fast-install or --disable-fast-install was given.
1764 if test "${enable_fast_install+set}" = set; then
1765   enableval="$enable_fast_install"
1766   p=${PACKAGE-default}
1767 case $enableval in
1768 yes) enable_fast_install=yes ;;
1769 no) enable_fast_install=no ;;
1770 *)
1771   enable_fast_install=no
1772   # Look at the argument we got.  We use all the common list separators.
1773   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1774   for pkg in $enableval; do
1775     if test "X$pkg" = "X$p"; then
1776       enable_fast_install=yes
1777     fi
1778   done
1779   IFS="$ac_save_ifs"
1780   ;;
1781 esac
1782 else
1783   enable_fast_install=yes
1784 fi
1785
1786 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1787 if test "${with_gnu_ld+set}" = set; then
1788   withval="$with_gnu_ld"
1789   test "$withval" = no || with_gnu_ld=yes
1790 else
1791   with_gnu_ld=no
1792 fi
1793
1794 ac_prog=ld
1795 if test "$GCC" = yes; then
1796   # Check if gcc -print-prog-name=ld gives a path.
1797   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1798 echo "configure:1799: checking for ld used by GCC" >&5
1799   case $host in
1800   *-*-mingw*)
1801     # gcc leaves a trailing carriage return which upsets mingw
1802     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1803   *)
1804     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1805   esac
1806   case $ac_prog in
1807     # Accept absolute paths.
1808     [\\/]* | [A-Za-z]:[\\/]*)
1809       re_direlt='/[^/][^/]*/\.\./'
1810       # Canonicalize the path of ld
1811       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1812       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1813         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1814       done
1815       test -z "$LD" && LD="$ac_prog"
1816       ;;
1817   "")
1818     # If it fails, then pretend we aren't using GCC.
1819     ac_prog=ld
1820     ;;
1821   *)
1822     # If it is relative, then search for the first ld in PATH.
1823     with_gnu_ld=unknown
1824     ;;
1825   esac
1826 elif test "$with_gnu_ld" = yes; then
1827   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1828 echo "configure:1829: checking for GNU ld" >&5
1829 else
1830   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1831 echo "configure:1832: checking for non-GNU ld" >&5
1832 fi
1833 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1834   echo $ac_n "(cached) $ac_c" 1>&6
1835 else
1836   if test -z "$LD"; then
1837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1838   for ac_dir in $PATH; do
1839     test -z "$ac_dir" && ac_dir=.
1840     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1841       lt_cv_path_LD="$ac_dir/$ac_prog"
1842       # Check to see if the program is GNU ld.  I'd rather use --version,
1843       # but apparently some GNU ld's only accept -v.
1844       # Break only if it was the GNU/non-GNU ld that we prefer.
1845       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1846         test "$with_gnu_ld" != no && break
1847       else
1848         test "$with_gnu_ld" != yes && break
1849       fi
1850     fi
1851   done
1852   IFS="$ac_save_ifs"
1853 else
1854   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1855 fi
1856 fi
1857
1858 LD="$lt_cv_path_LD"
1859 if test -n "$LD"; then
1860   echo "$ac_t""$LD" 1>&6
1861 else
1862   echo "$ac_t""no" 1>&6
1863 fi
1864 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1865 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1866 echo "configure:1867: checking if the linker ($LD) is GNU ld" >&5
1867 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1868   echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1871 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1872   lt_cv_prog_gnu_ld=yes
1873 else
1874   lt_cv_prog_gnu_ld=no
1875 fi
1876 fi
1877
1878 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1879 with_gnu_ld=$lt_cv_prog_gnu_ld
1880
1881
1882 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1883 echo "configure:1884: checking for $LD option to reload object files" >&5
1884 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1885   echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887   lt_cv_ld_reload_flag='-r'
1888 fi
1889
1890 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1891 reload_flag=$lt_cv_ld_reload_flag
1892 test -n "$reload_flag" && reload_flag=" $reload_flag"
1893
1894 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1895 echo "configure:1896: checking for BSD-compatible nm" >&5
1896 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1897   echo $ac_n "(cached) $ac_c" 1>&6
1898 else
1899   if test -n "$NM"; then
1900   # Let the user override the test.
1901   lt_cv_path_NM="$NM"
1902 else
1903   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1904   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1905     test -z "$ac_dir" && ac_dir=.
1906     tmp_nm=$ac_dir/${ac_tool_prefix}nm
1907     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1908       # Check to see if the nm accepts a BSD-compat flag.
1909       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1910       #   nm: unknown option "B" ignored
1911       # Tru64's nm complains that /dev/null is an invalid object file
1912       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1913         lt_cv_path_NM="$tmp_nm -B"
1914         break
1915       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1916         lt_cv_path_NM="$tmp_nm -p"
1917         break
1918       else
1919         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1920         continue # so that we can try to find one that supports BSD flags
1921       fi
1922     fi
1923   done
1924   IFS="$ac_save_ifs"
1925   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1926 fi
1927 fi
1928
1929 NM="$lt_cv_path_NM"
1930 echo "$ac_t""$NM" 1>&6
1931
1932 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1933 echo "configure:1934: checking how to recognise dependant libraries" >&5
1934 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1935   echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937   lt_cv_file_magic_cmd='$MAGIC_CMD'
1938 lt_cv_file_magic_test_file=
1939 lt_cv_deplibs_check_method='unknown'
1940 # Need to set the preceding variable on all platforms that support
1941 # interlibrary dependencies.
1942 # 'none' -- dependencies not supported.
1943 # `unknown' -- same as none, but documents that we really don't know.
1944 # 'pass_all' -- all dependencies passed with no checks.
1945 # 'test_compile' -- check by making test program.
1946 # 'file_magic [regex]' -- check by looking for files in library path
1947 # which responds to the $file_magic_cmd with a given egrep regex.
1948 # If you have `file' or equivalent on your system and you're not sure
1949 # whether `pass_all' will *always* work, you probably want this one.
1950
1951 case $host_os in
1952 aix*)
1953   lt_cv_deplibs_check_method=pass_all
1954   ;;
1955
1956 beos*)
1957   lt_cv_deplibs_check_method=pass_all
1958   ;;
1959
1960 bsdi4*)
1961   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1962   lt_cv_file_magic_cmd='/usr/bin/file -L'
1963   lt_cv_file_magic_test_file=/shlib/libc.so
1964   ;;
1965
1966 cygwin* | mingw* |pw32*)
1967   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1968   lt_cv_file_magic_cmd='$OBJDUMP -f'
1969   ;;
1970
1971 darwin* | rhapsody*)
1972   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1973   lt_cv_file_magic_cmd='/usr/bin/file -L'
1974   case "$host_os" in
1975   rhapsody* | darwin1.012)
1976     lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1977     ;;
1978   *) # Darwin 1.3 on
1979     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1980     ;;
1981   esac
1982   ;;
1983
1984 freebsd* )
1985   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1986     case $host_cpu in
1987     i*86 )
1988       # Not sure whether the presence of OpenBSD here was a mistake.
1989       # Let's accept both of them until this is cleared up.
1990       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1991       lt_cv_file_magic_cmd=/usr/bin/file
1992       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1993       ;;
1994     esac
1995   else
1996     lt_cv_deplibs_check_method=pass_all
1997   fi
1998   ;;
1999
2000 gnu*)
2001   lt_cv_deplibs_check_method=pass_all
2002   ;;
2003
2004 hpux10.20*|hpux11*)
2005   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2006   lt_cv_file_magic_cmd=/usr/bin/file
2007   lt_cv_file_magic_test_file=/usr/lib/libc.sl
2008   ;;
2009
2010 irix5* | irix6*)
2011   case $host_os in
2012   irix5*)
2013     # this will be overridden with pass_all, but let us keep it just in case
2014     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2015     ;;
2016   *)
2017     case $LD in
2018     *-32|*"-32 ") libmagic=32-bit;;
2019     *-n32|*"-n32 ") libmagic=N32;;
2020     *-64|*"-64 ") libmagic=64-bit;;
2021     *) libmagic=never-match;;
2022     esac
2023     # this will be overridden with pass_all, but let us keep it just in case
2024     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2025     ;;
2026   esac
2027   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2028   lt_cv_deplibs_check_method=pass_all
2029   ;;
2030
2031 # This must be Linux ELF.
2032 linux-gnu*)
2033   case $host_cpu in
2034   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2035     lt_cv_deplibs_check_method=pass_all ;;
2036   *)
2037     # glibc up to 2.1.1 does not perform some relocations on ARM
2038     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2039   esac
2040   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2041   ;;
2042
2043 netbsd*)
2044   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2045     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2046   else
2047     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2048   fi
2049   ;;
2050
2051 newsos6)
2052   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2053   lt_cv_file_magic_cmd=/usr/bin/file
2054   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2055   ;;
2056
2057 osf3* | osf4* | osf5*)
2058   # this will be overridden with pass_all, but let us keep it just in case
2059   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2060   lt_cv_file_magic_test_file=/shlib/libc.so
2061   lt_cv_deplibs_check_method=pass_all
2062   ;;
2063
2064 sco3.2v5*)
2065   lt_cv_deplibs_check_method=pass_all
2066   ;;
2067
2068 solaris*)
2069   lt_cv_deplibs_check_method=pass_all
2070   lt_cv_file_magic_test_file=/lib/libc.so
2071   ;;
2072
2073 sysv5uw[78]* | sysv4*uw2*)
2074   lt_cv_deplibs_check_method=pass_all
2075   ;;
2076
2077 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2078   case $host_vendor in
2079   ncr)
2080     lt_cv_deplibs_check_method=pass_all
2081     ;;
2082   motorola)
2083     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2084     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2085     ;;
2086   esac
2087   ;;
2088 esac
2089
2090 fi
2091
2092 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2093 file_magic_cmd=$lt_cv_file_magic_cmd
2094 deplibs_check_method=$lt_cv_deplibs_check_method
2095
2096 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2097 echo "configure:2098: checking for object suffix" >&5
2098 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2099   echo $ac_n "(cached) $ac_c" 1>&6
2100 else
2101   rm -f conftest*
2102 echo 'int i = 1;' > conftest.$ac_ext
2103 if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2104   for ac_file in conftest.*; do
2105     case $ac_file in
2106     *.c) ;;
2107     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2108     esac
2109   done
2110 else
2111   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2112 fi
2113 rm -f conftest*
2114 fi
2115
2116 echo "$ac_t""$ac_cv_objext" 1>&6
2117 OBJEXT=$ac_cv_objext
2118 ac_objext=$ac_cv_objext
2119
2120 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2121
2122 # Only perform the check for file, if the check method requires it
2123 case $deplibs_check_method in
2124 file_magic*)
2125   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2126     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2127 echo "configure:2128: checking for ${ac_tool_prefix}file" >&5
2128 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2129   echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131   case $MAGIC_CMD in
2132   /*)
2133   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2134   ;;
2135   ?:/*)
2136   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2137   ;;
2138   *)
2139   ac_save_MAGIC_CMD="$MAGIC_CMD"
2140   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2141   ac_dummy="/usr/bin:$PATH"
2142   for ac_dir in $ac_dummy; do
2143     test -z "$ac_dir" && ac_dir=.
2144     if test -f $ac_dir/${ac_tool_prefix}file; then
2145       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2146       if test -n "$file_magic_test_file"; then
2147         case $deplibs_check_method in
2148         "file_magic "*)
2149           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2150           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2151           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2152             egrep "$file_magic_regex" > /dev/null; then
2153             :
2154           else
2155             cat <<EOF 1>&2
2156
2157 *** Warning: the command libtool uses to detect shared libraries,
2158 *** $file_magic_cmd, produces output that libtool cannot recognize.
2159 *** The result is that libtool may fail to recognize shared libraries
2160 *** as such.  This will affect the creation of libtool libraries that
2161 *** depend on shared libraries, but programs linked with such libtool
2162 *** libraries will work regardless of this problem.  Nevertheless, you
2163 *** may want to report the problem to your system manager and/or to
2164 *** bug-libtool@gnu.org
2165
2166 EOF
2167           fi ;;
2168         esac
2169       fi
2170       break
2171     fi
2172   done
2173   IFS="$ac_save_ifs"
2174   MAGIC_CMD="$ac_save_MAGIC_CMD"
2175   ;;
2176 esac
2177 fi
2178
2179 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2180 if test -n "$MAGIC_CMD"; then
2181   echo "$ac_t""$MAGIC_CMD" 1>&6
2182 else
2183   echo "$ac_t""no" 1>&6
2184 fi
2185
2186 if test -z "$lt_cv_path_MAGIC_CMD"; then
2187   if test -n "$ac_tool_prefix"; then
2188     echo $ac_n "checking for file""... $ac_c" 1>&6
2189 echo "configure:2190: checking for file" >&5
2190 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2191   echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193   case $MAGIC_CMD in
2194   /*)
2195   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2196   ;;
2197   ?:/*)
2198   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2199   ;;
2200   *)
2201   ac_save_MAGIC_CMD="$MAGIC_CMD"
2202   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2203   ac_dummy="/usr/bin:$PATH"
2204   for ac_dir in $ac_dummy; do
2205     test -z "$ac_dir" && ac_dir=.
2206     if test -f $ac_dir/file; then
2207       lt_cv_path_MAGIC_CMD="$ac_dir/file"
2208       if test -n "$file_magic_test_file"; then
2209         case $deplibs_check_method in
2210         "file_magic "*)
2211           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2212           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2213           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2214             egrep "$file_magic_regex" > /dev/null; then
2215             :
2216           else
2217             cat <<EOF 1>&2
2218
2219 *** Warning: the command libtool uses to detect shared libraries,
2220 *** $file_magic_cmd, produces output that libtool cannot recognize.
2221 *** The result is that libtool may fail to recognize shared libraries
2222 *** as such.  This will affect the creation of libtool libraries that
2223 *** depend on shared libraries, but programs linked with such libtool
2224 *** libraries will work regardless of this problem.  Nevertheless, you
2225 *** may want to report the problem to your system manager and/or to
2226 *** bug-libtool@gnu.org
2227
2228 EOF
2229           fi ;;
2230         esac
2231       fi
2232       break
2233     fi
2234   done
2235   IFS="$ac_save_ifs"
2236   MAGIC_CMD="$ac_save_MAGIC_CMD"
2237   ;;
2238 esac
2239 fi
2240
2241 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2242 if test -n "$MAGIC_CMD"; then
2243   echo "$ac_t""$MAGIC_CMD" 1>&6
2244 else
2245   echo "$ac_t""no" 1>&6
2246 fi
2247
2248   else
2249     MAGIC_CMD=:
2250   fi
2251 fi
2252
2253   fi
2254   ;;
2255 esac
2256
2257 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2258 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2260 echo "configure:2261: checking for $ac_word" >&5
2261 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2262   echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264   if test -n "$RANLIB"; then
2265   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2266 else
2267   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2268   ac_dummy="$PATH"
2269   for ac_dir in $ac_dummy; do
2270     test -z "$ac_dir" && ac_dir=.
2271     if test -f $ac_dir/$ac_word; then
2272       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2273       break
2274     fi
2275   done
2276   IFS="$ac_save_ifs"
2277 fi
2278 fi
2279 RANLIB="$ac_cv_prog_RANLIB"
2280 if test -n "$RANLIB"; then
2281   echo "$ac_t""$RANLIB" 1>&6
2282 else
2283   echo "$ac_t""no" 1>&6
2284 fi
2285
2286
2287 if test -z "$ac_cv_prog_RANLIB"; then
2288 if test -n "$ac_tool_prefix"; then
2289   # Extract the first word of "ranlib", so it can be a program name with args.
2290 set dummy ranlib; ac_word=$2
2291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2292 echo "configure:2293: checking for $ac_word" >&5
2293 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2294   echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296   if test -n "$RANLIB"; then
2297   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2298 else
2299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2300   ac_dummy="$PATH"
2301   for ac_dir in $ac_dummy; do
2302     test -z "$ac_dir" && ac_dir=.
2303     if test -f $ac_dir/$ac_word; then
2304       ac_cv_prog_RANLIB="ranlib"
2305       break
2306     fi
2307   done
2308   IFS="$ac_save_ifs"
2309   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2310 fi
2311 fi
2312 RANLIB="$ac_cv_prog_RANLIB"
2313 if test -n "$RANLIB"; then
2314   echo "$ac_t""$RANLIB" 1>&6
2315 else
2316   echo "$ac_t""no" 1>&6
2317 fi
2318
2319 else
2320   RANLIB=":"
2321 fi
2322 fi
2323
2324 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2325 set dummy ${ac_tool_prefix}strip; ac_word=$2
2326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2327 echo "configure:2328: checking for $ac_word" >&5
2328 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2329   echo $ac_n "(cached) $ac_c" 1>&6
2330 else
2331   if test -n "$STRIP"; then
2332   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2333 else
2334   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2335   ac_dummy="$PATH"
2336   for ac_dir in $ac_dummy; do
2337     test -z "$ac_dir" && ac_dir=.
2338     if test -f $ac_dir/$ac_word; then
2339       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2340       break
2341     fi
2342   done
2343   IFS="$ac_save_ifs"
2344 fi
2345 fi
2346 STRIP="$ac_cv_prog_STRIP"
2347 if test -n "$STRIP"; then
2348   echo "$ac_t""$STRIP" 1>&6
2349 else
2350   echo "$ac_t""no" 1>&6
2351 fi
2352
2353
2354 if test -z "$ac_cv_prog_STRIP"; then
2355 if test -n "$ac_tool_prefix"; then
2356   # Extract the first word of "strip", so it can be a program name with args.
2357 set dummy strip; ac_word=$2
2358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359 echo "configure:2360: checking for $ac_word" >&5
2360 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2361   echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363   if test -n "$STRIP"; then
2364   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2365 else
2366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2367   ac_dummy="$PATH"
2368   for ac_dir in $ac_dummy; do
2369     test -z "$ac_dir" && ac_dir=.
2370     if test -f $ac_dir/$ac_word; then
2371       ac_cv_prog_STRIP="strip"
2372       break
2373     fi
2374   done
2375   IFS="$ac_save_ifs"
2376   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2377 fi
2378 fi
2379 STRIP="$ac_cv_prog_STRIP"
2380 if test -n "$STRIP"; then
2381   echo "$ac_t""$STRIP" 1>&6
2382 else
2383   echo "$ac_t""no" 1>&6
2384 fi
2385
2386 else
2387   STRIP=":"
2388 fi
2389 fi
2390
2391
2392 # Check for any special flags to pass to ltconfig.
2393 libtool_flags="--cache-file=$cache_file"
2394 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2395 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2396 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2397 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2398 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2399 libtool_flags="$libtool_flags --enable-dlopen"
2400
2401 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2402 if test "${enable_libtool_lock+set}" = set; then
2403   enableval="$enable_libtool_lock"
2404   :
2405 fi
2406
2407 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2408 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2409
2410 # Check whether --with-pic or --without-pic was given.
2411 if test "${with_pic+set}" = set; then
2412   withval="$with_pic"
2413   pic_mode="$withval"
2414 else
2415   pic_mode=default
2416 fi
2417
2418 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2419 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2420
2421 # Some flags need to be propagated to the compiler or linker for good
2422 # libtool support.
2423 case $host in
2424 *-*-irix6*)
2425   # Find out which ABI we are using.
2426   echo '#line 2427 "configure"' > conftest.$ac_ext
2427   if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428     case `/usr/bin/file conftest.$ac_objext` in
2429     *32-bit*)
2430       LD="${LD-ld} -32"
2431       ;;
2432     *N32*)
2433       LD="${LD-ld} -n32"
2434       ;;
2435     *64-bit*)
2436       LD="${LD-ld} -64"
2437       ;;
2438     esac
2439   fi
2440   rm -rf conftest*
2441   ;;
2442
2443 *-*-sco3.2v5*)
2444   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2445   SAVE_CFLAGS="$CFLAGS"
2446   CFLAGS="$CFLAGS -belf"
2447   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2448 echo "configure:2449: checking whether the C compiler needs -belf" >&5
2449 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2450   echo $ac_n "(cached) $ac_c" 1>&6
2451 else
2452   
2453      ac_ext=c
2454 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2455 ac_cpp='$CPP $CPPFLAGS'
2456 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2457 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2458 cross_compiling=$ac_cv_prog_cc_cross
2459
2460      cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463
2464 int main() {
2465
2466 ; return 0; }
2467 EOF
2468 if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469   rm -rf conftest*
2470   lt_cv_cc_needs_belf=yes
2471 else
2472   echo "configure: failed program was:" >&5
2473   cat conftest.$ac_ext >&5
2474   rm -rf conftest*
2475   lt_cv_cc_needs_belf=no
2476 fi
2477 rm -f conftest*
2478      ac_ext=c
2479 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2480 ac_cpp='$CPP $CPPFLAGS'
2481 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2482 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2483 cross_compiling=$ac_cv_prog_cc_cross
2484
2485 fi
2486
2487 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2488   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2489     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2490     CFLAGS="$SAVE_CFLAGS"
2491   fi
2492   ;;
2493
2494
2495 esac
2496
2497 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2498 echo "configure:2499: checking how to run the C++ preprocessor" >&5
2499 if test -z "$CXXCPP"; then
2500 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2501   echo $ac_n "(cached) $ac_c" 1>&6
2502 else
2503   ac_ext=C
2504 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2505 ac_cpp='$CXXCPP $CPPFLAGS'
2506 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2507 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2508 cross_compiling=$ac_cv_prog_cxx_cross
2509   CXXCPP="${CXX-g++} -E"
2510   cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 #include <stdlib.h>
2514 EOF
2515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2516 { (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518 if test -z "$ac_err"; then
2519   :
2520 else
2521   echo "$ac_err" >&5
2522   echo "configure: failed program was:" >&5
2523   cat conftest.$ac_ext >&5
2524   rm -rf conftest*
2525   CXXCPP=/lib/cpp
2526 fi
2527 rm -f conftest*
2528   ac_cv_prog_CXXCPP="$CXXCPP"
2529 ac_ext=c
2530 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2531 ac_cpp='$CPP $CPPFLAGS'
2532 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2533 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2534 cross_compiling=$ac_cv_prog_cc_cross
2535 fi
2536 fi
2537 CXXCPP="$ac_cv_prog_CXXCPP"
2538 echo "$ac_t""$CXXCPP" 1>&6
2539
2540
2541 # Save cache, so that ltconfig can load it
2542 cat > confcache <<\EOF
2543 # This file is a shell script that caches the results of configure
2544 # tests run on this system so they can be shared between configure
2545 # scripts and configure runs.  It is not useful on other systems.
2546 # If it contains results you don't want to keep, you may remove or edit it.
2547 #
2548 # By default, configure uses ./config.cache as the cache file,
2549 # creating it if it does not exist already.  You can give configure
2550 # the --cache-file=FILE option to use a different cache file; that is
2551 # what configure does when it calls configure scripts in
2552 # subdirectories, so they share the cache.
2553 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2554 # config.status only pays attention to the cache file if you give it the
2555 # --recheck option to rerun configure.
2556 #
2557 EOF
2558 # The following way of writing the cache mishandles newlines in values,
2559 # but we know of no workaround that is simple, portable, and efficient.
2560 # So, don't put newlines in cache variables' values.
2561 # Ultrix sh set writes to stderr and can't be redirected directly,
2562 # and sets the high bit in the cache file unless we assign to the vars.
2563 (set) 2>&1 |
2564   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2565   *ac_space=\ *)
2566     # `set' does not quote correctly, so add quotes (double-quote substitution
2567     # turns \\\\ into \\, and sed turns \\ into \).
2568     sed -n \
2569       -e "s/'/'\\\\''/g" \
2570       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2571     ;;
2572   *)
2573     # `set' quotes correctly as required by POSIX, so do not add quotes.
2574     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2575     ;;
2576   esac >> confcache
2577 if cmp -s $cache_file confcache; then
2578   :
2579 else
2580   if test -w $cache_file; then
2581     echo "updating cache $cache_file"
2582     cat confcache > $cache_file
2583   else
2584     echo "not updating unwritable cache $cache_file"
2585   fi
2586 fi
2587 rm -f confcache
2588
2589
2590 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2591 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2592 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2593 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2594 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2595 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2596 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2597 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2598 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2599 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2600
2601 # Reload cache, that may have been modified by ltconfig
2602 if test -r "$cache_file"; then
2603   echo "loading cache $cache_file"
2604   . $cache_file
2605 else
2606   echo "creating cache $cache_file"
2607   > $cache_file
2608 fi
2609
2610
2611 # This can be used to rebuild libtool when needed
2612 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2613
2614 # Always use our own libtool.
2615 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2616
2617 # Redirect the config.log output again, so that the ltconfig log is not
2618 # clobbered by the next message.
2619 exec 5>>./config.log
2620
2621
2622
2623 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2624 lt_save_CC="$CC"
2625 lt_save_CFLAGS="$CFLAGS"
2626 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2627 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2628 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2629 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2630 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2631 deplibs_check_method="$deplibs_check_method" \
2632 file_magic_cmd="$file_magic_cmd" \
2633 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2634 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2635 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2636 CC="$lt_save_CC"
2637 CFLAGS="$lt_save_CFLAGS"
2638
2639 # Redirect the config.log output again, so that the ltconfig log is not
2640 # clobbered by the next message.
2641 exec 5>>./config.log
2642
2643   
2644
2645   
2646          
2647          
2648 subdirs="$DIRLTDL"
2649
2650
2651 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2652    COMPPATH=.
2653 else
2654    COMPPATH=..
2655 fi
2656
2657
2658
2659
2660 if test -d $srcdir/testsuite; then
2661   TESTSUBDIR_TRUE=
2662   TESTSUBDIR_FALSE='#'
2663 else
2664   TESTSUBDIR_TRUE='#'
2665   TESTSUBDIR_FALSE=
2666 fi
2667
2668 # Check whether --enable-fast-character or --disable-fast-character was given.
2669 if test "${enable_fast_character+set}" = set; then
2670   enableval="$enable_fast_character"
2671   # Nothing
2672
2673 else
2674   cat >> confdefs.h <<\EOF
2675 #define COMPACT_CHARACTER 1
2676 EOF
2677
2678 fi
2679
2680
2681 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2682 if test "${enable_getenv_properties+set}" = set; then
2683   enableval="$enable_getenv_properties"
2684   :
2685 fi
2686
2687
2688 if test -z "$enable_getenv_properties"; then
2689    enable_getenv_properties=${enable_getenv_properties_default-yes}
2690 fi
2691 if test "$enable_getenv_properties" = no; then
2692    cat >> confdefs.h <<\EOF
2693 #define DISABLE_GETENV_PROPERTIES 1
2694 EOF
2695
2696 fi
2697
2698
2699 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2700 if test "${enable_hash_synchronization+set}" = set; then
2701   enableval="$enable_hash_synchronization"
2702   :
2703 fi
2704
2705
2706 if test -z "$enable_hash_synchronization"; then
2707    enable_hash_synchronization=$enable_hash_synchronization_default
2708 fi
2709
2710
2711 LIBGCJDEBUG="false"
2712
2713 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2714 if test "${enable_libgcj_debug+set}" = set; then
2715   enableval="$enable_libgcj_debug"
2716   if test "$enable_libgcj_debug" = yes; then
2717     cat >> confdefs.h <<\EOF
2718 #define DEBUG 1
2719 EOF
2720
2721     LIBGCJDEBUG="true"
2722   fi
2723 fi
2724
2725
2726 # Check whether --enable-interpreter or --disable-interpreter was given.
2727 if test "${enable_interpreter+set}" = set; then
2728   enableval="$enable_interpreter"
2729   if test "$enable_interpreter" = yes; then
2730     # This can also be set in configure.host.
2731     libgcj_interpreter=yes
2732   elif test "$enable_interpreter" = no; then
2733     libgcj_interpreter=no
2734   fi
2735 fi
2736
2737
2738 if test "$libgcj_interpreter" = yes; then
2739    cat >> confdefs.h <<\EOF
2740 #define INTERPRETER 1
2741 EOF
2742
2743 fi
2744
2745 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2746 echo "configure:2747: checking for exception model to use" >&5
2747
2748 ac_ext=C
2749 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2750 ac_cpp='$CXXCPP $CPPFLAGS'
2751 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2752 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2753 cross_compiling=$ac_cv_prog_cxx_cross
2754
2755 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2756 if test "${enable_sjlj_exceptions+set}" = set; then
2757   enableval="$enable_sjlj_exceptions"
2758   :
2759 else
2760   cat > conftest.$ac_ext << EOF
2761 #line 2762 "configure"
2762 struct S { ~S(); };
2763 void bar();
2764 void foo()
2765 {
2766   S s;
2767   bar();
2768 }
2769 EOF
2770 old_CXXFLAGS="$CXXFLAGS"  
2771 CXXFLAGS=-S
2772 if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2773   if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2774     enable_sjlj_exceptions=yes
2775   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2776     enable_sjlj_exceptions=no
2777   fi
2778 fi
2779 CXXFLAGS="$old_CXXFLAGS"
2780 rm -f conftest*
2781 fi
2782
2783 if test x$enable_sjlj_exceptions = xyes; then
2784   cat >> confdefs.h <<\EOF
2785 #define SJLJ_EXCEPTIONS 1
2786 EOF
2787
2788   ac_exception_model_name=sjlj
2789 elif test x$enable_sjlj_exceptions = xno; then
2790   ac_exception_model_name="call frame"
2791 else
2792   { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2793 fi
2794 ac_ext=c
2795 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2796 ac_cpp='$CPP $CPPFLAGS'
2797 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2798 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2799 cross_compiling=$ac_cv_prog_cc_cross
2800
2801 echo "$ac_t""$ac_exception_model_name" 1>&6
2802
2803 # Check whether --enable-java-net or --disable-java-net was given.
2804 if test "${enable_java_net+set}" = set; then
2805   enableval="$enable_java_net"
2806   :
2807 fi
2808
2809
2810 if test -z "$enable_java_net"; then
2811    enable_java_net=${enable_java_net_default-yes}
2812 fi
2813 if test "$enable_java_net" = no; then
2814    cat >> confdefs.h <<\EOF
2815 #define DISABLE_JAVA_NET 1
2816 EOF
2817
2818 fi
2819
2820 # Check whether --with-libffi or --without-libffi was given.
2821 if test "${with_libffi+set}" = set; then
2822   withval="$with_libffi"
2823   :
2824 else
2825   with_libffi=${with_libffi_default-yes}
2826 fi
2827
2828
2829 LIBFFI=
2830 LIBFFIINCS=
2831 if test "$with_libffi" != no; then
2832    cat >> confdefs.h <<\EOF
2833 #define USE_LIBFFI 1
2834 EOF
2835
2836    LIBFFI=../libffi/libfficonvenience.la
2837    LIBFFIINCS="-I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include"
2838 fi
2839
2840
2841
2842 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2843 if test "${enable_jvmpi+set}" = set; then
2844   enableval="$enable_jvmpi"
2845   :
2846 fi
2847
2848
2849 if test "$enable_jvmpi" != no; then
2850     cat >> confdefs.h <<\EOF
2851 #define ENABLE_JVMPI 1
2852 EOF
2853
2854 fi
2855
2856 TARGET_ECOS="no"
2857 # Check whether --with-ecos or --without-ecos was given.
2858 if test "${with_ecos+set}" = set; then
2859   withval="$with_ecos"
2860   TARGET_ECOS="$with_ecos"
2861
2862 fi
2863
2864
2865 case "$TARGET_ECOS" in
2866    no)
2867       FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2868       PROCESS=${PROCESS-Posix}
2869       ;;
2870    *)
2871       FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2872       PROCESS=Ecos
2873       cat >> confdefs.h <<\EOF
2874 #define ECOS 1
2875 EOF
2876
2877       ;;
2878 esac
2879
2880 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2881 echo "configure:2882: checking how to run the C preprocessor" >&5
2882 # On Suns, sometimes $CPP names a directory.
2883 if test -n "$CPP" && test -d "$CPP"; then
2884   CPP=
2885 fi
2886 if test -z "$CPP"; then
2887 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2888   echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890     # This must be in double quotes, not single quotes, because CPP may get
2891   # substituted into the Makefile and "${CC-cc}" will confuse make.
2892   CPP="${CC-cc} -E"
2893   # On the NeXT, cc -E runs the code through the compiler's parser,
2894   # not just through cpp.
2895   cat > conftest.$ac_ext <<EOF
2896 #line 2897 "configure"
2897 #include "confdefs.h"
2898 #include <assert.h>
2899 Syntax Error
2900 EOF
2901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2902 { (eval echo configure:2903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2904 if test -z "$ac_err"; then
2905   :
2906 else
2907   echo "$ac_err" >&5
2908   echo "configure: failed program was:" >&5
2909   cat conftest.$ac_ext >&5
2910   rm -rf conftest*
2911   CPP="${CC-cc} -E -traditional-cpp"
2912   cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915 #include <assert.h>
2916 Syntax Error
2917 EOF
2918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2919 { (eval echo configure:2920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2921 if test -z "$ac_err"; then
2922   :
2923 else
2924   echo "$ac_err" >&5
2925   echo "configure: failed program was:" >&5
2926   cat conftest.$ac_ext >&5
2927   rm -rf conftest*
2928   CPP="${CC-cc} -nologo -E"
2929   cat > conftest.$ac_ext <<EOF
2930 #line 2931 "configure"
2931 #include "confdefs.h"
2932 #include <assert.h>
2933 Syntax Error
2934 EOF
2935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2936 { (eval echo configure:2937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2938 if test -z "$ac_err"; then
2939   :
2940 else
2941   echo "$ac_err" >&5
2942   echo "configure: failed program was:" >&5
2943   cat conftest.$ac_ext >&5
2944   rm -rf conftest*
2945   CPP=/lib/cpp
2946 fi
2947 rm -f conftest*
2948 fi
2949 rm -f conftest*
2950 fi
2951 rm -f conftest*
2952   ac_cv_prog_CPP="$CPP"
2953 fi
2954   CPP="$ac_cv_prog_CPP"
2955 else
2956   ac_cv_prog_CPP="$CPP"
2957 fi
2958 echo "$ac_t""$CPP" 1>&6
2959
2960 cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 #include <stdint.h>
2964 EOF
2965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2966   egrep "uint32_t" >/dev/null 2>&1; then
2967   rm -rf conftest*
2968   cat >> confdefs.h <<\EOF
2969 #define HAVE_INT32_DEFINED 1
2970 EOF
2971
2972 fi
2973 rm -f conftest*
2974
2975 cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978 #include <inttypes.h>
2979 EOF
2980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2981   egrep "uint32_t" >/dev/null 2>&1; then
2982   rm -rf conftest*
2983   cat >> confdefs.h <<\EOF
2984 #define HAVE_INT32_DEFINED 1
2985 EOF
2986
2987 fi
2988 rm -f conftest*
2989
2990 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2994 EOF
2995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2996   egrep "u_int32_t" >/dev/null 2>&1; then
2997   rm -rf conftest*
2998   cat >> confdefs.h <<\EOF
2999 #define HAVE_BSD_INT32_DEFINED 1
3000 EOF
3001
3002 fi
3003 rm -f conftest*
3004
3005 cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008 #include <sys/config.h>
3009 EOF
3010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3011   egrep "u_int32_t" >/dev/null 2>&1; then
3012   rm -rf conftest*
3013   cat >> confdefs.h <<\EOF
3014 #define HAVE_BSD_INT32_DEFINED 1
3015 EOF
3016
3017 fi
3018 rm -f conftest*
3019
3020
3021
3022 cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025 #include <time.h>
3026 EOF
3027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3028   egrep "mktime" >/dev/null 2>&1; then
3029   rm -rf conftest*
3030   cat >> confdefs.h <<\EOF
3031 #define HAVE_MKTIME 1
3032 EOF
3033
3034 fi
3035 rm -f conftest*
3036
3037 cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040 #include <time.h>
3041 EOF
3042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3043   egrep "localtime" >/dev/null 2>&1; then
3044   rm -rf conftest*
3045   cat >> confdefs.h <<\EOF
3046 #define HAVE_LOCALTIME 1
3047 EOF
3048
3049 fi
3050 rm -f conftest*
3051
3052
3053 test -d java || mkdir java
3054 test -d java/io || mkdir java/io
3055 test -d gnu || mkdir gnu
3056
3057
3058 test -d java/lang || mkdir java/lang
3059
3060
3061
3062 SYSTEMSPEC=
3063
3064
3065 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
3066
3067
3068 # Check whether --with-system-zlib or --without-system-zlib was given.
3069 if test "${with_system_zlib+set}" = set; then
3070   withval="$with_system_zlib"
3071   :
3072 fi
3073
3074 ZLIBSPEC=
3075
3076 ZLIBTESTSPEC=
3077
3078
3079 libsubdir=.libs
3080
3081 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
3082 echo "configure:3083: checking for garbage collector to use" >&5
3083 # Check whether --enable-java-gc or --disable-java-gc was given.
3084 if test "${enable_java_gc+set}" = set; then
3085   enableval="$enable_java_gc"
3086   
3087   GC=$enableval
3088 else
3089   GC=boehm
3090 fi
3091
3092 GCLIBS=
3093 GCINCS=
3094 GCDEPS=
3095 GCOBJS=
3096 GCSPEC=
3097 JC1GCSPEC=
3098 GCTESTSPEC=
3099 case "$GC" in
3100  boehm)
3101     echo "$ac_t""boehm" 1>&6
3102     GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
3103     # We include the path to the boehm-gc build directory.
3104     # See Makefile.am to understand why.
3105     GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
3106     GCINCS='-I$(top_srcdir)/../boehm-gc/include'
3107     GCSPEC='-lgcjgc'
3108     JC1GCSPEC='-fuse-boehm-gc'
3109     GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3110             GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3111     GCOBJS=boehm.lo
3112     GCHDR=boehm-gc.h
3113         cat >> confdefs.h <<\EOF
3114 #define HAVE_BOEHM_GC 1
3115 EOF
3116
3117     ;;
3118  no)
3119     echo "$ac_t""none" 1>&6
3120     GCOBJS=nogc.lo
3121     GCHDR=no-gc.h
3122     ;;
3123  *)
3124     { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3125     ;;
3126 esac
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
3138 echo "configure:3139: checking for thread model used by GCC" >&5
3139 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
3140 echo "$ac_t""$THREADS" 1>&6
3141
3142 case "$THREADS" in
3143  no | none | single)
3144     THREADS=none
3145     ;;
3146  posix | pthreads)
3147     THREADS=posix
3148     case "$host" in
3149      *-*-linux*)
3150         cat >> confdefs.h <<\EOF
3151 #define LINUX_THREADS 1
3152 EOF
3153
3154         ;;
3155     esac
3156     ;;
3157  decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
3158     { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3159     ;;
3160  *)
3161     { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3162     ;;
3163 esac
3164
3165 THREADLIBS=
3166 THREADINCS=
3167 THREADDEPS=
3168 THREADOBJS=
3169 THREADH=
3170 THREADSPEC=
3171 case "$THREADS" in
3172  posix)
3173     THREADLIBS=-lpthread
3174     THREADSPEC=-lpthread
3175     THREADOBJS=posix-threads.lo
3176     THREADH=posix-threads.h
3177     # MIT pthreads doesn't seem to have the mutexattr functions.
3178     # But for now we don't check for it.  We just assume you aren't
3179     # using MIT pthreads.
3180     cat >> confdefs.h <<\EOF
3181 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3182 EOF
3183
3184
3185     # If we're using the Boehm GC, then we happen to know that it
3186     # defines _REENTRANT, so we don't bother.  Eww.
3187     if test "$GC" != boehm; then
3188        cat >> confdefs.h <<\EOF
3189 #define _REENTRANT 1
3190 EOF
3191
3192     fi
3193     cat >> confdefs.h <<\EOF
3194 #define _POSIX_PTHREAD_SEMANTICS 1
3195 EOF
3196
3197     ;;
3198
3199  none)
3200     THREADOBJS=no-threads.lo
3201     THREADH=no-threads.h
3202     ;;
3203 esac
3204
3205
3206
3207
3208
3209
3210
3211 HASH_SYNC_SPEC=
3212 # Hash synchronization is only useful with posix threads right now.
3213 if test "$enable_hash_synchronization" = yes && test "$THREADS" = "posix"; then
3214    HASH_SYNC_SPEC=-fhash-synchronization
3215    cat >> confdefs.h <<\EOF
3216 #define JV_HASH_SYNCHRONIZATION 1
3217 EOF
3218
3219 fi
3220
3221
3222
3223
3224
3225 if test "$GCC" = yes; then
3226   USING_GCC_TRUE=
3227   USING_GCC_FALSE='#'
3228 else
3229   USING_GCC_TRUE='#'
3230   USING_GCC_FALSE=
3231 fi
3232
3233 CANADIAN=no
3234 NULL_TARGET=no
3235 NATIVE=yes
3236
3237 # We're in the tree with gcc, and need to include some of its headers.
3238 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
3239
3240 if test -n "${with_cross_host}"; then
3241    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
3242    # may not work correctly, because the compiler may not be able to
3243    # link executables.
3244
3245    # We assume newlib.  This lets us hard-code the functions we know
3246    # we'll have.
3247    cat >> confdefs.h <<\EOF
3248 #define HAVE_MEMMOVE 1
3249 EOF
3250
3251    cat >> confdefs.h <<\EOF
3252 #define HAVE_MEMCPY 1
3253 EOF
3254
3255    cat >> confdefs.h <<\EOF
3256 #define HAVE_STRERROR 1
3257 EOF
3258
3259    cat >> confdefs.h <<\EOF
3260 #define HAVE_GMTIME_R 1
3261 EOF
3262
3263    cat >> confdefs.h <<\EOF
3264 #define HAVE_LOCALTIME_R 1
3265 EOF
3266
3267       cat >> confdefs.h <<\EOF
3268 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3269 EOF
3270
3271       cat >> confdefs.h <<\EOF
3272 #define HAVE_ALLOCA 1
3273 EOF
3274
3275
3276       cat >> confdefs.h <<\EOF
3277 #define NO_GETUID 1
3278 EOF
3279
3280
3281    ZLIBSPEC=-lzgcj
3282    ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
3283
3284    # If Canadian cross, then don't pick up tools from the build
3285    # directory.
3286    if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
3287       CANADIAN=yes
3288       GCC_UNWIND_INCLUDE=
3289       GCJ="${target_alias}-gcj"
3290    fi
3291    NATIVE=no
3292 else
3293    for ac_func in strerror ioctl select fstat open fsync sleep
3294 do
3295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3296 echo "configure:3297: checking for $ac_func" >&5
3297 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3298   echo $ac_n "(cached) $ac_c" 1>&6
3299 else
3300   cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 /* System header to define __stub macros and hopefully few prototypes,
3304     which can conflict with char $ac_func(); below.  */
3305 #include <assert.h>
3306 /* Override any gcc2 internal prototype to avoid an error.  */
3307 /* We use char because int might match the return type of a gcc2
3308     builtin and then its argument prototype would still apply.  */
3309 char $ac_func();
3310
3311 int main() {
3312
3313 /* The GNU C library defines this for functions which it implements
3314     to always fail with ENOSYS.  Some functions are actually named
3315     something starting with __ and the normal name is an alias.  */
3316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3317 choke me
3318 #else
3319 $ac_func();
3320 #endif
3321
3322 ; return 0; }
3323 EOF
3324 if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3325   rm -rf conftest*
3326   eval "ac_cv_func_$ac_func=yes"
3327 else
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -rf conftest*
3331   eval "ac_cv_func_$ac_func=no"
3332 fi
3333 rm -f conftest*
3334 fi
3335
3336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3337   echo "$ac_t""yes" 1>&6
3338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3339   cat >> confdefs.h <<EOF
3340 #define $ac_tr_func 1
3341 EOF
3342  
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346 done
3347
3348    for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3349 do
3350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3351 echo "configure:3352: checking for $ac_func" >&5
3352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 /* System header to define __stub macros and hopefully few prototypes,
3359     which can conflict with char $ac_func(); below.  */
3360 #include <assert.h>
3361 /* Override any gcc2 internal prototype to avoid an error.  */
3362 /* We use char because int might match the return type of a gcc2
3363     builtin and then its argument prototype would still apply.  */
3364 char $ac_func();
3365
3366 int main() {
3367
3368 /* The GNU C library defines this for functions which it implements
3369     to always fail with ENOSYS.  Some functions are actually named
3370     something starting with __ and the normal name is an alias.  */
3371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3372 choke me
3373 #else
3374 $ac_func();
3375 #endif
3376
3377 ; return 0; }
3378 EOF
3379 if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3380   rm -rf conftest*
3381   eval "ac_cv_func_$ac_func=yes"
3382 else
3383   echo "configure: failed program was:" >&5
3384   cat conftest.$ac_ext >&5
3385   rm -rf conftest*
3386   eval "ac_cv_func_$ac_func=no"
3387 fi
3388 rm -f conftest*
3389 fi
3390
3391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3392   echo "$ac_t""yes" 1>&6
3393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3394   cat >> confdefs.h <<EOF
3395 #define $ac_tr_func 1
3396 EOF
3397  
3398 else
3399   echo "$ac_t""no" 1>&6
3400 fi
3401 done
3402
3403    for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
3404 do
3405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_func" >&5
3407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 /* System header to define __stub macros and hopefully few prototypes,
3414     which can conflict with char $ac_func(); below.  */
3415 #include <assert.h>
3416 /* Override any gcc2 internal prototype to avoid an error.  */
3417 /* We use char because int might match the return type of a gcc2
3418     builtin and then its argument prototype would still apply.  */
3419 char $ac_func();
3420
3421 int main() {
3422
3423 /* The GNU C library defines this for functions which it implements
3424     to always fail with ENOSYS.  Some functions are actually named
3425     something starting with __ and the normal name is an alias.  */
3426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3427 choke me
3428 #else
3429 $ac_func();
3430 #endif
3431
3432 ; return 0; }
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3435   rm -rf conftest*
3436   eval "ac_cv_func_$ac_func=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_func_$ac_func=no"
3442 fi
3443 rm -f conftest*
3444 fi
3445
3446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3447   echo "$ac_t""yes" 1>&6
3448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3449   cat >> confdefs.h <<EOF
3450 #define $ac_tr_func 1
3451 EOF
3452  
3453 else
3454   echo "$ac_t""no" 1>&6
3455 fi
3456 done
3457
3458    for ac_func in nl_langinfo setlocale
3459 do
3460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3461 echo "configure:3462: checking for $ac_func" >&5
3462 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 /* System header to define __stub macros and hopefully few prototypes,
3469     which can conflict with char $ac_func(); below.  */
3470 #include <assert.h>
3471 /* Override any gcc2 internal prototype to avoid an error.  */
3472 /* We use char because int might match the return type of a gcc2
3473     builtin and then its argument prototype would still apply.  */
3474 char $ac_func();
3475
3476 int main() {
3477
3478 /* The GNU C library defines this for functions which it implements
3479     to always fail with ENOSYS.  Some functions are actually named
3480     something starting with __ and the normal name is an alias.  */
3481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3482 choke me
3483 #else
3484 $ac_func();
3485 #endif
3486
3487 ; return 0; }
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3490   rm -rf conftest*
3491   eval "ac_cv_func_$ac_func=yes"
3492 else
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_func_$ac_func=no"
3497 fi
3498 rm -f conftest*
3499 fi
3500
3501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3502   echo "$ac_t""yes" 1>&6
3503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3504   cat >> confdefs.h <<EOF
3505 #define $ac_tr_func 1
3506 EOF
3507  
3508 else
3509   echo "$ac_t""no" 1>&6
3510 fi
3511 done
3512
3513    for ac_func in inet_aton inet_addr
3514 do
3515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3516 echo "configure:3517: checking for $ac_func" >&5
3517 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   cat > conftest.$ac_ext <<EOF
3521 #line 3522 "configure"
3522 #include "confdefs.h"
3523 /* System header to define __stub macros and hopefully few prototypes,
3524     which can conflict with char $ac_func(); below.  */
3525 #include <assert.h>
3526 /* Override any gcc2 internal prototype to avoid an error.  */
3527 /* We use char because int might match the return type of a gcc2
3528     builtin and then its argument prototype would still apply.  */
3529 char $ac_func();
3530
3531 int main() {
3532
3533 /* The GNU C library defines this for functions which it implements
3534     to always fail with ENOSYS.  Some functions are actually named
3535     something starting with __ and the normal name is an alias.  */
3536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3537 choke me
3538 #else
3539 $ac_func();
3540 #endif
3541
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3545   rm -rf conftest*
3546   eval "ac_cv_func_$ac_func=yes"
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   eval "ac_cv_func_$ac_func=no"
3552 fi
3553 rm -f conftest*
3554 fi
3555
3556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3559   cat >> confdefs.h <<EOF
3560 #define $ac_tr_func 1
3561 EOF
3562  break
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566 done
3567
3568    for ac_func in inet_pton uname inet_ntoa
3569 do
3570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3571 echo "configure:3572: checking for $ac_func" >&5
3572 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 /* System header to define __stub macros and hopefully few prototypes,
3579     which can conflict with char $ac_func(); below.  */
3580 #include <assert.h>
3581 /* Override any gcc2 internal prototype to avoid an error.  */
3582 /* We use char because int might match the return type of a gcc2
3583     builtin and then its argument prototype would still apply.  */
3584 char $ac_func();
3585
3586 int main() {
3587
3588 /* The GNU C library defines this for functions which it implements
3589     to always fail with ENOSYS.  Some functions are actually named
3590     something starting with __ and the normal name is an alias.  */
3591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3592 choke me
3593 #else
3594 $ac_func();
3595 #endif
3596
3597 ; return 0; }
3598 EOF
3599 if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3600   rm -rf conftest*
3601   eval "ac_cv_func_$ac_func=yes"
3602 else
3603   echo "configure: failed program was:" >&5
3604   cat conftest.$ac_ext >&5
3605   rm -rf conftest*
3606   eval "ac_cv_func_$ac_func=no"
3607 fi
3608 rm -f conftest*
3609 fi
3610
3611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3612   echo "$ac_t""yes" 1>&6
3613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3614   cat >> confdefs.h <<EOF
3615 #define $ac_tr_func 1
3616 EOF
3617  
3618 else
3619   echo "$ac_t""no" 1>&6
3620 fi
3621 done
3622
3623    for ac_func in backtrace fork execvp pipe sigaction
3624 do
3625 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3626 echo "configure:3627: checking for $ac_func" >&5
3627 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 /* System header to define __stub macros and hopefully few prototypes,
3634     which can conflict with char $ac_func(); below.  */
3635 #include <assert.h>
3636 /* Override any gcc2 internal prototype to avoid an error.  */
3637 /* We use char because int might match the return type of a gcc2
3638     builtin and then its argument prototype would still apply.  */
3639 char $ac_func();
3640
3641 int main() {
3642
3643 /* The GNU C library defines this for functions which it implements
3644     to always fail with ENOSYS.  Some functions are actually named
3645     something starting with __ and the normal name is an alias.  */
3646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3647 choke me
3648 #else
3649 $ac_func();
3650 #endif
3651
3652 ; return 0; }
3653 EOF
3654 if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3655   rm -rf conftest*
3656   eval "ac_cv_func_$ac_func=yes"
3657 else
3658   echo "configure: failed program was:" >&5
3659   cat conftest.$ac_ext >&5
3660   rm -rf conftest*
3661   eval "ac_cv_func_$ac_func=no"
3662 fi
3663 rm -f conftest*
3664 fi
3665
3666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3667   echo "$ac_t""yes" 1>&6
3668     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3669   cat >> confdefs.h <<EOF
3670 #define $ac_tr_func 1
3671 EOF
3672  
3673 else
3674   echo "$ac_t""no" 1>&6
3675 fi
3676 done
3677
3678    for ac_hdr in execinfo.h unistd.h dlfcn.h
3679 do
3680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3681 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3682 echo "configure:3683: checking for $ac_hdr" >&5
3683 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   cat > conftest.$ac_ext <<EOF
3687 #line 3688 "configure"
3688 #include "confdefs.h"
3689 #include <$ac_hdr>
3690 EOF
3691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3692 { (eval echo configure:3693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3694 if test -z "$ac_err"; then
3695   rm -rf conftest*
3696   eval "ac_cv_header_$ac_safe=yes"
3697 else
3698   echo "$ac_err" >&5
3699   echo "configure: failed program was:" >&5
3700   cat conftest.$ac_ext >&5
3701   rm -rf conftest*
3702   eval "ac_cv_header_$ac_safe=no"
3703 fi
3704 rm -f conftest*
3705 fi
3706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3707   echo "$ac_t""yes" 1>&6
3708     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3709   cat >> confdefs.h <<EOF
3710 #define $ac_tr_hdr 1
3711 EOF
3712  
3713 else
3714   echo "$ac_t""no" 1>&6
3715 fi
3716 done
3717  
3718    echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3719 echo "configure:3720: checking for dladdr in -ldl" >&5
3720 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3722   echo $ac_n "(cached) $ac_c" 1>&6
3723 else
3724   ac_save_LIBS="$LIBS"
3725 LIBS="-ldl  $LIBS"
3726 cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3729 /* Override any gcc2 internal prototype to avoid an error.  */
3730 /* We use char because int might match the return type of a gcc2
3731     builtin and then its argument prototype would still apply.  */
3732 char dladdr();
3733
3734 int main() {
3735 dladdr()
3736 ; return 0; }
3737 EOF
3738 if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3739   rm -rf conftest*
3740   eval "ac_cv_lib_$ac_lib_var=yes"
3741 else
3742   echo "configure: failed program was:" >&5
3743   cat conftest.$ac_ext >&5
3744   rm -rf conftest*
3745   eval "ac_cv_lib_$ac_lib_var=no"
3746 fi
3747 rm -f conftest*
3748 LIBS="$ac_save_LIBS"
3749
3750 fi
3751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3752   echo "$ac_t""yes" 1>&6
3753   
3754      cat >> confdefs.h <<\EOF
3755 #define HAVE_DLADDR 1
3756 EOF
3757
3758 else
3759   echo "$ac_t""no" 1>&6
3760 fi
3761
3762    for ac_file in /proc/self/exe
3763 do
3764
3765 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3766 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3767 echo "configure:3768: checking for $ac_file" >&5
3768 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3769   echo $ac_n "(cached) $ac_c" 1>&6
3770 else
3771   if test "$cross_compiling" = yes; then
3772     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3773 else
3774   if test -r $ac_file; then
3775     eval "ac_cv_file_$ac_safe=yes"
3776   else
3777     eval "ac_cv_file_$ac_safe=no"
3778   fi
3779 fi
3780 fi
3781 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3782   echo "$ac_t""yes" 1>&6
3783     ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3784   cat >> confdefs.h <<EOF
3785 #define $ac_tr_file 1
3786 EOF
3787  
3788      cat >> confdefs.h <<\EOF
3789 #define HAVE_PROC_SELF_EXE 1
3790 EOF
3791
3792 else
3793   echo "$ac_t""no" 1>&6
3794
3795 fi
3796 done
3797
3798
3799    
3800     
3801   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3802 if test "${with_libiconv_prefix+set}" = set; then
3803   withval="$with_libiconv_prefix"
3804   
3805     for dir in `echo "$withval" | tr : ' '`; do
3806       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3807       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
3808     done
3809    
3810 fi
3811
3812
3813   echo $ac_n "checking for iconv""... $ac_c" 1>&6
3814 echo "configure:3815: checking for iconv" >&5
3815 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   
3819     am_cv_func_iconv="no, consider installing GNU libiconv"
3820     am_cv_lib_iconv=no
3821     cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 #include <stdlib.h>
3825 #include <iconv.h>
3826 int main() {
3827 iconv_t cd = iconv_open("","");
3828        iconv(cd,NULL,NULL,NULL,NULL);
3829        iconv_close(cd);
3830 ; return 0; }
3831 EOF
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3833   rm -rf conftest*
3834   am_cv_func_iconv=yes
3835 else
3836   echo "configure: failed program was:" >&5
3837   cat conftest.$ac_ext >&5
3838 fi
3839 rm -f conftest*
3840     if test "$am_cv_func_iconv" != yes; then
3841       am_save_LIBS="$LIBS"
3842       LIBS="$LIBS -liconv"
3843       cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846 #include <stdlib.h>
3847 #include <iconv.h>
3848 int main() {
3849 iconv_t cd = iconv_open("","");
3850          iconv(cd,NULL,NULL,NULL,NULL);
3851          iconv_close(cd);
3852 ; return 0; }
3853 EOF
3854 if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3855   rm -rf conftest*
3856   am_cv_lib_iconv=yes
3857         am_cv_func_iconv=yes
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861 fi
3862 rm -f conftest*
3863       LIBS="$am_save_LIBS"
3864     fi
3865   
3866 fi
3867
3868 echo "$ac_t""$am_cv_func_iconv" 1>&6
3869   if test "$am_cv_func_iconv" = yes; then
3870     cat >> confdefs.h <<\EOF
3871 #define HAVE_ICONV 1
3872 EOF
3873
3874     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3875 echo "configure:3876: checking for iconv declaration" >&5
3876     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3877   echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879   
3880       cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883
3884 #include <stdlib.h>
3885 #include <iconv.h>
3886 extern
3887 #ifdef __cplusplus
3888 "C"
3889 #endif
3890 #if defined(__STDC__) || defined(__cplusplus)
3891 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3892 #else
3893 size_t iconv();
3894 #endif
3895
3896 int main() {
3897
3898 ; return 0; }
3899 EOF
3900 if { (eval echo configure:3901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3901   rm -rf conftest*
3902   am_cv_proto_iconv_arg1=""
3903 else
3904   echo "configure: failed program was:" >&5
3905   cat conftest.$ac_ext >&5
3906   rm -rf conftest*
3907   am_cv_proto_iconv_arg1="const"
3908 fi
3909 rm -f conftest*
3910       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
3911 fi
3912
3913     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
3914     echo "$ac_t""${ac_t:-
3915          }$am_cv_proto_iconv" 1>&6
3916     cat >> confdefs.h <<EOF
3917 #define ICONV_CONST $am_cv_proto_iconv_arg1
3918 EOF
3919
3920   fi
3921   LIBICONV=
3922   if test "$am_cv_lib_iconv" = yes; then
3923     LIBICONV="-liconv"
3924   fi
3925   
3926
3927
3928    for ac_func in gethostbyname_r
3929 do
3930 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3931 echo "configure:3932: checking for $ac_func" >&5
3932 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   cat > conftest.$ac_ext <<EOF
3936 #line 3937 "configure"
3937 #include "confdefs.h"
3938 /* System header to define __stub macros and hopefully few prototypes,
3939     which can conflict with char $ac_func(); below.  */
3940 #include <assert.h>
3941 /* Override any gcc2 internal prototype to avoid an error.  */
3942 /* We use char because int might match the return type of a gcc2
3943     builtin and then its argument prototype would still apply.  */
3944 char $ac_func();
3945
3946 int main() {
3947
3948 /* The GNU C library defines this for functions which it implements
3949     to always fail with ENOSYS.  Some functions are actually named
3950     something starting with __ and the normal name is an alias.  */
3951 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3952 choke me
3953 #else
3954 $ac_func();
3955 #endif
3956
3957 ; return 0; }
3958 EOF
3959 if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3960   rm -rf conftest*
3961   eval "ac_cv_func_$ac_func=yes"
3962 else
3963   echo "configure: failed program was:" >&5
3964   cat conftest.$ac_ext >&5
3965   rm -rf conftest*
3966   eval "ac_cv_func_$ac_func=no"
3967 fi
3968 rm -f conftest*
3969 fi
3970
3971 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3972   echo "$ac_t""yes" 1>&6
3973     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3974   cat >> confdefs.h <<EOF
3975 #define $ac_tr_func 1
3976 EOF
3977  
3978      cat >> confdefs.h <<\EOF
3979 #define HAVE_GETHOSTBYNAME_R 1
3980 EOF
3981
3982      # There are two different kinds of gethostbyname_r.
3983      # We look for the one that returns `int'.
3984      # Hopefully this check is robust enough.
3985      cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 #include <netdb.h>
3989 EOF
3990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3991   egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
3992   rm -rf conftest*
3993   
3994        cat >> confdefs.h <<\EOF
3995 #define GETHOSTBYNAME_R_RETURNS_INT 1
3996 EOF
3997
3998 fi
3999 rm -f conftest*
4000
4001
4002      case " $GCINCS " in
4003      *" -D_REENTRANT "*) ;;
4004      *)
4005                 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
4006 echo "configure:4007: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
4007 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010    
4011           ac_ext=C
4012 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4013 ac_cpp='$CXXCPP $CPPFLAGS'
4014 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4015 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4016 cross_compiling=$ac_cv_prog_cxx_cross
4017
4018           cat > conftest.$ac_ext <<EOF
4019 #line 4020 "configure"
4020 #include "confdefs.h"
4021 #include <netdb.h>
4022 int main() {
4023 gethostbyname_r("", 0, 0);
4024 ; return 0; }
4025 EOF
4026 if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4027   rm -rf conftest*
4028   libjava_cv_gethostbyname_r_needs_reentrant=no
4029 else
4030   echo "configure: failed program was:" >&5
4031   cat conftest.$ac_ext >&5
4032   rm -rf conftest*
4033                 CPPFLAGS_SAVE="$CPPFLAGS"
4034                 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4035                 cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <netdb.h>
4039 int main() {
4040 gethostbyname_r("", 0, 0);
4041 ; return 0; }
4042 EOF
4043 if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4044   rm -rf conftest*
4045   libjava_cv_gethostbyname_r_needs_reentrant=yes
4046 else
4047   echo "configure: failed program was:" >&5
4048   cat conftest.$ac_ext >&5
4049   rm -rf conftest*
4050   libjava_cv_gethostbyname_r_needs_reentrant=fail
4051 fi
4052 rm -f conftest*
4053                 CPPFLAGS="$CPPFLAGS_SAVE"
4054           
4055 fi
4056 rm -f conftest*
4057           ac_ext=c
4058 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4059 ac_cpp='$CPP $CPPFLAGS'
4060 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4061 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4062 cross_compiling=$ac_cv_prog_cc_cross
4063
4064         
4065 fi
4066
4067 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
4068         if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
4069           cat >> confdefs.h <<\EOF
4070 #define _REENTRANT 1
4071 EOF
4072
4073         fi
4074      ;;
4075      esac
4076
4077      echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
4078 echo "configure:4079: checking for struct hostent_data" >&5
4079 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082         cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4085
4086 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
4087 # define _REENTRANT 1
4088 #endif
4089 #include <netdb.h>
4090 int main() {
4091 struct hostent_data data;
4092 ; return 0; }
4093 EOF
4094 if { (eval echo configure:4095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4095   rm -rf conftest*
4096   libjava_cv_struct_hostent_data=yes
4097 else
4098   echo "configure: failed program was:" >&5
4099   cat conftest.$ac_ext >&5
4100   rm -rf conftest*
4101   libjava_cv_struct_hostent_data=no
4102 fi
4103 rm -f conftest*
4104 fi
4105
4106 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
4107      if test "x$libjava_cv_struct_hostent_data" = xyes; then
4108        cat >> confdefs.h <<\EOF
4109 #define HAVE_STRUCT_HOSTENT_DATA 1
4110 EOF
4111
4112      fi
4113    
4114 else
4115   echo "$ac_t""no" 1>&6
4116 fi
4117 done
4118
4119
4120    for ac_func in gethostbyaddr_r
4121 do
4122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4123 echo "configure:4124: checking for $ac_func" >&5
4124 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4125   echo $ac_n "(cached) $ac_c" 1>&6
4126 else
4127   cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 /* System header to define __stub macros and hopefully few prototypes,
4131     which can conflict with char $ac_func(); below.  */
4132 #include <assert.h>
4133 /* Override any gcc2 internal prototype to avoid an error.  */
4134 /* We use char because int might match the return type of a gcc2
4135     builtin and then its argument prototype would still apply.  */
4136 char $ac_func();
4137
4138 int main() {
4139
4140 /* The GNU C library defines this for functions which it implements
4141     to always fail with ENOSYS.  Some functions are actually named
4142     something starting with __ and the normal name is an alias.  */
4143 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4144 choke me
4145 #else
4146 $ac_func();
4147 #endif
4148
4149 ; return 0; }
4150 EOF
4151 if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4152   rm -rf conftest*
4153   eval "ac_cv_func_$ac_func=yes"
4154 else
4155   echo "configure: failed program was:" >&5
4156   cat conftest.$ac_ext >&5
4157   rm -rf conftest*
4158   eval "ac_cv_func_$ac_func=no"
4159 fi
4160 rm -f conftest*
4161 fi
4162
4163 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4164   echo "$ac_t""yes" 1>&6
4165     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4166   cat >> confdefs.h <<EOF
4167 #define $ac_tr_func 1
4168 EOF
4169  
4170      cat >> confdefs.h <<\EOF
4171 #define HAVE_GETHOSTBYADDR_R 1
4172 EOF
4173
4174      # There are two different kinds of gethostbyaddr_r.
4175      # We look for the one that returns `int'.
4176      # Hopefully this check is robust enough.
4177      cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 #include <netdb.h>
4181 EOF
4182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4183   egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4184   rm -rf conftest*
4185   
4186        cat >> confdefs.h <<\EOF
4187 #define GETHOSTBYADDR_R_RETURNS_INT 1
4188 EOF
4189
4190 fi
4191 rm -f conftest*
4192
4193 else
4194   echo "$ac_t""no" 1>&6
4195 fi
4196 done
4197
4198
4199    for ac_func in gethostname
4200 do
4201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4202 echo "configure:4203: checking for $ac_func" >&5
4203 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4204   echo $ac_n "(cached) $ac_c" 1>&6
4205 else
4206   cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209 /* System header to define __stub macros and hopefully few prototypes,
4210     which can conflict with char $ac_func(); below.  */
4211 #include <assert.h>
4212 /* Override any gcc2 internal prototype to avoid an error.  */
4213 /* We use char because int might match the return type of a gcc2
4214     builtin and then its argument prototype would still apply.  */
4215 char $ac_func();
4216
4217 int main() {
4218
4219 /* The GNU C library defines this for functions which it implements
4220     to always fail with ENOSYS.  Some functions are actually named
4221     something starting with __ and the normal name is an alias.  */
4222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4223 choke me
4224 #else
4225 $ac_func();
4226 #endif
4227
4228 ; return 0; }
4229 EOF
4230 if { (eval echo configure:4231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4231   rm -rf conftest*
4232   eval "ac_cv_func_$ac_func=yes"
4233 else
4234   echo "configure: failed program was:" >&5
4235   cat conftest.$ac_ext >&5
4236   rm -rf conftest*
4237   eval "ac_cv_func_$ac_func=no"
4238 fi
4239 rm -f conftest*
4240 fi
4241
4242 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4243   echo "$ac_t""yes" 1>&6
4244     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4245   cat >> confdefs.h <<EOF
4246 #define $ac_tr_func 1
4247 EOF
4248  
4249      cat >> confdefs.h <<\EOF
4250 #define HAVE_GETHOSTNAME 1
4251 EOF
4252
4253      cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <unistd.h>
4257 EOF
4258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4259   egrep "gethostname" >/dev/null 2>&1; then
4260   rm -rf conftest*
4261   
4262        cat >> confdefs.h <<\EOF
4263 #define HAVE_GETHOSTNAME_DECL 1
4264 EOF
4265
4266 fi
4267 rm -f conftest*
4268
4269 else
4270   echo "$ac_t""no" 1>&6
4271 fi
4272 done
4273
4274
4275    # Look for these functions in the thread library, but only bother
4276    # if using POSIX threads.
4277    if test "$THREADS" = posix; then
4278       save_LIBS="$LIBS"
4279       LIBS="$LIBS $THREADLIBS"
4280       # Some POSIX thread systems don't have pthread_mutexattr_settype.
4281       # E.g., Solaris.
4282       for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4283 do
4284 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4285 echo "configure:4286: checking for $ac_func" >&5
4286 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4287   echo $ac_n "(cached) $ac_c" 1>&6
4288 else
4289   cat > conftest.$ac_ext <<EOF
4290 #line 4291 "configure"
4291 #include "confdefs.h"
4292 /* System header to define __stub macros and hopefully few prototypes,
4293     which can conflict with char $ac_func(); below.  */
4294 #include <assert.h>
4295 /* Override any gcc2 internal prototype to avoid an error.  */
4296 /* We use char because int might match the return type of a gcc2
4297     builtin and then its argument prototype would still apply.  */
4298 char $ac_func();
4299
4300 int main() {
4301
4302 /* The GNU C library defines this for functions which it implements
4303     to always fail with ENOSYS.  Some functions are actually named
4304     something starting with __ and the normal name is an alias.  */
4305 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4306 choke me
4307 #else
4308 $ac_func();
4309 #endif
4310
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4314   rm -rf conftest*
4315   eval "ac_cv_func_$ac_func=yes"
4316 else
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   eval "ac_cv_func_$ac_func=no"
4321 fi
4322 rm -f conftest*
4323 fi
4324
4325 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4326   echo "$ac_t""yes" 1>&6
4327     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4328   cat >> confdefs.h <<EOF
4329 #define $ac_tr_func 1
4330 EOF
4331  
4332 else
4333   echo "$ac_t""no" 1>&6
4334 fi
4335 done
4336
4337
4338       # Look for sched_yield.  Up to Solaris 2.6, it is in libposix4, since
4339       # Solaris 7 the name librt is preferred.
4340       for ac_func in sched_yield
4341 do
4342 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4343 echo "configure:4344: checking for $ac_func" >&5
4344 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4345   echo $ac_n "(cached) $ac_c" 1>&6
4346 else
4347   cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350 /* System header to define __stub macros and hopefully few prototypes,
4351     which can conflict with char $ac_func(); below.  */
4352 #include <assert.h>
4353 /* Override any gcc2 internal prototype to avoid an error.  */
4354 /* We use char because int might match the return type of a gcc2
4355     builtin and then its argument prototype would still apply.  */
4356 char $ac_func();
4357
4358 int main() {
4359
4360 /* The GNU C library defines this for functions which it implements
4361     to always fail with ENOSYS.  Some functions are actually named
4362     something starting with __ and the normal name is an alias.  */
4363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4364 choke me
4365 #else
4366 $ac_func();
4367 #endif
4368
4369 ; return 0; }
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4372   rm -rf conftest*
4373   eval "ac_cv_func_$ac_func=yes"
4374 else
4375   echo "configure: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   rm -rf conftest*
4378   eval "ac_cv_func_$ac_func=no"
4379 fi
4380 rm -f conftest*
4381 fi
4382
4383 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4384   echo "$ac_t""yes" 1>&6
4385     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4386   cat >> confdefs.h <<EOF
4387 #define $ac_tr_func 1
4388 EOF
4389  
4390 else
4391   echo "$ac_t""no" 1>&6
4392 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4393 echo "configure:4394: checking for sched_yield in -lrt" >&5
4394 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   ac_save_LIBS="$LIBS"
4399 LIBS="-lrt  $LIBS"
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 /* Override any gcc2 internal prototype to avoid an error.  */
4404 /* We use char because int might match the return type of a gcc2
4405     builtin and then its argument prototype would still apply.  */
4406 char sched_yield();
4407
4408 int main() {
4409 sched_yield()
4410 ; return 0; }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4413   rm -rf conftest*
4414   eval "ac_cv_lib_$ac_lib_var=yes"
4415 else
4416   echo "configure: failed program was:" >&5
4417   cat conftest.$ac_ext >&5
4418   rm -rf conftest*
4419   eval "ac_cv_lib_$ac_lib_var=no"
4420 fi
4421 rm -f conftest*
4422 LIBS="$ac_save_LIBS"
4423
4424 fi
4425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4426   echo "$ac_t""yes" 1>&6
4427   
4428           cat >> confdefs.h <<\EOF
4429 #define HAVE_SCHED_YIELD 1
4430 EOF
4431
4432           THREADLIBS="$THREADLIBS -lrt"
4433           THREADSPEC="$THREADSPEC -lrt"
4434 else
4435   echo "$ac_t""no" 1>&6
4436
4437           echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4438 echo "configure:4439: checking for sched_yield in -lposix4" >&5
4439 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4441   echo $ac_n "(cached) $ac_c" 1>&6
4442 else
4443   ac_save_LIBS="$LIBS"
4444 LIBS="-lposix4  $LIBS"
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 /* Override any gcc2 internal prototype to avoid an error.  */
4449 /* We use char because int might match the return type of a gcc2
4450     builtin and then its argument prototype would still apply.  */
4451 char sched_yield();
4452
4453 int main() {
4454 sched_yield()
4455 ; return 0; }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4458   rm -rf conftest*
4459   eval "ac_cv_lib_$ac_lib_var=yes"
4460 else
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   eval "ac_cv_lib_$ac_lib_var=no"
4465 fi
4466 rm -f conftest*
4467 LIBS="$ac_save_LIBS"
4468
4469 fi
4470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4471   echo "$ac_t""yes" 1>&6
4472   
4473             cat >> confdefs.h <<\EOF
4474 #define HAVE_SCHED_YIELD 1
4475 EOF
4476
4477             THREADLIBS="$THREADLIBS -lposix4"
4478             THREADSPEC="$THREADSPEC -lposix4"
4479 else
4480   echo "$ac_t""no" 1>&6
4481 fi
4482
4483 fi
4484
4485 fi
4486 done
4487
4488       LIBS="$save_LIBS"
4489
4490       # We can save a little space at runtime if the mutex has m_count
4491       # or __m_count.  This is a nice hack for Linux.
4492       cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495 #include <pthread.h>
4496 int main() {
4497
4498           extern pthread_mutex_t *mutex; int q = mutex->m_count;
4499         
4500 ; return 0; }
4501 EOF
4502 if { (eval echo configure:4503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4503   rm -rf conftest*
4504   cat >> confdefs.h <<\EOF
4505 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4506 EOF
4507
4508 else
4509   echo "configure: failed program was:" >&5
4510   cat conftest.$ac_ext >&5
4511   rm -rf conftest*
4512   
4513         cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <pthread.h>
4517 int main() {
4518
4519             extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4520           
4521 ; return 0; }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4524   rm -rf conftest*
4525   cat >> confdefs.h <<\EOF
4526 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4527 EOF
4528
4529 else
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532 fi
4533 rm -f conftest*
4534 fi
4535 rm -f conftest*
4536    fi
4537
4538    # We require a way to get the time.
4539    time_found=no
4540    for ac_func in gettimeofday time ftime
4541 do
4542 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4543 echo "configure:4544: checking for $ac_func" >&5
4544 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550 /* System header to define __stub macros and hopefully few prototypes,
4551     which can conflict with char $ac_func(); below.  */
4552 #include <assert.h>
4553 /* Override any gcc2 internal prototype to avoid an error.  */
4554 /* We use char because int might match the return type of a gcc2
4555     builtin and then its argument prototype would still apply.  */
4556 char $ac_func();
4557
4558 int main() {
4559
4560 /* The GNU C library defines this for functions which it implements
4561     to always fail with ENOSYS.  Some functions are actually named
4562     something starting with __ and the normal name is an alias.  */
4563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4564 choke me
4565 #else
4566 $ac_func();
4567 #endif
4568
4569 ; return 0; }
4570 EOF
4571 if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4572   rm -rf conftest*
4573   eval "ac_cv_func_$ac_func=yes"
4574 else
4575   echo "configure: failed program was:" >&5
4576   cat conftest.$ac_ext >&5
4577   rm -rf conftest*
4578   eval "ac_cv_func_$ac_func=no"
4579 fi
4580 rm -f conftest*
4581 fi
4582
4583 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4584   echo "$ac_t""yes" 1>&6
4585     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4586   cat >> confdefs.h <<EOF
4587 #define $ac_tr_func 1
4588 EOF
4589  time_found=yes
4590 else
4591   echo "$ac_t""no" 1>&6
4592 fi
4593 done
4594
4595    if test "$time_found" = no; then
4596       { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4597    fi
4598
4599    for ac_func in memmove
4600 do
4601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4602 echo "configure:4603: checking for $ac_func" >&5
4603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4604   echo $ac_n "(cached) $ac_c" 1>&6
4605 else
4606   cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 /* System header to define __stub macros and hopefully few prototypes,
4610     which can conflict with char $ac_func(); below.  */
4611 #include <assert.h>
4612 /* Override any gcc2 internal prototype to avoid an error.  */
4613 /* We use char because int might match the return type of a gcc2
4614     builtin and then its argument prototype would still apply.  */
4615 char $ac_func();
4616
4617 int main() {
4618
4619 /* The GNU C library defines this for functions which it implements
4620     to always fail with ENOSYS.  Some functions are actually named
4621     something starting with __ and the normal name is an alias.  */
4622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4623 choke me
4624 #else
4625 $ac_func();
4626 #endif
4627
4628 ; return 0; }
4629 EOF
4630 if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4631   rm -rf conftest*
4632   eval "ac_cv_func_$ac_func=yes"
4633 else
4634   echo "configure: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   rm -rf conftest*
4637   eval "ac_cv_func_$ac_func=no"
4638 fi
4639 rm -f conftest*
4640 fi
4641
4642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4643   echo "$ac_t""yes" 1>&6
4644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4645   cat >> confdefs.h <<EOF
4646 #define $ac_tr_func 1
4647 EOF
4648  
4649 else
4650   echo "$ac_t""no" 1>&6
4651 fi
4652 done
4653
4654
4655    # We require memcpy.
4656    memcpy_found=no
4657    for ac_func in memcpy
4658 do
4659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_func" >&5
4661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667 /* System header to define __stub macros and hopefully few prototypes,
4668     which can conflict with char $ac_func(); below.  */
4669 #include <assert.h>
4670 /* Override any gcc2 internal prototype to avoid an error.  */
4671 /* We use char because int might match the return type of a gcc2
4672     builtin and then its argument prototype would still apply.  */
4673 char $ac_func();
4674
4675 int main() {
4676
4677 /* The GNU C library defines this for functions which it implements
4678     to always fail with ENOSYS.  Some functions are actually named
4679     something starting with __ and the normal name is an alias.  */
4680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4681 choke me
4682 #else
4683 $ac_func();
4684 #endif
4685
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_func_$ac_func=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_func_$ac_func=no"
4696 fi
4697 rm -f conftest*
4698 fi
4699
4700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4701   echo "$ac_t""yes" 1>&6
4702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4703   cat >> confdefs.h <<EOF
4704 #define $ac_tr_func 1
4705 EOF
4706  memcpy_found=yes
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710 done
4711
4712    if test "$memcpy_found" = no; then
4713       { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4714    fi
4715
4716    # Some library-finding code we stole from Tcl.
4717    #--------------------------------------------------------------------
4718    #    Check for the existence of the -lsocket and -lnsl libraries.
4719    #    The order here is important, so that they end up in the right
4720    #    order in the command line generated by make.  Here are some
4721    #    special considerations:
4722    #    1. Use "connect" and "accept" to check for -lsocket, and
4723    #       "gethostbyname" to check for -lnsl.
4724    #    2. Use each function name only once:  can't redo a check because
4725    #       autoconf caches the results of the last check and won't redo it.
4726    #    3. Use -lnsl and -lsocket only if they supply procedures that
4727    #       aren't already present in the normal libraries.  This is because
4728    #       IRIX 5.2 has libraries, but they aren't needed and they're
4729    #       bogus:  they goof up name resolution if used.
4730    #    4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4731    #       To get around this problem, check for both libraries together
4732    #       if -lsocket doesn't work by itself.
4733    #--------------------------------------------------------------------
4734
4735    echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4736 echo "configure:4737: checking for socket libraries" >&5
4737 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   gcj_cv_lib_sockets=
4741      gcj_checkBoth=0
4742      unset ac_cv_func_connect
4743      echo $ac_n "checking for connect""... $ac_c" 1>&6
4744 echo "configure:4745: checking for connect" >&5
4745 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4746   echo $ac_n "(cached) $ac_c" 1>&6
4747 else
4748   cat > conftest.$ac_ext <<EOF
4749 #line 4750 "configure"
4750 #include "confdefs.h"
4751 /* System header to define __stub macros and hopefully few prototypes,
4752     which can conflict with char connect(); below.  */
4753 #include <assert.h>
4754 /* Override any gcc2 internal prototype to avoid an error.  */
4755 /* We use char because int might match the return type of a gcc2
4756     builtin and then its argument prototype would still apply.  */
4757 char connect();
4758
4759 int main() {
4760
4761 /* The GNU C library defines this for functions which it implements
4762     to always fail with ENOSYS.  Some functions are actually named
4763     something starting with __ and the normal name is an alias.  */
4764 #if defined (__stub_connect) || defined (__stub___connect)
4765 choke me
4766 #else
4767 connect();
4768 #endif
4769
4770 ; return 0; }
4771 EOF
4772 if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773   rm -rf conftest*
4774   eval "ac_cv_func_connect=yes"
4775 else
4776   echo "configure: failed program was:" >&5
4777   cat conftest.$ac_ext >&5
4778   rm -rf conftest*
4779   eval "ac_cv_func_connect=no"
4780 fi
4781 rm -f conftest*
4782 fi
4783
4784 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4785   echo "$ac_t""yes" 1>&6
4786   gcj_checkSocket=0
4787 else
4788   echo "$ac_t""no" 1>&6
4789 gcj_checkSocket=1
4790 fi
4791
4792      if test "$gcj_checkSocket" = 1; then
4793          unset ac_cv_func_connect
4794          echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4795 echo "configure:4796: checking for main in -lsocket" >&5
4796 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4797 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4798   echo $ac_n "(cached) $ac_c" 1>&6
4799 else
4800   ac_save_LIBS="$LIBS"
4801 LIBS="-lsocket  $LIBS"
4802 cat > conftest.$ac_ext <<EOF
4803 #line 4804 "configure"
4804 #include "confdefs.h"
4805
4806 int main() {
4807 main()
4808 ; return 0; }
4809 EOF
4810 if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4811   rm -rf conftest*
4812   eval "ac_cv_lib_$ac_lib_var=yes"
4813 else
4814   echo "configure: failed program was:" >&5
4815   cat conftest.$ac_ext >&5
4816   rm -rf conftest*
4817   eval "ac_cv_lib_$ac_lib_var=no"
4818 fi
4819 rm -f conftest*
4820 LIBS="$ac_save_LIBS"
4821
4822 fi
4823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4824   echo "$ac_t""yes" 1>&6
4825   gcj_cv_lib_sockets="-lsocket"
4826 else
4827   echo "$ac_t""no" 1>&6
4828 gcj_checkBoth=1
4829 fi
4830
4831      fi
4832      if test "$gcj_checkBoth" = 1; then
4833          gcj_oldLibs=$LIBS
4834          LIBS="$LIBS -lsocket -lnsl"
4835          unset ac_cv_func_accept
4836          echo $ac_n "checking for accept""... $ac_c" 1>&6
4837 echo "configure:4838: checking for accept" >&5
4838 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844 /* System header to define __stub macros and hopefully few prototypes,
4845     which can conflict with char accept(); below.  */
4846 #include <assert.h>
4847 /* Override any gcc2 internal prototype to avoid an error.  */
4848 /* We use char because int might match the return type of a gcc2
4849     builtin and then its argument prototype would still apply.  */
4850 char accept();
4851
4852 int main() {
4853
4854 /* The GNU C library defines this for functions which it implements
4855     to always fail with ENOSYS.  Some functions are actually named
4856     something starting with __ and the normal name is an alias.  */
4857 #if defined (__stub_accept) || defined (__stub___accept)
4858 choke me
4859 #else
4860 accept();
4861 #endif
4862
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   eval "ac_cv_func_accept=yes"
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   eval "ac_cv_func_accept=no"
4873 fi
4874 rm -f conftest*
4875 fi
4876
4877 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4878   echo "$ac_t""yes" 1>&6
4879   gcj_checkNsl=0
4880                         gcj_cv_lib_sockets="-lsocket -lnsl"
4881 else
4882   echo "$ac_t""no" 1>&6
4883 fi
4884
4885          unset ac_cv_func_accept
4886          LIBS=$gcj_oldLibs
4887      fi
4888      unset ac_cv_func_gethostbyname
4889      gcj_oldLibs=$LIBS
4890      LIBS="$LIBS $gcj_cv_lib_sockets"
4891      echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4892 echo "configure:4893: checking for gethostbyname" >&5
4893 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4894   echo $ac_n "(cached) $ac_c" 1>&6
4895 else
4896   cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899 /* System header to define __stub macros and hopefully few prototypes,
4900     which can conflict with char gethostbyname(); below.  */
4901 #include <assert.h>
4902 /* Override any gcc2 internal prototype to avoid an error.  */
4903 /* We use char because int might match the return type of a gcc2
4904     builtin and then its argument prototype would still apply.  */
4905 char gethostbyname();
4906
4907 int main() {
4908
4909 /* The GNU C library defines this for functions which it implements
4910     to always fail with ENOSYS.  Some functions are actually named
4911     something starting with __ and the normal name is an alias.  */
4912 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4913 choke me
4914 #else
4915 gethostbyname();
4916 #endif
4917
4918 ; return 0; }
4919 EOF
4920 if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4921   rm -rf conftest*
4922   eval "ac_cv_func_gethostbyname=yes"
4923 else
4924   echo "configure: failed program was:" >&5
4925   cat conftest.$ac_ext >&5
4926   rm -rf conftest*
4927   eval "ac_cv_func_gethostbyname=no"
4928 fi
4929 rm -f conftest*
4930 fi
4931
4932 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4933   echo "$ac_t""yes" 1>&6
4934   :
4935 else
4936   echo "$ac_t""no" 1>&6
4937 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4938 echo "configure:4939: checking for main in -lnsl" >&5
4939 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   ac_save_LIBS="$LIBS"
4944 LIBS="-lnsl  $LIBS"
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4948
4949 int main() {
4950 main()
4951 ; return 0; }
4952 EOF
4953 if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4954   rm -rf conftest*
4955   eval "ac_cv_lib_$ac_lib_var=yes"
4956 else
4957   echo "configure: failed program was:" >&5
4958   cat conftest.$ac_ext >&5
4959   rm -rf conftest*
4960   eval "ac_cv_lib_$ac_lib_var=no"
4961 fi
4962 rm -f conftest*
4963 LIBS="$ac_save_LIBS"
4964
4965 fi
4966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968   gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972
4973 fi
4974
4975      unset ac_cv_func_gethostbyname
4976      LIBS=$gcj_oldLIBS
4977    
4978 fi
4979
4980 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4981    SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4982
4983    if test "$with_system_zlib" = yes; then
4984       echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
4985 echo "configure:4986: checking for deflate in -lz" >&5
4986 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4987 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   ac_save_LIBS="$LIBS"
4991 LIBS="-lz  $LIBS"
4992 cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995 /* Override any gcc2 internal prototype to avoid an error.  */
4996 /* We use char because int might match the return type of a gcc2
4997     builtin and then its argument prototype would still apply.  */
4998 char deflate();
4999
5000 int main() {
5001 deflate()
5002 ; return 0; }
5003 EOF
5004 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5005   rm -rf conftest*
5006   eval "ac_cv_lib_$ac_lib_var=yes"
5007 else
5008   echo "configure: failed program was:" >&5
5009   cat conftest.$ac_ext >&5
5010   rm -rf conftest*
5011   eval "ac_cv_lib_$ac_lib_var=no"
5012 fi
5013 rm -f conftest*
5014 LIBS="$ac_save_LIBS"
5015
5016 fi
5017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019   ZLIBSPEC=-lz
5020 else
5021   echo "$ac_t""no" 1>&6
5022 ZLIBSPEC=-lzgcj
5023 fi
5024
5025    else
5026       ZLIBSPEC=-lzgcj
5027       ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
5028    fi
5029
5030    # On Solaris, and maybe other architectures, the Boehm collector
5031    # requires -ldl.
5032    if test "$GC" = boehm; then
5033       echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
5034 echo "configure:5035: checking for main in -ldl" >&5
5035 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
5036 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5037   echo $ac_n "(cached) $ac_c" 1>&6
5038 else
5039   ac_save_LIBS="$LIBS"
5040 LIBS="-ldl  $LIBS"
5041 cat > conftest.$ac_ext <<EOF
5042 #line 5043 "configure"
5043 #include "confdefs.h"
5044
5045 int main() {
5046 main()
5047 ; return 0; }
5048 EOF
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050   rm -rf conftest*
5051   eval "ac_cv_lib_$ac_lib_var=yes"
5052 else
5053   echo "configure: failed program was:" >&5
5054   cat conftest.$ac_ext >&5
5055   rm -rf conftest*
5056   eval "ac_cv_lib_$ac_lib_var=no"
5057 fi
5058 rm -f conftest*
5059 LIBS="$ac_save_LIBS"
5060
5061 fi
5062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5063   echo "$ac_t""yes" 1>&6
5064   SYSTEMSPEC="$SYSTEMSPEC -ldl"
5065 else
5066   echo "$ac_t""no" 1>&6
5067 fi
5068
5069    fi
5070
5071    if test -z "${with_multisubdir}"; then
5072       builddotdot=.
5073    else
5074
5075       builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5076
5077    fi
5078    if test -x "${builddotdot}/../../gcc/gcj"; then
5079       dir="`cd ${builddotdot}/../../gcc && pwd`"
5080       GCJ="$dir/gcj -B`pwd`/ -B$dir/"
5081    else
5082       CANADIAN=yes
5083       NULL_TARGET=yes
5084       GCJ="gcj -B`pwd`/"
5085    fi
5086 fi
5087
5088 # Create it, so that compile/link tests don't fail
5089 test -f libgcj.spec || touch libgcj.spec
5090
5091 # We must search the source tree for java.lang, since we still don't
5092 # have libgcj.jar nor java/lang/*.class
5093 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
5094 CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
5095
5096 # Since some classes depend on this one, we need its source available
5097 # before we can do any GCJ compilation test :-(
5098 if test ! -f gnu/classpath/Configuration.java; then
5099   test -d gnu || mkdir gnu
5100   test -d gnu/classpath || mkdir gnu/classpath
5101   sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
5102         < $srcdir/gnu/classpath/Configuration.java.in \
5103         > gnu/classpath/Configuration.java
5104   # We do not want to redirect the output of the grep below to /dev/null,
5105   # but we add /dev/null to the input list so that grep will print the
5106   # filename of Configuration.java in case it finds any matches.
5107   if grep @ gnu/classpath/Configuration.java /dev/null; then
5108     { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
5109   fi
5110 fi
5111
5112 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
5113 set dummy ${ac_tool_prefix}gcj; ac_word=$2
5114 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5115 echo "configure:5116: checking for $ac_word" >&5
5116 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119   if test -n "$GCJ"; then
5120   ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5121 else
5122   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5123   ac_dummy="$PATH"
5124   for ac_dir in $ac_dummy; do
5125     test -z "$ac_dir" && ac_dir=.
5126     if test -f $ac_dir/$ac_word; then
5127       ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
5128       break
5129     fi
5130   done
5131   IFS="$ac_save_ifs"
5132 fi
5133 fi
5134 GCJ="$ac_cv_prog_GCJ"
5135 if test -n "$GCJ"; then
5136   echo "$ac_t""$GCJ" 1>&6
5137 else
5138   echo "$ac_t""no" 1>&6
5139 fi
5140
5141
5142 if test -z "$ac_cv_prog_GCJ"; then
5143 if test -n "$ac_tool_prefix"; then
5144   # Extract the first word of "gcj", so it can be a program name with args.
5145 set dummy gcj; ac_word=$2
5146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5147 echo "configure:5148: checking for $ac_word" >&5
5148 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5149   echo $ac_n "(cached) $ac_c" 1>&6
5150 else
5151   if test -n "$GCJ"; then
5152   ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5153 else
5154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5155   ac_dummy="$PATH"
5156   for ac_dir in $ac_dummy; do
5157     test -z "$ac_dir" && ac_dir=.
5158     if test -f $ac_dir/$ac_word; then
5159       ac_cv_prog_GCJ="gcj"
5160       break
5161     fi
5162   done
5163   IFS="$ac_save_ifs"
5164   test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
5165 fi
5166 fi
5167 GCJ="$ac_cv_prog_GCJ"
5168 if test -n "$GCJ"; then
5169   echo "$ac_t""$GCJ" 1>&6
5170 else
5171   echo "$ac_t""no" 1>&6
5172 fi
5173
5174 else
5175   GCJ="no"
5176 fi
5177 fi
5178
5179   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5180   
5181
5182
5183 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5184 lt_save_CC="$CC"
5185 lt_save_CFLAGS="$CFLAGS"
5186 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5187 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5188 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5189 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5190 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5191 deplibs_check_method="$deplibs_check_method" \
5192 file_magic_cmd="$file_magic_cmd" \
5193 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5194 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5195 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
5196 CC="$lt_save_CC"
5197 CFLAGS="$lt_save_CFLAGS"
5198
5199 # Redirect the config.log output again, so that the ltconfig log is not
5200 # clobbered by the next message.
5201 exec 5>>./config.log
5202
5203
5204
5205
5206 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
5207
5208 echo $ac_n "checking size of void *""... $ac_c" 1>&6
5209 echo "configure:5210: checking size of void *" >&5
5210 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213   if test "$cross_compiling" = yes; then
5214     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5215 else
5216   cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219 #include <stdio.h>
5220 main()
5221 {
5222   FILE *f=fopen("conftestval", "w");
5223   if (!f) exit(1);
5224   fprintf(f, "%d\n", sizeof(void *));
5225   exit(0);
5226 }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5229 then
5230   ac_cv_sizeof_void_p=`cat conftestval`
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -fr conftest*
5235   ac_cv_sizeof_void_p=0
5236 fi
5237 rm -fr conftest*
5238 fi
5239
5240 fi
5241 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5242 cat >> confdefs.h <<EOF
5243 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5244 EOF
5245
5246
5247
5248 ZLIBS=
5249 ZDEPS=
5250 ZINCS=
5251 if test "x$ZLIBSPEC" = "x-lzgcj"; then
5252    # We include the path to the zlib build directory.
5253    # See Makefile.am to understand why.
5254    ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
5255    ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
5256    ZINCS='-I$(top_srcdir)/../zlib'
5257 else
5258    ZLIBS="$ZLIBSPEC"
5259 fi
5260
5261
5262
5263
5264
5265
5266
5267
5268 if test "$CANADIAN" = yes; then
5269   CANADIAN_TRUE=
5270   CANADIAN_FALSE='#'
5271 else
5272   CANADIAN_TRUE='#'
5273   CANADIAN_FALSE=
5274 fi
5275
5276
5277 if test "$NULL_TARGET" = yes; then
5278   NULL_TARGET_TRUE=
5279   NULL_TARGET_FALSE='#'
5280 else
5281   NULL_TARGET_TRUE='#'
5282   NULL_TARGET_FALSE=
5283 fi
5284
5285
5286 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5287   NATIVE_TRUE=
5288   NATIVE_FALSE='#'
5289 else
5290   NATIVE_TRUE='#'
5291   NATIVE_FALSE=
5292 fi
5293
5294
5295 if test -z "$with_cross_host"; then
5296   USE_LIBDIR_TRUE=
5297   USE_LIBDIR_FALSE='#'
5298 else
5299   USE_LIBDIR_TRUE='#'
5300   USE_LIBDIR_FALSE=
5301 fi
5302
5303
5304 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5305   NEEDS_DATA_START_TRUE=
5306   NEEDS_DATA_START_FALSE='#'
5307 else
5308   NEEDS_DATA_START_TRUE='#'
5309   NEEDS_DATA_START_FALSE=
5310 fi
5311
5312
5313 # Determine gcj version number.
5314
5315 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
5316
5317 cat >> confdefs.h <<EOF
5318 #define GCJVERSION "$gcjvers"
5319 EOF
5320
5321
5322
5323
5324
5325 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5326 echo "configure:5327: checking for g++ -ffloat-store bug" >&5
5327 save_CFLAGS="$CFLAGS"
5328 CFLAGS="-x c++ -O2 -ffloat-store"
5329 cat > conftest.$ac_ext <<EOF
5330 #line 5331 "configure"
5331 #include "confdefs.h"
5332 #include <math.h>
5333 int main() {
5334
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5338   rm -rf conftest*
5339   echo "$ac_t""no" 1>&6
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   cat >> confdefs.h <<\EOF
5345 #define __NO_MATH_INLINES 1
5346 EOF
5347
5348    echo "$ac_t""yes" 1>&6
5349 fi
5350 rm -f conftest*
5351 CFLAGS="$save_CFLAGS"
5352
5353 for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pwd.h sys/config.h inttypes.h stdint.h langinfo.h locale.h
5354 do
5355 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5356 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5357 echo "configure:5358: checking for $ac_hdr" >&5
5358 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5359   echo $ac_n "(cached) $ac_c" 1>&6
5360 else
5361   cat > conftest.$ac_ext <<EOF
5362 #line 5363 "configure"
5363 #include "confdefs.h"
5364 #include <$ac_hdr>
5365 EOF
5366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5367 { (eval echo configure:5368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5369 if test -z "$ac_err"; then
5370   rm -rf conftest*
5371   eval "ac_cv_header_$ac_safe=yes"
5372 else
5373   echo "$ac_err" >&5
5374   echo "configure: failed program was:" >&5
5375   cat conftest.$ac_ext >&5
5376   rm -rf conftest*
5377   eval "ac_cv_header_$ac_safe=no"
5378 fi
5379 rm -f conftest*
5380 fi
5381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5382   echo "$ac_t""yes" 1>&6
5383     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5384   cat >> confdefs.h <<EOF
5385 #define $ac_tr_hdr 1
5386 EOF
5387  
5388 else
5389   echo "$ac_t""no" 1>&6
5390 fi
5391 done
5392
5393 for ac_hdr in dirent.h
5394 do
5395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5397 echo "configure:5398: checking for $ac_hdr" >&5
5398 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5399   echo $ac_n "(cached) $ac_c" 1>&6
5400 else
5401   cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404 #include <$ac_hdr>
5405 EOF
5406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5407 { (eval echo configure:5408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5409 if test -z "$ac_err"; then
5410   rm -rf conftest*
5411   eval "ac_cv_header_$ac_safe=yes"
5412 else
5413   echo "$ac_err" >&5
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_header_$ac_safe=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5422   echo "$ac_t""yes" 1>&6
5423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5424   cat >> confdefs.h <<EOF
5425 #define $ac_tr_hdr 1
5426 EOF
5427  
5428 else
5429   echo "$ac_t""no" 1>&6
5430 fi
5431 done
5432
5433
5434 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5435 echo "configure:5436: checking for ANSI C header files" >&5
5436 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5437   echo $ac_n "(cached) $ac_c" 1>&6
5438 else
5439   cat > conftest.$ac_ext <<EOF
5440 #line 5441 "configure"
5441 #include "confdefs.h"
5442 #include <stdlib.h>
5443 #include <stdarg.h>
5444 #include <string.h>
5445 #include <float.h>
5446 EOF
5447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5448 { (eval echo configure:5449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5450 if test -z "$ac_err"; then
5451   rm -rf conftest*
5452   ac_cv_header_stdc=yes
5453 else
5454   echo "$ac_err" >&5
5455   echo "configure: failed program was:" >&5
5456   cat conftest.$ac_ext >&5
5457   rm -rf conftest*
5458   ac_cv_header_stdc=no
5459 fi
5460 rm -f conftest*
5461
5462 if test $ac_cv_header_stdc = yes; then
5463   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5464 cat > conftest.$ac_ext <<EOF
5465 #line 5466 "configure"
5466 #include "confdefs.h"
5467 #include <string.h>
5468 EOF
5469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5470   egrep "memchr" >/dev/null 2>&1; then
5471   :
5472 else
5473   rm -rf conftest*
5474   ac_cv_header_stdc=no
5475 fi
5476 rm -f conftest*
5477
5478 fi
5479
5480 if test $ac_cv_header_stdc = yes; then
5481   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 #include <stdlib.h>
5486 EOF
5487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5488   egrep "free" >/dev/null 2>&1; then
5489   :
5490 else
5491   rm -rf conftest*
5492   ac_cv_header_stdc=no
5493 fi
5494 rm -f conftest*
5495
5496 fi
5497
5498 if test $ac_cv_header_stdc = yes; then
5499   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5500 if test "$cross_compiling" = yes; then
5501   :
5502 else
5503   cat > conftest.$ac_ext <<EOF
5504 #line 5505 "configure"
5505 #include "confdefs.h"
5506 #include <ctype.h>
5507 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5508 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5509 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5510 int main () { int i; for (i = 0; i < 256; i++)
5511 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5512 exit (0); }
5513
5514 EOF
5515 if { (eval echo configure:5516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5516 then
5517   :
5518 else
5519   echo "configure: failed program was:" >&5
5520   cat conftest.$ac_ext >&5
5521   rm -fr conftest*
5522   ac_cv_header_stdc=no
5523 fi
5524 rm -fr conftest*
5525 fi
5526
5527 fi
5528 fi
5529
5530 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5531 if test $ac_cv_header_stdc = yes; then
5532   cat >> confdefs.h <<\EOF
5533 #define STDC_HEADERS 1
5534 EOF
5535
5536 fi
5537
5538 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5539 echo "configure:5540: checking for ssize_t" >&5
5540 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5541   echo $ac_n "(cached) $ac_c" 1>&6
5542 else
5543   cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546 #include <sys/types.h>
5547 #if STDC_HEADERS
5548 #include <stdlib.h>
5549 #include <stddef.h>
5550 #endif
5551 EOF
5552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5553   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5554   rm -rf conftest*
5555   ac_cv_type_ssize_t=yes
5556 else
5557   rm -rf conftest*
5558   ac_cv_type_ssize_t=no
5559 fi
5560 rm -f conftest*
5561
5562 fi
5563 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5564 if test $ac_cv_type_ssize_t = no; then
5565   cat >> confdefs.h <<\EOF
5566 #define ssize_t int
5567 EOF
5568
5569 fi
5570
5571
5572 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5573 echo "configure:5574: checking for in_addr_t" >&5
5574 cat > conftest.$ac_ext <<EOF
5575 #line 5576 "configure"
5576 #include "confdefs.h"
5577 #include <sys/types.h>
5578 #if STDC_HEADERS
5579 #include <stdlib.h>
5580 #include <stddef.h>
5581 #endif
5582 #if HAVE_NETINET_IN_H
5583 #include <netinet/in.h>
5584 #endif
5585 int main() {
5586 in_addr_t foo;
5587 ; return 0; }
5588 EOF
5589 if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5590   rm -rf conftest*
5591   cat >> confdefs.h <<\EOF
5592 #define HAVE_IN_ADDR_T 1
5593 EOF
5594
5595    echo "$ac_t""yes" 1>&6
5596 else
5597   echo "configure: failed program was:" >&5
5598   cat conftest.$ac_ext >&5
5599   rm -rf conftest*
5600   echo "$ac_t""no" 1>&6
5601 fi
5602 rm -f conftest*
5603
5604 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5605 echo "configure:5606: checking whether struct ip_mreq is in netinet/in.h" >&5
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 #include <netinet/in.h>
5610 int main() {
5611 struct ip_mreq mreq;
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5615   rm -rf conftest*
5616   cat >> confdefs.h <<\EOF
5617 #define HAVE_STRUCT_IP_MREQ 1
5618 EOF
5619
5620    echo "$ac_t""yes" 1>&6
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   echo "$ac_t""no" 1>&6
5626 fi
5627 rm -f conftest*
5628
5629 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
5630 echo "configure:5631: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
5631 cat > conftest.$ac_ext <<EOF
5632 #line 5633 "configure"
5633 #include "confdefs.h"
5634 #include <netinet/in.h>
5635 int main() {
5636 struct sockaddr_in6 addr6;
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5640   rm -rf conftest*
5641   cat >> confdefs.h <<\EOF
5642 #define HAVE_INET6 1
5643 EOF
5644
5645    echo "$ac_t""yes" 1>&6
5646 else
5647   echo "configure: failed program was:" >&5
5648   cat conftest.$ac_ext >&5
5649   rm -rf conftest*
5650   echo "$ac_t""no" 1>&6
5651 fi
5652 rm -f conftest*
5653
5654 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
5655 echo "configure:5656: checking for socklen_t in sys/socket.h" >&5
5656 cat > conftest.$ac_ext <<EOF
5657 #line 5658 "configure"
5658 #include "confdefs.h"
5659 #include <sys/types.h>
5660 #include <sys/socket.h>
5661 int main() {
5662 socklen_t x = 5;
5663 ; return 0; }
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5666   rm -rf conftest*
5667   cat >> confdefs.h <<\EOF
5668 #define HAVE_SOCKLEN_T 1
5669 EOF
5670
5671    echo "$ac_t""yes" 1>&6
5672 else
5673   echo "configure: failed program was:" >&5
5674   cat conftest.$ac_ext >&5
5675   rm -rf conftest*
5676   echo "$ac_t""no" 1>&6
5677 fi
5678 rm -f conftest*
5679
5680 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
5681 echo "configure:5682: checking for tm_gmtoff in struct tm" >&5
5682 cat > conftest.$ac_ext <<EOF
5683 #line 5684 "configure"
5684 #include "confdefs.h"
5685 #include <time.h>
5686 int main() {
5687 struct tm tim; tim.tm_gmtoff = 0;
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5691   rm -rf conftest*
5692   cat >> confdefs.h <<\EOF
5693 #define STRUCT_TM_HAS_GMTOFF 1
5694 EOF
5695
5696    echo "$ac_t""yes" 1>&6
5697 else
5698   echo "configure: failed program was:" >&5
5699   cat conftest.$ac_ext >&5
5700   rm -rf conftest*
5701   echo "$ac_t""no" 1>&6
5702    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
5703 echo "configure:5704: checking for global timezone variable" >&5
5704             cat > conftest.$ac_ext <<EOF
5705 #line 5706 "configure"
5706 #include "confdefs.h"
5707 #include <time.h>
5708 int main() {
5709 long z2 = timezone;
5710 ; return 0; }
5711 EOF
5712 if { (eval echo configure:5713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5713   rm -rf conftest*
5714   cat >> confdefs.h <<\EOF
5715 #define HAVE_TIMEZONE 1
5716 EOF
5717
5718       echo "$ac_t""yes" 1>&6
5719 else
5720   echo "configure: failed program was:" >&5
5721   cat conftest.$ac_ext >&5
5722   rm -rf conftest*
5723   echo "$ac_t""no" 1>&6
5724 fi
5725 rm -f conftest*
5726 fi
5727 rm -f conftest*
5728
5729 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5730 # for constant arguments.  Useless!
5731 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5732 echo "configure:5733: checking for working alloca.h" >&5
5733 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 #include <alloca.h>
5740 int main() {
5741 char *p = alloca(2 * sizeof(int));
5742 ; return 0; }
5743 EOF
5744 if { (eval echo configure:5745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5745   rm -rf conftest*
5746   ac_cv_header_alloca_h=yes
5747 else
5748   echo "configure: failed program was:" >&5
5749   cat conftest.$ac_ext >&5
5750   rm -rf conftest*
5751   ac_cv_header_alloca_h=no
5752 fi
5753 rm -f conftest*
5754 fi
5755
5756 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5757 if test $ac_cv_header_alloca_h = yes; then
5758   cat >> confdefs.h <<\EOF
5759 #define HAVE_ALLOCA_H 1
5760 EOF
5761
5762 fi
5763
5764 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5765 echo "configure:5766: checking for alloca" >&5
5766 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5767   echo $ac_n "(cached) $ac_c" 1>&6
5768 else
5769   cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772
5773 #ifdef __GNUC__
5774 # define alloca __builtin_alloca
5775 #else
5776 # ifdef _MSC_VER
5777 #  include <malloc.h>
5778 #  define alloca _alloca
5779 # else
5780 #  if HAVE_ALLOCA_H
5781 #   include <alloca.h>
5782 #  else
5783 #   ifdef _AIX
5784  #pragma alloca
5785 #   else
5786 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5787 char *alloca ();
5788 #    endif
5789 #   endif
5790 #  endif
5791 # endif
5792 #endif
5793
5794 int main() {
5795 char *p = (char *) alloca(1);
5796 ; return 0; }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799   rm -rf conftest*
5800   ac_cv_func_alloca_works=yes
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   ac_cv_func_alloca_works=no
5806 fi
5807 rm -f conftest*
5808 fi
5809
5810 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5811 if test $ac_cv_func_alloca_works = yes; then
5812   cat >> confdefs.h <<\EOF
5813 #define HAVE_ALLOCA 1
5814 EOF
5815
5816 fi
5817
5818 if test $ac_cv_func_alloca_works = no; then
5819   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5820   # that cause trouble.  Some versions do not even contain alloca or
5821   # contain a buggy version.  If you still want to use their alloca,
5822   # use ar to extract alloca.o from them instead of compiling alloca.c.
5823   ALLOCA=alloca.${ac_objext}
5824   cat >> confdefs.h <<\EOF
5825 #define C_ALLOCA 1
5826 EOF
5827
5828
5829 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5830 echo "configure:5831: checking whether alloca needs Cray hooks" >&5
5831 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5832   echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5834   cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837 #if defined(CRAY) && ! defined(CRAY2)
5838 webecray
5839 #else
5840 wenotbecray
5841 #endif
5842
5843 EOF
5844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5845   egrep "webecray" >/dev/null 2>&1; then
5846   rm -rf conftest*
5847   ac_cv_os_cray=yes
5848 else
5849   rm -rf conftest*
5850   ac_cv_os_cray=no
5851 fi
5852 rm -f conftest*
5853
5854 fi
5855
5856 echo "$ac_t""$ac_cv_os_cray" 1>&6
5857 if test $ac_cv_os_cray = yes; then
5858 for ac_func in _getb67 GETB67 getb67; do
5859   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5860 echo "configure:5861: checking for $ac_func" >&5
5861 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5862   echo $ac_n "(cached) $ac_c" 1>&6
5863 else
5864   cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 /* System header to define __stub macros and hopefully few prototypes,
5868     which can conflict with char $ac_func(); below.  */
5869 #include <assert.h>
5870 /* Override any gcc2 internal prototype to avoid an error.  */
5871 /* We use char because int might match the return type of a gcc2
5872     builtin and then its argument prototype would still apply.  */
5873 char $ac_func();
5874
5875 int main() {
5876
5877 /* The GNU C library defines this for functions which it implements
5878     to always fail with ENOSYS.  Some functions are actually named
5879     something starting with __ and the normal name is an alias.  */
5880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5881 choke me
5882 #else
5883 $ac_func();
5884 #endif
5885
5886 ; return 0; }
5887 EOF
5888 if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5889   rm -rf conftest*
5890   eval "ac_cv_func_$ac_func=yes"
5891 else
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -rf conftest*
5895   eval "ac_cv_func_$ac_func=no"
5896 fi
5897 rm -f conftest*
5898 fi
5899
5900 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5901   echo "$ac_t""yes" 1>&6
5902   cat >> confdefs.h <<EOF
5903 #define CRAY_STACKSEG_END $ac_func
5904 EOF
5905
5906   break
5907 else
5908   echo "$ac_t""no" 1>&6
5909 fi
5910
5911 done
5912 fi
5913
5914 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5915 echo "configure:5916: checking stack direction for C alloca" >&5
5916 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5917   echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919   if test "$cross_compiling" = yes; then
5920   ac_cv_c_stack_direction=0
5921 else
5922   cat > conftest.$ac_ext <<EOF
5923 #line 5924 "configure"
5924 #include "confdefs.h"
5925 find_stack_direction ()
5926 {
5927   static char *addr = 0;
5928   auto char dummy;
5929   if (addr == 0)
5930     {
5931       addr = &dummy;
5932       return find_stack_direction ();
5933     }
5934   else
5935     return (&dummy > addr) ? 1 : -1;
5936 }
5937 main ()
5938 {
5939   exit (find_stack_direction() < 0);
5940 }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5943 then
5944   ac_cv_c_stack_direction=1
5945 else
5946   echo "configure: failed program was:" >&5
5947   cat conftest.$ac_ext >&5
5948   rm -fr conftest*
5949   ac_cv_c_stack_direction=-1
5950 fi
5951 rm -fr conftest*
5952 fi
5953
5954 fi
5955
5956 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5957 cat >> confdefs.h <<EOF
5958 #define STACK_DIRECTION $ac_cv_c_stack_direction
5959 EOF
5960
5961 fi
5962
5963
5964 for ac_prog in perl
5965 do
5966 # Extract the first word of "$ac_prog", so it can be a program name with args.
5967 set dummy $ac_prog; ac_word=$2
5968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5969 echo "configure:5970: checking for $ac_word" >&5
5970 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
5971   echo $ac_n "(cached) $ac_c" 1>&6
5972 else
5973   if test -n "$PERL"; then
5974   ac_cv_prog_PERL="$PERL" # Let the user override the test.
5975 else
5976   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5977   ac_dummy="$PATH"
5978   for ac_dir in $ac_dummy; do
5979     test -z "$ac_dir" && ac_dir=.
5980     if test -f $ac_dir/$ac_word; then
5981       ac_cv_prog_PERL="$ac_prog"
5982       break
5983     fi
5984   done
5985   IFS="$ac_save_ifs"
5986 fi
5987 fi
5988 PERL="$ac_cv_prog_PERL"
5989 if test -n "$PERL"; then
5990   echo "$ac_t""$PERL" 1>&6
5991 else
5992   echo "$ac_t""no" 1>&6
5993 fi
5994
5995 test -n "$PERL" && break
5996 done
5997 test -n "$PERL" || PERL="false"
5998
5999
6000 SYSDEP_SOURCES=
6001
6002 case "${host}" in
6003  i?86-*-linux*)
6004     SIGNAL_HANDLER=include/i386-signal.h
6005     ;;
6006  sparc-sun-solaris*)
6007     SIGNAL_HANDLER=include/sparc-signal.h
6008     ;;
6009 # ia64-*)
6010 #    SYSDEP_SOURCES=sysdep/ia64.c
6011 #    test -d sysdep || mkdir sysdep
6012 #    ;;
6013  powerpc-*-linux*)
6014     SIGNAL_HANDLER=include/dwarf2-signal.h
6015     ;;
6016  alpha*-*-linux*)
6017     SIGNAL_HANDLER=include/dwarf2-signal.h
6018     ;;
6019  *)
6020     SIGNAL_HANDLER=include/default-signal.h
6021     ;;
6022 esac
6023
6024 # If we're using sjlj exceptions, forget what we just learned.
6025 if test "$enable_sjlj_exceptions" = yes; then
6026    SIGNAL_HANDLER=include/default-signal.h
6027 fi
6028
6029
6030
6031
6032
6033 if test "${multilib}" = "yes"; then
6034   multilib_arg="--enable-multilib"
6035 else
6036   multilib_arg=
6037 fi
6038
6039 # If we find X, set shell vars x_includes and x_libraries to the
6040 # paths, otherwise set no_x=yes.
6041 # Uses ac_ vars as temps to allow command line to override cache and checks.
6042 # --without-x overrides everything else, but does not touch the cache.
6043 echo $ac_n "checking for X""... $ac_c" 1>&6
6044 echo "configure:6045: checking for X" >&5
6045
6046 # Check whether --with-x or --without-x was given.
6047 if test "${with_x+set}" = set; then
6048   withval="$with_x"
6049   :
6050 fi
6051
6052 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6053 if test "x$with_x" = xno; then
6054   # The user explicitly disabled X.
6055   have_x=disabled
6056 else
6057   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6058     # Both variables are already set.
6059     have_x=yes
6060   else
6061 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6062   echo $ac_n "(cached) $ac_c" 1>&6
6063 else
6064   # One or both of the vars are not set, and there is no cached value.
6065 ac_x_includes=NO ac_x_libraries=NO
6066 rm -fr conftestdir
6067 if mkdir conftestdir; then
6068   cd conftestdir
6069   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6070   cat > Imakefile <<'EOF'
6071 acfindx:
6072         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6073 EOF
6074   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6075     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6076     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6077     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6078     for ac_extension in a so sl; do
6079       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6080         test -f $ac_im_libdir/libX11.$ac_extension; then
6081         ac_im_usrlibdir=$ac_im_libdir; break
6082       fi
6083     done
6084     # Screen out bogus values from the imake configuration.  They are
6085     # bogus both because they are the default anyway, and because
6086     # using them would break gcc on systems where it needs fixed includes.
6087     case "$ac_im_incroot" in
6088         /usr/include) ;;
6089         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6090     esac
6091     case "$ac_im_usrlibdir" in
6092         /usr/lib | /lib) ;;
6093         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6094     esac
6095   fi
6096   cd ..
6097   rm -fr conftestdir
6098 fi
6099
6100 if test "$ac_x_includes" = NO; then
6101   # Guess where to find include files, by looking for this one X11 .h file.
6102   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6103
6104   # First, try using that file with no special directory specified.
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 #include <$x_direct_test_include>
6109 EOF
6110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6111 { (eval echo configure:6112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6113 if test -z "$ac_err"; then
6114   rm -rf conftest*
6115   # We can compile using X headers with no special include directory.
6116 ac_x_includes=
6117 else
6118   echo "$ac_err" >&5
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   # Look for the header file in a standard set of common directories.
6123 # Check X11 before X11Rn because it is often a symlink to the current release.
6124   for ac_dir in               \
6125     /usr/X11/include          \
6126     /usr/X11R6/include        \
6127     /usr/X11R5/include        \
6128     /usr/X11R4/include        \
6129                               \
6130     /usr/include/X11          \
6131     /usr/include/X11R6        \
6132     /usr/include/X11R5        \
6133     /usr/include/X11R4        \
6134                               \
6135     /usr/local/X11/include    \
6136     /usr/local/X11R6/include  \
6137     /usr/local/X11R5/include  \
6138     /usr/local/X11R4/include  \
6139                               \
6140     /usr/local/include/X11    \
6141     /usr/local/include/X11R6  \
6142     /usr/local/include/X11R5  \
6143     /usr/local/include/X11R4  \
6144                               \
6145     /usr/X386/include         \
6146     /usr/x386/include         \
6147     /usr/XFree86/include/X11  \
6148                               \
6149     /usr/include              \
6150     /usr/local/include        \
6151     /usr/unsupported/include  \
6152     /usr/athena/include       \
6153     /usr/local/x11r5/include  \
6154     /usr/lpp/Xamples/include  \
6155                               \
6156     /usr/openwin/include      \
6157     /usr/openwin/share/include \
6158     ; \
6159   do
6160     if test -r "$ac_dir/$x_direct_test_include"; then
6161       ac_x_includes=$ac_dir
6162       break
6163     fi
6164   done
6165 fi
6166 rm -f conftest*
6167 fi # $ac_x_includes = NO
6168
6169 if test "$ac_x_libraries" = NO; then
6170   # Check for the libraries.
6171
6172   test -z "$x_direct_test_library" && x_direct_test_library=Xt
6173   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6174
6175   # See if we find them without any special options.
6176   # Don't add to $LIBS permanently.
6177   ac_save_LIBS="$LIBS"
6178   LIBS="-l$x_direct_test_library $LIBS"
6179 cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182
6183 int main() {
6184 ${x_direct_test_function}()
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   LIBS="$ac_save_LIBS"
6190 # We can link X programs with no special library path.
6191 ac_x_libraries=
6192 else
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   LIBS="$ac_save_LIBS"
6197 # First see if replacing the include by lib works.
6198 # Check X11 before X11Rn because it is often a symlink to the current release.
6199 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6200     /usr/X11/lib          \
6201     /usr/X11R6/lib        \
6202     /usr/X11R5/lib        \
6203     /usr/X11R4/lib        \
6204                           \
6205     /usr/lib/X11          \
6206     /usr/lib/X11R6        \
6207     /usr/lib/X11R5        \
6208     /usr/lib/X11R4        \
6209                           \
6210     /usr/local/X11/lib    \
6211     /usr/local/X11R6/lib  \
6212     /usr/local/X11R5/lib  \
6213     /usr/local/X11R4/lib  \
6214                           \
6215     /usr/local/lib/X11    \
6216     /usr/local/lib/X11R6  \
6217     /usr/local/lib/X11R5  \
6218     /usr/local/lib/X11R4  \
6219                           \
6220     /usr/X386/lib         \
6221     /usr/x386/lib         \
6222     /usr/XFree86/lib/X11  \
6223                           \
6224     /usr/lib              \
6225     /usr/local/lib        \
6226     /usr/unsupported/lib  \
6227     /usr/athena/lib       \
6228     /usr/local/x11r5/lib  \
6229     /usr/lpp/Xamples/lib  \
6230     /lib/usr/lib/X11      \
6231                           \
6232     /usr/openwin/lib      \
6233     /usr/openwin/share/lib \
6234     ; \
6235 do
6236   for ac_extension in a so sl; do
6237     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6238       ac_x_libraries=$ac_dir
6239       break 2
6240     fi
6241   done
6242 done
6243 fi
6244 rm -f conftest*
6245 fi # $ac_x_libraries = NO
6246
6247 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6248   # Didn't find X anywhere.  Cache the known absence of X.
6249   ac_cv_have_x="have_x=no"
6250 else
6251   # Record where we found X for the cache.
6252   ac_cv_have_x="have_x=yes \
6253                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6254 fi
6255 fi
6256   fi
6257   eval "$ac_cv_have_x"
6258 fi # $with_x != no
6259
6260 if test "$have_x" != yes; then
6261   echo "$ac_t""$have_x" 1>&6
6262   no_x=yes
6263 else
6264   # If each of the values was on the command line, it overrides each guess.
6265   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6266   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6267   # Update the cache value to reflect the command line values.
6268   ac_cv_have_x="have_x=yes \
6269                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6270   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6271 fi
6272
6273 if test "$no_x" = yes; then
6274   # Not all programs may use this symbol, but it does not hurt to define it.
6275   cat >> confdefs.h <<\EOF
6276 #define X_DISPLAY_MISSING 1
6277 EOF
6278
6279   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6280 else
6281   if test -n "$x_includes"; then
6282     X_CFLAGS="$X_CFLAGS -I$x_includes"
6283   fi
6284
6285   # It would also be nice to do this for all -L options, not just this one.
6286   if test -n "$x_libraries"; then
6287     X_LIBS="$X_LIBS -L$x_libraries"
6288     # For Solaris; some versions of Sun CC require a space after -R and
6289     # others require no space.  Words are not sufficient . . . .
6290     case "`(uname -sr) 2>/dev/null`" in
6291     "SunOS 5"*)
6292       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6293 echo "configure:6294: checking whether -R must be followed by a space" >&5
6294       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6295       cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298
6299 int main() {
6300
6301 ; return 0; }
6302 EOF
6303 if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6304   rm -rf conftest*
6305   ac_R_nospace=yes
6306 else
6307   echo "configure: failed program was:" >&5
6308   cat conftest.$ac_ext >&5
6309   rm -rf conftest*
6310   ac_R_nospace=no
6311 fi
6312 rm -f conftest*
6313       if test $ac_R_nospace = yes; then
6314         echo "$ac_t""no" 1>&6
6315         X_LIBS="$X_LIBS -R$x_libraries"
6316       else
6317         LIBS="$ac_xsave_LIBS -R $x_libraries"
6318         cat > conftest.$ac_ext <<EOF
6319 #line 6320 "configure"
6320 #include "confdefs.h"
6321
6322 int main() {
6323
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6327   rm -rf conftest*
6328   ac_R_space=yes
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   ac_R_space=no
6334 fi
6335 rm -f conftest*
6336         if test $ac_R_space = yes; then
6337           echo "$ac_t""yes" 1>&6
6338           X_LIBS="$X_LIBS -R $x_libraries"
6339         else
6340           echo "$ac_t""neither works" 1>&6
6341         fi
6342       fi
6343       LIBS="$ac_xsave_LIBS"
6344     esac
6345   fi
6346
6347   # Check for system-dependent libraries X programs must link with.
6348   # Do this before checking for the system-independent R6 libraries
6349   # (-lICE), since we may need -lsocket or whatever for X linking.
6350
6351   if test "$ISC" = yes; then
6352     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6353   else
6354     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6355     # libraries were built with DECnet support.  And karl@cs.umb.edu says
6356     # the Alpha needs dnet_stub (dnet does not exist).
6357     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6358 echo "configure:6359: checking for dnet_ntoa in -ldnet" >&5
6359 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6361   echo $ac_n "(cached) $ac_c" 1>&6
6362 else
6363   ac_save_LIBS="$LIBS"
6364 LIBS="-ldnet  $LIBS"
6365 cat > conftest.$ac_ext <<EOF
6366 #line 6367 "configure"
6367 #include "confdefs.h"
6368 /* Override any gcc2 internal prototype to avoid an error.  */
6369 /* We use char because int might match the return type of a gcc2
6370     builtin and then its argument prototype would still apply.  */
6371 char dnet_ntoa();
6372
6373 int main() {
6374 dnet_ntoa()
6375 ; return 0; }
6376 EOF
6377 if { (eval echo configure:6378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6378   rm -rf conftest*
6379   eval "ac_cv_lib_$ac_lib_var=yes"
6380 else
6381   echo "configure: failed program was:" >&5
6382   cat conftest.$ac_ext >&5
6383   rm -rf conftest*
6384   eval "ac_cv_lib_$ac_lib_var=no"
6385 fi
6386 rm -f conftest*
6387 LIBS="$ac_save_LIBS"
6388
6389 fi
6390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6391   echo "$ac_t""yes" 1>&6
6392   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6393 else
6394   echo "$ac_t""no" 1>&6
6395 fi
6396
6397     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6398       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6399 echo "configure:6400: checking for dnet_ntoa in -ldnet_stub" >&5
6400 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6401 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6402   echo $ac_n "(cached) $ac_c" 1>&6
6403 else
6404   ac_save_LIBS="$LIBS"
6405 LIBS="-ldnet_stub  $LIBS"
6406 cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 /* We use char because int might match the return type of a gcc2
6411     builtin and then its argument prototype would still apply.  */
6412 char dnet_ntoa();
6413
6414 int main() {
6415 dnet_ntoa()
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=no"
6426 fi
6427 rm -f conftest*
6428 LIBS="$ac_save_LIBS"
6429
6430 fi
6431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6432   echo "$ac_t""yes" 1>&6
6433   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6434 else
6435   echo "$ac_t""no" 1>&6
6436 fi
6437
6438     fi
6439
6440     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6441     # to get the SysV transport functions.
6442     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6443     # needs -lnsl.
6444     # The nsl library prevents programs from opening the X display
6445     # on Irix 5.2, according to dickey@clark.net.
6446     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6447 echo "configure:6448: checking for gethostbyname" >&5
6448 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6449   echo $ac_n "(cached) $ac_c" 1>&6
6450 else
6451   cat > conftest.$ac_ext <<EOF
6452 #line 6453 "configure"
6453 #include "confdefs.h"
6454 /* System header to define __stub macros and hopefully few prototypes,
6455     which can conflict with char gethostbyname(); below.  */
6456 #include <assert.h>
6457 /* Override any gcc2 internal prototype to avoid an error.  */
6458 /* We use char because int might match the return type of a gcc2
6459     builtin and then its argument prototype would still apply.  */
6460 char gethostbyname();
6461
6462 int main() {
6463
6464 /* The GNU C library defines this for functions which it implements
6465     to always fail with ENOSYS.  Some functions are actually named
6466     something starting with __ and the normal name is an alias.  */
6467 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6468 choke me
6469 #else
6470 gethostbyname();
6471 #endif
6472
6473 ; return 0; }
6474 EOF
6475 if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6476   rm -rf conftest*
6477   eval "ac_cv_func_gethostbyname=yes"
6478 else
6479   echo "configure: failed program was:" >&5
6480   cat conftest.$ac_ext >&5
6481   rm -rf conftest*
6482   eval "ac_cv_func_gethostbyname=no"
6483 fi
6484 rm -f conftest*
6485 fi
6486
6487 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6488   echo "$ac_t""yes" 1>&6
6489   :
6490 else
6491   echo "$ac_t""no" 1>&6
6492 fi
6493
6494     if test $ac_cv_func_gethostbyname = no; then
6495       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6496 echo "configure:6497: checking for gethostbyname in -lnsl" >&5
6497 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6499   echo $ac_n "(cached) $ac_c" 1>&6
6500 else
6501   ac_save_LIBS="$LIBS"
6502 LIBS="-lnsl  $LIBS"
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 /* Override any gcc2 internal prototype to avoid an error.  */
6507 /* We use char because int might match the return type of a gcc2
6508     builtin and then its argument prototype would still apply.  */
6509 char gethostbyname();
6510
6511 int main() {
6512 gethostbyname()
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=yes"
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -rf conftest*
6522   eval "ac_cv_lib_$ac_lib_var=no"
6523 fi
6524 rm -f conftest*
6525 LIBS="$ac_save_LIBS"
6526
6527 fi
6528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6529   echo "$ac_t""yes" 1>&6
6530   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6531 else
6532   echo "$ac_t""no" 1>&6
6533 fi
6534
6535     fi
6536
6537     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6538     # socket/setsockopt and other routines are undefined under SCO ODT
6539     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6540     # on later versions), says simon@lia.di.epfl.ch: it contains
6541     # gethostby* variants that don't use the nameserver (or something).
6542     # -lsocket must be given before -lnsl if both are needed.
6543     # We assume that if connect needs -lnsl, so does gethostbyname.
6544     echo $ac_n "checking for connect""... $ac_c" 1>&6
6545 echo "configure:6546: checking for connect" >&5
6546 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6547   echo $ac_n "(cached) $ac_c" 1>&6
6548 else
6549   cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 /* System header to define __stub macros and hopefully few prototypes,
6553     which can conflict with char connect(); below.  */
6554 #include <assert.h>
6555 /* Override any gcc2 internal prototype to avoid an error.  */
6556 /* We use char because int might match the return type of a gcc2
6557     builtin and then its argument prototype would still apply.  */
6558 char connect();
6559
6560 int main() {
6561
6562 /* The GNU C library defines this for functions which it implements
6563     to always fail with ENOSYS.  Some functions are actually named
6564     something starting with __ and the normal name is an alias.  */
6565 #if defined (__stub_connect) || defined (__stub___connect)
6566 choke me
6567 #else
6568 connect();
6569 #endif
6570
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574   rm -rf conftest*
6575   eval "ac_cv_func_connect=yes"
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   eval "ac_cv_func_connect=no"
6581 fi
6582 rm -f conftest*
6583 fi
6584
6585 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6586   echo "$ac_t""yes" 1>&6
6587   :
6588 else
6589   echo "$ac_t""no" 1>&6
6590 fi
6591
6592     if test $ac_cv_func_connect = no; then
6593       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6594 echo "configure:6595: checking for connect in -lsocket" >&5
6595 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6596 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   ac_save_LIBS="$LIBS"
6600 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6601 cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char connect();
6608
6609 int main() {
6610 connect()
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_lib_$ac_lib_var=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=no"
6621 fi
6622 rm -f conftest*
6623 LIBS="$ac_save_LIBS"
6624
6625 fi
6626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6629 else
6630   echo "$ac_t""no" 1>&6
6631 fi
6632
6633     fi
6634
6635     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6636     echo $ac_n "checking for remove""... $ac_c" 1>&6
6637 echo "configure:6638: checking for remove" >&5
6638 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6639   echo $ac_n "(cached) $ac_c" 1>&6
6640 else
6641   cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644 /* System header to define __stub macros and hopefully few prototypes,
6645     which can conflict with char remove(); below.  */
6646 #include <assert.h>
6647 /* Override any gcc2 internal prototype to avoid an error.  */
6648 /* We use char because int might match the return type of a gcc2
6649     builtin and then its argument prototype would still apply.  */
6650 char remove();
6651
6652 int main() {
6653
6654 /* The GNU C library defines this for functions which it implements
6655     to always fail with ENOSYS.  Some functions are actually named
6656     something starting with __ and the normal name is an alias.  */
6657 #if defined (__stub_remove) || defined (__stub___remove)
6658 choke me
6659 #else
6660 remove();
6661 #endif
6662
6663 ; return 0; }
6664 EOF
6665 if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6666   rm -rf conftest*
6667   eval "ac_cv_func_remove=yes"
6668 else
6669   echo "configure: failed program was:" >&5
6670   cat conftest.$ac_ext >&5
6671   rm -rf conftest*
6672   eval "ac_cv_func_remove=no"
6673 fi
6674 rm -f conftest*
6675 fi
6676
6677 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679   :
6680 else
6681   echo "$ac_t""no" 1>&6
6682 fi
6683
6684     if test $ac_cv_func_remove = no; then
6685       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6686 echo "configure:6687: checking for remove in -lposix" >&5
6687 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6689   echo $ac_n "(cached) $ac_c" 1>&6
6690 else
6691   ac_save_LIBS="$LIBS"
6692 LIBS="-lposix  $LIBS"
6693 cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char remove();
6700
6701 int main() {
6702 remove()
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_lib_$ac_lib_var=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_lib_$ac_lib_var=no"
6713 fi
6714 rm -f conftest*
6715 LIBS="$ac_save_LIBS"
6716
6717 fi
6718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6719   echo "$ac_t""yes" 1>&6
6720   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6721 else
6722   echo "$ac_t""no" 1>&6
6723 fi
6724
6725     fi
6726
6727     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6728     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6729 echo "configure:6730: checking for shmat" >&5
6730 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6731   echo $ac_n "(cached) $ac_c" 1>&6
6732 else
6733   cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736 /* System header to define __stub macros and hopefully few prototypes,
6737     which can conflict with char shmat(); below.  */
6738 #include <assert.h>
6739 /* Override any gcc2 internal prototype to avoid an error.  */
6740 /* We use char because int might match the return type of a gcc2
6741     builtin and then its argument prototype would still apply.  */
6742 char shmat();
6743
6744 int main() {
6745
6746 /* The GNU C library defines this for functions which it implements
6747     to always fail with ENOSYS.  Some functions are actually named
6748     something starting with __ and the normal name is an alias.  */
6749 #if defined (__stub_shmat) || defined (__stub___shmat)
6750 choke me
6751 #else
6752 shmat();
6753 #endif
6754
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6758   rm -rf conftest*
6759   eval "ac_cv_func_shmat=yes"
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   eval "ac_cv_func_shmat=no"
6765 fi
6766 rm -f conftest*
6767 fi
6768
6769 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6770   echo "$ac_t""yes" 1>&6
6771   :
6772 else
6773   echo "$ac_t""no" 1>&6
6774 fi
6775
6776     if test $ac_cv_func_shmat = no; then
6777       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6778 echo "configure:6779: checking for shmat in -lipc" >&5
6779 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6781   echo $ac_n "(cached) $ac_c" 1>&6
6782 else
6783   ac_save_LIBS="$LIBS"
6784 LIBS="-lipc  $LIBS"
6785 cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* Override any gcc2 internal prototype to avoid an error.  */
6789 /* We use char because int might match the return type of a gcc2
6790     builtin and then its argument prototype would still apply.  */
6791 char shmat();
6792
6793 int main() {
6794 shmat()
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798   rm -rf conftest*
6799   eval "ac_cv_lib_$ac_lib_var=yes"
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   eval "ac_cv_lib_$ac_lib_var=no"
6805 fi
6806 rm -f conftest*
6807 LIBS="$ac_save_LIBS"
6808
6809 fi
6810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6811   echo "$ac_t""yes" 1>&6
6812   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6813 else
6814   echo "$ac_t""no" 1>&6
6815 fi
6816
6817     fi
6818   fi
6819
6820   # Check for libraries that X11R6 Xt/Xaw programs need.
6821   ac_save_LDFLAGS="$LDFLAGS"
6822   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6823   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6824   # check for ICE first), but we must link in the order -lSM -lICE or
6825   # we get undefined symbols.  So assume we have SM if we have ICE.
6826   # These have to be linked with before -lX11, unlike the other
6827   # libraries we check for below, so use a different variable.
6828   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6829   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
6830 echo "configure:6831: checking for IceConnectionNumber in -lICE" >&5
6831 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6832 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6833   echo $ac_n "(cached) $ac_c" 1>&6
6834 else
6835   ac_save_LIBS="$LIBS"
6836 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6837 cat > conftest.$ac_ext <<EOF
6838 #line 6839 "configure"
6839 #include "confdefs.h"
6840 /* Override any gcc2 internal prototype to avoid an error.  */
6841 /* We use char because int might match the return type of a gcc2
6842     builtin and then its argument prototype would still apply.  */
6843 char IceConnectionNumber();
6844
6845 int main() {
6846 IceConnectionNumber()
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   eval "ac_cv_lib_$ac_lib_var=yes"
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   eval "ac_cv_lib_$ac_lib_var=no"
6857 fi
6858 rm -f conftest*
6859 LIBS="$ac_save_LIBS"
6860
6861 fi
6862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6863   echo "$ac_t""yes" 1>&6
6864   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6865 else
6866   echo "$ac_t""no" 1>&6
6867 fi
6868
6869   LDFLAGS="$ac_save_LDFLAGS"
6870
6871 fi
6872
6873
6874 # Check whether --enable-java-awt or --disable-java-awt was given.
6875 if test "${enable_java_awt+set}" = set; then
6876   enableval="$enable_java_awt"
6877   :
6878 fi
6879
6880
6881 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
6882 use_xlib_awt=""
6883 use_gtk_awt=""
6884
6885 for peer in $peerlibs ; do
6886   case $peer in
6887     xlib)
6888       if test "$no_x" = yes; then
6889         echo "*** xlib peers requested but no X library available" 1>&2
6890         exit 1
6891       else
6892         use_xlib_awt="yes"
6893       fi
6894       ;;
6895     gtk)
6896       # Nothing, yet...
6897       ;;
6898     *)
6899       echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
6900       exit 1
6901   esac
6902 done
6903
6904
6905
6906 if test "$use_xlib_awt" = yes; then
6907   XLIB_AWT_TRUE=
6908   XLIB_AWT_FALSE='#'
6909 else
6910   XLIB_AWT_TRUE='#'
6911   XLIB_AWT_FALSE=
6912 fi
6913
6914
6915 if test "$use_gtk_awt" = yes; then
6916   GTK_AWT_TRUE=
6917   GTK_AWT_FALSE='#'
6918 else
6919   GTK_AWT_TRUE='#'
6920   GTK_AWT_FALSE=
6921 fi
6922
6923
6924 here=`pwd`
6925
6926
6927 # We get this from the environment.
6928
6929
6930 trap '' 1 2 15
6931 cat > confcache <<\EOF
6932 # This file is a shell script that caches the results of configure
6933 # tests run on this system so they can be shared between configure
6934 # scripts and configure runs.  It is not useful on other systems.
6935 # If it contains results you don't want to keep, you may remove or edit it.
6936 #
6937 # By default, configure uses ./config.cache as the cache file,
6938 # creating it if it does not exist already.  You can give configure
6939 # the --cache-file=FILE option to use a different cache file; that is
6940 # what configure does when it calls configure scripts in
6941 # subdirectories, so they share the cache.
6942 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6943 # config.status only pays attention to the cache file if you give it the
6944 # --recheck option to rerun configure.
6945 #
6946 EOF
6947 # The following way of writing the cache mishandles newlines in values,
6948 # but we know of no workaround that is simple, portable, and efficient.
6949 # So, don't put newlines in cache variables' values.
6950 # Ultrix sh set writes to stderr and can't be redirected directly,
6951 # and sets the high bit in the cache file unless we assign to the vars.
6952 (set) 2>&1 |
6953   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6954   *ac_space=\ *)
6955     # `set' does not quote correctly, so add quotes (double-quote substitution
6956     # turns \\\\ into \\, and sed turns \\ into \).
6957     sed -n \
6958       -e "s/'/'\\\\''/g" \
6959       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6960     ;;
6961   *)
6962     # `set' quotes correctly as required by POSIX, so do not add quotes.
6963     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6964     ;;
6965   esac >> confcache
6966 if cmp -s $cache_file confcache; then
6967   :
6968 else
6969   if test -w $cache_file; then
6970     echo "updating cache $cache_file"
6971     cat confcache > $cache_file
6972   else
6973     echo "not updating unwritable cache $cache_file"
6974   fi
6975 fi
6976 rm -f confcache
6977
6978 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6979
6980 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6981 # Let make expand exec_prefix.
6982 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6983
6984 # Any assignment to VPATH causes Sun make to only execute
6985 # the first set of double-colon rules, so remove it if not needed.
6986 # If there is a colon in the path, we need to keep it.
6987 if test "x$srcdir" = x.; then
6988   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6989 fi
6990
6991 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6992
6993 DEFS=-DHAVE_CONFIG_H
6994
6995 # Without the "./", some shells look in PATH for config.status.
6996 : ${CONFIG_STATUS=./config.status}
6997
6998 echo creating $CONFIG_STATUS
6999 rm -f $CONFIG_STATUS
7000 cat > $CONFIG_STATUS <<EOF
7001 #! /bin/sh
7002 # Generated automatically by configure.
7003 # Run this file to recreate the current configuration.
7004 # This directory was configured as follows,
7005 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7006 #
7007 # $0 $ac_configure_args
7008 #
7009 # Compiler output produced by configure, useful for debugging
7010 # configure, is in ./config.log if it exists.
7011
7012 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7013 for ac_option
7014 do
7015   case "\$ac_option" in
7016   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7017     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7018     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7019   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7020     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7021     exit 0 ;;
7022   -help | --help | --hel | --he | --h)
7023     echo "\$ac_cs_usage"; exit 0 ;;
7024   *) echo "\$ac_cs_usage"; exit 1 ;;
7025   esac
7026 done
7027
7028 ac_given_srcdir=$srcdir
7029 ac_given_INSTALL="$INSTALL"
7030
7031 trap 'rm -fr `echo "Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile include/config.h gcj/libgcj-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7032 EOF
7033 cat >> $CONFIG_STATUS <<EOF
7034
7035 # Protect against being on the right side of a sed subst in config.status.
7036 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7037  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7038 $ac_vpsub
7039 $extrasub
7040 s%@SHELL@%$SHELL%g
7041 s%@CFLAGS@%$CFLAGS%g
7042 s%@CPPFLAGS@%$CPPFLAGS%g
7043 s%@CXXFLAGS@%$CXXFLAGS%g
7044 s%@FFLAGS@%$FFLAGS%g
7045 s%@DEFS@%$DEFS%g
7046 s%@LDFLAGS@%$LDFLAGS%g
7047 s%@LIBS@%$LIBS%g
7048 s%@exec_prefix@%$exec_prefix%g
7049 s%@prefix@%$prefix%g
7050 s%@program_transform_name@%$program_transform_name%g
7051 s%@bindir@%$bindir%g
7052 s%@sbindir@%$sbindir%g
7053 s%@libexecdir@%$libexecdir%g
7054 s%@datadir@%$datadir%g
7055 s%@sysconfdir@%$sysconfdir%g
7056 s%@sharedstatedir@%$sharedstatedir%g
7057 s%@localstatedir@%$localstatedir%g
7058 s%@libdir@%$libdir%g
7059 s%@includedir@%$includedir%g
7060 s%@oldincludedir@%$oldincludedir%g
7061 s%@infodir@%$infodir%g
7062 s%@mandir@%$mandir%g
7063 s%@LN_S@%$LN_S%g
7064 s%@libgcj_basedir@%$libgcj_basedir%g
7065 s%@mkinstalldirs@%$mkinstalldirs%g
7066 s%@host@%$host%g
7067 s%@host_alias@%$host_alias%g
7068 s%@host_cpu@%$host_cpu%g
7069 s%@host_vendor@%$host_vendor%g
7070 s%@host_os@%$host_os%g
7071 s%@target@%$target%g
7072 s%@target_alias@%$target_alias%g
7073 s%@target_cpu@%$target_cpu%g
7074 s%@target_vendor@%$target_vendor%g
7075 s%@target_os@%$target_os%g
7076 s%@build@%$build%g
7077 s%@build_alias@%$build_alias%g
7078 s%@build_cpu@%$build_cpu%g
7079 s%@build_vendor@%$build_vendor%g
7080 s%@build_os@%$build_os%g
7081 s%@CC@%$CC%g
7082 s%@CXX@%$CXX%g
7083 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7084 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7085 s%@INSTALL_DATA@%$INSTALL_DATA%g
7086 s%@PACKAGE@%$PACKAGE%g
7087 s%@VERSION@%$VERSION%g
7088 s%@ACLOCAL@%$ACLOCAL%g
7089 s%@AUTOCONF@%$AUTOCONF%g
7090 s%@AUTOMAKE@%$AUTOMAKE%g
7091 s%@AUTOHEADER@%$AUTOHEADER%g
7092 s%@MAKEINFO@%$MAKEINFO%g
7093 s%@SET_MAKE@%$SET_MAKE%g
7094 s%@AS@%$AS%g
7095 s%@AR@%$AR%g
7096 s%@RANLIB@%$RANLIB%g
7097 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7098 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7099 s%@MAINT@%$MAINT%g
7100 s%@EXEEXT@%$EXEEXT%g
7101 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7102 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7103 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7104 s%@INCLTDL@%$INCLTDL%g
7105 s%@LIBLTDL@%$LIBLTDL%g
7106 s%@DIRLTDL@%$DIRLTDL%g
7107 s%@OBJEXT@%$OBJEXT%g
7108 s%@STRIP@%$STRIP%g
7109 s%@LIBTOOL@%$LIBTOOL%g
7110 s%@CXXCPP@%$CXXCPP%g
7111 s%@subdirs@%$subdirs%g
7112 s%@COMPPATH@%$COMPPATH%g
7113 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7114 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7115 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7116 s%@LIBFFI@%$LIBFFI%g
7117 s%@LIBFFIINCS@%$LIBFFIINCS%g
7118 s%@CPP@%$CPP%g
7119 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7120 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7121 s%@ZLIBSPEC@%$ZLIBSPEC%g
7122 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7123 s%@GCLIBS@%$GCLIBS%g
7124 s%@GCINCS@%$GCINCS%g
7125 s%@GCDEPS@%$GCDEPS%g
7126 s%@GCOBJS@%$GCOBJS%g
7127 s%@GCSPEC@%$GCSPEC%g
7128 s%@JC1GCSPEC@%$JC1GCSPEC%g
7129 s%@GCTESTSPEC@%$GCTESTSPEC%g
7130 s%@THREADLIBS@%$THREADLIBS%g
7131 s%@THREADINCS@%$THREADINCS%g
7132 s%@THREADDEPS@%$THREADDEPS%g
7133 s%@THREADOBJS@%$THREADOBJS%g
7134 s%@THREADSPEC@%$THREADSPEC%g
7135 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7136 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7137 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7138 s%@LIBICONV@%$LIBICONV%g
7139 s%@GCJ@%$GCJ%g
7140 s%@GCJFLAGS@%$GCJFLAGS%g
7141 s%@ZLIBS@%$ZLIBS%g
7142 s%@ZDEPS@%$ZDEPS%g
7143 s%@ZINCS@%$ZINCS%g
7144 s%@DIVIDESPEC@%$DIVIDESPEC%g
7145 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7146 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7147 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7148 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7149 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7150 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7151 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7152 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
7153 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
7154 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7155 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7156 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7157 s%@GCJVERSION@%$GCJVERSION%g
7158 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7159 s%@ALLOCA@%$ALLOCA%g
7160 s%@PERL@%$PERL%g
7161 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7162 s%@X_CFLAGS@%$X_CFLAGS%g
7163 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7164 s%@X_LIBS@%$X_LIBS%g
7165 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7166 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7167 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7168 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7169 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7170 s%@here@%$here%g
7171
7172 CEOF
7173 EOF
7174
7175 cat >> $CONFIG_STATUS <<\EOF
7176
7177 # Split the substitutions into bite-sized pieces for seds with
7178 # small command number limits, like on Digital OSF/1 and HP-UX.
7179 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7180 ac_file=1 # Number of current file.
7181 ac_beg=1 # First line for current file.
7182 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7183 ac_more_lines=:
7184 ac_sed_cmds=""
7185 while $ac_more_lines; do
7186   if test $ac_beg -gt 1; then
7187     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7188   else
7189     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7190   fi
7191   if test ! -s conftest.s$ac_file; then
7192     ac_more_lines=false
7193     rm -f conftest.s$ac_file
7194   else
7195     if test -z "$ac_sed_cmds"; then
7196       ac_sed_cmds="sed -f conftest.s$ac_file"
7197     else
7198       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7199     fi
7200     ac_file=`expr $ac_file + 1`
7201     ac_beg=$ac_end
7202     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7203   fi
7204 done
7205 if test -z "$ac_sed_cmds"; then
7206   ac_sed_cmds=cat
7207 fi
7208 EOF
7209
7210 cat >> $CONFIG_STATUS <<EOF
7211
7212 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7213 EOF
7214 cat >> $CONFIG_STATUS <<\EOF
7215 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7216   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7217   case "$ac_file" in
7218   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7219        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7220   *) ac_file_in="${ac_file}.in" ;;
7221   esac
7222
7223   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7224
7225   # Remove last slash and all that follows it.  Not all systems have dirname.
7226   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7227   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7228     # The file is in a subdirectory.
7229     test ! -d "$ac_dir" && mkdir "$ac_dir"
7230     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7231     # A "../" for each directory in $ac_dir_suffix.
7232     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7233   else
7234     ac_dir_suffix= ac_dots=
7235   fi
7236
7237   case "$ac_given_srcdir" in
7238   .)  srcdir=.
7239       if test -z "$ac_dots"; then top_srcdir=.
7240       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7241   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7242   *) # Relative path.
7243     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7244     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7245   esac
7246
7247   case "$ac_given_INSTALL" in
7248   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7249   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7250   esac
7251
7252   echo creating "$ac_file"
7253   rm -f "$ac_file"
7254   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7255   case "$ac_file" in
7256   *Makefile*) ac_comsub="1i\\
7257 # $configure_input" ;;
7258   *) ac_comsub= ;;
7259   esac
7260
7261   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7262   sed -e "$ac_comsub
7263 s%@configure_input@%$configure_input%g
7264 s%@srcdir@%$srcdir%g
7265 s%@top_srcdir@%$top_srcdir%g
7266 s%@INSTALL@%$INSTALL%g
7267 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7268 fi; done
7269 rm -f conftest.s*
7270
7271 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7272 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7273 #
7274 # ac_d sets the value in "#define NAME VALUE" lines.
7275 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7276 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7277 ac_dC='\3'
7278 ac_dD='%g'
7279 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7280 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7281 ac_uB='\([      ]\)%\1#\2define\3'
7282 ac_uC=' '
7283 ac_uD='\4%g'
7284 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7285 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7286 ac_eB='$%\1#\2define\3'
7287 ac_eC=' '
7288 ac_eD='%g'
7289
7290 if test "${CONFIG_HEADERS+set}" != set; then
7291 EOF
7292 cat >> $CONFIG_STATUS <<EOF
7293   CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7294 EOF
7295 cat >> $CONFIG_STATUS <<\EOF
7296 fi
7297 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7298   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7299   case "$ac_file" in
7300   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7301        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7302   *) ac_file_in="${ac_file}.in" ;;
7303   esac
7304
7305   echo creating $ac_file
7306
7307   rm -f conftest.frag conftest.in conftest.out
7308   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7309   cat $ac_file_inputs > conftest.in
7310
7311 EOF
7312
7313 # Transform confdefs.h into a sed script conftest.vals that substitutes
7314 # the proper values into config.h.in to produce config.h.  And first:
7315 # Protect against being on the right side of a sed subst in config.status.
7316 # Protect against being in an unquoted here document in config.status.
7317 rm -f conftest.vals
7318 cat > conftest.hdr <<\EOF
7319 s/[\\&%]/\\&/g
7320 s%[\\$`]%\\&%g
7321 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7322 s%ac_d%ac_u%gp
7323 s%ac_u%ac_e%gp
7324 EOF
7325 sed -n -f conftest.hdr confdefs.h > conftest.vals
7326 rm -f conftest.hdr
7327
7328 # This sed command replaces #undef with comments.  This is necessary, for
7329 # example, in the case of _POSIX_SOURCE, which is predefined and required
7330 # on some systems where configure will not decide to define it.
7331 cat >> conftest.vals <<\EOF
7332 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7333 EOF
7334
7335 # Break up conftest.vals because some shells have a limit on
7336 # the size of here documents, and old seds have small limits too.
7337
7338 rm -f conftest.tail
7339 while :
7340 do
7341   ac_lines=`grep -c . conftest.vals`
7342   # grep -c gives empty output for an empty file on some AIX systems.
7343   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7344   # Write a limited-size here document to conftest.frag.
7345   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7346   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7347   echo 'CEOF
7348   sed -f conftest.frag conftest.in > conftest.out
7349   rm -f conftest.in
7350   mv conftest.out conftest.in
7351 ' >> $CONFIG_STATUS
7352   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7353   rm -f conftest.vals
7354   mv conftest.tail conftest.vals
7355 done
7356 rm -f conftest.vals
7357
7358 cat >> $CONFIG_STATUS <<\EOF
7359   rm -f conftest.frag conftest.h
7360   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7361   cat conftest.in >> conftest.h
7362   rm -f conftest.in
7363   if cmp -s $ac_file conftest.h 2>/dev/null; then
7364     echo "$ac_file is unchanged"
7365     rm -f conftest.h
7366   else
7367     # Remove last slash and all that follows it.  Not all systems have dirname.
7368       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7369       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7370       # The file is in a subdirectory.
7371       test ! -d "$ac_dir" && mkdir "$ac_dir"
7372     fi
7373     rm -f $ac_file
7374     mv conftest.h $ac_file
7375   fi
7376 fi; done
7377
7378 EOF
7379
7380 cat >> $CONFIG_STATUS <<EOF
7381 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
7382 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"
7383 EOF
7384
7385 cat >> $CONFIG_STATUS <<\EOF
7386 srcdir=$ac_given_srcdir
7387 while test -n "$ac_sources"; do
7388   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7389   set $ac_sources; ac_source=$1; shift; ac_sources=$*
7390
7391   echo "linking $srcdir/$ac_source to $ac_dest"
7392
7393   if test ! -r $srcdir/$ac_source; then
7394     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7395   fi
7396   rm -f $ac_dest
7397
7398   # Make relative symlinks.
7399   # Remove last slash and all that follows it.  Not all systems have dirname.
7400   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7401   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7402     # The dest file is in a subdirectory.
7403     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7404     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7405     # A "../" for each directory in $ac_dest_dir_suffix.
7406     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7407   else
7408     ac_dest_dir_suffix= ac_dots=
7409   fi
7410
7411   case "$srcdir" in
7412   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7413   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7414   esac
7415
7416   # Make a symlink if possible; otherwise try a hard link.
7417   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7418     ln $srcdir/$ac_source $ac_dest; then :
7419   else
7420     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7421   fi
7422 done
7423 EOF
7424 cat >> $CONFIG_STATUS <<EOF
7425
7426 srcdir=${srcdir}
7427 host=${host}
7428 target=${target}
7429 with_multisubdir=${with_multisubdir}
7430 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7431 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7432 libgcj_basedir=${libgcj_basedir}
7433 CC="${CC}"
7434 CXX="${CXX}"
7435
7436 EOF
7437 cat >> $CONFIG_STATUS <<\EOF
7438 am_indx=1
7439 for am_file in include/config.h gcj/libgcj-config.h; do
7440   case " $CONFIG_HEADERS " in
7441   *" $am_file "*)
7442     echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7443     ;;
7444   esac
7445   am_indx=`expr "$am_indx" + 1`
7446 done
7447 # Only add multilib support code if we just rebuilt top-level Makefile.
7448 case " $CONFIG_FILES " in
7449  *" Makefile "*)
7450    ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7451    ;;
7452 esac
7453
7454 # Make subdirectories and `.d' files.  Look in both srcdir and
7455 # builddir for the .java files.
7456 h=`pwd`
7457 : > deps.mk
7458 ( (cd $srcdir && find . -name '*.java' -print) ;
7459   find . -name '*.java' -print) | \
7460    fgrep -v testsuite | \
7461    sed -e 's/\.java/.d/' | \
7462    while read f; do
7463       echo "include $f" >> deps.mk
7464       test -f $f || {
7465
7466          d=`echo $f | sed -e 's,/[^/]*$,,'`
7467
7468          $libgcj_basedir/../mkinstalldirs $d
7469          echo > $f
7470       }
7471    done
7472
7473 exit 0
7474 EOF
7475 chmod +x $CONFIG_STATUS
7476 rm -fr confdefs* $ac_clean_files
7477 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7478
7479 if test "$no_recursion" != yes; then
7480
7481   # Remove --cache-file and --srcdir arguments so they do not pile up.
7482   ac_sub_configure_args=
7483   ac_prev=
7484   for ac_arg in $ac_configure_args; do
7485     if test -n "$ac_prev"; then
7486       ac_prev=
7487       continue
7488     fi
7489     case "$ac_arg" in
7490     -cache-file | --cache-file | --cache-fil | --cache-fi \
7491     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7492       ac_prev=cache_file ;;
7493     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7494     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7495       ;;
7496     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7497       ac_prev=srcdir ;;
7498     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7499       ;;
7500     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7501     esac
7502   done
7503
7504   for ac_config_dir in $DIRLTDL; do
7505
7506     # Do not complain, so a configure script can configure whichever
7507     # parts of a large source tree are present.
7508     if test ! -d $srcdir/$ac_config_dir; then
7509       continue
7510     fi
7511
7512     echo configuring in $ac_config_dir
7513
7514     case "$srcdir" in
7515     .) ;;
7516     *)
7517       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7518       else
7519         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7520       fi
7521       ;;
7522     esac
7523
7524     ac_popdir=`pwd`
7525     cd $ac_config_dir
7526
7527       # A "../" for each directory in /$ac_config_dir.
7528       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7529
7530     case "$srcdir" in
7531     .) # No --srcdir option.  We are building in place.
7532       ac_sub_srcdir=$srcdir ;;
7533     /*) # Absolute path.
7534       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7535     *) # Relative path.
7536       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7537     esac
7538
7539     # Check for guested configure; otherwise get Cygnus style configure.
7540     if test -f $ac_sub_srcdir/configure; then
7541       ac_sub_configure=$ac_sub_srcdir/configure
7542     elif test -f $ac_sub_srcdir/configure.in; then
7543       ac_sub_configure=$ac_configure
7544     else
7545       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7546       ac_sub_configure=
7547     fi
7548
7549     # The recursion is here.
7550     if test -n "$ac_sub_configure"; then
7551
7552       # Make the cache file name correct relative to the subdirectory.
7553       case "$cache_file" in
7554       /*) ac_sub_cache_file=$cache_file ;;
7555       *) # Relative path.
7556         ac_sub_cache_file="$ac_dots$cache_file" ;;
7557       esac
7558   case "$ac_given_INSTALL" in
7559         [/$]*) INSTALL="$ac_given_INSTALL" ;;
7560         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7561         esac
7562
7563       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7564       # The eval makes quoting arguments work.
7565       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7566       then :
7567       else
7568         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7569       fi
7570     fi
7571
7572     cd $ac_popdir
7573   done
7574 fi
7575