OSDN Git Service

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