OSDN Git Service

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