OSDN Git Service

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