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