OSDN Git Service

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