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