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