OSDN Git Service

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