OSDN Git Service

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