]> git.ipfire.org Git - thirdparty/gcc.git/blame - libjava/configure
Makefile.in: Rebuilt.
[thirdparty/gcc.git] / libjava / configure
CommitLineData
ee9dd372
TT
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
a3ffcff3 4# Generated automatically using autoconf version 2.13
ee9dd372
TT
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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-target-subdir=SUBDIR Configuring in a subdirectory"
16ac_help="$ac_help
17 --with-cross-host=HOST Configuring with a cross compiler"
18ac_help="$ac_help
19 --enable-multilib build many library versions (default)"
20ac_help="$ac_help
21 --enable-maintainer-mode enable make rules and dependencies not useful
22 (and sometimes confusing) to the casual installer"
a3ffcff3
TT
23ac_help="$ac_help
24 --enable-shared[=PKGS] build shared libraries [default=yes]"
25ac_help="$ac_help
26 --enable-static[=PKGS] build static libraries [default=yes]"
01b02b11
TT
27ac_help="$ac_help
28 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
a3ffcff3
TT
29ac_help="$ac_help
30 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
01b02b11
TT
31ac_help="$ac_help
32 --disable-libtool-lock force libtool not to do file locking"
ee9dd372
TT
33ac_help="$ac_help
34 --enable-fast-character Prefer speed over size for Character"
35ac_help="$ac_help
36 --enable-libgcj-debug Enable runtime debugging code"
37ac_help="$ac_help
38 --with-ecos Enable runtime eCos target support."
f994389b
TT
39ac_help="$ac_help
40 --with-system-zlib Use installed libz"
ee9dd372
TT
41ac_help="$ac_help
42 --enable-java-gc=TYPE choose garbage collector [boehm]"
43ac_help="$ac_help
44 --enable-threads=TYPE choose threading package"
45
46# Initialize some variables set by options.
47# The variables have the same names as the options, with
48# dashes changed to underlines.
49build=NONE
50cache_file=./config.cache
51exec_prefix=NONE
52host=NONE
53no_create=
54nonopt=NONE
55no_recursion=
56prefix=NONE
57program_prefix=NONE
58program_suffix=NONE
59program_transform_name=s,x,x,
60silent=
61site=
62srcdir=
63target=NONE
64verbose=
65x_includes=NONE
66x_libraries=NONE
67bindir='${exec_prefix}/bin'
68sbindir='${exec_prefix}/sbin'
69libexecdir='${exec_prefix}/libexec'
70datadir='${prefix}/share'
71sysconfdir='${prefix}/etc'
72sharedstatedir='${prefix}/com'
73localstatedir='${prefix}/var'
74libdir='${exec_prefix}/lib'
75includedir='${prefix}/include'
76oldincludedir='/usr/include'
77infodir='${prefix}/info'
78mandir='${prefix}/man'
79
80# Initialize some other variables.
81subdirs=
82MFLAGS= MAKEFLAGS=
83SHELL=${CONFIG_SHELL-/bin/sh}
84# Maximum number of lines to put in a shell here document.
85ac_max_here_lines=12
86
87ac_prev=
88for ac_option
89do
90
91 # If the previous option needs an argument, assign it.
92 if test -n "$ac_prev"; then
93 eval "$ac_prev=\$ac_option"
94 ac_prev=
95 continue
96 fi
97
98 case "$ac_option" in
99 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
100 *) ac_optarg= ;;
101 esac
102
103 # Accept the important Cygnus configure options, so we can diagnose typos.
104
105 case "$ac_option" in
106
107 -bindir | --bindir | --bindi | --bind | --bin | --bi)
108 ac_prev=bindir ;;
109 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
110 bindir="$ac_optarg" ;;
111
112 -build | --build | --buil | --bui | --bu)
113 ac_prev=build ;;
114 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
115 build="$ac_optarg" ;;
116
117 -cache-file | --cache-file | --cache-fil | --cache-fi \
118 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
119 ac_prev=cache_file ;;
120 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
121 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
122 cache_file="$ac_optarg" ;;
123
124 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
125 ac_prev=datadir ;;
126 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
127 | --da=*)
128 datadir="$ac_optarg" ;;
129
130 -disable-* | --disable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135 fi
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 eval "enable_${ac_feature}=no" ;;
138
139 -enable-* | --enable-*)
140 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
141 # Reject names that are not valid shell variable names.
142 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
143 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
144 fi
145 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
146 case "$ac_option" in
147 *=*) ;;
148 *) ac_optarg=yes ;;
149 esac
150 eval "enable_${ac_feature}='$ac_optarg'" ;;
151
152 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
153 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
154 | --exec | --exe | --ex)
155 ac_prev=exec_prefix ;;
156 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
157 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
158 | --exec=* | --exe=* | --ex=*)
159 exec_prefix="$ac_optarg" ;;
160
161 -gas | --gas | --ga | --g)
162 # Obsolete; use --with-gas.
163 with_gas=yes ;;
164
165 -help | --help | --hel | --he)
166 # Omit some internal or obsolete options to make the list less imposing.
167 # This message is too long to be a string in the A/UX 3.1 sh.
168 cat << EOF
169Usage: configure [options] [host]
170Options: [defaults in brackets after descriptions]
171Configuration:
172 --cache-file=FILE cache test results in FILE
173 --help print this message
174 --no-create do not create output files
175 --quiet, --silent do not print \`checking...' messages
176 --version print the version of autoconf that created configure
177Directory and file names:
178 --prefix=PREFIX install architecture-independent files in PREFIX
179 [$ac_default_prefix]
180 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
181 [same as prefix]
182 --bindir=DIR user executables in DIR [EPREFIX/bin]
183 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
184 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
185 --datadir=DIR read-only architecture-independent data in DIR
186 [PREFIX/share]
187 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
188 --sharedstatedir=DIR modifiable architecture-independent data in DIR
189 [PREFIX/com]
190 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
191 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
192 --includedir=DIR C header files in DIR [PREFIX/include]
193 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
194 --infodir=DIR info documentation in DIR [PREFIX/info]
195 --mandir=DIR man documentation in DIR [PREFIX/man]
196 --srcdir=DIR find the sources in DIR [configure dir or ..]
197 --program-prefix=PREFIX prepend PREFIX to installed program names
198 --program-suffix=SUFFIX append SUFFIX to installed program names
199 --program-transform-name=PROGRAM
200 run sed PROGRAM on installed program names
201EOF
202 cat << EOF
203Host type:
204 --build=BUILD configure for building on BUILD [BUILD=HOST]
205 --host=HOST configure for HOST [guessed]
206 --target=TARGET configure for TARGET [TARGET=HOST]
207Features and packages:
208 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
209 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
210 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
211 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
212 --x-includes=DIR X include files are in DIR
213 --x-libraries=DIR X library files are in DIR
214EOF
215 if test -n "$ac_help"; then
216 echo "--enable and --with options recognized:$ac_help"
217 fi
218 exit 0 ;;
219
220 -host | --host | --hos | --ho)
221 ac_prev=host ;;
222 -host=* | --host=* | --hos=* | --ho=*)
223 host="$ac_optarg" ;;
224
225 -includedir | --includedir | --includedi | --included | --include \
226 | --includ | --inclu | --incl | --inc)
227 ac_prev=includedir ;;
228 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
229 | --includ=* | --inclu=* | --incl=* | --inc=*)
230 includedir="$ac_optarg" ;;
231
232 -infodir | --infodir | --infodi | --infod | --info | --inf)
233 ac_prev=infodir ;;
234 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
235 infodir="$ac_optarg" ;;
236
237 -libdir | --libdir | --libdi | --libd)
238 ac_prev=libdir ;;
239 -libdir=* | --libdir=* | --libdi=* | --libd=*)
240 libdir="$ac_optarg" ;;
241
242 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
243 | --libexe | --libex | --libe)
244 ac_prev=libexecdir ;;
245 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
246 | --libexe=* | --libex=* | --libe=*)
247 libexecdir="$ac_optarg" ;;
248
249 -localstatedir | --localstatedir | --localstatedi | --localstated \
250 | --localstate | --localstat | --localsta | --localst \
251 | --locals | --local | --loca | --loc | --lo)
252 ac_prev=localstatedir ;;
253 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
254 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
255 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
256 localstatedir="$ac_optarg" ;;
257
258 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
259 ac_prev=mandir ;;
260 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
261 mandir="$ac_optarg" ;;
262
263 -nfp | --nfp | --nf)
264 # Obsolete; use --without-fp.
265 with_fp=no ;;
266
267 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268 | --no-cr | --no-c)
269 no_create=yes ;;
270
271 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
272 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
273 no_recursion=yes ;;
274
275 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
276 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
277 | --oldin | --oldi | --old | --ol | --o)
278 ac_prev=oldincludedir ;;
279 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
280 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
281 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
282 oldincludedir="$ac_optarg" ;;
283
284 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
285 ac_prev=prefix ;;
286 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
287 prefix="$ac_optarg" ;;
288
289 -program-prefix | --program-prefix | --program-prefi | --program-pref \
290 | --program-pre | --program-pr | --program-p)
291 ac_prev=program_prefix ;;
292 -program-prefix=* | --program-prefix=* | --program-prefi=* \
293 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
294 program_prefix="$ac_optarg" ;;
295
296 -program-suffix | --program-suffix | --program-suffi | --program-suff \
297 | --program-suf | --program-su | --program-s)
298 ac_prev=program_suffix ;;
299 -program-suffix=* | --program-suffix=* | --program-suffi=* \
300 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
301 program_suffix="$ac_optarg" ;;
302
303 -program-transform-name | --program-transform-name \
304 | --program-transform-nam | --program-transform-na \
305 | --program-transform-n | --program-transform- \
306 | --program-transform | --program-transfor \
307 | --program-transfo | --program-transf \
308 | --program-trans | --program-tran \
309 | --progr-tra | --program-tr | --program-t)
310 ac_prev=program_transform_name ;;
311 -program-transform-name=* | --program-transform-name=* \
312 | --program-transform-nam=* | --program-transform-na=* \
313 | --program-transform-n=* | --program-transform-=* \
314 | --program-transform=* | --program-transfor=* \
315 | --program-transfo=* | --program-transf=* \
316 | --program-trans=* | --program-tran=* \
317 | --progr-tra=* | --program-tr=* | --program-t=*)
318 program_transform_name="$ac_optarg" ;;
319
320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
321 | -silent | --silent | --silen | --sile | --sil)
322 silent=yes ;;
323
324 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
325 ac_prev=sbindir ;;
326 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
327 | --sbi=* | --sb=*)
328 sbindir="$ac_optarg" ;;
329
330 -sharedstatedir | --sharedstatedir | --sharedstatedi \
331 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
332 | --sharedst | --shareds | --shared | --share | --shar \
333 | --sha | --sh)
334 ac_prev=sharedstatedir ;;
335 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
336 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
337 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
338 | --sha=* | --sh=*)
339 sharedstatedir="$ac_optarg" ;;
340
341 -site | --site | --sit)
342 ac_prev=site ;;
343 -site=* | --site=* | --sit=*)
344 site="$ac_optarg" ;;
345
346 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
347 ac_prev=srcdir ;;
348 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
349 srcdir="$ac_optarg" ;;
350
351 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
352 | --syscon | --sysco | --sysc | --sys | --sy)
353 ac_prev=sysconfdir ;;
354 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
355 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
356 sysconfdir="$ac_optarg" ;;
357
358 -target | --target | --targe | --targ | --tar | --ta | --t)
359 ac_prev=target ;;
360 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
361 target="$ac_optarg" ;;
362
363 -v | -verbose | --verbose | --verbos | --verbo | --verb)
364 verbose=yes ;;
365
366 -version | --version | --versio | --versi | --vers)
a3ffcff3 367 echo "configure generated by autoconf version 2.13"
ee9dd372
TT
368 exit 0 ;;
369
370 -with-* | --with-*)
371 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
372 # Reject names that are not valid shell variable names.
373 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
374 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375 fi
376 ac_package=`echo $ac_package| sed 's/-/_/g'`
377 case "$ac_option" in
378 *=*) ;;
379 *) ac_optarg=yes ;;
380 esac
381 eval "with_${ac_package}='$ac_optarg'" ;;
382
383 -without-* | --without-*)
384 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
385 # Reject names that are not valid shell variable names.
386 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
388 fi
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 eval "with_${ac_package}=no" ;;
391
392 --x)
393 # Obsolete; use --with-x.
394 with_x=yes ;;
395
396 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
397 | --x-incl | --x-inc | --x-in | --x-i)
398 ac_prev=x_includes ;;
399 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
400 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
401 x_includes="$ac_optarg" ;;
402
403 -x-libraries | --x-libraries | --x-librarie | --x-librari \
404 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
405 ac_prev=x_libraries ;;
406 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
407 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
408 x_libraries="$ac_optarg" ;;
409
410 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
411 ;;
412
413 *)
414 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
415 echo "configure: warning: $ac_option: invalid host type" 1>&2
416 fi
417 if test "x$nonopt" != xNONE; then
418 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
419 fi
420 nonopt="$ac_option"
421 ;;
422
423 esac
424done
425
426if test -n "$ac_prev"; then
427 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
428fi
429
430trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
431
432# File descriptor usage:
433# 0 standard input
434# 1 file creation
435# 2 errors and warnings
436# 3 some systems may open it to /dev/tty
437# 4 used on the Kubota Titan
438# 6 checking for... messages and results
439# 5 compiler messages saved in config.log
440if test "$silent" = yes; then
441 exec 6>/dev/null
442else
443 exec 6>&1
444fi
445exec 5>./config.log
446
447echo "\
448This file contains any messages produced by compilers while
449running configure, to aid debugging if configure makes a mistake.
450" 1>&5
451
452# Strip out --no-create and --no-recursion so they do not pile up.
453# Also quote any args containing shell metacharacters.
454ac_configure_args=
455for ac_arg
456do
457 case "$ac_arg" in
458 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
459 | --no-cr | --no-c) ;;
460 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
461 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
462 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
463 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
464 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
465 esac
466done
467
468# NLS nuisances.
469# Only set these to C if already set. These must not be set unconditionally
470# because not all systems understand e.g. LANG=C (notably SCO).
471# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
472# Non-C LC_CTYPE values break the ctype check.
473if test "${LANG+set}" = set; then LANG=C; export LANG; fi
474if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
475if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
476if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
477
478# confdefs.h avoids OS command line length limits that DEFS can exceed.
479rm -rf conftest* confdefs.h
480# AIX cpp loses on an empty file, so make sure it contains at least a newline.
481echo > confdefs.h
482
483# A filename unique to this package, relative to the directory that
484# configure is in, which we can look for to find out if srcdir is correct.
485ac_unique_file=java/lang/System.java
486
487# Find the source files, if location was not specified.
488if test -z "$srcdir"; then
489 ac_srcdir_defaulted=yes
490 # Try the directory containing this script, then its parent.
491 ac_prog=$0
492 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
493 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
494 srcdir=$ac_confdir
495 if test ! -r $srcdir/$ac_unique_file; then
496 srcdir=..
497 fi
498else
499 ac_srcdir_defaulted=no
500fi
501if test ! -r $srcdir/$ac_unique_file; then
502 if test "$ac_srcdir_defaulted" = yes; then
503 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
504 else
505 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
506 fi
507fi
508srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
509
510# Prefer explicitly selected file to automatically selected ones.
511if test -z "$CONFIG_SITE"; then
512 if test "x$prefix" != xNONE; then
513 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 else
515 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
516 fi
517fi
518for ac_site_file in $CONFIG_SITE; do
519 if test -r "$ac_site_file"; then
520 echo "loading site script $ac_site_file"
521 . "$ac_site_file"
522 fi
523done
524
525if test -r "$cache_file"; then
526 echo "loading cache $cache_file"
527 . $cache_file
528else
529 echo "creating cache $cache_file"
530 > $cache_file
531fi
532
533ac_ext=c
534# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
535ac_cpp='$CPP $CPPFLAGS'
536ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
537ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
538cross_compiling=$ac_cv_prog_cc_cross
539
540ac_exeext=
541ac_objext=o
542if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
543 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
544 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
545 ac_n= ac_c='
546' ac_t=' '
547 else
548 ac_n=-n ac_c= ac_t=
549 fi
550else
551 ac_n= ac_c='\c' ac_t=
552fi
553
554
555
556ac_aux_dir=
557for ac_dir in .. $srcdir/..; do
558 if test -f $ac_dir/install-sh; then
559 ac_aux_dir=$ac_dir
560 ac_install_sh="$ac_aux_dir/install-sh -c"
561 break
562 elif test -f $ac_dir/install.sh; then
563 ac_aux_dir=$ac_dir
564 ac_install_sh="$ac_aux_dir/install.sh -c"
565 break
566 fi
567done
568if test -z "$ac_aux_dir"; then
569 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
570fi
571ac_config_guess=$ac_aux_dir/config.guess
572ac_config_sub=$ac_aux_dir/config.sub
573ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
574
575
576
577# Do some error checking and defaulting for the host and target type.
578# The inputs are:
579# configure --host=HOST --target=TARGET --build=BUILD NONOPT
580#
581# The rules are:
582# 1. You are not allowed to specify --host, --target, and nonopt at the
583# same time.
584# 2. Host defaults to nonopt.
585# 3. If nonopt is not specified, then host defaults to the current host,
586# as determined by config.guess.
587# 4. Target and build default to nonopt.
588# 5. If nonopt is not specified, then target and build default to host.
589
590# The aliases save the names the user supplied, while $host etc.
591# will get canonicalized.
592case $host---$target---$nonopt in
593NONE---*---* | *---NONE---* | *---*---NONE) ;;
594*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
595esac
596
597
598# Make sure we can run config.sub.
599if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
600else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
601fi
602
603echo $ac_n "checking host system type""... $ac_c" 1>&6
f994389b 604echo "configure:605: checking host system type" >&5
ee9dd372
TT
605
606host_alias=$host
607case "$host_alias" in
608NONE)
609 case $nonopt in
610 NONE)
611 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
612 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
613 fi ;;
614 *) host_alias=$nonopt ;;
615 esac ;;
616esac
617
618host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
619host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
620host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
621host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
622echo "$ac_t""$host" 1>&6
623
624echo $ac_n "checking target system type""... $ac_c" 1>&6
f994389b 625echo "configure:626: checking target system type" >&5
ee9dd372
TT
626
627target_alias=$target
628case "$target_alias" in
629NONE)
630 case $nonopt in
631 NONE) target_alias=$host_alias ;;
632 *) target_alias=$nonopt ;;
633 esac ;;
634esac
635
636target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
637target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
638target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
639target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
640echo "$ac_t""$target" 1>&6
641
642echo $ac_n "checking build system type""... $ac_c" 1>&6
f994389b 643echo "configure:644: checking build system type" >&5
ee9dd372
TT
644
645build_alias=$build
646case "$build_alias" in
647NONE)
648 case $nonopt in
649 NONE) build_alias=$host_alias ;;
650 *) build_alias=$nonopt ;;
651 esac ;;
652esac
653
654build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
655build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
656build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
657build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
658echo "$ac_t""$build" 1>&6
659
660test "$host_alias" != "$target_alias" &&
661 test "$program_prefix$program_suffix$program_transform_name" = \
662 NONENONEs,x,x, &&
663 program_prefix=${target_alias}-
664
665
666# Check whether --with-target-subdir or --without-target-subdir was given.
667if test "${with_target_subdir+set}" = set; then
668 withval="$with_target_subdir"
669 :
670fi
671
672# Check whether --with-cross-host or --without-cross-host was given.
673if test "${with_cross_host+set}" = set; then
674 withval="$with_cross_host"
675 :
676fi
677
678
679# Find a good install program. We prefer a C program (faster),
680# so one script is as good as another. But avoid the broken or
681# incompatible versions:
682# SysV /etc/install, /usr/sbin/install
683# SunOS /usr/etc/install
684# IRIX /sbin/install
685# AIX /bin/install
686# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
687# AFS /usr/afsws/bin/install, which mishandles nonexistent args
688# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
689# ./install, which can be erroneously created by make from ./install.sh.
690echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
f994389b 691echo "configure:692: checking for a BSD compatible install" >&5
ee9dd372
TT
692if test -z "$INSTALL"; then
693if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
694 echo $ac_n "(cached) $ac_c" 1>&6
695else
696 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
697 for ac_dir in $PATH; do
698 # Account for people who put trailing slashes in PATH elements.
699 case "$ac_dir/" in
700 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
701 *)
702 # OSF1 and SCO ODT 3.0 have their own names for install.
703 # Don't use installbsd from OSF since it installs stuff as root
704 # by default.
705 for ac_prog in ginstall scoinst install; do
706 if test -f $ac_dir/$ac_prog; then
707 if test $ac_prog = install &&
708 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
709 # AIX install. It has an incompatible calling convention.
710 :
711 else
712 ac_cv_path_install="$ac_dir/$ac_prog -c"
713 break 2
714 fi
715 fi
716 done
717 ;;
718 esac
719 done
720 IFS="$ac_save_IFS"
721
722fi
723 if test "${ac_cv_path_install+set}" = set; then
724 INSTALL="$ac_cv_path_install"
725 else
726 # As a last resort, use the slow shell script. We don't cache a
727 # path for INSTALL within a source directory, because that will
728 # break other packages using the cache if that directory is
729 # removed, or if the path is relative.
730 INSTALL="$ac_install_sh"
731 fi
732fi
733echo "$ac_t""$INSTALL" 1>&6
734
735# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
736# It thinks the first close brace ends the variable substitution.
737test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
738
a3ffcff3
TT
739test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
740
ee9dd372
TT
741test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
742
743echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
f994389b 744echo "configure:745: checking whether build environment is sane" >&5
ee9dd372
TT
745# Just in case
746sleep 1
747echo timestamp > conftestfile
748# Do `set' in a subshell so we don't clobber the current shell's
749# arguments. Must try -L first in case configure is actually a
750# symlink; some systems play weird games with the mod time of symlinks
751# (eg FreeBSD returns the mod time of the symlink's containing
752# directory).
753if (
754 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
755 if test "$*" = "X"; then
756 # -L didn't work.
757 set X `ls -t $srcdir/configure conftestfile`
758 fi
759 if test "$*" != "X $srcdir/configure conftestfile" \
760 && test "$*" != "X conftestfile $srcdir/configure"; then
761
762 # If neither matched, then we have a broken ls. This can happen
763 # if, for instance, CONFIG_SHELL is bash and it inherits a
764 # broken ls alias from the environment. This has actually
765 # happened. Such a system could not be considered "sane".
766 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
767alias in your environment" 1>&2; exit 1; }
768 fi
769
770 test "$2" = conftestfile
771 )
772then
773 # Ok.
774 :
775else
776 { echo "configure: error: newly created file is older than distributed files!
777Check your system clock" 1>&2; exit 1; }
778fi
779rm -f conftest*
780echo "$ac_t""yes" 1>&6
781if test "$program_transform_name" = s,x,x,; then
782 program_transform_name=
783else
784 # Double any \ or $. echo might interpret backslashes.
785 cat <<\EOF_SED > conftestsed
786s,\\,\\\\,g; s,\$,$$,g
787EOF_SED
788 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
789 rm -f conftestsed
790fi
791test "$program_prefix" != NONE &&
792 program_transform_name="s,^,${program_prefix},; $program_transform_name"
793# Use a double $ so make ignores it.
794test "$program_suffix" != NONE &&
795 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
796
797# sed with no file args requires a program.
798test "$program_transform_name" = "" && program_transform_name="s,x,x,"
799
800echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
f994389b 801echo "configure:802: checking whether ${MAKE-make} sets \${MAKE}" >&5
ee9dd372
TT
802set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
803if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 cat > conftestmake <<\EOF
807all:
808 @echo 'ac_maketemp="${MAKE}"'
809EOF
810# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
811eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
812if test -n "$ac_maketemp"; then
813 eval ac_cv_prog_make_${ac_make}_set=yes
814else
815 eval ac_cv_prog_make_${ac_make}_set=no
816fi
817rm -f conftestmake
818fi
819if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
820 echo "$ac_t""yes" 1>&6
821 SET_MAKE=
822else
823 echo "$ac_t""no" 1>&6
824 SET_MAKE="MAKE=${MAKE-make}"
825fi
826
827if test $host != $build; then
828 ac_tool_prefix=${host_alias}-
829else
830 ac_tool_prefix=
831fi
832
a3ffcff3 833echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
f994389b 834echo "configure:835: checking for Cygwin environment" >&5
a3ffcff3 835if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
ee9dd372
TT
836 echo $ac_n "(cached) $ac_c" 1>&6
837else
838 cat > conftest.$ac_ext <<EOF
f994389b 839#line 840 "configure"
ee9dd372
TT
840#include "confdefs.h"
841
842int main() {
a3ffcff3
TT
843
844#ifndef __CYGWIN__
845#define __CYGWIN__ __CYGWIN32__
846#endif
847return __CYGWIN__;
ee9dd372
TT
848; return 0; }
849EOF
f994389b 850if { (eval echo configure:851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ee9dd372 851 rm -rf conftest*
a3ffcff3 852 ac_cv_cygwin=yes
ee9dd372
TT
853else
854 echo "configure: failed program was:" >&5
855 cat conftest.$ac_ext >&5
856 rm -rf conftest*
a3ffcff3 857 ac_cv_cygwin=no
ee9dd372
TT
858fi
859rm -f conftest*
860rm -f conftest*
861fi
862
a3ffcff3
TT
863echo "$ac_t""$ac_cv_cygwin" 1>&6
864CYGWIN=
865test "$ac_cv_cygwin" = yes && CYGWIN=yes
ee9dd372 866echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
f994389b 867echo "configure:868: checking for mingw32 environment" >&5
ee9dd372
TT
868if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
869 echo $ac_n "(cached) $ac_c" 1>&6
870else
871 cat > conftest.$ac_ext <<EOF
f994389b 872#line 873 "configure"
ee9dd372
TT
873#include "confdefs.h"
874
875int main() {
876return __MINGW32__;
877; return 0; }
878EOF
f994389b 879if { (eval echo configure:880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ee9dd372
TT
880 rm -rf conftest*
881 ac_cv_mingw32=yes
882else
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 ac_cv_mingw32=no
887fi
888rm -f conftest*
889rm -f conftest*
890fi
891
892echo "$ac_t""$ac_cv_mingw32" 1>&6
893MINGW32=
894test "$ac_cv_mingw32" = yes && MINGW32=yes
895
896# Check whether --enable-multilib or --disable-multilib was given.
897if test "${enable_multilib+set}" = set; then
898 enableval="$enable_multilib"
899 case "${enableval}" in
900 yes) multilib=yes ;;
901 no) multilib=no ;;
902 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
903 esac
904else
905 multilib=yes
906fi
907
908
909if test "${srcdir}" = "."; then
910 if test "${with_target_subdir}" != "."; then
911 libgcj_basedir="${srcdir}/${with_multisrctop}../."
912 else
913 libgcj_basedir="${srcdir}/${with_multisrctop}."
914 fi
915else
916 libgcj_basedir="${srcdir}/."
917fi
918
919
920
921# Make sure we can run config.sub.
922if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
923else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
924fi
925
926echo $ac_n "checking host system type""... $ac_c" 1>&6
f994389b 927echo "configure:928: checking host system type" >&5
ee9dd372
TT
928
929host_alias=$host
930case "$host_alias" in
931NONE)
932 case $nonopt in
933 NONE)
934 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
935 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
936 fi ;;
937 *) host_alias=$nonopt ;;
938 esac ;;
939esac
940
941host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
942host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
943host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
944host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
945echo "$ac_t""$host" 1>&6
946
947
550c2492 948version=0.0.7
ee9dd372
TT
949
950PACKAGE=libjava
951
550c2492 952VERSION=$version
ee9dd372
TT
953
954if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
955 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
956fi
957cat >> confdefs.h <<EOF
a3ffcff3 958#define PACKAGE "$PACKAGE"
ee9dd372
TT
959EOF
960
961cat >> confdefs.h <<EOF
a3ffcff3 962#define VERSION "$VERSION"
ee9dd372
TT
963EOF
964
965
966
967missing_dir=`cd $ac_aux_dir && pwd`
968echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
550c2492 969echo "configure:970: checking for working aclocal" >&5
ee9dd372
TT
970# Run test in a subshell; some versions of sh will print an error if
971# an executable is not found, even if stderr is redirected.
972# Redirect stdin to placate older versions of autoconf. Sigh.
973if (aclocal --version) < /dev/null > /dev/null 2>&1; then
974 ACLOCAL=aclocal
975 echo "$ac_t""found" 1>&6
976else
977 ACLOCAL="$missing_dir/missing aclocal"
978 echo "$ac_t""missing" 1>&6
979fi
980
981echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
550c2492 982echo "configure:983: checking for working autoconf" >&5
ee9dd372
TT
983# Run test in a subshell; some versions of sh will print an error if
984# an executable is not found, even if stderr is redirected.
985# Redirect stdin to placate older versions of autoconf. Sigh.
986if (autoconf --version) < /dev/null > /dev/null 2>&1; then
987 AUTOCONF=autoconf
988 echo "$ac_t""found" 1>&6
989else
990 AUTOCONF="$missing_dir/missing autoconf"
991 echo "$ac_t""missing" 1>&6
992fi
993
994echo $ac_n "checking for working automake""... $ac_c" 1>&6
550c2492 995echo "configure:996: checking for working automake" >&5
ee9dd372
TT
996# Run test in a subshell; some versions of sh will print an error if
997# an executable is not found, even if stderr is redirected.
998# Redirect stdin to placate older versions of autoconf. Sigh.
999if (automake --version) < /dev/null > /dev/null 2>&1; then
1000 AUTOMAKE=automake
1001 echo "$ac_t""found" 1>&6
1002else
1003 AUTOMAKE="$missing_dir/missing automake"
1004 echo "$ac_t""missing" 1>&6
1005fi
1006
1007echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
550c2492 1008echo "configure:1009: checking for working autoheader" >&5
ee9dd372
TT
1009# Run test in a subshell; some versions of sh will print an error if
1010# an executable is not found, even if stderr is redirected.
1011# Redirect stdin to placate older versions of autoconf. Sigh.
1012if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1013 AUTOHEADER=autoheader
1014 echo "$ac_t""found" 1>&6
1015else
1016 AUTOHEADER="$missing_dir/missing autoheader"
1017 echo "$ac_t""missing" 1>&6
1018fi
1019
1020echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
550c2492 1021echo "configure:1022: checking for working makeinfo" >&5
ee9dd372
TT
1022# Run test in a subshell; some versions of sh will print an error if
1023# an executable is not found, even if stderr is redirected.
1024# Redirect stdin to placate older versions of autoconf. Sigh.
1025if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1026 MAKEINFO=makeinfo
1027 echo "$ac_t""found" 1>&6
1028else
1029 MAKEINFO="$missing_dir/missing makeinfo"
1030 echo "$ac_t""missing" 1>&6
1031fi
1032
1033
1034
1035# FIXME: We temporarily define our own version of AC_PROG_CC. This is
1036# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
1037# are probably using a cross compiler, which will not be able to fully
1038# link an executable. This should really be fixed in autoconf
1039# itself.
1040
1041
1042
1043# Extract the first word of "gcc", so it can be a program name with args.
1044set dummy gcc; ac_word=$2
1045echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1046echo "configure:1047: checking for $ac_word" >&5
ee9dd372
TT
1047if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1048 echo $ac_n "(cached) $ac_c" 1>&6
1049else
1050 if test -n "$CC"; then
1051 ac_cv_prog_CC="$CC" # Let the user override the test.
1052else
1053 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
1054 ac_dummy="$PATH"
1055 for ac_dir in $ac_dummy; do
ee9dd372
TT
1056 test -z "$ac_dir" && ac_dir=.
1057 if test -f $ac_dir/$ac_word; then
1058 ac_cv_prog_CC="gcc"
1059 break
1060 fi
1061 done
1062 IFS="$ac_save_ifs"
1063fi
1064fi
1065CC="$ac_cv_prog_CC"
1066if test -n "$CC"; then
1067 echo "$ac_t""$CC" 1>&6
1068else
1069 echo "$ac_t""no" 1>&6
1070fi
1071
1072if test -z "$CC"; then
1073 # Extract the first word of "cc", so it can be a program name with args.
1074set dummy cc; ac_word=$2
1075echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1076echo "configure:1077: checking for $ac_word" >&5
ee9dd372
TT
1077if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1078 echo $ac_n "(cached) $ac_c" 1>&6
1079else
1080 if test -n "$CC"; then
1081 ac_cv_prog_CC="$CC" # Let the user override the test.
1082else
1083 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1084 ac_prog_rejected=no
a3ffcff3
TT
1085 ac_dummy="$PATH"
1086 for ac_dir in $ac_dummy; do
ee9dd372
TT
1087 test -z "$ac_dir" && ac_dir=.
1088 if test -f $ac_dir/$ac_word; then
1089 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1090 ac_prog_rejected=yes
1091 continue
1092 fi
1093 ac_cv_prog_CC="cc"
1094 break
1095 fi
1096 done
1097 IFS="$ac_save_ifs"
1098if test $ac_prog_rejected = yes; then
1099 # We found a bogon in the path, so make sure we never use it.
1100 set dummy $ac_cv_prog_CC
1101 shift
1102 if test $# -gt 0; then
1103 # We chose a different compiler from the bogus one.
1104 # However, it has the same basename, so the bogon will be chosen
1105 # first if we set CC to just the basename; use the full file name.
1106 shift
1107 set dummy "$ac_dir/$ac_word" "$@"
1108 shift
1109 ac_cv_prog_CC="$@"
1110 fi
1111fi
1112fi
1113fi
1114CC="$ac_cv_prog_CC"
1115if test -n "$CC"; then
1116 echo "$ac_t""$CC" 1>&6
1117else
1118 echo "$ac_t""no" 1>&6
1119fi
1120
1121 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1122fi
1123
1124echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
550c2492 1125echo "configure:1126: checking whether we are using GNU C" >&5
ee9dd372
TT
1126if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1127 echo $ac_n "(cached) $ac_c" 1>&6
1128else
1129 cat > conftest.c <<EOF
1130#ifdef __GNUC__
1131 yes;
1132#endif
1133EOF
550c2492 1134if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ee9dd372
TT
1135 ac_cv_prog_gcc=yes
1136else
1137 ac_cv_prog_gcc=no
1138fi
1139fi
1140
1141echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1142
1143if test $ac_cv_prog_gcc = yes; then
1144 GCC=yes
1145 ac_test_CFLAGS="${CFLAGS+set}"
1146 ac_save_CFLAGS="$CFLAGS"
1147 CFLAGS=
1148 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
550c2492 1149echo "configure:1150: checking whether ${CC-cc} accepts -g" >&5
ee9dd372
TT
1150if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1151 echo $ac_n "(cached) $ac_c" 1>&6
1152else
1153 echo 'void f(){}' > conftest.c
1154if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1155 ac_cv_prog_cc_g=yes
1156else
1157 ac_cv_prog_cc_g=no
1158fi
1159rm -f conftest*
1160
1161fi
1162
1163echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1164 if test "$ac_test_CFLAGS" = set; then
1165 CFLAGS="$ac_save_CFLAGS"
1166 elif test $ac_cv_prog_cc_g = yes; then
1167 CFLAGS="-g -O2"
1168 else
1169 CFLAGS="-O2"
1170 fi
1171else
1172 GCC=
1173 test "${CFLAGS+set}" = set || CFLAGS="-g"
1174fi
1175
1176
1177# Likewise for AC_PROG_CXX.
1178
1179
1180for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1181do
1182# Extract the first word of "$ac_prog", so it can be a program name with args.
1183set dummy $ac_prog; ac_word=$2
1184echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1185echo "configure:1186: checking for $ac_word" >&5
ee9dd372
TT
1186if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1187 echo $ac_n "(cached) $ac_c" 1>&6
1188else
1189 if test -n "$CXX"; then
1190 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1191else
1192 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
1193 ac_dummy="$PATH"
1194 for ac_dir in $ac_dummy; do
ee9dd372
TT
1195 test -z "$ac_dir" && ac_dir=.
1196 if test -f $ac_dir/$ac_word; then
1197 ac_cv_prog_CXX="$ac_prog"
1198 break
1199 fi
1200 done
1201 IFS="$ac_save_ifs"
1202fi
1203fi
1204CXX="$ac_cv_prog_CXX"
1205if test -n "$CXX"; then
1206 echo "$ac_t""$CXX" 1>&6
1207else
1208 echo "$ac_t""no" 1>&6
1209fi
1210
1211test -n "$CXX" && break
1212done
1213test -n "$CXX" || CXX="gcc"
1214
1215test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1216
1217echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
550c2492 1218echo "configure:1219: checking whether we are using GNU C++" >&5
ee9dd372
TT
1219if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1220 echo $ac_n "(cached) $ac_c" 1>&6
1221else
1222 cat > conftest.C <<EOF
1223#ifdef __GNUC__
1224 yes;
1225#endif
1226EOF
550c2492 1227if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ee9dd372
TT
1228 ac_cv_prog_gxx=yes
1229else
1230 ac_cv_prog_gxx=no
1231fi
1232fi
1233
1234echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1235
1236if test $ac_cv_prog_gxx = yes; then
1237 GXX=yes
1238 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1239 ac_save_CXXFLAGS="$CXXFLAGS"
1240 CXXFLAGS=
1241 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
550c2492 1242echo "configure:1243: checking whether ${CXX-g++} accepts -g" >&5
ee9dd372
TT
1243if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1245else
1246 echo 'void f(){}' > conftest.cc
1247if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1248 ac_cv_prog_cxx_g=yes
1249else
1250 ac_cv_prog_cxx_g=no
1251fi
1252rm -f conftest*
1253
1254fi
1255
1256echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1257 if test "$ac_test_CXXFLAGS" = set; then
1258 CXXFLAGS="$ac_save_CXXFLAGS"
1259 elif test $ac_cv_prog_cxx_g = yes; then
1260 CXXFLAGS="-g -O2"
1261 else
1262 CXXFLAGS="-O2"
1263 fi
1264else
1265 GXX=
1266 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1267fi
1268
1269
1270# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
1271# run it explicitly here, it will be run implicitly before
1272# LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1273# be run before AC_CANONICAL_HOST.
1274echo $ac_n "checking build system type""... $ac_c" 1>&6
550c2492 1275echo "configure:1276: checking build system type" >&5
ee9dd372
TT
1276
1277build_alias=$build
1278case "$build_alias" in
1279NONE)
1280 case $nonopt in
1281 NONE) build_alias=$host_alias ;;
1282 *) build_alias=$nonopt ;;
1283 esac ;;
1284esac
1285
1286build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1287build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1288build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1289build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1290echo "$ac_t""$build" 1>&6
1291
1292
1293# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1294set dummy ${ac_tool_prefix}as; ac_word=$2
1295echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1296echo "configure:1297: checking for $ac_word" >&5
ee9dd372
TT
1297if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1298 echo $ac_n "(cached) $ac_c" 1>&6
1299else
1300 if test -n "$AS"; then
1301 ac_cv_prog_AS="$AS" # Let the user override the test.
1302else
1303 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
1304 ac_dummy="$PATH"
1305 for ac_dir in $ac_dummy; do
ee9dd372
TT
1306 test -z "$ac_dir" && ac_dir=.
1307 if test -f $ac_dir/$ac_word; then
1308 ac_cv_prog_AS="${ac_tool_prefix}as"
1309 break
1310 fi
1311 done
1312 IFS="$ac_save_ifs"
1313 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1314fi
1315fi
1316AS="$ac_cv_prog_AS"
1317if test -n "$AS"; then
1318 echo "$ac_t""$AS" 1>&6
1319else
1320 echo "$ac_t""no" 1>&6
1321fi
1322
1323
1324
1325# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1326set dummy ${ac_tool_prefix}ar; ac_word=$2
1327echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1328echo "configure:1329: checking for $ac_word" >&5
ee9dd372
TT
1329if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1330 echo $ac_n "(cached) $ac_c" 1>&6
1331else
1332 if test -n "$AR"; then
1333 ac_cv_prog_AR="$AR" # Let the user override the test.
1334else
1335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
1336 ac_dummy="$PATH"
1337 for ac_dir in $ac_dummy; do
ee9dd372
TT
1338 test -z "$ac_dir" && ac_dir=.
1339 if test -f $ac_dir/$ac_word; then
1340 ac_cv_prog_AR="${ac_tool_prefix}ar"
1341 break
1342 fi
1343 done
1344 IFS="$ac_save_ifs"
1345 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1346fi
1347fi
1348AR="$ac_cv_prog_AR"
1349if test -n "$AR"; then
1350 echo "$ac_t""$AR" 1>&6
1351else
1352 echo "$ac_t""no" 1>&6
1353fi
1354
1355
1356
1357# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1358set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1359echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1360echo "configure:1361: checking for $ac_word" >&5
ee9dd372
TT
1361if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1362 echo $ac_n "(cached) $ac_c" 1>&6
1363else
1364 if test -n "$RANLIB"; then
1365 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1366else
1367 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
1368 ac_dummy="$PATH"
1369 for ac_dir in $ac_dummy; do
ee9dd372
TT
1370 test -z "$ac_dir" && ac_dir=.
1371 if test -f $ac_dir/$ac_word; then
1372 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1373 break
1374 fi
1375 done
1376 IFS="$ac_save_ifs"
1377fi
1378fi
1379RANLIB="$ac_cv_prog_RANLIB"
1380if test -n "$RANLIB"; then
1381 echo "$ac_t""$RANLIB" 1>&6
1382else
1383 echo "$ac_t""no" 1>&6
1384fi
1385
1386
1387if test -z "$ac_cv_prog_RANLIB"; then
1388if test -n "$ac_tool_prefix"; then
1389 # Extract the first word of "ranlib", so it can be a program name with args.
1390set dummy ranlib; ac_word=$2
1391echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1392echo "configure:1393: checking for $ac_word" >&5
ee9dd372
TT
1393if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395else
1396 if test -n "$RANLIB"; then
1397 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1398else
1399 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
1400 ac_dummy="$PATH"
1401 for ac_dir in $ac_dummy; do
ee9dd372
TT
1402 test -z "$ac_dir" && ac_dir=.
1403 if test -f $ac_dir/$ac_word; then
1404 ac_cv_prog_RANLIB="ranlib"
1405 break
1406 fi
1407 done
1408 IFS="$ac_save_ifs"
1409 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1410fi
1411fi
1412RANLIB="$ac_cv_prog_RANLIB"
1413if test -n "$RANLIB"; then
1414 echo "$ac_t""$RANLIB" 1>&6
1415else
1416 echo "$ac_t""no" 1>&6
1417fi
1418
1419else
1420 RANLIB=":"
1421fi
1422fi
1423
1424
1425# Find a good install program. We prefer a C program (faster),
1426# so one script is as good as another. But avoid the broken or
1427# incompatible versions:
1428# SysV /etc/install, /usr/sbin/install
1429# SunOS /usr/etc/install
1430# IRIX /sbin/install
1431# AIX /bin/install
1432# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1433# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1434# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1435# ./install, which can be erroneously created by make from ./install.sh.
1436echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
550c2492 1437echo "configure:1438: checking for a BSD compatible install" >&5
ee9dd372
TT
1438if test -z "$INSTALL"; then
1439if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1440 echo $ac_n "(cached) $ac_c" 1>&6
1441else
1442 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1443 for ac_dir in $PATH; do
1444 # Account for people who put trailing slashes in PATH elements.
1445 case "$ac_dir/" in
1446 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1447 *)
1448 # OSF1 and SCO ODT 3.0 have their own names for install.
1449 # Don't use installbsd from OSF since it installs stuff as root
1450 # by default.
1451 for ac_prog in ginstall scoinst install; do
1452 if test -f $ac_dir/$ac_prog; then
1453 if test $ac_prog = install &&
1454 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1455 # AIX install. It has an incompatible calling convention.
1456 :
1457 else
1458 ac_cv_path_install="$ac_dir/$ac_prog -c"
1459 break 2
1460 fi
1461 fi
1462 done
1463 ;;
1464 esac
1465 done
1466 IFS="$ac_save_IFS"
1467
1468fi
1469 if test "${ac_cv_path_install+set}" = set; then
1470 INSTALL="$ac_cv_path_install"
1471 else
1472 # As a last resort, use the slow shell script. We don't cache a
1473 # path for INSTALL within a source directory, because that will
1474 # break other packages using the cache if that directory is
1475 # removed, or if the path is relative.
1476 INSTALL="$ac_install_sh"
1477 fi
1478fi
1479echo "$ac_t""$INSTALL" 1>&6
1480
1481# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1482# It thinks the first close brace ends the variable substitution.
1483test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1484
a3ffcff3
TT
1485test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1486
ee9dd372
TT
1487test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1488
1489
1490echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
550c2492 1491echo "configure:1492: checking whether to enable maintainer-specific portions of Makefiles" >&5
ee9dd372
TT
1492 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1493if test "${enable_maintainer_mode+set}" = set; then
1494 enableval="$enable_maintainer_mode"
1495 USE_MAINTAINER_MODE=$enableval
1496else
1497 USE_MAINTAINER_MODE=no
1498fi
1499
1500 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1501
1502
1503if test $USE_MAINTAINER_MODE = yes; then
1504 MAINTAINER_MODE_TRUE=
1505 MAINTAINER_MODE_FALSE='#'
1506else
1507 MAINTAINER_MODE_TRUE='#'
1508 MAINTAINER_MODE_FALSE=
1509fi
1510 MAINT=$MAINTAINER_MODE_TRUE
1511
1512
1513
1514# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1515# at least currently, we never actually build a program, so we never
1516# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1517# fails, because we are probably configuring with a cross compiler
1518# which cant create executables. So we include AC_EXEEXT to keep
1519# automake happy, but we dont execute it, since we dont care about
1520# the result.
1521if false; then
1522
1523
1524echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
550c2492 1525echo "configure:1526: checking for executable suffix" >&5
ee9dd372
TT
1526if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1527 echo $ac_n "(cached) $ac_c" 1>&6
1528else
a3ffcff3 1529 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
ee9dd372
TT
1530 ac_cv_exeext=.exe
1531else
1532 rm -f conftest*
1533 echo 'int main () { return 0; }' > conftest.$ac_ext
1534 ac_cv_exeext=
550c2492 1535 if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
ee9dd372
TT
1536 for file in conftest.*; do
1537 case $file in
1538 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1539 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1540 esac
1541 done
1542 else
1543 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1544 fi
1545 rm -f conftest*
1546 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1547fi
1548fi
1549
1550EXEEXT=""
1551test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1552echo "$ac_t""${ac_cv_exeext}" 1>&6
1553ac_exeext=$EXEEXT
1554
1555fi
1556
1557# configure.host sets the following important variables
1558# libgcj_cflags - host specific C compiler flags
1559# libgcj_cxxflags - host specific C++ compiler flags
1560# libgcj_javaflags - host specific Java compiler flags
1561
1562libgcj_cflags=
1563libgcj_cxxflags=
1564libgcj_javaflags=
1565
1566. ${libgcj_basedir}/configure.host
1567
1568case ${libgcj_basedir} in
1569/* | A-Za-z:/\\*) libgcj_flagbasedir=${libgcj_basedir} ;;
1570*) libgcj_flagbasedir='$(top_builddir)/'${libgcj_basedir} ;;
1571esac
1572
1573LIBGCJ_CFLAGS="${libgcj_cflags}"
1574LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1575LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1576
1577
1578
1579
1580
1581
1582
1583
1584
a3ffcff3
TT
1585# Check whether --enable-shared or --disable-shared was given.
1586if test "${enable_shared+set}" = set; then
1587 enableval="$enable_shared"
1588 p=${PACKAGE-default}
1589case "$enableval" in
1590yes) enable_shared=yes ;;
1591no) enable_shared=no ;;
1592*)
1593 enable_shared=no
1594 # Look at the argument we got. We use all the common list separators.
1595 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1596 for pkg in $enableval; do
1597 if test "X$pkg" = "X$p"; then
1598 enable_shared=yes
1599 fi
1600 done
1601 IFS="$ac_save_ifs"
1602 ;;
1603esac
1604else
1605 enable_shared=yes
1606fi
1607
1608# Check whether --enable-static or --disable-static was given.
1609if test "${enable_static+set}" = set; then
1610 enableval="$enable_static"
1611 p=${PACKAGE-default}
1612case "$enableval" in
1613yes) enable_static=yes ;;
1614no) enable_static=no ;;
1615*)
1616 enable_static=no
1617 # Look at the argument we got. We use all the common list separators.
1618 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1619 for pkg in $enableval; do
1620 if test "X$pkg" = "X$p"; then
1621 enable_static=yes
1622 fi
1623 done
1624 IFS="$ac_save_ifs"
1625 ;;
1626esac
1627else
1628 enable_static=yes
1629fi
1630
01b02b11
TT
1631# Check whether --enable-fast-install or --disable-fast-install was given.
1632if test "${enable_fast_install+set}" = set; then
1633 enableval="$enable_fast_install"
1634 p=${PACKAGE-default}
1635case "$enableval" in
1636yes) enable_fast_install=yes ;;
1637no) enable_fast_install=no ;;
1638*)
1639 enable_fast_install=no
1640 # Look at the argument we got. We use all the common list separators.
1641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1642 for pkg in $enableval; do
1643 if test "X$pkg" = "X$p"; then
1644 enable_fast_install=yes
1645 fi
1646 done
1647 IFS="$ac_save_ifs"
1648 ;;
1649esac
1650else
1651 enable_fast_install=yes
1652fi
1653
a3ffcff3
TT
1654# Extract the first word of "ranlib", so it can be a program name with args.
1655set dummy ranlib; ac_word=$2
1656echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1657echo "configure:1658: checking for $ac_word" >&5
a3ffcff3
TT
1658if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1659 echo $ac_n "(cached) $ac_c" 1>&6
1660else
1661 if test -n "$RANLIB"; then
1662 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1663else
1664 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1665 ac_dummy="$PATH"
1666 for ac_dir in $ac_dummy; do
1667 test -z "$ac_dir" && ac_dir=.
1668 if test -f $ac_dir/$ac_word; then
1669 ac_cv_prog_RANLIB="ranlib"
1670 break
1671 fi
1672 done
1673 IFS="$ac_save_ifs"
1674 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1675fi
1676fi
1677RANLIB="$ac_cv_prog_RANLIB"
1678if test -n "$RANLIB"; then
1679 echo "$ac_t""$RANLIB" 1>&6
1680else
1681 echo "$ac_t""no" 1>&6
1682fi
1683
1684# Extract the first word of "gcc", so it can be a program name with args.
1685set dummy gcc; ac_word=$2
1686echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1687echo "configure:1688: checking for $ac_word" >&5
a3ffcff3
TT
1688if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1689 echo $ac_n "(cached) $ac_c" 1>&6
1690else
1691 if test -n "$CC"; then
1692 ac_cv_prog_CC="$CC" # Let the user override the test.
1693else
1694 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1695 ac_dummy="$PATH"
1696 for ac_dir in $ac_dummy; do
1697 test -z "$ac_dir" && ac_dir=.
1698 if test -f $ac_dir/$ac_word; then
1699 ac_cv_prog_CC="gcc"
1700 break
1701 fi
1702 done
1703 IFS="$ac_save_ifs"
1704fi
1705fi
1706CC="$ac_cv_prog_CC"
1707if test -n "$CC"; then
1708 echo "$ac_t""$CC" 1>&6
1709else
1710 echo "$ac_t""no" 1>&6
1711fi
1712
1713if test -z "$CC"; then
1714 # Extract the first word of "cc", so it can be a program name with args.
1715set dummy cc; ac_word=$2
1716echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1717echo "configure:1718: checking for $ac_word" >&5
a3ffcff3
TT
1718if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1719 echo $ac_n "(cached) $ac_c" 1>&6
1720else
1721 if test -n "$CC"; then
1722 ac_cv_prog_CC="$CC" # Let the user override the test.
1723else
1724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1725 ac_prog_rejected=no
1726 ac_dummy="$PATH"
1727 for ac_dir in $ac_dummy; do
1728 test -z "$ac_dir" && ac_dir=.
1729 if test -f $ac_dir/$ac_word; then
1730 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1731 ac_prog_rejected=yes
1732 continue
1733 fi
1734 ac_cv_prog_CC="cc"
1735 break
1736 fi
1737 done
1738 IFS="$ac_save_ifs"
1739if test $ac_prog_rejected = yes; then
1740 # We found a bogon in the path, so make sure we never use it.
1741 set dummy $ac_cv_prog_CC
1742 shift
1743 if test $# -gt 0; then
1744 # We chose a different compiler from the bogus one.
1745 # However, it has the same basename, so the bogon will be chosen
1746 # first if we set CC to just the basename; use the full file name.
1747 shift
1748 set dummy "$ac_dir/$ac_word" "$@"
1749 shift
1750 ac_cv_prog_CC="$@"
1751 fi
1752fi
1753fi
1754fi
1755CC="$ac_cv_prog_CC"
1756if test -n "$CC"; then
1757 echo "$ac_t""$CC" 1>&6
1758else
1759 echo "$ac_t""no" 1>&6
1760fi
1761
1762 if test -z "$CC"; then
1763 case "`uname -s`" in
1764 *win32* | *WIN32*)
1765 # Extract the first word of "cl", so it can be a program name with args.
1766set dummy cl; ac_word=$2
1767echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 1768echo "configure:1769: checking for $ac_word" >&5
a3ffcff3
TT
1769if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1770 echo $ac_n "(cached) $ac_c" 1>&6
1771else
1772 if test -n "$CC"; then
1773 ac_cv_prog_CC="$CC" # Let the user override the test.
1774else
1775 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1776 ac_dummy="$PATH"
1777 for ac_dir in $ac_dummy; do
1778 test -z "$ac_dir" && ac_dir=.
1779 if test -f $ac_dir/$ac_word; then
1780 ac_cv_prog_CC="cl"
1781 break
1782 fi
1783 done
1784 IFS="$ac_save_ifs"
1785fi
1786fi
1787CC="$ac_cv_prog_CC"
1788if test -n "$CC"; then
1789 echo "$ac_t""$CC" 1>&6
1790else
1791 echo "$ac_t""no" 1>&6
1792fi
1793 ;;
1794 esac
1795 fi
1796 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1797fi
1798
1799echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
550c2492 1800echo "configure:1801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
a3ffcff3
TT
1801
1802ac_ext=c
1803# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1804ac_cpp='$CPP $CPPFLAGS'
1805ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1806ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1807cross_compiling=$ac_cv_prog_cc_cross
1808
1809cat > conftest.$ac_ext << EOF
1810
550c2492 1811#line 1812 "configure"
a3ffcff3
TT
1812#include "confdefs.h"
1813
1814main(){return(0);}
1815EOF
550c2492 1816if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a3ffcff3
TT
1817 ac_cv_prog_cc_works=yes
1818 # If we can't run a trivial program, we are probably using a cross compiler.
1819 if (./conftest; exit) 2>/dev/null; then
1820 ac_cv_prog_cc_cross=no
1821 else
1822 ac_cv_prog_cc_cross=yes
1823 fi
1824else
1825 echo "configure: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 ac_cv_prog_cc_works=no
1828fi
1829rm -fr conftest*
1830ac_ext=c
1831# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1832ac_cpp='$CPP $CPPFLAGS'
1833ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1834ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1835cross_compiling=$ac_cv_prog_cc_cross
1836
1837echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1838if test $ac_cv_prog_cc_works = no; then
1839 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1840fi
1841echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
550c2492 1842echo "configure:1843: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
a3ffcff3
TT
1843echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1844cross_compiling=$ac_cv_prog_cc_cross
1845
1846echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
550c2492 1847echo "configure:1848: checking whether we are using GNU C" >&5
a3ffcff3
TT
1848if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1849 echo $ac_n "(cached) $ac_c" 1>&6
1850else
1851 cat > conftest.c <<EOF
1852#ifdef __GNUC__
1853 yes;
1854#endif
1855EOF
550c2492 1856if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
a3ffcff3
TT
1857 ac_cv_prog_gcc=yes
1858else
1859 ac_cv_prog_gcc=no
1860fi
1861fi
1862
1863echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1864
1865if test $ac_cv_prog_gcc = yes; then
1866 GCC=yes
1867else
1868 GCC=
1869fi
1870
1871ac_test_CFLAGS="${CFLAGS+set}"
1872ac_save_CFLAGS="$CFLAGS"
1873CFLAGS=
1874echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
550c2492 1875echo "configure:1876: checking whether ${CC-cc} accepts -g" >&5
a3ffcff3
TT
1876if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1877 echo $ac_n "(cached) $ac_c" 1>&6
1878else
1879 echo 'void f(){}' > conftest.c
1880if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1881 ac_cv_prog_cc_g=yes
1882else
1883 ac_cv_prog_cc_g=no
1884fi
1885rm -f conftest*
1886
1887fi
1888
1889echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1890if test "$ac_test_CFLAGS" = set; then
1891 CFLAGS="$ac_save_CFLAGS"
1892elif test $ac_cv_prog_cc_g = yes; then
1893 if test "$GCC" = yes; then
1894 CFLAGS="-g -O2"
1895 else
1896 CFLAGS="-g"
1897 fi
1898else
1899 if test "$GCC" = yes; then
1900 CFLAGS="-O2"
1901 else
1902 CFLAGS=
1903 fi
1904fi
1905
1906# Check whether --with-gnu-ld or --without-gnu-ld was given.
1907if test "${with_gnu_ld+set}" = set; then
1908 withval="$with_gnu_ld"
1909 test "$withval" = no || with_gnu_ld=yes
1910else
1911 with_gnu_ld=no
1912fi
1913
a3ffcff3
TT
1914ac_prog=ld
1915if test "$ac_cv_prog_gcc" = yes; then
1916 # Check if gcc -print-prog-name=ld gives a path.
1917 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
550c2492 1918echo "configure:1919: checking for ld used by GCC" >&5
a3ffcff3
TT
1919 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1920 case "$ac_prog" in
01b02b11
TT
1921 # Accept absolute paths.
1922 /* | [A-Za-z]:[\\/]*)
1923 re_direlt='/[^/][^/]*/\.\./'
1924 # Canonicalize the path of ld
1925 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1926 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1927 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1928 done
1929 test -z "$LD" && LD="$ac_prog"
1930 ;;
a3ffcff3
TT
1931 "")
1932 # If it fails, then pretend we aren't using GCC.
1933 ac_prog=ld
1934 ;;
1935 *)
1936 # If it is relative, then search for the first ld in PATH.
1937 with_gnu_ld=unknown
1938 ;;
1939 esac
1940elif test "$with_gnu_ld" = yes; then
1941 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
550c2492 1942echo "configure:1943: checking for GNU ld" >&5
a3ffcff3
TT
1943else
1944 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
550c2492 1945echo "configure:1946: checking for non-GNU ld" >&5
a3ffcff3
TT
1946fi
1947if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1949else
1950 if test -z "$LD"; then
1951 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1952 for ac_dir in $PATH; do
1953 test -z "$ac_dir" && ac_dir=.
1954 if test -f "$ac_dir/$ac_prog"; then
1955 ac_cv_path_LD="$ac_dir/$ac_prog"
1956 # Check to see if the program is GNU ld. I'd rather use --version,
1957 # but apparently some GNU ld's only accept -v.
1958 # Break only if it was the GNU/non-GNU ld that we prefer.
1959 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1960 test "$with_gnu_ld" != no && break
1961 else
01b02b11 1962 test "$with_gnu_ld" != yes && break
a3ffcff3
TT
1963 fi
1964 fi
1965 done
1966 IFS="$ac_save_ifs"
1967else
1968 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1969fi
1970fi
1971
1972LD="$ac_cv_path_LD"
1973if test -n "$LD"; then
1974 echo "$ac_t""$LD" 1>&6
1975else
1976 echo "$ac_t""no" 1>&6
1977fi
1978test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1979
1980echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
550c2492 1981echo "configure:1982: checking if the linker ($LD) is GNU ld" >&5
a3ffcff3
TT
1982if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1983 echo $ac_n "(cached) $ac_c" 1>&6
1984else
1985 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1986if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1987 ac_cv_prog_gnu_ld=yes
1988else
1989 ac_cv_prog_gnu_ld=no
1990fi
1991fi
1992
1993echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1994
1995
1996echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
550c2492 1997echo "configure:1998: checking for BSD-compatible nm" >&5
a3ffcff3
TT
1998if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1999 echo $ac_n "(cached) $ac_c" 1>&6
2000else
2001 if test -n "$NM"; then
2002 # Let the user override the test.
2003 ac_cv_path_NM="$NM"
2004else
2005 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
01b02b11 2006 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
a3ffcff3
TT
2007 test -z "$ac_dir" && ac_dir=.
2008 if test -f $ac_dir/nm; then
2009 # Check to see if the nm accepts a BSD-compat flag.
2010 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2011 # nm: unknown option "B" ignored
2012 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
01b02b11
TT
2013 ac_cv_path_NM="$ac_dir/nm -B"
2014 break
a3ffcff3 2015 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
01b02b11
TT
2016 ac_cv_path_NM="$ac_dir/nm -p"
2017 break
a3ffcff3 2018 else
01b02b11
TT
2019 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2020 continue # so that we can try to find one that supports BSD flags
a3ffcff3 2021 fi
a3ffcff3
TT
2022 fi
2023 done
2024 IFS="$ac_save_ifs"
2025 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2026fi
2027fi
2028
2029NM="$ac_cv_path_NM"
2030echo "$ac_t""$NM" 1>&6
2031
2032
01b02b11
TT
2033# Check for command to grab the raw symbol name followed by C symbol from nm.
2034echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
550c2492 2035echo "configure:2036: checking command to parse $NM output" >&5
01b02b11
TT
2036if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
2037 echo $ac_n "(cached) $ac_c" 1>&6
2038else
2039 # These are sane defaults that work on at least a few old systems.
2040# {They come from Ultrix. What could be older than Ultrix?!! ;)}
2041
2042# Character class describing NM global symbol codes.
2043ac_symcode='[BCDEGRST]'
2044
2045# Regexp to match symbols that can be accessed directly from C.
2046ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
2047
2048# Transform the above into a raw symbol and a C symbol.
2049ac_symxfrm='\1 \2\3 \3'
2050
2051# Transform an extracted symbol line into a proper C declaration
2052ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
2053
2054# Define system-specific variables.
2055case "$host_os" in
2056aix*)
2057 ac_symcode='[BCDT]'
2058 ;;
2059cygwin* | mingw*)
2060 ac_symcode='[ABCDGISTW]'
2061 ;;
2062hpux*)
2063 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
2064 ;;
2065irix*)
2066 ac_symcode='[BCDEGRST]'
2067 ;;
2068solaris*)
2069 ac_symcode='[BDT]'
2070 ;;
2071esac
2072
2073# If we're using GNU nm, then use its standard symbol codes.
2074if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
2075 ac_symcode='[ABCDGISTW]'
2076fi
2077
2078# Try without a prefix undercore, then with it.
2079for ac_symprfx in "" "_"; do
2080
2081 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
2082
2083 # Check to see that the pipe works correctly.
2084 ac_pipe_works=no
2085 rm -f conftest.$ac_ext
2086 cat > conftest.$ac_ext <<EOF
2087#ifdef __cplusplus
2088extern "C" {
2089#endif
2090char nm_test_var;
2091void nm_test_func(){}
2092#ifdef __cplusplus
2093}
2094#endif
2095int main(){nm_test_var='a';nm_test_func;return 0;}
2096EOF
2097
550c2492 2098 if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
01b02b11
TT
2099 # Now try to grab the symbols.
2100 ac_nlist=conftest.nm
2101
550c2492 2102 if { (eval echo configure:2103: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
01b02b11
TT
2103
2104 # Try sorting and uniquifying the output.
2105 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
2106 mv -f "$ac_nlist"T "$ac_nlist"
2107 else
2108 rm -f "$ac_nlist"T
2109 fi
2110
2111 # Make sure that we snagged all the symbols we need.
2112 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
2113 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
2114 cat <<EOF > conftest.c
2115#ifdef __cplusplus
2116extern "C" {
2117#endif
2118
2119EOF
2120 # Now generate the symbol file.
2121 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
2122
2123 cat <<EOF >> conftest.c
2124#if defined (__STDC__) && __STDC__
2125# define lt_ptr_t void *
2126#else
2127# define lt_ptr_t char *
2128# define const
2129#endif
2130
2131/* The mapping between symbol names and symbols. */
2132const struct {
2133 const char *name;
2134 lt_ptr_t address;
2135}
2136lt_preloaded_symbols[] =
2137{
2138EOF
2139 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
2140 cat <<\EOF >> conftest.c
2141 {0, (lt_ptr_t) 0}
2142};
2143
2144#ifdef __cplusplus
2145}
2146#endif
2147EOF
2148 # Now try linking the two files.
2149 mv conftest.$ac_objext conftestm.$ac_objext
2150 ac_save_LIBS="$LIBS"
2151 ac_save_CFLAGS="$CFLAGS"
2152 LIBS="conftestm.$ac_objext"
2153 CFLAGS="$CFLAGS$no_builtin_flag"
550c2492 2154 if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
01b02b11
TT
2155 ac_pipe_works=yes
2156 else
2157 echo "configure: failed program was:" >&5
2158 cat conftest.c >&5
2159 fi
2160 LIBS="$ac_save_LIBS"
2161 CFLAGS="$ac_save_CFLAGS"
2162 else
2163 echo "cannot find nm_test_func in $ac_nlist" >&5
2164 fi
2165 else
2166 echo "cannot find nm_test_var in $ac_nlist" >&5
2167 fi
2168 else
2169 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
2170 fi
2171 else
2172 echo "$progname: failed program was:" >&5
2173 cat conftest.c >&5
2174 fi
2175 rm -rf conftest*
2176
2177 # Do not use the global_symbol_pipe unless it works.
2178 if test "$ac_pipe_works" = yes; then
2179 if test x"$ac_symprfx" = x"_"; then
2180 ac_cv_sys_symbol_underscore=yes
2181 else
2182 ac_cv_sys_symbol_underscore=no
2183 fi
2184 break
2185 else
2186 ac_cv_sys_global_symbol_pipe=
2187 fi
2188done
2189
2190fi
2191
2192
2193ac_result=yes
2194if test -z "$ac_cv_sys_global_symbol_pipe"; then
2195 ac_result=no
2196fi
2197echo "$ac_t""$ac_result" 1>&6
2198
2199echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
550c2492 2200echo "configure:2201: checking for _ prefix in compiled symbols" >&5
01b02b11
TT
2201if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
2202 echo $ac_n "(cached) $ac_c" 1>&6
2203else
2204 ac_cv_sys_symbol_underscore=no
2205cat > conftest.$ac_ext <<EOF
2206void nm_test_func(){}
2207int main(){nm_test_func;return 0;}
2208EOF
550c2492 2209if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
01b02b11
TT
2210 # Now try to grab the symbols.
2211 ac_nlist=conftest.nm
550c2492 2212 if { (eval echo configure:2213: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
01b02b11
TT
2213 # See whether the symbols have a leading underscore.
2214 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
2215 ac_cv_sys_symbol_underscore=yes
2216 else
2217 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
2218 :
2219 else
2220 echo "configure: cannot find nm_test_func in $ac_nlist" >&5
2221 fi
2222 fi
2223 else
2224 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
2225 fi
2226else
2227 echo "configure: failed program was:" >&5
2228 cat conftest.c >&5
2229fi
2230rm -rf conftest*
2231
2232fi
2233
2234echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
2235USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
2236
a3ffcff3 2237echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
550c2492 2238echo "configure:2239: checking whether ln -s works" >&5
a3ffcff3
TT
2239if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241else
2242 rm -f conftestdata
2243if ln -s X conftestdata 2>/dev/null
2244then
2245 rm -f conftestdata
2246 ac_cv_prog_LN_S="ln -s"
2247else
2248 ac_cv_prog_LN_S=ln
2249fi
2250fi
2251LN_S="$ac_cv_prog_LN_S"
2252if test "$ac_cv_prog_LN_S" = "ln -s"; then
2253 echo "$ac_t""yes" 1>&6
2254else
2255 echo "$ac_t""no" 1>&6
2256fi
2257
a3ffcff3
TT
2258
2259# Check for any special flags to pass to ltconfig.
01b02b11 2260libtool_flags="--cache-file=$cache_file"
a3ffcff3
TT
2261test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2262test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
01b02b11
TT
2263test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2264test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
a3ffcff3
TT
2265test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2266test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2267test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2268
2269# Some flags need to be propagated to the compiler or linker for good
2270# libtool support.
2271case "$host" in
2272*-*-irix6*)
2273 # Find out which ABI we are using.
550c2492
TT
2274 echo '#line 2275 "configure"' > conftest.$ac_ext
2275 if { (eval echo configure:2276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a3ffcff3
TT
2276 case "`/usr/bin/file conftest.o`" in
2277 *32-bit*)
2278 LD="${LD-ld} -32"
2279 ;;
2280 *N32*)
2281 LD="${LD-ld} -n32"
2282 ;;
2283 *64-bit*)
2284 LD="${LD-ld} -64"
2285 ;;
2286 esac
2287 fi
2288 rm -rf conftest*
2289 ;;
2290
2291*-*-sco3.2v5*)
2292 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
01b02b11 2293 SAVE_CFLAGS="$CFLAGS"
a3ffcff3 2294 CFLAGS="$CFLAGS -belf"
01b02b11 2295 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
550c2492 2296echo "configure:2297: checking whether the C compiler needs -belf" >&5
01b02b11
TT
2297if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2298 echo $ac_n "(cached) $ac_c" 1>&6
2299else
2300 cat > conftest.$ac_ext <<EOF
550c2492 2301#line 2302 "configure"
01b02b11
TT
2302#include "confdefs.h"
2303
2304int main() {
2305
2306; return 0; }
2307EOF
550c2492 2308if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
01b02b11
TT
2309 rm -rf conftest*
2310 lt_cv_cc_needs_belf=yes
2311else
2312 echo "configure: failed program was:" >&5
2313 cat conftest.$ac_ext >&5
2314 rm -rf conftest*
2315 lt_cv_cc_needs_belf=no
2316fi
2317rm -f conftest*
2318fi
2319
2320echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2321 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2322 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2323 CFLAGS="$SAVE_CFLAGS"
2324 fi
a3ffcff3
TT
2325 ;;
2326
01b02b11 2327*-*-cygwin*)
a3ffcff3
TT
2328 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2329set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2330echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 2331echo "configure:2332: checking for $ac_word" >&5
a3ffcff3
TT
2332if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2333 echo $ac_n "(cached) $ac_c" 1>&6
2334else
2335 if test -n "$DLLTOOL"; then
2336 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2337else
2338 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2339 ac_dummy="$PATH"
2340 for ac_dir in $ac_dummy; do
2341 test -z "$ac_dir" && ac_dir=.
2342 if test -f $ac_dir/$ac_word; then
2343 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2344 break
2345 fi
2346 done
2347 IFS="$ac_save_ifs"
2348fi
2349fi
2350DLLTOOL="$ac_cv_prog_DLLTOOL"
2351if test -n "$DLLTOOL"; then
2352 echo "$ac_t""$DLLTOOL" 1>&6
2353else
2354 echo "$ac_t""no" 1>&6
2355fi
2356
2357
2358if test -z "$ac_cv_prog_DLLTOOL"; then
2359if test -n "$ac_tool_prefix"; then
2360 # Extract the first word of "dlltool", so it can be a program name with args.
2361set dummy dlltool; ac_word=$2
2362echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 2363echo "configure:2364: checking for $ac_word" >&5
a3ffcff3
TT
2364if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
2366else
2367 if test -n "$DLLTOOL"; then
2368 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2369else
2370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2371 ac_dummy="$PATH"
2372 for ac_dir in $ac_dummy; do
2373 test -z "$ac_dir" && ac_dir=.
2374 if test -f $ac_dir/$ac_word; then
2375 ac_cv_prog_DLLTOOL="dlltool"
2376 break
2377 fi
2378 done
2379 IFS="$ac_save_ifs"
2380 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2381fi
2382fi
2383DLLTOOL="$ac_cv_prog_DLLTOOL"
2384if test -n "$DLLTOOL"; then
2385 echo "$ac_t""$DLLTOOL" 1>&6
2386else
2387 echo "$ac_t""no" 1>&6
2388fi
2389
2390else
2391 DLLTOOL="false"
2392fi
2393fi
2394
2395# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2396set dummy ${ac_tool_prefix}as; ac_word=$2
2397echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 2398echo "configure:2399: checking for $ac_word" >&5
a3ffcff3
TT
2399if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2400 echo $ac_n "(cached) $ac_c" 1>&6
2401else
2402 if test -n "$AS"; then
2403 ac_cv_prog_AS="$AS" # Let the user override the test.
2404else
2405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2406 ac_dummy="$PATH"
2407 for ac_dir in $ac_dummy; do
2408 test -z "$ac_dir" && ac_dir=.
2409 if test -f $ac_dir/$ac_word; then
2410 ac_cv_prog_AS="${ac_tool_prefix}as"
2411 break
2412 fi
2413 done
2414 IFS="$ac_save_ifs"
2415fi
2416fi
2417AS="$ac_cv_prog_AS"
2418if test -n "$AS"; then
2419 echo "$ac_t""$AS" 1>&6
2420else
2421 echo "$ac_t""no" 1>&6
2422fi
2423
2424
2425if test -z "$ac_cv_prog_AS"; then
2426if test -n "$ac_tool_prefix"; then
2427 # Extract the first word of "as", so it can be a program name with args.
2428set dummy as; ac_word=$2
2429echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550c2492 2430echo "configure:2431: checking for $ac_word" >&5
a3ffcff3
TT
2431if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2432 echo $ac_n "(cached) $ac_c" 1>&6
2433else
2434 if test -n "$AS"; then
2435 ac_cv_prog_AS="$AS" # Let the user override the test.
2436else
2437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2438 ac_dummy="$PATH"
2439 for ac_dir in $ac_dummy; do
2440 test -z "$ac_dir" && ac_dir=.
2441 if test -f $ac_dir/$ac_word; then
2442 ac_cv_prog_AS="as"
2443 break
2444 fi
2445 done
2446 IFS="$ac_save_ifs"
2447 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
2448fi
2449fi
2450AS="$ac_cv_prog_AS"
2451if test -n "$AS"; then
2452 echo "$ac_t""$AS" 1>&6
2453else
2454 echo "$ac_t""no" 1>&6
2455fi
2456
2457else
2458 AS="false"
2459fi
2460fi
2461
2462
2463 ;;
2464
2465esac
2466
01b02b11
TT
2467# enable the --disable-libtool-lock switch
2468
2469# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2470if test "${enable_libtool_lock+set}" = set; then
2471 enableval="$enable_libtool_lock"
2472 need_locks=$enableval
2473else
2474 need_locks=yes
2475fi
2476
2477
2478if test x"$need_locks" = xno; then
2479 libtool_flags="$libtool_flags --disable-lock"
2480fi
2481
2482
2483# Save cache, so that ltconfig can load it
2484cat > confcache <<\EOF
2485# This file is a shell script that caches the results of configure
2486# tests run on this system so they can be shared between configure
2487# scripts and configure runs. It is not useful on other systems.
2488# If it contains results you don't want to keep, you may remove or edit it.
2489#
2490# By default, configure uses ./config.cache as the cache file,
2491# creating it if it does not exist already. You can give configure
2492# the --cache-file=FILE option to use a different cache file; that is
2493# what configure does when it calls configure scripts in
2494# subdirectories, so they share the cache.
2495# Giving --cache-file=/dev/null disables caching, for debugging configure.
2496# config.status only pays attention to the cache file if you give it the
2497# --recheck option to rerun configure.
2498#
2499EOF
2500# The following way of writing the cache mishandles newlines in values,
2501# but we know of no workaround that is simple, portable, and efficient.
2502# So, don't put newlines in cache variables' values.
2503# Ultrix sh set writes to stderr and can't be redirected directly,
2504# and sets the high bit in the cache file unless we assign to the vars.
2505(set) 2>&1 |
2506 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2507 *ac_space=\ *)
2508 # `set' does not quote correctly, so add quotes (double-quote substitution
2509 # turns \\\\ into \\, and sed turns \\ into \).
2510 sed -n \
2511 -e "s/'/'\\\\''/g" \
2512 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2513 ;;
2514 *)
2515 # `set' quotes correctly as required by POSIX, so do not add quotes.
2516 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2517 ;;
2518 esac >> confcache
2519if cmp -s $cache_file confcache; then
2520 :
2521else
2522 if test -w $cache_file; then
2523 echo "updating cache $cache_file"
2524 cat confcache > $cache_file
2525 else
2526 echo "not updating unwritable cache $cache_file"
2527 fi
2528fi
2529rm -f confcache
2530
2531
a3ffcff3
TT
2532# Actually configure libtool. ac_aux_dir is where install-sh is found.
2533CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2534LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2535DLLTOOL="$DLLTOOL" AS="$AS" \
2536${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2537$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2538|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2539
01b02b11
TT
2540# Reload cache, that may have been modified by ltconfig
2541if test -r "$cache_file"; then
2542 echo "loading cache $cache_file"
2543 . $cache_file
2544else
2545 echo "creating cache $cache_file"
2546 > $cache_file
2547fi
2548
2549
2550# This can be used to rebuild libtool when needed
2551LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2552
2553# Always use our own libtool.
2554LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2555
a3ffcff3
TT
2556# Redirect the config.log output again, so that the ltconfig log is not
2557# clobbered by the next message.
2558exec 5>>./config.log
2559
2560
ee9dd372
TT
2561if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2562 COMPPATH=.
2563else
2564 COMPPATH=..
2565fi
2566
2567
2568
2569
2570if test -d $srcdir/testsuite; then
2571 TESTSUBDIR_TRUE=
2572 TESTSUBDIR_FALSE='#'
2573else
2574 TESTSUBDIR_TRUE='#'
2575 TESTSUBDIR_FALSE=
2576fi
2577
2578# Check whether --enable-fast-character or --disable-fast-character was given.
2579if test "${enable_fast_character+set}" = set; then
2580 enableval="$enable_fast_character"
2581 # Nothing
2582
2583else
2584 cat >> confdefs.h <<\EOF
2585#define COMPACT_CHARACTER 1
2586EOF
2587
2588fi
2589
2590
2591# Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2592if test "${enable_libgcj_debug+set}" = set; then
2593 enableval="$enable_libgcj_debug"
2594 if test "$enable_libgcj_debug" = yes; then
2595 cat >> confdefs.h <<\EOF
2596#define DEBUG 1
2597EOF
2598
2599 fi
2600fi
2601
2602
2603TARGET_ECOS="no"
2604# Check whether --with-ecos or --without-ecos was given.
2605if test "${with_ecos+set}" = set; then
2606 withval="$with_ecos"
2607 TARGET_ECOS="$with_ecos"
2608
2609fi
2610
2611
2612case "$TARGET_ECOS" in
2613 no)
2614 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
42962a48 2615 PROCESS=Posix
ee9dd372
TT
2616 ;;
2617 *)
2618 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
42962a48 2619 PROCESS=Ecos
ee9dd372
TT
2620 cat >> confdefs.h <<\EOF
2621#define ECOS 1
2622EOF
2623
2624 ;;
2625esac
2626
2627echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
550c2492 2628echo "configure:2629: checking how to run the C preprocessor" >&5
ee9dd372
TT
2629# On Suns, sometimes $CPP names a directory.
2630if test -n "$CPP" && test -d "$CPP"; then
2631 CPP=
2632fi
2633if test -z "$CPP"; then
2634if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2635 echo $ac_n "(cached) $ac_c" 1>&6
2636else
2637 # This must be in double quotes, not single quotes, because CPP may get
2638 # substituted into the Makefile and "${CC-cc}" will confuse make.
2639 CPP="${CC-cc} -E"
2640 # On the NeXT, cc -E runs the code through the compiler's parser,
2641 # not just through cpp.
2642 cat > conftest.$ac_ext <<EOF
550c2492 2643#line 2644 "configure"
ee9dd372
TT
2644#include "confdefs.h"
2645#include <assert.h>
2646Syntax Error
2647EOF
2648ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
550c2492 2649{ (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ee9dd372
TT
2650ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2651if test -z "$ac_err"; then
2652 :
2653else
2654 echo "$ac_err" >&5
2655 echo "configure: failed program was:" >&5
2656 cat conftest.$ac_ext >&5
2657 rm -rf conftest*
2658 CPP="${CC-cc} -E -traditional-cpp"
2659 cat > conftest.$ac_ext <<EOF
550c2492 2660#line 2661 "configure"
ee9dd372
TT
2661#include "confdefs.h"
2662#include <assert.h>
2663Syntax Error
2664EOF
2665ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
550c2492 2666{ (eval echo configure:2667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ee9dd372
TT
2667ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2668if test -z "$ac_err"; then
2669 :
2670else
2671 echo "$ac_err" >&5
2672 echo "configure: failed program was:" >&5
2673 cat conftest.$ac_ext >&5
2674 rm -rf conftest*
2675 CPP="${CC-cc} -nologo -E"
2676 cat > conftest.$ac_ext <<EOF
550c2492 2677#line 2678 "configure"
ee9dd372
TT
2678#include "confdefs.h"
2679#include <assert.h>
2680Syntax Error
2681EOF
2682ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
550c2492 2683{ (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ee9dd372
TT
2684ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2685if test -z "$ac_err"; then
2686 :
2687else
2688 echo "$ac_err" >&5
2689 echo "configure: failed program was:" >&5
2690 cat conftest.$ac_ext >&5
2691 rm -rf conftest*
2692 CPP=/lib/cpp
2693fi
2694rm -f conftest*
2695fi
2696rm -f conftest*
2697fi
2698rm -f conftest*
2699 ac_cv_prog_CPP="$CPP"
2700fi
2701 CPP="$ac_cv_prog_CPP"
2702else
2703 ac_cv_prog_CPP="$CPP"
2704fi
2705echo "$ac_t""$CPP" 1>&6
2706
2707cat > conftest.$ac_ext <<EOF
550c2492 2708#line 2709 "configure"
ee9dd372
TT
2709#include "confdefs.h"
2710#include <sys/types.h>
2711EOF
2712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2713 egrep "__uint32_t" >/dev/null 2>&1; then
2714 rm -rf conftest*
2715 cat >> confdefs.h <<\EOF
2716#define HAVE_INT32_DEFINED 1
2717EOF
2718
2719fi
2720rm -f conftest*
2721
2722cat > conftest.$ac_ext <<EOF
550c2492 2723#line 2724 "configure"
ee9dd372
TT
2724#include "confdefs.h"
2725#include <sys/config.h>
2726EOF
2727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2728 egrep "__uint32_t" >/dev/null 2>&1; then
2729 rm -rf conftest*
2730 cat >> confdefs.h <<\EOF
2731#define HAVE_INT32_DEFINED 1
2732EOF
2733
2734fi
2735rm -f conftest*
2736
2737
2738cat > conftest.$ac_ext <<EOF
550c2492 2739#line 2740 "configure"
ee9dd372
TT
2740#include "confdefs.h"
2741#include <time.h>
2742EOF
2743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744 egrep "mktime" >/dev/null 2>&1; then
2745 rm -rf conftest*
2746 cat >> confdefs.h <<\EOF
2747#define HAVE_MKTIME 1
2748EOF
2749
2750fi
2751rm -f conftest*
2752
2753cat > conftest.$ac_ext <<EOF
550c2492 2754#line 2755 "configure"
ee9dd372
TT
2755#include "confdefs.h"
2756#include <time.h>
2757EOF
2758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2759 egrep "localtime" >/dev/null 2>&1; then
2760 rm -rf conftest*
2761 cat >> confdefs.h <<\EOF
2762#define HAVE_LOCALTIME 1
2763EOF
2764
2765fi
2766rm -f conftest*
2767
2768
2769test -d java || mkdir java
2770test -d java/io || mkdir java/io
2771
2772
42962a48
TT
2773test -d java/lang || mkdir java/lang
2774
2775
2776
f994389b
TT
2777SYSTEMSPEC=
2778
2779
2780# Check whether --with-system-zlib or --without-system-zlib was given.
2781if test "${with_system_zlib+set}" = set; then
2782 withval="$with_system_zlib"
2783 :
2784fi
2785
2786ZLIBSPEC=
2787
2788
2789libsubdir=.libs
2790
ee9dd372 2791echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
550c2492 2792echo "configure:2793: checking for garbage collector to use" >&5
ee9dd372
TT
2793# Check whether --enable-java-gc or --disable-java-gc was given.
2794if test "${enable_java_gc+set}" = set; then
2795 enableval="$enable_java_gc"
2796
2797 GC=$enableval
2798else
2799 GC=boehm
2800fi
2801
2802GCLIBS=
2803GCINCS=
2804GCDEPS=
2805GCOBJS=
f994389b 2806GCSPEC=
ee9dd372
TT
2807case "$GC" in
2808 boehm)
2809 echo "$ac_t""boehm" 1>&6
a3ffcff3 2810 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
f994389b
TT
2811 # We include the path to the boehm-gc build directory.
2812 # See Makefile.am to understand why.
2813 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
ee9dd372 2814 GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
f994389b 2815 GCSPEC='-lgcjgc'
ee9dd372 2816 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
a3ffcff3 2817 GCOBJS=boehm.lo
ee9dd372
TT
2818 GCHDR=boehm-gc.h
2819 cat >> confdefs.h <<\EOF
2820#define HAVE_BOEHM_GC 1
2821EOF
2822
2823 ;;
2824 no)
2825 echo "$ac_t""none" 1>&6
a3ffcff3 2826 GCOBJS=nogc.lo
ee9dd372
TT
2827 GCHDR=no-gc.h
2828 ;;
2829 *)
2830 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
2831 ;;
2832esac
2833
2834
2835
2836
2837
2838
2839
f994389b 2840
ee9dd372 2841echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
550c2492 2842echo "configure:2843: checking for threads package to use" >&5
ee9dd372
TT
2843# Check whether --enable-threads or --disable-threads was given.
2844if test "${enable_threads+set}" = set; then
2845 enableval="$enable_threads"
2846 THREADS=$enableval
2847else
2848 THREADS=no
2849fi
2850
2851
2852if test "$THREADS" = yes; then
2853 case "$host" in
2854 *-*-vxworks*)
2855 THREADS=vxworks
2856 ;;
2857 *-*-linux*)
2858 # FIXME: this isn't correct in all cases.
2859 THREADS=posix
2860 ;;
2861 *-*-win*)
2862 THREADS=win32
2863 ;;
2864 *-*-irix*)
395e3bf9
GZ
2865 # FIXME: for now, choose POSIX, because we implement that.
2866 # Later, choose irix threads.
2867 THREADS=posix
ee9dd372
TT
2868 ;;
2869 *-*-solaris*)
2870 # FIXME: for now, choose POSIX, because we implement that.
2871 # Later, choose solaris threads.
2872 THREADS=posix
2873 ;;
2874 *)
2875 # For now.
2876 THREADS=none
2877 ;;
2878 esac
2879fi
2880
2881case "$THREADS" in
2882 no | none | single)
2883 THREADS=none
2884 ;;
2885 posix | pthreads)
2886 THREADS=posix
2887 case "$host" in
2888 *-*-linux*)
2889 cat >> confdefs.h <<\EOF
2890#define LINUX_THREADS 1
2891EOF
2892
2893 ;;
2894 esac
2895 ;;
2896 qt)
2897 ;;
2898 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
2899 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
2900 ;;
2901 *)
2902 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
2903 ;;
2904esac
2905echo "$ac_t""$THREADS" 1>&6
2906
2907THREADLIBS=
2908THREADINCS=
2909THREADDEPS=
2910THREADOBJS=
2911THREADH=
f994389b 2912THREADSPEC=
ee9dd372
TT
2913case "$THREADS" in
2914 posix)
2915 THREADLIBS=-lpthread
f994389b 2916 THREADSPEC=-lpthread
a3ffcff3 2917 THREADOBJS=posix-threads.lo
ee9dd372
TT
2918 THREADH=posix-threads.h
2919 # MIT pthreads doesn't seem to have the mutexattr functions.
2920 # But for now we don't check for it. We just assume you aren't
2921 # using MIT pthreads.
2922 cat >> confdefs.h <<\EOF
2923#define HAVE_PTHREAD_MUTEXATTR_INIT 1
2924EOF
2925
2926 ;;
2927
2928 qt)
a3ffcff3 2929 THREADDEPS='$(top_builddir)/../qthreads/libgcjcoop.la'
f994389b
TT
2930 # We include the path to the qthreads build directory.
2931 # See Makefile.am to understand why.
2932 THREADLIBS="$THREADDEPS -L\$(here)/../qthreads/$libsubdir"
2933 THREADSPEC='-lgcjcoop'
a3ffcff3 2934 THREADOBJS=quick-threads.lo
ee9dd372
TT
2935 THREADINCS='-I$(top_srcdir)/../qthreads'
2936 THREADH=quick-threads.h
ee9dd372
TT
2937 ;;
2938
2939 none)
a3ffcff3 2940 THREADOBJS=no-threads.lo
ee9dd372
TT
2941 THREADH=no-threads.h
2942 ;;
2943esac
2944
2945
2946
2947
2948
2949
2950
2951
f994389b 2952
ee9dd372
TT
2953if test "$GCC" = yes; then
2954 USING_GCC_TRUE=
2955 USING_GCC_FALSE='#'
2956else
2957 USING_GCC_TRUE='#'
2958 USING_GCC_FALSE=
2959fi
2960
2961CANADIAN=no
2962NULL_TARGET=no
2963
2964# Find eh-common.h and support headers. If we're in the tree with
2965# gcc, then look there. Otherwise look in compat-include. If all else
2966# fails, just hope the user has set things up somehow.
2967if test -r $srcdir/../gcc/eh-common.h; then
2968 EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
2969else
2970 if test -d $srcdir/../compat-include; then
2971 EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
2972 else
2973 EH_COMMON_INCLUDE=
2974 fi
2975fi
2976
2977if test -n "${with_cross_host}"; then
2978 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
2979 # may not work correctly, because the compiler may not be able to
2980 # link executables.
2981
2982 # We assume newlib. This lets us hard-code the functions we know
2983 # we'll have.
2984 cat >> confdefs.h <<\EOF
2985#define HAVE_MEMMOVE 1
2986EOF
2987
2988 cat >> confdefs.h <<\EOF
2989#define HAVE_MEMCPY 1
2990EOF
2991
2992 cat >> confdefs.h <<\EOF
2993#define HAVE_STRERROR 1
2994EOF
2995
2996 cat >> confdefs.h <<\EOF
2997#define HAVE_CTIME_R 1
2998EOF
2999
3000 cat >> confdefs.h <<\EOF
3001#define HAVE_GMTIME_R 1
3002EOF
3003
3004 cat >> confdefs.h <<\EOF
3005#define HAVE_LOCALTIME_R 1
3006EOF
3007
3008 cat >> confdefs.h <<\EOF
3009#define HAVE_PTHREAD_MUTEXATTR_INIT 1
3010EOF
3011
3012 cat >> confdefs.h <<\EOF
3013#define HAVE_ALLOCA 1
3014EOF
3015
3016
f994389b
TT
3017 ZLIBSPEC=-lgcj
3018
ee9dd372
TT
3019 # If Canadian cross, then don't pick up tools from the build
3020 # directory.
3021 if test "$build" != "$with_cross_host"; then
3022 CANADIAN=yes
3023 EH_COMMON_INCLUDE=
01b02b11
TT
3024 GCJ="${target_alias}/gcj"
3025 else
3026 GCJ=
ee9dd372
TT
3027 fi
3028else
3029 # Some POSIX thread systems don't have pthread_mutexattr_settype.
3030 # E.g., Solaris.
3031 for ac_func in strerror ioctl select open fsync sleep
3032do
3033echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3034echo "configure:3035: checking for $ac_func" >&5
ee9dd372
TT
3035if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3036 echo $ac_n "(cached) $ac_c" 1>&6
3037else
3038 cat > conftest.$ac_ext <<EOF
550c2492 3039#line 3040 "configure"
ee9dd372
TT
3040#include "confdefs.h"
3041/* System header to define __stub macros and hopefully few prototypes,
3042 which can conflict with char $ac_func(); below. */
3043#include <assert.h>
3044/* Override any gcc2 internal prototype to avoid an error. */
3045/* We use char because int might match the return type of a gcc2
3046 builtin and then its argument prototype would still apply. */
3047char $ac_func();
3048
3049int main() {
3050
3051/* The GNU C library defines this for functions which it implements
3052 to always fail with ENOSYS. Some functions are actually named
3053 something starting with __ and the normal name is an alias. */
3054#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3055choke me
3056#else
3057$ac_func();
3058#endif
3059
3060; return 0; }
3061EOF
550c2492 3062if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3063 rm -rf conftest*
3064 eval "ac_cv_func_$ac_func=yes"
3065else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068 rm -rf conftest*
3069 eval "ac_cv_func_$ac_func=no"
3070fi
3071rm -f conftest*
3072fi
3073
3074if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3075 echo "$ac_t""yes" 1>&6
3076 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3077 cat >> confdefs.h <<EOF
3078#define $ac_tr_func 1
3079EOF
3080
3081else
3082 echo "$ac_t""no" 1>&6
3083fi
3084done
3085
3086 for ac_func in ctime_r ctime
3087do
3088echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3089echo "configure:3090: checking for $ac_func" >&5
ee9dd372
TT
3090if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3091 echo $ac_n "(cached) $ac_c" 1>&6
3092else
3093 cat > conftest.$ac_ext <<EOF
550c2492 3094#line 3095 "configure"
ee9dd372
TT
3095#include "confdefs.h"
3096/* System header to define __stub macros and hopefully few prototypes,
3097 which can conflict with char $ac_func(); below. */
3098#include <assert.h>
3099/* Override any gcc2 internal prototype to avoid an error. */
3100/* We use char because int might match the return type of a gcc2
3101 builtin and then its argument prototype would still apply. */
3102char $ac_func();
3103
3104int main() {
3105
3106/* The GNU C library defines this for functions which it implements
3107 to always fail with ENOSYS. Some functions are actually named
3108 something starting with __ and the normal name is an alias. */
3109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3110choke me
3111#else
3112$ac_func();
3113#endif
3114
3115; return 0; }
3116EOF
550c2492 3117if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3118 rm -rf conftest*
3119 eval "ac_cv_func_$ac_func=yes"
3120else
3121 echo "configure: failed program was:" >&5
3122 cat conftest.$ac_ext >&5
3123 rm -rf conftest*
3124 eval "ac_cv_func_$ac_func=no"
3125fi
3126rm -f conftest*
3127fi
3128
3129if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3130 echo "$ac_t""yes" 1>&6
3131 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3132 cat >> confdefs.h <<EOF
3133#define $ac_tr_func 1
3134EOF
3135 break
3136else
3137 echo "$ac_t""no" 1>&6
3138fi
3139done
3140
3141 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r
3142do
3143echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3144echo "configure:3145: checking for $ac_func" >&5
ee9dd372
TT
3145if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3147else
3148 cat > conftest.$ac_ext <<EOF
550c2492 3149#line 3150 "configure"
ee9dd372
TT
3150#include "confdefs.h"
3151/* System header to define __stub macros and hopefully few prototypes,
3152 which can conflict with char $ac_func(); below. */
3153#include <assert.h>
3154/* Override any gcc2 internal prototype to avoid an error. */
3155/* We use char because int might match the return type of a gcc2
3156 builtin and then its argument prototype would still apply. */
3157char $ac_func();
3158
3159int main() {
3160
3161/* The GNU C library defines this for functions which it implements
3162 to always fail with ENOSYS. Some functions are actually named
3163 something starting with __ and the normal name is an alias. */
3164#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3165choke me
3166#else
3167$ac_func();
3168#endif
3169
3170; return 0; }
3171EOF
550c2492 3172if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3173 rm -rf conftest*
3174 eval "ac_cv_func_$ac_func=yes"
3175else
3176 echo "configure: failed program was:" >&5
3177 cat conftest.$ac_ext >&5
3178 rm -rf conftest*
3179 eval "ac_cv_func_$ac_func=no"
3180fi
3181rm -f conftest*
3182fi
3183
3184if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3185 echo "$ac_t""yes" 1>&6
3186 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3187 cat >> confdefs.h <<EOF
3188#define $ac_tr_func 1
3189EOF
3190
3191else
3192 echo "$ac_t""no" 1>&6
3193fi
3194done
3195
3196 for ac_func in access stat mkdir rename rmdir unlink realpath
3197do
3198echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3199echo "configure:3200: checking for $ac_func" >&5
ee9dd372
TT
3200if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3201 echo $ac_n "(cached) $ac_c" 1>&6
3202else
3203 cat > conftest.$ac_ext <<EOF
550c2492 3204#line 3205 "configure"
ee9dd372
TT
3205#include "confdefs.h"
3206/* System header to define __stub macros and hopefully few prototypes,
3207 which can conflict with char $ac_func(); below. */
3208#include <assert.h>
3209/* Override any gcc2 internal prototype to avoid an error. */
3210/* We use char because int might match the return type of a gcc2
3211 builtin and then its argument prototype would still apply. */
3212char $ac_func();
3213
3214int main() {
3215
3216/* The GNU C library defines this for functions which it implements
3217 to always fail with ENOSYS. Some functions are actually named
3218 something starting with __ and the normal name is an alias. */
3219#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3220choke me
3221#else
3222$ac_func();
3223#endif
3224
3225; return 0; }
3226EOF
550c2492 3227if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3228 rm -rf conftest*
3229 eval "ac_cv_func_$ac_func=yes"
3230else
3231 echo "configure: failed program was:" >&5
3232 cat conftest.$ac_ext >&5
3233 rm -rf conftest*
3234 eval "ac_cv_func_$ac_func=no"
3235fi
3236rm -f conftest*
3237fi
3238
3239if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3240 echo "$ac_t""yes" 1>&6
3241 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3242 cat >> confdefs.h <<EOF
3243#define $ac_tr_func 1
3244EOF
3245
3246else
3247 echo "$ac_t""no" 1>&6
3248fi
3249done
3250
3251 for ac_func in inet_aton inet_addr
3252do
3253echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3254echo "configure:3255: checking for $ac_func" >&5
ee9dd372
TT
3255if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3256 echo $ac_n "(cached) $ac_c" 1>&6
3257else
3258 cat > conftest.$ac_ext <<EOF
550c2492 3259#line 3260 "configure"
ee9dd372
TT
3260#include "confdefs.h"
3261/* System header to define __stub macros and hopefully few prototypes,
3262 which can conflict with char $ac_func(); below. */
3263#include <assert.h>
3264/* Override any gcc2 internal prototype to avoid an error. */
3265/* We use char because int might match the return type of a gcc2
3266 builtin and then its argument prototype would still apply. */
3267char $ac_func();
3268
3269int main() {
3270
3271/* The GNU C library defines this for functions which it implements
3272 to always fail with ENOSYS. Some functions are actually named
3273 something starting with __ and the normal name is an alias. */
3274#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3275choke me
3276#else
3277$ac_func();
3278#endif
3279
3280; return 0; }
3281EOF
550c2492 3282if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3283 rm -rf conftest*
3284 eval "ac_cv_func_$ac_func=yes"
3285else
3286 echo "configure: failed program was:" >&5
3287 cat conftest.$ac_ext >&5
3288 rm -rf conftest*
3289 eval "ac_cv_func_$ac_func=no"
3290fi
3291rm -f conftest*
3292fi
3293
3294if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3295 echo "$ac_t""yes" 1>&6
3296 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3297 cat >> confdefs.h <<EOF
3298#define $ac_tr_func 1
3299EOF
3300 break
3301else
3302 echo "$ac_t""no" 1>&6
3303fi
3304done
3305
3306 for ac_func in inet_pton uname
3307do
3308echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3309echo "configure:3310: checking for $ac_func" >&5
ee9dd372
TT
3310if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3311 echo $ac_n "(cached) $ac_c" 1>&6
3312else
3313 cat > conftest.$ac_ext <<EOF
550c2492 3314#line 3315 "configure"
ee9dd372
TT
3315#include "confdefs.h"
3316/* System header to define __stub macros and hopefully few prototypes,
3317 which can conflict with char $ac_func(); below. */
3318#include <assert.h>
3319/* Override any gcc2 internal prototype to avoid an error. */
3320/* We use char because int might match the return type of a gcc2
3321 builtin and then its argument prototype would still apply. */
3322char $ac_func();
3323
3324int main() {
3325
3326/* The GNU C library defines this for functions which it implements
3327 to always fail with ENOSYS. Some functions are actually named
3328 something starting with __ and the normal name is an alias. */
3329#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3330choke me
3331#else
3332$ac_func();
3333#endif
3334
3335; return 0; }
3336EOF
550c2492 3337if { (eval echo configure:3338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3338 rm -rf conftest*
3339 eval "ac_cv_func_$ac_func=yes"
3340else
3341 echo "configure: failed program was:" >&5
3342 cat conftest.$ac_ext >&5
3343 rm -rf conftest*
3344 eval "ac_cv_func_$ac_func=no"
3345fi
3346rm -f conftest*
3347fi
3348
3349if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3350 echo "$ac_t""yes" 1>&6
3351 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3352 cat >> confdefs.h <<EOF
3353#define $ac_tr_func 1
3354EOF
3355
3356else
3357 echo "$ac_t""no" 1>&6
3358fi
3359done
3360
3361
3362 for ac_func in gethostbyname_r
3363do
3364echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3365echo "configure:3366: checking for $ac_func" >&5
ee9dd372
TT
3366if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3367 echo $ac_n "(cached) $ac_c" 1>&6
3368else
3369 cat > conftest.$ac_ext <<EOF
550c2492 3370#line 3371 "configure"
ee9dd372
TT
3371#include "confdefs.h"
3372/* System header to define __stub macros and hopefully few prototypes,
3373 which can conflict with char $ac_func(); below. */
3374#include <assert.h>
3375/* Override any gcc2 internal prototype to avoid an error. */
3376/* We use char because int might match the return type of a gcc2
3377 builtin and then its argument prototype would still apply. */
3378char $ac_func();
3379
3380int main() {
3381
3382/* The GNU C library defines this for functions which it implements
3383 to always fail with ENOSYS. Some functions are actually named
3384 something starting with __ and the normal name is an alias. */
3385#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3386choke me
3387#else
3388$ac_func();
3389#endif
3390
3391; return 0; }
3392EOF
550c2492 3393if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3394 rm -rf conftest*
3395 eval "ac_cv_func_$ac_func=yes"
3396else
3397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3399 rm -rf conftest*
3400 eval "ac_cv_func_$ac_func=no"
3401fi
3402rm -f conftest*
3403fi
3404
3405if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3406 echo "$ac_t""yes" 1>&6
3407 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3408 cat >> confdefs.h <<EOF
3409#define $ac_tr_func 1
3410EOF
3411
3412 cat >> confdefs.h <<\EOF
3413#define HAVE_GETHOSTBYNAME_R 1
3414EOF
3415
3416 # There are two different kinds of gethostbyname_r.
3417 # We look for the one that returns `int'.
3418 # Hopefully this check is robust enough.
3419 cat > conftest.$ac_ext <<EOF
550c2492 3420#line 3421 "configure"
ee9dd372
TT
3421#include "confdefs.h"
3422#include <netdb.h>
3423EOF
3424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3425 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
3426 rm -rf conftest*
3427
3428 cat >> confdefs.h <<\EOF
3429#define GETHOSTBYNAME_R_RETURNS_INT 1
3430EOF
3431
3432fi
3433rm -f conftest*
3434
3435else
3436 echo "$ac_t""no" 1>&6
3437fi
3438done
3439
3440
3441 for ac_func in gethostbyaddr_r
3442do
3443echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3444echo "configure:3445: checking for $ac_func" >&5
ee9dd372
TT
3445if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3446 echo $ac_n "(cached) $ac_c" 1>&6
3447else
3448 cat > conftest.$ac_ext <<EOF
550c2492 3449#line 3450 "configure"
ee9dd372
TT
3450#include "confdefs.h"
3451/* System header to define __stub macros and hopefully few prototypes,
3452 which can conflict with char $ac_func(); below. */
3453#include <assert.h>
3454/* Override any gcc2 internal prototype to avoid an error. */
3455/* We use char because int might match the return type of a gcc2
3456 builtin and then its argument prototype would still apply. */
3457char $ac_func();
3458
3459int main() {
3460
3461/* The GNU C library defines this for functions which it implements
3462 to always fail with ENOSYS. Some functions are actually named
3463 something starting with __ and the normal name is an alias. */
3464#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3465choke me
3466#else
3467$ac_func();
3468#endif
3469
3470; return 0; }
3471EOF
550c2492 3472if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3473 rm -rf conftest*
3474 eval "ac_cv_func_$ac_func=yes"
3475else
3476 echo "configure: failed program was:" >&5
3477 cat conftest.$ac_ext >&5
3478 rm -rf conftest*
3479 eval "ac_cv_func_$ac_func=no"
3480fi
3481rm -f conftest*
3482fi
3483
3484if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3485 echo "$ac_t""yes" 1>&6
3486 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3487 cat >> confdefs.h <<EOF
3488#define $ac_tr_func 1
3489EOF
3490
3491 cat >> confdefs.h <<\EOF
3492#define HAVE_GETHOSTBYADDR_R 1
3493EOF
3494
3495 # There are two different kinds of gethostbyaddr_r.
3496 # We look for the one that returns `int'.
3497 # Hopefully this check is robust enough.
3498 cat > conftest.$ac_ext <<EOF
550c2492 3499#line 3500 "configure"
ee9dd372
TT
3500#include "confdefs.h"
3501#include <netdb.h>
3502EOF
3503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3504 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
3505 rm -rf conftest*
3506
3507 cat >> confdefs.h <<\EOF
3508#define GETHOSTBYADDR_R_RETURNS_INT 1
3509EOF
3510
3511fi
3512rm -f conftest*
3513
3514else
3515 echo "$ac_t""no" 1>&6
3516fi
3517done
3518
3519
3520 for ac_func in gethostname
3521do
3522echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3523echo "configure:3524: checking for $ac_func" >&5
ee9dd372
TT
3524if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3526else
3527 cat > conftest.$ac_ext <<EOF
550c2492 3528#line 3529 "configure"
ee9dd372
TT
3529#include "confdefs.h"
3530/* System header to define __stub macros and hopefully few prototypes,
3531 which can conflict with char $ac_func(); below. */
3532#include <assert.h>
3533/* Override any gcc2 internal prototype to avoid an error. */
3534/* We use char because int might match the return type of a gcc2
3535 builtin and then its argument prototype would still apply. */
3536char $ac_func();
3537
3538int main() {
3539
3540/* The GNU C library defines this for functions which it implements
3541 to always fail with ENOSYS. Some functions are actually named
3542 something starting with __ and the normal name is an alias. */
3543#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3544choke me
3545#else
3546$ac_func();
3547#endif
3548
3549; return 0; }
3550EOF
550c2492 3551if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3552 rm -rf conftest*
3553 eval "ac_cv_func_$ac_func=yes"
3554else
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
3557 rm -rf conftest*
3558 eval "ac_cv_func_$ac_func=no"
3559fi
3560rm -f conftest*
3561fi
3562
3563if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3564 echo "$ac_t""yes" 1>&6
3565 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3566 cat >> confdefs.h <<EOF
3567#define $ac_tr_func 1
3568EOF
3569
3570 cat >> confdefs.h <<\EOF
3571#define HAVE_GETHOSTNAME 1
3572EOF
3573
3574 cat > conftest.$ac_ext <<EOF
550c2492 3575#line 3576 "configure"
ee9dd372
TT
3576#include "confdefs.h"
3577#include <unistd.h>
3578EOF
3579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3580 egrep "gethostname" >/dev/null 2>&1; then
3581 rm -rf conftest*
3582
3583 cat >> confdefs.h <<\EOF
3584#define HAVE_GETHOSTNAME_DECL 1
3585EOF
3586
3587fi
3588rm -f conftest*
3589
3590else
3591 echo "$ac_t""no" 1>&6
3592fi
3593done
3594
3595
3596 # Look for these functions in the thread library.
3597 save_LIBS="$LIBS"
3598 LIBS="$LIBS $THREADLIBS"
3599 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np sched_yield
3600do
3601echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3602echo "configure:3603: checking for $ac_func" >&5
ee9dd372
TT
3603if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3604 echo $ac_n "(cached) $ac_c" 1>&6
3605else
3606 cat > conftest.$ac_ext <<EOF
550c2492 3607#line 3608 "configure"
ee9dd372
TT
3608#include "confdefs.h"
3609/* System header to define __stub macros and hopefully few prototypes,
3610 which can conflict with char $ac_func(); below. */
3611#include <assert.h>
3612/* Override any gcc2 internal prototype to avoid an error. */
3613/* We use char because int might match the return type of a gcc2
3614 builtin and then its argument prototype would still apply. */
3615char $ac_func();
3616
3617int main() {
3618
3619/* The GNU C library defines this for functions which it implements
3620 to always fail with ENOSYS. Some functions are actually named
3621 something starting with __ and the normal name is an alias. */
3622#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3623choke me
3624#else
3625$ac_func();
3626#endif
3627
3628; return 0; }
3629EOF
550c2492 3630if { (eval echo configure:3631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3631 rm -rf conftest*
3632 eval "ac_cv_func_$ac_func=yes"
3633else
3634 echo "configure: failed program was:" >&5
3635 cat conftest.$ac_ext >&5
3636 rm -rf conftest*
3637 eval "ac_cv_func_$ac_func=no"
3638fi
3639rm -f conftest*
3640fi
3641
3642if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3643 echo "$ac_t""yes" 1>&6
3644 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3645 cat >> confdefs.h <<EOF
3646#define $ac_tr_func 1
3647EOF
3648
3649else
3650 echo "$ac_t""no" 1>&6
4b7f154f
TT
3651fi
3652done
3653
3654 # Look for sched_yield. Sometimes it is in the posix4 library.
3655 for ac_func in sched_yield
3656do
3657echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3658echo "configure:3659: checking for $ac_func" >&5
4b7f154f
TT
3659if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3660 echo $ac_n "(cached) $ac_c" 1>&6
3661else
3662 cat > conftest.$ac_ext <<EOF
550c2492 3663#line 3664 "configure"
4b7f154f
TT
3664#include "confdefs.h"
3665/* System header to define __stub macros and hopefully few prototypes,
3666 which can conflict with char $ac_func(); below. */
3667#include <assert.h>
3668/* Override any gcc2 internal prototype to avoid an error. */
3669/* We use char because int might match the return type of a gcc2
3670 builtin and then its argument prototype would still apply. */
3671char $ac_func();
3672
3673int main() {
3674
3675/* The GNU C library defines this for functions which it implements
3676 to always fail with ENOSYS. Some functions are actually named
3677 something starting with __ and the normal name is an alias. */
3678#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3679choke me
3680#else
3681$ac_func();
3682#endif
3683
3684; return 0; }
3685EOF
550c2492 3686if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4b7f154f
TT
3687 rm -rf conftest*
3688 eval "ac_cv_func_$ac_func=yes"
3689else
3690 echo "configure: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3692 rm -rf conftest*
3693 eval "ac_cv_func_$ac_func=no"
3694fi
3695rm -f conftest*
3696fi
3697
3698if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3699 echo "$ac_t""yes" 1>&6
3700 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3701 cat >> confdefs.h <<EOF
3702#define $ac_tr_func 1
3703EOF
3704
3705else
3706 echo "$ac_t""no" 1>&6
3707echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
550c2492 3708echo "configure:3709: checking for sched_yield in -lposix4" >&5
4b7f154f
TT
3709ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
3710if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3711 echo $ac_n "(cached) $ac_c" 1>&6
3712else
3713 ac_save_LIBS="$LIBS"
3714LIBS="-lposix4 $LIBS"
3715cat > conftest.$ac_ext <<EOF
550c2492 3716#line 3717 "configure"
4b7f154f
TT
3717#include "confdefs.h"
3718/* Override any gcc2 internal prototype to avoid an error. */
3719/* We use char because int might match the return type of a gcc2
3720 builtin and then its argument prototype would still apply. */
3721char sched_yield();
3722
3723int main() {
3724sched_yield()
3725; return 0; }
3726EOF
550c2492 3727if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4b7f154f
TT
3728 rm -rf conftest*
3729 eval "ac_cv_lib_$ac_lib_var=yes"
3730else
3731 echo "configure: failed program was:" >&5
3732 cat conftest.$ac_ext >&5
3733 rm -rf conftest*
3734 eval "ac_cv_lib_$ac_lib_var=no"
3735fi
3736rm -f conftest*
3737LIBS="$ac_save_LIBS"
3738
3739fi
3740if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3741 echo "$ac_t""yes" 1>&6
3742
3743 cat >> confdefs.h <<\EOF
3744#define HAVE_SCHED_YIELD 1
3745EOF
3746
3747 THREADLIBS="$THREADLIBS -lposix4"
3748else
3749 echo "$ac_t""no" 1>&6
3750fi
3751
ee9dd372
TT
3752fi
3753done
3754
3755 LIBS="$save_LIBS"
3756
3757 # We require a way to get the time.
3758 time_found=no
3759 for ac_func in gettimeofday time ftime
3760do
3761echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3762echo "configure:3763: checking for $ac_func" >&5
ee9dd372
TT
3763if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766 cat > conftest.$ac_ext <<EOF
550c2492 3767#line 3768 "configure"
ee9dd372
TT
3768#include "confdefs.h"
3769/* System header to define __stub macros and hopefully few prototypes,
3770 which can conflict with char $ac_func(); below. */
3771#include <assert.h>
3772/* Override any gcc2 internal prototype to avoid an error. */
3773/* We use char because int might match the return type of a gcc2
3774 builtin and then its argument prototype would still apply. */
3775char $ac_func();
3776
3777int main() {
3778
3779/* The GNU C library defines this for functions which it implements
3780 to always fail with ENOSYS. Some functions are actually named
3781 something starting with __ and the normal name is an alias. */
3782#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3783choke me
3784#else
3785$ac_func();
3786#endif
3787
3788; return 0; }
3789EOF
550c2492 3790if { (eval echo configure:3791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3791 rm -rf conftest*
3792 eval "ac_cv_func_$ac_func=yes"
3793else
3794 echo "configure: failed program was:" >&5
3795 cat conftest.$ac_ext >&5
3796 rm -rf conftest*
3797 eval "ac_cv_func_$ac_func=no"
3798fi
3799rm -f conftest*
3800fi
3801
3802if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3803 echo "$ac_t""yes" 1>&6
3804 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3805 cat >> confdefs.h <<EOF
3806#define $ac_tr_func 1
3807EOF
3808 time_found=yes
3809else
3810 echo "$ac_t""no" 1>&6
3811fi
3812done
3813
3814 if test "$time_found" = no; then
3815 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
3816 fi
3817
3818 # We require memmove.
3819 memmove_found=no
3820 for ac_func in memmove
3821do
3822echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3823echo "configure:3824: checking for $ac_func" >&5
ee9dd372
TT
3824if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3825 echo $ac_n "(cached) $ac_c" 1>&6
3826else
3827 cat > conftest.$ac_ext <<EOF
550c2492 3828#line 3829 "configure"
ee9dd372
TT
3829#include "confdefs.h"
3830/* System header to define __stub macros and hopefully few prototypes,
3831 which can conflict with char $ac_func(); below. */
3832#include <assert.h>
3833/* Override any gcc2 internal prototype to avoid an error. */
3834/* We use char because int might match the return type of a gcc2
3835 builtin and then its argument prototype would still apply. */
3836char $ac_func();
3837
3838int main() {
3839
3840/* The GNU C library defines this for functions which it implements
3841 to always fail with ENOSYS. Some functions are actually named
3842 something starting with __ and the normal name is an alias. */
3843#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3844choke me
3845#else
3846$ac_func();
3847#endif
3848
3849; return 0; }
3850EOF
550c2492 3851if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3852 rm -rf conftest*
3853 eval "ac_cv_func_$ac_func=yes"
3854else
3855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
3857 rm -rf conftest*
3858 eval "ac_cv_func_$ac_func=no"
3859fi
3860rm -f conftest*
3861fi
3862
3863if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3864 echo "$ac_t""yes" 1>&6
3865 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3866 cat >> confdefs.h <<EOF
3867#define $ac_tr_func 1
3868EOF
3869 memmove_found=yes
3870else
3871 echo "$ac_t""no" 1>&6
3872fi
3873done
3874
3875 if test "$memmove_found" = no; then
3876 { echo "configure: error: memmove is required" 1>&2; exit 1; }
3877 fi
3878
3879 # We require memcpy.
3880 memcpy_found=no
3881 for ac_func in memcpy
3882do
3883echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
550c2492 3884echo "configure:3885: checking for $ac_func" >&5
ee9dd372
TT
3885if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3886 echo $ac_n "(cached) $ac_c" 1>&6
3887else
3888 cat > conftest.$ac_ext <<EOF
550c2492 3889#line 3890 "configure"
ee9dd372
TT
3890#include "confdefs.h"
3891/* System header to define __stub macros and hopefully few prototypes,
3892 which can conflict with char $ac_func(); below. */
3893#include <assert.h>
3894/* Override any gcc2 internal prototype to avoid an error. */
3895/* We use char because int might match the return type of a gcc2
3896 builtin and then its argument prototype would still apply. */
3897char $ac_func();
3898
3899int main() {
3900
3901/* The GNU C library defines this for functions which it implements
3902 to always fail with ENOSYS. Some functions are actually named
3903 something starting with __ and the normal name is an alias. */
3904#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3905choke me
3906#else
3907$ac_func();
3908#endif
3909
3910; return 0; }
3911EOF
550c2492 3912if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
3913 rm -rf conftest*
3914 eval "ac_cv_func_$ac_func=yes"
3915else
3916 echo "configure: failed program was:" >&5
3917 cat conftest.$ac_ext >&5
3918 rm -rf conftest*
3919 eval "ac_cv_func_$ac_func=no"
3920fi
3921rm -f conftest*
3922fi
3923
3924if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3925 echo "$ac_t""yes" 1>&6
3926 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3927 cat >> confdefs.h <<EOF
3928#define $ac_tr_func 1
3929EOF
3930 memcpy_found=yes
3931else
3932 echo "$ac_t""no" 1>&6
3933fi
3934done
3935
3936 if test "$memcpy_found" = no; then
3937 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
3938 fi
3939
f994389b
TT
3940 # Some library-finding code we stole from Tcl.
3941 #--------------------------------------------------------------------
3942 # Check for the existence of the -lsocket and -lnsl libraries.
3943 # The order here is important, so that they end up in the right
3944 # order in the command line generated by make. Here are some
3945 # special considerations:
3946 # 1. Use "connect" and "accept" to check for -lsocket, and
3947 # "gethostbyname" to check for -lnsl.
3948 # 2. Use each function name only once: can't redo a check because
3949 # autoconf caches the results of the last check and won't redo it.
3950 # 3. Use -lnsl and -lsocket only if they supply procedures that
3951 # aren't already present in the normal libraries. This is because
3952 # IRIX 5.2 has libraries, but they aren't needed and they're
3953 # bogus: they goof up name resolution if used.
3954 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
3955 # To get around this problem, check for both libraries together
3956 # if -lsocket doesn't work by itself.
3957 #--------------------------------------------------------------------
3958
3959 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
550c2492 3960echo "configure:3961: checking for socket libraries" >&5
f994389b
TT
3961if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
3962 echo $ac_n "(cached) $ac_c" 1>&6
3963else
3964 gcj_cv_lib_sockets=
3965 gcj_checkBoth=0
3966 unset ac_cv_func_connect
3967 echo $ac_n "checking for connect""... $ac_c" 1>&6
550c2492 3968echo "configure:3969: checking for connect" >&5
f994389b
TT
3969if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3970 echo $ac_n "(cached) $ac_c" 1>&6
3971else
3972 cat > conftest.$ac_ext <<EOF
550c2492 3973#line 3974 "configure"
f994389b
TT
3974#include "confdefs.h"
3975/* System header to define __stub macros and hopefully few prototypes,
3976 which can conflict with char connect(); below. */
3977#include <assert.h>
3978/* Override any gcc2 internal prototype to avoid an error. */
3979/* We use char because int might match the return type of a gcc2
3980 builtin and then its argument prototype would still apply. */
3981char connect();
3982
3983int main() {
3984
3985/* The GNU C library defines this for functions which it implements
3986 to always fail with ENOSYS. Some functions are actually named
3987 something starting with __ and the normal name is an alias. */
3988#if defined (__stub_connect) || defined (__stub___connect)
3989choke me
3990#else
3991connect();
3992#endif
3993
3994; return 0; }
3995EOF
550c2492 3996if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f994389b
TT
3997 rm -rf conftest*
3998 eval "ac_cv_func_connect=yes"
3999else
4000 echo "configure: failed program was:" >&5
4001 cat conftest.$ac_ext >&5
4002 rm -rf conftest*
4003 eval "ac_cv_func_connect=no"
4004fi
4005rm -f conftest*
4006fi
4007
4008if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4009 echo "$ac_t""yes" 1>&6
4010 gcj_checkSocket=0
4011else
4012 echo "$ac_t""no" 1>&6
4013gcj_checkSocket=1
4014fi
4015
4016 if test "$gcj_checkSocket" = 1; then
4017 unset ac_cv_func_connect
4018 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
550c2492 4019echo "configure:4020: checking for main in -lsocket" >&5
f994389b
TT
4020ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4021if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4022 echo $ac_n "(cached) $ac_c" 1>&6
4023else
4024 ac_save_LIBS="$LIBS"
4025LIBS="-lsocket $LIBS"
4026cat > conftest.$ac_ext <<EOF
550c2492 4027#line 4028 "configure"
f994389b
TT
4028#include "confdefs.h"
4029
4030int main() {
4031main()
4032; return 0; }
4033EOF
550c2492 4034if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f994389b
TT
4035 rm -rf conftest*
4036 eval "ac_cv_lib_$ac_lib_var=yes"
4037else
4038 echo "configure: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 rm -rf conftest*
4041 eval "ac_cv_lib_$ac_lib_var=no"
4042fi
4043rm -f conftest*
4044LIBS="$ac_save_LIBS"
4045
4046fi
4047if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4048 echo "$ac_t""yes" 1>&6
4049 gcj_cv_lib_sockets="-lsocket"
4050else
4051 echo "$ac_t""no" 1>&6
4052gcj_checkBoth=1
4053fi
4054
4055 fi
4056 if test "$gcj_checkBoth" = 1; then
4057 gcj_oldLibs=$LIBS
4058 LIBS="$LIBS -lsocket -lnsl"
4059 unset ac_cv_func_accept
4060 echo $ac_n "checking for accept""... $ac_c" 1>&6
550c2492 4061echo "configure:4062: checking for accept" >&5
f994389b
TT
4062if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4063 echo $ac_n "(cached) $ac_c" 1>&6
4064else
4065 cat > conftest.$ac_ext <<EOF
550c2492 4066#line 4067 "configure"
f994389b
TT
4067#include "confdefs.h"
4068/* System header to define __stub macros and hopefully few prototypes,
4069 which can conflict with char accept(); below. */
4070#include <assert.h>
4071/* Override any gcc2 internal prototype to avoid an error. */
4072/* We use char because int might match the return type of a gcc2
4073 builtin and then its argument prototype would still apply. */
4074char accept();
4075
4076int main() {
4077
4078/* The GNU C library defines this for functions which it implements
4079 to always fail with ENOSYS. Some functions are actually named
4080 something starting with __ and the normal name is an alias. */
4081#if defined (__stub_accept) || defined (__stub___accept)
4082choke me
4083#else
4084accept();
4085#endif
4086
4087; return 0; }
4088EOF
550c2492 4089if { (eval echo configure:4090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f994389b
TT
4090 rm -rf conftest*
4091 eval "ac_cv_func_accept=yes"
4092else
4093 echo "configure: failed program was:" >&5
4094 cat conftest.$ac_ext >&5
4095 rm -rf conftest*
4096 eval "ac_cv_func_accept=no"
4097fi
4098rm -f conftest*
4099fi
4100
4101if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4102 echo "$ac_t""yes" 1>&6
4103 gcj_checkNsl=0
4104 gcj_cv_lib_sockets="-lsocket -lnsl"
4105else
4106 echo "$ac_t""no" 1>&6
4107fi
4108
4109 unset ac_cv_func_accept
4110 LIBS=$gcj_oldLibs
4111 fi
4112 unset ac_cv_func_gethostbyname
4113 gcj_oldLibs=$LIBS
4114 LIBS="$LIBS $gcj_cv_lib_sockets"
4115 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
550c2492 4116echo "configure:4117: checking for gethostbyname" >&5
f994389b
TT
4117if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4118 echo $ac_n "(cached) $ac_c" 1>&6
4119else
4120 cat > conftest.$ac_ext <<EOF
550c2492 4121#line 4122 "configure"
f994389b
TT
4122#include "confdefs.h"
4123/* System header to define __stub macros and hopefully few prototypes,
4124 which can conflict with char gethostbyname(); below. */
4125#include <assert.h>
4126/* Override any gcc2 internal prototype to avoid an error. */
4127/* We use char because int might match the return type of a gcc2
4128 builtin and then its argument prototype would still apply. */
4129char gethostbyname();
4130
4131int main() {
4132
4133/* The GNU C library defines this for functions which it implements
4134 to always fail with ENOSYS. Some functions are actually named
4135 something starting with __ and the normal name is an alias. */
4136#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4137choke me
4138#else
4139gethostbyname();
4140#endif
4141
4142; return 0; }
4143EOF
550c2492 4144if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f994389b
TT
4145 rm -rf conftest*
4146 eval "ac_cv_func_gethostbyname=yes"
4147else
4148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4150 rm -rf conftest*
4151 eval "ac_cv_func_gethostbyname=no"
4152fi
4153rm -f conftest*
4154fi
4155
4156if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4157 echo "$ac_t""yes" 1>&6
4158 :
4159else
4160 echo "$ac_t""no" 1>&6
4161echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
550c2492 4162echo "configure:4163: checking for main in -lnsl" >&5
f994389b
TT
4163ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4164if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4165 echo $ac_n "(cached) $ac_c" 1>&6
4166else
4167 ac_save_LIBS="$LIBS"
4168LIBS="-lnsl $LIBS"
4169cat > conftest.$ac_ext <<EOF
550c2492 4170#line 4171 "configure"
f994389b
TT
4171#include "confdefs.h"
4172
4173int main() {
4174main()
4175; return 0; }
4176EOF
550c2492 4177if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f994389b
TT
4178 rm -rf conftest*
4179 eval "ac_cv_lib_$ac_lib_var=yes"
4180else
4181 echo "configure: failed program was:" >&5
4182 cat conftest.$ac_ext >&5
4183 rm -rf conftest*
4184 eval "ac_cv_lib_$ac_lib_var=no"
4185fi
4186rm -f conftest*
4187LIBS="$ac_save_LIBS"
4188
4189fi
4190if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4191 echo "$ac_t""yes" 1>&6
4192 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4193else
4194 echo "$ac_t""no" 1>&6
4195fi
4196
4197fi
4198
4199 unset ac_cv_func_gethostbyname
4200 LIBS=$gcj_oldLIBS
4201
4202fi
4203
4204echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4205 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4206
4207 if test "$with_system_zlib" = yes; then
4208 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
550c2492 4209echo "configure:4210: checking for deflate in -lz" >&5
f994389b
TT
4210ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4211if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4212 echo $ac_n "(cached) $ac_c" 1>&6
4213else
4214 ac_save_LIBS="$LIBS"
4215LIBS="-lz $LIBS"
4216cat > conftest.$ac_ext <<EOF
550c2492 4217#line 4218 "configure"
f994389b
TT
4218#include "confdefs.h"
4219/* Override any gcc2 internal prototype to avoid an error. */
4220/* We use char because int might match the return type of a gcc2
4221 builtin and then its argument prototype would still apply. */
4222char deflate();
4223
4224int main() {
4225deflate()
4226; return 0; }
4227EOF
550c2492 4228if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f994389b
TT
4229 rm -rf conftest*
4230 eval "ac_cv_lib_$ac_lib_var=yes"
4231else
4232 echo "configure: failed program was:" >&5
4233 cat conftest.$ac_ext >&5
4234 rm -rf conftest*
4235 eval "ac_cv_lib_$ac_lib_var=no"
4236fi
4237rm -f conftest*
4238LIBS="$ac_save_LIBS"
4239
4240fi
4241if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4242 echo "$ac_t""yes" 1>&6
4243 ZLIBSPEC=-lz
4244else
4245 echo "$ac_t""no" 1>&6
4246ZLIBSPEC=-lzgcj
4247fi
4248
4249 else
4250 ZLIBSPEC=-lzgcj
4251 fi
4252
4b7f154f
TT
4253 # On Solaris, and maybe other architectures, the Boehm collector
4254 # requires -ldl.
4255 if test "$GC" = boehm; then
4256 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
550c2492 4257echo "configure:4258: checking for main in -ldl" >&5
4b7f154f
TT
4258ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
4259if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4260 echo $ac_n "(cached) $ac_c" 1>&6
4261else
4262 ac_save_LIBS="$LIBS"
4263LIBS="-ldl $LIBS"
4264cat > conftest.$ac_ext <<EOF
550c2492 4265#line 4266 "configure"
4b7f154f
TT
4266#include "confdefs.h"
4267
4268int main() {
4269main()
4270; return 0; }
4271EOF
550c2492 4272if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4b7f154f
TT
4273 rm -rf conftest*
4274 eval "ac_cv_lib_$ac_lib_var=yes"
4275else
4276 echo "configure: failed program was:" >&5
4277 cat conftest.$ac_ext >&5
4278 rm -rf conftest*
4279 eval "ac_cv_lib_$ac_lib_var=no"
4280fi
4281rm -f conftest*
4282LIBS="$ac_save_LIBS"
4283
4284fi
4285if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4286 echo "$ac_t""yes" 1>&6
4287 SYSTEMSPEC="$SYSTEMSPEC -ldl"
4288else
4289 echo "$ac_t""no" 1>&6
4290fi
4291
4292 fi
4293
01b02b11
TT
4294 if test -d "$libgcj_basedir/../gcc/java"; then
4295 GCJ=
4296 else
ee9dd372
TT
4297 CANADIAN=yes
4298 NULL_TARGET=yes
01b02b11
TT
4299 GCJ=gcj
4300 fi
ee9dd372
TT
4301fi
4302
f994389b
TT
4303ZLIBS=
4304ZDEPS=
41e0e0cd 4305ZINCS=
f994389b
TT
4306if test "x$ZLIBSPEC" = "x-lzgcj"; then
4307 # We include the path to the zlib build directory.
4308 # See Makefile.am to understand why.
4309 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
4310 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
41e0e0cd 4311 ZINCS='-I$(top_srcdir)/../zlib'
f994389b
TT
4312else
4313 ZLIBS="$ZLIBSPEC"
4314fi
4315
4316
4317
ee9dd372
TT
4318
4319
41e0e0cd 4320
ee9dd372
TT
4321if test "$CANADIAN" = yes; then
4322 CANADIAN_TRUE=
4323 CANADIAN_FALSE='#'
4324else
4325 CANADIAN_TRUE='#'
4326 CANADIAN_FALSE=
4327fi
4328
4329
4330if test "$NULL_TARGET" = yes; then
4331 NULL_TARGET_TRUE=
4332 NULL_TARGET_FALSE='#'
4333else
4334 NULL_TARGET_TRUE='#'
4335 NULL_TARGET_FALSE=
4336fi
4337
4338
4339if test "$CANADIAN" = no || test "$NULL_TARGET" = yes; then
4340 NATIVE_TRUE=
4341 NATIVE_FALSE='#'
4342else
4343 NATIVE_TRUE='#'
4344 NATIVE_FALSE=
4345fi
4346
4347
b48ed568
TT
4348if test -z "$with_cross_host"; then
4349 USE_LIBDIR_TRUE=
4350 USE_LIBDIR_FALSE='#'
4351else
4352 USE_LIBDIR_TRUE='#'
4353 USE_LIBDIR_FALSE=
4354fi
4355
4356
01b02b11
TT
4357# Determine gcj version number.
4358if test "$GCJ" = ""; then
4359 if test -z "${with_multisubdir}"; then
4360 builddotdot=.
4361 else
4362 builddotdot=`echo ${with_multisubdir} | sed -e 's:^/^/*:..:g'`
4363 fi
4364 dir="`cd ${builddotdot}/../../gcc && pwd`"
4365 GCJ="$dir/gcj -B$dir/"
4366fi
4367
4368gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
4369
4370cat >> confdefs.h <<EOF
4371#define GCJVERSION "$gcjvers"
4372EOF
4373
ee9dd372
TT
4374
4375
4376
4377for ac_hdr in unistd.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pwd.h
4378do
4379ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4380echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b48ed568 4381echo "configure:4382: checking for $ac_hdr" >&5
ee9dd372
TT
4382if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4383 echo $ac_n "(cached) $ac_c" 1>&6
4384else
4385 cat > conftest.$ac_ext <<EOF
b48ed568 4386#line 4387 "configure"
ee9dd372
TT
4387#include "confdefs.h"
4388#include <$ac_hdr>
4389EOF
4390ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b48ed568 4391{ (eval echo configure:4392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ee9dd372
TT
4392ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4393if test -z "$ac_err"; then
4394 rm -rf conftest*
4395 eval "ac_cv_header_$ac_safe=yes"
4396else
4397 echo "$ac_err" >&5
4398 echo "configure: failed program was:" >&5
4399 cat conftest.$ac_ext >&5
4400 rm -rf conftest*
4401 eval "ac_cv_header_$ac_safe=no"
4402fi
4403rm -f conftest*
4404fi
4405if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4406 echo "$ac_t""yes" 1>&6
4407 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4408 cat >> confdefs.h <<EOF
4409#define $ac_tr_hdr 1
4410EOF
4411
4412else
4413 echo "$ac_t""no" 1>&6
4414fi
4415done
4416
4417for ac_hdr in dirent.h
4418do
4419ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4420echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b48ed568 4421echo "configure:4422: checking for $ac_hdr" >&5
ee9dd372
TT
4422if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4423 echo $ac_n "(cached) $ac_c" 1>&6
4424else
4425 cat > conftest.$ac_ext <<EOF
b48ed568 4426#line 4427 "configure"
ee9dd372
TT
4427#include "confdefs.h"
4428#include <$ac_hdr>
4429EOF
4430ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b48ed568 4431{ (eval echo configure:4432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ee9dd372
TT
4432ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4433if test -z "$ac_err"; then
4434 rm -rf conftest*
4435 eval "ac_cv_header_$ac_safe=yes"
4436else
4437 echo "$ac_err" >&5
4438 echo "configure: failed program was:" >&5
4439 cat conftest.$ac_ext >&5
4440 rm -rf conftest*
4441 eval "ac_cv_header_$ac_safe=no"
4442fi
4443rm -f conftest*
4444fi
4445if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4446 echo "$ac_t""yes" 1>&6
4447 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4448 cat >> confdefs.h <<EOF
4449#define $ac_tr_hdr 1
4450EOF
4451
4452else
4453 echo "$ac_t""no" 1>&6
4454fi
4455done
4456
4457
4458echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
b48ed568 4459echo "configure:4460: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
ee9dd372 4460cat > conftest.$ac_ext <<EOF
b48ed568 4461#line 4462 "configure"
ee9dd372
TT
4462#include "confdefs.h"
4463#include <netinet/in.h>
4464int main() {
4465struct sockaddr_in6 addr6;
4466; return 0; }
4467EOF
b48ed568 4468if { (eval echo configure:4469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ee9dd372
TT
4469 rm -rf conftest*
4470 cat >> confdefs.h <<\EOF
4471#define HAVE_INET6 1
4472EOF
4473
4474 echo "$ac_t""yes" 1>&6
4475else
4476 echo "configure: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 rm -rf conftest*
4479 echo "$ac_t""no" 1>&6
4480fi
4481rm -f conftest*
4482
4483echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
b48ed568 4484echo "configure:4485: checking for socklen_t in sys/socket.h" >&5
ee9dd372 4485cat > conftest.$ac_ext <<EOF
b48ed568 4486#line 4487 "configure"
ee9dd372
TT
4487#include "confdefs.h"
4488#include <sys/socket.h>
4489int main() {
4490socklen_t x = 5;
4491; return 0; }
4492EOF
b48ed568 4493if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ee9dd372
TT
4494 rm -rf conftest*
4495 cat >> confdefs.h <<\EOF
4496#define HAVE_SOCKLEN_T 1
4497EOF
4498
4499 echo "$ac_t""yes" 1>&6
4500else
4501 echo "configure: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 rm -rf conftest*
4504 echo "$ac_t""no" 1>&6
4505fi
4506rm -f conftest*
4507
4508echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
b48ed568 4509echo "configure:4510: checking for tm_gmtoff in struct tm" >&5
ee9dd372 4510cat > conftest.$ac_ext <<EOF
b48ed568 4511#line 4512 "configure"
ee9dd372
TT
4512#include "confdefs.h"
4513#include <time.h>
4514int main() {
4515struct tm tim; tim.tm_gmtoff = 0;
4516; return 0; }
4517EOF
b48ed568 4518if { (eval echo configure:4519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ee9dd372
TT
4519 rm -rf conftest*
4520 cat >> confdefs.h <<\EOF
4521#define STRUCT_TM_HAS_GMTOFF 1
4522EOF
4523
4524 echo "$ac_t""yes" 1>&6
4525else
4526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 rm -rf conftest*
4529 echo "$ac_t""no" 1>&6
4530 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
b48ed568 4531echo "configure:4532: checking for global timezone variable" >&5
ee9dd372 4532 cat > conftest.$ac_ext <<EOF
b48ed568 4533#line 4534 "configure"
ee9dd372
TT
4534#include "confdefs.h"
4535#include <time.h>
4536int main() {
4537long z2 = timezone;
4538; return 0; }
4539EOF
b48ed568 4540if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ee9dd372
TT
4541 rm -rf conftest*
4542 cat >> confdefs.h <<\EOF
4543#define HAVE_TIMEZONE 1
4544EOF
4545
4546 echo "$ac_t""yes" 1>&6
4547else
4548 echo "configure: failed program was:" >&5
4549 cat conftest.$ac_ext >&5
4550 rm -rf conftest*
4551 echo "$ac_t""no" 1>&6
4552fi
4553rm -f conftest*
4554fi
4555rm -f conftest*
4556
4557# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4558# for constant arguments. Useless!
4559echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
b48ed568 4560echo "configure:4561: checking for working alloca.h" >&5
ee9dd372
TT
4561if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4562 echo $ac_n "(cached) $ac_c" 1>&6
4563else
4564 cat > conftest.$ac_ext <<EOF
b48ed568 4565#line 4566 "configure"
ee9dd372
TT
4566#include "confdefs.h"
4567#include <alloca.h>
4568int main() {
4569char *p = alloca(2 * sizeof(int));
4570; return 0; }
4571EOF
b48ed568 4572if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
4573 rm -rf conftest*
4574 ac_cv_header_alloca_h=yes
4575else
4576 echo "configure: failed program was:" >&5
4577 cat conftest.$ac_ext >&5
4578 rm -rf conftest*
4579 ac_cv_header_alloca_h=no
4580fi
4581rm -f conftest*
4582fi
4583
4584echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4585if test $ac_cv_header_alloca_h = yes; then
4586 cat >> confdefs.h <<\EOF
4587#define HAVE_ALLOCA_H 1
4588EOF
4589
4590fi
4591
4592echo $ac_n "checking for alloca""... $ac_c" 1>&6
b48ed568 4593echo "configure:4594: checking for alloca" >&5
ee9dd372
TT
4594if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4595 echo $ac_n "(cached) $ac_c" 1>&6
4596else
4597 cat > conftest.$ac_ext <<EOF
b48ed568 4598#line 4599 "configure"
ee9dd372
TT
4599#include "confdefs.h"
4600
4601#ifdef __GNUC__
4602# define alloca __builtin_alloca
4603#else
4604# ifdef _MSC_VER
4605# include <malloc.h>
4606# define alloca _alloca
4607# else
4608# if HAVE_ALLOCA_H
4609# include <alloca.h>
4610# else
4611# ifdef _AIX
4612 #pragma alloca
4613# else
4614# ifndef alloca /* predefined by HP cc +Olibcalls */
4615char *alloca ();
4616# endif
4617# endif
4618# endif
4619# endif
4620#endif
4621
4622int main() {
4623char *p = (char *) alloca(1);
4624; return 0; }
4625EOF
b48ed568 4626if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
4627 rm -rf conftest*
4628 ac_cv_func_alloca_works=yes
4629else
4630 echo "configure: failed program was:" >&5
4631 cat conftest.$ac_ext >&5
4632 rm -rf conftest*
4633 ac_cv_func_alloca_works=no
4634fi
4635rm -f conftest*
4636fi
4637
4638echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4639if test $ac_cv_func_alloca_works = yes; then
4640 cat >> confdefs.h <<\EOF
4641#define HAVE_ALLOCA 1
4642EOF
4643
4644fi
4645
4646if test $ac_cv_func_alloca_works = no; then
4647 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4648 # that cause trouble. Some versions do not even contain alloca or
4649 # contain a buggy version. If you still want to use their alloca,
4650 # use ar to extract alloca.o from them instead of compiling alloca.c.
4651 ALLOCA=alloca.${ac_objext}
4652 cat >> confdefs.h <<\EOF
4653#define C_ALLOCA 1
4654EOF
4655
4656
4657echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
b48ed568 4658echo "configure:4659: checking whether alloca needs Cray hooks" >&5
ee9dd372
TT
4659if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4660 echo $ac_n "(cached) $ac_c" 1>&6
4661else
4662 cat > conftest.$ac_ext <<EOF
b48ed568 4663#line 4664 "configure"
ee9dd372
TT
4664#include "confdefs.h"
4665#if defined(CRAY) && ! defined(CRAY2)
4666webecray
4667#else
4668wenotbecray
4669#endif
4670
4671EOF
4672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4673 egrep "webecray" >/dev/null 2>&1; then
4674 rm -rf conftest*
4675 ac_cv_os_cray=yes
4676else
4677 rm -rf conftest*
4678 ac_cv_os_cray=no
4679fi
4680rm -f conftest*
4681
4682fi
4683
4684echo "$ac_t""$ac_cv_os_cray" 1>&6
4685if test $ac_cv_os_cray = yes; then
4686for ac_func in _getb67 GETB67 getb67; do
4687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b48ed568 4688echo "configure:4689: checking for $ac_func" >&5
ee9dd372
TT
4689if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4690 echo $ac_n "(cached) $ac_c" 1>&6
4691else
4692 cat > conftest.$ac_ext <<EOF
b48ed568 4693#line 4694 "configure"
ee9dd372
TT
4694#include "confdefs.h"
4695/* System header to define __stub macros and hopefully few prototypes,
4696 which can conflict with char $ac_func(); below. */
4697#include <assert.h>
4698/* Override any gcc2 internal prototype to avoid an error. */
4699/* We use char because int might match the return type of a gcc2
4700 builtin and then its argument prototype would still apply. */
4701char $ac_func();
4702
4703int main() {
4704
4705/* The GNU C library defines this for functions which it implements
4706 to always fail with ENOSYS. Some functions are actually named
4707 something starting with __ and the normal name is an alias. */
4708#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4709choke me
4710#else
4711$ac_func();
4712#endif
4713
4714; return 0; }
4715EOF
b48ed568 4716if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ee9dd372
TT
4717 rm -rf conftest*
4718 eval "ac_cv_func_$ac_func=yes"
4719else
4720 echo "configure: failed program was:" >&5
4721 cat conftest.$ac_ext >&5
4722 rm -rf conftest*
4723 eval "ac_cv_func_$ac_func=no"
4724fi
4725rm -f conftest*
4726fi
4727
4728if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4729 echo "$ac_t""yes" 1>&6
4730 cat >> confdefs.h <<EOF
4731#define CRAY_STACKSEG_END $ac_func
4732EOF
4733
4734 break
4735else
4736 echo "$ac_t""no" 1>&6
4737fi
4738
4739done
4740fi
4741
4742echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
b48ed568 4743echo "configure:4744: checking stack direction for C alloca" >&5
ee9dd372
TT
4744if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4745 echo $ac_n "(cached) $ac_c" 1>&6
4746else
4747 if test "$cross_compiling" = yes; then
4748 ac_cv_c_stack_direction=0
4749else
4750 cat > conftest.$ac_ext <<EOF
b48ed568 4751#line 4752 "configure"
ee9dd372
TT
4752#include "confdefs.h"
4753find_stack_direction ()
4754{
4755 static char *addr = 0;
4756 auto char dummy;
4757 if (addr == 0)
4758 {
4759 addr = &dummy;
4760 return find_stack_direction ();
4761 }
4762 else
4763 return (&dummy > addr) ? 1 : -1;
4764}
4765main ()
4766{
4767 exit (find_stack_direction() < 0);
4768}
4769EOF
b48ed568 4770if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ee9dd372
TT
4771then
4772 ac_cv_c_stack_direction=1
4773else
4774 echo "configure: failed program was:" >&5
4775 cat conftest.$ac_ext >&5
4776 rm -fr conftest*
4777 ac_cv_c_stack_direction=-1
4778fi
4779rm -fr conftest*
4780fi
4781
4782fi
4783
4784echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4785cat >> confdefs.h <<EOF
4786#define STACK_DIRECTION $ac_cv_c_stack_direction
4787EOF
4788
4789fi
4790
4791
4792for ac_prog in perl
4793do
4794# Extract the first word of "$ac_prog", so it can be a program name with args.
4795set dummy $ac_prog; ac_word=$2
4796echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b48ed568 4797echo "configure:4798: checking for $ac_word" >&5
ee9dd372
TT
4798if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
4799 echo $ac_n "(cached) $ac_c" 1>&6
4800else
4801 if test -n "$PERL"; then
4802 ac_cv_prog_PERL="$PERL" # Let the user override the test.
4803else
4804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
a3ffcff3
TT
4805 ac_dummy="$PATH"
4806 for ac_dir in $ac_dummy; do
ee9dd372
TT
4807 test -z "$ac_dir" && ac_dir=.
4808 if test -f $ac_dir/$ac_word; then
4809 ac_cv_prog_PERL="$ac_prog"
4810 break
4811 fi
4812 done
4813 IFS="$ac_save_ifs"
4814fi
4815fi
4816PERL="$ac_cv_prog_PERL"
4817if test -n "$PERL"; then
4818 echo "$ac_t""$PERL" 1>&6
4819else
4820 echo "$ac_t""no" 1>&6
4821fi
4822
4823test -n "$PERL" && break
4824done
4825test -n "$PERL" || PERL="false"
4826
4827
a4e44caa
AH
4828case "${host}" in
4829 i?86-*-linux*)
4830 SIGNAL_HANDLER=include/i386-signal.h
4831 ;;
01f78a02
AH
4832 sparc-sun-solaris*)
4833 SIGNAL_HANDLER=include/sparc-signal.h
4834 ;;
a4e44caa
AH
4835 *)
4836 SIGNAL_HANDLER=include/default-signal.h
4837 ;;
4838esac
4839
4840
4841
ee9dd372
TT
4842if test "${multilib}" = "yes"; then
4843 multilib_arg="--enable-multilib"
4844else
4845 multilib_arg=
4846fi
4847
4848here=`pwd`
4849
4850
4851trap '' 1 2 15
4852cat > confcache <<\EOF
4853# This file is a shell script that caches the results of configure
4854# tests run on this system so they can be shared between configure
4855# scripts and configure runs. It is not useful on other systems.
4856# If it contains results you don't want to keep, you may remove or edit it.
4857#
4858# By default, configure uses ./config.cache as the cache file,
4859# creating it if it does not exist already. You can give configure
4860# the --cache-file=FILE option to use a different cache file; that is
4861# what configure does when it calls configure scripts in
4862# subdirectories, so they share the cache.
4863# Giving --cache-file=/dev/null disables caching, for debugging configure.
4864# config.status only pays attention to the cache file if you give it the
4865# --recheck option to rerun configure.
4866#
4867EOF
4868# The following way of writing the cache mishandles newlines in values,
4869# but we know of no workaround that is simple, portable, and efficient.
4870# So, don't put newlines in cache variables' values.
4871# Ultrix sh set writes to stderr and can't be redirected directly,
4872# and sets the high bit in the cache file unless we assign to the vars.
4873(set) 2>&1 |
a3ffcff3 4874 case `(ac_space=' '; set | grep ac_space) 2>&1` in
ee9dd372
TT
4875 *ac_space=\ *)
4876 # `set' does not quote correctly, so add quotes (double-quote substitution
4877 # turns \\\\ into \\, and sed turns \\ into \).
4878 sed -n \
4879 -e "s/'/'\\\\''/g" \
4880 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4881 ;;
4882 *)
4883 # `set' quotes correctly as required by POSIX, so do not add quotes.
4884 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4885 ;;
4886 esac >> confcache
4887if cmp -s $cache_file confcache; then
4888 :
4889else
4890 if test -w $cache_file; then
4891 echo "updating cache $cache_file"
4892 cat confcache > $cache_file
4893 else
4894 echo "not updating unwritable cache $cache_file"
4895 fi
4896fi
4897rm -f confcache
4898
4899trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4900
4901test "x$prefix" = xNONE && prefix=$ac_default_prefix
4902# Let make expand exec_prefix.
4903test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4904
4905# Any assignment to VPATH causes Sun make to only execute
4906# the first set of double-colon rules, so remove it if not needed.
4907# If there is a colon in the path, we need to keep it.
4908if test "x$srcdir" = x.; then
4909 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4910fi
4911
4912trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4913
4914DEFS=-DHAVE_CONFIG_H
4915
4916# Without the "./", some shells look in PATH for config.status.
4917: ${CONFIG_STATUS=./config.status}
4918
4919echo creating $CONFIG_STATUS
4920rm -f $CONFIG_STATUS
4921cat > $CONFIG_STATUS <<EOF
4922#! /bin/sh
4923# Generated automatically by configure.
4924# Run this file to recreate the current configuration.
4925# This directory was configured as follows,
4926# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4927#
4928# $0 $ac_configure_args
4929#
4930# Compiler output produced by configure, useful for debugging
4931# configure, is in ./config.log if it exists.
4932
4933ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4934for ac_option
4935do
4936 case "\$ac_option" in
4937 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4938 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4939 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4940 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
a3ffcff3 4941 echo "$CONFIG_STATUS generated by autoconf version 2.13"
ee9dd372
TT
4942 exit 0 ;;
4943 -help | --help | --hel | --he | --h)
4944 echo "\$ac_cs_usage"; exit 0 ;;
4945 *) echo "\$ac_cs_usage"; exit 1 ;;
4946 esac
4947done
4948
4949ac_given_srcdir=$srcdir
4950ac_given_INSTALL="$INSTALL"
4951
f994389b 4952trap 'rm -fr `echo "Makefile libgcj.spec testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
ee9dd372
TT
4953EOF
4954cat >> $CONFIG_STATUS <<EOF
4955
4956# Protect against being on the right side of a sed subst in config.status.
4957sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4958 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4959$ac_vpsub
4960$extrasub
4961s%@SHELL@%$SHELL%g
4962s%@CFLAGS@%$CFLAGS%g
4963s%@CPPFLAGS@%$CPPFLAGS%g
4964s%@CXXFLAGS@%$CXXFLAGS%g
a3ffcff3 4965s%@FFLAGS@%$FFLAGS%g
ee9dd372
TT
4966s%@DEFS@%$DEFS%g
4967s%@LDFLAGS@%$LDFLAGS%g
4968s%@LIBS@%$LIBS%g
4969s%@exec_prefix@%$exec_prefix%g
4970s%@prefix@%$prefix%g
4971s%@program_transform_name@%$program_transform_name%g
4972s%@bindir@%$bindir%g
4973s%@sbindir@%$sbindir%g
4974s%@libexecdir@%$libexecdir%g
4975s%@datadir@%$datadir%g
4976s%@sysconfdir@%$sysconfdir%g
4977s%@sharedstatedir@%$sharedstatedir%g
4978s%@localstatedir@%$localstatedir%g
4979s%@libdir@%$libdir%g
4980s%@includedir@%$includedir%g
4981s%@oldincludedir@%$oldincludedir%g
4982s%@infodir@%$infodir%g
4983s%@mandir@%$mandir%g
4984s%@host@%$host%g
4985s%@host_alias@%$host_alias%g
4986s%@host_cpu@%$host_cpu%g
4987s%@host_vendor@%$host_vendor%g
4988s%@host_os@%$host_os%g
4989s%@target@%$target%g
4990s%@target_alias@%$target_alias%g
4991s%@target_cpu@%$target_cpu%g
4992s%@target_vendor@%$target_vendor%g
4993s%@target_os@%$target_os%g
4994s%@build@%$build%g
4995s%@build_alias@%$build_alias%g
4996s%@build_cpu@%$build_cpu%g
4997s%@build_vendor@%$build_vendor%g
4998s%@build_os@%$build_os%g
4999s%@libgcj_basedir@%$libgcj_basedir%g
5000s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
a3ffcff3 5001s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
ee9dd372
TT
5002s%@INSTALL_DATA@%$INSTALL_DATA%g
5003s%@PACKAGE@%$PACKAGE%g
5004s%@VERSION@%$VERSION%g
5005s%@ACLOCAL@%$ACLOCAL%g
5006s%@AUTOCONF@%$AUTOCONF%g
5007s%@AUTOMAKE@%$AUTOMAKE%g
5008s%@AUTOHEADER@%$AUTOHEADER%g
5009s%@MAKEINFO@%$MAKEINFO%g
5010s%@SET_MAKE@%$SET_MAKE%g
5011s%@CC@%$CC%g
5012s%@CXX@%$CXX%g
5013s%@AS@%$AS%g
5014s%@AR@%$AR%g
5015s%@RANLIB@%$RANLIB%g
5016s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5017s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5018s%@MAINT@%$MAINT%g
5019s%@EXEEXT@%$EXEEXT%g
5020s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
5021s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
5022s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
a3ffcff3
TT
5023s%@LD@%$LD%g
5024s%@NM@%$NM%g
01b02b11 5025s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
a3ffcff3 5026s%@LN_S@%$LN_S%g
a3ffcff3 5027s%@DLLTOOL@%$DLLTOOL%g
01b02b11 5028s%@LIBTOOL@%$LIBTOOL%g
ee9dd372
TT
5029s%@COMPPATH@%$COMPPATH%g
5030s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
5031s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
5032s%@CPP@%$CPP%g
f994389b
TT
5033s%@SYSTEMSPEC@%$SYSTEMSPEC%g
5034s%@ZLIBSPEC@%$ZLIBSPEC%g
ee9dd372
TT
5035s%@GCLIBS@%$GCLIBS%g
5036s%@GCINCS@%$GCINCS%g
5037s%@GCDEPS@%$GCDEPS%g
5038s%@GCOBJS@%$GCOBJS%g
f994389b 5039s%@GCSPEC@%$GCSPEC%g
ee9dd372
TT
5040s%@THREADLIBS@%$THREADLIBS%g
5041s%@THREADINCS@%$THREADINCS%g
5042s%@THREADDEPS@%$THREADDEPS%g
5043s%@THREADOBJS@%$THREADOBJS%g
f994389b 5044s%@THREADSPEC@%$THREADSPEC%g
ee9dd372
TT
5045s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
5046s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
f994389b
TT
5047s%@ZLIBS@%$ZLIBS%g
5048s%@ZDEPS@%$ZDEPS%g
41e0e0cd 5049s%@ZINCS@%$ZINCS%g
ee9dd372
TT
5050s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
5051s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
5052s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
5053s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
5054s%@NATIVE_TRUE@%$NATIVE_TRUE%g
5055s%@NATIVE_FALSE@%$NATIVE_FALSE%g
b48ed568
TT
5056s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
5057s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
ee9dd372
TT
5058s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
5059s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
5060s%@ALLOCA@%$ALLOCA%g
5061s%@PERL@%$PERL%g
5062s%@here@%$here%g
5063
5064CEOF
5065EOF
5066
5067cat >> $CONFIG_STATUS <<\EOF
5068
5069# Split the substitutions into bite-sized pieces for seds with
5070# small command number limits, like on Digital OSF/1 and HP-UX.
5071ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5072ac_file=1 # Number of current file.
5073ac_beg=1 # First line for current file.
5074ac_end=$ac_max_sed_cmds # Line after last line for current file.
5075ac_more_lines=:
5076ac_sed_cmds=""
5077while $ac_more_lines; do
5078 if test $ac_beg -gt 1; then
5079 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5080 else
5081 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5082 fi
5083 if test ! -s conftest.s$ac_file; then
5084 ac_more_lines=false
5085 rm -f conftest.s$ac_file
5086 else
5087 if test -z "$ac_sed_cmds"; then
5088 ac_sed_cmds="sed -f conftest.s$ac_file"
5089 else
5090 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5091 fi
5092 ac_file=`expr $ac_file + 1`
5093 ac_beg=$ac_end
5094 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5095 fi
5096done
5097if test -z "$ac_sed_cmds"; then
5098 ac_sed_cmds=cat
5099fi
5100EOF
5101
5102cat >> $CONFIG_STATUS <<EOF
5103
f994389b 5104CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec testsuite/Makefile"}
ee9dd372
TT
5105EOF
5106cat >> $CONFIG_STATUS <<\EOF
5107for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5108 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5109 case "$ac_file" in
5110 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5111 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5112 *) ac_file_in="${ac_file}.in" ;;
5113 esac
5114
5115 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5116
5117 # Remove last slash and all that follows it. Not all systems have dirname.
5118 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5119 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5120 # The file is in a subdirectory.
5121 test ! -d "$ac_dir" && mkdir "$ac_dir"
5122 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5123 # A "../" for each directory in $ac_dir_suffix.
5124 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5125 else
5126 ac_dir_suffix= ac_dots=
5127 fi
5128
5129 case "$ac_given_srcdir" in
5130 .) srcdir=.
5131 if test -z "$ac_dots"; then top_srcdir=.
5132 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5133 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5134 *) # Relative path.
5135 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5136 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5137 esac
5138
5139 case "$ac_given_INSTALL" in
5140 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5141 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5142 esac
5143
5144 echo creating "$ac_file"
5145 rm -f "$ac_file"
5146 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5147 case "$ac_file" in
5148 *Makefile*) ac_comsub="1i\\
5149# $configure_input" ;;
5150 *) ac_comsub= ;;
5151 esac
5152
5153 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5154 sed -e "$ac_comsub
5155s%@configure_input@%$configure_input%g
5156s%@srcdir@%$srcdir%g
5157s%@top_srcdir@%$top_srcdir%g
5158s%@INSTALL@%$INSTALL%g
5159" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5160fi; done
5161rm -f conftest.s*
5162
5163# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5164# NAME is the cpp macro being defined and VALUE is the value it is being given.
5165#
5166# ac_d sets the value in "#define NAME VALUE" lines.
5167ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5168ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5169ac_dC='\3'
5170ac_dD='%g'
5171# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5172ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5173ac_uB='\([ ]\)%\1#\2define\3'
5174ac_uC=' '
5175ac_uD='\4%g'
5176# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5177ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5178ac_eB='$%\1#\2define\3'
5179ac_eC=' '
5180ac_eD='%g'
5181
5182if test "${CONFIG_HEADERS+set}" != set; then
5183EOF
5184cat >> $CONFIG_STATUS <<EOF
5185 CONFIG_HEADERS="include/config.h"
5186EOF
5187cat >> $CONFIG_STATUS <<\EOF
5188fi
5189for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5190 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5191 case "$ac_file" in
5192 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5193 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5194 *) ac_file_in="${ac_file}.in" ;;
5195 esac
5196
5197 echo creating $ac_file
5198
5199 rm -f conftest.frag conftest.in conftest.out
5200 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5201 cat $ac_file_inputs > conftest.in
5202
5203EOF
5204
5205# Transform confdefs.h into a sed script conftest.vals that substitutes
5206# the proper values into config.h.in to produce config.h. And first:
5207# Protect against being on the right side of a sed subst in config.status.
5208# Protect against being in an unquoted here document in config.status.
5209rm -f conftest.vals
5210cat > conftest.hdr <<\EOF
5211s/[\\&%]/\\&/g
5212s%[\\$`]%\\&%g
5213s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5214s%ac_d%ac_u%gp
5215s%ac_u%ac_e%gp
5216EOF
5217sed -n -f conftest.hdr confdefs.h > conftest.vals
5218rm -f conftest.hdr
5219
5220# This sed command replaces #undef with comments. This is necessary, for
5221# example, in the case of _POSIX_SOURCE, which is predefined and required
5222# on some systems where configure will not decide to define it.
5223cat >> conftest.vals <<\EOF
5224s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5225EOF
5226
5227# Break up conftest.vals because some shells have a limit on
5228# the size of here documents, and old seds have small limits too.
5229
5230rm -f conftest.tail
5231while :
5232do
5233 ac_lines=`grep -c . conftest.vals`
5234 # grep -c gives empty output for an empty file on some AIX systems.
5235 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5236 # Write a limited-size here document to conftest.frag.
5237 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5238 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5239 echo 'CEOF
5240 sed -f conftest.frag conftest.in > conftest.out
5241 rm -f conftest.in
5242 mv conftest.out conftest.in
5243' >> $CONFIG_STATUS
5244 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5245 rm -f conftest.vals
5246 mv conftest.tail conftest.vals
5247done
5248rm -f conftest.vals
5249
5250cat >> $CONFIG_STATUS <<\EOF
5251 rm -f conftest.frag conftest.h
5252 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5253 cat conftest.in >> conftest.h
5254 rm -f conftest.in
5255 if cmp -s $ac_file conftest.h 2>/dev/null; then
5256 echo "$ac_file is unchanged"
5257 rm -f conftest.h
5258 else
5259 # Remove last slash and all that follows it. Not all systems have dirname.
5260 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5261 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5262 # The file is in a subdirectory.
5263 test ! -d "$ac_dir" && mkdir "$ac_dir"
5264 fi
5265 rm -f $ac_file
5266 mv conftest.h $ac_file
5267 fi
5268fi; done
5269
5270EOF
5271
5272cat >> $CONFIG_STATUS <<EOF
42962a48
TT
5273ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
5274ac_dests="java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc include/java-gc.h include/java-threads.h include/java-signal.h"
ee9dd372
TT
5275EOF
5276
5277cat >> $CONFIG_STATUS <<\EOF
5278srcdir=$ac_given_srcdir
5279while test -n "$ac_sources"; do
5280 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5281 set $ac_sources; ac_source=$1; shift; ac_sources=$*
5282
5283 echo "linking $srcdir/$ac_source to $ac_dest"
5284
5285 if test ! -r $srcdir/$ac_source; then
5286 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5287 fi
5288 rm -f $ac_dest
5289
5290 # Make relative symlinks.
5291 # Remove last slash and all that follows it. Not all systems have dirname.
5292 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5293 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5294 # The dest file is in a subdirectory.
5295 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5296 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5297 # A "../" for each directory in $ac_dest_dir_suffix.
5298 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5299 else
5300 ac_dest_dir_suffix= ac_dots=
5301 fi
5302
5303 case "$srcdir" in
5304 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5305 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5306 esac
5307
5308 # Make a symlink if possible; otherwise try a hard link.
5309 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5310 ln $srcdir/$ac_source $ac_dest; then :
5311 else
5312 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5313 fi
5314done
5315EOF
5316cat >> $CONFIG_STATUS <<EOF
5317
5318srcdir=${srcdir}
5319host=${host}
5320target=${target}
5321with_multisubdir=${with_multisubdir}
5322ac_configure_args="${multilib_arg} ${ac_configure_args}"
5323CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5324libgcj_basedir=${libgcj_basedir}
5325CC="${CC}"
5326CXX="${CXX}"
5327
5328EOF
5329cat >> $CONFIG_STATUS <<\EOF
5330test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
5331if test -n "$CONFIG_FILES"; then
5332 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
5333fi
5334exit 0
5335EOF
5336chmod +x $CONFIG_STATUS
5337rm -fr confdefs* $ac_clean_files
5338test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5339