OSDN Git Service

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