OSDN Git Service

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