OSDN Git Service

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