OSDN Git Service

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