OSDN Git Service

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