OSDN Git Service

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