OSDN Git Service

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