BytesToUnicode.java (getDefaultDecoder): Let default decoder use iconv.
[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 --with-pic try to use only PIC/non-PIC objects [default=use both]"
36 ac_help="$ac_help
37 --enable-fast-character prefer speed over size for Character"
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
974
975
976 # Extract the first word of "gcc", so it can be a program name with args.
977 set dummy gcc; ac_word=$2
978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
979 echo "configure:980: checking for $ac_word" >&5
980 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
981 echo $ac_n "(cached) $ac_c" 1>&6
982 else
983 if test -n "$CC"; then
984 ac_cv_prog_CC="$CC" # Let the user override the test.
985 else
986 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
987 ac_dummy="$PATH"
988 for ac_dir in $ac_dummy; do
989 test -z "$ac_dir" && ac_dir=.
990 if test -f $ac_dir/$ac_word; then
991 ac_cv_prog_CC="gcc"
992 break
993 fi
994 done
995 IFS="$ac_save_ifs"
996 fi
997 fi
998 CC="$ac_cv_prog_CC"
999 if test -n "$CC"; then
1000 echo "$ac_t""$CC" 1>&6
1001 else
1002 echo "$ac_t""no" 1>&6
1003 fi
1004
1005 if test -z "$CC"; then
1006 # Extract the first word of "cc", so it can be a program name with args.
1007 set dummy cc; ac_word=$2
1008 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1009 echo "configure:1010: checking for $ac_word" >&5
1010 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1011 echo $ac_n "(cached) $ac_c" 1>&6
1012 else
1013 if test -n "$CC"; then
1014 ac_cv_prog_CC="$CC" # Let the user override the test.
1015 else
1016 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1017 ac_prog_rejected=no
1018 ac_dummy="$PATH"
1019 for ac_dir in $ac_dummy; do
1020 test -z "$ac_dir" && ac_dir=.
1021 if test -f $ac_dir/$ac_word; then
1022 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1023 ac_prog_rejected=yes
1024 continue
1025 fi
1026 ac_cv_prog_CC="cc"
1027 break
1028 fi
1029 done
1030 IFS="$ac_save_ifs"
1031 if test $ac_prog_rejected = yes; then
1032 # We found a bogon in the path, so make sure we never use it.
1033 set dummy $ac_cv_prog_CC
1034 shift
1035 if test $# -gt 0; then
1036 # We chose a different compiler from the bogus one.
1037 # However, it has the same basename, so the bogon will be chosen
1038 # first if we set CC to just the basename; use the full file name.
1039 shift
1040 set dummy "$ac_dir/$ac_word" "$@"
1041 shift
1042 ac_cv_prog_CC="$@"
1043 fi
1044 fi
1045 fi
1046 fi
1047 CC="$ac_cv_prog_CC"
1048 if test -n "$CC"; then
1049 echo "$ac_t""$CC" 1>&6
1050 else
1051 echo "$ac_t""no" 1>&6
1052 fi
1053
1054 if test -z "$CC"; then
1055 case "`uname -s`" in
1056 *win32* | *WIN32*)
1057 # Extract the first word of "cl", so it can be a program name with args.
1058 set dummy cl; ac_word=$2
1059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1060 echo "configure:1061: checking for $ac_word" >&5
1061 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1062 echo $ac_n "(cached) $ac_c" 1>&6
1063 else
1064 if test -n "$CC"; then
1065 ac_cv_prog_CC="$CC" # Let the user override the test.
1066 else
1067 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1068 ac_dummy="$PATH"
1069 for ac_dir in $ac_dummy; do
1070 test -z "$ac_dir" && ac_dir=.
1071 if test -f $ac_dir/$ac_word; then
1072 ac_cv_prog_CC="cl"
1073 break
1074 fi
1075 done
1076 IFS="$ac_save_ifs"
1077 fi
1078 fi
1079 CC="$ac_cv_prog_CC"
1080 if test -n "$CC"; then
1081 echo "$ac_t""$CC" 1>&6
1082 else
1083 echo "$ac_t""no" 1>&6
1084 fi
1085 ;;
1086 esac
1087 fi
1088 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1089 fi
1090
1091
1092 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1093 echo "configure:1094: checking whether we are using GNU C" >&5
1094 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1095 echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097 cat > conftest.c <<EOF
1098 #ifdef __GNUC__
1099 yes;
1100 #endif
1101 EOF
1102 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1103 ac_cv_prog_gcc=yes
1104 else
1105 ac_cv_prog_gcc=no
1106 fi
1107 fi
1108
1109 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1110
1111 if test $ac_cv_prog_gcc = yes; then
1112 GCC=yes
1113 else
1114 GCC=
1115 fi
1116
1117 ac_test_CFLAGS="${CFLAGS+set}"
1118 ac_save_CFLAGS="$CFLAGS"
1119 CFLAGS=
1120 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1121 echo "configure:1122: checking whether ${CC-cc} accepts -g" >&5
1122 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1123 echo $ac_n "(cached) $ac_c" 1>&6
1124 else
1125 echo 'void f(){}' > conftest.c
1126 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1127 ac_cv_prog_cc_g=yes
1128 else
1129 ac_cv_prog_cc_g=no
1130 fi
1131 rm -f conftest*
1132
1133 fi
1134
1135 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1136 if test "$ac_test_CFLAGS" = set; then
1137 CFLAGS="$ac_save_CFLAGS"
1138 elif test $ac_cv_prog_cc_g = yes; then
1139 if test "$GCC" = yes; then
1140 CFLAGS="-g -O2"
1141 else
1142 CFLAGS="-g"
1143 fi
1144 else
1145 if test "$GCC" = yes; then
1146 CFLAGS="-O2"
1147 else
1148 CFLAGS=
1149 fi
1150 fi
1151
1152 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1153 do
1154 # Extract the first word of "$ac_prog", so it can be a program name with args.
1155 set dummy $ac_prog; ac_word=$2
1156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1157 echo "configure:1158: checking for $ac_word" >&5
1158 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1159 echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161 if test -n "$CXX"; then
1162 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1163 else
1164 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1165 ac_dummy="$PATH"
1166 for ac_dir in $ac_dummy; do
1167 test -z "$ac_dir" && ac_dir=.
1168 if test -f $ac_dir/$ac_word; then
1169 ac_cv_prog_CXX="$ac_prog"
1170 break
1171 fi
1172 done
1173 IFS="$ac_save_ifs"
1174 fi
1175 fi
1176 CXX="$ac_cv_prog_CXX"
1177 if test -n "$CXX"; then
1178 echo "$ac_t""$CXX" 1>&6
1179 else
1180 echo "$ac_t""no" 1>&6
1181 fi
1182
1183 test -n "$CXX" && break
1184 done
1185 test -n "$CXX" || CXX="gcc"
1186
1187
1188
1189 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether we are using GNU C++" >&5
1191 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194 cat > conftest.C <<EOF
1195 #ifdef __GNUC__
1196 yes;
1197 #endif
1198 EOF
1199 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1200 ac_cv_prog_gxx=yes
1201 else
1202 ac_cv_prog_gxx=no
1203 fi
1204 fi
1205
1206 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1207
1208 if test $ac_cv_prog_gxx = yes; then
1209 GXX=yes
1210 else
1211 GXX=
1212 fi
1213
1214 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1215 ac_save_CXXFLAGS="$CXXFLAGS"
1216 CXXFLAGS=
1217 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1218 echo "configure:1219: checking whether ${CXX-g++} accepts -g" >&5
1219 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1220 echo $ac_n "(cached) $ac_c" 1>&6
1221 else
1222 echo 'void f(){}' > conftest.cc
1223 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1224 ac_cv_prog_cxx_g=yes
1225 else
1226 ac_cv_prog_cxx_g=no
1227 fi
1228 rm -f conftest*
1229
1230 fi
1231
1232 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1233 if test "$ac_test_CXXFLAGS" = set; then
1234 CXXFLAGS="$ac_save_CXXFLAGS"
1235 elif test $ac_cv_prog_cxx_g = yes; then
1236 if test "$GXX" = yes; then
1237 CXXFLAGS="-g -O2"
1238 else
1239 CXXFLAGS="-g"
1240 fi
1241 else
1242 if test "$GXX" = yes; then
1243 CXXFLAGS="-O2"
1244 else
1245 CXXFLAGS=
1246 fi
1247 fi
1248
1249
1250 version=0.0.7
1251
1252 PACKAGE=libjava
1253
1254 VERSION=$version
1255
1256 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1257 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1258 fi
1259 cat >> confdefs.h <<EOF
1260 #define PACKAGE "$PACKAGE"
1261 EOF
1262
1263 cat >> confdefs.h <<EOF
1264 #define VERSION "$VERSION"
1265 EOF
1266
1267
1268
1269 missing_dir=`cd $ac_aux_dir && pwd`
1270 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1271 echo "configure:1272: checking for working aclocal" >&5
1272 # Run test in a subshell; some versions of sh will print an error if
1273 # an executable is not found, even if stderr is redirected.
1274 # Redirect stdin to placate older versions of autoconf. Sigh.
1275 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1276 ACLOCAL=aclocal
1277 echo "$ac_t""found" 1>&6
1278 else
1279 ACLOCAL="$missing_dir/missing aclocal"
1280 echo "$ac_t""missing" 1>&6
1281 fi
1282
1283 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1284 echo "configure:1285: checking for working autoconf" >&5
1285 # Run test in a subshell; some versions of sh will print an error if
1286 # an executable is not found, even if stderr is redirected.
1287 # Redirect stdin to placate older versions of autoconf. Sigh.
1288 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1289 AUTOCONF=autoconf
1290 echo "$ac_t""found" 1>&6
1291 else
1292 AUTOCONF="$missing_dir/missing autoconf"
1293 echo "$ac_t""missing" 1>&6
1294 fi
1295
1296 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1297 echo "configure:1298: checking for working automake" >&5
1298 # Run test in a subshell; some versions of sh will print an error if
1299 # an executable is not found, even if stderr is redirected.
1300 # Redirect stdin to placate older versions of autoconf. Sigh.
1301 if (automake --version) < /dev/null > /dev/null 2>&1; then
1302 AUTOMAKE=automake
1303 echo "$ac_t""found" 1>&6
1304 else
1305 AUTOMAKE="$missing_dir/missing automake"
1306 echo "$ac_t""missing" 1>&6
1307 fi
1308
1309 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1310 echo "configure:1311: checking for working autoheader" >&5
1311 # Run test in a subshell; some versions of sh will print an error if
1312 # an executable is not found, even if stderr is redirected.
1313 # Redirect stdin to placate older versions of autoconf. Sigh.
1314 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1315 AUTOHEADER=autoheader
1316 echo "$ac_t""found" 1>&6
1317 else
1318 AUTOHEADER="$missing_dir/missing autoheader"
1319 echo "$ac_t""missing" 1>&6
1320 fi
1321
1322 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1323 echo "configure:1324: checking for working makeinfo" >&5
1324 # Run test in a subshell; some versions of sh will print an error if
1325 # an executable is not found, even if stderr is redirected.
1326 # Redirect stdin to placate older versions of autoconf. Sigh.
1327 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1328 MAKEINFO=makeinfo
1329 echo "$ac_t""found" 1>&6
1330 else
1331 MAKEINFO="$missing_dir/missing makeinfo"
1332 echo "$ac_t""missing" 1>&6
1333 fi
1334
1335
1336
1337 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
1338 # run it explicitly here, it will be run implicitly before
1339 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1340 # be run before AC_CANONICAL_HOST.
1341 echo $ac_n "checking build system type""... $ac_c" 1>&6
1342 echo "configure:1343: checking build system type" >&5
1343
1344 build_alias=$build
1345 case "$build_alias" in
1346 NONE)
1347 case $nonopt in
1348 NONE) build_alias=$host_alias ;;
1349 *) build_alias=$nonopt ;;
1350 esac ;;
1351 esac
1352
1353 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1354 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1355 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1356 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1357 echo "$ac_t""$build" 1>&6
1358
1359
1360 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1361 set dummy ${ac_tool_prefix}as; ac_word=$2
1362 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1363 echo "configure:1364: checking for $ac_word" >&5
1364 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1365 echo $ac_n "(cached) $ac_c" 1>&6
1366 else
1367 if test -n "$AS"; then
1368 ac_cv_prog_AS="$AS" # Let the user override the test.
1369 else
1370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1371 ac_dummy="$PATH"
1372 for ac_dir in $ac_dummy; do
1373 test -z "$ac_dir" && ac_dir=.
1374 if test -f $ac_dir/$ac_word; then
1375 ac_cv_prog_AS="${ac_tool_prefix}as"
1376 break
1377 fi
1378 done
1379 IFS="$ac_save_ifs"
1380 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1381 fi
1382 fi
1383 AS="$ac_cv_prog_AS"
1384 if test -n "$AS"; then
1385 echo "$ac_t""$AS" 1>&6
1386 else
1387 echo "$ac_t""no" 1>&6
1388 fi
1389
1390
1391
1392 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1393 set dummy ${ac_tool_prefix}ar; ac_word=$2
1394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1395 echo "configure:1396: checking for $ac_word" >&5
1396 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398 else
1399 if test -n "$AR"; then
1400 ac_cv_prog_AR="$AR" # Let the user override the test.
1401 else
1402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1403 ac_dummy="$PATH"
1404 for ac_dir in $ac_dummy; do
1405 test -z "$ac_dir" && ac_dir=.
1406 if test -f $ac_dir/$ac_word; then
1407 ac_cv_prog_AR="${ac_tool_prefix}ar"
1408 break
1409 fi
1410 done
1411 IFS="$ac_save_ifs"
1412 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1413 fi
1414 fi
1415 AR="$ac_cv_prog_AR"
1416 if test -n "$AR"; then
1417 echo "$ac_t""$AR" 1>&6
1418 else
1419 echo "$ac_t""no" 1>&6
1420 fi
1421
1422
1423
1424 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1425 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1426 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1427 echo "configure:1428: checking for $ac_word" >&5
1428 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1429 echo $ac_n "(cached) $ac_c" 1>&6
1430 else
1431 if test -n "$RANLIB"; then
1432 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1433 else
1434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1435 ac_dummy="$PATH"
1436 for ac_dir in $ac_dummy; do
1437 test -z "$ac_dir" && ac_dir=.
1438 if test -f $ac_dir/$ac_word; then
1439 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1440 break
1441 fi
1442 done
1443 IFS="$ac_save_ifs"
1444 fi
1445 fi
1446 RANLIB="$ac_cv_prog_RANLIB"
1447 if test -n "$RANLIB"; then
1448 echo "$ac_t""$RANLIB" 1>&6
1449 else
1450 echo "$ac_t""no" 1>&6
1451 fi
1452
1453
1454 if test -z "$ac_cv_prog_RANLIB"; then
1455 if test -n "$ac_tool_prefix"; then
1456 # Extract the first word of "ranlib", so it can be a program name with args.
1457 set dummy ranlib; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463 if test -n "$RANLIB"; then
1464 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1465 else
1466 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1467 ac_dummy="$PATH"
1468 for ac_dir in $ac_dummy; do
1469 test -z "$ac_dir" && ac_dir=.
1470 if test -f $ac_dir/$ac_word; then
1471 ac_cv_prog_RANLIB="ranlib"
1472 break
1473 fi
1474 done
1475 IFS="$ac_save_ifs"
1476 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1477 fi
1478 fi
1479 RANLIB="$ac_cv_prog_RANLIB"
1480 if test -n "$RANLIB"; then
1481 echo "$ac_t""$RANLIB" 1>&6
1482 else
1483 echo "$ac_t""no" 1>&6
1484 fi
1485
1486 else
1487 RANLIB=":"
1488 fi
1489 fi
1490
1491
1492 # Find a good install program. We prefer a C program (faster),
1493 # so one script is as good as another. But avoid the broken or
1494 # incompatible versions:
1495 # SysV /etc/install, /usr/sbin/install
1496 # SunOS /usr/etc/install
1497 # IRIX /sbin/install
1498 # AIX /bin/install
1499 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1500 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1501 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1502 # ./install, which can be erroneously created by make from ./install.sh.
1503 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1504 echo "configure:1505: checking for a BSD compatible install" >&5
1505 if test -z "$INSTALL"; then
1506 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508 else
1509 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1510 for ac_dir in $PATH; do
1511 # Account for people who put trailing slashes in PATH elements.
1512 case "$ac_dir/" in
1513 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1514 *)
1515 # OSF1 and SCO ODT 3.0 have their own names for install.
1516 # Don't use installbsd from OSF since it installs stuff as root
1517 # by default.
1518 for ac_prog in ginstall scoinst install; do
1519 if test -f $ac_dir/$ac_prog; then
1520 if test $ac_prog = install &&
1521 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1522 # AIX install. It has an incompatible calling convention.
1523 :
1524 else
1525 ac_cv_path_install="$ac_dir/$ac_prog -c"
1526 break 2
1527 fi
1528 fi
1529 done
1530 ;;
1531 esac
1532 done
1533 IFS="$ac_save_IFS"
1534
1535 fi
1536 if test "${ac_cv_path_install+set}" = set; then
1537 INSTALL="$ac_cv_path_install"
1538 else
1539 # As a last resort, use the slow shell script. We don't cache a
1540 # path for INSTALL within a source directory, because that will
1541 # break other packages using the cache if that directory is
1542 # removed, or if the path is relative.
1543 INSTALL="$ac_install_sh"
1544 fi
1545 fi
1546 echo "$ac_t""$INSTALL" 1>&6
1547
1548 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1549 # It thinks the first close brace ends the variable substitution.
1550 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1551
1552 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1553
1554 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1555
1556
1557 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1558 echo "configure:1559: checking whether to enable maintainer-specific portions of Makefiles" >&5
1559 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1560 if test "${enable_maintainer_mode+set}" = set; then
1561 enableval="$enable_maintainer_mode"
1562 USE_MAINTAINER_MODE=$enableval
1563 else
1564 USE_MAINTAINER_MODE=no
1565 fi
1566
1567 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1568
1569
1570 if test $USE_MAINTAINER_MODE = yes; then
1571 MAINTAINER_MODE_TRUE=
1572 MAINTAINER_MODE_FALSE='#'
1573 else
1574 MAINTAINER_MODE_TRUE='#'
1575 MAINTAINER_MODE_FALSE=
1576 fi
1577 MAINT=$MAINTAINER_MODE_TRUE
1578
1579
1580
1581 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1582 # at least currently, we never actually build a program, so we never
1583 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1584 # fails, because we are probably configuring with a cross compiler
1585 # which cant create executables. So we include AC_EXEEXT to keep
1586 # automake happy, but we dont execute it, since we dont care about
1587 # the result.
1588 if false; then
1589
1590
1591 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1592 echo "configure:1593: checking for executable suffix" >&5
1593 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1594 echo $ac_n "(cached) $ac_c" 1>&6
1595 else
1596 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1597 ac_cv_exeext=.exe
1598 else
1599 rm -f conftest*
1600 echo 'int main () { return 0; }' > conftest.$ac_ext
1601 ac_cv_exeext=
1602 if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1603 for file in conftest.*; do
1604 case $file in
1605 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1606 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1607 esac
1608 done
1609 else
1610 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1611 fi
1612 rm -f conftest*
1613 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1614 fi
1615 fi
1616
1617 EXEEXT=""
1618 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1619 echo "$ac_t""${ac_cv_exeext}" 1>&6
1620 ac_exeext=$EXEEXT
1621
1622 fi
1623
1624 # configure.host sets the following important variables
1625 # libgcj_cflags - host specific C compiler flags
1626 # libgcj_cxxflags - host specific C++ compiler flags
1627 # libgcj_javaflags - host specific Java compiler flags
1628
1629 libgcj_cflags=
1630 libgcj_cxxflags=
1631 libgcj_javaflags=
1632
1633 . ${libgcj_basedir}/configure.host
1634
1635 case ${libgcj_basedir} in
1636 /* | A-Za-z:/\\*) libgcj_flagbasedir=${libgcj_basedir} ;;
1637 *) libgcj_flagbasedir='$(top_builddir)/'${libgcj_basedir} ;;
1638 esac
1639
1640 LIBGCJ_CFLAGS="${libgcj_cflags}"
1641 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1642 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652 # Only use libltdl for native builds.
1653 if test -z "${with_cross_host}"; then
1654 case "$enable_ltdl_convenience" in
1655 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1656 "") enable_ltdl_convenience=yes
1657 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1658 esac
1659 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1660 INCLTDL='-I${top_srcdir}/''libltdl'
1661
1662
1663 DIRLTDL=libltdl
1664 cat >> confdefs.h <<\EOF
1665 #define USE_LTDL 1
1666 EOF
1667
1668 # Sigh. Libtool's macro doesn't do the right thing.
1669 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1670 fi
1671
1672
1673
1674 # Check whether --enable-shared or --disable-shared was given.
1675 if test "${enable_shared+set}" = set; then
1676 enableval="$enable_shared"
1677 p=${PACKAGE-default}
1678 case "$enableval" in
1679 yes) enable_shared=yes ;;
1680 no) enable_shared=no ;;
1681 *)
1682 enable_shared=no
1683 # Look at the argument we got. We use all the common list separators.
1684 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1685 for pkg in $enableval; do
1686 if test "X$pkg" = "X$p"; then
1687 enable_shared=yes
1688 fi
1689 done
1690 IFS="$ac_save_ifs"
1691 ;;
1692 esac
1693 else
1694 enable_shared=yes
1695 fi
1696
1697 # Check whether --enable-static or --disable-static was given.
1698 if test "${enable_static+set}" = set; then
1699 enableval="$enable_static"
1700 p=${PACKAGE-default}
1701 case "$enableval" in
1702 yes) enable_static=yes ;;
1703 no) enable_static=no ;;
1704 *)
1705 enable_static=no
1706 # Look at the argument we got. We use all the common list separators.
1707 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1708 for pkg in $enableval; do
1709 if test "X$pkg" = "X$p"; then
1710 enable_static=yes
1711 fi
1712 done
1713 IFS="$ac_save_ifs"
1714 ;;
1715 esac
1716 else
1717 enable_static=yes
1718 fi
1719
1720 # Check whether --enable-fast-install or --disable-fast-install was given.
1721 if test "${enable_fast_install+set}" = set; then
1722 enableval="$enable_fast_install"
1723 p=${PACKAGE-default}
1724 case "$enableval" in
1725 yes) enable_fast_install=yes ;;
1726 no) enable_fast_install=no ;;
1727 *)
1728 enable_fast_install=no
1729 # Look at the argument we got. We use all the common list separators.
1730 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1731 for pkg in $enableval; do
1732 if test "X$pkg" = "X$p"; then
1733 enable_fast_install=yes
1734 fi
1735 done
1736 IFS="$ac_save_ifs"
1737 ;;
1738 esac
1739 else
1740 enable_fast_install=yes
1741 fi
1742
1743 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1744 if test "${with_gnu_ld+set}" = set; then
1745 withval="$with_gnu_ld"
1746 test "$withval" = no || with_gnu_ld=yes
1747 else
1748 with_gnu_ld=no
1749 fi
1750
1751 ac_prog=ld
1752 if test "$ac_cv_prog_gcc" = yes; then
1753 # Check if gcc -print-prog-name=ld gives a path.
1754 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1755 echo "configure:1756: checking for ld used by GCC" >&5
1756 case $host in
1757 *-*-mingw*)
1758 # gcc leaves a trailing carriage return which upsets mingw
1759 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1760 *)
1761 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1762 esac
1763 case "$ac_prog" in
1764 # Accept absolute paths.
1765 [\\/]* | [A-Za-z]:[\\/]*)
1766 re_direlt='/[^/][^/]*/\.\./'
1767 # Canonicalize the path of ld
1768 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1769 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1770 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1771 done
1772 test -z "$LD" && LD="$ac_prog"
1773 ;;
1774 "")
1775 # If it fails, then pretend we aren't using GCC.
1776 ac_prog=ld
1777 ;;
1778 *)
1779 # If it is relative, then search for the first ld in PATH.
1780 with_gnu_ld=unknown
1781 ;;
1782 esac
1783 elif test "$with_gnu_ld" = yes; then
1784 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1785 echo "configure:1786: checking for GNU ld" >&5
1786 else
1787 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1788 echo "configure:1789: checking for non-GNU ld" >&5
1789 fi
1790 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1791 echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793 if test -z "$LD"; then
1794 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1795 for ac_dir in $PATH; do
1796 test -z "$ac_dir" && ac_dir=.
1797 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1798 ac_cv_path_LD="$ac_dir/$ac_prog"
1799 # Check to see if the program is GNU ld. I'd rather use --version,
1800 # but apparently some GNU ld's only accept -v.
1801 # Break only if it was the GNU/non-GNU ld that we prefer.
1802 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1803 test "$with_gnu_ld" != no && break
1804 else
1805 test "$with_gnu_ld" != yes && break
1806 fi
1807 fi
1808 done
1809 IFS="$ac_save_ifs"
1810 else
1811 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1812 fi
1813 fi
1814
1815 LD="$ac_cv_path_LD"
1816 if test -n "$LD"; then
1817 echo "$ac_t""$LD" 1>&6
1818 else
1819 echo "$ac_t""no" 1>&6
1820 fi
1821 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1822 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1823 echo "configure:1824: checking if the linker ($LD) is GNU ld" >&5
1824 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1825 echo $ac_n "(cached) $ac_c" 1>&6
1826 else
1827 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1828 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1829 ac_cv_prog_gnu_ld=yes
1830 else
1831 ac_cv_prog_gnu_ld=no
1832 fi
1833 fi
1834
1835 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1836 with_gnu_ld=$ac_cv_prog_gnu_ld
1837
1838
1839 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1840 echo "configure:1841: checking for $LD option to reload object files" >&5
1841 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1842 echo $ac_n "(cached) $ac_c" 1>&6
1843 else
1844 lt_cv_ld_reload_flag='-r'
1845 fi
1846
1847 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1848 reload_flag=$lt_cv_ld_reload_flag
1849 test -n "$reload_flag" && reload_flag=" $reload_flag"
1850
1851 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1852 echo "configure:1853: checking for BSD-compatible nm" >&5
1853 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856 if test -n "$NM"; then
1857 # Let the user override the test.
1858 ac_cv_path_NM="$NM"
1859 else
1860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1861 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1862 test -z "$ac_dir" && ac_dir=.
1863 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1864 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1865 # Check to see if the nm accepts a BSD-compat flag.
1866 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1867 # nm: unknown option "B" ignored
1868 # Tru64's nm complains that /dev/null is an invalid object file
1869 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1870 ac_cv_path_NM="$tmp_nm -B"
1871 break
1872 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1873 ac_cv_path_NM="$tmp_nm -p"
1874 break
1875 else
1876 ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
1877 continue # so that we can try to find one that supports BSD flags
1878 fi
1879 fi
1880 done
1881 IFS="$ac_save_ifs"
1882 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1883 fi
1884 fi
1885
1886 NM="$ac_cv_path_NM"
1887 echo "$ac_t""$NM" 1>&6
1888
1889 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1890 echo "configure:1891: checking whether ln -s works" >&5
1891 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1892 echo $ac_n "(cached) $ac_c" 1>&6
1893 else
1894 rm -f conftestdata
1895 if ln -s X conftestdata 2>/dev/null
1896 then
1897 rm -f conftestdata
1898 ac_cv_prog_LN_S="ln -s"
1899 else
1900 ac_cv_prog_LN_S=ln
1901 fi
1902 fi
1903 LN_S="$ac_cv_prog_LN_S"
1904 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1905 echo "$ac_t""yes" 1>&6
1906 else
1907 echo "$ac_t""no" 1>&6
1908 fi
1909
1910 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1911 echo "configure:1912: checking how to recognise dependant libraries" >&5
1912 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915 lt_cv_file_magic_cmd='${MAGIC}'
1916 lt_cv_file_magic_test_file=
1917 lt_cv_deplibs_check_method='unknown'
1918 # Need to set the preceding variable on all platforms that support
1919 # interlibrary dependencies.
1920 # 'none' -- dependencies not supported.
1921 # `unknown' -- same as none, but documents that we really don't know.
1922 # 'pass_all' -- all dependencies passed with no checks.
1923 # 'test_compile' -- check by making test program.
1924 # 'file_magic [regex]' -- check by looking for files in library path
1925 # which responds to the $file_magic_cmd with a given egrep regex.
1926 # If you have `file' or equivalent on your system and you're not sure
1927 # whether `pass_all' will *always* work, you probably want this one.
1928
1929 case "$host_os" in
1930 aix4*)
1931 lt_cv_deplibs_check_method=pass_all
1932 ;;
1933
1934 beos*)
1935 lt_cv_deplibs_check_method=pass_all
1936 ;;
1937
1938 bsdi4*)
1939 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1940 lt_cv_file_magic_cmd='/usr/bin/file -L'
1941 lt_cv_file_magic_test_file=/shlib/libc.so
1942 ;;
1943
1944 cygwin* | mingw*)
1945 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1946 lt_cv_file_magic_cmd='${OBJDUMP} -f'
1947 ;;
1948
1949 freebsd* )
1950 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1951 case "$host_cpu" in
1952 i*86 )
1953 # Not sure whether the presence of OpenBSD here was a mistake.
1954 # Let's accept both of them until this is cleared up.
1955 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1956 lt_cv_file_magic_cmd=/usr/bin/file
1957 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1958 ;;
1959 esac
1960 else
1961 lt_cv_deplibs_check_method=pass_all
1962 fi
1963 ;;
1964
1965 gnu*)
1966 lt_cv_deplibs_check_method=pass_all
1967 ;;
1968
1969 hpux10.20*)
1970 # TODO: Does this work for hpux-11 too?
1971 lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
1972 lt_cv_file_magic_cmd=/usr/bin/file
1973 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1974 ;;
1975
1976 irix5* | irix6*)
1977 case "$host_os" in
1978 irix5*)
1979 # this will be overridden with pass_all, but let us keep it just in case
1980 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1981 ;;
1982 *)
1983 case "$LD" in
1984 *-32|*"-32 ") libmagic=32-bit;;
1985 *-n32|*"-n32 ") libmagic=N32;;
1986 *-64|*"-64 ") libmagic=64-bit;;
1987 *) libmagic=never-match;;
1988 esac
1989 # this will be overridden with pass_all, but let us keep it just in case
1990 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1991 ;;
1992 esac
1993 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1994 lt_cv_deplibs_check_method=pass_all
1995 ;;
1996
1997 # This must be Linux ELF.
1998 linux-gnu*)
1999 case "$host_cpu" in
2000 alpha* | i*86 | powerpc* | sparc* | ia64* )
2001 lt_cv_deplibs_check_method=pass_all ;;
2002 *)
2003 # glibc up to 2.1.1 does not perform some relocations on ARM
2004 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2005 esac
2006 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2007 ;;
2008
2009 netbsd*)
2010 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
2011 else
2012 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
2013 lt_cv_file_magic_cmd='/usr/bin/file -L'
2014 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2015 fi
2016 ;;
2017
2018 osf3* | osf4* | osf5*)
2019 # this will be overridden with pass_all, but let us keep it just in case
2020 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2021 lt_cv_file_magic_test_file=/shlib/libc.so
2022 lt_cv_deplibs_check_method=pass_all
2023 ;;
2024
2025 sco3.2v5*)
2026 lt_cv_deplibs_check_method=pass_all
2027 ;;
2028
2029 solaris*)
2030 lt_cv_deplibs_check_method=pass_all
2031 lt_cv_file_magic_test_file=/lib/libc.so
2032 ;;
2033
2034 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2035 case "$host_vendor" in
2036 ncr)
2037 lt_cv_deplibs_check_method=pass_all
2038 ;;
2039 motorola)
2040 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2041 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2042 ;;
2043 esac
2044 ;;
2045 esac
2046
2047 fi
2048
2049 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2050 file_magic_cmd=$lt_cv_file_magic_cmd
2051 deplibs_check_method=$lt_cv_deplibs_check_method
2052
2053 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2054 echo "configure:2055: checking for object suffix" >&5
2055 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2056 echo $ac_n "(cached) $ac_c" 1>&6
2057 else
2058 rm -f conftest*
2059 echo 'int i = 1;' > conftest.$ac_ext
2060 if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2061 for ac_file in conftest.*; do
2062 case $ac_file in
2063 *.c) ;;
2064 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2065 esac
2066 done
2067 else
2068 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2069 fi
2070 rm -f conftest*
2071 fi
2072
2073 echo "$ac_t""$ac_cv_objext" 1>&6
2074 OBJEXT=$ac_cv_objext
2075 ac_objext=$ac_cv_objext
2076
2077 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2078
2079 # Only perform the check for file, if the check method requires it
2080 case "$deplibs_check_method" in
2081 file_magic*)
2082 if test "$file_magic_cmd" = '${MAGIC}'; then
2083 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2084 echo "configure:2085: checking for ${ac_tool_prefix}file" >&5
2085 if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then
2086 echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088 case "$MAGIC" in
2089 /*)
2090 lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
2091 ;;
2092 ?:/*)
2093 ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
2094 ;;
2095 *)
2096 ac_save_MAGIC="$MAGIC"
2097 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2098 ac_dummy="/usr/bin:$PATH"
2099 for ac_dir in $ac_dummy; do
2100 test -z "$ac_dir" && ac_dir=.
2101 if test -f $ac_dir/${ac_tool_prefix}file; then
2102 lt_cv_path_MAGIC="$ac_dir/${ac_tool_prefix}file"
2103 if test -n "$file_magic_test_file"; then
2104 case "$deplibs_check_method" in
2105 "file_magic "*)
2106 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2107 MAGIC="$lt_cv_path_MAGIC"
2108 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2109 egrep "$file_magic_regex" > /dev/null; then
2110 :
2111 else
2112 cat <<EOF 1>&2
2113
2114 *** Warning: the command libtool uses to detect shared libraries,
2115 *** $file_magic_cmd, produces output that libtool cannot recognize.
2116 *** The result is that libtool may fail to recognize shared libraries
2117 *** as such. This will affect the creation of libtool libraries that
2118 *** depend on shared libraries, but programs linked with such libtool
2119 *** libraries will work regardless of this problem. Nevertheless, you
2120 *** may want to report the problem to your system manager and/or to
2121 *** bug-libtool@gnu.org
2122
2123 EOF
2124 fi ;;
2125 esac
2126 fi
2127 break
2128 fi
2129 done
2130 IFS="$ac_save_ifs"
2131 MAGIC="$ac_save_MAGIC"
2132 ;;
2133 esac
2134 fi
2135
2136 MAGIC="$lt_cv_path_MAGIC"
2137 if test -n "$MAGIC"; then
2138 echo "$ac_t""$MAGIC" 1>&6
2139 else
2140 echo "$ac_t""no" 1>&6
2141 fi
2142
2143 if test -z "$lt_cv_path_MAGIC"; then
2144 if test -n "$ac_tool_prefix"; then
2145 echo $ac_n "checking for file""... $ac_c" 1>&6
2146 echo "configure:2147: checking for file" >&5
2147 if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then
2148 echo $ac_n "(cached) $ac_c" 1>&6
2149 else
2150 case "$MAGIC" in
2151 /*)
2152 lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
2153 ;;
2154 ?:/*)
2155 ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
2156 ;;
2157 *)
2158 ac_save_MAGIC="$MAGIC"
2159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2160 ac_dummy="/usr/bin:$PATH"
2161 for ac_dir in $ac_dummy; do
2162 test -z "$ac_dir" && ac_dir=.
2163 if test -f $ac_dir/file; then
2164 lt_cv_path_MAGIC="$ac_dir/file"
2165 if test -n "$file_magic_test_file"; then
2166 case "$deplibs_check_method" in
2167 "file_magic "*)
2168 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2169 MAGIC="$lt_cv_path_MAGIC"
2170 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2171 egrep "$file_magic_regex" > /dev/null; then
2172 :
2173 else
2174 cat <<EOF 1>&2
2175
2176 *** Warning: the command libtool uses to detect shared libraries,
2177 *** $file_magic_cmd, produces output that libtool cannot recognize.
2178 *** The result is that libtool may fail to recognize shared libraries
2179 *** as such. This will affect the creation of libtool libraries that
2180 *** depend on shared libraries, but programs linked with such libtool
2181 *** libraries will work regardless of this problem. Nevertheless, you
2182 *** may want to report the problem to your system manager and/or to
2183 *** bug-libtool@gnu.org
2184
2185 EOF
2186 fi ;;
2187 esac
2188 fi
2189 break
2190 fi
2191 done
2192 IFS="$ac_save_ifs"
2193 MAGIC="$ac_save_MAGIC"
2194 ;;
2195 esac
2196 fi
2197
2198 MAGIC="$lt_cv_path_MAGIC"
2199 if test -n "$MAGIC"; then
2200 echo "$ac_t""$MAGIC" 1>&6
2201 else
2202 echo "$ac_t""no" 1>&6
2203 fi
2204
2205 else
2206 MAGIC=:
2207 fi
2208 fi
2209
2210 fi
2211 ;;
2212 esac
2213
2214 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2215 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2217 echo "configure:2218: checking for $ac_word" >&5
2218 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2219 echo $ac_n "(cached) $ac_c" 1>&6
2220 else
2221 if test -n "$RANLIB"; then
2222 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2223 else
2224 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2225 ac_dummy="$PATH"
2226 for ac_dir in $ac_dummy; do
2227 test -z "$ac_dir" && ac_dir=.
2228 if test -f $ac_dir/$ac_word; then
2229 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2230 break
2231 fi
2232 done
2233 IFS="$ac_save_ifs"
2234 fi
2235 fi
2236 RANLIB="$ac_cv_prog_RANLIB"
2237 if test -n "$RANLIB"; then
2238 echo "$ac_t""$RANLIB" 1>&6
2239 else
2240 echo "$ac_t""no" 1>&6
2241 fi
2242
2243
2244 if test -z "$ac_cv_prog_RANLIB"; then
2245 if test -n "$ac_tool_prefix"; then
2246 # Extract the first word of "ranlib", so it can be a program name with args.
2247 set dummy ranlib; ac_word=$2
2248 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2249 echo "configure:2250: checking for $ac_word" >&5
2250 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253 if test -n "$RANLIB"; then
2254 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2255 else
2256 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2257 ac_dummy="$PATH"
2258 for ac_dir in $ac_dummy; do
2259 test -z "$ac_dir" && ac_dir=.
2260 if test -f $ac_dir/$ac_word; then
2261 ac_cv_prog_RANLIB="ranlib"
2262 break
2263 fi
2264 done
2265 IFS="$ac_save_ifs"
2266 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2267 fi
2268 fi
2269 RANLIB="$ac_cv_prog_RANLIB"
2270 if test -n "$RANLIB"; then
2271 echo "$ac_t""$RANLIB" 1>&6
2272 else
2273 echo "$ac_t""no" 1>&6
2274 fi
2275
2276 else
2277 RANLIB=":"
2278 fi
2279 fi
2280
2281 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2282 set dummy ${ac_tool_prefix}strip; ac_word=$2
2283 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2284 echo "configure:2285: checking for $ac_word" >&5
2285 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287 else
2288 if test -n "$STRIP"; then
2289 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2290 else
2291 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2292 ac_dummy="$PATH"
2293 for ac_dir in $ac_dummy; do
2294 test -z "$ac_dir" && ac_dir=.
2295 if test -f $ac_dir/$ac_word; then
2296 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2297 break
2298 fi
2299 done
2300 IFS="$ac_save_ifs"
2301 fi
2302 fi
2303 STRIP="$ac_cv_prog_STRIP"
2304 if test -n "$STRIP"; then
2305 echo "$ac_t""$STRIP" 1>&6
2306 else
2307 echo "$ac_t""no" 1>&6
2308 fi
2309
2310
2311 if test -z "$ac_cv_prog_STRIP"; then
2312 if test -n "$ac_tool_prefix"; then
2313 # Extract the first word of "strip", so it can be a program name with args.
2314 set dummy strip; ac_word=$2
2315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2316 echo "configure:2317: checking for $ac_word" >&5
2317 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319 else
2320 if test -n "$STRIP"; then
2321 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2322 else
2323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2324 ac_dummy="$PATH"
2325 for ac_dir in $ac_dummy; do
2326 test -z "$ac_dir" && ac_dir=.
2327 if test -f $ac_dir/$ac_word; then
2328 ac_cv_prog_STRIP="strip"
2329 break
2330 fi
2331 done
2332 IFS="$ac_save_ifs"
2333 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2334 fi
2335 fi
2336 STRIP="$ac_cv_prog_STRIP"
2337 if test -n "$STRIP"; then
2338 echo "$ac_t""$STRIP" 1>&6
2339 else
2340 echo "$ac_t""no" 1>&6
2341 fi
2342
2343 else
2344 STRIP=":"
2345 fi
2346 fi
2347
2348
2349 # Check for any special flags to pass to ltconfig.
2350 libtool_flags="--cache-file=$cache_file"
2351 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2352 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2353 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2354 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2355 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2356 libtool_flags="$libtool_flags --enable-dlopen"
2357
2358 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2359 if test "${enable_libtool_lock+set}" = set; then
2360 enableval="$enable_libtool_lock"
2361 :
2362 fi
2363
2364 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2365 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2366
2367 # Check whether --with-pic or --without-pic was given.
2368 if test "${with_pic+set}" = set; then
2369 withval="$with_pic"
2370 pic_mode="$withval"
2371 else
2372 pic_mode=default
2373 fi
2374
2375 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2376 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2377
2378 # Some flags need to be propagated to the compiler or linker for good
2379 # libtool support.
2380 case "$host" in
2381 *-*-irix6*)
2382 # Find out which ABI we are using.
2383 echo '#line 2384 "configure"' > conftest.$ac_ext
2384 if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2385 case "`/usr/bin/file conftest.o`" in
2386 *32-bit*)
2387 LD="${LD-ld} -32"
2388 ;;
2389 *N32*)
2390 LD="${LD-ld} -n32"
2391 ;;
2392 *64-bit*)
2393 LD="${LD-ld} -64"
2394 ;;
2395 esac
2396 fi
2397 rm -rf conftest*
2398 ;;
2399
2400 *-*-sco3.2v5*)
2401 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2402 SAVE_CFLAGS="$CFLAGS"
2403 CFLAGS="$CFLAGS -belf"
2404 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2405 echo "configure:2406: checking whether the C compiler needs -belf" >&5
2406 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2407 echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409
2410 ac_ext=c
2411 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2412 ac_cpp='$CPP $CPPFLAGS'
2413 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2414 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2415 cross_compiling=$ac_cv_prog_cc_cross
2416
2417 cat > conftest.$ac_ext <<EOF
2418 #line 2419 "configure"
2419 #include "confdefs.h"
2420
2421 int main() {
2422
2423 ; return 0; }
2424 EOF
2425 if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2426 rm -rf conftest*
2427 lt_cv_cc_needs_belf=yes
2428 else
2429 echo "configure: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 rm -rf conftest*
2432 lt_cv_cc_needs_belf=no
2433 fi
2434 rm -f conftest*
2435 ac_ext=c
2436 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2437 ac_cpp='$CPP $CPPFLAGS'
2438 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2439 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2440 cross_compiling=$ac_cv_prog_cc_cross
2441
2442 fi
2443
2444 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2445 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2447 CFLAGS="$SAVE_CFLAGS"
2448 fi
2449 ;;
2450
2451
2452 esac
2453
2454 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2455 echo "configure:2456: checking how to run the C++ preprocessor" >&5
2456 if test -z "$CXXCPP"; then
2457 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2458 echo $ac_n "(cached) $ac_c" 1>&6
2459 else
2460 ac_ext=C
2461 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2462 ac_cpp='$CXXCPP $CPPFLAGS'
2463 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2464 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2465 cross_compiling=$ac_cv_prog_cxx_cross
2466 CXXCPP="${CXX-g++} -E"
2467 cat > conftest.$ac_ext <<EOF
2468 #line 2469 "configure"
2469 #include "confdefs.h"
2470 #include <stdlib.h>
2471 EOF
2472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2473 { (eval echo configure:2474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2475 if test -z "$ac_err"; then
2476 :
2477 else
2478 echo "$ac_err" >&5
2479 echo "configure: failed program was:" >&5
2480 cat conftest.$ac_ext >&5
2481 rm -rf conftest*
2482 CXXCPP=/lib/cpp
2483 fi
2484 rm -f conftest*
2485 ac_cv_prog_CXXCPP="$CXXCPP"
2486 ac_ext=c
2487 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2488 ac_cpp='$CPP $CPPFLAGS'
2489 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2490 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2491 cross_compiling=$ac_cv_prog_cc_cross
2492 fi
2493 fi
2494 CXXCPP="$ac_cv_prog_CXXCPP"
2495 echo "$ac_t""$CXXCPP" 1>&6
2496
2497
2498 # Save cache, so that ltconfig can load it
2499 cat > confcache <<\EOF
2500 # This file is a shell script that caches the results of configure
2501 # tests run on this system so they can be shared between configure
2502 # scripts and configure runs. It is not useful on other systems.
2503 # If it contains results you don't want to keep, you may remove or edit it.
2504 #
2505 # By default, configure uses ./config.cache as the cache file,
2506 # creating it if it does not exist already. You can give configure
2507 # the --cache-file=FILE option to use a different cache file; that is
2508 # what configure does when it calls configure scripts in
2509 # subdirectories, so they share the cache.
2510 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2511 # config.status only pays attention to the cache file if you give it the
2512 # --recheck option to rerun configure.
2513 #
2514 EOF
2515 # The following way of writing the cache mishandles newlines in values,
2516 # but we know of no workaround that is simple, portable, and efficient.
2517 # So, don't put newlines in cache variables' values.
2518 # Ultrix sh set writes to stderr and can't be redirected directly,
2519 # and sets the high bit in the cache file unless we assign to the vars.
2520 (set) 2>&1 |
2521 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2522 *ac_space=\ *)
2523 # `set' does not quote correctly, so add quotes (double-quote substitution
2524 # turns \\\\ into \\, and sed turns \\ into \).
2525 sed -n \
2526 -e "s/'/'\\\\''/g" \
2527 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2528 ;;
2529 *)
2530 # `set' quotes correctly as required by POSIX, so do not add quotes.
2531 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2532 ;;
2533 esac >> confcache
2534 if cmp -s $cache_file confcache; then
2535 :
2536 else
2537 if test -w $cache_file; then
2538 echo "updating cache $cache_file"
2539 cat confcache > $cache_file
2540 else
2541 echo "not updating unwritable cache $cache_file"
2542 fi
2543 fi
2544 rm -f confcache
2545
2546
2547 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2548 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2549 MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2550 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2551 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2552 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2553 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2554 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2555 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2556 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2557
2558 # Reload cache, that may have been modified by ltconfig
2559 if test -r "$cache_file"; then
2560 echo "loading cache $cache_file"
2561 . $cache_file
2562 else
2563 echo "creating cache $cache_file"
2564 > $cache_file
2565 fi
2566
2567
2568 # This can be used to rebuild libtool when needed
2569 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2570
2571 # Always use our own libtool.
2572 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2573
2574 # Redirect the config.log output again, so that the ltconfig log is not
2575 # clobbered by the next message.
2576 exec 5>>./config.log
2577
2578
2579
2580
2581 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2582 lt_save_CC="$CC"
2583 lt_save_CFLAGS="$CFLAGS"
2584 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2585 MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2586 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2587 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2588 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2589 deplibs_check_method="$deplibs_check_method" \
2590 file_magic_cmd="$file_magic_cmd" \
2591 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2592 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2593 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2594 CC="$lt_save_CC"
2595 CFLAGS="$lt_save_CFLAGS"
2596
2597 # Redirect the config.log output again, so that the ltconfig log is not
2598 # clobbered by the next message.
2599 exec 5>>./config.log
2600
2601
2602
2603
2604
2605
2606 subdirs="$DIRLTDL"
2607
2608
2609 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2610 COMPPATH=.
2611 else
2612 COMPPATH=..
2613 fi
2614
2615
2616
2617
2618 if test -d $srcdir/testsuite; then
2619 TESTSUBDIR_TRUE=
2620 TESTSUBDIR_FALSE='#'
2621 else
2622 TESTSUBDIR_TRUE='#'
2623 TESTSUBDIR_FALSE=
2624 fi
2625
2626 # Check whether --enable-fast-character or --disable-fast-character was given.
2627 if test "${enable_fast_character+set}" = set; then
2628 enableval="$enable_fast_character"
2629 # Nothing
2630
2631 else
2632 cat >> confdefs.h <<\EOF
2633 #define COMPACT_CHARACTER 1
2634 EOF
2635
2636 fi
2637
2638
2639 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2640 if test "${enable_getenv_properties+set}" = set; then
2641 enableval="$enable_getenv_properties"
2642 :
2643 fi
2644
2645
2646 if test -n "$enable_getenv_properties"; then
2647 enable_getenv_properties=${enable_getenv_properties_default-yes}
2648 fi
2649 if test "$enable_getenv_properties" = no; then
2650 cat >> confdefs.h <<\EOF
2651 #define DISABLE_GETENV_PROPERTIES 1
2652 EOF
2653
2654 fi
2655
2656 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2657 if test "${enable_libgcj_debug+set}" = set; then
2658 enableval="$enable_libgcj_debug"
2659 if test "$enable_libgcj_debug" = yes; then
2660 cat >> confdefs.h <<\EOF
2661 #define DEBUG 1
2662 EOF
2663
2664 fi
2665 fi
2666
2667
2668 # Check whether --enable-interpreter or --disable-interpreter was given.
2669 if test "${enable_interpreter+set}" = set; then
2670 enableval="$enable_interpreter"
2671 if test "$enable_interpreter" = yes; then
2672 # This can also be set in configure.host.
2673 libgcj_interpreter=yes
2674 elif test "$enable_interpreter" = no; then
2675 libgcj_interpreter=no
2676 fi
2677 fi
2678
2679
2680 if test "$libgcj_interpreter" = yes; then
2681 cat >> confdefs.h <<\EOF
2682 #define INTERPRETER 1
2683 EOF
2684
2685 fi
2686
2687 EXCEPTIONSPEC=
2688 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2689 if test "${enable_sjlj_exceptions+set}" = set; then
2690 enableval="$enable_sjlj_exceptions"
2691 if test "$enable_sjlj_exceptions" = yes; then
2692 # This can be set in configure.host.
2693 libgcj_sjlj=yes
2694 fi
2695 fi
2696
2697
2698 if test "$libgcj_sjlj" = yes; then
2699 EXCEPTIONSPEC="-fsjlj-exceptions"
2700 cat >> confdefs.h <<\EOF
2701 #define SJLJ_EXCEPTIONS 1
2702 EOF
2703
2704 fi
2705
2706 FORCELIBGCCSPEC=
2707 if test "$ac_cv_prog_gnu_ld" = yes; then
2708 FORCELIBGCCSPEC="-u __rethrow -u __frame_state_for -lgcc"
2709 fi
2710
2711 echo $ac_n "checking for data_start""... $ac_c" 1>&6
2712 echo "configure:2713: checking for data_start" >&5
2713 LIBDATASTARTSPEC=
2714 NEEDS_DATA_START=
2715 cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 extern int data_start;
2719 int main() {
2720 return ((int) &data_start);
2721 ; return 0; }
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2724 rm -rf conftest*
2725 echo "$ac_t""found it" 1>&6
2726 else
2727 echo "configure: failed program was:" >&5
2728 cat conftest.$ac_ext >&5
2729 rm -rf conftest*
2730 LIBDATASTARTSPEC="-u data_start -lgcjdata"
2731 NEEDS_DATA_START=yes
2732 echo "$ac_t""missing" 1>&6
2733 fi
2734 rm -f conftest*
2735
2736
2737 # Check whether --enable-java-net or --disable-java-net was given.
2738 if test "${enable_java_net+set}" = set; then
2739 enableval="$enable_java_net"
2740 :
2741 fi
2742
2743
2744 if test -n "$enable_java_net"; then
2745 enable_java_net=${enable_java_net_default-yes}
2746 fi
2747 if test "$enable_java_net" = no; then
2748 cat >> confdefs.h <<\EOF
2749 #define DISABLE_JAVA_NET 1
2750 EOF
2751
2752 fi
2753
2754 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2755 if test "${enable_jvmpi+set}" = set; then
2756 enableval="$enable_jvmpi"
2757 :
2758 fi
2759
2760
2761 if test "$enable_jvmpi" != no; then
2762 cat >> confdefs.h <<\EOF
2763 #define ENABLE_JVMPI 1
2764 EOF
2765
2766 fi
2767
2768 TARGET_ECOS="no"
2769 # Check whether --with-ecos or --without-ecos was given.
2770 if test "${with_ecos+set}" = set; then
2771 withval="$with_ecos"
2772 TARGET_ECOS="$with_ecos"
2773
2774 fi
2775
2776
2777 case "$TARGET_ECOS" in
2778 no)
2779 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2780 PROCESS=${PROCESS-Posix}
2781 ;;
2782 *)
2783 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2784 PROCESS=Ecos
2785 cat >> confdefs.h <<\EOF
2786 #define ECOS 1
2787 EOF
2788
2789 ;;
2790 esac
2791
2792 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2793 echo "configure:2794: checking how to run the C preprocessor" >&5
2794 # On Suns, sometimes $CPP names a directory.
2795 if test -n "$CPP" && test -d "$CPP"; then
2796 CPP=
2797 fi
2798 if test -z "$CPP"; then
2799 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2800 echo $ac_n "(cached) $ac_c" 1>&6
2801 else
2802 # This must be in double quotes, not single quotes, because CPP may get
2803 # substituted into the Makefile and "${CC-cc}" will confuse make.
2804 CPP="${CC-cc} -E"
2805 # On the NeXT, cc -E runs the code through the compiler's parser,
2806 # not just through cpp.
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #include <assert.h>
2811 Syntax Error
2812 EOF
2813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2814 { (eval echo configure:2815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2816 if test -z "$ac_err"; then
2817 :
2818 else
2819 echo "$ac_err" >&5
2820 echo "configure: failed program was:" >&5
2821 cat conftest.$ac_ext >&5
2822 rm -rf conftest*
2823 CPP="${CC-cc} -E -traditional-cpp"
2824 cat > conftest.$ac_ext <<EOF
2825 #line 2826 "configure"
2826 #include "confdefs.h"
2827 #include <assert.h>
2828 Syntax Error
2829 EOF
2830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2831 { (eval echo configure:2832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2833 if test -z "$ac_err"; then
2834 :
2835 else
2836 echo "$ac_err" >&5
2837 echo "configure: failed program was:" >&5
2838 cat conftest.$ac_ext >&5
2839 rm -rf conftest*
2840 CPP="${CC-cc} -nologo -E"
2841 cat > conftest.$ac_ext <<EOF
2842 #line 2843 "configure"
2843 #include "confdefs.h"
2844 #include <assert.h>
2845 Syntax Error
2846 EOF
2847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2848 { (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2850 if test -z "$ac_err"; then
2851 :
2852 else
2853 echo "$ac_err" >&5
2854 echo "configure: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
2856 rm -rf conftest*
2857 CPP=/lib/cpp
2858 fi
2859 rm -f conftest*
2860 fi
2861 rm -f conftest*
2862 fi
2863 rm -f conftest*
2864 ac_cv_prog_CPP="$CPP"
2865 fi
2866 CPP="$ac_cv_prog_CPP"
2867 else
2868 ac_cv_prog_CPP="$CPP"
2869 fi
2870 echo "$ac_t""$CPP" 1>&6
2871
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <stdint.h>
2876 EOF
2877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2878 egrep "uint32_t" >/dev/null 2>&1; then
2879 rm -rf conftest*
2880 cat >> confdefs.h <<\EOF
2881 #define HAVE_INT32_DEFINED 1
2882 EOF
2883
2884 fi
2885 rm -f conftest*
2886
2887 cat > conftest.$ac_ext <<EOF
2888 #line 2889 "configure"
2889 #include "confdefs.h"
2890 #include <inttypes.h>
2891 EOF
2892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2893 egrep "uint32_t" >/dev/null 2>&1; then
2894 rm -rf conftest*
2895 cat >> confdefs.h <<\EOF
2896 #define HAVE_INT32_DEFINED 1
2897 EOF
2898
2899 fi
2900 rm -f conftest*
2901
2902 cat > conftest.$ac_ext <<EOF
2903 #line 2904 "configure"
2904 #include "confdefs.h"
2905 #include <sys/types.h>
2906 EOF
2907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2908 egrep "u_int32_t" >/dev/null 2>&1; then
2909 rm -rf conftest*
2910 cat >> confdefs.h <<\EOF
2911 #define HAVE_BSD_INT32_DEFINED 1
2912 EOF
2913
2914 fi
2915 rm -f conftest*
2916
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 #include <sys/config.h>
2921 EOF
2922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2923 egrep "u_int32_t" >/dev/null 2>&1; then
2924 rm -rf conftest*
2925 cat >> confdefs.h <<\EOF
2926 #define HAVE_BSD_INT32_DEFINED 1
2927 EOF
2928
2929 fi
2930 rm -f conftest*
2931
2932
2933
2934 cat > conftest.$ac_ext <<EOF
2935 #line 2936 "configure"
2936 #include "confdefs.h"
2937 #include <time.h>
2938 EOF
2939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2940 egrep "mktime" >/dev/null 2>&1; then
2941 rm -rf conftest*
2942 cat >> confdefs.h <<\EOF
2943 #define HAVE_MKTIME 1
2944 EOF
2945
2946 fi
2947 rm -f conftest*
2948
2949 cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <time.h>
2953 EOF
2954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2955 egrep "localtime" >/dev/null 2>&1; then
2956 rm -rf conftest*
2957 cat >> confdefs.h <<\EOF
2958 #define HAVE_LOCALTIME 1
2959 EOF
2960
2961 fi
2962 rm -f conftest*
2963
2964
2965 test -d java || mkdir java
2966 test -d java/io || mkdir java/io
2967
2968
2969 test -d java/lang || mkdir java/lang
2970
2971
2972
2973 SYSTEMSPEC=
2974
2975
2976 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
2977
2978
2979 # Check whether --with-system-zlib or --without-system-zlib was given.
2980 if test "${with_system_zlib+set}" = set; then
2981 withval="$with_system_zlib"
2982 :
2983 fi
2984
2985 ZLIBSPEC=
2986
2987 ZLIBTESTSPEC=
2988
2989
2990 libsubdir=.libs
2991
2992 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
2993 echo "configure:2994: checking for garbage collector to use" >&5
2994 # Check whether --enable-java-gc or --disable-java-gc was given.
2995 if test "${enable_java_gc+set}" = set; then
2996 enableval="$enable_java_gc"
2997
2998 GC=$enableval
2999 else
3000 GC=boehm
3001 fi
3002
3003 GCLIBS=
3004 GCINCS=
3005 GCDEPS=
3006 GCOBJS=
3007 GCSPEC=
3008 GCTESTSPEC=
3009 case "$GC" in
3010 boehm)
3011 echo "$ac_t""boehm" 1>&6
3012 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
3013 # We include the path to the boehm-gc build directory.
3014 # See Makefile.am to understand why.
3015 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
3016 GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
3017 GCSPEC='-lgcjgc'
3018 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3019 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3020 GCOBJS=boehm.lo
3021 GCHDR=boehm-gc.h
3022 cat >> confdefs.h <<\EOF
3023 #define HAVE_BOEHM_GC 1
3024 EOF
3025
3026 ;;
3027 no)
3028 echo "$ac_t""none" 1>&6
3029 GCOBJS=nogc.lo
3030 GCHDR=no-gc.h
3031 ;;
3032 *)
3033 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3034 ;;
3035 esac
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
3046 echo "configure:3047: checking for threads package to use" >&5
3047 # Check whether --enable-threads or --disable-threads was given.
3048 if test "${enable_threads+set}" = set; then
3049 enableval="$enable_threads"
3050 THREADS=$enableval
3051 else
3052 THREADS=no
3053 fi
3054
3055
3056 if test "$THREADS" = yes; then
3057 case "$host" in
3058 *-*-vxworks*)
3059 THREADS=vxworks
3060 ;;
3061 *-*-linux*)
3062 # FIXME: this isn't correct in all cases.
3063 THREADS=posix
3064 ;;
3065 *-*-win*)
3066 THREADS=win32
3067 ;;
3068 *-*-irix*)
3069 # FIXME: for now, choose POSIX, because we implement that.
3070 # Later, choose irix threads.
3071 THREADS=posix
3072 ;;
3073 *-*-solaris*)
3074 # FIXME: for now, choose POSIX, because we implement that.
3075 # Later, choose solaris threads.
3076 THREADS=posix
3077 ;;
3078 *)
3079 # For now.
3080 THREADS=none
3081 ;;
3082 esac
3083 fi
3084
3085 case "$THREADS" in
3086 no | none | single)
3087 THREADS=none
3088 ;;
3089 posix | pthreads)
3090 THREADS=posix
3091 case "$host" in
3092 *-*-linux*)
3093 cat >> confdefs.h <<\EOF
3094 #define LINUX_THREADS 1
3095 EOF
3096
3097 ;;
3098 esac
3099 ;;
3100 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
3101 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3102 ;;
3103 *)
3104 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3105 ;;
3106 esac
3107 echo "$ac_t""$THREADS" 1>&6
3108
3109 THREADLIBS=
3110 THREADINCS=
3111 THREADDEPS=
3112 THREADOBJS=
3113 THREADH=
3114 THREADSPEC=
3115 case "$THREADS" in
3116 posix)
3117 THREADLIBS=-lpthread
3118 THREADSPEC=-lpthread
3119 THREADOBJS=posix-threads.lo
3120 THREADH=posix-threads.h
3121 # MIT pthreads doesn't seem to have the mutexattr functions.
3122 # But for now we don't check for it. We just assume you aren't
3123 # using MIT pthreads.
3124 cat >> confdefs.h <<\EOF
3125 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3126 EOF
3127
3128
3129 # If we're using the Boehm GC, then we happen to know that it
3130 # defines _REENTRANT, so we don't bother. Eww.
3131 if test "$GC" != boehm; then
3132 cat >> confdefs.h <<\EOF
3133 #define _REENTRANT 1
3134 EOF
3135
3136 fi
3137 cat >> confdefs.h <<\EOF
3138 #define _POSIX_PTHREAD_SEMANTICS 1
3139 EOF
3140
3141 ;;
3142
3143 none)
3144 THREADOBJS=no-threads.lo
3145 THREADH=no-threads.h
3146 ;;
3147 esac
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157 if test "$GCC" = yes; then
3158 USING_GCC_TRUE=
3159 USING_GCC_FALSE='#'
3160 else
3161 USING_GCC_TRUE='#'
3162 USING_GCC_FALSE=
3163 fi
3164
3165 CANADIAN=no
3166 NULL_TARGET=no
3167 NATIVE=yes
3168
3169 # Find eh-common.h and support headers. If we're in the tree with
3170 # gcc, then look there. Otherwise look in compat-include. If all else
3171 # fails, just hope the user has set things up somehow.
3172 if test -r $srcdir/../gcc/eh-common.h; then
3173 EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
3174 else
3175 if test -d $srcdir/../compat-include; then
3176 EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
3177 else
3178 EH_COMMON_INCLUDE=
3179 fi
3180 fi
3181
3182 if test -n "${with_cross_host}"; then
3183 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
3184 # may not work correctly, because the compiler may not be able to
3185 # link executables.
3186
3187 # We assume newlib. This lets us hard-code the functions we know
3188 # we'll have.
3189 cat >> confdefs.h <<\EOF
3190 #define HAVE_MEMMOVE 1
3191 EOF
3192
3193 cat >> confdefs.h <<\EOF
3194 #define HAVE_MEMCPY 1
3195 EOF
3196
3197 cat >> confdefs.h <<\EOF
3198 #define HAVE_STRERROR 1
3199 EOF
3200
3201 cat >> confdefs.h <<\EOF
3202 #define HAVE_GMTIME_R 1
3203 EOF
3204
3205 cat >> confdefs.h <<\EOF
3206 #define HAVE_LOCALTIME_R 1
3207 EOF
3208
3209 cat >> confdefs.h <<\EOF
3210 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3211 EOF
3212
3213 cat >> confdefs.h <<\EOF
3214 #define HAVE_ALLOCA 1
3215 EOF
3216
3217
3218 cat >> confdefs.h <<\EOF
3219 #define NO_GETUID 1
3220 EOF
3221
3222
3223 ZLIBSPEC=-lzgcj
3224 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
3225
3226 # If Canadian cross, then don't pick up tools from the build
3227 # directory.
3228 if test "$build" != "$with_cross_host"; then
3229 CANADIAN=yes
3230 EH_COMMON_INCLUDE=
3231 GCJ="${target_alias}-gcj"
3232 else
3233 GCJ=
3234 fi
3235 NATIVE=no
3236 else
3237 for ac_func in strerror ioctl select fstat open fsync sleep
3238 do
3239 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3240 echo "configure:3241: checking for $ac_func" >&5
3241 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3242 echo $ac_n "(cached) $ac_c" 1>&6
3243 else
3244 cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 /* System header to define __stub macros and hopefully few prototypes,
3248 which can conflict with char $ac_func(); below. */
3249 #include <assert.h>
3250 /* Override any gcc2 internal prototype to avoid an error. */
3251 /* We use char because int might match the return type of a gcc2
3252 builtin and then its argument prototype would still apply. */
3253 char $ac_func();
3254
3255 int main() {
3256
3257 /* The GNU C library defines this for functions which it implements
3258 to always fail with ENOSYS. Some functions are actually named
3259 something starting with __ and the normal name is an alias. */
3260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3261 choke me
3262 #else
3263 $ac_func();
3264 #endif
3265
3266 ; return 0; }
3267 EOF
3268 if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3269 rm -rf conftest*
3270 eval "ac_cv_func_$ac_func=yes"
3271 else
3272 echo "configure: failed program was:" >&5
3273 cat conftest.$ac_ext >&5
3274 rm -rf conftest*
3275 eval "ac_cv_func_$ac_func=no"
3276 fi
3277 rm -f conftest*
3278 fi
3279
3280 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3281 echo "$ac_t""yes" 1>&6
3282 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3283 cat >> confdefs.h <<EOF
3284 #define $ac_tr_func 1
3285 EOF
3286
3287 else
3288 echo "$ac_t""no" 1>&6
3289 fi
3290 done
3291
3292 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3293 do
3294 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3295 echo "configure:3296: checking for $ac_func" >&5
3296 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3297 echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299 cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302 /* System header to define __stub macros and hopefully few prototypes,
3303 which can conflict with char $ac_func(); below. */
3304 #include <assert.h>
3305 /* Override any gcc2 internal prototype to avoid an error. */
3306 /* We use char because int might match the return type of a gcc2
3307 builtin and then its argument prototype would still apply. */
3308 char $ac_func();
3309
3310 int main() {
3311
3312 /* The GNU C library defines this for functions which it implements
3313 to always fail with ENOSYS. Some functions are actually named
3314 something starting with __ and the normal name is an alias. */
3315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3316 choke me
3317 #else
3318 $ac_func();
3319 #endif
3320
3321 ; return 0; }
3322 EOF
3323 if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3324 rm -rf conftest*
3325 eval "ac_cv_func_$ac_func=yes"
3326 else
3327 echo "configure: failed program was:" >&5
3328 cat conftest.$ac_ext >&5
3329 rm -rf conftest*
3330 eval "ac_cv_func_$ac_func=no"
3331 fi
3332 rm -f conftest*
3333 fi
3334
3335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3336 echo "$ac_t""yes" 1>&6
3337 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3338 cat >> confdefs.h <<EOF
3339 #define $ac_tr_func 1
3340 EOF
3341
3342 else
3343 echo "$ac_t""no" 1>&6
3344 fi
3345 done
3346
3347 for ac_func in access stat mkdir rename rmdir unlink realpath
3348 do
3349 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3350 echo "configure:3351: checking for $ac_func" >&5
3351 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3352 echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354 cat > conftest.$ac_ext <<EOF
3355 #line 3356 "configure"
3356 #include "confdefs.h"
3357 /* System header to define __stub macros and hopefully few prototypes,
3358 which can conflict with char $ac_func(); below. */
3359 #include <assert.h>
3360 /* Override any gcc2 internal prototype to avoid an error. */
3361 /* We use char because int might match the return type of a gcc2
3362 builtin and then its argument prototype would still apply. */
3363 char $ac_func();
3364
3365 int main() {
3366
3367 /* The GNU C library defines this for functions which it implements
3368 to always fail with ENOSYS. Some functions are actually named
3369 something starting with __ and the normal name is an alias. */
3370 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3371 choke me
3372 #else
3373 $ac_func();
3374 #endif
3375
3376 ; return 0; }
3377 EOF
3378 if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3379 rm -rf conftest*
3380 eval "ac_cv_func_$ac_func=yes"
3381 else
3382 echo "configure: failed program was:" >&5
3383 cat conftest.$ac_ext >&5
3384 rm -rf conftest*
3385 eval "ac_cv_func_$ac_func=no"
3386 fi
3387 rm -f conftest*
3388 fi
3389
3390 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3391 echo "$ac_t""yes" 1>&6
3392 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3393 cat >> confdefs.h <<EOF
3394 #define $ac_tr_func 1
3395 EOF
3396
3397 else
3398 echo "$ac_t""no" 1>&6
3399 fi
3400 done
3401
3402 for ac_func in iconv nl_langinfo
3403 do
3404 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3405 echo "configure:3406: checking for $ac_func" >&5
3406 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3407 echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409 cat > conftest.$ac_ext <<EOF
3410 #line 3411 "configure"
3411 #include "confdefs.h"
3412 /* System header to define __stub macros and hopefully few prototypes,
3413 which can conflict with char $ac_func(); below. */
3414 #include <assert.h>
3415 /* Override any gcc2 internal prototype to avoid an error. */
3416 /* We use char because int might match the return type of a gcc2
3417 builtin and then its argument prototype would still apply. */
3418 char $ac_func();
3419
3420 int main() {
3421
3422 /* The GNU C library defines this for functions which it implements
3423 to always fail with ENOSYS. Some functions are actually named
3424 something starting with __ and the normal name is an alias. */
3425 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3426 choke me
3427 #else
3428 $ac_func();
3429 #endif
3430
3431 ; return 0; }
3432 EOF
3433 if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3434 rm -rf conftest*
3435 eval "ac_cv_func_$ac_func=yes"
3436 else
3437 echo "configure: failed program was:" >&5
3438 cat conftest.$ac_ext >&5
3439 rm -rf conftest*
3440 eval "ac_cv_func_$ac_func=no"
3441 fi
3442 rm -f conftest*
3443 fi
3444
3445 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3446 echo "$ac_t""yes" 1>&6
3447 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3448 cat >> confdefs.h <<EOF
3449 #define $ac_tr_func 1
3450 EOF
3451
3452 else
3453 echo "$ac_t""no" 1>&6
3454 fi
3455 done
3456
3457 for ac_func in inet_aton inet_addr
3458 do
3459 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $ac_func" >&5
3461 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3462 echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464 cat > conftest.$ac_ext <<EOF
3465 #line 3466 "configure"
3466 #include "confdefs.h"
3467 /* System header to define __stub macros and hopefully few prototypes,
3468 which can conflict with char $ac_func(); below. */
3469 #include <assert.h>
3470 /* Override any gcc2 internal prototype to avoid an error. */
3471 /* We use char because int might match the return type of a gcc2
3472 builtin and then its argument prototype would still apply. */
3473 char $ac_func();
3474
3475 int main() {
3476
3477 /* The GNU C library defines this for functions which it implements
3478 to always fail with ENOSYS. Some functions are actually named
3479 something starting with __ and the normal name is an alias. */
3480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3481 choke me
3482 #else
3483 $ac_func();
3484 #endif
3485
3486 ; return 0; }
3487 EOF
3488 if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3489 rm -rf conftest*
3490 eval "ac_cv_func_$ac_func=yes"
3491 else
3492 echo "configure: failed program was:" >&5
3493 cat conftest.$ac_ext >&5
3494 rm -rf conftest*
3495 eval "ac_cv_func_$ac_func=no"
3496 fi
3497 rm -f conftest*
3498 fi
3499
3500 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3501 echo "$ac_t""yes" 1>&6
3502 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3503 cat >> confdefs.h <<EOF
3504 #define $ac_tr_func 1
3505 EOF
3506 break
3507 else
3508 echo "$ac_t""no" 1>&6
3509 fi
3510 done
3511
3512 for ac_func in inet_pton uname inet_ntoa
3513 do
3514 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_func" >&5
3516 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3517 echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519 cat > conftest.$ac_ext <<EOF
3520 #line 3521 "configure"
3521 #include "confdefs.h"
3522 /* System header to define __stub macros and hopefully few prototypes,
3523 which can conflict with char $ac_func(); below. */
3524 #include <assert.h>
3525 /* Override any gcc2 internal prototype to avoid an error. */
3526 /* We use char because int might match the return type of a gcc2
3527 builtin and then its argument prototype would still apply. */
3528 char $ac_func();
3529
3530 int main() {
3531
3532 /* The GNU C library defines this for functions which it implements
3533 to always fail with ENOSYS. Some functions are actually named
3534 something starting with __ and the normal name is an alias. */
3535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3536 choke me
3537 #else
3538 $ac_func();
3539 #endif
3540
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3544 rm -rf conftest*
3545 eval "ac_cv_func_$ac_func=yes"
3546 else
3547 echo "configure: failed program was:" >&5
3548 cat conftest.$ac_ext >&5
3549 rm -rf conftest*
3550 eval "ac_cv_func_$ac_func=no"
3551 fi
3552 rm -f conftest*
3553 fi
3554
3555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3556 echo "$ac_t""yes" 1>&6
3557 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3558 cat >> confdefs.h <<EOF
3559 #define $ac_tr_func 1
3560 EOF
3561
3562 else
3563 echo "$ac_t""no" 1>&6
3564 fi
3565 done
3566
3567 for ac_func in backtrace fork execvp pipe
3568 do
3569 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3570 echo "configure:3571: checking for $ac_func" >&5
3571 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 /* System header to define __stub macros and hopefully few prototypes,
3578 which can conflict with char $ac_func(); below. */
3579 #include <assert.h>
3580 /* Override any gcc2 internal prototype to avoid an error. */
3581 /* We use char because int might match the return type of a gcc2
3582 builtin and then its argument prototype would still apply. */
3583 char $ac_func();
3584
3585 int main() {
3586
3587 /* The GNU C library defines this for functions which it implements
3588 to always fail with ENOSYS. Some functions are actually named
3589 something starting with __ and the normal name is an alias. */
3590 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3591 choke me
3592 #else
3593 $ac_func();
3594 #endif
3595
3596 ; return 0; }
3597 EOF
3598 if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3599 rm -rf conftest*
3600 eval "ac_cv_func_$ac_func=yes"
3601 else
3602 echo "configure: failed program was:" >&5
3603 cat conftest.$ac_ext >&5
3604 rm -rf conftest*
3605 eval "ac_cv_func_$ac_func=no"
3606 fi
3607 rm -f conftest*
3608 fi
3609
3610 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3611 echo "$ac_t""yes" 1>&6
3612 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3613 cat >> confdefs.h <<EOF
3614 #define $ac_tr_func 1
3615 EOF
3616
3617 else
3618 echo "$ac_t""no" 1>&6
3619 fi
3620 done
3621
3622 for ac_hdr in execinfo.h unistd.h dlfcn.h
3623 do
3624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3626 echo "configure:3627: checking for $ac_hdr" >&5
3627 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3628 echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 #include <$ac_hdr>
3634 EOF
3635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3636 { (eval echo configure:3637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3638 if test -z "$ac_err"; then
3639 rm -rf conftest*
3640 eval "ac_cv_header_$ac_safe=yes"
3641 else
3642 echo "$ac_err" >&5
3643 echo "configure: failed program was:" >&5
3644 cat conftest.$ac_ext >&5
3645 rm -rf conftest*
3646 eval "ac_cv_header_$ac_safe=no"
3647 fi
3648 rm -f conftest*
3649 fi
3650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3651 echo "$ac_t""yes" 1>&6
3652 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3653 cat >> confdefs.h <<EOF
3654 #define $ac_tr_hdr 1
3655 EOF
3656
3657 else
3658 echo "$ac_t""no" 1>&6
3659 fi
3660 done
3661
3662 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3663 echo "configure:3664: checking for dladdr in -ldl" >&5
3664 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3665 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668 ac_save_LIBS="$LIBS"
3669 LIBS="-ldl $LIBS"
3670 cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 /* Override any gcc2 internal prototype to avoid an error. */
3674 /* We use char because int might match the return type of a gcc2
3675 builtin and then its argument prototype would still apply. */
3676 char dladdr();
3677
3678 int main() {
3679 dladdr()
3680 ; return 0; }
3681 EOF
3682 if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3683 rm -rf conftest*
3684 eval "ac_cv_lib_$ac_lib_var=yes"
3685 else
3686 echo "configure: failed program was:" >&5
3687 cat conftest.$ac_ext >&5
3688 rm -rf conftest*
3689 eval "ac_cv_lib_$ac_lib_var=no"
3690 fi
3691 rm -f conftest*
3692 LIBS="$ac_save_LIBS"
3693
3694 fi
3695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3696 echo "$ac_t""yes" 1>&6
3697
3698 cat >> confdefs.h <<\EOF
3699 #define HAVE_DLADDR 1
3700 EOF
3701
3702 else
3703 echo "$ac_t""no" 1>&6
3704 fi
3705
3706 for ac_file in /proc/self/exe
3707 do
3708
3709 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3710 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3711 echo "configure:3712: checking for $ac_file" >&5
3712 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3713 echo $ac_n "(cached) $ac_c" 1>&6
3714 else
3715 if test "$cross_compiling" = yes; then
3716 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3717 else
3718 if test -r $ac_file; then
3719 eval "ac_cv_file_$ac_safe=yes"
3720 else
3721 eval "ac_cv_file_$ac_safe=no"
3722 fi
3723 fi
3724 fi
3725 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3726 echo "$ac_t""yes" 1>&6
3727 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3728 cat >> confdefs.h <<EOF
3729 #define $ac_tr_file 1
3730 EOF
3731
3732 cat >> confdefs.h <<\EOF
3733 #define HAVE_PROC_SELF_EXE 1
3734 EOF
3735
3736 else
3737 echo "$ac_t""no" 1>&6
3738
3739 fi
3740 done
3741
3742
3743 for ac_func in gethostbyname_r
3744 do
3745 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3746 echo "configure:3747: checking for $ac_func" >&5
3747 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3748 echo $ac_n "(cached) $ac_c" 1>&6
3749 else
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 /* System header to define __stub macros and hopefully few prototypes,
3754 which can conflict with char $ac_func(); below. */
3755 #include <assert.h>
3756 /* Override any gcc2 internal prototype to avoid an error. */
3757 /* We use char because int might match the return type of a gcc2
3758 builtin and then its argument prototype would still apply. */
3759 char $ac_func();
3760
3761 int main() {
3762
3763 /* The GNU C library defines this for functions which it implements
3764 to always fail with ENOSYS. Some functions are actually named
3765 something starting with __ and the normal name is an alias. */
3766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3767 choke me
3768 #else
3769 $ac_func();
3770 #endif
3771
3772 ; return 0; }
3773 EOF
3774 if { (eval echo configure:3775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3775 rm -rf conftest*
3776 eval "ac_cv_func_$ac_func=yes"
3777 else
3778 echo "configure: failed program was:" >&5
3779 cat conftest.$ac_ext >&5
3780 rm -rf conftest*
3781 eval "ac_cv_func_$ac_func=no"
3782 fi
3783 rm -f conftest*
3784 fi
3785
3786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3787 echo "$ac_t""yes" 1>&6
3788 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3789 cat >> confdefs.h <<EOF
3790 #define $ac_tr_func 1
3791 EOF
3792
3793 cat >> confdefs.h <<\EOF
3794 #define HAVE_GETHOSTBYNAME_R 1
3795 EOF
3796
3797 # There are two different kinds of gethostbyname_r.
3798 # We look for the one that returns `int'.
3799 # Hopefully this check is robust enough.
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 #include <netdb.h>
3804 EOF
3805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3806 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
3807 rm -rf conftest*
3808
3809 cat >> confdefs.h <<\EOF
3810 #define GETHOSTBYNAME_R_RETURNS_INT 1
3811 EOF
3812
3813 fi
3814 rm -f conftest*
3815
3816
3817 case " $GCINCS " in
3818 *" -D_REENTRANT "*) ;;
3819 *)
3820 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
3821 echo "configure:3822: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
3822 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
3823 echo $ac_n "(cached) $ac_c" 1>&6
3824 else
3825
3826 ac_ext=C
3827 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3828 ac_cpp='$CXXCPP $CPPFLAGS'
3829 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3830 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3831 cross_compiling=$ac_cv_prog_cxx_cross
3832
3833 cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <netdb.h>
3837 int main() {
3838 gethostbyname_r("", 0, 0);
3839 ; return 0; }
3840 EOF
3841 if { (eval echo configure:3842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3842 rm -rf conftest*
3843 libjava_cv_gethostbyname_r_needs_reentrant=no
3844 else
3845 echo "configure: failed program was:" >&5
3846 cat conftest.$ac_ext >&5
3847 rm -rf conftest*
3848 CPPFLAGS_SAVE="$CPPFLAGS"
3849 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 #include <netdb.h>
3854 int main() {
3855 gethostbyname_r("", 0, 0);
3856 ; return 0; }
3857 EOF
3858 if { (eval echo configure:3859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3859 rm -rf conftest*
3860 libjava_cv_gethostbyname_r_needs_reentrant=yes
3861 else
3862 echo "configure: failed program was:" >&5
3863 cat conftest.$ac_ext >&5
3864 rm -rf conftest*
3865 libjava_cv_gethostbyname_r_needs_reentrant=fail
3866 fi
3867 rm -f conftest*
3868 CPPFLAGS="$CPPFLAGS_SAVE"
3869
3870 fi
3871 rm -f conftest*
3872 ac_ext=c
3873 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3874 ac_cpp='$CPP $CPPFLAGS'
3875 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3876 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3877 cross_compiling=$ac_cv_prog_cc_cross
3878
3879
3880 fi
3881
3882 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
3883 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
3884 cat >> confdefs.h <<\EOF
3885 #define _REENTRANT 1
3886 EOF
3887
3888 fi
3889 ;;
3890 esac
3891
3892 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
3893 echo "configure:3894: checking for struct hostent_data" >&5
3894 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
3895 echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900
3901 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
3902 # define _REENTRANT 1
3903 #endif
3904 #include <netdb.h>
3905 int main() {
3906 struct hostent_data data;
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3910 rm -rf conftest*
3911 libjava_cv_struct_hostent_data=yes
3912 else
3913 echo "configure: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3915 rm -rf conftest*
3916 libjava_cv_struct_hostent_data=no
3917 fi
3918 rm -f conftest*
3919 fi
3920
3921 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
3922 if test "x$libjava_cv_struct_hostent_data" = xyes; then
3923 cat >> confdefs.h <<\EOF
3924 #define HAVE_STRUCT_HOSTENT_DATA 1
3925 EOF
3926
3927 fi
3928
3929 else
3930 echo "$ac_t""no" 1>&6
3931 fi
3932 done
3933
3934
3935 for ac_func in gethostbyaddr_r
3936 do
3937 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3938 echo "configure:3939: checking for $ac_func" >&5
3939 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3940 echo $ac_n "(cached) $ac_c" 1>&6
3941 else
3942 cat > conftest.$ac_ext <<EOF
3943 #line 3944 "configure"
3944 #include "confdefs.h"
3945 /* System header to define __stub macros and hopefully few prototypes,
3946 which can conflict with char $ac_func(); below. */
3947 #include <assert.h>
3948 /* Override any gcc2 internal prototype to avoid an error. */
3949 /* We use char because int might match the return type of a gcc2
3950 builtin and then its argument prototype would still apply. */
3951 char $ac_func();
3952
3953 int main() {
3954
3955 /* The GNU C library defines this for functions which it implements
3956 to always fail with ENOSYS. Some functions are actually named
3957 something starting with __ and the normal name is an alias. */
3958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3959 choke me
3960 #else
3961 $ac_func();
3962 #endif
3963
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3967 rm -rf conftest*
3968 eval "ac_cv_func_$ac_func=yes"
3969 else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 rm -rf conftest*
3973 eval "ac_cv_func_$ac_func=no"
3974 fi
3975 rm -f conftest*
3976 fi
3977
3978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3979 echo "$ac_t""yes" 1>&6
3980 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3981 cat >> confdefs.h <<EOF
3982 #define $ac_tr_func 1
3983 EOF
3984
3985 cat >> confdefs.h <<\EOF
3986 #define HAVE_GETHOSTBYADDR_R 1
3987 EOF
3988
3989 # There are two different kinds of gethostbyaddr_r.
3990 # We look for the one that returns `int'.
3991 # Hopefully this check is robust enough.
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 #include <netdb.h>
3996 EOF
3997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3998 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
3999 rm -rf conftest*
4000
4001 cat >> confdefs.h <<\EOF
4002 #define GETHOSTBYADDR_R_RETURNS_INT 1
4003 EOF
4004
4005 fi
4006 rm -f conftest*
4007
4008 else
4009 echo "$ac_t""no" 1>&6
4010 fi
4011 done
4012
4013
4014 for ac_func in gethostname
4015 do
4016 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4017 echo "configure:4018: checking for $ac_func" >&5
4018 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4019 echo $ac_n "(cached) $ac_c" 1>&6
4020 else
4021 cat > conftest.$ac_ext <<EOF
4022 #line 4023 "configure"
4023 #include "confdefs.h"
4024 /* System header to define __stub macros and hopefully few prototypes,
4025 which can conflict with char $ac_func(); below. */
4026 #include <assert.h>
4027 /* Override any gcc2 internal prototype to avoid an error. */
4028 /* We use char because int might match the return type of a gcc2
4029 builtin and then its argument prototype would still apply. */
4030 char $ac_func();
4031
4032 int main() {
4033
4034 /* The GNU C library defines this for functions which it implements
4035 to always fail with ENOSYS. Some functions are actually named
4036 something starting with __ and the normal name is an alias. */
4037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4038 choke me
4039 #else
4040 $ac_func();
4041 #endif
4042
4043 ; return 0; }
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4046 rm -rf conftest*
4047 eval "ac_cv_func_$ac_func=yes"
4048 else
4049 echo "configure: failed program was:" >&5
4050 cat conftest.$ac_ext >&5
4051 rm -rf conftest*
4052 eval "ac_cv_func_$ac_func=no"
4053 fi
4054 rm -f conftest*
4055 fi
4056
4057 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4058 echo "$ac_t""yes" 1>&6
4059 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4060 cat >> confdefs.h <<EOF
4061 #define $ac_tr_func 1
4062 EOF
4063
4064 cat >> confdefs.h <<\EOF
4065 #define HAVE_GETHOSTNAME 1
4066 EOF
4067
4068 cat > conftest.$ac_ext <<EOF
4069 #line 4070 "configure"
4070 #include "confdefs.h"
4071 #include <unistd.h>
4072 EOF
4073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4074 egrep "gethostname" >/dev/null 2>&1; then
4075 rm -rf conftest*
4076
4077 cat >> confdefs.h <<\EOF
4078 #define HAVE_GETHOSTNAME_DECL 1
4079 EOF
4080
4081 fi
4082 rm -f conftest*
4083
4084 else
4085 echo "$ac_t""no" 1>&6
4086 fi
4087 done
4088
4089
4090 # Look for these functions in the thread library, but only bother
4091 # if using POSIX threads.
4092 if test "$THREADS" = posix; then
4093 save_LIBS="$LIBS"
4094 LIBS="$LIBS $THREADLIBS"
4095 # Some POSIX thread systems don't have pthread_mutexattr_settype.
4096 # E.g., Solaris.
4097 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4098 do
4099 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4100 echo "configure:4101: checking for $ac_func" >&5
4101 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4102 echo $ac_n "(cached) $ac_c" 1>&6
4103 else
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 /* System header to define __stub macros and hopefully few prototypes,
4108 which can conflict with char $ac_func(); below. */
4109 #include <assert.h>
4110 /* Override any gcc2 internal prototype to avoid an error. */
4111 /* We use char because int might match the return type of a gcc2
4112 builtin and then its argument prototype would still apply. */
4113 char $ac_func();
4114
4115 int main() {
4116
4117 /* The GNU C library defines this for functions which it implements
4118 to always fail with ENOSYS. Some functions are actually named
4119 something starting with __ and the normal name is an alias. */
4120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4121 choke me
4122 #else
4123 $ac_func();
4124 #endif
4125
4126 ; return 0; }
4127 EOF
4128 if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4129 rm -rf conftest*
4130 eval "ac_cv_func_$ac_func=yes"
4131 else
4132 echo "configure: failed program was:" >&5
4133 cat conftest.$ac_ext >&5
4134 rm -rf conftest*
4135 eval "ac_cv_func_$ac_func=no"
4136 fi
4137 rm -f conftest*
4138 fi
4139
4140 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4141 echo "$ac_t""yes" 1>&6
4142 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4143 cat >> confdefs.h <<EOF
4144 #define $ac_tr_func 1
4145 EOF
4146
4147 else
4148 echo "$ac_t""no" 1>&6
4149 fi
4150 done
4151
4152
4153 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
4154 # Solaris 7 the name librt is preferred.
4155 for ac_func in sched_yield
4156 do
4157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4158 echo "configure:4159: checking for $ac_func" >&5
4159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4160 echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162 cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 /* System header to define __stub macros and hopefully few prototypes,
4166 which can conflict with char $ac_func(); below. */
4167 #include <assert.h>
4168 /* Override any gcc2 internal prototype to avoid an error. */
4169 /* We use char because int might match the return type of a gcc2
4170 builtin and then its argument prototype would still apply. */
4171 char $ac_func();
4172
4173 int main() {
4174
4175 /* The GNU C library defines this for functions which it implements
4176 to always fail with ENOSYS. Some functions are actually named
4177 something starting with __ and the normal name is an alias. */
4178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4179 choke me
4180 #else
4181 $ac_func();
4182 #endif
4183
4184 ; return 0; }
4185 EOF
4186 if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4187 rm -rf conftest*
4188 eval "ac_cv_func_$ac_func=yes"
4189 else
4190 echo "configure: failed program was:" >&5
4191 cat conftest.$ac_ext >&5
4192 rm -rf conftest*
4193 eval "ac_cv_func_$ac_func=no"
4194 fi
4195 rm -f conftest*
4196 fi
4197
4198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4199 echo "$ac_t""yes" 1>&6
4200 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4201 cat >> confdefs.h <<EOF
4202 #define $ac_tr_func 1
4203 EOF
4204
4205 else
4206 echo "$ac_t""no" 1>&6
4207 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4208 echo "configure:4209: checking for sched_yield in -lrt" >&5
4209 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4211 echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213 ac_save_LIBS="$LIBS"
4214 LIBS="-lrt $LIBS"
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 /* Override any gcc2 internal prototype to avoid an error. */
4219 /* We use char because int might match the return type of a gcc2
4220 builtin and then its argument prototype would still apply. */
4221 char sched_yield();
4222
4223 int main() {
4224 sched_yield()
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4228 rm -rf conftest*
4229 eval "ac_cv_lib_$ac_lib_var=yes"
4230 else
4231 echo "configure: failed program was:" >&5
4232 cat conftest.$ac_ext >&5
4233 rm -rf conftest*
4234 eval "ac_cv_lib_$ac_lib_var=no"
4235 fi
4236 rm -f conftest*
4237 LIBS="$ac_save_LIBS"
4238
4239 fi
4240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4241 echo "$ac_t""yes" 1>&6
4242
4243 cat >> confdefs.h <<\EOF
4244 #define HAVE_SCHED_YIELD 1
4245 EOF
4246
4247 THREADLIBS="$THREADLIBS -lrt"
4248 THREADSPEC="$THREADSPEC -lrt"
4249 else
4250 echo "$ac_t""no" 1>&6
4251
4252 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4253 echo "configure:4254: checking for sched_yield in -lposix4" >&5
4254 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4255 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4256 echo $ac_n "(cached) $ac_c" 1>&6
4257 else
4258 ac_save_LIBS="$LIBS"
4259 LIBS="-lposix4 $LIBS"
4260 cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 /* Override any gcc2 internal prototype to avoid an error. */
4264 /* We use char because int might match the return type of a gcc2
4265 builtin and then its argument prototype would still apply. */
4266 char sched_yield();
4267
4268 int main() {
4269 sched_yield()
4270 ; return 0; }
4271 EOF
4272 if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4273 rm -rf conftest*
4274 eval "ac_cv_lib_$ac_lib_var=yes"
4275 else
4276 echo "configure: failed program was:" >&5
4277 cat conftest.$ac_ext >&5
4278 rm -rf conftest*
4279 eval "ac_cv_lib_$ac_lib_var=no"
4280 fi
4281 rm -f conftest*
4282 LIBS="$ac_save_LIBS"
4283
4284 fi
4285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4286 echo "$ac_t""yes" 1>&6
4287
4288 cat >> confdefs.h <<\EOF
4289 #define HAVE_SCHED_YIELD 1
4290 EOF
4291
4292 THREADLIBS="$THREADLIBS -lposix4"
4293 THREADSPEC="$THREADSPEC -lposix4"
4294 else
4295 echo "$ac_t""no" 1>&6
4296 fi
4297
4298 fi
4299
4300 fi
4301 done
4302
4303 LIBS="$save_LIBS"
4304
4305 # We can save a little space at runtime if the mutex has m_count
4306 # or __m_count. This is a nice hack for Linux.
4307 cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4310 #include <pthread.h>
4311 int main() {
4312
4313 extern pthread_mutex_t *mutex; int q = mutex->m_count;
4314
4315 ; return 0; }
4316 EOF
4317 if { (eval echo configure:4318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4318 rm -rf conftest*
4319 cat >> confdefs.h <<\EOF
4320 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4321 EOF
4322
4323 else
4324 echo "configure: failed program was:" >&5
4325 cat conftest.$ac_ext >&5
4326 rm -rf conftest*
4327
4328 cat > conftest.$ac_ext <<EOF
4329 #line 4330 "configure"
4330 #include "confdefs.h"
4331 #include <pthread.h>
4332 int main() {
4333
4334 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4335
4336 ; return 0; }
4337 EOF
4338 if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4339 rm -rf conftest*
4340 cat >> confdefs.h <<\EOF
4341 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4342 EOF
4343
4344 else
4345 echo "configure: failed program was:" >&5
4346 cat conftest.$ac_ext >&5
4347 fi
4348 rm -f conftest*
4349 fi
4350 rm -f conftest*
4351 fi
4352
4353 # We require a way to get the time.
4354 time_found=no
4355 for ac_func in gettimeofday time ftime
4356 do
4357 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4358 echo "configure:4359: checking for $ac_func" >&5
4359 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4360 echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362 cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 /* System header to define __stub macros and hopefully few prototypes,
4366 which can conflict with char $ac_func(); below. */
4367 #include <assert.h>
4368 /* Override any gcc2 internal prototype to avoid an error. */
4369 /* We use char because int might match the return type of a gcc2
4370 builtin and then its argument prototype would still apply. */
4371 char $ac_func();
4372
4373 int main() {
4374
4375 /* The GNU C library defines this for functions which it implements
4376 to always fail with ENOSYS. Some functions are actually named
4377 something starting with __ and the normal name is an alias. */
4378 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4379 choke me
4380 #else
4381 $ac_func();
4382 #endif
4383
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4387 rm -rf conftest*
4388 eval "ac_cv_func_$ac_func=yes"
4389 else
4390 echo "configure: failed program was:" >&5
4391 cat conftest.$ac_ext >&5
4392 rm -rf conftest*
4393 eval "ac_cv_func_$ac_func=no"
4394 fi
4395 rm -f conftest*
4396 fi
4397
4398 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4399 echo "$ac_t""yes" 1>&6
4400 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4401 cat >> confdefs.h <<EOF
4402 #define $ac_tr_func 1
4403 EOF
4404 time_found=yes
4405 else
4406 echo "$ac_t""no" 1>&6
4407 fi
4408 done
4409
4410 if test "$time_found" = no; then
4411 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4412 fi
4413
4414 for ac_func in memmove
4415 do
4416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4417 echo "configure:4418: checking for $ac_func" >&5
4418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4419 echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421 cat > conftest.$ac_ext <<EOF
4422 #line 4423 "configure"
4423 #include "confdefs.h"
4424 /* System header to define __stub macros and hopefully few prototypes,
4425 which can conflict with char $ac_func(); below. */
4426 #include <assert.h>
4427 /* Override any gcc2 internal prototype to avoid an error. */
4428 /* We use char because int might match the return type of a gcc2
4429 builtin and then its argument prototype would still apply. */
4430 char $ac_func();
4431
4432 int main() {
4433
4434 /* The GNU C library defines this for functions which it implements
4435 to always fail with ENOSYS. Some functions are actually named
4436 something starting with __ and the normal name is an alias. */
4437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4438 choke me
4439 #else
4440 $ac_func();
4441 #endif
4442
4443 ; return 0; }
4444 EOF
4445 if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4446 rm -rf conftest*
4447 eval "ac_cv_func_$ac_func=yes"
4448 else
4449 echo "configure: failed program was:" >&5
4450 cat conftest.$ac_ext >&5
4451 rm -rf conftest*
4452 eval "ac_cv_func_$ac_func=no"
4453 fi
4454 rm -f conftest*
4455 fi
4456
4457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4458 echo "$ac_t""yes" 1>&6
4459 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4460 cat >> confdefs.h <<EOF
4461 #define $ac_tr_func 1
4462 EOF
4463
4464 else
4465 echo "$ac_t""no" 1>&6
4466 fi
4467 done
4468
4469
4470 # We require memcpy.
4471 memcpy_found=no
4472 for ac_func in memcpy
4473 do
4474 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4475 echo "configure:4476: checking for $ac_func" >&5
4476 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4477 echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479 cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4482 /* System header to define __stub macros and hopefully few prototypes,
4483 which can conflict with char $ac_func(); below. */
4484 #include <assert.h>
4485 /* Override any gcc2 internal prototype to avoid an error. */
4486 /* We use char because int might match the return type of a gcc2
4487 builtin and then its argument prototype would still apply. */
4488 char $ac_func();
4489
4490 int main() {
4491
4492 /* The GNU C library defines this for functions which it implements
4493 to always fail with ENOSYS. Some functions are actually named
4494 something starting with __ and the normal name is an alias. */
4495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4496 choke me
4497 #else
4498 $ac_func();
4499 #endif
4500
4501 ; return 0; }
4502 EOF
4503 if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4504 rm -rf conftest*
4505 eval "ac_cv_func_$ac_func=yes"
4506 else
4507 echo "configure: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 rm -rf conftest*
4510 eval "ac_cv_func_$ac_func=no"
4511 fi
4512 rm -f conftest*
4513 fi
4514
4515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4516 echo "$ac_t""yes" 1>&6
4517 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4518 cat >> confdefs.h <<EOF
4519 #define $ac_tr_func 1
4520 EOF
4521 memcpy_found=yes
4522 else
4523 echo "$ac_t""no" 1>&6
4524 fi
4525 done
4526
4527 if test "$memcpy_found" = no; then
4528 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4529 fi
4530
4531 # Some library-finding code we stole from Tcl.
4532 #--------------------------------------------------------------------
4533 # Check for the existence of the -lsocket and -lnsl libraries.
4534 # The order here is important, so that they end up in the right
4535 # order in the command line generated by make. Here are some
4536 # special considerations:
4537 # 1. Use "connect" and "accept" to check for -lsocket, and
4538 # "gethostbyname" to check for -lnsl.
4539 # 2. Use each function name only once: can't redo a check because
4540 # autoconf caches the results of the last check and won't redo it.
4541 # 3. Use -lnsl and -lsocket only if they supply procedures that
4542 # aren't already present in the normal libraries. This is because
4543 # IRIX 5.2 has libraries, but they aren't needed and they're
4544 # bogus: they goof up name resolution if used.
4545 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4546 # To get around this problem, check for both libraries together
4547 # if -lsocket doesn't work by itself.
4548 #--------------------------------------------------------------------
4549
4550 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4551 echo "configure:4552: checking for socket libraries" >&5
4552 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4553 echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555 gcj_cv_lib_sockets=
4556 gcj_checkBoth=0
4557 unset ac_cv_func_connect
4558 echo $ac_n "checking for connect""... $ac_c" 1>&6
4559 echo "configure:4560: checking for connect" >&5
4560 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4561 echo $ac_n "(cached) $ac_c" 1>&6
4562 else
4563 cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 /* System header to define __stub macros and hopefully few prototypes,
4567 which can conflict with char connect(); below. */
4568 #include <assert.h>
4569 /* Override any gcc2 internal prototype to avoid an error. */
4570 /* We use char because int might match the return type of a gcc2
4571 builtin and then its argument prototype would still apply. */
4572 char connect();
4573
4574 int main() {
4575
4576 /* The GNU C library defines this for functions which it implements
4577 to always fail with ENOSYS. Some functions are actually named
4578 something starting with __ and the normal name is an alias. */
4579 #if defined (__stub_connect) || defined (__stub___connect)
4580 choke me
4581 #else
4582 connect();
4583 #endif
4584
4585 ; return 0; }
4586 EOF
4587 if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4588 rm -rf conftest*
4589 eval "ac_cv_func_connect=yes"
4590 else
4591 echo "configure: failed program was:" >&5
4592 cat conftest.$ac_ext >&5
4593 rm -rf conftest*
4594 eval "ac_cv_func_connect=no"
4595 fi
4596 rm -f conftest*
4597 fi
4598
4599 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4600 echo "$ac_t""yes" 1>&6
4601 gcj_checkSocket=0
4602 else
4603 echo "$ac_t""no" 1>&6
4604 gcj_checkSocket=1
4605 fi
4606
4607 if test "$gcj_checkSocket" = 1; then
4608 unset ac_cv_func_connect
4609 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4610 echo "configure:4611: checking for main in -lsocket" >&5
4611 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4612 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4613 echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615 ac_save_LIBS="$LIBS"
4616 LIBS="-lsocket $LIBS"
4617 cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620
4621 int main() {
4622 main()
4623 ; return 0; }
4624 EOF
4625 if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4626 rm -rf conftest*
4627 eval "ac_cv_lib_$ac_lib_var=yes"
4628 else
4629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
4631 rm -rf conftest*
4632 eval "ac_cv_lib_$ac_lib_var=no"
4633 fi
4634 rm -f conftest*
4635 LIBS="$ac_save_LIBS"
4636
4637 fi
4638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4639 echo "$ac_t""yes" 1>&6
4640 gcj_cv_lib_sockets="-lsocket"
4641 else
4642 echo "$ac_t""no" 1>&6
4643 gcj_checkBoth=1
4644 fi
4645
4646 fi
4647 if test "$gcj_checkBoth" = 1; then
4648 gcj_oldLibs=$LIBS
4649 LIBS="$LIBS -lsocket -lnsl"
4650 unset ac_cv_func_accept
4651 echo $ac_n "checking for accept""... $ac_c" 1>&6
4652 echo "configure:4653: checking for accept" >&5
4653 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4654 echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656 cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 /* System header to define __stub macros and hopefully few prototypes,
4660 which can conflict with char accept(); below. */
4661 #include <assert.h>
4662 /* Override any gcc2 internal prototype to avoid an error. */
4663 /* We use char because int might match the return type of a gcc2
4664 builtin and then its argument prototype would still apply. */
4665 char accept();
4666
4667 int main() {
4668
4669 /* The GNU C library defines this for functions which it implements
4670 to always fail with ENOSYS. Some functions are actually named
4671 something starting with __ and the normal name is an alias. */
4672 #if defined (__stub_accept) || defined (__stub___accept)
4673 choke me
4674 #else
4675 accept();
4676 #endif
4677
4678 ; return 0; }
4679 EOF
4680 if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4681 rm -rf conftest*
4682 eval "ac_cv_func_accept=yes"
4683 else
4684 echo "configure: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
4686 rm -rf conftest*
4687 eval "ac_cv_func_accept=no"
4688 fi
4689 rm -f conftest*
4690 fi
4691
4692 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4693 echo "$ac_t""yes" 1>&6
4694 gcj_checkNsl=0
4695 gcj_cv_lib_sockets="-lsocket -lnsl"
4696 else
4697 echo "$ac_t""no" 1>&6
4698 fi
4699
4700 unset ac_cv_func_accept
4701 LIBS=$gcj_oldLibs
4702 fi
4703 unset ac_cv_func_gethostbyname
4704 gcj_oldLibs=$LIBS
4705 LIBS="$LIBS $gcj_cv_lib_sockets"
4706 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4707 echo "configure:4708: checking for gethostbyname" >&5
4708 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4709 echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711 cat > conftest.$ac_ext <<EOF
4712 #line 4713 "configure"
4713 #include "confdefs.h"
4714 /* System header to define __stub macros and hopefully few prototypes,
4715 which can conflict with char gethostbyname(); below. */
4716 #include <assert.h>
4717 /* Override any gcc2 internal prototype to avoid an error. */
4718 /* We use char because int might match the return type of a gcc2
4719 builtin and then its argument prototype would still apply. */
4720 char gethostbyname();
4721
4722 int main() {
4723
4724 /* The GNU C library defines this for functions which it implements
4725 to always fail with ENOSYS. Some functions are actually named
4726 something starting with __ and the normal name is an alias. */
4727 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4728 choke me
4729 #else
4730 gethostbyname();
4731 #endif
4732
4733 ; return 0; }
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736 rm -rf conftest*
4737 eval "ac_cv_func_gethostbyname=yes"
4738 else
4739 echo "configure: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4741 rm -rf conftest*
4742 eval "ac_cv_func_gethostbyname=no"
4743 fi
4744 rm -f conftest*
4745 fi
4746
4747 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4748 echo "$ac_t""yes" 1>&6
4749 :
4750 else
4751 echo "$ac_t""no" 1>&6
4752 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4753 echo "configure:4754: checking for main in -lnsl" >&5
4754 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4756 echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758 ac_save_LIBS="$LIBS"
4759 LIBS="-lnsl $LIBS"
4760 cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4763
4764 int main() {
4765 main()
4766 ; return 0; }
4767 EOF
4768 if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4769 rm -rf conftest*
4770 eval "ac_cv_lib_$ac_lib_var=yes"
4771 else
4772 echo "configure: failed program was:" >&5
4773 cat conftest.$ac_ext >&5
4774 rm -rf conftest*
4775 eval "ac_cv_lib_$ac_lib_var=no"
4776 fi
4777 rm -f conftest*
4778 LIBS="$ac_save_LIBS"
4779
4780 fi
4781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4782 echo "$ac_t""yes" 1>&6
4783 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4784 else
4785 echo "$ac_t""no" 1>&6
4786 fi
4787
4788 fi
4789
4790 unset ac_cv_func_gethostbyname
4791 LIBS=$gcj_oldLIBS
4792
4793 fi
4794
4795 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4796 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4797
4798 if test "$with_system_zlib" = yes; then
4799 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
4800 echo "configure:4801: checking for deflate in -lz" >&5
4801 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4803 echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805 ac_save_LIBS="$LIBS"
4806 LIBS="-lz $LIBS"
4807 cat > conftest.$ac_ext <<EOF
4808 #line 4809 "configure"
4809 #include "confdefs.h"
4810 /* Override any gcc2 internal prototype to avoid an error. */
4811 /* We use char because int might match the return type of a gcc2
4812 builtin and then its argument prototype would still apply. */
4813 char deflate();
4814
4815 int main() {
4816 deflate()
4817 ; return 0; }
4818 EOF
4819 if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820 rm -rf conftest*
4821 eval "ac_cv_lib_$ac_lib_var=yes"
4822 else
4823 echo "configure: failed program was:" >&5
4824 cat conftest.$ac_ext >&5
4825 rm -rf conftest*
4826 eval "ac_cv_lib_$ac_lib_var=no"
4827 fi
4828 rm -f conftest*
4829 LIBS="$ac_save_LIBS"
4830
4831 fi
4832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4833 echo "$ac_t""yes" 1>&6
4834 ZLIBSPEC=-lz
4835 else
4836 echo "$ac_t""no" 1>&6
4837 ZLIBSPEC=-lzgcj
4838 fi
4839
4840 else
4841 ZLIBSPEC=-lzgcj
4842 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
4843 fi
4844
4845 # On Solaris, and maybe other architectures, the Boehm collector
4846 # requires -ldl.
4847 if test "$GC" = boehm; then
4848 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
4849 echo "configure:4850: checking for main in -ldl" >&5
4850 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
4851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4852 echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854 ac_save_LIBS="$LIBS"
4855 LIBS="-ldl $LIBS"
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859
4860 int main() {
4861 main()
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865 rm -rf conftest*
4866 eval "ac_cv_lib_$ac_lib_var=yes"
4867 else
4868 echo "configure: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4870 rm -rf conftest*
4871 eval "ac_cv_lib_$ac_lib_var=no"
4872 fi
4873 rm -f conftest*
4874 LIBS="$ac_save_LIBS"
4875
4876 fi
4877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4878 echo "$ac_t""yes" 1>&6
4879 SYSTEMSPEC="$SYSTEMSPEC -ldl"
4880 else
4881 echo "$ac_t""no" 1>&6
4882 fi
4883
4884 fi
4885
4886 if test -d "$libgcj_basedir/../gcc/java"; then
4887 GCJ=
4888 else
4889 CANADIAN=yes
4890 NULL_TARGET=yes
4891 GCJ=gcj
4892 fi
4893 fi
4894
4895 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4896 echo "configure:4897: checking size of void *" >&5
4897 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
4898 echo $ac_n "(cached) $ac_c" 1>&6
4899 else
4900 if test "$cross_compiling" = yes; then
4901 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4902 else
4903 cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 #include <stdio.h>
4907 main()
4908 {
4909 FILE *f=fopen("conftestval", "w");
4910 if (!f) exit(1);
4911 fprintf(f, "%d\n", sizeof(void *));
4912 exit(0);
4913 }
4914 EOF
4915 if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4916 then
4917 ac_cv_sizeof_void_p=`cat conftestval`
4918 else
4919 echo "configure: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 rm -fr conftest*
4922 ac_cv_sizeof_void_p=0
4923 fi
4924 rm -fr conftest*
4925 fi
4926
4927 fi
4928 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4929 cat >> confdefs.h <<EOF
4930 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4931 EOF
4932
4933
4934
4935 ZLIBS=
4936 ZDEPS=
4937 ZINCS=
4938 if test "x$ZLIBSPEC" = "x-lzgcj"; then
4939 # We include the path to the zlib build directory.
4940 # See Makefile.am to understand why.
4941 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
4942 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
4943 ZINCS='-I$(top_srcdir)/../zlib'
4944 else
4945 ZLIBS="$ZLIBSPEC"
4946 fi
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956 if test "$CANADIAN" = yes; then
4957 CANADIAN_TRUE=
4958 CANADIAN_FALSE='#'
4959 else
4960 CANADIAN_TRUE='#'
4961 CANADIAN_FALSE=
4962 fi
4963
4964
4965 if test "$NULL_TARGET" = yes; then
4966 NULL_TARGET_TRUE=
4967 NULL_TARGET_FALSE='#'
4968 else
4969 NULL_TARGET_TRUE='#'
4970 NULL_TARGET_FALSE=
4971 fi
4972
4973
4974 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
4975 NATIVE_TRUE=
4976 NATIVE_FALSE='#'
4977 else
4978 NATIVE_TRUE='#'
4979 NATIVE_FALSE=
4980 fi
4981
4982
4983 if test -z "$with_cross_host"; then
4984 USE_LIBDIR_TRUE=
4985 USE_LIBDIR_FALSE='#'
4986 else
4987 USE_LIBDIR_TRUE='#'
4988 USE_LIBDIR_FALSE=
4989 fi
4990
4991
4992 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
4993 NEEDS_DATA_START_TRUE=
4994 NEEDS_DATA_START_FALSE='#'
4995 else
4996 NEEDS_DATA_START_TRUE='#'
4997 NEEDS_DATA_START_FALSE=
4998 fi
4999
5000
5001 # Determine gcj version number.
5002 if test "$GCJ" = ""; then
5003 if test -z "${with_multisubdir}"; then
5004 builddotdot=.
5005 else
5006
5007 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5008
5009 fi
5010 dir="`cd ${builddotdot}/../../gcc && pwd`"
5011 GCJ="$dir/gcj -B$dir/"
5012 fi
5013
5014 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
5015
5016 cat >> confdefs.h <<EOF
5017 #define GCJVERSION "$gcjvers"
5018 EOF
5019
5020
5021 # See if gcj supports -fuse-divide-subroutine. gcc 2.95 does not, and
5022 # we want to continue to support that version.
5023 echo $ac_n "checking whether gcj supports -fuse-divide-subroutine""... $ac_c" 1>&6
5024 echo "configure:5025: checking whether gcj supports -fuse-divide-subroutine" >&5
5025 cat > conftest.java << 'END'
5026 public class conftest { }
5027 END
5028 use_fuse=yes
5029 $GCJ -classpath $srcdir -fuse-divide-subroutine -fsyntax-only \
5030 conftest.java > /dev/null 2>&1 \
5031 || use_fuse=no
5032 rm -f conftest.java
5033 if test "$use_fuse" = no; then
5034 DIVIDESPEC=
5035 fi
5036 echo "$ac_t""$use_fuse" 1>&6
5037
5038
5039
5040 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5041 echo "configure:5042: checking for g++ -ffloat-store bug" >&5
5042 save_CFLAGS="$CFLAGS"
5043 CFLAGS="-x c++ -O2 -ffloat-store"
5044 cat > conftest.$ac_ext <<EOF
5045 #line 5046 "configure"
5046 #include "confdefs.h"
5047 #include <math.h>
5048 int main() {
5049
5050 ; return 0; }
5051 EOF
5052 if { (eval echo configure:5053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5053 rm -rf conftest*
5054 echo "$ac_t""no" 1>&6
5055 else
5056 echo "configure: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 rm -rf conftest*
5059 cat >> confdefs.h <<\EOF
5060 #define __NO_MATH_INLINES 1
5061 EOF
5062
5063 echo "$ac_t""yes" 1>&6
5064 fi
5065 rm -f conftest*
5066 CFLAGS="$save_CFLAGS"
5067
5068 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 langinfo.h
5069 do
5070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5072 echo "configure:5073: checking for $ac_hdr" >&5
5073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5074 echo $ac_n "(cached) $ac_c" 1>&6
5075 else
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079 #include <$ac_hdr>
5080 EOF
5081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5082 { (eval echo configure:5083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5084 if test -z "$ac_err"; then
5085 rm -rf conftest*
5086 eval "ac_cv_header_$ac_safe=yes"
5087 else
5088 echo "$ac_err" >&5
5089 echo "configure: failed program was:" >&5
5090 cat conftest.$ac_ext >&5
5091 rm -rf conftest*
5092 eval "ac_cv_header_$ac_safe=no"
5093 fi
5094 rm -f conftest*
5095 fi
5096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5097 echo "$ac_t""yes" 1>&6
5098 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5099 cat >> confdefs.h <<EOF
5100 #define $ac_tr_hdr 1
5101 EOF
5102
5103 else
5104 echo "$ac_t""no" 1>&6
5105 fi
5106 done
5107
5108 for ac_hdr in dirent.h
5109 do
5110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5112 echo "configure:5113: checking for $ac_hdr" >&5
5113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5114 echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116 cat > conftest.$ac_ext <<EOF
5117 #line 5118 "configure"
5118 #include "confdefs.h"
5119 #include <$ac_hdr>
5120 EOF
5121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5122 { (eval echo configure:5123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5124 if test -z "$ac_err"; then
5125 rm -rf conftest*
5126 eval "ac_cv_header_$ac_safe=yes"
5127 else
5128 echo "$ac_err" >&5
5129 echo "configure: failed program was:" >&5
5130 cat conftest.$ac_ext >&5
5131 rm -rf conftest*
5132 eval "ac_cv_header_$ac_safe=no"
5133 fi
5134 rm -f conftest*
5135 fi
5136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5137 echo "$ac_t""yes" 1>&6
5138 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5139 cat >> confdefs.h <<EOF
5140 #define $ac_tr_hdr 1
5141 EOF
5142
5143 else
5144 echo "$ac_t""no" 1>&6
5145 fi
5146 done
5147
5148
5149 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5150 echo "configure:5151: checking for ANSI C header files" >&5
5151 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5152 echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 #include <stdlib.h>
5158 #include <stdarg.h>
5159 #include <string.h>
5160 #include <float.h>
5161 EOF
5162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5163 { (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5165 if test -z "$ac_err"; then
5166 rm -rf conftest*
5167 ac_cv_header_stdc=yes
5168 else
5169 echo "$ac_err" >&5
5170 echo "configure: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5172 rm -rf conftest*
5173 ac_cv_header_stdc=no
5174 fi
5175 rm -f conftest*
5176
5177 if test $ac_cv_header_stdc = yes; then
5178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5179 cat > conftest.$ac_ext <<EOF
5180 #line 5181 "configure"
5181 #include "confdefs.h"
5182 #include <string.h>
5183 EOF
5184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5185 egrep "memchr" >/dev/null 2>&1; then
5186 :
5187 else
5188 rm -rf conftest*
5189 ac_cv_header_stdc=no
5190 fi
5191 rm -f conftest*
5192
5193 fi
5194
5195 if test $ac_cv_header_stdc = yes; then
5196 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5197 cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200 #include <stdlib.h>
5201 EOF
5202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5203 egrep "free" >/dev/null 2>&1; then
5204 :
5205 else
5206 rm -rf conftest*
5207 ac_cv_header_stdc=no
5208 fi
5209 rm -f conftest*
5210
5211 fi
5212
5213 if test $ac_cv_header_stdc = yes; then
5214 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5215 if test "$cross_compiling" = yes; then
5216 :
5217 else
5218 cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221 #include <ctype.h>
5222 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5223 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5224 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5225 int main () { int i; for (i = 0; i < 256; i++)
5226 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5227 exit (0); }
5228
5229 EOF
5230 if { (eval echo configure:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5231 then
5232 :
5233 else
5234 echo "configure: failed program was:" >&5
5235 cat conftest.$ac_ext >&5
5236 rm -fr conftest*
5237 ac_cv_header_stdc=no
5238 fi
5239 rm -fr conftest*
5240 fi
5241
5242 fi
5243 fi
5244
5245 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5246 if test $ac_cv_header_stdc = yes; then
5247 cat >> confdefs.h <<\EOF
5248 #define STDC_HEADERS 1
5249 EOF
5250
5251 fi
5252
5253 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5254 echo "configure:5255: checking for ssize_t" >&5
5255 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5256 echo $ac_n "(cached) $ac_c" 1>&6
5257 else
5258 cat > conftest.$ac_ext <<EOF
5259 #line 5260 "configure"
5260 #include "confdefs.h"
5261 #include <sys/types.h>
5262 #if STDC_HEADERS
5263 #include <stdlib.h>
5264 #include <stddef.h>
5265 #endif
5266 EOF
5267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5268 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5269 rm -rf conftest*
5270 ac_cv_type_ssize_t=yes
5271 else
5272 rm -rf conftest*
5273 ac_cv_type_ssize_t=no
5274 fi
5275 rm -f conftest*
5276
5277 fi
5278 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5279 if test $ac_cv_type_ssize_t = no; then
5280 cat >> confdefs.h <<\EOF
5281 #define ssize_t int
5282 EOF
5283
5284 fi
5285
5286
5287 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5288 echo "configure:5289: checking for in_addr_t" >&5
5289 cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292 #include <sys/types.h>
5293 #if STDC_HEADERS
5294 #include <stdlib.h>
5295 #include <stddef.h>
5296 #endif
5297 #if HAVE_NETINET_IN_H
5298 #include <netinet/in.h>
5299 #endif
5300 int main() {
5301 in_addr_t foo;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305 rm -rf conftest*
5306 cat >> confdefs.h <<\EOF
5307 #define HAVE_IN_ADDR_T 1
5308 EOF
5309
5310 echo "$ac_t""yes" 1>&6
5311 else
5312 echo "configure: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 rm -rf conftest*
5315 echo "$ac_t""no" 1>&6
5316 fi
5317 rm -f conftest*
5318
5319 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5320 echo "configure:5321: checking whether struct ip_mreq is in netinet/in.h" >&5
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324 #include <netinet/in.h>
5325 int main() {
5326 struct ip_mreq mreq;
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5330 rm -rf conftest*
5331 cat >> confdefs.h <<\EOF
5332 #define HAVE_STRUCT_IP_MREQ 1
5333 EOF
5334
5335 echo "$ac_t""yes" 1>&6
5336 else
5337 echo "configure: failed program was:" >&5
5338 cat conftest.$ac_ext >&5
5339 rm -rf conftest*
5340 echo "$ac_t""no" 1>&6
5341 fi
5342 rm -f conftest*
5343
5344 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
5345 echo "configure:5346: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
5346 cat > conftest.$ac_ext <<EOF
5347 #line 5348 "configure"
5348 #include "confdefs.h"
5349 #include <netinet/in.h>
5350 int main() {
5351 struct sockaddr_in6 addr6;
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5355 rm -rf conftest*
5356 cat >> confdefs.h <<\EOF
5357 #define HAVE_INET6 1
5358 EOF
5359
5360 echo "$ac_t""yes" 1>&6
5361 else
5362 echo "configure: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
5364 rm -rf conftest*
5365 echo "$ac_t""no" 1>&6
5366 fi
5367 rm -f conftest*
5368
5369 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
5370 echo "configure:5371: checking for socklen_t in sys/socket.h" >&5
5371 cat > conftest.$ac_ext <<EOF
5372 #line 5373 "configure"
5373 #include "confdefs.h"
5374 #include <sys/socket.h>
5375 int main() {
5376 socklen_t x = 5;
5377 ; return 0; }
5378 EOF
5379 if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5380 rm -rf conftest*
5381 cat >> confdefs.h <<\EOF
5382 #define HAVE_SOCKLEN_T 1
5383 EOF
5384
5385 echo "$ac_t""yes" 1>&6
5386 else
5387 echo "configure: failed program was:" >&5
5388 cat conftest.$ac_ext >&5
5389 rm -rf conftest*
5390 echo "$ac_t""no" 1>&6
5391 fi
5392 rm -f conftest*
5393
5394 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
5395 echo "configure:5396: checking for tm_gmtoff in struct tm" >&5
5396 cat > conftest.$ac_ext <<EOF
5397 #line 5398 "configure"
5398 #include "confdefs.h"
5399 #include <time.h>
5400 int main() {
5401 struct tm tim; tim.tm_gmtoff = 0;
5402 ; return 0; }
5403 EOF
5404 if { (eval echo configure:5405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5405 rm -rf conftest*
5406 cat >> confdefs.h <<\EOF
5407 #define STRUCT_TM_HAS_GMTOFF 1
5408 EOF
5409
5410 echo "$ac_t""yes" 1>&6
5411 else
5412 echo "configure: failed program was:" >&5
5413 cat conftest.$ac_ext >&5
5414 rm -rf conftest*
5415 echo "$ac_t""no" 1>&6
5416 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
5417 echo "configure:5418: checking for global timezone variable" >&5
5418 cat > conftest.$ac_ext <<EOF
5419 #line 5420 "configure"
5420 #include "confdefs.h"
5421 #include <time.h>
5422 int main() {
5423 long z2 = timezone;
5424 ; return 0; }
5425 EOF
5426 if { (eval echo configure:5427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5427 rm -rf conftest*
5428 cat >> confdefs.h <<\EOF
5429 #define HAVE_TIMEZONE 1
5430 EOF
5431
5432 echo "$ac_t""yes" 1>&6
5433 else
5434 echo "configure: failed program was:" >&5
5435 cat conftest.$ac_ext >&5
5436 rm -rf conftest*
5437 echo "$ac_t""no" 1>&6
5438 fi
5439 rm -f conftest*
5440 fi
5441 rm -f conftest*
5442
5443 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5444 # for constant arguments. Useless!
5445 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5446 echo "configure:5447: checking for working alloca.h" >&5
5447 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5448 echo $ac_n "(cached) $ac_c" 1>&6
5449 else
5450 cat > conftest.$ac_ext <<EOF
5451 #line 5452 "configure"
5452 #include "confdefs.h"
5453 #include <alloca.h>
5454 int main() {
5455 char *p = alloca(2 * sizeof(int));
5456 ; return 0; }
5457 EOF
5458 if { (eval echo configure:5459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5459 rm -rf conftest*
5460 ac_cv_header_alloca_h=yes
5461 else
5462 echo "configure: failed program was:" >&5
5463 cat conftest.$ac_ext >&5
5464 rm -rf conftest*
5465 ac_cv_header_alloca_h=no
5466 fi
5467 rm -f conftest*
5468 fi
5469
5470 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5471 if test $ac_cv_header_alloca_h = yes; then
5472 cat >> confdefs.h <<\EOF
5473 #define HAVE_ALLOCA_H 1
5474 EOF
5475
5476 fi
5477
5478 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5479 echo "configure:5480: checking for alloca" >&5
5480 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5481 echo $ac_n "(cached) $ac_c" 1>&6
5482 else
5483 cat > conftest.$ac_ext <<EOF
5484 #line 5485 "configure"
5485 #include "confdefs.h"
5486
5487 #ifdef __GNUC__
5488 # define alloca __builtin_alloca
5489 #else
5490 # ifdef _MSC_VER
5491 # include <malloc.h>
5492 # define alloca _alloca
5493 # else
5494 # if HAVE_ALLOCA_H
5495 # include <alloca.h>
5496 # else
5497 # ifdef _AIX
5498 #pragma alloca
5499 # else
5500 # ifndef alloca /* predefined by HP cc +Olibcalls */
5501 char *alloca ();
5502 # endif
5503 # endif
5504 # endif
5505 # endif
5506 #endif
5507
5508 int main() {
5509 char *p = (char *) alloca(1);
5510 ; return 0; }
5511 EOF
5512 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5513 rm -rf conftest*
5514 ac_cv_func_alloca_works=yes
5515 else
5516 echo "configure: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5518 rm -rf conftest*
5519 ac_cv_func_alloca_works=no
5520 fi
5521 rm -f conftest*
5522 fi
5523
5524 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5525 if test $ac_cv_func_alloca_works = yes; then
5526 cat >> confdefs.h <<\EOF
5527 #define HAVE_ALLOCA 1
5528 EOF
5529
5530 fi
5531
5532 if test $ac_cv_func_alloca_works = no; then
5533 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5534 # that cause trouble. Some versions do not even contain alloca or
5535 # contain a buggy version. If you still want to use their alloca,
5536 # use ar to extract alloca.o from them instead of compiling alloca.c.
5537 ALLOCA=alloca.${ac_objext}
5538 cat >> confdefs.h <<\EOF
5539 #define C_ALLOCA 1
5540 EOF
5541
5542
5543 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5544 echo "configure:5545: checking whether alloca needs Cray hooks" >&5
5545 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5546 echo $ac_n "(cached) $ac_c" 1>&6
5547 else
5548 cat > conftest.$ac_ext <<EOF
5549 #line 5550 "configure"
5550 #include "confdefs.h"
5551 #if defined(CRAY) && ! defined(CRAY2)
5552 webecray
5553 #else
5554 wenotbecray
5555 #endif
5556
5557 EOF
5558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5559 egrep "webecray" >/dev/null 2>&1; then
5560 rm -rf conftest*
5561 ac_cv_os_cray=yes
5562 else
5563 rm -rf conftest*
5564 ac_cv_os_cray=no
5565 fi
5566 rm -f conftest*
5567
5568 fi
5569
5570 echo "$ac_t""$ac_cv_os_cray" 1>&6
5571 if test $ac_cv_os_cray = yes; then
5572 for ac_func in _getb67 GETB67 getb67; do
5573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5574 echo "configure:5575: checking for $ac_func" >&5
5575 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577 else
5578 cat > conftest.$ac_ext <<EOF
5579 #line 5580 "configure"
5580 #include "confdefs.h"
5581 /* System header to define __stub macros and hopefully few prototypes,
5582 which can conflict with char $ac_func(); below. */
5583 #include <assert.h>
5584 /* Override any gcc2 internal prototype to avoid an error. */
5585 /* We use char because int might match the return type of a gcc2
5586 builtin and then its argument prototype would still apply. */
5587 char $ac_func();
5588
5589 int main() {
5590
5591 /* The GNU C library defines this for functions which it implements
5592 to always fail with ENOSYS. Some functions are actually named
5593 something starting with __ and the normal name is an alias. */
5594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5595 choke me
5596 #else
5597 $ac_func();
5598 #endif
5599
5600 ; return 0; }
5601 EOF
5602 if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5603 rm -rf conftest*
5604 eval "ac_cv_func_$ac_func=yes"
5605 else
5606 echo "configure: failed program was:" >&5
5607 cat conftest.$ac_ext >&5
5608 rm -rf conftest*
5609 eval "ac_cv_func_$ac_func=no"
5610 fi
5611 rm -f conftest*
5612 fi
5613
5614 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5615 echo "$ac_t""yes" 1>&6
5616 cat >> confdefs.h <<EOF
5617 #define CRAY_STACKSEG_END $ac_func
5618 EOF
5619
5620 break
5621 else
5622 echo "$ac_t""no" 1>&6
5623 fi
5624
5625 done
5626 fi
5627
5628 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5629 echo "configure:5630: checking stack direction for C alloca" >&5
5630 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5631 echo $ac_n "(cached) $ac_c" 1>&6
5632 else
5633 if test "$cross_compiling" = yes; then
5634 ac_cv_c_stack_direction=0
5635 else
5636 cat > conftest.$ac_ext <<EOF
5637 #line 5638 "configure"
5638 #include "confdefs.h"
5639 find_stack_direction ()
5640 {
5641 static char *addr = 0;
5642 auto char dummy;
5643 if (addr == 0)
5644 {
5645 addr = &dummy;
5646 return find_stack_direction ();
5647 }
5648 else
5649 return (&dummy > addr) ? 1 : -1;
5650 }
5651 main ()
5652 {
5653 exit (find_stack_direction() < 0);
5654 }
5655 EOF
5656 if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5657 then
5658 ac_cv_c_stack_direction=1
5659 else
5660 echo "configure: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 rm -fr conftest*
5663 ac_cv_c_stack_direction=-1
5664 fi
5665 rm -fr conftest*
5666 fi
5667
5668 fi
5669
5670 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5671 cat >> confdefs.h <<EOF
5672 #define STACK_DIRECTION $ac_cv_c_stack_direction
5673 EOF
5674
5675 fi
5676
5677
5678 for ac_prog in perl
5679 do
5680 # Extract the first word of "$ac_prog", so it can be a program name with args.
5681 set dummy $ac_prog; ac_word=$2
5682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5683 echo "configure:5684: checking for $ac_word" >&5
5684 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
5685 echo $ac_n "(cached) $ac_c" 1>&6
5686 else
5687 if test -n "$PERL"; then
5688 ac_cv_prog_PERL="$PERL" # Let the user override the test.
5689 else
5690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5691 ac_dummy="$PATH"
5692 for ac_dir in $ac_dummy; do
5693 test -z "$ac_dir" && ac_dir=.
5694 if test -f $ac_dir/$ac_word; then
5695 ac_cv_prog_PERL="$ac_prog"
5696 break
5697 fi
5698 done
5699 IFS="$ac_save_ifs"
5700 fi
5701 fi
5702 PERL="$ac_cv_prog_PERL"
5703 if test -n "$PERL"; then
5704 echo "$ac_t""$PERL" 1>&6
5705 else
5706 echo "$ac_t""no" 1>&6
5707 fi
5708
5709 test -n "$PERL" && break
5710 done
5711 test -n "$PERL" || PERL="false"
5712
5713
5714 SYSDEP_SOURCES=
5715
5716 case "${host}" in
5717 i?86-*-linux*)
5718 SIGNAL_HANDLER=include/i386-signal.h
5719 ;;
5720 sparc-sun-solaris*)
5721 SIGNAL_HANDLER=include/sparc-signal.h
5722 ;;
5723 ia64-*)
5724 SYSDEP_SOURCES=sysdep/ia64.c
5725 test -d sysdep || mkdir sysdep
5726 ;;
5727 *)
5728 SIGNAL_HANDLER=include/default-signal.h
5729 ;;
5730 esac
5731
5732 # If we're using sjlj exceptions, forget what we just learned.
5733 if test "$libgcj_sjlj" = yes; then
5734 SIGNAL_HANDLER=include/default-signal.h
5735 fi
5736
5737
5738
5739
5740
5741 if test "${multilib}" = "yes"; then
5742 multilib_arg="--enable-multilib"
5743 else
5744 multilib_arg=
5745 fi
5746
5747 here=`pwd`
5748
5749
5750 trap '' 1 2 15
5751 cat > confcache <<\EOF
5752 # This file is a shell script that caches the results of configure
5753 # tests run on this system so they can be shared between configure
5754 # scripts and configure runs. It is not useful on other systems.
5755 # If it contains results you don't want to keep, you may remove or edit it.
5756 #
5757 # By default, configure uses ./config.cache as the cache file,
5758 # creating it if it does not exist already. You can give configure
5759 # the --cache-file=FILE option to use a different cache file; that is
5760 # what configure does when it calls configure scripts in
5761 # subdirectories, so they share the cache.
5762 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5763 # config.status only pays attention to the cache file if you give it the
5764 # --recheck option to rerun configure.
5765 #
5766 EOF
5767 # The following way of writing the cache mishandles newlines in values,
5768 # but we know of no workaround that is simple, portable, and efficient.
5769 # So, don't put newlines in cache variables' values.
5770 # Ultrix sh set writes to stderr and can't be redirected directly,
5771 # and sets the high bit in the cache file unless we assign to the vars.
5772 (set) 2>&1 |
5773 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5774 *ac_space=\ *)
5775 # `set' does not quote correctly, so add quotes (double-quote substitution
5776 # turns \\\\ into \\, and sed turns \\ into \).
5777 sed -n \
5778 -e "s/'/'\\\\''/g" \
5779 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5780 ;;
5781 *)
5782 # `set' quotes correctly as required by POSIX, so do not add quotes.
5783 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5784 ;;
5785 esac >> confcache
5786 if cmp -s $cache_file confcache; then
5787 :
5788 else
5789 if test -w $cache_file; then
5790 echo "updating cache $cache_file"
5791 cat confcache > $cache_file
5792 else
5793 echo "not updating unwritable cache $cache_file"
5794 fi
5795 fi
5796 rm -f confcache
5797
5798 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5799
5800 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5801 # Let make expand exec_prefix.
5802 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5803
5804 # Any assignment to VPATH causes Sun make to only execute
5805 # the first set of double-colon rules, so remove it if not needed.
5806 # If there is a colon in the path, we need to keep it.
5807 if test "x$srcdir" = x.; then
5808 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5809 fi
5810
5811 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5812
5813 DEFS=-DHAVE_CONFIG_H
5814
5815 # Without the "./", some shells look in PATH for config.status.
5816 : ${CONFIG_STATUS=./config.status}
5817
5818 echo creating $CONFIG_STATUS
5819 rm -f $CONFIG_STATUS
5820 cat > $CONFIG_STATUS <<EOF
5821 #! /bin/sh
5822 # Generated automatically by configure.
5823 # Run this file to recreate the current configuration.
5824 # This directory was configured as follows,
5825 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5826 #
5827 # $0 $ac_configure_args
5828 #
5829 # Compiler output produced by configure, useful for debugging
5830 # configure, is in ./config.log if it exists.
5831
5832 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5833 for ac_option
5834 do
5835 case "\$ac_option" in
5836 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5837 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5838 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5839 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5840 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5841 exit 0 ;;
5842 -help | --help | --hel | --he | --h)
5843 echo "\$ac_cs_usage"; exit 0 ;;
5844 *) echo "\$ac_cs_usage"; exit 1 ;;
5845 esac
5846 done
5847
5848 ac_given_srcdir=$srcdir
5849 ac_given_INSTALL="$INSTALL"
5850
5851 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
5852 EOF
5853 cat >> $CONFIG_STATUS <<EOF
5854
5855 # Protect against being on the right side of a sed subst in config.status.
5856 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5857 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5858 $ac_vpsub
5859 $extrasub
5860 s%@SHELL@%$SHELL%g
5861 s%@CFLAGS@%$CFLAGS%g
5862 s%@CPPFLAGS@%$CPPFLAGS%g
5863 s%@CXXFLAGS@%$CXXFLAGS%g
5864 s%@FFLAGS@%$FFLAGS%g
5865 s%@DEFS@%$DEFS%g
5866 s%@LDFLAGS@%$LDFLAGS%g
5867 s%@LIBS@%$LIBS%g
5868 s%@exec_prefix@%$exec_prefix%g
5869 s%@prefix@%$prefix%g
5870 s%@program_transform_name@%$program_transform_name%g
5871 s%@bindir@%$bindir%g
5872 s%@sbindir@%$sbindir%g
5873 s%@libexecdir@%$libexecdir%g
5874 s%@datadir@%$datadir%g
5875 s%@sysconfdir@%$sysconfdir%g
5876 s%@sharedstatedir@%$sharedstatedir%g
5877 s%@localstatedir@%$localstatedir%g
5878 s%@libdir@%$libdir%g
5879 s%@includedir@%$includedir%g
5880 s%@oldincludedir@%$oldincludedir%g
5881 s%@infodir@%$infodir%g
5882 s%@mandir@%$mandir%g
5883 s%@host@%$host%g
5884 s%@host_alias@%$host_alias%g
5885 s%@host_cpu@%$host_cpu%g
5886 s%@host_vendor@%$host_vendor%g
5887 s%@host_os@%$host_os%g
5888 s%@target@%$target%g
5889 s%@target_alias@%$target_alias%g
5890 s%@target_cpu@%$target_cpu%g
5891 s%@target_vendor@%$target_vendor%g
5892 s%@target_os@%$target_os%g
5893 s%@build@%$build%g
5894 s%@build_alias@%$build_alias%g
5895 s%@build_cpu@%$build_cpu%g
5896 s%@build_vendor@%$build_vendor%g
5897 s%@build_os@%$build_os%g
5898 s%@libgcj_basedir@%$libgcj_basedir%g
5899 s%@CC@%$CC%g
5900 s%@CXX@%$CXX%g
5901 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5902 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5903 s%@INSTALL_DATA@%$INSTALL_DATA%g
5904 s%@PACKAGE@%$PACKAGE%g
5905 s%@VERSION@%$VERSION%g
5906 s%@ACLOCAL@%$ACLOCAL%g
5907 s%@AUTOCONF@%$AUTOCONF%g
5908 s%@AUTOMAKE@%$AUTOMAKE%g
5909 s%@AUTOHEADER@%$AUTOHEADER%g
5910 s%@MAKEINFO@%$MAKEINFO%g
5911 s%@SET_MAKE@%$SET_MAKE%g
5912 s%@AS@%$AS%g
5913 s%@AR@%$AR%g
5914 s%@RANLIB@%$RANLIB%g
5915 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5916 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5917 s%@MAINT@%$MAINT%g
5918 s%@EXEEXT@%$EXEEXT%g
5919 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
5920 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
5921 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
5922 s%@INCLTDL@%$INCLTDL%g
5923 s%@LIBLTDL@%$LIBLTDL%g
5924 s%@DIRLTDL@%$DIRLTDL%g
5925 s%@LN_S@%$LN_S%g
5926 s%@OBJEXT@%$OBJEXT%g
5927 s%@STRIP@%$STRIP%g
5928 s%@LIBTOOL@%$LIBTOOL%g
5929 s%@CXXCPP@%$CXXCPP%g
5930 s%@subdirs@%$subdirs%g
5931 s%@COMPPATH@%$COMPPATH%g
5932 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
5933 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
5934 s%@LIBDATASTARTSPEC@%$LIBDATASTARTSPEC%g
5935 s%@CPP@%$CPP%g
5936 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
5937 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
5938 s%@ZLIBSPEC@%$ZLIBSPEC%g
5939 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
5940 s%@GCLIBS@%$GCLIBS%g
5941 s%@GCINCS@%$GCINCS%g
5942 s%@GCDEPS@%$GCDEPS%g
5943 s%@GCOBJS@%$GCOBJS%g
5944 s%@GCSPEC@%$GCSPEC%g
5945 s%@GCTESTSPEC@%$GCTESTSPEC%g
5946 s%@THREADLIBS@%$THREADLIBS%g
5947 s%@THREADINCS@%$THREADINCS%g
5948 s%@THREADDEPS@%$THREADDEPS%g
5949 s%@THREADOBJS@%$THREADOBJS%g
5950 s%@THREADSPEC@%$THREADSPEC%g
5951 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
5952 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
5953 s%@ZLIBS@%$ZLIBS%g
5954 s%@ZDEPS@%$ZDEPS%g
5955 s%@ZINCS@%$ZINCS%g
5956 s%@DIVIDESPEC@%$DIVIDESPEC%g
5957 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
5958 s%@FORCELIBGCCSPEC@%$FORCELIBGCCSPEC%g
5959 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
5960 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
5961 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
5962 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
5963 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
5964 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
5965 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
5966 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
5967 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
5968 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
5969 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
5970 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
5971 s%@ALLOCA@%$ALLOCA%g
5972 s%@PERL@%$PERL%g
5973 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
5974 s%@here@%$here%g
5975
5976 CEOF
5977 EOF
5978
5979 cat >> $CONFIG_STATUS <<\EOF
5980
5981 # Split the substitutions into bite-sized pieces for seds with
5982 # small command number limits, like on Digital OSF/1 and HP-UX.
5983 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5984 ac_file=1 # Number of current file.
5985 ac_beg=1 # First line for current file.
5986 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5987 ac_more_lines=:
5988 ac_sed_cmds=""
5989 while $ac_more_lines; do
5990 if test $ac_beg -gt 1; then
5991 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5992 else
5993 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5994 fi
5995 if test ! -s conftest.s$ac_file; then
5996 ac_more_lines=false
5997 rm -f conftest.s$ac_file
5998 else
5999 if test -z "$ac_sed_cmds"; then
6000 ac_sed_cmds="sed -f conftest.s$ac_file"
6001 else
6002 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6003 fi
6004 ac_file=`expr $ac_file + 1`
6005 ac_beg=$ac_end
6006 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6007 fi
6008 done
6009 if test -z "$ac_sed_cmds"; then
6010 ac_sed_cmds=cat
6011 fi
6012 EOF
6013
6014 cat >> $CONFIG_STATUS <<EOF
6015
6016 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gcj/Makefile include/Makefile testsuite/Makefile"}
6017 EOF
6018 cat >> $CONFIG_STATUS <<\EOF
6019 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6020 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6021 case "$ac_file" in
6022 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6023 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6024 *) ac_file_in="${ac_file}.in" ;;
6025 esac
6026
6027 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6028
6029 # Remove last slash and all that follows it. Not all systems have dirname.
6030 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6031 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6032 # The file is in a subdirectory.
6033 test ! -d "$ac_dir" && mkdir "$ac_dir"
6034 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6035 # A "../" for each directory in $ac_dir_suffix.
6036 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6037 else
6038 ac_dir_suffix= ac_dots=
6039 fi
6040
6041 case "$ac_given_srcdir" in
6042 .) srcdir=.
6043 if test -z "$ac_dots"; then top_srcdir=.
6044 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6045 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6046 *) # Relative path.
6047 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6048 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6049 esac
6050
6051 case "$ac_given_INSTALL" in
6052 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6053 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6054 esac
6055
6056 echo creating "$ac_file"
6057 rm -f "$ac_file"
6058 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6059 case "$ac_file" in
6060 *Makefile*) ac_comsub="1i\\
6061 # $configure_input" ;;
6062 *) ac_comsub= ;;
6063 esac
6064
6065 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6066 sed -e "$ac_comsub
6067 s%@configure_input@%$configure_input%g
6068 s%@srcdir@%$srcdir%g
6069 s%@top_srcdir@%$top_srcdir%g
6070 s%@INSTALL@%$INSTALL%g
6071 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6072 fi; done
6073 rm -f conftest.s*
6074
6075 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6076 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6077 #
6078 # ac_d sets the value in "#define NAME VALUE" lines.
6079 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6080 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6081 ac_dC='\3'
6082 ac_dD='%g'
6083 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6084 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6085 ac_uB='\([ ]\)%\1#\2define\3'
6086 ac_uC=' '
6087 ac_uD='\4%g'
6088 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6089 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6090 ac_eB='$%\1#\2define\3'
6091 ac_eC=' '
6092 ac_eD='%g'
6093
6094 if test "${CONFIG_HEADERS+set}" != set; then
6095 EOF
6096 cat >> $CONFIG_STATUS <<EOF
6097 CONFIG_HEADERS="include/config.h"
6098 EOF
6099 cat >> $CONFIG_STATUS <<\EOF
6100 fi
6101 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6102 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6103 case "$ac_file" in
6104 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6105 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6106 *) ac_file_in="${ac_file}.in" ;;
6107 esac
6108
6109 echo creating $ac_file
6110
6111 rm -f conftest.frag conftest.in conftest.out
6112 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6113 cat $ac_file_inputs > conftest.in
6114
6115 EOF
6116
6117 # Transform confdefs.h into a sed script conftest.vals that substitutes
6118 # the proper values into config.h.in to produce config.h. And first:
6119 # Protect against being on the right side of a sed subst in config.status.
6120 # Protect against being in an unquoted here document in config.status.
6121 rm -f conftest.vals
6122 cat > conftest.hdr <<\EOF
6123 s/[\\&%]/\\&/g
6124 s%[\\$`]%\\&%g
6125 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6126 s%ac_d%ac_u%gp
6127 s%ac_u%ac_e%gp
6128 EOF
6129 sed -n -f conftest.hdr confdefs.h > conftest.vals
6130 rm -f conftest.hdr
6131
6132 # This sed command replaces #undef with comments. This is necessary, for
6133 # example, in the case of _POSIX_SOURCE, which is predefined and required
6134 # on some systems where configure will not decide to define it.
6135 cat >> conftest.vals <<\EOF
6136 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6137 EOF
6138
6139 # Break up conftest.vals because some shells have a limit on
6140 # the size of here documents, and old seds have small limits too.
6141
6142 rm -f conftest.tail
6143 while :
6144 do
6145 ac_lines=`grep -c . conftest.vals`
6146 # grep -c gives empty output for an empty file on some AIX systems.
6147 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6148 # Write a limited-size here document to conftest.frag.
6149 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6150 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6151 echo 'CEOF
6152 sed -f conftest.frag conftest.in > conftest.out
6153 rm -f conftest.in
6154 mv conftest.out conftest.in
6155 ' >> $CONFIG_STATUS
6156 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6157 rm -f conftest.vals
6158 mv conftest.tail conftest.vals
6159 done
6160 rm -f conftest.vals
6161
6162 cat >> $CONFIG_STATUS <<\EOF
6163 rm -f conftest.frag conftest.h
6164 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6165 cat conftest.in >> conftest.h
6166 rm -f conftest.in
6167 if cmp -s $ac_file conftest.h 2>/dev/null; then
6168 echo "$ac_file is unchanged"
6169 rm -f conftest.h
6170 else
6171 # Remove last slash and all that follows it. Not all systems have dirname.
6172 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6173 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6174 # The file is in a subdirectory.
6175 test ! -d "$ac_dir" && mkdir "$ac_dir"
6176 fi
6177 rm -f $ac_file
6178 mv conftest.h $ac_file
6179 fi
6180 fi; done
6181
6182 EOF
6183
6184 cat >> $CONFIG_STATUS <<EOF
6185 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
6186 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"
6187 EOF
6188
6189 cat >> $CONFIG_STATUS <<\EOF
6190 srcdir=$ac_given_srcdir
6191 while test -n "$ac_sources"; do
6192 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6193 set $ac_sources; ac_source=$1; shift; ac_sources=$*
6194
6195 echo "linking $srcdir/$ac_source to $ac_dest"
6196
6197 if test ! -r $srcdir/$ac_source; then
6198 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6199 fi
6200 rm -f $ac_dest
6201
6202 # Make relative symlinks.
6203 # Remove last slash and all that follows it. Not all systems have dirname.
6204 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6205 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6206 # The dest file is in a subdirectory.
6207 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6208 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6209 # A "../" for each directory in $ac_dest_dir_suffix.
6210 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6211 else
6212 ac_dest_dir_suffix= ac_dots=
6213 fi
6214
6215 case "$srcdir" in
6216 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6217 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6218 esac
6219
6220 # Make a symlink if possible; otherwise try a hard link.
6221 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6222 ln $srcdir/$ac_source $ac_dest; then :
6223 else
6224 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6225 fi
6226 done
6227 EOF
6228 cat >> $CONFIG_STATUS <<EOF
6229
6230 srcdir=${srcdir}
6231 host=${host}
6232 target=${target}
6233 with_multisubdir=${with_multisubdir}
6234 ac_configure_args="${multilib_arg} ${ac_configure_args}"
6235 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6236 libgcj_basedir=${libgcj_basedir}
6237 CC="${CC}"
6238 CXX="${CXX}"
6239
6240 EOF
6241 cat >> $CONFIG_STATUS <<\EOF
6242 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
6243 if test -n "$CONFIG_FILES"; then
6244 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
6245 fi
6246 exit 0
6247 EOF
6248 chmod +x $CONFIG_STATUS
6249 rm -fr confdefs* $ac_clean_files
6250 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6251
6252 if test "$no_recursion" != yes; then
6253
6254 # Remove --cache-file and --srcdir arguments so they do not pile up.
6255 ac_sub_configure_args=
6256 ac_prev=
6257 for ac_arg in $ac_configure_args; do
6258 if test -n "$ac_prev"; then
6259 ac_prev=
6260 continue
6261 fi
6262 case "$ac_arg" in
6263 -cache-file | --cache-file | --cache-fil | --cache-fi \
6264 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6265 ac_prev=cache_file ;;
6266 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6267 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6268 ;;
6269 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6270 ac_prev=srcdir ;;
6271 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6272 ;;
6273 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
6274 esac
6275 done
6276
6277 for ac_config_dir in $DIRLTDL; do
6278
6279 # Do not complain, so a configure script can configure whichever
6280 # parts of a large source tree are present.
6281 if test ! -d $srcdir/$ac_config_dir; then
6282 continue
6283 fi
6284
6285 echo configuring in $ac_config_dir
6286
6287 case "$srcdir" in
6288 .) ;;
6289 *)
6290 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
6291 else
6292 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
6293 fi
6294 ;;
6295 esac
6296
6297 ac_popdir=`pwd`
6298 cd $ac_config_dir
6299
6300 # A "../" for each directory in /$ac_config_dir.
6301 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
6302
6303 case "$srcdir" in
6304 .) # No --srcdir option. We are building in place.
6305 ac_sub_srcdir=$srcdir ;;
6306 /*) # Absolute path.
6307 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
6308 *) # Relative path.
6309 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
6310 esac
6311
6312 # Check for guested configure; otherwise get Cygnus style configure.
6313 if test -f $ac_sub_srcdir/configure; then
6314 ac_sub_configure=$ac_sub_srcdir/configure
6315 elif test -f $ac_sub_srcdir/configure.in; then
6316 ac_sub_configure=$ac_configure
6317 else
6318 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
6319 ac_sub_configure=
6320 fi
6321
6322 # The recursion is here.
6323 if test -n "$ac_sub_configure"; then
6324
6325 # Make the cache file name correct relative to the subdirectory.
6326 case "$cache_file" in
6327 /*) ac_sub_cache_file=$cache_file ;;
6328 *) # Relative path.
6329 ac_sub_cache_file="$ac_dots$cache_file" ;;
6330 esac
6331 case "$ac_given_INSTALL" in
6332 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6333 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6334 esac
6335
6336 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
6337 # The eval makes quoting arguments work.
6338 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
6339 then :
6340 else
6341 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
6342 fi
6343 fi
6344
6345 cd $ac_popdir
6346 done
6347 fi
6348