OSDN Git Service

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