OSDN Git Service

* configure.in, configure: enable dwarf2-exception-style
[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 if test "$CANADIAN" = yes; then
5541   CANADIAN_TRUE=
5542   CANADIAN_FALSE='#'
5543 else
5544   CANADIAN_TRUE='#'
5545   CANADIAN_FALSE=
5546 fi
5547
5548
5549 if test "$NULL_TARGET" = yes; then
5550   NULL_TARGET_TRUE=
5551   NULL_TARGET_FALSE='#'
5552 else
5553   NULL_TARGET_TRUE='#'
5554   NULL_TARGET_FALSE=
5555 fi
5556
5557
5558 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5559   NATIVE_TRUE=
5560   NATIVE_FALSE='#'
5561 else
5562   NATIVE_TRUE='#'
5563   NATIVE_FALSE=
5564 fi
5565
5566
5567 if test -z "$with_cross_host"; then
5568   USE_LIBDIR_TRUE=
5569   USE_LIBDIR_FALSE='#'
5570 else
5571   USE_LIBDIR_TRUE='#'
5572   USE_LIBDIR_FALSE=
5573 fi
5574
5575
5576 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5577   NEEDS_DATA_START_TRUE=
5578   NEEDS_DATA_START_FALSE='#'
5579 else
5580   NEEDS_DATA_START_TRUE='#'
5581   NEEDS_DATA_START_FALSE=
5582 fi
5583
5584
5585
5586
5587 # Determine gcj version number.
5588
5589 gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
5590
5591 GCJVERSION=$gcjversion
5592
5593 cat >> confdefs.h <<EOF
5594 #define GCJVERSION "$GCJVERSION"
5595 EOF
5596
5597
5598 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5599 echo "configure:5600: checking for g++ -ffloat-store bug" >&5
5600 save_CFLAGS="$CFLAGS"
5601 CFLAGS="-x c++ -O2 -ffloat-store"
5602 cat > conftest.$ac_ext <<EOF
5603 #line 5604 "configure"
5604 #include "confdefs.h"
5605 #include <math.h>
5606 int main() {
5607
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5611   rm -rf conftest*
5612   echo "$ac_t""no" 1>&6
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   cat >> confdefs.h <<\EOF
5618 #define __NO_MATH_INLINES 1
5619 EOF
5620
5621    echo "$ac_t""yes" 1>&6
5622 fi
5623 rm -f conftest*
5624 CFLAGS="$save_CFLAGS"
5625
5626 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
5627 do
5628 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5629 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5630 echo "configure:5631: checking for $ac_hdr" >&5
5631 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5632   echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634   cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 #include <$ac_hdr>
5638 EOF
5639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5640 { (eval echo configure:5641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5642 if test -z "$ac_err"; then
5643   rm -rf conftest*
5644   eval "ac_cv_header_$ac_safe=yes"
5645 else
5646   echo "$ac_err" >&5
5647   echo "configure: failed program was:" >&5
5648   cat conftest.$ac_ext >&5
5649   rm -rf conftest*
5650   eval "ac_cv_header_$ac_safe=no"
5651 fi
5652 rm -f conftest*
5653 fi
5654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5655   echo "$ac_t""yes" 1>&6
5656     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5657   cat >> confdefs.h <<EOF
5658 #define $ac_tr_hdr 1
5659 EOF
5660  
5661 else
5662   echo "$ac_t""no" 1>&6
5663 fi
5664 done
5665
5666 for ac_hdr in dirent.h
5667 do
5668 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5669 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5670 echo "configure:5671: checking for $ac_hdr" >&5
5671 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5672   echo $ac_n "(cached) $ac_c" 1>&6
5673 else
5674   cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677 #include <$ac_hdr>
5678 EOF
5679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5680 { (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5682 if test -z "$ac_err"; then
5683   rm -rf conftest*
5684   eval "ac_cv_header_$ac_safe=yes"
5685 else
5686   echo "$ac_err" >&5
5687   echo "configure: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   rm -rf conftest*
5690   eval "ac_cv_header_$ac_safe=no"
5691 fi
5692 rm -f conftest*
5693 fi
5694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5695   echo "$ac_t""yes" 1>&6
5696     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5697   cat >> confdefs.h <<EOF
5698 #define $ac_tr_hdr 1
5699 EOF
5700  
5701 else
5702   echo "$ac_t""no" 1>&6
5703 fi
5704 done
5705
5706 for ac_hdr in inttypes.h
5707 do
5708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5710 echo "configure:5711: checking for $ac_hdr" >&5
5711 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5712   echo $ac_n "(cached) $ac_c" 1>&6
5713 else
5714   cat > conftest.$ac_ext <<EOF
5715 #line 5716 "configure"
5716 #include "confdefs.h"
5717 #include <$ac_hdr>
5718 EOF
5719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5720 { (eval echo configure:5721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5722 if test -z "$ac_err"; then
5723   rm -rf conftest*
5724   eval "ac_cv_header_$ac_safe=yes"
5725 else
5726   echo "$ac_err" >&5
5727   echo "configure: failed program was:" >&5
5728   cat conftest.$ac_ext >&5
5729   rm -rf conftest*
5730   eval "ac_cv_header_$ac_safe=no"
5731 fi
5732 rm -f conftest*
5733 fi
5734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5735   echo "$ac_t""yes" 1>&6
5736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5737   cat >> confdefs.h <<EOF
5738 #define $ac_tr_hdr 1
5739 EOF
5740  
5741     cat >> confdefs.h <<\EOF
5742 #define HAVE_INTTYPES_H 1
5743 EOF
5744
5745     cat >> confdefs.h <<\EOF
5746 #define JV_HAVE_INTTYPES_H 1
5747 EOF
5748
5749
5750 else
5751   echo "$ac_t""no" 1>&6
5752 fi
5753 done
5754
5755 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5756 echo "configure:5757: checking for sys/wait.h that is POSIX.1 compatible" >&5
5757 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5758   echo $ac_n "(cached) $ac_c" 1>&6
5759 else
5760   cat > conftest.$ac_ext <<EOF
5761 #line 5762 "configure"
5762 #include "confdefs.h"
5763 #include <sys/types.h>
5764 #include <sys/wait.h>
5765 #ifndef WEXITSTATUS
5766 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5767 #endif
5768 #ifndef WIFEXITED
5769 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5770 #endif
5771 int main() {
5772 int s;
5773 wait (&s);
5774 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5775 ; return 0; }
5776 EOF
5777 if { (eval echo configure:5778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5778   rm -rf conftest*
5779   ac_cv_header_sys_wait_h=yes
5780 else
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   ac_cv_header_sys_wait_h=no
5785 fi
5786 rm -f conftest*
5787 fi
5788
5789 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5790 if test $ac_cv_header_sys_wait_h = yes; then
5791   cat >> confdefs.h <<\EOF
5792 #define HAVE_SYS_WAIT_H 1
5793 EOF
5794
5795 fi
5796
5797
5798 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5799 echo "configure:5800: checking for ANSI C header files" >&5
5800 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5801   echo $ac_n "(cached) $ac_c" 1>&6
5802 else
5803   cat > conftest.$ac_ext <<EOF
5804 #line 5805 "configure"
5805 #include "confdefs.h"
5806 #include <stdlib.h>
5807 #include <stdarg.h>
5808 #include <string.h>
5809 #include <float.h>
5810 EOF
5811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5812 { (eval echo configure:5813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5814 if test -z "$ac_err"; then
5815   rm -rf conftest*
5816   ac_cv_header_stdc=yes
5817 else
5818   echo "$ac_err" >&5
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   ac_cv_header_stdc=no
5823 fi
5824 rm -f conftest*
5825
5826 if test $ac_cv_header_stdc = yes; then
5827   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5828 cat > conftest.$ac_ext <<EOF
5829 #line 5830 "configure"
5830 #include "confdefs.h"
5831 #include <string.h>
5832 EOF
5833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5834   egrep "memchr" >/dev/null 2>&1; then
5835   :
5836 else
5837   rm -rf conftest*
5838   ac_cv_header_stdc=no
5839 fi
5840 rm -f conftest*
5841
5842 fi
5843
5844 if test $ac_cv_header_stdc = yes; then
5845   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5846 cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 #include <stdlib.h>
5850 EOF
5851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5852   egrep "free" >/dev/null 2>&1; then
5853   :
5854 else
5855   rm -rf conftest*
5856   ac_cv_header_stdc=no
5857 fi
5858 rm -f conftest*
5859
5860 fi
5861
5862 if test $ac_cv_header_stdc = yes; then
5863   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5864 if test "$cross_compiling" = yes; then
5865   :
5866 else
5867   cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 #include <ctype.h>
5871 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5872 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5873 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5874 int main () { int i; for (i = 0; i < 256; i++)
5875 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5876 exit (0); }
5877
5878 EOF
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5880 then
5881   :
5882 else
5883   echo "configure: failed program was:" >&5
5884   cat conftest.$ac_ext >&5
5885   rm -fr conftest*
5886   ac_cv_header_stdc=no
5887 fi
5888 rm -fr conftest*
5889 fi
5890
5891 fi
5892 fi
5893
5894 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5895 if test $ac_cv_header_stdc = yes; then
5896   cat >> confdefs.h <<\EOF
5897 #define STDC_HEADERS 1
5898 EOF
5899
5900 fi
5901
5902 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5903 echo "configure:5904: checking for ssize_t" >&5
5904 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   cat > conftest.$ac_ext <<EOF
5908 #line 5909 "configure"
5909 #include "confdefs.h"
5910 #include <sys/types.h>
5911 #if STDC_HEADERS
5912 #include <stdlib.h>
5913 #include <stddef.h>
5914 #endif
5915 EOF
5916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5917   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5918   rm -rf conftest*
5919   ac_cv_type_ssize_t=yes
5920 else
5921   rm -rf conftest*
5922   ac_cv_type_ssize_t=no
5923 fi
5924 rm -f conftest*
5925
5926 fi
5927 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5928 if test $ac_cv_type_ssize_t = no; then
5929   cat >> confdefs.h <<\EOF
5930 #define ssize_t int
5931 EOF
5932
5933 fi
5934
5935
5936 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5937 echo "configure:5938: checking for in_addr_t" >&5
5938 cat > conftest.$ac_ext <<EOF
5939 #line 5940 "configure"
5940 #include "confdefs.h"
5941 #include <sys/types.h>
5942 #if STDC_HEADERS
5943 #include <stdlib.h>
5944 #include <stddef.h>
5945 #endif
5946 #if HAVE_NETINET_IN_H
5947 #include <netinet/in.h>
5948 #endif
5949 int main() {
5950 in_addr_t foo;
5951 ; return 0; }
5952 EOF
5953 if { (eval echo configure:5954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5954   rm -rf conftest*
5955   cat >> confdefs.h <<\EOF
5956 #define HAVE_IN_ADDR_T 1
5957 EOF
5958
5959    echo "$ac_t""yes" 1>&6
5960 else
5961   echo "configure: failed program was:" >&5
5962   cat conftest.$ac_ext >&5
5963   rm -rf conftest*
5964   echo "$ac_t""no" 1>&6
5965 fi
5966 rm -f conftest*
5967
5968 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5969 echo "configure:5970: checking whether struct ip_mreq is in netinet/in.h" >&5
5970 cat > conftest.$ac_ext <<EOF
5971 #line 5972 "configure"
5972 #include "confdefs.h"
5973 #include <netinet/in.h>
5974 int main() {
5975 struct ip_mreq mreq;
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5979   rm -rf conftest*
5980   cat >> confdefs.h <<\EOF
5981 #define HAVE_STRUCT_IP_MREQ 1
5982 EOF
5983
5984    echo "$ac_t""yes" 1>&6
5985 else
5986   echo "configure: failed program was:" >&5
5987   cat conftest.$ac_ext >&5
5988   rm -rf conftest*
5989   echo "$ac_t""no" 1>&6
5990 fi
5991 rm -f conftest*
5992
5993 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
5994 echo "configure:5995: checking whether struct ipv6_mreq is in netinet/in.h" >&5
5995 cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
5998 #include <netinet/in.h>
5999 int main() {
6000 struct ipv6_mreq mreq6;
6001 ; return 0; }
6002 EOF
6003 if { (eval echo configure:6004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6004   rm -rf conftest*
6005   cat >> confdefs.h <<\EOF
6006 #define HAVE_STRUCT_IPV6_MREQ 1
6007 EOF
6008
6009    echo "$ac_t""yes" 1>&6
6010 else
6011   echo "configure: failed program was:" >&5
6012   cat conftest.$ac_ext >&5
6013   rm -rf conftest*
6014   echo "$ac_t""no" 1>&6
6015 fi
6016 rm -f conftest*
6017
6018 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
6019 echo "configure:6020: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
6020 cat > conftest.$ac_ext <<EOF
6021 #line 6022 "configure"
6022 #include "confdefs.h"
6023 #include <netinet/in.h>
6024 int main() {
6025 struct sockaddr_in6 addr6;
6026 ; return 0; }
6027 EOF
6028 if { (eval echo configure:6029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6029   rm -rf conftest*
6030   cat >> confdefs.h <<\EOF
6031 #define HAVE_INET6 1
6032 EOF
6033
6034    echo "$ac_t""yes" 1>&6
6035 else
6036   echo "configure: failed program was:" >&5
6037   cat conftest.$ac_ext >&5
6038   rm -rf conftest*
6039   echo "$ac_t""no" 1>&6
6040 fi
6041 rm -f conftest*
6042
6043 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
6044 echo "configure:6045: checking for socklen_t in sys/socket.h" >&5
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 #define _POSIX_PII_SOCKET
6049 #include <sys/types.h>
6050 #include <sys/socket.h>
6051 int main() {
6052 socklen_t x = 5;
6053 ; return 0; }
6054 EOF
6055 if { (eval echo configure:6056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6056   rm -rf conftest*
6057   cat >> confdefs.h <<\EOF
6058 #define HAVE_SOCKLEN_T 1
6059 EOF
6060
6061    echo "$ac_t""yes" 1>&6
6062 else
6063   echo "configure: failed program was:" >&5
6064   cat conftest.$ac_ext >&5
6065   rm -rf conftest*
6066   echo "$ac_t""no" 1>&6
6067 fi
6068 rm -f conftest*
6069
6070 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
6071 echo "configure:6072: checking for tm_gmtoff in struct tm" >&5
6072 cat > conftest.$ac_ext <<EOF
6073 #line 6074 "configure"
6074 #include "confdefs.h"
6075 #include <time.h>
6076 int main() {
6077 struct tm tim; tim.tm_gmtoff = 0;
6078 ; return 0; }
6079 EOF
6080 if { (eval echo configure:6081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6081   rm -rf conftest*
6082   cat >> confdefs.h <<\EOF
6083 #define STRUCT_TM_HAS_GMTOFF 1
6084 EOF
6085
6086    echo "$ac_t""yes" 1>&6
6087 else
6088   echo "configure: failed program was:" >&5
6089   cat conftest.$ac_ext >&5
6090   rm -rf conftest*
6091   echo "$ac_t""no" 1>&6
6092    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
6093 echo "configure:6094: checking for global timezone variable" >&5
6094             cat > conftest.$ac_ext <<EOF
6095 #line 6096 "configure"
6096 #include "confdefs.h"
6097 #include <time.h>
6098 int main() {
6099 long z2 = timezone;
6100 ; return 0; }
6101 EOF
6102 if { (eval echo configure:6103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6103   rm -rf conftest*
6104   cat >> confdefs.h <<\EOF
6105 #define HAVE_TIMEZONE 1
6106 EOF
6107
6108       echo "$ac_t""yes" 1>&6
6109 else
6110   echo "configure: failed program was:" >&5
6111   cat conftest.$ac_ext >&5
6112   rm -rf conftest*
6113   echo "$ac_t""no" 1>&6
6114 fi
6115 rm -f conftest*
6116 fi
6117 rm -f conftest*
6118
6119 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6120 # for constant arguments.  Useless!
6121 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6122 echo "configure:6123: checking for working alloca.h" >&5
6123 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6124   echo $ac_n "(cached) $ac_c" 1>&6
6125 else
6126   cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 #include <alloca.h>
6130 int main() {
6131 char *p = alloca(2 * sizeof(int));
6132 ; return 0; }
6133 EOF
6134 if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6135   rm -rf conftest*
6136   ac_cv_header_alloca_h=yes
6137 else
6138   echo "configure: failed program was:" >&5
6139   cat conftest.$ac_ext >&5
6140   rm -rf conftest*
6141   ac_cv_header_alloca_h=no
6142 fi
6143 rm -f conftest*
6144 fi
6145
6146 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6147 if test $ac_cv_header_alloca_h = yes; then
6148   cat >> confdefs.h <<\EOF
6149 #define HAVE_ALLOCA_H 1
6150 EOF
6151
6152 fi
6153
6154 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6155 echo "configure:6156: checking for alloca" >&5
6156 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162
6163 #ifdef __GNUC__
6164 # define alloca __builtin_alloca
6165 #else
6166 # ifdef _MSC_VER
6167 #  include <malloc.h>
6168 #  define alloca _alloca
6169 # else
6170 #  if HAVE_ALLOCA_H
6171 #   include <alloca.h>
6172 #  else
6173 #   ifdef _AIX
6174  #pragma alloca
6175 #   else
6176 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6177 char *alloca ();
6178 #    endif
6179 #   endif
6180 #  endif
6181 # endif
6182 #endif
6183
6184 int main() {
6185 char *p = (char *) alloca(1);
6186 ; return 0; }
6187 EOF
6188 if { (eval echo configure:6189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6189   rm -rf conftest*
6190   ac_cv_func_alloca_works=yes
6191 else
6192   echo "configure: failed program was:" >&5
6193   cat conftest.$ac_ext >&5
6194   rm -rf conftest*
6195   ac_cv_func_alloca_works=no
6196 fi
6197 rm -f conftest*
6198 fi
6199
6200 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6201 if test $ac_cv_func_alloca_works = yes; then
6202   cat >> confdefs.h <<\EOF
6203 #define HAVE_ALLOCA 1
6204 EOF
6205
6206 fi
6207
6208 if test $ac_cv_func_alloca_works = no; then
6209   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6210   # that cause trouble.  Some versions do not even contain alloca or
6211   # contain a buggy version.  If you still want to use their alloca,
6212   # use ar to extract alloca.o from them instead of compiling alloca.c.
6213   ALLOCA=alloca.${ac_objext}
6214   cat >> confdefs.h <<\EOF
6215 #define C_ALLOCA 1
6216 EOF
6217
6218
6219 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6220 echo "configure:6221: checking whether alloca needs Cray hooks" >&5
6221 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6222   echo $ac_n "(cached) $ac_c" 1>&6
6223 else
6224   cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227 #if defined(CRAY) && ! defined(CRAY2)
6228 webecray
6229 #else
6230 wenotbecray
6231 #endif
6232
6233 EOF
6234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6235   egrep "webecray" >/dev/null 2>&1; then
6236   rm -rf conftest*
6237   ac_cv_os_cray=yes
6238 else
6239   rm -rf conftest*
6240   ac_cv_os_cray=no
6241 fi
6242 rm -f conftest*
6243
6244 fi
6245
6246 echo "$ac_t""$ac_cv_os_cray" 1>&6
6247 if test $ac_cv_os_cray = yes; then
6248 for ac_func in _getb67 GETB67 getb67; do
6249   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6250 echo "configure:6251: checking for $ac_func" >&5
6251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6252   echo $ac_n "(cached) $ac_c" 1>&6
6253 else
6254   cat > conftest.$ac_ext <<EOF
6255 #line 6256 "configure"
6256 #include "confdefs.h"
6257 /* System header to define __stub macros and hopefully few prototypes,
6258     which can conflict with char $ac_func(); below.  */
6259 #include <assert.h>
6260 /* Override any gcc2 internal prototype to avoid an error.  */
6261 /* We use char because int might match the return type of a gcc2
6262     builtin and then its argument prototype would still apply.  */
6263 char $ac_func();
6264
6265 int main() {
6266
6267 /* The GNU C library defines this for functions which it implements
6268     to always fail with ENOSYS.  Some functions are actually named
6269     something starting with __ and the normal name is an alias.  */
6270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6271 choke me
6272 #else
6273 $ac_func();
6274 #endif
6275
6276 ; return 0; }
6277 EOF
6278 if { (eval echo configure:6279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6279   rm -rf conftest*
6280   eval "ac_cv_func_$ac_func=yes"
6281 else
6282   echo "configure: failed program was:" >&5
6283   cat conftest.$ac_ext >&5
6284   rm -rf conftest*
6285   eval "ac_cv_func_$ac_func=no"
6286 fi
6287 rm -f conftest*
6288 fi
6289
6290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6291   echo "$ac_t""yes" 1>&6
6292   cat >> confdefs.h <<EOF
6293 #define CRAY_STACKSEG_END $ac_func
6294 EOF
6295
6296   break
6297 else
6298   echo "$ac_t""no" 1>&6
6299 fi
6300
6301 done
6302 fi
6303
6304 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6305 echo "configure:6306: checking stack direction for C alloca" >&5
6306 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6307   echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309   if test "$cross_compiling" = yes; then
6310   ac_cv_c_stack_direction=0
6311 else
6312   cat > conftest.$ac_ext <<EOF
6313 #line 6314 "configure"
6314 #include "confdefs.h"
6315 find_stack_direction ()
6316 {
6317   static char *addr = 0;
6318   auto char dummy;
6319   if (addr == 0)
6320     {
6321       addr = &dummy;
6322       return find_stack_direction ();
6323     }
6324   else
6325     return (&dummy > addr) ? 1 : -1;
6326 }
6327 main ()
6328 {
6329   exit (find_stack_direction() < 0);
6330 }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6333 then
6334   ac_cv_c_stack_direction=1
6335 else
6336   echo "configure: failed program was:" >&5
6337   cat conftest.$ac_ext >&5
6338   rm -fr conftest*
6339   ac_cv_c_stack_direction=-1
6340 fi
6341 rm -fr conftest*
6342 fi
6343
6344 fi
6345
6346 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6347 cat >> confdefs.h <<EOF
6348 #define STACK_DIRECTION $ac_cv_c_stack_direction
6349 EOF
6350
6351 fi
6352
6353
6354 for ac_prog in perl
6355 do
6356 # Extract the first word of "$ac_prog", so it can be a program name with args.
6357 set dummy $ac_prog; ac_word=$2
6358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6359 echo "configure:6360: checking for $ac_word" >&5
6360 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
6361   echo $ac_n "(cached) $ac_c" 1>&6
6362 else
6363   if test -n "$PERL"; then
6364   ac_cv_prog_PERL="$PERL" # Let the user override the test.
6365 else
6366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6367   ac_dummy="$PATH"
6368   for ac_dir in $ac_dummy; do
6369     test -z "$ac_dir" && ac_dir=.
6370     if test -f $ac_dir/$ac_word; then
6371       ac_cv_prog_PERL="$ac_prog"
6372       break
6373     fi
6374   done
6375   IFS="$ac_save_ifs"
6376 fi
6377 fi
6378 PERL="$ac_cv_prog_PERL"
6379 if test -n "$PERL"; then
6380   echo "$ac_t""$PERL" 1>&6
6381 else
6382   echo "$ac_t""no" 1>&6
6383 fi
6384
6385 test -n "$PERL" && break
6386 done
6387 test -n "$PERL" || PERL="false"
6388
6389
6390 SYSDEP_SOURCES=
6391
6392 case "${host}" in
6393  i?86-*-linux*)
6394     SIGNAL_HANDLER=include/i386-signal.h
6395     ;;
6396  sparc-sun-solaris*)
6397     SIGNAL_HANDLER=include/sparc-signal.h
6398     ;;
6399 # ia64-*)
6400 #    SYSDEP_SOURCES=sysdep/ia64.c
6401 #    test -d sysdep || mkdir sysdep
6402 #    ;;
6403  ia64-*-linux*)
6404     SIGNAL_HANDLER=include/dwarf2-signal.h
6405     ;;
6406  powerpc-*-linux*)
6407     SIGNAL_HANDLER=include/dwarf2-signal.h
6408     ;;
6409  alpha*-*-linux*)
6410     SIGNAL_HANDLER=include/dwarf2-signal.h
6411     ;;
6412  *mingw*)
6413     SIGNAL_HANDLER=include/win32-signal.h
6414     ;;
6415  *)
6416     SIGNAL_HANDLER=include/default-signal.h
6417     ;;
6418 esac
6419
6420 # If we're using sjlj exceptions, forget what we just learned.
6421 if test "$enable_sjlj_exceptions" = yes; then
6422    SIGNAL_HANDLER=include/default-signal.h
6423 fi
6424
6425
6426
6427
6428
6429 if test "${multilib}" = "yes"; then
6430   multilib_arg="--enable-multilib"
6431 else
6432   multilib_arg=
6433 fi
6434
6435 # If we find X, set shell vars x_includes and x_libraries to the
6436 # paths, otherwise set no_x=yes.
6437 # Uses ac_ vars as temps to allow command line to override cache and checks.
6438 # --without-x overrides everything else, but does not touch the cache.
6439 echo $ac_n "checking for X""... $ac_c" 1>&6
6440 echo "configure:6438: checking for X" >&5
6441
6442 # Check whether --with-x or --without-x was given.
6443 if test "${with_x+set}" = set; then
6444   withval="$with_x"
6445   :
6446 fi
6447
6448 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6449 if test "x$with_x" = xno; then
6450   # The user explicitly disabled X.
6451   have_x=disabled
6452 else
6453   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6454     # Both variables are already set.
6455     have_x=yes
6456   else
6457 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6458   echo $ac_n "(cached) $ac_c" 1>&6
6459 else
6460   # One or both of the vars are not set, and there is no cached value.
6461 ac_x_includes=NO ac_x_libraries=NO
6462 rm -fr conftestdir
6463 if mkdir conftestdir; then
6464   cd conftestdir
6465   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6466   cat > Imakefile <<'EOF'
6467 acfindx:
6468         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6469 EOF
6470   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6471     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6472     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6473     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6474     for ac_extension in a so sl; do
6475       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6476         test -f $ac_im_libdir/libX11.$ac_extension; then
6477         ac_im_usrlibdir=$ac_im_libdir; break
6478       fi
6479     done
6480     # Screen out bogus values from the imake configuration.  They are
6481     # bogus both because they are the default anyway, and because
6482     # using them would break gcc on systems where it needs fixed includes.
6483     case "$ac_im_incroot" in
6484         /usr/include) ;;
6485         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6486     esac
6487     case "$ac_im_usrlibdir" in
6488         /usr/lib | /lib) ;;
6489         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6490     esac
6491   fi
6492   cd ..
6493   rm -fr conftestdir
6494 fi
6495
6496 if test "$ac_x_includes" = NO; then
6497   # Guess where to find include files, by looking for this one X11 .h file.
6498   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6499
6500   # First, try using that file with no special directory specified.
6501 cat > conftest.$ac_ext <<EOF
6502 #line 6500 "configure"
6503 #include "confdefs.h"
6504 #include <$x_direct_test_include>
6505 EOF
6506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6507 { (eval echo configure:6505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6509 if test -z "$ac_err"; then
6510   rm -rf conftest*
6511   # We can compile using X headers with no special include directory.
6512 ac_x_includes=
6513 else
6514   echo "$ac_err" >&5
6515   echo "configure: failed program was:" >&5
6516   cat conftest.$ac_ext >&5
6517   rm -rf conftest*
6518   # Look for the header file in a standard set of common directories.
6519 # Check X11 before X11Rn because it is often a symlink to the current release.
6520   for ac_dir in               \
6521     /usr/X11/include          \
6522     /usr/X11R6/include        \
6523     /usr/X11R5/include        \
6524     /usr/X11R4/include        \
6525                               \
6526     /usr/include/X11          \
6527     /usr/include/X11R6        \
6528     /usr/include/X11R5        \
6529     /usr/include/X11R4        \
6530                               \
6531     /usr/local/X11/include    \
6532     /usr/local/X11R6/include  \
6533     /usr/local/X11R5/include  \
6534     /usr/local/X11R4/include  \
6535                               \
6536     /usr/local/include/X11    \
6537     /usr/local/include/X11R6  \
6538     /usr/local/include/X11R5  \
6539     /usr/local/include/X11R4  \
6540                               \
6541     /usr/X386/include         \
6542     /usr/x386/include         \
6543     /usr/XFree86/include/X11  \
6544                               \
6545     /usr/include              \
6546     /usr/local/include        \
6547     /usr/unsupported/include  \
6548     /usr/athena/include       \
6549     /usr/local/x11r5/include  \
6550     /usr/lpp/Xamples/include  \
6551                               \
6552     /usr/openwin/include      \
6553     /usr/openwin/share/include \
6554     ; \
6555   do
6556     if test -r "$ac_dir/$x_direct_test_include"; then
6557       ac_x_includes=$ac_dir
6558       break
6559     fi
6560   done
6561 fi
6562 rm -f conftest*
6563 fi # $ac_x_includes = NO
6564
6565 if test "$ac_x_libraries" = NO; then
6566   # Check for the libraries.
6567
6568   test -z "$x_direct_test_library" && x_direct_test_library=Xt
6569   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6570
6571   # See if we find them without any special options.
6572   # Don't add to $LIBS permanently.
6573   ac_save_LIBS="$LIBS"
6574   LIBS="-l$x_direct_test_library $LIBS"
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6574 "configure"
6577 #include "confdefs.h"
6578
6579 int main() {
6580 ${x_direct_test_function}()
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584   rm -rf conftest*
6585   LIBS="$ac_save_LIBS"
6586 # We can link X programs with no special library path.
6587 ac_x_libraries=
6588 else
6589   echo "configure: failed program was:" >&5
6590   cat conftest.$ac_ext >&5
6591   rm -rf conftest*
6592   LIBS="$ac_save_LIBS"
6593 # First see if replacing the include by lib works.
6594 # Check X11 before X11Rn because it is often a symlink to the current release.
6595 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6596     /usr/X11/lib          \
6597     /usr/X11R6/lib        \
6598     /usr/X11R5/lib        \
6599     /usr/X11R4/lib        \
6600                           \
6601     /usr/lib/X11          \
6602     /usr/lib/X11R6        \
6603     /usr/lib/X11R5        \
6604     /usr/lib/X11R4        \
6605                           \
6606     /usr/local/X11/lib    \
6607     /usr/local/X11R6/lib  \
6608     /usr/local/X11R5/lib  \
6609     /usr/local/X11R4/lib  \
6610                           \
6611     /usr/local/lib/X11    \
6612     /usr/local/lib/X11R6  \
6613     /usr/local/lib/X11R5  \
6614     /usr/local/lib/X11R4  \
6615                           \
6616     /usr/X386/lib         \
6617     /usr/x386/lib         \
6618     /usr/XFree86/lib/X11  \
6619                           \
6620     /usr/lib              \
6621     /usr/local/lib        \
6622     /usr/unsupported/lib  \
6623     /usr/athena/lib       \
6624     /usr/local/x11r5/lib  \
6625     /usr/lpp/Xamples/lib  \
6626     /lib/usr/lib/X11      \
6627                           \
6628     /usr/openwin/lib      \
6629     /usr/openwin/share/lib \
6630     ; \
6631 do
6632   for ac_extension in a so sl; do
6633     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6634       ac_x_libraries=$ac_dir
6635       break 2
6636     fi
6637   done
6638 done
6639 fi
6640 rm -f conftest*
6641 fi # $ac_x_libraries = NO
6642
6643 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6644   # Didn't find X anywhere.  Cache the known absence of X.
6645   ac_cv_have_x="have_x=no"
6646 else
6647   # Record where we found X for the cache.
6648   ac_cv_have_x="have_x=yes \
6649                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6650 fi
6651 fi
6652   fi
6653   eval "$ac_cv_have_x"
6654 fi # $with_x != no
6655
6656 if test "$have_x" != yes; then
6657   echo "$ac_t""$have_x" 1>&6
6658   no_x=yes
6659 else
6660   # If each of the values was on the command line, it overrides each guess.
6661   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6662   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6663   # Update the cache value to reflect the command line values.
6664   ac_cv_have_x="have_x=yes \
6665                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6666   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6667 fi
6668
6669 if test "$no_x" = yes; then
6670   # Not all programs may use this symbol, but it does not hurt to define it.
6671   cat >> confdefs.h <<\EOF
6672 #define X_DISPLAY_MISSING 1
6673 EOF
6674
6675   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6676 else
6677   if test -n "$x_includes"; then
6678     X_CFLAGS="$X_CFLAGS -I$x_includes"
6679   fi
6680
6681   # It would also be nice to do this for all -L options, not just this one.
6682   if test -n "$x_libraries"; then
6683     X_LIBS="$X_LIBS -L$x_libraries"
6684     # For Solaris; some versions of Sun CC require a space after -R and
6685     # others require no space.  Words are not sufficient . . . .
6686     case "`(uname -sr) 2>/dev/null`" in
6687     "SunOS 5"*)
6688       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6689 echo "configure:6687: checking whether -R must be followed by a space" >&5
6690       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6691       cat > conftest.$ac_ext <<EOF
6692 #line 6690 "configure"
6693 #include "confdefs.h"
6694
6695 int main() {
6696
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6700   rm -rf conftest*
6701   ac_R_nospace=yes
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   ac_R_nospace=no
6707 fi
6708 rm -f conftest*
6709       if test $ac_R_nospace = yes; then
6710         echo "$ac_t""no" 1>&6
6711         X_LIBS="$X_LIBS -R$x_libraries"
6712       else
6713         LIBS="$ac_xsave_LIBS -R $x_libraries"
6714         cat > conftest.$ac_ext <<EOF
6715 #line 6713 "configure"
6716 #include "confdefs.h"
6717
6718 int main() {
6719
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   ac_R_space=yes
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   ac_R_space=no
6730 fi
6731 rm -f conftest*
6732         if test $ac_R_space = yes; then
6733           echo "$ac_t""yes" 1>&6
6734           X_LIBS="$X_LIBS -R $x_libraries"
6735         else
6736           echo "$ac_t""neither works" 1>&6
6737         fi
6738       fi
6739       LIBS="$ac_xsave_LIBS"
6740     esac
6741   fi
6742
6743   # Check for system-dependent libraries X programs must link with.
6744   # Do this before checking for the system-independent R6 libraries
6745   # (-lICE), since we may need -lsocket or whatever for X linking.
6746
6747   if test "$ISC" = yes; then
6748     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6749   else
6750     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6751     # libraries were built with DECnet support.  And karl@cs.umb.edu says
6752     # the Alpha needs dnet_stub (dnet does not exist).
6753     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6754 echo "configure:6752: checking for dnet_ntoa in -ldnet" >&5
6755 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6756 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6757   echo $ac_n "(cached) $ac_c" 1>&6
6758 else
6759   ac_save_LIBS="$LIBS"
6760 LIBS="-ldnet  $LIBS"
6761 cat > conftest.$ac_ext <<EOF
6762 #line 6760 "configure"
6763 #include "confdefs.h"
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char dnet_ntoa();
6768
6769 int main() {
6770 dnet_ntoa()
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=yes"
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_lib_$ac_lib_var=no"
6781 fi
6782 rm -f conftest*
6783 LIBS="$ac_save_LIBS"
6784
6785 fi
6786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6787   echo "$ac_t""yes" 1>&6
6788   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6789 else
6790   echo "$ac_t""no" 1>&6
6791 fi
6792
6793     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6794       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6795 echo "configure:6793: checking for dnet_ntoa in -ldnet_stub" >&5
6796 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6797 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6798   echo $ac_n "(cached) $ac_c" 1>&6
6799 else
6800   ac_save_LIBS="$LIBS"
6801 LIBS="-ldnet_stub  $LIBS"
6802 cat > conftest.$ac_ext <<EOF
6803 #line 6801 "configure"
6804 #include "confdefs.h"
6805 /* Override any gcc2 internal prototype to avoid an error.  */
6806 /* We use char because int might match the return type of a gcc2
6807     builtin and then its argument prototype would still apply.  */
6808 char dnet_ntoa();
6809
6810 int main() {
6811 dnet_ntoa()
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6815   rm -rf conftest*
6816   eval "ac_cv_lib_$ac_lib_var=yes"
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   eval "ac_cv_lib_$ac_lib_var=no"
6822 fi
6823 rm -f conftest*
6824 LIBS="$ac_save_LIBS"
6825
6826 fi
6827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6828   echo "$ac_t""yes" 1>&6
6829   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6830 else
6831   echo "$ac_t""no" 1>&6
6832 fi
6833
6834     fi
6835
6836     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6837     # to get the SysV transport functions.
6838     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6839     # needs -lnsl.
6840     # The nsl library prevents programs from opening the X display
6841     # on Irix 5.2, according to dickey@clark.net.
6842     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6843 echo "configure:6841: checking for gethostbyname" >&5
6844 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6845   echo $ac_n "(cached) $ac_c" 1>&6
6846 else
6847   cat > conftest.$ac_ext <<EOF
6848 #line 6846 "configure"
6849 #include "confdefs.h"
6850 /* System header to define __stub macros and hopefully few prototypes,
6851     which can conflict with char gethostbyname(); below.  */
6852 #include <assert.h>
6853 /* Override any gcc2 internal prototype to avoid an error.  */
6854 /* We use char because int might match the return type of a gcc2
6855     builtin and then its argument prototype would still apply.  */
6856 char gethostbyname();
6857
6858 int main() {
6859
6860 /* The GNU C library defines this for functions which it implements
6861     to always fail with ENOSYS.  Some functions are actually named
6862     something starting with __ and the normal name is an alias.  */
6863 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6864 choke me
6865 #else
6866 gethostbyname();
6867 #endif
6868
6869 ; return 0; }
6870 EOF
6871 if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6872   rm -rf conftest*
6873   eval "ac_cv_func_gethostbyname=yes"
6874 else
6875   echo "configure: failed program was:" >&5
6876   cat conftest.$ac_ext >&5
6877   rm -rf conftest*
6878   eval "ac_cv_func_gethostbyname=no"
6879 fi
6880 rm -f conftest*
6881 fi
6882
6883 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6884   echo "$ac_t""yes" 1>&6
6885   :
6886 else
6887   echo "$ac_t""no" 1>&6
6888 fi
6889
6890     if test $ac_cv_func_gethostbyname = no; then
6891       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6892 echo "configure:6890: checking for gethostbyname in -lnsl" >&5
6893 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6894 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6895   echo $ac_n "(cached) $ac_c" 1>&6
6896 else
6897   ac_save_LIBS="$LIBS"
6898 LIBS="-lnsl  $LIBS"
6899 cat > conftest.$ac_ext <<EOF
6900 #line 6898 "configure"
6901 #include "confdefs.h"
6902 /* Override any gcc2 internal prototype to avoid an error.  */
6903 /* We use char because int might match the return type of a gcc2
6904     builtin and then its argument prototype would still apply.  */
6905 char gethostbyname();
6906
6907 int main() {
6908 gethostbyname()
6909 ; return 0; }
6910 EOF
6911 if { (eval echo configure:6909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6912   rm -rf conftest*
6913   eval "ac_cv_lib_$ac_lib_var=yes"
6914 else
6915   echo "configure: failed program was:" >&5
6916   cat conftest.$ac_ext >&5
6917   rm -rf conftest*
6918   eval "ac_cv_lib_$ac_lib_var=no"
6919 fi
6920 rm -f conftest*
6921 LIBS="$ac_save_LIBS"
6922
6923 fi
6924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6925   echo "$ac_t""yes" 1>&6
6926   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6927 else
6928   echo "$ac_t""no" 1>&6
6929 fi
6930
6931     fi
6932
6933     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6934     # socket/setsockopt and other routines are undefined under SCO ODT
6935     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6936     # on later versions), says simon@lia.di.epfl.ch: it contains
6937     # gethostby* variants that don't use the nameserver (or something).
6938     # -lsocket must be given before -lnsl if both are needed.
6939     # We assume that if connect needs -lnsl, so does gethostbyname.
6940     echo $ac_n "checking for connect""... $ac_c" 1>&6
6941 echo "configure:6939: checking for connect" >&5
6942 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6943   echo $ac_n "(cached) $ac_c" 1>&6
6944 else
6945   cat > conftest.$ac_ext <<EOF
6946 #line 6944 "configure"
6947 #include "confdefs.h"
6948 /* System header to define __stub macros and hopefully few prototypes,
6949     which can conflict with char connect(); below.  */
6950 #include <assert.h>
6951 /* Override any gcc2 internal prototype to avoid an error.  */
6952 /* We use char because int might match the return type of a gcc2
6953     builtin and then its argument prototype would still apply.  */
6954 char connect();
6955
6956 int main() {
6957
6958 /* The GNU C library defines this for functions which it implements
6959     to always fail with ENOSYS.  Some functions are actually named
6960     something starting with __ and the normal name is an alias.  */
6961 #if defined (__stub_connect) || defined (__stub___connect)
6962 choke me
6963 #else
6964 connect();
6965 #endif
6966
6967 ; return 0; }
6968 EOF
6969 if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6970   rm -rf conftest*
6971   eval "ac_cv_func_connect=yes"
6972 else
6973   echo "configure: failed program was:" >&5
6974   cat conftest.$ac_ext >&5
6975   rm -rf conftest*
6976   eval "ac_cv_func_connect=no"
6977 fi
6978 rm -f conftest*
6979 fi
6980
6981 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6982   echo "$ac_t""yes" 1>&6
6983   :
6984 else
6985   echo "$ac_t""no" 1>&6
6986 fi
6987
6988     if test $ac_cv_func_connect = no; then
6989       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6990 echo "configure:6988: checking for connect in -lsocket" >&5
6991 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6993   echo $ac_n "(cached) $ac_c" 1>&6
6994 else
6995   ac_save_LIBS="$LIBS"
6996 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6997 cat > conftest.$ac_ext <<EOF
6998 #line 6996 "configure"
6999 #include "confdefs.h"
7000 /* Override any gcc2 internal prototype to avoid an error.  */
7001 /* We use char because int might match the return type of a gcc2
7002     builtin and then its argument prototype would still apply.  */
7003 char connect();
7004
7005 int main() {
7006 connect()
7007 ; return 0; }
7008 EOF
7009 if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010   rm -rf conftest*
7011   eval "ac_cv_lib_$ac_lib_var=yes"
7012 else
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   eval "ac_cv_lib_$ac_lib_var=no"
7017 fi
7018 rm -f conftest*
7019 LIBS="$ac_save_LIBS"
7020
7021 fi
7022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7023   echo "$ac_t""yes" 1>&6
7024   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7025 else
7026   echo "$ac_t""no" 1>&6
7027 fi
7028
7029     fi
7030
7031     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
7032     echo $ac_n "checking for remove""... $ac_c" 1>&6
7033 echo "configure:7031: checking for remove" >&5
7034 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
7035   echo $ac_n "(cached) $ac_c" 1>&6
7036 else
7037   cat > conftest.$ac_ext <<EOF
7038 #line 7036 "configure"
7039 #include "confdefs.h"
7040 /* System header to define __stub macros and hopefully few prototypes,
7041     which can conflict with char remove(); below.  */
7042 #include <assert.h>
7043 /* Override any gcc2 internal prototype to avoid an error.  */
7044 /* We use char because int might match the return type of a gcc2
7045     builtin and then its argument prototype would still apply.  */
7046 char remove();
7047
7048 int main() {
7049
7050 /* The GNU C library defines this for functions which it implements
7051     to always fail with ENOSYS.  Some functions are actually named
7052     something starting with __ and the normal name is an alias.  */
7053 #if defined (__stub_remove) || defined (__stub___remove)
7054 choke me
7055 #else
7056 remove();
7057 #endif
7058
7059 ; return 0; }
7060 EOF
7061 if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7062   rm -rf conftest*
7063   eval "ac_cv_func_remove=yes"
7064 else
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068   eval "ac_cv_func_remove=no"
7069 fi
7070 rm -f conftest*
7071 fi
7072
7073 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
7074   echo "$ac_t""yes" 1>&6
7075   :
7076 else
7077   echo "$ac_t""no" 1>&6
7078 fi
7079
7080     if test $ac_cv_func_remove = no; then
7081       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
7082 echo "configure:7080: checking for remove in -lposix" >&5
7083 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
7084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7085   echo $ac_n "(cached) $ac_c" 1>&6
7086 else
7087   ac_save_LIBS="$LIBS"
7088 LIBS="-lposix  $LIBS"
7089 cat > conftest.$ac_ext <<EOF
7090 #line 7088 "configure"
7091 #include "confdefs.h"
7092 /* Override any gcc2 internal prototype to avoid an error.  */
7093 /* We use char because int might match the return type of a gcc2
7094     builtin and then its argument prototype would still apply.  */
7095 char remove();
7096
7097 int main() {
7098 remove()
7099 ; return 0; }
7100 EOF
7101 if { (eval echo configure:7099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7102   rm -rf conftest*
7103   eval "ac_cv_lib_$ac_lib_var=yes"
7104 else
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   eval "ac_cv_lib_$ac_lib_var=no"
7109 fi
7110 rm -f conftest*
7111 LIBS="$ac_save_LIBS"
7112
7113 fi
7114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7115   echo "$ac_t""yes" 1>&6
7116   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7117 else
7118   echo "$ac_t""no" 1>&6
7119 fi
7120
7121     fi
7122
7123     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7124     echo $ac_n "checking for shmat""... $ac_c" 1>&6
7125 echo "configure:7123: checking for shmat" >&5
7126 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7127   echo $ac_n "(cached) $ac_c" 1>&6
7128 else
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7128 "configure"
7131 #include "confdefs.h"
7132 /* System header to define __stub macros and hopefully few prototypes,
7133     which can conflict with char shmat(); below.  */
7134 #include <assert.h>
7135 /* Override any gcc2 internal prototype to avoid an error.  */
7136 /* We use char because int might match the return type of a gcc2
7137     builtin and then its argument prototype would still apply.  */
7138 char shmat();
7139
7140 int main() {
7141
7142 /* The GNU C library defines this for functions which it implements
7143     to always fail with ENOSYS.  Some functions are actually named
7144     something starting with __ and the normal name is an alias.  */
7145 #if defined (__stub_shmat) || defined (__stub___shmat)
7146 choke me
7147 #else
7148 shmat();
7149 #endif
7150
7151 ; return 0; }
7152 EOF
7153 if { (eval echo configure:7151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7154   rm -rf conftest*
7155   eval "ac_cv_func_shmat=yes"
7156 else
7157   echo "configure: failed program was:" >&5
7158   cat conftest.$ac_ext >&5
7159   rm -rf conftest*
7160   eval "ac_cv_func_shmat=no"
7161 fi
7162 rm -f conftest*
7163 fi
7164
7165 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7166   echo "$ac_t""yes" 1>&6
7167   :
7168 else
7169   echo "$ac_t""no" 1>&6
7170 fi
7171
7172     if test $ac_cv_func_shmat = no; then
7173       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7174 echo "configure:7172: checking for shmat in -lipc" >&5
7175 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7176 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7177   echo $ac_n "(cached) $ac_c" 1>&6
7178 else
7179   ac_save_LIBS="$LIBS"
7180 LIBS="-lipc  $LIBS"
7181 cat > conftest.$ac_ext <<EOF
7182 #line 7180 "configure"
7183 #include "confdefs.h"
7184 /* Override any gcc2 internal prototype to avoid an error.  */
7185 /* We use char because int might match the return type of a gcc2
7186     builtin and then its argument prototype would still apply.  */
7187 char shmat();
7188
7189 int main() {
7190 shmat()
7191 ; return 0; }
7192 EOF
7193 if { (eval echo configure:7191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7194   rm -rf conftest*
7195   eval "ac_cv_lib_$ac_lib_var=yes"
7196 else
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -rf conftest*
7200   eval "ac_cv_lib_$ac_lib_var=no"
7201 fi
7202 rm -f conftest*
7203 LIBS="$ac_save_LIBS"
7204
7205 fi
7206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7207   echo "$ac_t""yes" 1>&6
7208   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7209 else
7210   echo "$ac_t""no" 1>&6
7211 fi
7212
7213     fi
7214   fi
7215
7216   # Check for libraries that X11R6 Xt/Xaw programs need.
7217   ac_save_LDFLAGS="$LDFLAGS"
7218   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7219   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7220   # check for ICE first), but we must link in the order -lSM -lICE or
7221   # we get undefined symbols.  So assume we have SM if we have ICE.
7222   # These have to be linked with before -lX11, unlike the other
7223   # libraries we check for below, so use a different variable.
7224   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7225   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7226 echo "configure:7224: checking for IceConnectionNumber in -lICE" >&5
7227 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7229   echo $ac_n "(cached) $ac_c" 1>&6
7230 else
7231   ac_save_LIBS="$LIBS"
7232 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7233 cat > conftest.$ac_ext <<EOF
7234 #line 7232 "configure"
7235 #include "confdefs.h"
7236 /* Override any gcc2 internal prototype to avoid an error.  */
7237 /* We use char because int might match the return type of a gcc2
7238     builtin and then its argument prototype would still apply.  */
7239 char IceConnectionNumber();
7240
7241 int main() {
7242 IceConnectionNumber()
7243 ; return 0; }
7244 EOF
7245 if { (eval echo configure:7243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7246   rm -rf conftest*
7247   eval "ac_cv_lib_$ac_lib_var=yes"
7248 else
7249   echo "configure: failed program was:" >&5
7250   cat conftest.$ac_ext >&5
7251   rm -rf conftest*
7252   eval "ac_cv_lib_$ac_lib_var=no"
7253 fi
7254 rm -f conftest*
7255 LIBS="$ac_save_LIBS"
7256
7257 fi
7258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7259   echo "$ac_t""yes" 1>&6
7260   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7261 else
7262   echo "$ac_t""no" 1>&6
7263 fi
7264
7265   LDFLAGS="$ac_save_LDFLAGS"
7266
7267 fi
7268
7269
7270 # Check whether --enable-java-awt or --disable-java-awt was given.
7271 if test "${enable_java_awt+set}" = set; then
7272   enableval="$enable_java_awt"
7273   :
7274 fi
7275
7276
7277 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
7278 use_xlib_awt=""
7279 use_gtk_awt=""
7280
7281 for peer in $peerlibs ; do
7282   case $peer in
7283     xlib)
7284       if test "$no_x" = yes; then
7285         echo "*** xlib peers requested but no X library available" 1>&2
7286         exit 1
7287       else
7288         use_xlib_awt="yes"
7289       fi
7290       ;;
7291     gtk)
7292       # Nothing, yet...
7293       ;;
7294     no)
7295       use_xlib_awt=
7296       use_gtk_awt=
7297       break
7298       ;;
7299     *)
7300       echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
7301       exit 1
7302   esac
7303 done
7304
7305
7306
7307 if test "$use_xlib_awt" = yes; then
7308   XLIB_AWT_TRUE=
7309   XLIB_AWT_FALSE='#'
7310 else
7311   XLIB_AWT_TRUE='#'
7312   XLIB_AWT_FALSE=
7313 fi
7314
7315
7316 if test "$use_gtk_awt" = yes; then
7317   GTK_AWT_TRUE=
7318   GTK_AWT_FALSE='#'
7319 else
7320   GTK_AWT_TRUE='#'
7321   GTK_AWT_FALSE=
7322 fi
7323
7324
7325 here=`pwd`
7326
7327
7328 # We get this from the environment.
7329
7330
7331 trap '' 1 2 15
7332 cat > confcache <<\EOF
7333 # This file is a shell script that caches the results of configure
7334 # tests run on this system so they can be shared between configure
7335 # scripts and configure runs.  It is not useful on other systems.
7336 # If it contains results you don't want to keep, you may remove or edit it.
7337 #
7338 # By default, configure uses ./config.cache as the cache file,
7339 # creating it if it does not exist already.  You can give configure
7340 # the --cache-file=FILE option to use a different cache file; that is
7341 # what configure does when it calls configure scripts in
7342 # subdirectories, so they share the cache.
7343 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7344 # config.status only pays attention to the cache file if you give it the
7345 # --recheck option to rerun configure.
7346 #
7347 EOF
7348 # The following way of writing the cache mishandles newlines in values,
7349 # but we know of no workaround that is simple, portable, and efficient.
7350 # So, don't put newlines in cache variables' values.
7351 # Ultrix sh set writes to stderr and can't be redirected directly,
7352 # and sets the high bit in the cache file unless we assign to the vars.
7353 (set) 2>&1 |
7354   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7355   *ac_space=\ *)
7356     # `set' does not quote correctly, so add quotes (double-quote substitution
7357     # turns \\\\ into \\, and sed turns \\ into \).
7358     sed -n \
7359       -e "s/'/'\\\\''/g" \
7360       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7361     ;;
7362   *)
7363     # `set' quotes correctly as required by POSIX, so do not add quotes.
7364     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7365     ;;
7366   esac >> confcache
7367 if cmp -s $cache_file confcache; then
7368   :
7369 else
7370   if test -w $cache_file; then
7371     echo "updating cache $cache_file"
7372     cat confcache > $cache_file
7373   else
7374     echo "not updating unwritable cache $cache_file"
7375   fi
7376 fi
7377 rm -f confcache
7378
7379 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7380
7381 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7382 # Let make expand exec_prefix.
7383 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7384
7385 # Any assignment to VPATH causes Sun make to only execute
7386 # the first set of double-colon rules, so remove it if not needed.
7387 # If there is a colon in the path, we need to keep it.
7388 if test "x$srcdir" = x.; then
7389   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7390 fi
7391
7392 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7393
7394 DEFS=-DHAVE_CONFIG_H
7395
7396 # Without the "./", some shells look in PATH for config.status.
7397 : ${CONFIG_STATUS=./config.status}
7398
7399 echo creating $CONFIG_STATUS
7400 rm -f $CONFIG_STATUS
7401 cat > $CONFIG_STATUS <<EOF
7402 #! /bin/sh
7403 # Generated automatically by configure.
7404 # Run this file to recreate the current configuration.
7405 # This directory was configured as follows,
7406 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7407 #
7408 # $0 $ac_configure_args
7409 #
7410 # Compiler output produced by configure, useful for debugging
7411 # configure, is in ./config.log if it exists.
7412
7413 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7414 for ac_option
7415 do
7416   case "\$ac_option" in
7417   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7418     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7419     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7420   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7421     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7422     exit 0 ;;
7423   -help | --help | --hel | --he | --h)
7424     echo "\$ac_cs_usage"; exit 0 ;;
7425   *) echo "\$ac_cs_usage"; exit 1 ;;
7426   esac
7427 done
7428
7429 ac_given_srcdir=$srcdir
7430 ac_given_INSTALL="$INSTALL"
7431
7432 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
7433 EOF
7434 cat >> $CONFIG_STATUS <<EOF
7435
7436 # Protect against being on the right side of a sed subst in config.status.
7437 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7438  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7439 $ac_vpsub
7440 $extrasub
7441 s%@SHELL@%$SHELL%g
7442 s%@CFLAGS@%$CFLAGS%g
7443 s%@CPPFLAGS@%$CPPFLAGS%g
7444 s%@CXXFLAGS@%$CXXFLAGS%g
7445 s%@FFLAGS@%$FFLAGS%g
7446 s%@DEFS@%$DEFS%g
7447 s%@LDFLAGS@%$LDFLAGS%g
7448 s%@LIBS@%$LIBS%g
7449 s%@exec_prefix@%$exec_prefix%g
7450 s%@prefix@%$prefix%g
7451 s%@program_transform_name@%$program_transform_name%g
7452 s%@bindir@%$bindir%g
7453 s%@sbindir@%$sbindir%g
7454 s%@libexecdir@%$libexecdir%g
7455 s%@datadir@%$datadir%g
7456 s%@sysconfdir@%$sysconfdir%g
7457 s%@sharedstatedir@%$sharedstatedir%g
7458 s%@localstatedir@%$localstatedir%g
7459 s%@libdir@%$libdir%g
7460 s%@includedir@%$includedir%g
7461 s%@oldincludedir@%$oldincludedir%g
7462 s%@infodir@%$infodir%g
7463 s%@mandir@%$mandir%g
7464 s%@LN_S@%$LN_S%g
7465 s%@libgcj_basedir@%$libgcj_basedir%g
7466 s%@mkinstalldirs@%$mkinstalldirs%g
7467 s%@host@%$host%g
7468 s%@host_alias@%$host_alias%g
7469 s%@host_cpu@%$host_cpu%g
7470 s%@host_vendor@%$host_vendor%g
7471 s%@host_os@%$host_os%g
7472 s%@target@%$target%g
7473 s%@target_alias@%$target_alias%g
7474 s%@target_cpu@%$target_cpu%g
7475 s%@target_vendor@%$target_vendor%g
7476 s%@target_os@%$target_os%g
7477 s%@build@%$build%g
7478 s%@build_alias@%$build_alias%g
7479 s%@build_cpu@%$build_cpu%g
7480 s%@build_vendor@%$build_vendor%g
7481 s%@build_os@%$build_os%g
7482 s%@CC@%$CC%g
7483 s%@glibjava_CXX@%$glibjava_CXX%g
7484 s%@CXX@%$CXX%g
7485 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7486 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7487 s%@INSTALL_DATA@%$INSTALL_DATA%g
7488 s%@PACKAGE@%$PACKAGE%g
7489 s%@VERSION@%$VERSION%g
7490 s%@ACLOCAL@%$ACLOCAL%g
7491 s%@AUTOCONF@%$AUTOCONF%g
7492 s%@AUTOMAKE@%$AUTOMAKE%g
7493 s%@AUTOHEADER@%$AUTOHEADER%g
7494 s%@MAKEINFO@%$MAKEINFO%g
7495 s%@SET_MAKE@%$SET_MAKE%g
7496 s%@AS@%$AS%g
7497 s%@AR@%$AR%g
7498 s%@RANLIB@%$RANLIB%g
7499 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7500 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7501 s%@MAINT@%$MAINT%g
7502 s%@EXEEXT@%$EXEEXT%g
7503 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7504 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7505 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7506 s%@INCLTDL@%$INCLTDL%g
7507 s%@LIBLTDL@%$LIBLTDL%g
7508 s%@DIRLTDL@%$DIRLTDL%g
7509 s%@OBJEXT@%$OBJEXT%g
7510 s%@STRIP@%$STRIP%g
7511 s%@LIBTOOL@%$LIBTOOL%g
7512 s%@CXXCPP@%$CXXCPP%g
7513 s%@subdirs@%$subdirs%g
7514 s%@COMPPATH@%$COMPPATH%g
7515 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7516 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7517 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7518 s%@LIBFFI@%$LIBFFI%g
7519 s%@LIBFFIINCS@%$LIBFFIINCS%g
7520 s%@PLATFORMOBJS@%$PLATFORMOBJS%g
7521 s%@CPP@%$CPP%g
7522 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7523 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7524 s%@ZLIBSPEC@%$ZLIBSPEC%g
7525 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7526 s%@GCLIBS@%$GCLIBS%g
7527 s%@GCINCS@%$GCINCS%g
7528 s%@GCDEPS@%$GCDEPS%g
7529 s%@GCOBJS@%$GCOBJS%g
7530 s%@GCSPEC@%$GCSPEC%g
7531 s%@JC1GCSPEC@%$JC1GCSPEC%g
7532 s%@GCTESTSPEC@%$GCTESTSPEC%g
7533 s%@THREADLIBS@%$THREADLIBS%g
7534 s%@THREADINCS@%$THREADINCS%g
7535 s%@THREADDEPS@%$THREADDEPS%g
7536 s%@THREADOBJS@%$THREADOBJS%g
7537 s%@THREADSPEC@%$THREADSPEC%g
7538 s%@THREADLDFLAGS@%$THREADLDFLAGS%g
7539 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7540 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7541 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7542 s%@tool_include_dir@%$tool_include_dir%g
7543 s%@LIBICONV@%$LIBICONV%g
7544 s%@GCJ@%$GCJ%g
7545 s%@GCJFLAGS@%$GCJFLAGS%g
7546 s%@ZLIBS@%$ZLIBS%g
7547 s%@SYS_ZLIBS@%$SYS_ZLIBS%g
7548 s%@ZINCS@%$ZINCS%g
7549 s%@DIVIDESPEC@%$DIVIDESPEC%g
7550 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7551 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7552 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7553 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7554 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7555 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7556 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7557 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
7558 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
7559 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7560 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7561 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7562 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7563 s%@GCJVERSION@%$GCJVERSION%g
7564 s%@ALLOCA@%$ALLOCA%g
7565 s%@PERL@%$PERL%g
7566 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7567 s%@X_CFLAGS@%$X_CFLAGS%g
7568 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7569 s%@X_LIBS@%$X_LIBS%g
7570 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7571 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7572 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7573 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7574 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7575 s%@here@%$here%g
7576
7577 CEOF
7578 EOF
7579
7580 cat >> $CONFIG_STATUS <<\EOF
7581
7582 # Split the substitutions into bite-sized pieces for seds with
7583 # small command number limits, like on Digital OSF/1 and HP-UX.
7584 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7585 ac_file=1 # Number of current file.
7586 ac_beg=1 # First line for current file.
7587 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7588 ac_more_lines=:
7589 ac_sed_cmds=""
7590 while $ac_more_lines; do
7591   if test $ac_beg -gt 1; then
7592     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7593   else
7594     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7595   fi
7596   if test ! -s conftest.s$ac_file; then
7597     ac_more_lines=false
7598     rm -f conftest.s$ac_file
7599   else
7600     if test -z "$ac_sed_cmds"; then
7601       ac_sed_cmds="sed -f conftest.s$ac_file"
7602     else
7603       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7604     fi
7605     ac_file=`expr $ac_file + 1`
7606     ac_beg=$ac_end
7607     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7608   fi
7609 done
7610 if test -z "$ac_sed_cmds"; then
7611   ac_sed_cmds=cat
7612 fi
7613 EOF
7614
7615 cat >> $CONFIG_STATUS <<EOF
7616
7617 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7618 EOF
7619 cat >> $CONFIG_STATUS <<\EOF
7620 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7621   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7622   case "$ac_file" in
7623   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7624        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7625   *) ac_file_in="${ac_file}.in" ;;
7626   esac
7627
7628   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7629
7630   # Remove last slash and all that follows it.  Not all systems have dirname.
7631   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7632   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7633     # The file is in a subdirectory.
7634     test ! -d "$ac_dir" && mkdir "$ac_dir"
7635     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7636     # A "../" for each directory in $ac_dir_suffix.
7637     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7638   else
7639     ac_dir_suffix= ac_dots=
7640   fi
7641
7642   case "$ac_given_srcdir" in
7643   .)  srcdir=.
7644       if test -z "$ac_dots"; then top_srcdir=.
7645       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7646   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7647   *) # Relative path.
7648     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7649     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7650   esac
7651
7652   case "$ac_given_INSTALL" in
7653   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7654   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7655   esac
7656
7657   echo creating "$ac_file"
7658   rm -f "$ac_file"
7659   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7660   case "$ac_file" in
7661   *Makefile*) ac_comsub="1i\\
7662 # $configure_input" ;;
7663   *) ac_comsub= ;;
7664   esac
7665
7666   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7667   sed -e "$ac_comsub
7668 s%@configure_input@%$configure_input%g
7669 s%@srcdir@%$srcdir%g
7670 s%@top_srcdir@%$top_srcdir%g
7671 s%@INSTALL@%$INSTALL%g
7672 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7673 fi; done
7674 rm -f conftest.s*
7675
7676 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7677 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7678 #
7679 # ac_d sets the value in "#define NAME VALUE" lines.
7680 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7681 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7682 ac_dC='\3'
7683 ac_dD='%g'
7684 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7685 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7686 ac_uB='\([      ]\)%\1#\2define\3'
7687 ac_uC=' '
7688 ac_uD='\4%g'
7689 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7690 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7691 ac_eB='$%\1#\2define\3'
7692 ac_eC=' '
7693 ac_eD='%g'
7694
7695 if test "${CONFIG_HEADERS+set}" != set; then
7696 EOF
7697 cat >> $CONFIG_STATUS <<EOF
7698   CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7699 EOF
7700 cat >> $CONFIG_STATUS <<\EOF
7701 fi
7702 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7703   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7704   case "$ac_file" in
7705   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7706        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7707   *) ac_file_in="${ac_file}.in" ;;
7708   esac
7709
7710   echo creating $ac_file
7711
7712   rm -f conftest.frag conftest.in conftest.out
7713   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7714   cat $ac_file_inputs > conftest.in
7715
7716 EOF
7717
7718 # Transform confdefs.h into a sed script conftest.vals that substitutes
7719 # the proper values into config.h.in to produce config.h.  And first:
7720 # Protect against being on the right side of a sed subst in config.status.
7721 # Protect against being in an unquoted here document in config.status.
7722 rm -f conftest.vals
7723 cat > conftest.hdr <<\EOF
7724 s/[\\&%]/\\&/g
7725 s%[\\$`]%\\&%g
7726 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7727 s%ac_d%ac_u%gp
7728 s%ac_u%ac_e%gp
7729 EOF
7730 sed -n -f conftest.hdr confdefs.h > conftest.vals
7731 rm -f conftest.hdr
7732
7733 # This sed command replaces #undef with comments.  This is necessary, for
7734 # example, in the case of _POSIX_SOURCE, which is predefined and required
7735 # on some systems where configure will not decide to define it.
7736 cat >> conftest.vals <<\EOF
7737 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7738 EOF
7739
7740 # Break up conftest.vals because some shells have a limit on
7741 # the size of here documents, and old seds have small limits too.
7742
7743 rm -f conftest.tail
7744 while :
7745 do
7746   ac_lines=`grep -c . conftest.vals`
7747   # grep -c gives empty output for an empty file on some AIX systems.
7748   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7749   # Write a limited-size here document to conftest.frag.
7750   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7751   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7752   echo 'CEOF
7753   sed -f conftest.frag conftest.in > conftest.out
7754   rm -f conftest.in
7755   mv conftest.out conftest.in
7756 ' >> $CONFIG_STATUS
7757   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7758   rm -f conftest.vals
7759   mv conftest.tail conftest.vals
7760 done
7761 rm -f conftest.vals
7762
7763 cat >> $CONFIG_STATUS <<\EOF
7764   rm -f conftest.frag conftest.h
7765   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7766   cat conftest.in >> conftest.h
7767   rm -f conftest.in
7768   if cmp -s $ac_file conftest.h 2>/dev/null; then
7769     echo "$ac_file is unchanged"
7770     rm -f conftest.h
7771   else
7772     # Remove last slash and all that follows it.  Not all systems have dirname.
7773       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7774       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7775       # The file is in a subdirectory.
7776       test ! -d "$ac_dir" && mkdir "$ac_dir"
7777     fi
7778     rm -f $ac_file
7779     mv conftest.h $ac_file
7780   fi
7781 fi; done
7782
7783 EOF
7784
7785 cat >> $CONFIG_STATUS <<EOF
7786 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"
7787 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"
7788 EOF
7789
7790 cat >> $CONFIG_STATUS <<\EOF
7791 srcdir=$ac_given_srcdir
7792 while test -n "$ac_sources"; do
7793   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7794   set $ac_sources; ac_source=$1; shift; ac_sources=$*
7795
7796   echo "linking $srcdir/$ac_source to $ac_dest"
7797
7798   if test ! -r $srcdir/$ac_source; then
7799     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7800   fi
7801   rm -f $ac_dest
7802
7803   # Make relative symlinks.
7804   # Remove last slash and all that follows it.  Not all systems have dirname.
7805   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7806   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7807     # The dest file is in a subdirectory.
7808     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7809     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7810     # A "../" for each directory in $ac_dest_dir_suffix.
7811     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7812   else
7813     ac_dest_dir_suffix= ac_dots=
7814   fi
7815
7816   case "$srcdir" in
7817   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7818   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7819   esac
7820
7821   # Make a symlink if possible; otherwise try a hard link.
7822   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7823     ln $srcdir/$ac_source $ac_dest; then :
7824   else
7825     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7826   fi
7827 done
7828 EOF
7829 cat >> $CONFIG_STATUS <<EOF
7830
7831 srcdir=${srcdir}
7832 host=${host}
7833 target=${target}
7834 with_multisubdir=${with_multisubdir}
7835 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7836 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7837 libgcj_basedir=${libgcj_basedir}
7838 CC="${CC}"
7839 CXX="${CXX}"
7840
7841 EOF
7842 cat >> $CONFIG_STATUS <<\EOF
7843 am_indx=1
7844 for am_file in include/config.h gcj/libgcj-config.h; do
7845   case " $CONFIG_HEADERS " in
7846   *" $am_file "*)
7847     echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7848     ;;
7849   esac
7850   am_indx=`expr "$am_indx" + 1`
7851 done
7852 # Only add multilib support code if we just rebuilt top-level Makefile.
7853 case " $CONFIG_FILES " in
7854  *" Makefile "*)
7855    ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7856    ;;
7857 esac
7858
7859 # Make subdirectories and `.d' files.  Look in both srcdir and
7860 # builddir for the .java files.
7861 h=`pwd`
7862 : > deps.mk
7863 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
7864   find . \( -name '*.java' -o -name '*.cc' \) -print) | \
7865    fgrep -v testsuite | \
7866    sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
7867    while read f; do
7868       echo "include $f" >> deps.mk
7869       test -f $f || {
7870
7871          d=`echo $f | sed -e 's,/[^/]*$,,'`
7872
7873          if test ! -d $d; then
7874            $libgcj_basedir/../mkinstalldirs $d
7875          fi;
7876          echo > $f
7877       }
7878    done
7879
7880 exit 0
7881 EOF
7882 chmod +x $CONFIG_STATUS
7883 rm -fr confdefs* $ac_clean_files
7884 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7885
7886 if test "$no_recursion" != yes; then
7887
7888   # Remove --cache-file and --srcdir arguments so they do not pile up.
7889   ac_sub_configure_args=
7890   ac_prev=
7891   for ac_arg in $ac_configure_args; do
7892     if test -n "$ac_prev"; then
7893       ac_prev=
7894       continue
7895     fi
7896     case "$ac_arg" in
7897     -cache-file | --cache-file | --cache-fil | --cache-fi \
7898     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7899       ac_prev=cache_file ;;
7900     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7901     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7902       ;;
7903     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7904       ac_prev=srcdir ;;
7905     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7906       ;;
7907     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7908     esac
7909   done
7910
7911   for ac_config_dir in $DIRLTDL; do
7912
7913     # Do not complain, so a configure script can configure whichever
7914     # parts of a large source tree are present.
7915     if test ! -d $srcdir/$ac_config_dir; then
7916       continue
7917     fi
7918
7919     echo configuring in $ac_config_dir
7920
7921     case "$srcdir" in
7922     .) ;;
7923     *)
7924       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7925       else
7926         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7927       fi
7928       ;;
7929     esac
7930
7931     ac_popdir=`pwd`
7932     cd $ac_config_dir
7933
7934       # A "../" for each directory in /$ac_config_dir.
7935       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7936
7937     case "$srcdir" in
7938     .) # No --srcdir option.  We are building in place.
7939       ac_sub_srcdir=$srcdir ;;
7940     /*) # Absolute path.
7941       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7942     *) # Relative path.
7943       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7944     esac
7945
7946     # Check for guested configure; otherwise get Cygnus style configure.
7947     if test -f $ac_sub_srcdir/configure; then
7948       ac_sub_configure=$ac_sub_srcdir/configure
7949     elif test -f $ac_sub_srcdir/configure.in; then
7950       ac_sub_configure=$ac_configure
7951     else
7952       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7953       ac_sub_configure=
7954     fi
7955
7956     # The recursion is here.
7957     if test -n "$ac_sub_configure"; then
7958
7959       # Make the cache file name correct relative to the subdirectory.
7960       case "$cache_file" in
7961       /*) ac_sub_cache_file=$cache_file ;;
7962       *) # Relative path.
7963         ac_sub_cache_file="$ac_dots$cache_file" ;;
7964       esac
7965   case "$ac_given_INSTALL" in
7966         [/$]*) INSTALL="$ac_given_INSTALL" ;;
7967         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7968         esac
7969
7970       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7971       # The eval makes quoting arguments work.
7972       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7973       then :
7974       else
7975         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7976       fi
7977     fi
7978
7979     cd $ac_popdir
7980   done
7981 fi
7982