OSDN Git Service

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