OSDN Git Service

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