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