OSDN Git Service

* pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding.
[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 case "$TARGET_ECOS" in
2855    no) case "$host" in
2856       mingw)
2857             PLATFORM=Win32
2858       ;;
2859       *)
2860             PLATFORM=Posix
2861       ;;
2862       esac
2863       ;;
2864    *)
2865       PLATFORM=Ecos
2866       cat >> confdefs.h <<\EOF
2867 #define ECOS 1
2868 EOF
2869
2870       ;;
2871 esac
2872
2873 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2874 echo "configure:2875: checking how to run the C preprocessor" >&5
2875 # On Suns, sometimes $CPP names a directory.
2876 if test -n "$CPP" && test -d "$CPP"; then
2877   CPP=
2878 fi
2879 if test -z "$CPP"; then
2880 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2881   echo $ac_n "(cached) $ac_c" 1>&6
2882 else
2883     # This must be in double quotes, not single quotes, because CPP may get
2884   # substituted into the Makefile and "${CC-cc}" will confuse make.
2885   CPP="${CC-cc} -E"
2886   # On the NeXT, cc -E runs the code through the compiler's parser,
2887   # not just through cpp.
2888   cat > conftest.$ac_ext <<EOF
2889 #line 2890 "configure"
2890 #include "confdefs.h"
2891 #include <assert.h>
2892 Syntax Error
2893 EOF
2894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2895 { (eval echo configure:2896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2897 if test -z "$ac_err"; then
2898   :
2899 else
2900   echo "$ac_err" >&5
2901   echo "configure: failed program was:" >&5
2902   cat conftest.$ac_ext >&5
2903   rm -rf conftest*
2904   CPP="${CC-cc} -E -traditional-cpp"
2905   cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908 #include <assert.h>
2909 Syntax Error
2910 EOF
2911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2912 { (eval echo configure:2913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2914 if test -z "$ac_err"; then
2915   :
2916 else
2917   echo "$ac_err" >&5
2918   echo "configure: failed program was:" >&5
2919   cat conftest.$ac_ext >&5
2920   rm -rf conftest*
2921   CPP="${CC-cc} -nologo -E"
2922   cat > conftest.$ac_ext <<EOF
2923 #line 2924 "configure"
2924 #include "confdefs.h"
2925 #include <assert.h>
2926 Syntax Error
2927 EOF
2928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2929 { (eval echo configure:2930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2931 if test -z "$ac_err"; then
2932   :
2933 else
2934   echo "$ac_err" >&5
2935   echo "configure: failed program was:" >&5
2936   cat conftest.$ac_ext >&5
2937   rm -rf conftest*
2938   CPP=/lib/cpp
2939 fi
2940 rm -f conftest*
2941 fi
2942 rm -f conftest*
2943 fi
2944 rm -f conftest*
2945   ac_cv_prog_CPP="$CPP"
2946 fi
2947   CPP="$ac_cv_prog_CPP"
2948 else
2949   ac_cv_prog_CPP="$CPP"
2950 fi
2951 echo "$ac_t""$CPP" 1>&6
2952
2953 cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956 #include <stdint.h>
2957 EOF
2958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2959   egrep "uint32_t" >/dev/null 2>&1; then
2960   rm -rf conftest*
2961   cat >> confdefs.h <<\EOF
2962 #define HAVE_INT32_DEFINED 1
2963 EOF
2964
2965 fi
2966 rm -f conftest*
2967
2968 cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971 #include <inttypes.h>
2972 EOF
2973 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2974   egrep "uint32_t" >/dev/null 2>&1; then
2975   rm -rf conftest*
2976   cat >> confdefs.h <<\EOF
2977 #define HAVE_INT32_DEFINED 1
2978 EOF
2979
2980 fi
2981 rm -f conftest*
2982
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 #include <sys/types.h>
2987 EOF
2988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2989   egrep "u_int32_t" >/dev/null 2>&1; then
2990   rm -rf conftest*
2991   cat >> confdefs.h <<\EOF
2992 #define HAVE_BSD_INT32_DEFINED 1
2993 EOF
2994
2995 fi
2996 rm -f conftest*
2997
2998 cat > conftest.$ac_ext <<EOF
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001 #include <sys/config.h>
3002 EOF
3003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3004   egrep "u_int32_t" >/dev/null 2>&1; then
3005   rm -rf conftest*
3006   cat >> confdefs.h <<\EOF
3007 #define HAVE_BSD_INT32_DEFINED 1
3008 EOF
3009
3010 fi
3011 rm -f conftest*
3012
3013
3014
3015 cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 #include <time.h>
3019 EOF
3020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3021   egrep "mktime" >/dev/null 2>&1; then
3022   rm -rf conftest*
3023   cat >> confdefs.h <<\EOF
3024 #define HAVE_MKTIME 1
3025 EOF
3026
3027 fi
3028 rm -f conftest*
3029
3030 cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033 #include <time.h>
3034 EOF
3035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3036   egrep "localtime" >/dev/null 2>&1; then
3037   rm -rf conftest*
3038   cat >> confdefs.h <<\EOF
3039 #define HAVE_LOCALTIME 1
3040 EOF
3041
3042 fi
3043 rm -f conftest*
3044
3045
3046 test -d java || mkdir java
3047 test -d java/io || mkdir java/io
3048 test -d gnu || mkdir gnu
3049
3050
3051 test -d java/lang || mkdir java/lang
3052
3053
3054
3055 SYSTEMSPEC=
3056
3057
3058 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
3059
3060
3061 # Check whether --with-system-zlib or --without-system-zlib was given.
3062 if test "${with_system_zlib+set}" = set; then
3063   withval="$with_system_zlib"
3064   :
3065 fi
3066
3067 ZLIBSPEC=
3068
3069 ZLIBTESTSPEC=
3070
3071
3072 libsubdir=.libs
3073
3074 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
3075 echo "configure:3076: checking for garbage collector to use" >&5
3076 # Check whether --enable-java-gc or --disable-java-gc was given.
3077 if test "${enable_java_gc+set}" = set; then
3078   enableval="$enable_java_gc"
3079   
3080   GC=$enableval
3081 else
3082   GC=boehm
3083 fi
3084
3085 GCLIBS=
3086 GCINCS=
3087 GCDEPS=
3088 GCOBJS=
3089 GCSPEC=
3090 JC1GCSPEC=
3091 GCTESTSPEC=
3092 case "$GC" in
3093  boehm)
3094     echo "$ac_t""boehm" 1>&6
3095     GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
3096     # We include the path to the boehm-gc build directory.
3097     # See Makefile.am to understand why.
3098     GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
3099     GCINCS='-I$(top_srcdir)/../boehm-gc/include'
3100     GCSPEC='-lgcjgc'
3101     JC1GCSPEC='-fuse-boehm-gc'
3102     GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3103             GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3104     GCOBJS=boehm.lo
3105     GCHDR=boehm-gc.h
3106         cat >> confdefs.h <<\EOF
3107 #define HAVE_BOEHM_GC 1
3108 EOF
3109
3110     ;;
3111  no)
3112     echo "$ac_t""none" 1>&6
3113     GCOBJS=nogc.lo
3114     GCHDR=no-gc.h
3115     ;;
3116  *)
3117     { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3118     ;;
3119 esac
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
3131 echo "configure:3132: checking for thread model used by GCC" >&5
3132 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
3133 echo "$ac_t""$THREADS" 1>&6
3134
3135 case "$THREADS" in
3136  no | none | single)
3137     THREADS=none
3138     ;;
3139  posix | pthreads)
3140     THREADS=posix
3141     case "$host" in
3142      *-*-linux*)
3143         cat >> confdefs.h <<\EOF
3144 #define LINUX_THREADS 1
3145 EOF
3146
3147         ;;
3148     esac
3149     ;;
3150  win32)
3151     ;;
3152  decosf1 | irix | mach | os2 | solaris | dce | vxworks)
3153     { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3154     ;;
3155  *)
3156     { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3157     ;;
3158 esac
3159
3160 THREADLIBS=
3161 THREADINCS=
3162 THREADDEPS=
3163 THREADOBJS=
3164 THREADH=
3165 THREADSPEC=
3166 case "$THREADS" in
3167  posix)
3168     case "$host" in
3169      *-*-cygwin*)
3170         # Don't set THREADLIBS here.  Cygwin doesn't have -lpthread.
3171         ;;
3172    
3173      *-*-freebsd[1234]*)
3174    
3175         # Before FreeBSD 5, it didn't have -lpthread (or any library which
3176         # merely adds pthread_* functions) but it does have a -pthread switch
3177         # which is required at link-time to select -lc_r *instead* of -lc.
3178         THREADLIBS=-pthread
3179         # Don't set THREADSPEC here as might be expected since -pthread is
3180         # not processed when found within a spec file, it must come from
3181         # the command line.  For now, the user must provide the -pthread
3182         # switch to link code compiled with gcj.  In future, consider adding
3183         # support for weak references to pthread_* functions ala gthr.h API.
3184         THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
3185         ;;
3186      *-*-freebsd*)
3187         # FreeBSD 5 implements a model much closer to other modern UNIX
3188         # which support threads.  However, it still does not support
3189         # -lpthread.
3190         THREADLIBS=-pthread
3191         THREADSPEC=-lc_r
3192         ;;
3193      *)
3194         THREADLIBS=-lpthread
3195         THREADSPEC=-lpthread
3196         ;;
3197     esac
3198     THREADOBJS=posix-threads.lo
3199     THREADH=posix-threads.h
3200     # MIT pthreads doesn't seem to have the mutexattr functions.
3201     # But for now we don't check for it.  We just assume you aren't
3202     # using MIT pthreads.
3203     cat >> confdefs.h <<\EOF
3204 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3205 EOF
3206
3207
3208     # If we're using the Boehm GC, then we happen to know that it
3209     # defines _REENTRANT, so we don't bother.  Eww.
3210     if test "$GC" != boehm; then
3211        cat >> confdefs.h <<\EOF
3212 #define _REENTRANT 1
3213 EOF
3214
3215     fi
3216     cat >> confdefs.h <<\EOF
3217 #define _POSIX_PTHREAD_SEMANTICS 1
3218 EOF
3219
3220     ;;
3221
3222  win32)
3223     THREADOBJS=win32-threads.lo
3224     THREADH=win32-threads.h
3225     ;;
3226
3227  none)
3228     THREADOBJS=no-threads.lo
3229     THREADH=no-threads.h
3230     ;;
3231 esac
3232
3233
3234
3235
3236
3237
3238
3239 HASH_SYNC_SPEC=
3240 # Hash synchronization is only useful with posix threads right now.
3241 if test "$enable_hash_synchronization" = yes && test "$THREADS" = "posix"; then
3242    HASH_SYNC_SPEC=-fhash-synchronization
3243    cat >> confdefs.h <<\EOF
3244 #define JV_HASH_SYNCHRONIZATION 1
3245 EOF
3246
3247 fi
3248
3249
3250
3251
3252
3253 if test "$GCC" = yes; then
3254   USING_GCC_TRUE=
3255   USING_GCC_FALSE='#'
3256 else
3257   USING_GCC_TRUE='#'
3258   USING_GCC_FALSE=
3259 fi
3260
3261 CANADIAN=no
3262 NULL_TARGET=no
3263 NATIVE=yes
3264
3265 # We're in the tree with gcc, and need to include some of its headers.
3266 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
3267
3268 if test -n "${with_cross_host}"; then
3269    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
3270    # may not work correctly, because the compiler may not be able to
3271    # link executables.
3272
3273    # We assume newlib.  This lets us hard-code the functions we know
3274    # we'll have.
3275    cat >> confdefs.h <<\EOF
3276 #define HAVE_MEMMOVE 1
3277 EOF
3278
3279    cat >> confdefs.h <<\EOF
3280 #define HAVE_MEMCPY 1
3281 EOF
3282
3283    cat >> confdefs.h <<\EOF
3284 #define HAVE_STRERROR 1
3285 EOF
3286
3287    cat >> confdefs.h <<\EOF
3288 #define HAVE_GMTIME_R 1
3289 EOF
3290
3291    cat >> confdefs.h <<\EOF
3292 #define HAVE_LOCALTIME_R 1
3293 EOF
3294
3295       cat >> confdefs.h <<\EOF
3296 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3297 EOF
3298
3299       cat >> confdefs.h <<\EOF
3300 #define HAVE_ALLOCA 1
3301 EOF
3302
3303
3304       cat >> confdefs.h <<\EOF
3305 #define NO_GETUID 1
3306 EOF
3307
3308
3309    ZLIBSPEC=-lzgcj
3310    ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
3311
3312    # If Canadian cross, then don't pick up tools from the build
3313    # directory.
3314    if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
3315       CANADIAN=yes
3316       GCC_UNWIND_INCLUDE=
3317       GCJ="${target_alias}-gcj"
3318    fi
3319    NATIVE=no
3320 else
3321    for ac_func in strerror ioctl select fstat open fsync sleep
3322 do
3323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3324 echo "configure:3325: checking for $ac_func" >&5
3325 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   cat > conftest.$ac_ext <<EOF
3329 #line 3330 "configure"
3330 #include "confdefs.h"
3331 /* System header to define __stub macros and hopefully few prototypes,
3332     which can conflict with char $ac_func(); below.  */
3333 #include <assert.h>
3334 /* Override any gcc2 internal prototype to avoid an error.  */
3335 /* We use char because int might match the return type of a gcc2
3336     builtin and then its argument prototype would still apply.  */
3337 char $ac_func();
3338
3339 int main() {
3340
3341 /* The GNU C library defines this for functions which it implements
3342     to always fail with ENOSYS.  Some functions are actually named
3343     something starting with __ and the normal name is an alias.  */
3344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3345 choke me
3346 #else
3347 $ac_func();
3348 #endif
3349
3350 ; return 0; }
3351 EOF
3352 if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3353   rm -rf conftest*
3354   eval "ac_cv_func_$ac_func=yes"
3355 else
3356   echo "configure: failed program was:" >&5
3357   cat conftest.$ac_ext >&5
3358   rm -rf conftest*
3359   eval "ac_cv_func_$ac_func=no"
3360 fi
3361 rm -f conftest*
3362 fi
3363
3364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3365   echo "$ac_t""yes" 1>&6
3366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3367   cat >> confdefs.h <<EOF
3368 #define $ac_tr_func 1
3369 EOF
3370  
3371 else
3372   echo "$ac_t""no" 1>&6
3373 fi
3374 done
3375
3376    for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3377 do
3378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3379 echo "configure:3380: checking for $ac_func" >&5
3380 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3381   echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383   cat > conftest.$ac_ext <<EOF
3384 #line 3385 "configure"
3385 #include "confdefs.h"
3386 /* System header to define __stub macros and hopefully few prototypes,
3387     which can conflict with char $ac_func(); below.  */
3388 #include <assert.h>
3389 /* Override any gcc2 internal prototype to avoid an error.  */
3390 /* We use char because int might match the return type of a gcc2
3391     builtin and then its argument prototype would still apply.  */
3392 char $ac_func();
3393
3394 int main() {
3395
3396 /* The GNU C library defines this for functions which it implements
3397     to always fail with ENOSYS.  Some functions are actually named
3398     something starting with __ and the normal name is an alias.  */
3399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3400 choke me
3401 #else
3402 $ac_func();
3403 #endif
3404
3405 ; return 0; }
3406 EOF
3407 if { (eval echo configure:3408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3408   rm -rf conftest*
3409   eval "ac_cv_func_$ac_func=yes"
3410 else
3411   echo "configure: failed program was:" >&5
3412   cat conftest.$ac_ext >&5
3413   rm -rf conftest*
3414   eval "ac_cv_func_$ac_func=no"
3415 fi
3416 rm -f conftest*
3417 fi
3418
3419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3420   echo "$ac_t""yes" 1>&6
3421     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3422   cat >> confdefs.h <<EOF
3423 #define $ac_tr_func 1
3424 EOF
3425  
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429 done
3430
3431    for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
3432 do
3433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3434 echo "configure:3435: checking for $ac_func" >&5
3435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   cat > conftest.$ac_ext <<EOF
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441 /* System header to define __stub macros and hopefully few prototypes,
3442     which can conflict with char $ac_func(); below.  */
3443 #include <assert.h>
3444 /* Override any gcc2 internal prototype to avoid an error.  */
3445 /* We use char because int might match the return type of a gcc2
3446     builtin and then its argument prototype would still apply.  */
3447 char $ac_func();
3448
3449 int main() {
3450
3451 /* The GNU C library defines this for functions which it implements
3452     to always fail with ENOSYS.  Some functions are actually named
3453     something starting with __ and the normal name is an alias.  */
3454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3455 choke me
3456 #else
3457 $ac_func();
3458 #endif
3459
3460 ; return 0; }
3461 EOF
3462 if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3463   rm -rf conftest*
3464   eval "ac_cv_func_$ac_func=yes"
3465 else
3466   echo "configure: failed program was:" >&5
3467   cat conftest.$ac_ext >&5
3468   rm -rf conftest*
3469   eval "ac_cv_func_$ac_func=no"
3470 fi
3471 rm -f conftest*
3472 fi
3473
3474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3475   echo "$ac_t""yes" 1>&6
3476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3477   cat >> confdefs.h <<EOF
3478 #define $ac_tr_func 1
3479 EOF
3480  
3481 else
3482   echo "$ac_t""no" 1>&6
3483 fi
3484 done
3485
3486    for ac_func in nl_langinfo setlocale
3487 do
3488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3489 echo "configure:3490: checking for $ac_func" >&5
3490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 /* System header to define __stub macros and hopefully few prototypes,
3497     which can conflict with char $ac_func(); below.  */
3498 #include <assert.h>
3499 /* Override any gcc2 internal prototype to avoid an error.  */
3500 /* We use char because int might match the return type of a gcc2
3501     builtin and then its argument prototype would still apply.  */
3502 char $ac_func();
3503
3504 int main() {
3505
3506 /* The GNU C library defines this for functions which it implements
3507     to always fail with ENOSYS.  Some functions are actually named
3508     something starting with __ and the normal name is an alias.  */
3509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3510 choke me
3511 #else
3512 $ac_func();
3513 #endif
3514
3515 ; return 0; }
3516 EOF
3517 if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3518   rm -rf conftest*
3519   eval "ac_cv_func_$ac_func=yes"
3520 else
3521   echo "configure: failed program was:" >&5
3522   cat conftest.$ac_ext >&5
3523   rm -rf conftest*
3524   eval "ac_cv_func_$ac_func=no"
3525 fi
3526 rm -f conftest*
3527 fi
3528
3529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3530   echo "$ac_t""yes" 1>&6
3531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3532   cat >> confdefs.h <<EOF
3533 #define $ac_tr_func 1
3534 EOF
3535  
3536 else
3537   echo "$ac_t""no" 1>&6
3538 fi
3539 done
3540
3541    for ac_func in inet_aton inet_addr
3542 do
3543 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3544 echo "configure:3545: checking for $ac_func" >&5
3545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 /* System header to define __stub macros and hopefully few prototypes,
3552     which can conflict with char $ac_func(); below.  */
3553 #include <assert.h>
3554 /* Override any gcc2 internal prototype to avoid an error.  */
3555 /* We use char because int might match the return type of a gcc2
3556     builtin and then its argument prototype would still apply.  */
3557 char $ac_func();
3558
3559 int main() {
3560
3561 /* The GNU C library defines this for functions which it implements
3562     to always fail with ENOSYS.  Some functions are actually named
3563     something starting with __ and the normal name is an alias.  */
3564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3565 choke me
3566 #else
3567 $ac_func();
3568 #endif
3569
3570 ; return 0; }
3571 EOF
3572 if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3573   rm -rf conftest*
3574   eval "ac_cv_func_$ac_func=yes"
3575 else
3576   echo "configure: failed program was:" >&5
3577   cat conftest.$ac_ext >&5
3578   rm -rf conftest*
3579   eval "ac_cv_func_$ac_func=no"
3580 fi
3581 rm -f conftest*
3582 fi
3583
3584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3585   echo "$ac_t""yes" 1>&6
3586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3587   cat >> confdefs.h <<EOF
3588 #define $ac_tr_func 1
3589 EOF
3590  break
3591 else
3592   echo "$ac_t""no" 1>&6
3593 fi
3594 done
3595
3596    for ac_func in inet_pton uname inet_ntoa
3597 do
3598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3599 echo "configure:3600: checking for $ac_func" >&5
3600 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3601   echo $ac_n "(cached) $ac_c" 1>&6
3602 else
3603   cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 /* System header to define __stub macros and hopefully few prototypes,
3607     which can conflict with char $ac_func(); below.  */
3608 #include <assert.h>
3609 /* Override any gcc2 internal prototype to avoid an error.  */
3610 /* We use char because int might match the return type of a gcc2
3611     builtin and then its argument prototype would still apply.  */
3612 char $ac_func();
3613
3614 int main() {
3615
3616 /* The GNU C library defines this for functions which it implements
3617     to always fail with ENOSYS.  Some functions are actually named
3618     something starting with __ and the normal name is an alias.  */
3619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3620 choke me
3621 #else
3622 $ac_func();
3623 #endif
3624
3625 ; return 0; }
3626 EOF
3627 if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3628   rm -rf conftest*
3629   eval "ac_cv_func_$ac_func=yes"
3630 else
3631   echo "configure: failed program was:" >&5
3632   cat conftest.$ac_ext >&5
3633   rm -rf conftest*
3634   eval "ac_cv_func_$ac_func=no"
3635 fi
3636 rm -f conftest*
3637 fi
3638
3639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3640   echo "$ac_t""yes" 1>&6
3641     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3642   cat >> confdefs.h <<EOF
3643 #define $ac_tr_func 1
3644 EOF
3645  
3646 else
3647   echo "$ac_t""no" 1>&6
3648 fi
3649 done
3650
3651    for ac_func in backtrace fork execvp pipe sigaction
3652 do
3653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3654 echo "configure:3655: checking for $ac_func" >&5
3655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   cat > conftest.$ac_ext <<EOF
3659 #line 3660 "configure"
3660 #include "confdefs.h"
3661 /* System header to define __stub macros and hopefully few prototypes,
3662     which can conflict with char $ac_func(); below.  */
3663 #include <assert.h>
3664 /* Override any gcc2 internal prototype to avoid an error.  */
3665 /* We use char because int might match the return type of a gcc2
3666     builtin and then its argument prototype would still apply.  */
3667 char $ac_func();
3668
3669 int main() {
3670
3671 /* The GNU C library defines this for functions which it implements
3672     to always fail with ENOSYS.  Some functions are actually named
3673     something starting with __ and the normal name is an alias.  */
3674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3675 choke me
3676 #else
3677 $ac_func();
3678 #endif
3679
3680 ; return 0; }
3681 EOF
3682 if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3683   rm -rf conftest*
3684   eval "ac_cv_func_$ac_func=yes"
3685 else
3686   echo "configure: failed program was:" >&5
3687   cat conftest.$ac_ext >&5
3688   rm -rf conftest*
3689   eval "ac_cv_func_$ac_func=no"
3690 fi
3691 rm -f conftest*
3692 fi
3693
3694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3695   echo "$ac_t""yes" 1>&6
3696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3697   cat >> confdefs.h <<EOF
3698 #define $ac_tr_func 1
3699 EOF
3700  
3701 else
3702   echo "$ac_t""no" 1>&6
3703 fi
3704 done
3705
3706    for ac_hdr in execinfo.h unistd.h dlfcn.h
3707 do
3708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3710 echo "configure:3711: checking for $ac_hdr" >&5
3711 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3712   echo $ac_n "(cached) $ac_c" 1>&6
3713 else
3714   cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <$ac_hdr>
3718 EOF
3719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3720 { (eval echo configure:3721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3722 if test -z "$ac_err"; then
3723   rm -rf conftest*
3724   eval "ac_cv_header_$ac_safe=yes"
3725 else
3726   echo "$ac_err" >&5
3727   echo "configure: failed program was:" >&5
3728   cat conftest.$ac_ext >&5
3729   rm -rf conftest*
3730   eval "ac_cv_header_$ac_safe=no"
3731 fi
3732 rm -f conftest*
3733 fi
3734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3735   echo "$ac_t""yes" 1>&6
3736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3737   cat >> confdefs.h <<EOF
3738 #define $ac_tr_hdr 1
3739 EOF
3740  
3741 else
3742   echo "$ac_t""no" 1>&6
3743 fi
3744 done
3745  
3746    echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3747 echo "configure:3748: checking for dladdr in -ldl" >&5
3748 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   ac_save_LIBS="$LIBS"
3753 LIBS="-ldl  $LIBS"
3754 cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 /* Override any gcc2 internal prototype to avoid an error.  */
3758 /* We use char because int might match the return type of a gcc2
3759     builtin and then its argument prototype would still apply.  */
3760 char dladdr();
3761
3762 int main() {
3763 dladdr()
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3767   rm -rf conftest*
3768   eval "ac_cv_lib_$ac_lib_var=yes"
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   eval "ac_cv_lib_$ac_lib_var=no"
3774 fi
3775 rm -f conftest*
3776 LIBS="$ac_save_LIBS"
3777
3778 fi
3779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3780   echo "$ac_t""yes" 1>&6
3781   
3782      cat >> confdefs.h <<\EOF
3783 #define HAVE_DLADDR 1
3784 EOF
3785
3786 else
3787   echo "$ac_t""no" 1>&6
3788 fi
3789
3790    for ac_file in /proc/self/exe
3791 do
3792
3793 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3794 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3795 echo "configure:3796: checking for $ac_file" >&5
3796 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3797   echo $ac_n "(cached) $ac_c" 1>&6
3798 else
3799   if test "$cross_compiling" = yes; then
3800     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3801 else
3802   if test -r $ac_file; then
3803     eval "ac_cv_file_$ac_safe=yes"
3804   else
3805     eval "ac_cv_file_$ac_safe=no"
3806   fi
3807 fi
3808 fi
3809 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3810   echo "$ac_t""yes" 1>&6
3811     ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3812   cat >> confdefs.h <<EOF
3813 #define $ac_tr_file 1
3814 EOF
3815  
3816      cat >> confdefs.h <<\EOF
3817 #define HAVE_PROC_SELF_EXE 1
3818 EOF
3819
3820 else
3821   echo "$ac_t""no" 1>&6
3822
3823 fi
3824 done
3825
3826
3827    
3828     
3829   am_cv_lib_iconv_ldpath=
3830   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3831 if test "${with_libiconv_prefix+set}" = set; then
3832   withval="$with_libiconv_prefix"
3833   
3834     for dir in `echo "$withval" | tr : ' '`; do
3835       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3836       if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
3837     done
3838    
3839 fi
3840
3841
3842   echo $ac_n "checking for iconv""... $ac_c" 1>&6
3843 echo "configure:3844: checking for iconv" >&5
3844 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3845   echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847   
3848     am_cv_func_iconv="no, consider installing GNU libiconv"
3849     am_cv_lib_iconv=no
3850     cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 #include <stdlib.h>
3854 #include <iconv.h>
3855 int main() {
3856 iconv_t cd = iconv_open("","");
3857        iconv(cd,NULL,NULL,NULL,NULL);
3858        iconv_close(cd);
3859 ; return 0; }
3860 EOF
3861 if { (eval echo configure:3862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3862   rm -rf conftest*
3863   am_cv_func_iconv=yes
3864 else
3865   echo "configure: failed program was:" >&5
3866   cat conftest.$ac_ext >&5
3867 fi
3868 rm -f conftest*
3869     if test "$am_cv_func_iconv" != yes; then
3870       am_save_LIBS="$LIBS"
3871       LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
3872       cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 #include <stdlib.h>
3876 #include <iconv.h>
3877 int main() {
3878 iconv_t cd = iconv_open("","");
3879          iconv(cd,NULL,NULL,NULL,NULL);
3880          iconv_close(cd);
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3884   rm -rf conftest*
3885   am_cv_lib_iconv=yes
3886         am_cv_func_iconv=yes
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890 fi
3891 rm -f conftest*
3892       LIBS="$am_save_LIBS"
3893     fi
3894   
3895 fi
3896
3897 echo "$ac_t""$am_cv_func_iconv" 1>&6
3898   if test "$am_cv_func_iconv" = yes; then
3899     cat >> confdefs.h <<\EOF
3900 #define HAVE_ICONV 1
3901 EOF
3902
3903     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3904 echo "configure:3905: checking for iconv declaration" >&5
3905     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   
3909       cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912
3913 #include <stdlib.h>
3914 #include <iconv.h>
3915 extern
3916 #ifdef __cplusplus
3917 "C"
3918 #endif
3919 #if defined(__STDC__) || defined(__cplusplus)
3920 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3921 #else
3922 size_t iconv();
3923 #endif
3924
3925 int main() {
3926
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3930   rm -rf conftest*
3931   am_cv_proto_iconv_arg1=""
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   am_cv_proto_iconv_arg1="const"
3937 fi
3938 rm -f conftest*
3939       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);"
3940 fi
3941
3942     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
3943     echo "$ac_t""${ac_t:-
3944          }$am_cv_proto_iconv" 1>&6
3945     cat >> confdefs.h <<EOF
3946 #define ICONV_CONST $am_cv_proto_iconv_arg1
3947 EOF
3948
3949   fi
3950   LIBICONV=
3951   if test "$am_cv_lib_iconv" = yes; then
3952     LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
3953   fi
3954   
3955
3956    if test $ac_cv_header_locale_h = yes; then
3957     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3958 echo "configure:3959: checking for LC_MESSAGES" >&5
3959 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 #include <locale.h>
3966 int main() {
3967 return LC_MESSAGES
3968 ; return 0; }
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3971   rm -rf conftest*
3972   am_cv_val_LC_MESSAGES=yes
3973 else
3974   echo "configure: failed program was:" >&5
3975   cat conftest.$ac_ext >&5
3976   rm -rf conftest*
3977   am_cv_val_LC_MESSAGES=no
3978 fi
3979 rm -f conftest*
3980 fi
3981
3982 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3983     if test $am_cv_val_LC_MESSAGES = yes; then
3984       cat >> confdefs.h <<\EOF
3985 #define HAVE_LC_MESSAGES 1
3986 EOF
3987
3988     fi
3989   fi
3990    echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3991 echo "configure:3992: checking whether struct tm is in sys/time.h or time.h" >&5
3992 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3993   echo $ac_n "(cached) $ac_c" 1>&6
3994 else
3995   cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998 #include <sys/types.h>
3999 #include <time.h>
4000 int main() {
4001 struct tm *tp; tp->tm_sec;
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4005   rm -rf conftest*
4006   ac_cv_struct_tm=time.h
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   ac_cv_struct_tm=sys/time.h
4012 fi
4013 rm -f conftest*
4014 fi
4015
4016 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4017 if test $ac_cv_struct_tm = sys/time.h; then
4018   cat >> confdefs.h <<\EOF
4019 #define TM_IN_SYS_TIME 1
4020 EOF
4021
4022 fi
4023
4024 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4025 echo "configure:4026: checking for tm_zone in struct tm" >&5
4026 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 #include <sys/types.h>
4033 #include <$ac_cv_struct_tm>
4034 int main() {
4035 struct tm tm; tm.tm_zone;
4036 ; return 0; }
4037 EOF
4038 if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4039   rm -rf conftest*
4040   ac_cv_struct_tm_zone=yes
4041 else
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -rf conftest*
4045   ac_cv_struct_tm_zone=no
4046 fi
4047 rm -f conftest*
4048 fi
4049
4050 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4051 if test "$ac_cv_struct_tm_zone" = yes; then
4052   cat >> confdefs.h <<\EOF
4053 #define HAVE_TM_ZONE 1
4054 EOF
4055
4056 else
4057   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4058 echo "configure:4059: checking for tzname" >&5
4059 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include <time.h>
4066 #ifndef tzname /* For SGI.  */
4067 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4068 #endif
4069 int main() {
4070 atoi(*tzname);
4071 ; return 0; }
4072 EOF
4073 if { (eval echo configure:4074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4074   rm -rf conftest*
4075   ac_cv_var_tzname=yes
4076 else
4077   echo "configure: failed program was:" >&5
4078   cat conftest.$ac_ext >&5
4079   rm -rf conftest*
4080   ac_cv_var_tzname=no
4081 fi
4082 rm -f conftest*
4083 fi
4084
4085 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4086   if test $ac_cv_var_tzname = yes; then
4087     cat >> confdefs.h <<\EOF
4088 #define HAVE_TZNAME 1
4089 EOF
4090
4091   fi
4092 fi
4093
4094
4095    for ac_func in gethostbyname_r
4096 do
4097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4098 echo "configure:4099: checking for $ac_func" >&5
4099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 /* System header to define __stub macros and hopefully few prototypes,
4106     which can conflict with char $ac_func(); below.  */
4107 #include <assert.h>
4108 /* Override any gcc2 internal prototype to avoid an error.  */
4109 /* We use char because int might match the return type of a gcc2
4110     builtin and then its argument prototype would still apply.  */
4111 char $ac_func();
4112
4113 int main() {
4114
4115 /* The GNU C library defines this for functions which it implements
4116     to always fail with ENOSYS.  Some functions are actually named
4117     something starting with __ and the normal name is an alias.  */
4118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4119 choke me
4120 #else
4121 $ac_func();
4122 #endif
4123
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127   rm -rf conftest*
4128   eval "ac_cv_func_$ac_func=yes"
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   eval "ac_cv_func_$ac_func=no"
4134 fi
4135 rm -f conftest*
4136 fi
4137
4138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4139   echo "$ac_t""yes" 1>&6
4140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4141   cat >> confdefs.h <<EOF
4142 #define $ac_tr_func 1
4143 EOF
4144  
4145      cat >> confdefs.h <<\EOF
4146 #define HAVE_GETHOSTBYNAME_R 1
4147 EOF
4148
4149      # There are two different kinds of gethostbyname_r.
4150      # We look for the one that returns `int'.
4151      # Hopefully this check is robust enough.
4152      cat > conftest.$ac_ext <<EOF
4153 #line 4154 "configure"
4154 #include "confdefs.h"
4155 #include <netdb.h>
4156 EOF
4157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4158   egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
4159   rm -rf conftest*
4160   
4161        cat >> confdefs.h <<\EOF
4162 #define GETHOSTBYNAME_R_RETURNS_INT 1
4163 EOF
4164
4165 fi
4166 rm -f conftest*
4167
4168
4169      case " $GCINCS " in
4170      *" -D_REENTRANT "*) ;;
4171      *)
4172                 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
4173 echo "configure:4174: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
4174 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177    
4178           ac_ext=C
4179 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4180 ac_cpp='$CXXCPP $CPPFLAGS'
4181 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4182 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4183 cross_compiling=$ac_cv_prog_cxx_cross
4184
4185           cat > conftest.$ac_ext <<EOF
4186 #line 4187 "configure"
4187 #include "confdefs.h"
4188 #include <netdb.h>
4189 int main() {
4190 gethostbyname_r("", 0, 0);
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4194   rm -rf conftest*
4195   libjava_cv_gethostbyname_r_needs_reentrant=no
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200                 CPPFLAGS_SAVE="$CPPFLAGS"
4201                 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4202                 cat > conftest.$ac_ext <<EOF
4203 #line 4204 "configure"
4204 #include "confdefs.h"
4205 #include <netdb.h>
4206 int main() {
4207 gethostbyname_r("", 0, 0);
4208 ; return 0; }
4209 EOF
4210 if { (eval echo configure:4211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4211   rm -rf conftest*
4212   libjava_cv_gethostbyname_r_needs_reentrant=yes
4213 else
4214   echo "configure: failed program was:" >&5
4215   cat conftest.$ac_ext >&5
4216   rm -rf conftest*
4217   libjava_cv_gethostbyname_r_needs_reentrant=fail
4218 fi
4219 rm -f conftest*
4220                 CPPFLAGS="$CPPFLAGS_SAVE"
4221           
4222 fi
4223 rm -f conftest*
4224           ac_ext=c
4225 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4226 ac_cpp='$CPP $CPPFLAGS'
4227 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4228 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4229 cross_compiling=$ac_cv_prog_cc_cross
4230
4231         
4232 fi
4233
4234 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
4235         if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
4236           cat >> confdefs.h <<\EOF
4237 #define _REENTRANT 1
4238 EOF
4239
4240         fi
4241      ;;
4242      esac
4243
4244      echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
4245 echo "configure:4246: checking for struct hostent_data" >&5
4246 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249         cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252
4253 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
4254 # define _REENTRANT 1
4255 #endif
4256 #include <netdb.h>
4257 int main() {
4258 struct hostent_data data;
4259 ; return 0; }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4262   rm -rf conftest*
4263   libjava_cv_struct_hostent_data=yes
4264 else
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   libjava_cv_struct_hostent_data=no
4269 fi
4270 rm -f conftest*
4271 fi
4272
4273 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
4274      if test "x$libjava_cv_struct_hostent_data" = xyes; then
4275        cat >> confdefs.h <<\EOF
4276 #define HAVE_STRUCT_HOSTENT_DATA 1
4277 EOF
4278
4279      fi
4280    
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284 done
4285
4286
4287    # FIXME: libjava source code expects to find a prototype for
4288    # gethostbyaddr_r in netdb.h.  The outer check ensures that
4289    # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
4290    # to exist where expected.  (The root issue: AC_CHECK_FUNCS assumes C
4291    # linkage check is enough, yet C++ code requires proper prototypes.)
4292    cat > conftest.$ac_ext <<EOF
4293 #line 4294 "configure"
4294 #include "confdefs.h"
4295 #include <netdb.h>
4296 EOF
4297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4298   egrep "gethostbyaddr_r" >/dev/null 2>&1; then
4299   rm -rf conftest*
4300   
4301    for ac_func in gethostbyaddr_r
4302 do
4303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4304 echo "configure:4305: checking for $ac_func" >&5
4305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 /* System header to define __stub macros and hopefully few prototypes,
4312     which can conflict with char $ac_func(); below.  */
4313 #include <assert.h>
4314 /* Override any gcc2 internal prototype to avoid an error.  */
4315 /* We use char because int might match the return type of a gcc2
4316     builtin and then its argument prototype would still apply.  */
4317 char $ac_func();
4318
4319 int main() {
4320
4321 /* The GNU C library defines this for functions which it implements
4322     to always fail with ENOSYS.  Some functions are actually named
4323     something starting with __ and the normal name is an alias.  */
4324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4325 choke me
4326 #else
4327 $ac_func();
4328 #endif
4329
4330 ; return 0; }
4331 EOF
4332 if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4333   rm -rf conftest*
4334   eval "ac_cv_func_$ac_func=yes"
4335 else
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   eval "ac_cv_func_$ac_func=no"
4340 fi
4341 rm -f conftest*
4342 fi
4343
4344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4345   echo "$ac_t""yes" 1>&6
4346     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4347   cat >> confdefs.h <<EOF
4348 #define $ac_tr_func 1
4349 EOF
4350  
4351      cat >> confdefs.h <<\EOF
4352 #define HAVE_GETHOSTBYADDR_R 1
4353 EOF
4354
4355      # There are two different kinds of gethostbyaddr_r.
4356      # We look for the one that returns `int'.
4357      # Hopefully this check is robust enough.
4358      cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <netdb.h>
4362 EOF
4363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4364   egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4365   rm -rf conftest*
4366   
4367        cat >> confdefs.h <<\EOF
4368 #define GETHOSTBYADDR_R_RETURNS_INT 1
4369 EOF
4370
4371 fi
4372 rm -f conftest*
4373
4374 else
4375   echo "$ac_t""no" 1>&6
4376 fi
4377 done
4378
4379 fi
4380 rm -f conftest*
4381
4382
4383    for ac_func in gethostname
4384 do
4385 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4386 echo "configure:4387: checking for $ac_func" >&5
4387 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4388   echo $ac_n "(cached) $ac_c" 1>&6
4389 else
4390   cat > conftest.$ac_ext <<EOF
4391 #line 4392 "configure"
4392 #include "confdefs.h"
4393 /* System header to define __stub macros and hopefully few prototypes,
4394     which can conflict with char $ac_func(); below.  */
4395 #include <assert.h>
4396 /* Override any gcc2 internal prototype to avoid an error.  */
4397 /* We use char because int might match the return type of a gcc2
4398     builtin and then its argument prototype would still apply.  */
4399 char $ac_func();
4400
4401 int main() {
4402
4403 /* The GNU C library defines this for functions which it implements
4404     to always fail with ENOSYS.  Some functions are actually named
4405     something starting with __ and the normal name is an alias.  */
4406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4407 choke me
4408 #else
4409 $ac_func();
4410 #endif
4411
4412 ; return 0; }
4413 EOF
4414 if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4415   rm -rf conftest*
4416   eval "ac_cv_func_$ac_func=yes"
4417 else
4418   echo "configure: failed program was:" >&5
4419   cat conftest.$ac_ext >&5
4420   rm -rf conftest*
4421   eval "ac_cv_func_$ac_func=no"
4422 fi
4423 rm -f conftest*
4424 fi
4425
4426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4427   echo "$ac_t""yes" 1>&6
4428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4429   cat >> confdefs.h <<EOF
4430 #define $ac_tr_func 1
4431 EOF
4432  
4433      cat >> confdefs.h <<\EOF
4434 #define HAVE_GETHOSTNAME 1
4435 EOF
4436
4437      cat > conftest.$ac_ext <<EOF
4438 #line 4439 "configure"
4439 #include "confdefs.h"
4440 #include <unistd.h>
4441 EOF
4442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4443   egrep "gethostname" >/dev/null 2>&1; then
4444   rm -rf conftest*
4445   
4446        cat >> confdefs.h <<\EOF
4447 #define HAVE_GETHOSTNAME_DECL 1
4448 EOF
4449
4450 fi
4451 rm -f conftest*
4452
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456 done
4457
4458
4459    # Look for these functions in the thread library, but only bother
4460    # if using POSIX threads.
4461    if test "$THREADS" = posix; then
4462       save_LIBS="$LIBS"
4463       LIBS="$LIBS $THREADLIBS"
4464       # Some POSIX thread systems don't have pthread_mutexattr_settype.
4465       # E.g., Solaris.
4466       for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4467 do
4468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4469 echo "configure:4470: checking for $ac_func" >&5
4470 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4471   echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473   cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 /* System header to define __stub macros and hopefully few prototypes,
4477     which can conflict with char $ac_func(); below.  */
4478 #include <assert.h>
4479 /* Override any gcc2 internal prototype to avoid an error.  */
4480 /* We use char because int might match the return type of a gcc2
4481     builtin and then its argument prototype would still apply.  */
4482 char $ac_func();
4483
4484 int main() {
4485
4486 /* The GNU C library defines this for functions which it implements
4487     to always fail with ENOSYS.  Some functions are actually named
4488     something starting with __ and the normal name is an alias.  */
4489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4490 choke me
4491 #else
4492 $ac_func();
4493 #endif
4494
4495 ; return 0; }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4498   rm -rf conftest*
4499   eval "ac_cv_func_$ac_func=yes"
4500 else
4501   echo "configure: failed program was:" >&5
4502   cat conftest.$ac_ext >&5
4503   rm -rf conftest*
4504   eval "ac_cv_func_$ac_func=no"
4505 fi
4506 rm -f conftest*
4507 fi
4508
4509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4510   echo "$ac_t""yes" 1>&6
4511     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4512   cat >> confdefs.h <<EOF
4513 #define $ac_tr_func 1
4514 EOF
4515  
4516 else
4517   echo "$ac_t""no" 1>&6
4518 fi
4519 done
4520
4521
4522       # Look for sched_yield.  Up to Solaris 2.6, it is in libposix4, since
4523       # Solaris 7 the name librt is preferred.
4524       for ac_func in sched_yield
4525 do
4526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4527 echo "configure:4528: checking for $ac_func" >&5
4528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 /* System header to define __stub macros and hopefully few prototypes,
4535     which can conflict with char $ac_func(); below.  */
4536 #include <assert.h>
4537 /* Override any gcc2 internal prototype to avoid an error.  */
4538 /* We use char because int might match the return type of a gcc2
4539     builtin and then its argument prototype would still apply.  */
4540 char $ac_func();
4541
4542 int main() {
4543
4544 /* The GNU C library defines this for functions which it implements
4545     to always fail with ENOSYS.  Some functions are actually named
4546     something starting with __ and the normal name is an alias.  */
4547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4548 choke me
4549 #else
4550 $ac_func();
4551 #endif
4552
4553 ; return 0; }
4554 EOF
4555 if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4556   rm -rf conftest*
4557   eval "ac_cv_func_$ac_func=yes"
4558 else
4559   echo "configure: failed program was:" >&5
4560   cat conftest.$ac_ext >&5
4561   rm -rf conftest*
4562   eval "ac_cv_func_$ac_func=no"
4563 fi
4564 rm -f conftest*
4565 fi
4566
4567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4568   echo "$ac_t""yes" 1>&6
4569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4570   cat >> confdefs.h <<EOF
4571 #define $ac_tr_func 1
4572 EOF
4573  
4574 else
4575   echo "$ac_t""no" 1>&6
4576 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4577 echo "configure:4578: checking for sched_yield in -lrt" >&5
4578 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   ac_save_LIBS="$LIBS"
4583 LIBS="-lrt  $LIBS"
4584 cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 /* Override any gcc2 internal prototype to avoid an error.  */
4588 /* We use char because int might match the return type of a gcc2
4589     builtin and then its argument prototype would still apply.  */
4590 char sched_yield();
4591
4592 int main() {
4593 sched_yield()
4594 ; return 0; }
4595 EOF
4596 if { (eval echo configure:4597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4597   rm -rf conftest*
4598   eval "ac_cv_lib_$ac_lib_var=yes"
4599 else
4600   echo "configure: failed program was:" >&5
4601   cat conftest.$ac_ext >&5
4602   rm -rf conftest*
4603   eval "ac_cv_lib_$ac_lib_var=no"
4604 fi
4605 rm -f conftest*
4606 LIBS="$ac_save_LIBS"
4607
4608 fi
4609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4610   echo "$ac_t""yes" 1>&6
4611   
4612           cat >> confdefs.h <<\EOF
4613 #define HAVE_SCHED_YIELD 1
4614 EOF
4615
4616           THREADLIBS="$THREADLIBS -lrt"
4617           THREADSPEC="$THREADSPEC -lrt"
4618 else
4619   echo "$ac_t""no" 1>&6
4620
4621           echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4622 echo "configure:4623: checking for sched_yield in -lposix4" >&5
4623 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   ac_save_LIBS="$LIBS"
4628 LIBS="-lposix4  $LIBS"
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 /* We use char because int might match the return type of a gcc2
4634     builtin and then its argument prototype would still apply.  */
4635 char sched_yield();
4636
4637 int main() {
4638 sched_yield()
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=yes"
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=no"
4649 fi
4650 rm -f conftest*
4651 LIBS="$ac_save_LIBS"
4652
4653 fi
4654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4655   echo "$ac_t""yes" 1>&6
4656   
4657             cat >> confdefs.h <<\EOF
4658 #define HAVE_SCHED_YIELD 1
4659 EOF
4660
4661             THREADLIBS="$THREADLIBS -lposix4"
4662             THREADSPEC="$THREADSPEC -lposix4"
4663 else
4664   echo "$ac_t""no" 1>&6
4665 fi
4666
4667 fi
4668
4669 fi
4670 done
4671
4672       LIBS="$save_LIBS"
4673
4674       # We can save a little space at runtime if the mutex has m_count
4675       # or __m_count.  This is a nice hack for Linux.
4676       cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 #include <pthread.h>
4680 int main() {
4681
4682           extern pthread_mutex_t *mutex; int q = mutex->m_count;
4683         
4684 ; return 0; }
4685 EOF
4686 if { (eval echo configure:4687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4687   rm -rf conftest*
4688   cat >> confdefs.h <<\EOF
4689 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4690 EOF
4691
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695   rm -rf conftest*
4696   
4697         cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <pthread.h>
4701 int main() {
4702
4703             extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4704           
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4708   rm -rf conftest*
4709   cat >> confdefs.h <<\EOF
4710 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4711 EOF
4712
4713 else
4714   echo "configure: failed program was:" >&5
4715   cat conftest.$ac_ext >&5
4716 fi
4717 rm -f conftest*
4718 fi
4719 rm -f conftest*
4720    fi
4721
4722    # We require a way to get the time.
4723    time_found=no
4724    for ac_func in gettimeofday time ftime
4725 do
4726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4727 echo "configure:4728: checking for $ac_func" >&5
4728 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 /* System header to define __stub macros and hopefully few prototypes,
4735     which can conflict with char $ac_func(); below.  */
4736 #include <assert.h>
4737 /* Override any gcc2 internal prototype to avoid an error.  */
4738 /* We use char because int might match the return type of a gcc2
4739     builtin and then its argument prototype would still apply.  */
4740 char $ac_func();
4741
4742 int main() {
4743
4744 /* The GNU C library defines this for functions which it implements
4745     to always fail with ENOSYS.  Some functions are actually named
4746     something starting with __ and the normal name is an alias.  */
4747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4748 choke me
4749 #else
4750 $ac_func();
4751 #endif
4752
4753 ; return 0; }
4754 EOF
4755 if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4756   rm -rf conftest*
4757   eval "ac_cv_func_$ac_func=yes"
4758 else
4759   echo "configure: failed program was:" >&5
4760   cat conftest.$ac_ext >&5
4761   rm -rf conftest*
4762   eval "ac_cv_func_$ac_func=no"
4763 fi
4764 rm -f conftest*
4765 fi
4766
4767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4768   echo "$ac_t""yes" 1>&6
4769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4770   cat >> confdefs.h <<EOF
4771 #define $ac_tr_func 1
4772 EOF
4773  time_found=yes
4774 else
4775   echo "$ac_t""no" 1>&6
4776 fi
4777 done
4778
4779    if test "$time_found" = no; then
4780       { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4781    fi
4782
4783    for ac_func in memmove
4784 do
4785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4786 echo "configure:4787: checking for $ac_func" >&5
4787 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793 /* System header to define __stub macros and hopefully few prototypes,
4794     which can conflict with char $ac_func(); below.  */
4795 #include <assert.h>
4796 /* Override any gcc2 internal prototype to avoid an error.  */
4797 /* We use char because int might match the return type of a gcc2
4798     builtin and then its argument prototype would still apply.  */
4799 char $ac_func();
4800
4801 int main() {
4802
4803 /* The GNU C library defines this for functions which it implements
4804     to always fail with ENOSYS.  Some functions are actually named
4805     something starting with __ and the normal name is an alias.  */
4806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4807 choke me
4808 #else
4809 $ac_func();
4810 #endif
4811
4812 ; return 0; }
4813 EOF
4814 if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4815   rm -rf conftest*
4816   eval "ac_cv_func_$ac_func=yes"
4817 else
4818   echo "configure: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   rm -rf conftest*
4821   eval "ac_cv_func_$ac_func=no"
4822 fi
4823 rm -f conftest*
4824 fi
4825
4826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6
4828     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4829   cat >> confdefs.h <<EOF
4830 #define $ac_tr_func 1
4831 EOF
4832  
4833 else
4834   echo "$ac_t""no" 1>&6
4835 fi
4836 done
4837
4838
4839    # We require memcpy.
4840    memcpy_found=no
4841    for ac_func in memcpy
4842 do
4843 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4844 echo "configure:4845: checking for $ac_func" >&5
4845 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4846   echo $ac_n "(cached) $ac_c" 1>&6
4847 else
4848   cat > conftest.$ac_ext <<EOF
4849 #line 4850 "configure"
4850 #include "confdefs.h"
4851 /* System header to define __stub macros and hopefully few prototypes,
4852     which can conflict with char $ac_func(); below.  */
4853 #include <assert.h>
4854 /* Override any gcc2 internal prototype to avoid an error.  */
4855 /* We use char because int might match the return type of a gcc2
4856     builtin and then its argument prototype would still apply.  */
4857 char $ac_func();
4858
4859 int main() {
4860
4861 /* The GNU C library defines this for functions which it implements
4862     to always fail with ENOSYS.  Some functions are actually named
4863     something starting with __ and the normal name is an alias.  */
4864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4865 choke me
4866 #else
4867 $ac_func();
4868 #endif
4869
4870 ; return 0; }
4871 EOF
4872 if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873   rm -rf conftest*
4874   eval "ac_cv_func_$ac_func=yes"
4875 else
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_func_$ac_func=no"
4880 fi
4881 rm -f conftest*
4882 fi
4883
4884 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4885   echo "$ac_t""yes" 1>&6
4886     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4887   cat >> confdefs.h <<EOF
4888 #define $ac_tr_func 1
4889 EOF
4890  memcpy_found=yes
4891 else
4892   echo "$ac_t""no" 1>&6
4893 fi
4894 done
4895
4896    if test "$memcpy_found" = no; then
4897       { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4898    fi
4899
4900    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4901 echo "configure:4902: checking for dlopen in -ldl" >&5
4902 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4903 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4904   echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906   ac_save_LIBS="$LIBS"
4907 LIBS="-ldl  $LIBS"
4908 cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 /* Override any gcc2 internal prototype to avoid an error.  */
4912 /* We use char because int might match the return type of a gcc2
4913     builtin and then its argument prototype would still apply.  */
4914 char dlopen();
4915
4916 int main() {
4917 dlopen()
4918 ; return 0; }
4919 EOF
4920 if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4921   rm -rf conftest*
4922   eval "ac_cv_lib_$ac_lib_var=yes"
4923 else
4924   echo "configure: failed program was:" >&5
4925   cat conftest.$ac_ext >&5
4926   rm -rf conftest*
4927   eval "ac_cv_lib_$ac_lib_var=no"
4928 fi
4929 rm -f conftest*
4930 LIBS="$ac_save_LIBS"
4931
4932 fi
4933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4934   echo "$ac_t""yes" 1>&6
4935   
4936        cat >> confdefs.h <<\EOF
4937 #define HAVE_DLOPEN 1
4938 EOF
4939
4940 else
4941   echo "$ac_t""no" 1>&6
4942 fi
4943
4944
4945    # Some library-finding code we stole from Tcl.
4946    #--------------------------------------------------------------------
4947    #    Check for the existence of the -lsocket and -lnsl libraries.
4948    #    The order here is important, so that they end up in the right
4949    #    order in the command line generated by make.  Here are some
4950    #    special considerations:
4951    #    1. Use "connect" and "accept" to check for -lsocket, and
4952    #       "gethostbyname" to check for -lnsl.
4953    #    2. Use each function name only once:  can't redo a check because
4954    #       autoconf caches the results of the last check and won't redo it.
4955    #    3. Use -lnsl and -lsocket only if they supply procedures that
4956    #       aren't already present in the normal libraries.  This is because
4957    #       IRIX 5.2 has libraries, but they aren't needed and they're
4958    #       bogus:  they goof up name resolution if used.
4959    #    4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4960    #       To get around this problem, check for both libraries together
4961    #       if -lsocket doesn't work by itself.
4962    #--------------------------------------------------------------------
4963
4964    echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4965 echo "configure:4966: checking for socket libraries" >&5
4966 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4967   echo $ac_n "(cached) $ac_c" 1>&6
4968 else
4969   gcj_cv_lib_sockets=
4970      gcj_checkBoth=0
4971      unset ac_cv_func_connect
4972      echo $ac_n "checking for connect""... $ac_c" 1>&6
4973 echo "configure:4974: checking for connect" >&5
4974 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4975   echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977   cat > conftest.$ac_ext <<EOF
4978 #line 4979 "configure"
4979 #include "confdefs.h"
4980 /* System header to define __stub macros and hopefully few prototypes,
4981     which can conflict with char connect(); below.  */
4982 #include <assert.h>
4983 /* Override any gcc2 internal prototype to avoid an error.  */
4984 /* We use char because int might match the return type of a gcc2
4985     builtin and then its argument prototype would still apply.  */
4986 char connect();
4987
4988 int main() {
4989
4990 /* The GNU C library defines this for functions which it implements
4991     to always fail with ENOSYS.  Some functions are actually named
4992     something starting with __ and the normal name is an alias.  */
4993 #if defined (__stub_connect) || defined (__stub___connect)
4994 choke me
4995 #else
4996 connect();
4997 #endif
4998
4999 ; return 0; }
5000 EOF
5001 if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5002   rm -rf conftest*
5003   eval "ac_cv_func_connect=yes"
5004 else
5005   echo "configure: failed program was:" >&5
5006   cat conftest.$ac_ext >&5
5007   rm -rf conftest*
5008   eval "ac_cv_func_connect=no"
5009 fi
5010 rm -f conftest*
5011 fi
5012
5013 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5014   echo "$ac_t""yes" 1>&6
5015   gcj_checkSocket=0
5016 else
5017   echo "$ac_t""no" 1>&6
5018 gcj_checkSocket=1
5019 fi
5020
5021      if test "$gcj_checkSocket" = 1; then
5022          unset ac_cv_func_connect
5023          echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5024 echo "configure:5025: checking for main in -lsocket" >&5
5025 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
5026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5027   echo $ac_n "(cached) $ac_c" 1>&6
5028 else
5029   ac_save_LIBS="$LIBS"
5030 LIBS="-lsocket  $LIBS"
5031 cat > conftest.$ac_ext <<EOF
5032 #line 5033 "configure"
5033 #include "confdefs.h"
5034
5035 int main() {
5036 main()
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=yes"
5042 else
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   eval "ac_cv_lib_$ac_lib_var=no"
5047 fi
5048 rm -f conftest*
5049 LIBS="$ac_save_LIBS"
5050
5051 fi
5052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5053   echo "$ac_t""yes" 1>&6
5054   gcj_cv_lib_sockets="-lsocket"
5055 else
5056   echo "$ac_t""no" 1>&6
5057 gcj_checkBoth=1
5058 fi
5059
5060      fi
5061      if test "$gcj_checkBoth" = 1; then
5062          gcj_oldLibs=$LIBS
5063          LIBS="$LIBS -lsocket -lnsl"
5064          unset ac_cv_func_accept
5065          echo $ac_n "checking for accept""... $ac_c" 1>&6
5066 echo "configure:5067: checking for accept" >&5
5067 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
5068   echo $ac_n "(cached) $ac_c" 1>&6
5069 else
5070   cat > conftest.$ac_ext <<EOF
5071 #line 5072 "configure"
5072 #include "confdefs.h"
5073 /* System header to define __stub macros and hopefully few prototypes,
5074     which can conflict with char accept(); below.  */
5075 #include <assert.h>
5076 /* Override any gcc2 internal prototype to avoid an error.  */
5077 /* We use char because int might match the return type of a gcc2
5078     builtin and then its argument prototype would still apply.  */
5079 char accept();
5080
5081 int main() {
5082
5083 /* The GNU C library defines this for functions which it implements
5084     to always fail with ENOSYS.  Some functions are actually named
5085     something starting with __ and the normal name is an alias.  */
5086 #if defined (__stub_accept) || defined (__stub___accept)
5087 choke me
5088 #else
5089 accept();
5090 #endif
5091
5092 ; return 0; }
5093 EOF
5094 if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5095   rm -rf conftest*
5096   eval "ac_cv_func_accept=yes"
5097 else
5098   echo "configure: failed program was:" >&5
5099   cat conftest.$ac_ext >&5
5100   rm -rf conftest*
5101   eval "ac_cv_func_accept=no"
5102 fi
5103 rm -f conftest*
5104 fi
5105
5106 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
5107   echo "$ac_t""yes" 1>&6
5108   gcj_checkNsl=0
5109                         gcj_cv_lib_sockets="-lsocket -lnsl"
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113
5114          unset ac_cv_func_accept
5115          LIBS=$gcj_oldLibs
5116      fi
5117      unset ac_cv_func_gethostbyname
5118      gcj_oldLibs=$LIBS
5119      LIBS="$LIBS $gcj_cv_lib_sockets"
5120      echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5121 echo "configure:5122: checking for gethostbyname" >&5
5122 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125   cat > conftest.$ac_ext <<EOF
5126 #line 5127 "configure"
5127 #include "confdefs.h"
5128 /* System header to define __stub macros and hopefully few prototypes,
5129     which can conflict with char gethostbyname(); below.  */
5130 #include <assert.h>
5131 /* Override any gcc2 internal prototype to avoid an error.  */
5132 /* We use char because int might match the return type of a gcc2
5133     builtin and then its argument prototype would still apply.  */
5134 char gethostbyname();
5135
5136 int main() {
5137
5138 /* The GNU C library defines this for functions which it implements
5139     to always fail with ENOSYS.  Some functions are actually named
5140     something starting with __ and the normal name is an alias.  */
5141 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5142 choke me
5143 #else
5144 gethostbyname();
5145 #endif
5146
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   eval "ac_cv_func_gethostbyname=yes"
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   eval "ac_cv_func_gethostbyname=no"
5157 fi
5158 rm -f conftest*
5159 fi
5160
5161 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5162   echo "$ac_t""yes" 1>&6
5163   :
5164 else
5165   echo "$ac_t""no" 1>&6
5166 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5167 echo "configure:5168: checking for main in -lnsl" >&5
5168 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
5169 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5170   echo $ac_n "(cached) $ac_c" 1>&6
5171 else
5172   ac_save_LIBS="$LIBS"
5173 LIBS="-lnsl  $LIBS"
5174 cat > conftest.$ac_ext <<EOF
5175 #line 5176 "configure"
5176 #include "confdefs.h"
5177
5178 int main() {
5179 main()
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   eval "ac_cv_lib_$ac_lib_var=yes"
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   eval "ac_cv_lib_$ac_lib_var=no"
5190 fi
5191 rm -f conftest*
5192 LIBS="$ac_save_LIBS"
5193
5194 fi
5195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5196   echo "$ac_t""yes" 1>&6
5197   gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201
5202 fi
5203
5204      unset ac_cv_func_gethostbyname
5205      LIBS=$gcj_oldLIBS
5206    
5207 fi
5208
5209 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
5210    SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
5211
5212    if test "$with_system_zlib" = yes; then
5213       echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
5214 echo "configure:5215: checking for deflate in -lz" >&5
5215 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
5216 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5217   echo $ac_n "(cached) $ac_c" 1>&6
5218 else
5219   ac_save_LIBS="$LIBS"
5220 LIBS="-lz  $LIBS"
5221 cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224 /* Override any gcc2 internal prototype to avoid an error.  */
5225 /* We use char because int might match the return type of a gcc2
5226     builtin and then its argument prototype would still apply.  */
5227 char deflate();
5228
5229 int main() {
5230 deflate()
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5234   rm -rf conftest*
5235   eval "ac_cv_lib_$ac_lib_var=yes"
5236 else
5237   echo "configure: failed program was:" >&5
5238   cat conftest.$ac_ext >&5
5239   rm -rf conftest*
5240   eval "ac_cv_lib_$ac_lib_var=no"
5241 fi
5242 rm -f conftest*
5243 LIBS="$ac_save_LIBS"
5244
5245 fi
5246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5247   echo "$ac_t""yes" 1>&6
5248   ZLIBSPEC=-lz
5249 else
5250   echo "$ac_t""no" 1>&6
5251 ZLIBSPEC=-lzgcj
5252 fi
5253
5254    else
5255       ZLIBSPEC=-lzgcj
5256       ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
5257    fi
5258
5259    # On Solaris, and maybe other architectures, the Boehm collector
5260    # requires -ldl.
5261    if test "$GC" = boehm; then
5262       echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
5263 echo "configure:5264: checking for main in -ldl" >&5
5264 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
5265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268   ac_save_LIBS="$LIBS"
5269 LIBS="-ldl  $LIBS"
5270 cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273
5274 int main() {
5275 main()
5276 ; return 0; }
5277 EOF
5278 if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5279   rm -rf conftest*
5280   eval "ac_cv_lib_$ac_lib_var=yes"
5281 else
5282   echo "configure: failed program was:" >&5
5283   cat conftest.$ac_ext >&5
5284   rm -rf conftest*
5285   eval "ac_cv_lib_$ac_lib_var=no"
5286 fi
5287 rm -f conftest*
5288 LIBS="$ac_save_LIBS"
5289
5290 fi
5291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5292   echo "$ac_t""yes" 1>&6
5293   SYSTEMSPEC="$SYSTEMSPEC -ldl"
5294 else
5295   echo "$ac_t""no" 1>&6
5296 fi
5297
5298    fi
5299
5300    if test -z "${with_multisubdir}"; then
5301       builddotdot=.
5302    else
5303
5304       builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5305
5306    fi
5307    if test -x "${builddotdot}/../../gcc/gcj"; then
5308       dir="`cd ${builddotdot}/../../gcc && pwd`"
5309       GCJ="$dir/gcj -B`pwd`/ -B$dir/"
5310    else
5311       CANADIAN=yes
5312       NULL_TARGET=yes
5313       GCJ="gcj -B`pwd`/"
5314    fi
5315 fi
5316
5317 # Create it, so that compile/link tests don't fail
5318 test -f libgcj.spec || touch libgcj.spec
5319
5320 # We must search the source tree for java.lang, since we still don't
5321 # have libgcj.jar nor java/lang/*.class
5322 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
5323 CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
5324
5325 # Since some classes depend on this one, we need its source available
5326 # before we can do any GCJ compilation test :-(
5327 if test ! -f gnu/classpath/Configuration.java; then
5328   test -d gnu || mkdir gnu
5329   test -d gnu/classpath || mkdir gnu/classpath
5330   sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
5331         < $srcdir/gnu/classpath/Configuration.java.in \
5332         > gnu/classpath/Configuration.java
5333   # We do not want to redirect the output of the grep below to /dev/null,
5334   # but we add /dev/null to the input list so that grep will print the
5335   # filename of Configuration.java in case it finds any matches.
5336   if grep @ gnu/classpath/Configuration.java /dev/null; then
5337     { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
5338   fi
5339 fi
5340
5341 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
5342 set dummy ${ac_tool_prefix}gcj; ac_word=$2
5343 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5344 echo "configure:5345: checking for $ac_word" >&5
5345 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5346   echo $ac_n "(cached) $ac_c" 1>&6
5347 else
5348   if test -n "$GCJ"; then
5349   ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5350 else
5351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5352   ac_dummy="$PATH"
5353   for ac_dir in $ac_dummy; do
5354     test -z "$ac_dir" && ac_dir=.
5355     if test -f $ac_dir/$ac_word; then
5356       ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
5357       break
5358     fi
5359   done
5360   IFS="$ac_save_ifs"
5361 fi
5362 fi
5363 GCJ="$ac_cv_prog_GCJ"
5364 if test -n "$GCJ"; then
5365   echo "$ac_t""$GCJ" 1>&6
5366 else
5367   echo "$ac_t""no" 1>&6
5368 fi
5369
5370
5371 if test -z "$ac_cv_prog_GCJ"; then
5372 if test -n "$ac_tool_prefix"; then
5373   # Extract the first word of "gcj", so it can be a program name with args.
5374 set dummy gcj; ac_word=$2
5375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5376 echo "configure:5377: checking for $ac_word" >&5
5377 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   if test -n "$GCJ"; then
5381   ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5382 else
5383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5384   ac_dummy="$PATH"
5385   for ac_dir in $ac_dummy; do
5386     test -z "$ac_dir" && ac_dir=.
5387     if test -f $ac_dir/$ac_word; then
5388       ac_cv_prog_GCJ="gcj"
5389       break
5390     fi
5391   done
5392   IFS="$ac_save_ifs"
5393   test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
5394 fi
5395 fi
5396 GCJ="$ac_cv_prog_GCJ"
5397 if test -n "$GCJ"; then
5398   echo "$ac_t""$GCJ" 1>&6
5399 else
5400   echo "$ac_t""no" 1>&6
5401 fi
5402
5403 else
5404   GCJ="no"
5405 fi
5406 fi
5407
5408   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5409   
5410
5411
5412 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5413 lt_save_CC="$CC"
5414 lt_save_CFLAGS="$CFLAGS"
5415 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5416 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5417 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5418 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5419 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5420 deplibs_check_method="$deplibs_check_method" \
5421 file_magic_cmd="$file_magic_cmd" \
5422 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5423 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5424 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
5425 CC="$lt_save_CC"
5426 CFLAGS="$lt_save_CFLAGS"
5427
5428 # Redirect the config.log output again, so that the ltconfig log is not
5429 # clobbered by the next message.
5430 exec 5>>./config.log
5431
5432
5433
5434
5435 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
5436
5437 echo $ac_n "checking size of void *""... $ac_c" 1>&6
5438 echo "configure:5439: checking size of void *" >&5
5439 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5440   echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5442   if test "$cross_compiling" = yes; then
5443     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5444 else
5445   cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 #include <stdio.h>
5449 main()
5450 {
5451   FILE *f=fopen("conftestval", "w");
5452   if (!f) exit(1);
5453   fprintf(f, "%d\n", sizeof(void *));
5454   exit(0);
5455 }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5458 then
5459   ac_cv_sizeof_void_p=`cat conftestval`
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -fr conftest*
5464   ac_cv_sizeof_void_p=0
5465 fi
5466 rm -fr conftest*
5467 fi
5468
5469 fi
5470 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5471 cat >> confdefs.h <<EOF
5472 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5473 EOF
5474
5475
5476
5477 ZLIBS=
5478 ZDEPS=
5479 ZINCS=
5480 if test "x$ZLIBSPEC" = "x-lzgcj"; then
5481    # We include the path to the zlib build directory.
5482    # See Makefile.am to understand why.
5483    ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
5484    ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
5485    ZINCS='-I$(top_srcdir)/../zlib'
5486 else
5487    ZLIBS="$ZLIBSPEC"
5488 fi
5489
5490
5491
5492
5493
5494
5495
5496
5497 if test "$CANADIAN" = yes; then
5498   CANADIAN_TRUE=
5499   CANADIAN_FALSE='#'
5500 else
5501   CANADIAN_TRUE='#'
5502   CANADIAN_FALSE=
5503 fi
5504
5505
5506 if test "$NULL_TARGET" = yes; then
5507   NULL_TARGET_TRUE=
5508   NULL_TARGET_FALSE='#'
5509 else
5510   NULL_TARGET_TRUE='#'
5511   NULL_TARGET_FALSE=
5512 fi
5513
5514
5515 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5516   NATIVE_TRUE=
5517   NATIVE_FALSE='#'
5518 else
5519   NATIVE_TRUE='#'
5520   NATIVE_FALSE=
5521 fi
5522
5523
5524 if test -z "$with_cross_host"; then
5525   USE_LIBDIR_TRUE=
5526   USE_LIBDIR_FALSE='#'
5527 else
5528   USE_LIBDIR_TRUE='#'
5529   USE_LIBDIR_FALSE=
5530 fi
5531
5532
5533 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5534   NEEDS_DATA_START_TRUE=
5535   NEEDS_DATA_START_FALSE='#'
5536 else
5537   NEEDS_DATA_START_TRUE='#'
5538   NEEDS_DATA_START_FALSE=
5539 fi
5540
5541
5542 # Determine gcj version number.
5543
5544 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
5545
5546 cat >> confdefs.h <<EOF
5547 #define GCJVERSION "$gcjvers"
5548 EOF
5549
5550
5551
5552
5553
5554 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5555 echo "configure:5556: checking for g++ -ffloat-store bug" >&5
5556 save_CFLAGS="$CFLAGS"
5557 CFLAGS="-x c++ -O2 -ffloat-store"
5558 cat > conftest.$ac_ext <<EOF
5559 #line 5560 "configure"
5560 #include "confdefs.h"
5561 #include <math.h>
5562 int main() {
5563
5564 ; return 0; }
5565 EOF
5566 if { (eval echo configure:5567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5567   rm -rf conftest*
5568   echo "$ac_t""no" 1>&6
5569 else
5570   echo "configure: failed program was:" >&5
5571   cat conftest.$ac_ext >&5
5572   rm -rf conftest*
5573   cat >> confdefs.h <<\EOF
5574 #define __NO_MATH_INLINES 1
5575 EOF
5576
5577    echo "$ac_t""yes" 1>&6
5578 fi
5579 rm -f conftest*
5580 CFLAGS="$save_CFLAGS"
5581
5582 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
5583 do
5584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5586 echo "configure:5587: checking for $ac_hdr" >&5
5587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5588   echo $ac_n "(cached) $ac_c" 1>&6
5589 else
5590   cat > conftest.$ac_ext <<EOF
5591 #line 5592 "configure"
5592 #include "confdefs.h"
5593 #include <$ac_hdr>
5594 EOF
5595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5596 { (eval echo configure:5597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5598 if test -z "$ac_err"; then
5599   rm -rf conftest*
5600   eval "ac_cv_header_$ac_safe=yes"
5601 else
5602   echo "$ac_err" >&5
5603   echo "configure: failed program was:" >&5
5604   cat conftest.$ac_ext >&5
5605   rm -rf conftest*
5606   eval "ac_cv_header_$ac_safe=no"
5607 fi
5608 rm -f conftest*
5609 fi
5610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5611   echo "$ac_t""yes" 1>&6
5612     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5613   cat >> confdefs.h <<EOF
5614 #define $ac_tr_hdr 1
5615 EOF
5616  
5617 else
5618   echo "$ac_t""no" 1>&6
5619 fi
5620 done
5621
5622 for ac_hdr in dirent.h
5623 do
5624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5626 echo "configure:5627: checking for $ac_hdr" >&5
5627 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5628   echo $ac_n "(cached) $ac_c" 1>&6
5629 else
5630   cat > conftest.$ac_ext <<EOF
5631 #line 5632 "configure"
5632 #include "confdefs.h"
5633 #include <$ac_hdr>
5634 EOF
5635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5636 { (eval echo configure:5637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5638 if test -z "$ac_err"; then
5639   rm -rf conftest*
5640   eval "ac_cv_header_$ac_safe=yes"
5641 else
5642   echo "$ac_err" >&5
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_header_$ac_safe=no"
5647 fi
5648 rm -f conftest*
5649 fi
5650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5651   echo "$ac_t""yes" 1>&6
5652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5653   cat >> confdefs.h <<EOF
5654 #define $ac_tr_hdr 1
5655 EOF
5656  
5657 else
5658   echo "$ac_t""no" 1>&6
5659 fi
5660 done
5661
5662 for ac_hdr in inttypes.h
5663 do
5664 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5665 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5666 echo "configure:5667: checking for $ac_hdr" >&5
5667 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5668   echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670   cat > conftest.$ac_ext <<EOF
5671 #line 5672 "configure"
5672 #include "confdefs.h"
5673 #include <$ac_hdr>
5674 EOF
5675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5676 { (eval echo configure:5677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5678 if test -z "$ac_err"; then
5679   rm -rf conftest*
5680   eval "ac_cv_header_$ac_safe=yes"
5681 else
5682   echo "$ac_err" >&5
5683   echo "configure: failed program was:" >&5
5684   cat conftest.$ac_ext >&5
5685   rm -rf conftest*
5686   eval "ac_cv_header_$ac_safe=no"
5687 fi
5688 rm -f conftest*
5689 fi
5690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5691   echo "$ac_t""yes" 1>&6
5692     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5693   cat >> confdefs.h <<EOF
5694 #define $ac_tr_hdr 1
5695 EOF
5696  
5697     cat >> confdefs.h <<\EOF
5698 #define HAVE_INTTYPES_H 1
5699 EOF
5700
5701     cat >> confdefs.h <<\EOF
5702 #define JV_HAVE_INTTYPES_H 1
5703 EOF
5704
5705
5706 else
5707   echo "$ac_t""no" 1>&6
5708 fi
5709 done
5710
5711
5712 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5713 echo "configure:5714: checking for ANSI C header files" >&5
5714 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5715   echo $ac_n "(cached) $ac_c" 1>&6
5716 else
5717   cat > conftest.$ac_ext <<EOF
5718 #line 5719 "configure"
5719 #include "confdefs.h"
5720 #include <stdlib.h>
5721 #include <stdarg.h>
5722 #include <string.h>
5723 #include <float.h>
5724 EOF
5725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5726 { (eval echo configure:5727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5728 if test -z "$ac_err"; then
5729   rm -rf conftest*
5730   ac_cv_header_stdc=yes
5731 else
5732   echo "$ac_err" >&5
5733   echo "configure: failed program was:" >&5
5734   cat conftest.$ac_ext >&5
5735   rm -rf conftest*
5736   ac_cv_header_stdc=no
5737 fi
5738 rm -f conftest*
5739
5740 if test $ac_cv_header_stdc = yes; then
5741   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5742 cat > conftest.$ac_ext <<EOF
5743 #line 5744 "configure"
5744 #include "confdefs.h"
5745 #include <string.h>
5746 EOF
5747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5748   egrep "memchr" >/dev/null 2>&1; then
5749   :
5750 else
5751   rm -rf conftest*
5752   ac_cv_header_stdc=no
5753 fi
5754 rm -f conftest*
5755
5756 fi
5757
5758 if test $ac_cv_header_stdc = yes; then
5759   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5760 cat > conftest.$ac_ext <<EOF
5761 #line 5762 "configure"
5762 #include "confdefs.h"
5763 #include <stdlib.h>
5764 EOF
5765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5766   egrep "free" >/dev/null 2>&1; then
5767   :
5768 else
5769   rm -rf conftest*
5770   ac_cv_header_stdc=no
5771 fi
5772 rm -f conftest*
5773
5774 fi
5775
5776 if test $ac_cv_header_stdc = yes; then
5777   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5778 if test "$cross_compiling" = yes; then
5779   :
5780 else
5781   cat > conftest.$ac_ext <<EOF
5782 #line 5783 "configure"
5783 #include "confdefs.h"
5784 #include <ctype.h>
5785 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5786 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5787 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5788 int main () { int i; for (i = 0; i < 256; i++)
5789 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5790 exit (0); }
5791
5792 EOF
5793 if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5794 then
5795   :
5796 else
5797   echo "configure: failed program was:" >&5
5798   cat conftest.$ac_ext >&5
5799   rm -fr conftest*
5800   ac_cv_header_stdc=no
5801 fi
5802 rm -fr conftest*
5803 fi
5804
5805 fi
5806 fi
5807
5808 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5809 if test $ac_cv_header_stdc = yes; then
5810   cat >> confdefs.h <<\EOF
5811 #define STDC_HEADERS 1
5812 EOF
5813
5814 fi
5815
5816 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5817 echo "configure:5818: checking for ssize_t" >&5
5818 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5819   echo $ac_n "(cached) $ac_c" 1>&6
5820 else
5821   cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 #include <sys/types.h>
5825 #if STDC_HEADERS
5826 #include <stdlib.h>
5827 #include <stddef.h>
5828 #endif
5829 EOF
5830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5831   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5832   rm -rf conftest*
5833   ac_cv_type_ssize_t=yes
5834 else
5835   rm -rf conftest*
5836   ac_cv_type_ssize_t=no
5837 fi
5838 rm -f conftest*
5839
5840 fi
5841 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5842 if test $ac_cv_type_ssize_t = no; then
5843   cat >> confdefs.h <<\EOF
5844 #define ssize_t int
5845 EOF
5846
5847 fi
5848
5849
5850 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5851 echo "configure:5852: checking for in_addr_t" >&5
5852 cat > conftest.$ac_ext <<EOF
5853 #line 5854 "configure"
5854 #include "confdefs.h"
5855 #include <sys/types.h>
5856 #if STDC_HEADERS
5857 #include <stdlib.h>
5858 #include <stddef.h>
5859 #endif
5860 #if HAVE_NETINET_IN_H
5861 #include <netinet/in.h>
5862 #endif
5863 int main() {
5864 in_addr_t foo;
5865 ; return 0; }
5866 EOF
5867 if { (eval echo configure:5868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5868   rm -rf conftest*
5869   cat >> confdefs.h <<\EOF
5870 #define HAVE_IN_ADDR_T 1
5871 EOF
5872
5873    echo "$ac_t""yes" 1>&6
5874 else
5875   echo "configure: failed program was:" >&5
5876   cat conftest.$ac_ext >&5
5877   rm -rf conftest*
5878   echo "$ac_t""no" 1>&6
5879 fi
5880 rm -f conftest*
5881
5882 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5883 echo "configure:5884: checking whether struct ip_mreq is in netinet/in.h" >&5
5884 cat > conftest.$ac_ext <<EOF
5885 #line 5886 "configure"
5886 #include "confdefs.h"
5887 #include <netinet/in.h>
5888 int main() {
5889 struct ip_mreq mreq;
5890 ; return 0; }
5891 EOF
5892 if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5893   rm -rf conftest*
5894   cat >> confdefs.h <<\EOF
5895 #define HAVE_STRUCT_IP_MREQ 1
5896 EOF
5897
5898    echo "$ac_t""yes" 1>&6
5899 else
5900   echo "configure: failed program was:" >&5
5901   cat conftest.$ac_ext >&5
5902   rm -rf conftest*
5903   echo "$ac_t""no" 1>&6
5904 fi
5905 rm -f conftest*
5906
5907 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
5908 echo "configure:5909: checking whether struct ipv6_mreq is in netinet/in.h" >&5
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 #include <netinet/in.h>
5913 int main() {
5914 struct ipv6_mreq mreq6;
5915 ; return 0; }
5916 EOF
5917 if { (eval echo configure:5918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5918   rm -rf conftest*
5919   cat >> confdefs.h <<\EOF
5920 #define HAVE_STRUCT_IPV6_MREQ 1
5921 EOF
5922
5923    echo "$ac_t""yes" 1>&6
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927   rm -rf conftest*
5928   echo "$ac_t""no" 1>&6
5929 fi
5930 rm -f conftest*
5931
5932 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
5933 echo "configure:5934: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
5934 cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5937 #include <netinet/in.h>
5938 int main() {
5939 struct sockaddr_in6 addr6;
5940 ; return 0; }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5943   rm -rf conftest*
5944   cat >> confdefs.h <<\EOF
5945 #define HAVE_INET6 1
5946 EOF
5947
5948    echo "$ac_t""yes" 1>&6
5949 else
5950   echo "configure: failed program was:" >&5
5951   cat conftest.$ac_ext >&5
5952   rm -rf conftest*
5953   echo "$ac_t""no" 1>&6
5954 fi
5955 rm -f conftest*
5956
5957 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
5958 echo "configure:5959: checking for socklen_t in sys/socket.h" >&5
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 #define _POSIX_PII_SOCKET
5963 #include <sys/types.h>
5964 #include <sys/socket.h>
5965 int main() {
5966 socklen_t x = 5;
5967 ; return 0; }
5968 EOF
5969 if { (eval echo configure:5970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5970   rm -rf conftest*
5971   cat >> confdefs.h <<\EOF
5972 #define HAVE_SOCKLEN_T 1
5973 EOF
5974
5975    echo "$ac_t""yes" 1>&6
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   echo "$ac_t""no" 1>&6
5981 fi
5982 rm -f conftest*
5983
5984 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
5985 echo "configure:5986: checking for tm_gmtoff in struct tm" >&5
5986 cat > conftest.$ac_ext <<EOF
5987 #line 5988 "configure"
5988 #include "confdefs.h"
5989 #include <time.h>
5990 int main() {
5991 struct tm tim; tim.tm_gmtoff = 0;
5992 ; return 0; }
5993 EOF
5994 if { (eval echo configure:5995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5995   rm -rf conftest*
5996   cat >> confdefs.h <<\EOF
5997 #define STRUCT_TM_HAS_GMTOFF 1
5998 EOF
5999
6000    echo "$ac_t""yes" 1>&6
6001 else
6002   echo "configure: failed program was:" >&5
6003   cat conftest.$ac_ext >&5
6004   rm -rf conftest*
6005   echo "$ac_t""no" 1>&6
6006    echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
6007 echo "configure:6008: checking for global timezone variable" >&5
6008             cat > conftest.$ac_ext <<EOF
6009 #line 6010 "configure"
6010 #include "confdefs.h"
6011 #include <time.h>
6012 int main() {
6013 long z2 = timezone;
6014 ; return 0; }
6015 EOF
6016 if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6017   rm -rf conftest*
6018   cat >> confdefs.h <<\EOF
6019 #define HAVE_TIMEZONE 1
6020 EOF
6021
6022       echo "$ac_t""yes" 1>&6
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   echo "$ac_t""no" 1>&6
6028 fi
6029 rm -f conftest*
6030 fi
6031 rm -f conftest*
6032
6033 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6034 # for constant arguments.  Useless!
6035 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6036 echo "configure:6037: checking for working alloca.h" >&5
6037 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6038   echo $ac_n "(cached) $ac_c" 1>&6
6039 else
6040   cat > conftest.$ac_ext <<EOF
6041 #line 6042 "configure"
6042 #include "confdefs.h"
6043 #include <alloca.h>
6044 int main() {
6045 void *p = alloca(2 * sizeof(int));
6046 ; return 0; }
6047 EOF
6048 if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6049   rm -rf conftest*
6050   ac_cv_header_alloca_h=yes
6051 else
6052   echo "configure: failed program was:" >&5
6053   cat conftest.$ac_ext >&5
6054   rm -rf conftest*
6055   ac_cv_header_alloca_h=no
6056 fi
6057 rm -f conftest*
6058 fi
6059
6060 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6061 if test $ac_cv_header_alloca_h = yes; then
6062   cat >> confdefs.h <<\EOF
6063 #define HAVE_ALLOCA_H 1
6064 EOF
6065
6066 fi
6067
6068 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6069 echo "configure:6070: checking for alloca" >&5
6070 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6071   echo $ac_n "(cached) $ac_c" 1>&6
6072 else
6073   cat > conftest.$ac_ext <<EOF
6074 #line 6075 "configure"
6075 #include "confdefs.h"
6076
6077 #ifdef __GNUC__
6078 # define alloca __builtin_alloca
6079 #else
6080 # ifdef _MSC_VER
6081 #  include <malloc.h>
6082 #  define alloca _alloca
6083 # else
6084 #  if HAVE_ALLOCA_H
6085 #   include <alloca.h>
6086 #  else
6087 #   ifdef _AIX
6088  #pragma alloca
6089 #   else
6090 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6091 char *alloca ();
6092 #    endif
6093 #   endif
6094 #  endif
6095 # endif
6096 #endif
6097
6098 int main() {
6099 char *p = (char *) alloca(1);
6100 ; return 0; }
6101 EOF
6102 if { (eval echo configure:6103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6103   rm -rf conftest*
6104   ac_cv_func_alloca_works=yes
6105 else
6106   echo "configure: failed program was:" >&5
6107   cat conftest.$ac_ext >&5
6108   rm -rf conftest*
6109   ac_cv_func_alloca_works=no
6110 fi
6111 rm -f conftest*
6112 fi
6113
6114 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6115 if test $ac_cv_func_alloca_works = yes; then
6116   cat >> confdefs.h <<\EOF
6117 #define HAVE_ALLOCA 1
6118 EOF
6119
6120 fi
6121
6122 if test $ac_cv_func_alloca_works = no; then
6123   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6124   # that cause trouble.  Some versions do not even contain alloca or
6125   # contain a buggy version.  If you still want to use their alloca,
6126   # use ar to extract alloca.o from them instead of compiling alloca.c.
6127   ALLOCA=alloca.${ac_objext}
6128   cat >> confdefs.h <<\EOF
6129 #define C_ALLOCA 1
6130 EOF
6131
6132
6133 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6134 echo "configure:6135: checking whether alloca needs Cray hooks" >&5
6135 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6136   echo $ac_n "(cached) $ac_c" 1>&6
6137 else
6138   cat > conftest.$ac_ext <<EOF
6139 #line 6140 "configure"
6140 #include "confdefs.h"
6141 #if defined(CRAY) && ! defined(CRAY2)
6142 webecray
6143 #else
6144 wenotbecray
6145 #endif
6146
6147 EOF
6148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6149   egrep "webecray" >/dev/null 2>&1; then
6150   rm -rf conftest*
6151   ac_cv_os_cray=yes
6152 else
6153   rm -rf conftest*
6154   ac_cv_os_cray=no
6155 fi
6156 rm -f conftest*
6157
6158 fi
6159
6160 echo "$ac_t""$ac_cv_os_cray" 1>&6
6161 if test $ac_cv_os_cray = yes; then
6162 for ac_func in _getb67 GETB67 getb67; do
6163   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6164 echo "configure:6165: checking for $ac_func" >&5
6165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6166   echo $ac_n "(cached) $ac_c" 1>&6
6167 else
6168   cat > conftest.$ac_ext <<EOF
6169 #line 6170 "configure"
6170 #include "confdefs.h"
6171 /* System header to define __stub macros and hopefully few prototypes,
6172     which can conflict with char $ac_func(); below.  */
6173 #include <assert.h>
6174 /* Override any gcc2 internal prototype to avoid an error.  */
6175 /* We use char because int might match the return type of a gcc2
6176     builtin and then its argument prototype would still apply.  */
6177 char $ac_func();
6178
6179 int main() {
6180
6181 /* The GNU C library defines this for functions which it implements
6182     to always fail with ENOSYS.  Some functions are actually named
6183     something starting with __ and the normal name is an alias.  */
6184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6185 choke me
6186 #else
6187 $ac_func();
6188 #endif
6189
6190 ; return 0; }
6191 EOF
6192 if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6193   rm -rf conftest*
6194   eval "ac_cv_func_$ac_func=yes"
6195 else
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_func_$ac_func=no"
6200 fi
6201 rm -f conftest*
6202 fi
6203
6204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6205   echo "$ac_t""yes" 1>&6
6206   cat >> confdefs.h <<EOF
6207 #define CRAY_STACKSEG_END $ac_func
6208 EOF
6209
6210   break
6211 else
6212   echo "$ac_t""no" 1>&6
6213 fi
6214
6215 done
6216 fi
6217
6218 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6219 echo "configure:6220: checking stack direction for C alloca" >&5
6220 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   if test "$cross_compiling" = yes; then
6224   ac_cv_c_stack_direction=0
6225 else
6226   cat > conftest.$ac_ext <<EOF
6227 #line 6228 "configure"
6228 #include "confdefs.h"
6229 find_stack_direction ()
6230 {
6231   static char *addr = 0;
6232   auto char dummy;
6233   if (addr == 0)
6234     {
6235       addr = &dummy;
6236       return find_stack_direction ();
6237     }
6238   else
6239     return (&dummy > addr) ? 1 : -1;
6240 }
6241 main ()
6242 {
6243   exit (find_stack_direction() < 0);
6244 }
6245 EOF
6246 if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6247 then
6248   ac_cv_c_stack_direction=1
6249 else
6250   echo "configure: failed program was:" >&5
6251   cat conftest.$ac_ext >&5
6252   rm -fr conftest*
6253   ac_cv_c_stack_direction=-1
6254 fi
6255 rm -fr conftest*
6256 fi
6257
6258 fi
6259
6260 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6261 cat >> confdefs.h <<EOF
6262 #define STACK_DIRECTION $ac_cv_c_stack_direction
6263 EOF
6264
6265 fi
6266
6267
6268 for ac_prog in perl
6269 do
6270 # Extract the first word of "$ac_prog", so it can be a program name with args.
6271 set dummy $ac_prog; ac_word=$2
6272 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6273 echo "configure:6274: checking for $ac_word" >&5
6274 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
6275   echo $ac_n "(cached) $ac_c" 1>&6
6276 else
6277   if test -n "$PERL"; then
6278   ac_cv_prog_PERL="$PERL" # Let the user override the test.
6279 else
6280   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6281   ac_dummy="$PATH"
6282   for ac_dir in $ac_dummy; do
6283     test -z "$ac_dir" && ac_dir=.
6284     if test -f $ac_dir/$ac_word; then
6285       ac_cv_prog_PERL="$ac_prog"
6286       break
6287     fi
6288   done
6289   IFS="$ac_save_ifs"
6290 fi
6291 fi
6292 PERL="$ac_cv_prog_PERL"
6293 if test -n "$PERL"; then
6294   echo "$ac_t""$PERL" 1>&6
6295 else
6296   echo "$ac_t""no" 1>&6
6297 fi
6298
6299 test -n "$PERL" && break
6300 done
6301 test -n "$PERL" || PERL="false"
6302
6303
6304 SYSDEP_SOURCES=
6305
6306 case "${host}" in
6307  i?86-*-linux*)
6308     SIGNAL_HANDLER=include/i386-signal.h
6309     ;;
6310  sparc-sun-solaris*)
6311     SIGNAL_HANDLER=include/sparc-signal.h
6312     ;;
6313 # ia64-*)
6314 #    SYSDEP_SOURCES=sysdep/ia64.c
6315 #    test -d sysdep || mkdir sysdep
6316 #    ;;
6317  powerpc-*-linux*)
6318     SIGNAL_HANDLER=include/dwarf2-signal.h
6319     ;;
6320  alpha*-*-linux*)
6321     SIGNAL_HANDLER=include/dwarf2-signal.h
6322     ;;
6323  mingw)
6324     SIGNAL_HANDLER=include/win32-signal.h
6325     ;;
6326  *)
6327     SIGNAL_HANDLER=include/default-signal.h
6328     ;;
6329 esac
6330
6331 # If we're using sjlj exceptions, forget what we just learned.
6332 if test "$enable_sjlj_exceptions" = yes; then
6333    SIGNAL_HANDLER=include/default-signal.h
6334 fi
6335
6336
6337
6338
6339
6340 if test "${multilib}" = "yes"; then
6341   multilib_arg="--enable-multilib"
6342 else
6343   multilib_arg=
6344 fi
6345
6346 # If we find X, set shell vars x_includes and x_libraries to the
6347 # paths, otherwise set no_x=yes.
6348 # Uses ac_ vars as temps to allow command line to override cache and checks.
6349 # --without-x overrides everything else, but does not touch the cache.
6350 echo $ac_n "checking for X""... $ac_c" 1>&6
6351 echo "configure:6352: checking for X" >&5
6352
6353 # Check whether --with-x or --without-x was given.
6354 if test "${with_x+set}" = set; then
6355   withval="$with_x"
6356   :
6357 fi
6358
6359 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6360 if test "x$with_x" = xno; then
6361   # The user explicitly disabled X.
6362   have_x=disabled
6363 else
6364   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6365     # Both variables are already set.
6366     have_x=yes
6367   else
6368 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6369   echo $ac_n "(cached) $ac_c" 1>&6
6370 else
6371   # One or both of the vars are not set, and there is no cached value.
6372 ac_x_includes=NO ac_x_libraries=NO
6373 rm -fr conftestdir
6374 if mkdir conftestdir; then
6375   cd conftestdir
6376   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6377   cat > Imakefile <<'EOF'
6378 acfindx:
6379         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6380 EOF
6381   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6382     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6383     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6384     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6385     for ac_extension in a so sl; do
6386       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6387         test -f $ac_im_libdir/libX11.$ac_extension; then
6388         ac_im_usrlibdir=$ac_im_libdir; break
6389       fi
6390     done
6391     # Screen out bogus values from the imake configuration.  They are
6392     # bogus both because they are the default anyway, and because
6393     # using them would break gcc on systems where it needs fixed includes.
6394     case "$ac_im_incroot" in
6395         /usr/include) ;;
6396         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6397     esac
6398     case "$ac_im_usrlibdir" in
6399         /usr/lib | /lib) ;;
6400         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6401     esac
6402   fi
6403   cd ..
6404   rm -fr conftestdir
6405 fi
6406
6407 if test "$ac_x_includes" = NO; then
6408   # Guess where to find include files, by looking for this one X11 .h file.
6409   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6410
6411   # First, try using that file with no special directory specified.
6412 cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415 #include <$x_direct_test_include>
6416 EOF
6417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6418 { (eval echo configure:6419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6420 if test -z "$ac_err"; then
6421   rm -rf conftest*
6422   # We can compile using X headers with no special include directory.
6423 ac_x_includes=
6424 else
6425   echo "$ac_err" >&5
6426   echo "configure: failed program was:" >&5
6427   cat conftest.$ac_ext >&5
6428   rm -rf conftest*
6429   # Look for the header file in a standard set of common directories.
6430 # Check X11 before X11Rn because it is often a symlink to the current release.
6431   for ac_dir in               \
6432     /usr/X11/include          \
6433     /usr/X11R6/include        \
6434     /usr/X11R5/include        \
6435     /usr/X11R4/include        \
6436                               \
6437     /usr/include/X11          \
6438     /usr/include/X11R6        \
6439     /usr/include/X11R5        \
6440     /usr/include/X11R4        \
6441                               \
6442     /usr/local/X11/include    \
6443     /usr/local/X11R6/include  \
6444     /usr/local/X11R5/include  \
6445     /usr/local/X11R4/include  \
6446                               \
6447     /usr/local/include/X11    \
6448     /usr/local/include/X11R6  \
6449     /usr/local/include/X11R5  \
6450     /usr/local/include/X11R4  \
6451                               \
6452     /usr/X386/include         \
6453     /usr/x386/include         \
6454     /usr/XFree86/include/X11  \
6455                               \
6456     /usr/include              \
6457     /usr/local/include        \
6458     /usr/unsupported/include  \
6459     /usr/athena/include       \
6460     /usr/local/x11r5/include  \
6461     /usr/lpp/Xamples/include  \
6462                               \
6463     /usr/openwin/include      \
6464     /usr/openwin/share/include \
6465     ; \
6466   do
6467     if test -r "$ac_dir/$x_direct_test_include"; then
6468       ac_x_includes=$ac_dir
6469       break
6470     fi
6471   done
6472 fi
6473 rm -f conftest*
6474 fi # $ac_x_includes = NO
6475
6476 if test "$ac_x_libraries" = NO; then
6477   # Check for the libraries.
6478
6479   test -z "$x_direct_test_library" && x_direct_test_library=Xt
6480   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6481
6482   # See if we find them without any special options.
6483   # Don't add to $LIBS permanently.
6484   ac_save_LIBS="$LIBS"
6485   LIBS="-l$x_direct_test_library $LIBS"
6486 cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489
6490 int main() {
6491 ${x_direct_test_function}()
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   LIBS="$ac_save_LIBS"
6497 # We can link X programs with no special library path.
6498 ac_x_libraries=
6499 else
6500   echo "configure: failed program was:" >&5
6501   cat conftest.$ac_ext >&5
6502   rm -rf conftest*
6503   LIBS="$ac_save_LIBS"
6504 # First see if replacing the include by lib works.
6505 # Check X11 before X11Rn because it is often a symlink to the current release.
6506 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6507     /usr/X11/lib          \
6508     /usr/X11R6/lib        \
6509     /usr/X11R5/lib        \
6510     /usr/X11R4/lib        \
6511                           \
6512     /usr/lib/X11          \
6513     /usr/lib/X11R6        \
6514     /usr/lib/X11R5        \
6515     /usr/lib/X11R4        \
6516                           \
6517     /usr/local/X11/lib    \
6518     /usr/local/X11R6/lib  \
6519     /usr/local/X11R5/lib  \
6520     /usr/local/X11R4/lib  \
6521                           \
6522     /usr/local/lib/X11    \
6523     /usr/local/lib/X11R6  \
6524     /usr/local/lib/X11R5  \
6525     /usr/local/lib/X11R4  \
6526                           \
6527     /usr/X386/lib         \
6528     /usr/x386/lib         \
6529     /usr/XFree86/lib/X11  \
6530                           \
6531     /usr/lib              \
6532     /usr/local/lib        \
6533     /usr/unsupported/lib  \
6534     /usr/athena/lib       \
6535     /usr/local/x11r5/lib  \
6536     /usr/lpp/Xamples/lib  \
6537     /lib/usr/lib/X11      \
6538                           \
6539     /usr/openwin/lib      \
6540     /usr/openwin/share/lib \
6541     ; \
6542 do
6543   for ac_extension in a so sl; do
6544     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6545       ac_x_libraries=$ac_dir
6546       break 2
6547     fi
6548   done
6549 done
6550 fi
6551 rm -f conftest*
6552 fi # $ac_x_libraries = NO
6553
6554 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6555   # Didn't find X anywhere.  Cache the known absence of X.
6556   ac_cv_have_x="have_x=no"
6557 else
6558   # Record where we found X for the cache.
6559   ac_cv_have_x="have_x=yes \
6560                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6561 fi
6562 fi
6563   fi
6564   eval "$ac_cv_have_x"
6565 fi # $with_x != no
6566
6567 if test "$have_x" != yes; then
6568   echo "$ac_t""$have_x" 1>&6
6569   no_x=yes
6570 else
6571   # If each of the values was on the command line, it overrides each guess.
6572   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6573   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6574   # Update the cache value to reflect the command line values.
6575   ac_cv_have_x="have_x=yes \
6576                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6577   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6578 fi
6579
6580 if test "$no_x" = yes; then
6581   # Not all programs may use this symbol, but it does not hurt to define it.
6582   cat >> confdefs.h <<\EOF
6583 #define X_DISPLAY_MISSING 1
6584 EOF
6585
6586   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6587 else
6588   if test -n "$x_includes"; then
6589     X_CFLAGS="$X_CFLAGS -I$x_includes"
6590   fi
6591
6592   # It would also be nice to do this for all -L options, not just this one.
6593   if test -n "$x_libraries"; then
6594     X_LIBS="$X_LIBS -L$x_libraries"
6595     # For Solaris; some versions of Sun CC require a space after -R and
6596     # others require no space.  Words are not sufficient . . . .
6597     case "`(uname -sr) 2>/dev/null`" in
6598     "SunOS 5"*)
6599       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6600 echo "configure:6601: checking whether -R must be followed by a space" >&5
6601       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6602       cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605
6606 int main() {
6607
6608 ; return 0; }
6609 EOF
6610 if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6611   rm -rf conftest*
6612   ac_R_nospace=yes
6613 else
6614   echo "configure: failed program was:" >&5
6615   cat conftest.$ac_ext >&5
6616   rm -rf conftest*
6617   ac_R_nospace=no
6618 fi
6619 rm -f conftest*
6620       if test $ac_R_nospace = yes; then
6621         echo "$ac_t""no" 1>&6
6622         X_LIBS="$X_LIBS -R$x_libraries"
6623       else
6624         LIBS="$ac_xsave_LIBS -R $x_libraries"
6625         cat > conftest.$ac_ext <<EOF
6626 #line 6627 "configure"
6627 #include "confdefs.h"
6628
6629 int main() {
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   ac_R_space=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   ac_R_space=no
6641 fi
6642 rm -f conftest*
6643         if test $ac_R_space = yes; then
6644           echo "$ac_t""yes" 1>&6
6645           X_LIBS="$X_LIBS -R $x_libraries"
6646         else
6647           echo "$ac_t""neither works" 1>&6
6648         fi
6649       fi
6650       LIBS="$ac_xsave_LIBS"
6651     esac
6652   fi
6653
6654   # Check for system-dependent libraries X programs must link with.
6655   # Do this before checking for the system-independent R6 libraries
6656   # (-lICE), since we may need -lsocket or whatever for X linking.
6657
6658   if test "$ISC" = yes; then
6659     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6660   else
6661     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6662     # libraries were built with DECnet support.  And karl@cs.umb.edu says
6663     # the Alpha needs dnet_stub (dnet does not exist).
6664     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6665 echo "configure:6666: checking for dnet_ntoa in -ldnet" >&5
6666 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6667 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   ac_save_LIBS="$LIBS"
6671 LIBS="-ldnet  $LIBS"
6672 cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 /* We use char because int might match the return type of a gcc2
6677     builtin and then its argument prototype would still apply.  */
6678 char dnet_ntoa();
6679
6680 int main() {
6681 dnet_ntoa()
6682 ; return 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685   rm -rf conftest*
6686   eval "ac_cv_lib_$ac_lib_var=yes"
6687 else
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_lib_$ac_lib_var=no"
6692 fi
6693 rm -f conftest*
6694 LIBS="$ac_save_LIBS"
6695
6696 fi
6697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6698   echo "$ac_t""yes" 1>&6
6699   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6700 else
6701   echo "$ac_t""no" 1>&6
6702 fi
6703
6704     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6705       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6706 echo "configure:6707: checking for dnet_ntoa in -ldnet_stub" >&5
6707 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6708 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6709   echo $ac_n "(cached) $ac_c" 1>&6
6710 else
6711   ac_save_LIBS="$LIBS"
6712 LIBS="-ldnet_stub  $LIBS"
6713 cat > conftest.$ac_ext <<EOF
6714 #line 6715 "configure"
6715 #include "confdefs.h"
6716 /* Override any gcc2 internal prototype to avoid an error.  */
6717 /* We use char because int might match the return type of a gcc2
6718     builtin and then its argument prototype would still apply.  */
6719 char dnet_ntoa();
6720
6721 int main() {
6722 dnet_ntoa()
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   eval "ac_cv_lib_$ac_lib_var=yes"
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_lib_$ac_lib_var=no"
6733 fi
6734 rm -f conftest*
6735 LIBS="$ac_save_LIBS"
6736
6737 fi
6738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6739   echo "$ac_t""yes" 1>&6
6740   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6741 else
6742   echo "$ac_t""no" 1>&6
6743 fi
6744
6745     fi
6746
6747     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6748     # to get the SysV transport functions.
6749     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6750     # needs -lnsl.
6751     # The nsl library prevents programs from opening the X display
6752     # on Irix 5.2, according to dickey@clark.net.
6753     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6754 echo "configure:6755: checking for gethostbyname" >&5
6755 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6756   echo $ac_n "(cached) $ac_c" 1>&6
6757 else
6758   cat > conftest.$ac_ext <<EOF
6759 #line 6760 "configure"
6760 #include "confdefs.h"
6761 /* System header to define __stub macros and hopefully few prototypes,
6762     which can conflict with char gethostbyname(); below.  */
6763 #include <assert.h>
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char gethostbyname();
6768
6769 int main() {
6770
6771 /* The GNU C library defines this for functions which it implements
6772     to always fail with ENOSYS.  Some functions are actually named
6773     something starting with __ and the normal name is an alias.  */
6774 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6775 choke me
6776 #else
6777 gethostbyname();
6778 #endif
6779
6780 ; return 0; }
6781 EOF
6782 if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6783   rm -rf conftest*
6784   eval "ac_cv_func_gethostbyname=yes"
6785 else
6786   echo "configure: failed program was:" >&5
6787   cat conftest.$ac_ext >&5
6788   rm -rf conftest*
6789   eval "ac_cv_func_gethostbyname=no"
6790 fi
6791 rm -f conftest*
6792 fi
6793
6794 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6795   echo "$ac_t""yes" 1>&6
6796   :
6797 else
6798   echo "$ac_t""no" 1>&6
6799 fi
6800
6801     if test $ac_cv_func_gethostbyname = no; then
6802       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6803 echo "configure:6804: checking for gethostbyname in -lnsl" >&5
6804 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6806   echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808   ac_save_LIBS="$LIBS"
6809 LIBS="-lnsl  $LIBS"
6810 cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6813 /* Override any gcc2 internal prototype to avoid an error.  */
6814 /* We use char because int might match the return type of a gcc2
6815     builtin and then its argument prototype would still apply.  */
6816 char gethostbyname();
6817
6818 int main() {
6819 gethostbyname()
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   eval "ac_cv_lib_$ac_lib_var=yes"
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   eval "ac_cv_lib_$ac_lib_var=no"
6830 fi
6831 rm -f conftest*
6832 LIBS="$ac_save_LIBS"
6833
6834 fi
6835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6836   echo "$ac_t""yes" 1>&6
6837   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6838 else
6839   echo "$ac_t""no" 1>&6
6840 fi
6841
6842     fi
6843
6844     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6845     # socket/setsockopt and other routines are undefined under SCO ODT
6846     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6847     # on later versions), says simon@lia.di.epfl.ch: it contains
6848     # gethostby* variants that don't use the nameserver (or something).
6849     # -lsocket must be given before -lnsl if both are needed.
6850     # We assume that if connect needs -lnsl, so does gethostbyname.
6851     echo $ac_n "checking for connect""... $ac_c" 1>&6
6852 echo "configure:6853: checking for connect" >&5
6853 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 /* System header to define __stub macros and hopefully few prototypes,
6860     which can conflict with char connect(); below.  */
6861 #include <assert.h>
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char connect();
6866
6867 int main() {
6868
6869 /* The GNU C library defines this for functions which it implements
6870     to always fail with ENOSYS.  Some functions are actually named
6871     something starting with __ and the normal name is an alias.  */
6872 #if defined (__stub_connect) || defined (__stub___connect)
6873 choke me
6874 #else
6875 connect();
6876 #endif
6877
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6881   rm -rf conftest*
6882   eval "ac_cv_func_connect=yes"
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   eval "ac_cv_func_connect=no"
6888 fi
6889 rm -f conftest*
6890 fi
6891
6892 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6893   echo "$ac_t""yes" 1>&6
6894   :
6895 else
6896   echo "$ac_t""no" 1>&6
6897 fi
6898
6899     if test $ac_cv_func_connect = no; then
6900       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6901 echo "configure:6902: checking for connect in -lsocket" >&5
6902 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6903 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6904   echo $ac_n "(cached) $ac_c" 1>&6
6905 else
6906   ac_save_LIBS="$LIBS"
6907 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6908 cat > conftest.$ac_ext <<EOF
6909 #line 6910 "configure"
6910 #include "confdefs.h"
6911 /* Override any gcc2 internal prototype to avoid an error.  */
6912 /* We use char because int might match the return type of a gcc2
6913     builtin and then its argument prototype would still apply.  */
6914 char connect();
6915
6916 int main() {
6917 connect()
6918 ; return 0; }
6919 EOF
6920 if { (eval echo configure:6921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6921   rm -rf conftest*
6922   eval "ac_cv_lib_$ac_lib_var=yes"
6923 else
6924   echo "configure: failed program was:" >&5
6925   cat conftest.$ac_ext >&5
6926   rm -rf conftest*
6927   eval "ac_cv_lib_$ac_lib_var=no"
6928 fi
6929 rm -f conftest*
6930 LIBS="$ac_save_LIBS"
6931
6932 fi
6933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6934   echo "$ac_t""yes" 1>&6
6935   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6936 else
6937   echo "$ac_t""no" 1>&6
6938 fi
6939
6940     fi
6941
6942     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6943     echo $ac_n "checking for remove""... $ac_c" 1>&6
6944 echo "configure:6945: checking for remove" >&5
6945 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6946   echo $ac_n "(cached) $ac_c" 1>&6
6947 else
6948   cat > conftest.$ac_ext <<EOF
6949 #line 6950 "configure"
6950 #include "confdefs.h"
6951 /* System header to define __stub macros and hopefully few prototypes,
6952     which can conflict with char remove(); below.  */
6953 #include <assert.h>
6954 /* Override any gcc2 internal prototype to avoid an error.  */
6955 /* We use char because int might match the return type of a gcc2
6956     builtin and then its argument prototype would still apply.  */
6957 char remove();
6958
6959 int main() {
6960
6961 /* The GNU C library defines this for functions which it implements
6962     to always fail with ENOSYS.  Some functions are actually named
6963     something starting with __ and the normal name is an alias.  */
6964 #if defined (__stub_remove) || defined (__stub___remove)
6965 choke me
6966 #else
6967 remove();
6968 #endif
6969
6970 ; return 0; }
6971 EOF
6972 if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6973   rm -rf conftest*
6974   eval "ac_cv_func_remove=yes"
6975 else
6976   echo "configure: failed program was:" >&5
6977   cat conftest.$ac_ext >&5
6978   rm -rf conftest*
6979   eval "ac_cv_func_remove=no"
6980 fi
6981 rm -f conftest*
6982 fi
6983
6984 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6985   echo "$ac_t""yes" 1>&6
6986   :
6987 else
6988   echo "$ac_t""no" 1>&6
6989 fi
6990
6991     if test $ac_cv_func_remove = no; then
6992       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6993 echo "configure:6994: checking for remove in -lposix" >&5
6994 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6995 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6996   echo $ac_n "(cached) $ac_c" 1>&6
6997 else
6998   ac_save_LIBS="$LIBS"
6999 LIBS="-lposix  $LIBS"
7000 cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003 /* Override any gcc2 internal prototype to avoid an error.  */
7004 /* We use char because int might match the return type of a gcc2
7005     builtin and then its argument prototype would still apply.  */
7006 char remove();
7007
7008 int main() {
7009 remove()
7010 ; return 0; }
7011 EOF
7012 if { (eval echo configure:7013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7013   rm -rf conftest*
7014   eval "ac_cv_lib_$ac_lib_var=yes"
7015 else
7016   echo "configure: failed program was:" >&5
7017   cat conftest.$ac_ext >&5
7018   rm -rf conftest*
7019   eval "ac_cv_lib_$ac_lib_var=no"
7020 fi
7021 rm -f conftest*
7022 LIBS="$ac_save_LIBS"
7023
7024 fi
7025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7026   echo "$ac_t""yes" 1>&6
7027   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7028 else
7029   echo "$ac_t""no" 1>&6
7030 fi
7031
7032     fi
7033
7034     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7035     echo $ac_n "checking for shmat""... $ac_c" 1>&6
7036 echo "configure:7037: checking for shmat" >&5
7037 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7038   echo $ac_n "(cached) $ac_c" 1>&6
7039 else
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043 /* System header to define __stub macros and hopefully few prototypes,
7044     which can conflict with char shmat(); below.  */
7045 #include <assert.h>
7046 /* Override any gcc2 internal prototype to avoid an error.  */
7047 /* We use char because int might match the return type of a gcc2
7048     builtin and then its argument prototype would still apply.  */
7049 char shmat();
7050
7051 int main() {
7052
7053 /* The GNU C library defines this for functions which it implements
7054     to always fail with ENOSYS.  Some functions are actually named
7055     something starting with __ and the normal name is an alias.  */
7056 #if defined (__stub_shmat) || defined (__stub___shmat)
7057 choke me
7058 #else
7059 shmat();
7060 #endif
7061
7062 ; return 0; }
7063 EOF
7064 if { (eval echo configure:7065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7065   rm -rf conftest*
7066   eval "ac_cv_func_shmat=yes"
7067 else
7068   echo "configure: failed program was:" >&5
7069   cat conftest.$ac_ext >&5
7070   rm -rf conftest*
7071   eval "ac_cv_func_shmat=no"
7072 fi
7073 rm -f conftest*
7074 fi
7075
7076 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7077   echo "$ac_t""yes" 1>&6
7078   :
7079 else
7080   echo "$ac_t""no" 1>&6
7081 fi
7082
7083     if test $ac_cv_func_shmat = no; then
7084       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7085 echo "configure:7086: checking for shmat in -lipc" >&5
7086 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7088   echo $ac_n "(cached) $ac_c" 1>&6
7089 else
7090   ac_save_LIBS="$LIBS"
7091 LIBS="-lipc  $LIBS"
7092 cat > conftest.$ac_ext <<EOF
7093 #line 7094 "configure"
7094 #include "confdefs.h"
7095 /* Override any gcc2 internal prototype to avoid an error.  */
7096 /* We use char because int might match the return type of a gcc2
7097     builtin and then its argument prototype would still apply.  */
7098 char shmat();
7099
7100 int main() {
7101 shmat()
7102 ; return 0; }
7103 EOF
7104 if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7105   rm -rf conftest*
7106   eval "ac_cv_lib_$ac_lib_var=yes"
7107 else
7108   echo "configure: failed program was:" >&5
7109   cat conftest.$ac_ext >&5
7110   rm -rf conftest*
7111   eval "ac_cv_lib_$ac_lib_var=no"
7112 fi
7113 rm -f conftest*
7114 LIBS="$ac_save_LIBS"
7115
7116 fi
7117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7118   echo "$ac_t""yes" 1>&6
7119   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7120 else
7121   echo "$ac_t""no" 1>&6
7122 fi
7123
7124     fi
7125   fi
7126
7127   # Check for libraries that X11R6 Xt/Xaw programs need.
7128   ac_save_LDFLAGS="$LDFLAGS"
7129   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7130   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7131   # check for ICE first), but we must link in the order -lSM -lICE or
7132   # we get undefined symbols.  So assume we have SM if we have ICE.
7133   # These have to be linked with before -lX11, unlike the other
7134   # libraries we check for below, so use a different variable.
7135   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7136   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7137 echo "configure:7138: checking for IceConnectionNumber in -lICE" >&5
7138 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7140   echo $ac_n "(cached) $ac_c" 1>&6
7141 else
7142   ac_save_LIBS="$LIBS"
7143 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* Override any gcc2 internal prototype to avoid an error.  */
7148 /* We use char because int might match the return type of a gcc2
7149     builtin and then its argument prototype would still apply.  */
7150 char IceConnectionNumber();
7151
7152 int main() {
7153 IceConnectionNumber()
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_lib_$ac_lib_var=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_lib_$ac_lib_var=no"
7164 fi
7165 rm -f conftest*
7166 LIBS="$ac_save_LIBS"
7167
7168 fi
7169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7170   echo "$ac_t""yes" 1>&6
7171   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7172 else
7173   echo "$ac_t""no" 1>&6
7174 fi
7175
7176   LDFLAGS="$ac_save_LDFLAGS"
7177
7178 fi
7179
7180
7181 # Check whether --enable-java-awt or --disable-java-awt was given.
7182 if test "${enable_java_awt+set}" = set; then
7183   enableval="$enable_java_awt"
7184   :
7185 fi
7186
7187
7188 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
7189 use_xlib_awt=""
7190 use_gtk_awt=""
7191
7192 for peer in $peerlibs ; do
7193   case $peer in
7194     xlib)
7195       if test "$no_x" = yes; then
7196         echo "*** xlib peers requested but no X library available" 1>&2
7197         exit 1
7198       else
7199         use_xlib_awt="yes"
7200       fi
7201       ;;
7202     gtk)
7203       # Nothing, yet...
7204       ;;
7205     no)
7206       use_xlib_awt=
7207       use_gtk_awt=
7208       break
7209       ;;
7210     *)
7211       echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
7212       exit 1
7213   esac
7214 done
7215
7216
7217
7218 if test "$use_xlib_awt" = yes; then
7219   XLIB_AWT_TRUE=
7220   XLIB_AWT_FALSE='#'
7221 else
7222   XLIB_AWT_TRUE='#'
7223   XLIB_AWT_FALSE=
7224 fi
7225
7226
7227 if test "$use_gtk_awt" = yes; then
7228   GTK_AWT_TRUE=
7229   GTK_AWT_FALSE='#'
7230 else
7231   GTK_AWT_TRUE='#'
7232   GTK_AWT_FALSE=
7233 fi
7234
7235
7236 here=`pwd`
7237
7238
7239 # We get this from the environment.
7240
7241
7242 trap '' 1 2 15
7243 cat > confcache <<\EOF
7244 # This file is a shell script that caches the results of configure
7245 # tests run on this system so they can be shared between configure
7246 # scripts and configure runs.  It is not useful on other systems.
7247 # If it contains results you don't want to keep, you may remove or edit it.
7248 #
7249 # By default, configure uses ./config.cache as the cache file,
7250 # creating it if it does not exist already.  You can give configure
7251 # the --cache-file=FILE option to use a different cache file; that is
7252 # what configure does when it calls configure scripts in
7253 # subdirectories, so they share the cache.
7254 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7255 # config.status only pays attention to the cache file if you give it the
7256 # --recheck option to rerun configure.
7257 #
7258 EOF
7259 # The following way of writing the cache mishandles newlines in values,
7260 # but we know of no workaround that is simple, portable, and efficient.
7261 # So, don't put newlines in cache variables' values.
7262 # Ultrix sh set writes to stderr and can't be redirected directly,
7263 # and sets the high bit in the cache file unless we assign to the vars.
7264 (set) 2>&1 |
7265   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7266   *ac_space=\ *)
7267     # `set' does not quote correctly, so add quotes (double-quote substitution
7268     # turns \\\\ into \\, and sed turns \\ into \).
7269     sed -n \
7270       -e "s/'/'\\\\''/g" \
7271       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7272     ;;
7273   *)
7274     # `set' quotes correctly as required by POSIX, so do not add quotes.
7275     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7276     ;;
7277   esac >> confcache
7278 if cmp -s $cache_file confcache; then
7279   :
7280 else
7281   if test -w $cache_file; then
7282     echo "updating cache $cache_file"
7283     cat confcache > $cache_file
7284   else
7285     echo "not updating unwritable cache $cache_file"
7286   fi
7287 fi
7288 rm -f confcache
7289
7290 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7291
7292 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7293 # Let make expand exec_prefix.
7294 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7295
7296 # Any assignment to VPATH causes Sun make to only execute
7297 # the first set of double-colon rules, so remove it if not needed.
7298 # If there is a colon in the path, we need to keep it.
7299 if test "x$srcdir" = x.; then
7300   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7301 fi
7302
7303 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7304
7305 DEFS=-DHAVE_CONFIG_H
7306
7307 # Without the "./", some shells look in PATH for config.status.
7308 : ${CONFIG_STATUS=./config.status}
7309
7310 echo creating $CONFIG_STATUS
7311 rm -f $CONFIG_STATUS
7312 cat > $CONFIG_STATUS <<EOF
7313 #! /bin/sh
7314 # Generated automatically by configure.
7315 # Run this file to recreate the current configuration.
7316 # This directory was configured as follows,
7317 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7318 #
7319 # $0 $ac_configure_args
7320 #
7321 # Compiler output produced by configure, useful for debugging
7322 # configure, is in ./config.log if it exists.
7323
7324 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7325 for ac_option
7326 do
7327   case "\$ac_option" in
7328   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7329     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7330     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7331   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7332     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7333     exit 0 ;;
7334   -help | --help | --hel | --he | --h)
7335     echo "\$ac_cs_usage"; exit 0 ;;
7336   *) echo "\$ac_cs_usage"; exit 1 ;;
7337   esac
7338 done
7339
7340 ac_given_srcdir=$srcdir
7341 ac_given_INSTALL="$INSTALL"
7342
7343 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
7344 EOF
7345 cat >> $CONFIG_STATUS <<EOF
7346
7347 # Protect against being on the right side of a sed subst in config.status.
7348 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7349  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7350 $ac_vpsub
7351 $extrasub
7352 s%@SHELL@%$SHELL%g
7353 s%@CFLAGS@%$CFLAGS%g
7354 s%@CPPFLAGS@%$CPPFLAGS%g
7355 s%@CXXFLAGS@%$CXXFLAGS%g
7356 s%@FFLAGS@%$FFLAGS%g
7357 s%@DEFS@%$DEFS%g
7358 s%@LDFLAGS@%$LDFLAGS%g
7359 s%@LIBS@%$LIBS%g
7360 s%@exec_prefix@%$exec_prefix%g
7361 s%@prefix@%$prefix%g
7362 s%@program_transform_name@%$program_transform_name%g
7363 s%@bindir@%$bindir%g
7364 s%@sbindir@%$sbindir%g
7365 s%@libexecdir@%$libexecdir%g
7366 s%@datadir@%$datadir%g
7367 s%@sysconfdir@%$sysconfdir%g
7368 s%@sharedstatedir@%$sharedstatedir%g
7369 s%@localstatedir@%$localstatedir%g
7370 s%@libdir@%$libdir%g
7371 s%@includedir@%$includedir%g
7372 s%@oldincludedir@%$oldincludedir%g
7373 s%@infodir@%$infodir%g
7374 s%@mandir@%$mandir%g
7375 s%@LN_S@%$LN_S%g
7376 s%@libgcj_basedir@%$libgcj_basedir%g
7377 s%@mkinstalldirs@%$mkinstalldirs%g
7378 s%@host@%$host%g
7379 s%@host_alias@%$host_alias%g
7380 s%@host_cpu@%$host_cpu%g
7381 s%@host_vendor@%$host_vendor%g
7382 s%@host_os@%$host_os%g
7383 s%@target@%$target%g
7384 s%@target_alias@%$target_alias%g
7385 s%@target_cpu@%$target_cpu%g
7386 s%@target_vendor@%$target_vendor%g
7387 s%@target_os@%$target_os%g
7388 s%@build@%$build%g
7389 s%@build_alias@%$build_alias%g
7390 s%@build_cpu@%$build_cpu%g
7391 s%@build_vendor@%$build_vendor%g
7392 s%@build_os@%$build_os%g
7393 s%@CC@%$CC%g
7394 s%@CXX@%$CXX%g
7395 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7396 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7397 s%@INSTALL_DATA@%$INSTALL_DATA%g
7398 s%@PACKAGE@%$PACKAGE%g
7399 s%@VERSION@%$VERSION%g
7400 s%@ACLOCAL@%$ACLOCAL%g
7401 s%@AUTOCONF@%$AUTOCONF%g
7402 s%@AUTOMAKE@%$AUTOMAKE%g
7403 s%@AUTOHEADER@%$AUTOHEADER%g
7404 s%@MAKEINFO@%$MAKEINFO%g
7405 s%@SET_MAKE@%$SET_MAKE%g
7406 s%@AS@%$AS%g
7407 s%@AR@%$AR%g
7408 s%@RANLIB@%$RANLIB%g
7409 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7410 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7411 s%@MAINT@%$MAINT%g
7412 s%@EXEEXT@%$EXEEXT%g
7413 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7414 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7415 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7416 s%@INCLTDL@%$INCLTDL%g
7417 s%@LIBLTDL@%$LIBLTDL%g
7418 s%@DIRLTDL@%$DIRLTDL%g
7419 s%@OBJEXT@%$OBJEXT%g
7420 s%@STRIP@%$STRIP%g
7421 s%@LIBTOOL@%$LIBTOOL%g
7422 s%@CXXCPP@%$CXXCPP%g
7423 s%@subdirs@%$subdirs%g
7424 s%@COMPPATH@%$COMPPATH%g
7425 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7426 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7427 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7428 s%@LIBFFI@%$LIBFFI%g
7429 s%@LIBFFIINCS@%$LIBFFIINCS%g
7430 s%@CPP@%$CPP%g
7431 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7432 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7433 s%@ZLIBSPEC@%$ZLIBSPEC%g
7434 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7435 s%@GCLIBS@%$GCLIBS%g
7436 s%@GCINCS@%$GCINCS%g
7437 s%@GCDEPS@%$GCDEPS%g
7438 s%@GCOBJS@%$GCOBJS%g
7439 s%@GCSPEC@%$GCSPEC%g
7440 s%@JC1GCSPEC@%$JC1GCSPEC%g
7441 s%@GCTESTSPEC@%$GCTESTSPEC%g
7442 s%@THREADLIBS@%$THREADLIBS%g
7443 s%@THREADINCS@%$THREADINCS%g
7444 s%@THREADDEPS@%$THREADDEPS%g
7445 s%@THREADOBJS@%$THREADOBJS%g
7446 s%@THREADSPEC@%$THREADSPEC%g
7447 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7448 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7449 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7450 s%@LIBICONV@%$LIBICONV%g
7451 s%@GCJ@%$GCJ%g
7452 s%@GCJFLAGS@%$GCJFLAGS%g
7453 s%@ZLIBS@%$ZLIBS%g
7454 s%@ZDEPS@%$ZDEPS%g
7455 s%@ZINCS@%$ZINCS%g
7456 s%@DIVIDESPEC@%$DIVIDESPEC%g
7457 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7458 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7459 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7460 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7461 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7462 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7463 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7464 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
7465 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
7466 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7467 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7468 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7469 s%@GCJVERSION@%$GCJVERSION%g
7470 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7471 s%@ALLOCA@%$ALLOCA%g
7472 s%@PERL@%$PERL%g
7473 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7474 s%@X_CFLAGS@%$X_CFLAGS%g
7475 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7476 s%@X_LIBS@%$X_LIBS%g
7477 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7478 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7479 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7480 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7481 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7482 s%@here@%$here%g
7483
7484 CEOF
7485 EOF
7486
7487 cat >> $CONFIG_STATUS <<\EOF
7488
7489 # Split the substitutions into bite-sized pieces for seds with
7490 # small command number limits, like on Digital OSF/1 and HP-UX.
7491 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7492 ac_file=1 # Number of current file.
7493 ac_beg=1 # First line for current file.
7494 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7495 ac_more_lines=:
7496 ac_sed_cmds=""
7497 while $ac_more_lines; do
7498   if test $ac_beg -gt 1; then
7499     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7500   else
7501     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7502   fi
7503   if test ! -s conftest.s$ac_file; then
7504     ac_more_lines=false
7505     rm -f conftest.s$ac_file
7506   else
7507     if test -z "$ac_sed_cmds"; then
7508       ac_sed_cmds="sed -f conftest.s$ac_file"
7509     else
7510       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7511     fi
7512     ac_file=`expr $ac_file + 1`
7513     ac_beg=$ac_end
7514     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7515   fi
7516 done
7517 if test -z "$ac_sed_cmds"; then
7518   ac_sed_cmds=cat
7519 fi
7520 EOF
7521
7522 cat >> $CONFIG_STATUS <<EOF
7523
7524 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7525 EOF
7526 cat >> $CONFIG_STATUS <<\EOF
7527 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7528   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7529   case "$ac_file" in
7530   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7531        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7532   *) ac_file_in="${ac_file}.in" ;;
7533   esac
7534
7535   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7536
7537   # Remove last slash and all that follows it.  Not all systems have dirname.
7538   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7539   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7540     # The file is in a subdirectory.
7541     test ! -d "$ac_dir" && mkdir "$ac_dir"
7542     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7543     # A "../" for each directory in $ac_dir_suffix.
7544     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7545   else
7546     ac_dir_suffix= ac_dots=
7547   fi
7548
7549   case "$ac_given_srcdir" in
7550   .)  srcdir=.
7551       if test -z "$ac_dots"; then top_srcdir=.
7552       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7553   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7554   *) # Relative path.
7555     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7556     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7557   esac
7558
7559   case "$ac_given_INSTALL" in
7560   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7561   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7562   esac
7563
7564   echo creating "$ac_file"
7565   rm -f "$ac_file"
7566   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7567   case "$ac_file" in
7568   *Makefile*) ac_comsub="1i\\
7569 # $configure_input" ;;
7570   *) ac_comsub= ;;
7571   esac
7572
7573   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7574   sed -e "$ac_comsub
7575 s%@configure_input@%$configure_input%g
7576 s%@srcdir@%$srcdir%g
7577 s%@top_srcdir@%$top_srcdir%g
7578 s%@INSTALL@%$INSTALL%g
7579 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7580 fi; done
7581 rm -f conftest.s*
7582
7583 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7584 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7585 #
7586 # ac_d sets the value in "#define NAME VALUE" lines.
7587 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7588 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7589 ac_dC='\3'
7590 ac_dD='%g'
7591 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7592 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7593 ac_uB='\([      ]\)%\1#\2define\3'
7594 ac_uC=' '
7595 ac_uD='\4%g'
7596 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7597 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7598 ac_eB='$%\1#\2define\3'
7599 ac_eC=' '
7600 ac_eD='%g'
7601
7602 if test "${CONFIG_HEADERS+set}" != set; then
7603 EOF
7604 cat >> $CONFIG_STATUS <<EOF
7605   CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7606 EOF
7607 cat >> $CONFIG_STATUS <<\EOF
7608 fi
7609 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7610   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7611   case "$ac_file" in
7612   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7613        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7614   *) ac_file_in="${ac_file}.in" ;;
7615   esac
7616
7617   echo creating $ac_file
7618
7619   rm -f conftest.frag conftest.in conftest.out
7620   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7621   cat $ac_file_inputs > conftest.in
7622
7623 EOF
7624
7625 # Transform confdefs.h into a sed script conftest.vals that substitutes
7626 # the proper values into config.h.in to produce config.h.  And first:
7627 # Protect against being on the right side of a sed subst in config.status.
7628 # Protect against being in an unquoted here document in config.status.
7629 rm -f conftest.vals
7630 cat > conftest.hdr <<\EOF
7631 s/[\\&%]/\\&/g
7632 s%[\\$`]%\\&%g
7633 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7634 s%ac_d%ac_u%gp
7635 s%ac_u%ac_e%gp
7636 EOF
7637 sed -n -f conftest.hdr confdefs.h > conftest.vals
7638 rm -f conftest.hdr
7639
7640 # This sed command replaces #undef with comments.  This is necessary, for
7641 # example, in the case of _POSIX_SOURCE, which is predefined and required
7642 # on some systems where configure will not decide to define it.
7643 cat >> conftest.vals <<\EOF
7644 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7645 EOF
7646
7647 # Break up conftest.vals because some shells have a limit on
7648 # the size of here documents, and old seds have small limits too.
7649
7650 rm -f conftest.tail
7651 while :
7652 do
7653   ac_lines=`grep -c . conftest.vals`
7654   # grep -c gives empty output for an empty file on some AIX systems.
7655   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7656   # Write a limited-size here document to conftest.frag.
7657   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7658   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7659   echo 'CEOF
7660   sed -f conftest.frag conftest.in > conftest.out
7661   rm -f conftest.in
7662   mv conftest.out conftest.in
7663 ' >> $CONFIG_STATUS
7664   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7665   rm -f conftest.vals
7666   mv conftest.tail conftest.vals
7667 done
7668 rm -f conftest.vals
7669
7670 cat >> $CONFIG_STATUS <<\EOF
7671   rm -f conftest.frag conftest.h
7672   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7673   cat conftest.in >> conftest.h
7674   rm -f conftest.in
7675   if cmp -s $ac_file conftest.h 2>/dev/null; then
7676     echo "$ac_file is unchanged"
7677     rm -f conftest.h
7678   else
7679     # Remove last slash and all that follows it.  Not all systems have dirname.
7680       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7681       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7682       # The file is in a subdirectory.
7683       test ! -d "$ac_dir" && mkdir "$ac_dir"
7684     fi
7685     rm -f $ac_file
7686     mv conftest.h $ac_file
7687   fi
7688 fi; done
7689
7690 EOF
7691
7692 cat >> $CONFIG_STATUS <<EOF
7693 ac_sources="java/io/natFileDescriptor${PLATFORM}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
7694 ac_dests="java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc include/java-gc.h include/java-threads.h include/java-signal.h"
7695 EOF
7696
7697 cat >> $CONFIG_STATUS <<\EOF
7698 srcdir=$ac_given_srcdir
7699 while test -n "$ac_sources"; do
7700   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7701   set $ac_sources; ac_source=$1; shift; ac_sources=$*
7702
7703   echo "linking $srcdir/$ac_source to $ac_dest"
7704
7705   if test ! -r $srcdir/$ac_source; then
7706     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7707   fi
7708   rm -f $ac_dest
7709
7710   # Make relative symlinks.
7711   # Remove last slash and all that follows it.  Not all systems have dirname.
7712   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7713   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7714     # The dest file is in a subdirectory.
7715     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7716     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7717     # A "../" for each directory in $ac_dest_dir_suffix.
7718     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7719   else
7720     ac_dest_dir_suffix= ac_dots=
7721   fi
7722
7723   case "$srcdir" in
7724   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7725   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7726   esac
7727
7728   # Make a symlink if possible; otherwise try a hard link.
7729   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7730     ln $srcdir/$ac_source $ac_dest; then :
7731   else
7732     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7733   fi
7734 done
7735 EOF
7736 cat >> $CONFIG_STATUS <<EOF
7737
7738 srcdir=${srcdir}
7739 host=${host}
7740 target=${target}
7741 with_multisubdir=${with_multisubdir}
7742 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7743 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7744 libgcj_basedir=${libgcj_basedir}
7745 CC="${CC}"
7746 CXX="${CXX}"
7747
7748 EOF
7749 cat >> $CONFIG_STATUS <<\EOF
7750 am_indx=1
7751 for am_file in include/config.h gcj/libgcj-config.h; do
7752   case " $CONFIG_HEADERS " in
7753   *" $am_file "*)
7754     echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7755     ;;
7756   esac
7757   am_indx=`expr "$am_indx" + 1`
7758 done
7759 # Only add multilib support code if we just rebuilt top-level Makefile.
7760 case " $CONFIG_FILES " in
7761  *" Makefile "*)
7762    ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7763    ;;
7764 esac
7765
7766 # Make subdirectories and `.d' files.  Look in both srcdir and
7767 # builddir for the .java files.
7768 h=`pwd`
7769 : > deps.mk
7770 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
7771   find . \( -name '*.java' -o -name '*.cc' \) -print) | \
7772    fgrep -v testsuite | \
7773    sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
7774    while read f; do
7775       echo "include $f" >> deps.mk
7776       test -f $f || {
7777
7778          d=`echo $f | sed -e 's,/[^/]*$,,'`
7779
7780          if test ! -d $d; then
7781            $libgcj_basedir/../mkinstalldirs $d
7782          fi;
7783          echo > $f
7784       }
7785    done
7786
7787 exit 0
7788 EOF
7789 chmod +x $CONFIG_STATUS
7790 rm -fr confdefs* $ac_clean_files
7791 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7792
7793 if test "$no_recursion" != yes; then
7794
7795   # Remove --cache-file and --srcdir arguments so they do not pile up.
7796   ac_sub_configure_args=
7797   ac_prev=
7798   for ac_arg in $ac_configure_args; do
7799     if test -n "$ac_prev"; then
7800       ac_prev=
7801       continue
7802     fi
7803     case "$ac_arg" in
7804     -cache-file | --cache-file | --cache-fil | --cache-fi \
7805     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7806       ac_prev=cache_file ;;
7807     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7808     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7809       ;;
7810     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7811       ac_prev=srcdir ;;
7812     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7813       ;;
7814     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7815     esac
7816   done
7817
7818   for ac_config_dir in $DIRLTDL; do
7819
7820     # Do not complain, so a configure script can configure whichever
7821     # parts of a large source tree are present.
7822     if test ! -d $srcdir/$ac_config_dir; then
7823       continue
7824     fi
7825
7826     echo configuring in $ac_config_dir
7827
7828     case "$srcdir" in
7829     .) ;;
7830     *)
7831       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7832       else
7833         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7834       fi
7835       ;;
7836     esac
7837
7838     ac_popdir=`pwd`
7839     cd $ac_config_dir
7840
7841       # A "../" for each directory in /$ac_config_dir.
7842       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7843
7844     case "$srcdir" in
7845     .) # No --srcdir option.  We are building in place.
7846       ac_sub_srcdir=$srcdir ;;
7847     /*) # Absolute path.
7848       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7849     *) # Relative path.
7850       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7851     esac
7852
7853     # Check for guested configure; otherwise get Cygnus style configure.
7854     if test -f $ac_sub_srcdir/configure; then
7855       ac_sub_configure=$ac_sub_srcdir/configure
7856     elif test -f $ac_sub_srcdir/configure.in; then
7857       ac_sub_configure=$ac_configure
7858     else
7859       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7860       ac_sub_configure=
7861     fi
7862
7863     # The recursion is here.
7864     if test -n "$ac_sub_configure"; then
7865
7866       # Make the cache file name correct relative to the subdirectory.
7867       case "$cache_file" in
7868       /*) ac_sub_cache_file=$cache_file ;;
7869       *) # Relative path.
7870         ac_sub_cache_file="$ac_dots$cache_file" ;;
7871       esac
7872   case "$ac_given_INSTALL" in
7873         [/$]*) INSTALL="$ac_given_INSTALL" ;;
7874         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7875         esac
7876
7877       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7878       # The eval makes quoting arguments work.
7879       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7880       then :
7881       else
7882         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7883       fi
7884     fi
7885
7886     cd $ac_popdir
7887   done
7888 fi
7889