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