* except.h: Remove forward def of tree_node, rtx_def and
[official-gcc.git] / libjava / configure
blob30e5adbe691c95587387fb6771a0968104b1a23a
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
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-hash-synchronization
43 Use global hash table for monitor locks"
44 ac_help="$ac_help
45 --enable-libgcj-debug enable runtime debugging code"
46 ac_help="$ac_help
47 --enable-interpreter enable interpreter"
48 ac_help="$ac_help
49 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
50 ac_help="$ac_help
51 --disable-java-net disable java.net"
52 ac_help="$ac_help
53 --without-libffi don't use libffi"
54 ac_help="$ac_help
55 --disable-jvmpi disable JVMPI support"
56 ac_help="$ac_help
57 --with-ecos enable runtime eCos target support"
58 ac_help="$ac_help
59 --with-system-zlib use installed libz"
60 ac_help="$ac_help
61 --enable-java-gc=TYPE choose garbage collector [boehm]"
62 ac_help="$ac_help
63 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
64 ac_help="$ac_help
65 --with-x use the X Window System"
66 ac_help="$ac_help
67 --enable-java-awt list of AWT peer implementations to be built"
69 # Initialize some variables set by options.
70 # The variables have the same names as the options, with
71 # dashes changed to underlines.
72 build=NONE
73 cache_file=./config.cache
74 exec_prefix=NONE
75 host=NONE
76 no_create=
77 nonopt=NONE
78 no_recursion=
79 prefix=NONE
80 program_prefix=NONE
81 program_suffix=NONE
82 program_transform_name=s,x,x,
83 silent=
84 site=
85 sitefile=
86 srcdir=
87 target=NONE
88 verbose=
89 x_includes=NONE
90 x_libraries=NONE
91 bindir='${exec_prefix}/bin'
92 sbindir='${exec_prefix}/sbin'
93 libexecdir='${exec_prefix}/libexec'
94 datadir='${prefix}/share'
95 sysconfdir='${prefix}/etc'
96 sharedstatedir='${prefix}/com'
97 localstatedir='${prefix}/var'
98 libdir='${exec_prefix}/lib'
99 includedir='${prefix}/include'
100 oldincludedir='/usr/include'
101 infodir='${prefix}/info'
102 mandir='${prefix}/man'
104 # Initialize some other variables.
105 subdirs=
106 MFLAGS= MAKEFLAGS=
107 SHELL=${CONFIG_SHELL-/bin/sh}
108 # Maximum number of lines to put in a shell here document.
109 ac_max_here_lines=12
111 ac_prev=
112 for ac_option
115 # If the previous option needs an argument, assign it.
116 if test -n "$ac_prev"; then
117 eval "$ac_prev=\$ac_option"
118 ac_prev=
119 continue
122 case "$ac_option" in
123 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
124 *) ac_optarg= ;;
125 esac
127 # Accept the important Cygnus configure options, so we can diagnose typos.
129 case "$ac_option" in
131 -bindir | --bindir | --bindi | --bind | --bin | --bi)
132 ac_prev=bindir ;;
133 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
134 bindir="$ac_optarg" ;;
136 -build | --build | --buil | --bui | --bu)
137 ac_prev=build ;;
138 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
139 build="$ac_optarg" ;;
141 -cache-file | --cache-file | --cache-fil | --cache-fi \
142 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
143 ac_prev=cache_file ;;
144 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
145 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
146 cache_file="$ac_optarg" ;;
148 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
149 ac_prev=datadir ;;
150 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
151 | --da=*)
152 datadir="$ac_optarg" ;;
154 -disable-* | --disable-*)
155 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
156 # Reject names that are not valid shell variable names.
157 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
158 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
160 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161 eval "enable_${ac_feature}=no" ;;
163 -enable-* | --enable-*)
164 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
165 # Reject names that are not valid shell variable names.
166 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
167 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
170 case "$ac_option" in
171 *=*) ;;
172 *) ac_optarg=yes ;;
173 esac
174 eval "enable_${ac_feature}='$ac_optarg'" ;;
176 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
177 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
178 | --exec | --exe | --ex)
179 ac_prev=exec_prefix ;;
180 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
181 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
182 | --exec=* | --exe=* | --ex=*)
183 exec_prefix="$ac_optarg" ;;
185 -gas | --gas | --ga | --g)
186 # Obsolete; use --with-gas.
187 with_gas=yes ;;
189 -help | --help | --hel | --he)
190 # Omit some internal or obsolete options to make the list less imposing.
191 # This message is too long to be a string in the A/UX 3.1 sh.
192 cat << EOF
193 Usage: configure [options] [host]
194 Options: [defaults in brackets after descriptions]
195 Configuration:
196 --cache-file=FILE cache test results in FILE
197 --help print this message
198 --no-create do not create output files
199 --quiet, --silent do not print \`checking...' messages
200 --site-file=FILE use FILE as the site file
201 --version print the version of autoconf that created configure
202 Directory and file names:
203 --prefix=PREFIX install architecture-independent files in PREFIX
204 [$ac_default_prefix]
205 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
206 [same as prefix]
207 --bindir=DIR user executables in DIR [EPREFIX/bin]
208 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
209 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
210 --datadir=DIR read-only architecture-independent data in DIR
211 [PREFIX/share]
212 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
213 --sharedstatedir=DIR modifiable architecture-independent data in DIR
214 [PREFIX/com]
215 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
216 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
217 --includedir=DIR C header files in DIR [PREFIX/include]
218 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
219 --infodir=DIR info documentation in DIR [PREFIX/info]
220 --mandir=DIR man documentation in DIR [PREFIX/man]
221 --srcdir=DIR find the sources in DIR [configure dir or ..]
222 --program-prefix=PREFIX prepend PREFIX to installed program names
223 --program-suffix=SUFFIX append SUFFIX to installed program names
224 --program-transform-name=PROGRAM
225 run sed PROGRAM on installed program names
227 cat << EOF
228 Host type:
229 --build=BUILD configure for building on BUILD [BUILD=HOST]
230 --host=HOST configure for HOST [guessed]
231 --target=TARGET configure for TARGET [TARGET=HOST]
232 Features and packages:
233 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
234 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
235 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
236 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
237 --x-includes=DIR X include files are in DIR
238 --x-libraries=DIR X library files are in DIR
240 if test -n "$ac_help"; then
241 echo "--enable and --with options recognized:$ac_help"
243 exit 0 ;;
245 -host | --host | --hos | --ho)
246 ac_prev=host ;;
247 -host=* | --host=* | --hos=* | --ho=*)
248 host="$ac_optarg" ;;
250 -includedir | --includedir | --includedi | --included | --include \
251 | --includ | --inclu | --incl | --inc)
252 ac_prev=includedir ;;
253 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
254 | --includ=* | --inclu=* | --incl=* | --inc=*)
255 includedir="$ac_optarg" ;;
257 -infodir | --infodir | --infodi | --infod | --info | --inf)
258 ac_prev=infodir ;;
259 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
260 infodir="$ac_optarg" ;;
262 -libdir | --libdir | --libdi | --libd)
263 ac_prev=libdir ;;
264 -libdir=* | --libdir=* | --libdi=* | --libd=*)
265 libdir="$ac_optarg" ;;
267 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
268 | --libexe | --libex | --libe)
269 ac_prev=libexecdir ;;
270 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
271 | --libexe=* | --libex=* | --libe=*)
272 libexecdir="$ac_optarg" ;;
274 -localstatedir | --localstatedir | --localstatedi | --localstated \
275 | --localstate | --localstat | --localsta | --localst \
276 | --locals | --local | --loca | --loc | --lo)
277 ac_prev=localstatedir ;;
278 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
279 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
280 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
281 localstatedir="$ac_optarg" ;;
283 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
284 ac_prev=mandir ;;
285 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
286 mandir="$ac_optarg" ;;
288 -nfp | --nfp | --nf)
289 # Obsolete; use --without-fp.
290 with_fp=no ;;
292 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
293 | --no-cr | --no-c)
294 no_create=yes ;;
296 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
297 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
298 no_recursion=yes ;;
300 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
301 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
302 | --oldin | --oldi | --old | --ol | --o)
303 ac_prev=oldincludedir ;;
304 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
305 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
306 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
307 oldincludedir="$ac_optarg" ;;
309 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
310 ac_prev=prefix ;;
311 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
312 prefix="$ac_optarg" ;;
314 -program-prefix | --program-prefix | --program-prefi | --program-pref \
315 | --program-pre | --program-pr | --program-p)
316 ac_prev=program_prefix ;;
317 -program-prefix=* | --program-prefix=* | --program-prefi=* \
318 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
319 program_prefix="$ac_optarg" ;;
321 -program-suffix | --program-suffix | --program-suffi | --program-suff \
322 | --program-suf | --program-su | --program-s)
323 ac_prev=program_suffix ;;
324 -program-suffix=* | --program-suffix=* | --program-suffi=* \
325 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
326 program_suffix="$ac_optarg" ;;
328 -program-transform-name | --program-transform-name \
329 | --program-transform-nam | --program-transform-na \
330 | --program-transform-n | --program-transform- \
331 | --program-transform | --program-transfor \
332 | --program-transfo | --program-transf \
333 | --program-trans | --program-tran \
334 | --progr-tra | --program-tr | --program-t)
335 ac_prev=program_transform_name ;;
336 -program-transform-name=* | --program-transform-name=* \
337 | --program-transform-nam=* | --program-transform-na=* \
338 | --program-transform-n=* | --program-transform-=* \
339 | --program-transform=* | --program-transfor=* \
340 | --program-transfo=* | --program-transf=* \
341 | --program-trans=* | --program-tran=* \
342 | --progr-tra=* | --program-tr=* | --program-t=*)
343 program_transform_name="$ac_optarg" ;;
345 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
346 | -silent | --silent | --silen | --sile | --sil)
347 silent=yes ;;
349 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
350 ac_prev=sbindir ;;
351 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
352 | --sbi=* | --sb=*)
353 sbindir="$ac_optarg" ;;
355 -sharedstatedir | --sharedstatedir | --sharedstatedi \
356 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
357 | --sharedst | --shareds | --shared | --share | --shar \
358 | --sha | --sh)
359 ac_prev=sharedstatedir ;;
360 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
361 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
362 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
363 | --sha=* | --sh=*)
364 sharedstatedir="$ac_optarg" ;;
366 -site | --site | --sit)
367 ac_prev=site ;;
368 -site=* | --site=* | --sit=*)
369 site="$ac_optarg" ;;
371 -site-file | --site-file | --site-fil | --site-fi | --site-f)
372 ac_prev=sitefile ;;
373 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
374 sitefile="$ac_optarg" ;;
376 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
377 ac_prev=srcdir ;;
378 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
379 srcdir="$ac_optarg" ;;
381 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
382 | --syscon | --sysco | --sysc | --sys | --sy)
383 ac_prev=sysconfdir ;;
384 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
385 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
386 sysconfdir="$ac_optarg" ;;
388 -target | --target | --targe | --targ | --tar | --ta | --t)
389 ac_prev=target ;;
390 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
391 target="$ac_optarg" ;;
393 -v | -verbose | --verbose | --verbos | --verbo | --verb)
394 verbose=yes ;;
396 -version | --version | --versio | --versi | --vers)
397 echo "configure generated by autoconf version 2.13"
398 exit 0 ;;
400 -with-* | --with-*)
401 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
402 # Reject names that are not valid shell variable names.
403 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
404 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
406 ac_package=`echo $ac_package| sed 's/-/_/g'`
407 case "$ac_option" in
408 *=*) ;;
409 *) ac_optarg=yes ;;
410 esac
411 eval "with_${ac_package}='$ac_optarg'" ;;
413 -without-* | --without-*)
414 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
415 # Reject names that are not valid shell variable names.
416 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
417 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
419 ac_package=`echo $ac_package| sed 's/-/_/g'`
420 eval "with_${ac_package}=no" ;;
422 --x)
423 # Obsolete; use --with-x.
424 with_x=yes ;;
426 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
427 | --x-incl | --x-inc | --x-in | --x-i)
428 ac_prev=x_includes ;;
429 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
430 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
431 x_includes="$ac_optarg" ;;
433 -x-libraries | --x-libraries | --x-librarie | --x-librari \
434 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
435 ac_prev=x_libraries ;;
436 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
437 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
438 x_libraries="$ac_optarg" ;;
440 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
444 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
445 echo "configure: warning: $ac_option: invalid host type" 1>&2
447 if test "x$nonopt" != xNONE; then
448 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
450 nonopt="$ac_option"
453 esac
454 done
456 if test -n "$ac_prev"; then
457 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
462 # File descriptor usage:
463 # 0 standard input
464 # 1 file creation
465 # 2 errors and warnings
466 # 3 some systems may open it to /dev/tty
467 # 4 used on the Kubota Titan
468 # 6 checking for... messages and results
469 # 5 compiler messages saved in config.log
470 if test "$silent" = yes; then
471 exec 6>/dev/null
472 else
473 exec 6>&1
475 exec 5>./config.log
477 echo "\
478 This file contains any messages produced by compilers while
479 running configure, to aid debugging if configure makes a mistake.
480 " 1>&5
482 # Strip out --no-create and --no-recursion so they do not pile up.
483 # Also quote any args containing shell metacharacters.
484 ac_configure_args=
485 for ac_arg
487 case "$ac_arg" in
488 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
489 | --no-cr | --no-c) ;;
490 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
492 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
493 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
494 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
495 esac
496 done
498 # NLS nuisances.
499 # Only set these to C if already set. These must not be set unconditionally
500 # because not all systems understand e.g. LANG=C (notably SCO).
501 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
502 # Non-C LC_CTYPE values break the ctype check.
503 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
504 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
505 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
506 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
508 # confdefs.h avoids OS command line length limits that DEFS can exceed.
509 rm -rf conftest* confdefs.h
510 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
511 echo > confdefs.h
513 # A filename unique to this package, relative to the directory that
514 # configure is in, which we can look for to find out if srcdir is correct.
515 ac_unique_file=java/lang/System.java
517 # Find the source files, if location was not specified.
518 if test -z "$srcdir"; then
519 ac_srcdir_defaulted=yes
520 # Try the directory containing this script, then its parent.
521 ac_prog=$0
522 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
523 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
524 srcdir=$ac_confdir
525 if test ! -r $srcdir/$ac_unique_file; then
526 srcdir=..
528 else
529 ac_srcdir_defaulted=no
531 if test ! -r $srcdir/$ac_unique_file; then
532 if test "$ac_srcdir_defaulted" = yes; then
533 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
534 else
535 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
538 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
540 # Prefer explicitly selected file to automatically selected ones.
541 if test -z "$sitefile"; then
542 if test -z "$CONFIG_SITE"; then
543 if test "x$prefix" != xNONE; then
544 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
545 else
546 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
549 else
550 CONFIG_SITE="$sitefile"
552 for ac_site_file in $CONFIG_SITE; do
553 if test -r "$ac_site_file"; then
554 echo "loading site script $ac_site_file"
555 . "$ac_site_file"
557 done
559 if test -r "$cache_file"; then
560 echo "loading cache $cache_file"
561 . $cache_file
562 else
563 echo "creating cache $cache_file"
564 > $cache_file
567 ac_ext=c
568 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
569 ac_cpp='$CPP $CPPFLAGS'
570 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
571 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
572 cross_compiling=$ac_cv_prog_cc_cross
574 ac_exeext=
575 ac_objext=o
576 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
577 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
578 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
579 ac_n= ac_c='
580 ' ac_t=' '
581 else
582 ac_n=-n ac_c= ac_t=
584 else
585 ac_n= ac_c='\c' ac_t=
590 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
591 echo "configure:592: checking whether ln -s works" >&5
592 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
593 echo $ac_n "(cached) $ac_c" 1>&6
594 else
595 rm -f conftestdata
596 if ln -s X conftestdata 2>/dev/null
597 then
598 rm -f conftestdata
599 ac_cv_prog_LN_S="ln -s"
600 else
601 ac_cv_prog_LN_S=ln
604 LN_S="$ac_cv_prog_LN_S"
605 if test "$ac_cv_prog_LN_S" = "ln -s"; then
606 echo "$ac_t""yes" 1>&6
607 else
608 echo "$ac_t""no" 1>&6
612 # Check whether --with-target-subdir or --without-target-subdir was given.
613 if test "${with_target_subdir+set}" = set; then
614 withval="$with_target_subdir"
618 # Check whether --with-cross-host or --without-cross-host was given.
619 if test "${with_cross_host+set}" = set; then
620 withval="$with_cross_host"
625 # Find a good install program. We prefer a C program (faster),
626 # so one script is as good as another. But avoid the broken or
627 # incompatible versions:
628 # SysV /etc/install, /usr/sbin/install
629 # SunOS /usr/etc/install
630 # IRIX /sbin/install
631 # AIX /bin/install
632 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
633 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
634 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
635 # ./install, which can be erroneously created by make from ./install.sh.
636 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
637 echo "configure:638: checking for a BSD compatible install" >&5
638 if test -z "$INSTALL"; then
639 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
640 echo $ac_n "(cached) $ac_c" 1>&6
641 else
642 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
643 for ac_dir in $PATH; do
644 # Account for people who put trailing slashes in PATH elements.
645 case "$ac_dir/" in
646 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
648 # OSF1 and SCO ODT 3.0 have their own names for install.
649 # Don't use installbsd from OSF since it installs stuff as root
650 # by default.
651 for ac_prog in ginstall scoinst install; do
652 if test -f $ac_dir/$ac_prog; then
653 if test $ac_prog = install &&
654 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
655 # AIX install. It has an incompatible calling convention.
657 else
658 ac_cv_path_install="$ac_dir/$ac_prog -c"
659 break 2
662 done
664 esac
665 done
666 IFS="$ac_save_IFS"
669 if test "${ac_cv_path_install+set}" = set; then
670 INSTALL="$ac_cv_path_install"
671 else
672 # As a last resort, use the slow shell script. We don't cache a
673 # path for INSTALL within a source directory, because that will
674 # break other packages using the cache if that directory is
675 # removed, or if the path is relative.
676 INSTALL="$ac_install_sh"
679 echo "$ac_t""$INSTALL" 1>&6
681 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
682 # It thinks the first close brace ends the variable substitution.
683 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
685 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
687 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
689 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
690 echo "configure:691: checking whether build environment is sane" >&5
691 # Just in case
692 sleep 1
693 echo timestamp > conftestfile
694 # Do `set' in a subshell so we don't clobber the current shell's
695 # arguments. Must try -L first in case configure is actually a
696 # symlink; some systems play weird games with the mod time of symlinks
697 # (eg FreeBSD returns the mod time of the symlink's containing
698 # directory).
699 if (
700 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
701 if test "$*" = "X"; then
702 # -L didn't work.
703 set X `ls -t $srcdir/configure conftestfile`
705 if test "$*" != "X $srcdir/configure conftestfile" \
706 && test "$*" != "X conftestfile $srcdir/configure"; then
708 # If neither matched, then we have a broken ls. This can happen
709 # if, for instance, CONFIG_SHELL is bash and it inherits a
710 # broken ls alias from the environment. This has actually
711 # happened. Such a system could not be considered "sane".
712 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
713 alias in your environment" 1>&2; exit 1; }
716 test "$2" = conftestfile
718 then
719 # Ok.
721 else
722 { echo "configure: error: newly created file is older than distributed files!
723 Check your system clock" 1>&2; exit 1; }
725 rm -f conftest*
726 echo "$ac_t""yes" 1>&6
727 if test "$program_transform_name" = s,x,x,; then
728 program_transform_name=
729 else
730 # Double any \ or $. echo might interpret backslashes.
731 cat <<\EOF_SED > conftestsed
732 s,\\,\\\\,g; s,\$,$$,g
733 EOF_SED
734 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
735 rm -f conftestsed
737 test "$program_prefix" != NONE &&
738 program_transform_name="s,^,${program_prefix},; $program_transform_name"
739 # Use a double $ so make ignores it.
740 test "$program_suffix" != NONE &&
741 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
743 # sed with no file args requires a program.
744 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
746 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
747 echo "configure:748: checking whether ${MAKE-make} sets \${MAKE}" >&5
748 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
749 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
750 echo $ac_n "(cached) $ac_c" 1>&6
751 else
752 cat > conftestmake <<\EOF
753 all:
754 @echo 'ac_maketemp="${MAKE}"'
756 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
757 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
758 if test -n "$ac_maketemp"; then
759 eval ac_cv_prog_make_${ac_make}_set=yes
760 else
761 eval ac_cv_prog_make_${ac_make}_set=no
763 rm -f conftestmake
765 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
766 echo "$ac_t""yes" 1>&6
767 SET_MAKE=
768 else
769 echo "$ac_t""no" 1>&6
770 SET_MAKE="MAKE=${MAKE-make}"
773 if test $host != $build; then
774 ac_tool_prefix=${host_alias}-
775 else
776 ac_tool_prefix=
779 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
780 echo "configure:781: checking for Cygwin environment" >&5
781 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
782 echo $ac_n "(cached) $ac_c" 1>&6
783 else
784 cat > conftest.$ac_ext <<EOF
785 #line 786 "configure"
786 #include "confdefs.h"
788 int main() {
790 #ifndef __CYGWIN__
791 #define __CYGWIN__ __CYGWIN32__
792 #endif
793 return __CYGWIN__;
794 ; return 0; }
796 if { (eval echo configure:797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
797 rm -rf conftest*
798 ac_cv_cygwin=yes
799 else
800 echo "configure: failed program was:" >&5
801 cat conftest.$ac_ext >&5
802 rm -rf conftest*
803 ac_cv_cygwin=no
805 rm -f conftest*
806 rm -f conftest*
809 echo "$ac_t""$ac_cv_cygwin" 1>&6
810 CYGWIN=
811 test "$ac_cv_cygwin" = yes && CYGWIN=yes
812 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
813 echo "configure:814: checking for mingw32 environment" >&5
814 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
815 echo $ac_n "(cached) $ac_c" 1>&6
816 else
817 cat > conftest.$ac_ext <<EOF
818 #line 819 "configure"
819 #include "confdefs.h"
821 int main() {
822 return __MINGW32__;
823 ; return 0; }
825 if { (eval echo configure:826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
826 rm -rf conftest*
827 ac_cv_mingw32=yes
828 else
829 echo "configure: failed program was:" >&5
830 cat conftest.$ac_ext >&5
831 rm -rf conftest*
832 ac_cv_mingw32=no
834 rm -f conftest*
835 rm -f conftest*
838 echo "$ac_t""$ac_cv_mingw32" 1>&6
839 MINGW32=
840 test "$ac_cv_mingw32" = yes && MINGW32=yes
842 # Check whether --enable-multilib or --disable-multilib was given.
843 if test "${enable_multilib+set}" = set; then
844 enableval="$enable_multilib"
845 case "${enableval}" in
846 yes) multilib=yes ;;
847 no) multilib=no ;;
848 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
849 esac
850 else
851 multilib=yes
855 # When building with srcdir == objdir, links to the source files will
856 # be created in directories within the target_subdir. We have to
857 # adjust toplevel_srcdir accordingly, so that configure finds
858 # install-sh and other auxiliary files that live in the top-level
859 # source directory.
860 if test "${srcdir}" = "."; then
861 if test -z "${with_target_subdir}"; then
862 toprel=".."
863 else
864 if test "${with_target_subdir}" != "."; then
865 toprel="${with_multisrctop}../.."
866 else
867 toprel="${with_multisrctop}.."
870 else
871 toprel=".."
874 libgcj_basedir=$srcdir/$toprel/./libjava
877 ac_aux_dir=
878 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
879 if test -f $ac_dir/install-sh; then
880 ac_aux_dir=$ac_dir
881 ac_install_sh="$ac_aux_dir/install-sh -c"
882 break
883 elif test -f $ac_dir/install.sh; then
884 ac_aux_dir=$ac_dir
885 ac_install_sh="$ac_aux_dir/install.sh -c"
886 break
888 done
889 if test -z "$ac_aux_dir"; then
890 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
892 ac_config_guess=$ac_aux_dir/config.guess
893 ac_config_sub=$ac_aux_dir/config.sub
894 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
896 if :; then :; else
897 # This overrides the previous occurrence for automake, but not for
898 # autoconf, which is exactly what we want.
899 ac_aux_dir=
900 for ac_dir in .. $srcdir/..; do
901 if test -f $ac_dir/install-sh; then
902 ac_aux_dir=$ac_dir
903 ac_install_sh="$ac_aux_dir/install-sh -c"
904 break
905 elif test -f $ac_dir/install.sh; then
906 ac_aux_dir=$ac_dir
907 ac_install_sh="$ac_aux_dir/install.sh -c"
908 break
910 done
911 if test -z "$ac_aux_dir"; then
912 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
914 ac_config_guess=$ac_aux_dir/config.guess
915 ac_config_sub=$ac_aux_dir/config.sub
916 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
920 # This works around an automake problem.
921 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
925 # Do some error checking and defaulting for the host and target type.
926 # The inputs are:
927 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
929 # The rules are:
930 # 1. You are not allowed to specify --host, --target, and nonopt at the
931 # same time.
932 # 2. Host defaults to nonopt.
933 # 3. If nonopt is not specified, then host defaults to the current host,
934 # as determined by config.guess.
935 # 4. Target and build default to nonopt.
936 # 5. If nonopt is not specified, then target and build default to host.
938 # The aliases save the names the user supplied, while $host etc.
939 # will get canonicalized.
940 case $host---$target---$nonopt in
941 NONE---*---* | *---NONE---* | *---*---NONE) ;;
942 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
943 esac
946 # Make sure we can run config.sub.
947 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
948 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
951 echo $ac_n "checking host system type""... $ac_c" 1>&6
952 echo "configure:953: checking host system type" >&5
954 host_alias=$host
955 case "$host_alias" in
956 NONE)
957 case $nonopt in
958 NONE)
959 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
960 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
961 fi ;;
962 *) host_alias=$nonopt ;;
963 esac ;;
964 esac
966 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
967 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
968 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
969 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
970 echo "$ac_t""$host" 1>&6
972 echo $ac_n "checking target system type""... $ac_c" 1>&6
973 echo "configure:974: checking target system type" >&5
975 target_alias=$target
976 case "$target_alias" in
977 NONE)
978 case $nonopt in
979 NONE) target_alias=$host_alias ;;
980 *) target_alias=$nonopt ;;
981 esac ;;
982 esac
984 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
985 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 echo "$ac_t""$target" 1>&6
990 echo $ac_n "checking build system type""... $ac_c" 1>&6
991 echo "configure:992: checking build system type" >&5
993 build_alias=$build
994 case "$build_alias" in
995 NONE)
996 case $nonopt in
997 NONE) build_alias=$host_alias ;;
998 *) build_alias=$nonopt ;;
999 esac ;;
1000 esac
1002 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1003 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1004 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1005 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1006 echo "$ac_t""$build" 1>&6
1008 test "$host_alias" != "$target_alias" &&
1009 test "$program_prefix$program_suffix$program_transform_name" = \
1010 NONENONEs,x,x, &&
1011 program_prefix=${target_alias}-
1017 # Extract the first word of "gcc", so it can be a program name with args.
1018 set dummy gcc; ac_word=$2
1019 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1020 echo "configure:1021: checking for $ac_word" >&5
1021 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
1023 else
1024 if test -n "$CC"; then
1025 ac_cv_prog_CC="$CC" # Let the user override the test.
1026 else
1027 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1028 ac_dummy="$PATH"
1029 for ac_dir in $ac_dummy; do
1030 test -z "$ac_dir" && ac_dir=.
1031 if test -f $ac_dir/$ac_word; then
1032 ac_cv_prog_CC="gcc"
1033 break
1035 done
1036 IFS="$ac_save_ifs"
1039 CC="$ac_cv_prog_CC"
1040 if test -n "$CC"; then
1041 echo "$ac_t""$CC" 1>&6
1042 else
1043 echo "$ac_t""no" 1>&6
1046 if test -z "$CC"; then
1047 # Extract the first word of "cc", so it can be a program name with args.
1048 set dummy cc; ac_word=$2
1049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1050 echo "configure:1051: checking for $ac_word" >&5
1051 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1052 echo $ac_n "(cached) $ac_c" 1>&6
1053 else
1054 if test -n "$CC"; then
1055 ac_cv_prog_CC="$CC" # Let the user override the test.
1056 else
1057 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1058 ac_prog_rejected=no
1059 ac_dummy="$PATH"
1060 for ac_dir in $ac_dummy; do
1061 test -z "$ac_dir" && ac_dir=.
1062 if test -f $ac_dir/$ac_word; then
1063 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1064 ac_prog_rejected=yes
1065 continue
1067 ac_cv_prog_CC="cc"
1068 break
1070 done
1071 IFS="$ac_save_ifs"
1072 if test $ac_prog_rejected = yes; then
1073 # We found a bogon in the path, so make sure we never use it.
1074 set dummy $ac_cv_prog_CC
1075 shift
1076 if test $# -gt 0; then
1077 # We chose a different compiler from the bogus one.
1078 # However, it has the same basename, so the bogon will be chosen
1079 # first if we set CC to just the basename; use the full file name.
1080 shift
1081 set dummy "$ac_dir/$ac_word" "$@"
1082 shift
1083 ac_cv_prog_CC="$@"
1088 CC="$ac_cv_prog_CC"
1089 if test -n "$CC"; then
1090 echo "$ac_t""$CC" 1>&6
1091 else
1092 echo "$ac_t""no" 1>&6
1095 if test -z "$CC"; then
1096 case "`uname -s`" in
1097 *win32* | *WIN32*)
1098 # Extract the first word of "cl", so it can be a program name with args.
1099 set dummy cl; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1103 echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105 if test -n "$CC"; then
1106 ac_cv_prog_CC="$CC" # Let the user override the test.
1107 else
1108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1109 ac_dummy="$PATH"
1110 for ac_dir in $ac_dummy; do
1111 test -z "$ac_dir" && ac_dir=.
1112 if test -f $ac_dir/$ac_word; then
1113 ac_cv_prog_CC="cl"
1114 break
1116 done
1117 IFS="$ac_save_ifs"
1120 CC="$ac_cv_prog_CC"
1121 if test -n "$CC"; then
1122 echo "$ac_t""$CC" 1>&6
1123 else
1124 echo "$ac_t""no" 1>&6
1127 esac
1129 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1133 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1134 echo "configure:1135: checking whether we are using GNU C" >&5
1135 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1136 echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138 cat > conftest.c <<EOF
1139 #ifdef __GNUC__
1140 yes;
1141 #endif
1143 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1144 ac_cv_prog_gcc=yes
1145 else
1146 ac_cv_prog_gcc=no
1150 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1152 if test $ac_cv_prog_gcc = yes; then
1153 GCC=yes
1154 else
1155 GCC=
1158 ac_test_CFLAGS="${CFLAGS+set}"
1159 ac_save_CFLAGS="$CFLAGS"
1160 CFLAGS=
1161 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1162 echo "configure:1163: checking whether ${CC-cc} accepts -g" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166 echo 'void f(){}' > conftest.c
1167 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1168 ac_cv_prog_cc_g=yes
1169 else
1170 ac_cv_prog_cc_g=no
1172 rm -f conftest*
1176 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1177 if test "$ac_test_CFLAGS" = set; then
1178 CFLAGS="$ac_save_CFLAGS"
1179 elif test $ac_cv_prog_cc_g = yes; then
1180 if test "$GCC" = yes; then
1181 CFLAGS="-g -O2"
1182 else
1183 CFLAGS="-g"
1185 else
1186 if test "$GCC" = yes; then
1187 CFLAGS="-O2"
1188 else
1189 CFLAGS=
1193 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1195 # Extract the first word of "$ac_prog", so it can be a program name with args.
1196 set dummy $ac_prog; ac_word=$2
1197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1198 echo "configure:1199: checking for $ac_word" >&5
1199 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1200 echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202 if test -n "$CXX"; then
1203 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1204 else
1205 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1206 ac_dummy="$PATH"
1207 for ac_dir in $ac_dummy; do
1208 test -z "$ac_dir" && ac_dir=.
1209 if test -f $ac_dir/$ac_word; then
1210 ac_cv_prog_CXX="$ac_prog"
1211 break
1213 done
1214 IFS="$ac_save_ifs"
1217 CXX="$ac_cv_prog_CXX"
1218 if test -n "$CXX"; then
1219 echo "$ac_t""$CXX" 1>&6
1220 else
1221 echo "$ac_t""no" 1>&6
1224 test -n "$CXX" && break
1225 done
1226 test -n "$CXX" || CXX="gcc"
1230 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1231 echo "configure:1232: checking whether we are using GNU C++" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235 cat > conftest.C <<EOF
1236 #ifdef __GNUC__
1237 yes;
1238 #endif
1240 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1241 ac_cv_prog_gxx=yes
1242 else
1243 ac_cv_prog_gxx=no
1247 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1249 if test $ac_cv_prog_gxx = yes; then
1250 GXX=yes
1251 else
1252 GXX=
1255 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1256 ac_save_CXXFLAGS="$CXXFLAGS"
1257 CXXFLAGS=
1258 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1259 echo "configure:1260: checking whether ${CXX-g++} accepts -g" >&5
1260 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1261 echo $ac_n "(cached) $ac_c" 1>&6
1262 else
1263 echo 'void f(){}' > conftest.cc
1264 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1265 ac_cv_prog_cxx_g=yes
1266 else
1267 ac_cv_prog_cxx_g=no
1269 rm -f conftest*
1273 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1274 if test "$ac_test_CXXFLAGS" = set; then
1275 CXXFLAGS="$ac_save_CXXFLAGS"
1276 elif test $ac_cv_prog_cxx_g = yes; then
1277 if test "$GXX" = yes; then
1278 CXXFLAGS="-g -O2"
1279 else
1280 CXXFLAGS="-g"
1282 else
1283 if test "$GXX" = yes; then
1284 CXXFLAGS="-O2"
1285 else
1286 CXXFLAGS=
1291 version=0.0.7
1293 PACKAGE=libjava
1295 VERSION=$version
1297 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1298 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1300 cat >> confdefs.h <<EOF
1301 #define PACKAGE "$PACKAGE"
1304 cat >> confdefs.h <<EOF
1305 #define VERSION "$VERSION"
1310 missing_dir=`cd $ac_aux_dir && pwd`
1311 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1312 echo "configure:1313: checking for working aclocal" >&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 (aclocal --version) < /dev/null > /dev/null 2>&1; then
1317 ACLOCAL=aclocal
1318 echo "$ac_t""found" 1>&6
1319 else
1320 ACLOCAL="$missing_dir/missing aclocal"
1321 echo "$ac_t""missing" 1>&6
1324 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1325 echo "configure:1326: checking for working autoconf" >&5
1326 # Run test in a subshell; some versions of sh will print an error if
1327 # an executable is not found, even if stderr is redirected.
1328 # Redirect stdin to placate older versions of autoconf. Sigh.
1329 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1330 AUTOCONF=autoconf
1331 echo "$ac_t""found" 1>&6
1332 else
1333 AUTOCONF="$missing_dir/missing autoconf"
1334 echo "$ac_t""missing" 1>&6
1337 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1338 echo "configure:1339: checking for working automake" >&5
1339 # Run test in a subshell; some versions of sh will print an error if
1340 # an executable is not found, even if stderr is redirected.
1341 # Redirect stdin to placate older versions of autoconf. Sigh.
1342 if (automake --version) < /dev/null > /dev/null 2>&1; then
1343 AUTOMAKE=automake
1344 echo "$ac_t""found" 1>&6
1345 else
1346 AUTOMAKE="$missing_dir/missing automake"
1347 echo "$ac_t""missing" 1>&6
1350 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1351 echo "configure:1352: checking for working autoheader" >&5
1352 # Run test in a subshell; some versions of sh will print an error if
1353 # an executable is not found, even if stderr is redirected.
1354 # Redirect stdin to placate older versions of autoconf. Sigh.
1355 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1356 AUTOHEADER=autoheader
1357 echo "$ac_t""found" 1>&6
1358 else
1359 AUTOHEADER="$missing_dir/missing autoheader"
1360 echo "$ac_t""missing" 1>&6
1363 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1364 echo "configure:1365: checking for working makeinfo" >&5
1365 # Run test in a subshell; some versions of sh will print an error if
1366 # an executable is not found, even if stderr is redirected.
1367 # Redirect stdin to placate older versions of autoconf. Sigh.
1368 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1369 MAKEINFO=makeinfo
1370 echo "$ac_t""found" 1>&6
1371 else
1372 MAKEINFO="$missing_dir/missing makeinfo"
1373 echo "$ac_t""missing" 1>&6
1378 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
1379 # run it explicitly here, it will be run implicitly before
1380 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1381 # be run before AC_CANONICAL_HOST.
1382 echo $ac_n "checking build system type""... $ac_c" 1>&6
1383 echo "configure:1384: checking build system type" >&5
1385 build_alias=$build
1386 case "$build_alias" in
1387 NONE)
1388 case $nonopt in
1389 NONE) build_alias=$host_alias ;;
1390 *) build_alias=$nonopt ;;
1391 esac ;;
1392 esac
1394 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1395 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1396 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1397 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1398 echo "$ac_t""$build" 1>&6
1401 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1402 set dummy ${ac_tool_prefix}as; ac_word=$2
1403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1404 echo "configure:1405: checking for $ac_word" >&5
1405 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407 else
1408 if test -n "$AS"; then
1409 ac_cv_prog_AS="$AS" # Let the user override the test.
1410 else
1411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1412 ac_dummy="$PATH"
1413 for ac_dir in $ac_dummy; do
1414 test -z "$ac_dir" && ac_dir=.
1415 if test -f $ac_dir/$ac_word; then
1416 ac_cv_prog_AS="${ac_tool_prefix}as"
1417 break
1419 done
1420 IFS="$ac_save_ifs"
1421 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1424 AS="$ac_cv_prog_AS"
1425 if test -n "$AS"; then
1426 echo "$ac_t""$AS" 1>&6
1427 else
1428 echo "$ac_t""no" 1>&6
1433 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1434 set dummy ${ac_tool_prefix}ar; ac_word=$2
1435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1436 echo "configure:1437: checking for $ac_word" >&5
1437 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1438 echo $ac_n "(cached) $ac_c" 1>&6
1439 else
1440 if test -n "$AR"; then
1441 ac_cv_prog_AR="$AR" # Let the user override the test.
1442 else
1443 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1444 ac_dummy="$PATH"
1445 for ac_dir in $ac_dummy; do
1446 test -z "$ac_dir" && ac_dir=.
1447 if test -f $ac_dir/$ac_word; then
1448 ac_cv_prog_AR="${ac_tool_prefix}ar"
1449 break
1451 done
1452 IFS="$ac_save_ifs"
1453 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1456 AR="$ac_cv_prog_AR"
1457 if test -n "$AR"; then
1458 echo "$ac_t""$AR" 1>&6
1459 else
1460 echo "$ac_t""no" 1>&6
1465 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1466 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1468 echo "configure:1469: checking for $ac_word" >&5
1469 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1471 else
1472 if test -n "$RANLIB"; then
1473 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1474 else
1475 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1476 ac_dummy="$PATH"
1477 for ac_dir in $ac_dummy; do
1478 test -z "$ac_dir" && ac_dir=.
1479 if test -f $ac_dir/$ac_word; then
1480 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1481 break
1483 done
1484 IFS="$ac_save_ifs"
1487 RANLIB="$ac_cv_prog_RANLIB"
1488 if test -n "$RANLIB"; then
1489 echo "$ac_t""$RANLIB" 1>&6
1490 else
1491 echo "$ac_t""no" 1>&6
1495 if test -z "$ac_cv_prog_RANLIB"; then
1496 if test -n "$ac_tool_prefix"; then
1497 # Extract the first word of "ranlib", so it can be a program name with args.
1498 set dummy ranlib; ac_word=$2
1499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1500 echo "configure:1501: checking for $ac_word" >&5
1501 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1502 echo $ac_n "(cached) $ac_c" 1>&6
1503 else
1504 if test -n "$RANLIB"; then
1505 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1506 else
1507 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1508 ac_dummy="$PATH"
1509 for ac_dir in $ac_dummy; do
1510 test -z "$ac_dir" && ac_dir=.
1511 if test -f $ac_dir/$ac_word; then
1512 ac_cv_prog_RANLIB="ranlib"
1513 break
1515 done
1516 IFS="$ac_save_ifs"
1517 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1520 RANLIB="$ac_cv_prog_RANLIB"
1521 if test -n "$RANLIB"; then
1522 echo "$ac_t""$RANLIB" 1>&6
1523 else
1524 echo "$ac_t""no" 1>&6
1527 else
1528 RANLIB=":"
1533 # Find a good install program. We prefer a C program (faster),
1534 # so one script is as good as another. But avoid the broken or
1535 # incompatible versions:
1536 # SysV /etc/install, /usr/sbin/install
1537 # SunOS /usr/etc/install
1538 # IRIX /sbin/install
1539 # AIX /bin/install
1540 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1541 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1542 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1543 # ./install, which can be erroneously created by make from ./install.sh.
1544 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1545 echo "configure:1546: checking for a BSD compatible install" >&5
1546 if test -z "$INSTALL"; then
1547 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1548 echo $ac_n "(cached) $ac_c" 1>&6
1549 else
1550 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1551 for ac_dir in $PATH; do
1552 # Account for people who put trailing slashes in PATH elements.
1553 case "$ac_dir/" in
1554 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1556 # OSF1 and SCO ODT 3.0 have their own names for install.
1557 # Don't use installbsd from OSF since it installs stuff as root
1558 # by default.
1559 for ac_prog in ginstall scoinst install; do
1560 if test -f $ac_dir/$ac_prog; then
1561 if test $ac_prog = install &&
1562 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1563 # AIX install. It has an incompatible calling convention.
1565 else
1566 ac_cv_path_install="$ac_dir/$ac_prog -c"
1567 break 2
1570 done
1572 esac
1573 done
1574 IFS="$ac_save_IFS"
1577 if test "${ac_cv_path_install+set}" = set; then
1578 INSTALL="$ac_cv_path_install"
1579 else
1580 # As a last resort, use the slow shell script. We don't cache a
1581 # path for INSTALL within a source directory, because that will
1582 # break other packages using the cache if that directory is
1583 # removed, or if the path is relative.
1584 INSTALL="$ac_install_sh"
1587 echo "$ac_t""$INSTALL" 1>&6
1589 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1590 # It thinks the first close brace ends the variable substitution.
1591 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1593 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1595 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1598 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1599 echo "configure:1600: checking whether to enable maintainer-specific portions of Makefiles" >&5
1600 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1601 if test "${enable_maintainer_mode+set}" = set; then
1602 enableval="$enable_maintainer_mode"
1603 USE_MAINTAINER_MODE=$enableval
1604 else
1605 USE_MAINTAINER_MODE=no
1608 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1611 if test $USE_MAINTAINER_MODE = yes; then
1612 MAINTAINER_MODE_TRUE=
1613 MAINTAINER_MODE_FALSE='#'
1614 else
1615 MAINTAINER_MODE_TRUE='#'
1616 MAINTAINER_MODE_FALSE=
1618 MAINT=$MAINTAINER_MODE_TRUE
1622 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1623 # at least currently, we never actually build a program, so we never
1624 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1625 # fails, because we are probably configuring with a cross compiler
1626 # which cant create executables. So we include AC_EXEEXT to keep
1627 # automake happy, but we don't execute it, since we don't care about
1628 # the result.
1629 if false; then
1630 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
1631 # to nothing, so nothing would remain between `then' and `fi' if it
1632 # were not for the `:' below.
1636 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1637 echo "configure:1638: checking for executable suffix" >&5
1638 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1639 echo $ac_n "(cached) $ac_c" 1>&6
1640 else
1641 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1642 ac_cv_exeext=.exe
1643 else
1644 rm -f conftest*
1645 echo 'int main () { return 0; }' > conftest.$ac_ext
1646 ac_cv_exeext=
1647 if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1648 for file in conftest.*; do
1649 case $file in
1650 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1651 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1652 esac
1653 done
1654 else
1655 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1657 rm -f conftest*
1658 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1662 EXEEXT=""
1663 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1664 echo "$ac_t""${ac_cv_exeext}" 1>&6
1665 ac_exeext=$EXEEXT
1669 # configure.host sets the following important variables
1670 # libgcj_cflags - host specific C compiler flags
1671 # libgcj_cxxflags - host specific C++ compiler flags
1672 # libgcj_javaflags - host specific Java compiler flags
1674 libgcj_cflags=
1675 libgcj_cxxflags=
1676 libgcj_javaflags=
1678 . ${srcdir}/configure.host
1680 LIBGCJ_CFLAGS="${libgcj_cflags}"
1681 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1682 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1692 # Only use libltdl for native builds.
1693 if test -z "${with_cross_host}"; then
1694 case $enable_ltdl_convenience in
1695 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1696 "") enable_ltdl_convenience=yes
1697 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1698 esac
1699 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1700 INCLTDL='-I${top_srcdir}/''libltdl'
1703 DIRLTDL=libltdl
1704 cat >> confdefs.h <<\EOF
1705 #define USE_LTDL 1
1708 # Sigh. Libtool's macro doesn't do the right thing.
1709 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1710 # FIXME: this is a hack.
1711 sub_auxdir="`cd $ac_aux_dir && pwd`"
1712 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1717 # Check whether --enable-shared or --disable-shared was given.
1718 if test "${enable_shared+set}" = set; then
1719 enableval="$enable_shared"
1720 p=${PACKAGE-default}
1721 case $enableval in
1722 yes) enable_shared=yes ;;
1723 no) enable_shared=no ;;
1725 enable_shared=no
1726 # Look at the argument we got. We use all the common list separators.
1727 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1728 for pkg in $enableval; do
1729 if test "X$pkg" = "X$p"; then
1730 enable_shared=yes
1732 done
1733 IFS="$ac_save_ifs"
1735 esac
1736 else
1737 enable_shared=yes
1740 # Check whether --enable-static or --disable-static was given.
1741 if test "${enable_static+set}" = set; then
1742 enableval="$enable_static"
1743 p=${PACKAGE-default}
1744 case $enableval in
1745 yes) enable_static=yes ;;
1746 no) enable_static=no ;;
1748 enable_static=no
1749 # Look at the argument we got. We use all the common list separators.
1750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1751 for pkg in $enableval; do
1752 if test "X$pkg" = "X$p"; then
1753 enable_static=yes
1755 done
1756 IFS="$ac_save_ifs"
1758 esac
1759 else
1760 enable_static=yes
1763 # Check whether --enable-fast-install or --disable-fast-install was given.
1764 if test "${enable_fast_install+set}" = set; then
1765 enableval="$enable_fast_install"
1766 p=${PACKAGE-default}
1767 case $enableval in
1768 yes) enable_fast_install=yes ;;
1769 no) enable_fast_install=no ;;
1771 enable_fast_install=no
1772 # Look at the argument we got. We use all the common list separators.
1773 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1774 for pkg in $enableval; do
1775 if test "X$pkg" = "X$p"; then
1776 enable_fast_install=yes
1778 done
1779 IFS="$ac_save_ifs"
1781 esac
1782 else
1783 enable_fast_install=yes
1786 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1787 if test "${with_gnu_ld+set}" = set; then
1788 withval="$with_gnu_ld"
1789 test "$withval" = no || with_gnu_ld=yes
1790 else
1791 with_gnu_ld=no
1794 ac_prog=ld
1795 if test "$GCC" = yes; then
1796 # Check if gcc -print-prog-name=ld gives a path.
1797 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1798 echo "configure:1799: checking for ld used by GCC" >&5
1799 case $host in
1800 *-*-mingw*)
1801 # gcc leaves a trailing carriage return which upsets mingw
1802 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1804 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1805 esac
1806 case $ac_prog in
1807 # Accept absolute paths.
1808 [\\/]* | [A-Za-z]:[\\/]*)
1809 re_direlt='/[^/][^/]*/\.\./'
1810 # Canonicalize the path of ld
1811 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1812 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1813 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1814 done
1815 test -z "$LD" && LD="$ac_prog"
1818 # If it fails, then pretend we aren't using GCC.
1819 ac_prog=ld
1822 # If it is relative, then search for the first ld in PATH.
1823 with_gnu_ld=unknown
1825 esac
1826 elif test "$with_gnu_ld" = yes; then
1827 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1828 echo "configure:1829: checking for GNU ld" >&5
1829 else
1830 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1831 echo "configure:1832: checking for non-GNU ld" >&5
1833 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1834 echo $ac_n "(cached) $ac_c" 1>&6
1835 else
1836 if test -z "$LD"; then
1837 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1838 for ac_dir in $PATH; do
1839 test -z "$ac_dir" && ac_dir=.
1840 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1841 lt_cv_path_LD="$ac_dir/$ac_prog"
1842 # Check to see if the program is GNU ld. I'd rather use --version,
1843 # but apparently some GNU ld's only accept -v.
1844 # Break only if it was the GNU/non-GNU ld that we prefer.
1845 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1846 test "$with_gnu_ld" != no && break
1847 else
1848 test "$with_gnu_ld" != yes && break
1851 done
1852 IFS="$ac_save_ifs"
1853 else
1854 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1858 LD="$lt_cv_path_LD"
1859 if test -n "$LD"; then
1860 echo "$ac_t""$LD" 1>&6
1861 else
1862 echo "$ac_t""no" 1>&6
1864 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1865 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1866 echo "configure:1867: checking if the linker ($LD) is GNU ld" >&5
1867 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1868 echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1871 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1872 lt_cv_prog_gnu_ld=yes
1873 else
1874 lt_cv_prog_gnu_ld=no
1878 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1879 with_gnu_ld=$lt_cv_prog_gnu_ld
1882 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1883 echo "configure:1884: checking for $LD option to reload object files" >&5
1884 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887 lt_cv_ld_reload_flag='-r'
1890 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1891 reload_flag=$lt_cv_ld_reload_flag
1892 test -n "$reload_flag" && reload_flag=" $reload_flag"
1894 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1895 echo "configure:1896: checking for BSD-compatible nm" >&5
1896 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1897 echo $ac_n "(cached) $ac_c" 1>&6
1898 else
1899 if test -n "$NM"; then
1900 # Let the user override the test.
1901 lt_cv_path_NM="$NM"
1902 else
1903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1904 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1905 test -z "$ac_dir" && ac_dir=.
1906 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1907 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1908 # Check to see if the nm accepts a BSD-compat flag.
1909 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1910 # nm: unknown option "B" ignored
1911 # Tru64's nm complains that /dev/null is an invalid object file
1912 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1913 lt_cv_path_NM="$tmp_nm -B"
1914 break
1915 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1916 lt_cv_path_NM="$tmp_nm -p"
1917 break
1918 else
1919 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1920 continue # so that we can try to find one that supports BSD flags
1923 done
1924 IFS="$ac_save_ifs"
1925 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1929 NM="$lt_cv_path_NM"
1930 echo "$ac_t""$NM" 1>&6
1932 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1933 echo "configure:1934: checking how to recognise dependant libraries" >&5
1934 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937 lt_cv_file_magic_cmd='$MAGIC_CMD'
1938 lt_cv_file_magic_test_file=
1939 lt_cv_deplibs_check_method='unknown'
1940 # Need to set the preceding variable on all platforms that support
1941 # interlibrary dependencies.
1942 # 'none' -- dependencies not supported.
1943 # `unknown' -- same as none, but documents that we really don't know.
1944 # 'pass_all' -- all dependencies passed with no checks.
1945 # 'test_compile' -- check by making test program.
1946 # 'file_magic [regex]' -- check by looking for files in library path
1947 # which responds to the $file_magic_cmd with a given egrep regex.
1948 # If you have `file' or equivalent on your system and you're not sure
1949 # whether `pass_all' will *always* work, you probably want this one.
1951 case $host_os in
1952 aix*)
1953 lt_cv_deplibs_check_method=pass_all
1956 beos*)
1957 lt_cv_deplibs_check_method=pass_all
1960 bsdi4*)
1961 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1962 lt_cv_file_magic_cmd='/usr/bin/file -L'
1963 lt_cv_file_magic_test_file=/shlib/libc.so
1966 cygwin* | mingw* |pw32*)
1967 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1968 lt_cv_file_magic_cmd='$OBJDUMP -f'
1971 darwin* | rhapsody*)
1972 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1973 lt_cv_file_magic_cmd='/usr/bin/file -L'
1974 case "$host_os" in
1975 rhapsody* | darwin1.012)
1976 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1978 *) # Darwin 1.3 on
1979 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1981 esac
1984 freebsd* )
1985 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1986 case $host_cpu in
1987 i*86 )
1988 # Not sure whether the presence of OpenBSD here was a mistake.
1989 # Let's accept both of them until this is cleared up.
1990 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1991 lt_cv_file_magic_cmd=/usr/bin/file
1992 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1994 esac
1995 else
1996 lt_cv_deplibs_check_method=pass_all
2000 gnu*)
2001 lt_cv_deplibs_check_method=pass_all
2004 hpux10.20*|hpux11*)
2005 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2006 lt_cv_file_magic_cmd=/usr/bin/file
2007 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2010 irix5* | irix6*)
2011 case $host_os in
2012 irix5*)
2013 # this will be overridden with pass_all, but let us keep it just in case
2014 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2017 case $LD in
2018 *-32|*"-32 ") libmagic=32-bit;;
2019 *-n32|*"-n32 ") libmagic=N32;;
2020 *-64|*"-64 ") libmagic=64-bit;;
2021 *) libmagic=never-match;;
2022 esac
2023 # this will be overridden with pass_all, but let us keep it just in case
2024 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2026 esac
2027 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2028 lt_cv_deplibs_check_method=pass_all
2031 # This must be Linux ELF.
2032 linux-gnu*)
2033 case $host_cpu in
2034 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2035 lt_cv_deplibs_check_method=pass_all ;;
2037 # glibc up to 2.1.1 does not perform some relocations on ARM
2038 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2039 esac
2040 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2043 netbsd*)
2044 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2045 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2046 else
2047 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2051 newsos6)
2052 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2053 lt_cv_file_magic_cmd=/usr/bin/file
2054 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2057 osf3* | osf4* | osf5*)
2058 # this will be overridden with pass_all, but let us keep it just in case
2059 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2060 lt_cv_file_magic_test_file=/shlib/libc.so
2061 lt_cv_deplibs_check_method=pass_all
2064 sco3.2v5*)
2065 lt_cv_deplibs_check_method=pass_all
2068 solaris*)
2069 lt_cv_deplibs_check_method=pass_all
2070 lt_cv_file_magic_test_file=/lib/libc.so
2073 sysv5uw[78]* | sysv4*uw2*)
2074 lt_cv_deplibs_check_method=pass_all
2077 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2078 case $host_vendor in
2079 ncr)
2080 lt_cv_deplibs_check_method=pass_all
2082 motorola)
2083 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]'
2084 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2086 esac
2088 esac
2092 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2093 file_magic_cmd=$lt_cv_file_magic_cmd
2094 deplibs_check_method=$lt_cv_deplibs_check_method
2096 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2097 echo "configure:2098: checking for object suffix" >&5
2098 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2099 echo $ac_n "(cached) $ac_c" 1>&6
2100 else
2101 rm -f conftest*
2102 echo 'int i = 1;' > conftest.$ac_ext
2103 if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2104 for ac_file in conftest.*; do
2105 case $ac_file in
2106 *.c) ;;
2107 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2108 esac
2109 done
2110 else
2111 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2113 rm -f conftest*
2116 echo "$ac_t""$ac_cv_objext" 1>&6
2117 OBJEXT=$ac_cv_objext
2118 ac_objext=$ac_cv_objext
2120 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2122 # Only perform the check for file, if the check method requires it
2123 case $deplibs_check_method in
2124 file_magic*)
2125 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2126 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2127 echo "configure:2128: checking for ${ac_tool_prefix}file" >&5
2128 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131 case $MAGIC_CMD in
2133 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2135 ?:/*)
2136 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2139 ac_save_MAGIC_CMD="$MAGIC_CMD"
2140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2141 ac_dummy="/usr/bin:$PATH"
2142 for ac_dir in $ac_dummy; do
2143 test -z "$ac_dir" && ac_dir=.
2144 if test -f $ac_dir/${ac_tool_prefix}file; then
2145 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2146 if test -n "$file_magic_test_file"; then
2147 case $deplibs_check_method in
2148 "file_magic "*)
2149 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2150 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2151 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2152 egrep "$file_magic_regex" > /dev/null; then
2154 else
2155 cat <<EOF 1>&2
2157 *** Warning: the command libtool uses to detect shared libraries,
2158 *** $file_magic_cmd, produces output that libtool cannot recognize.
2159 *** The result is that libtool may fail to recognize shared libraries
2160 *** as such. This will affect the creation of libtool libraries that
2161 *** depend on shared libraries, but programs linked with such libtool
2162 *** libraries will work regardless of this problem. Nevertheless, you
2163 *** may want to report the problem to your system manager and/or to
2164 *** bug-libtool@gnu.org
2167 fi ;;
2168 esac
2170 break
2172 done
2173 IFS="$ac_save_ifs"
2174 MAGIC_CMD="$ac_save_MAGIC_CMD"
2176 esac
2179 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2180 if test -n "$MAGIC_CMD"; then
2181 echo "$ac_t""$MAGIC_CMD" 1>&6
2182 else
2183 echo "$ac_t""no" 1>&6
2186 if test -z "$lt_cv_path_MAGIC_CMD"; then
2187 if test -n "$ac_tool_prefix"; then
2188 echo $ac_n "checking for file""... $ac_c" 1>&6
2189 echo "configure:2190: checking for file" >&5
2190 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193 case $MAGIC_CMD in
2195 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2197 ?:/*)
2198 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2201 ac_save_MAGIC_CMD="$MAGIC_CMD"
2202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2203 ac_dummy="/usr/bin:$PATH"
2204 for ac_dir in $ac_dummy; do
2205 test -z "$ac_dir" && ac_dir=.
2206 if test -f $ac_dir/file; then
2207 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2208 if test -n "$file_magic_test_file"; then
2209 case $deplibs_check_method in
2210 "file_magic "*)
2211 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2212 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2213 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2214 egrep "$file_magic_regex" > /dev/null; then
2216 else
2217 cat <<EOF 1>&2
2219 *** Warning: the command libtool uses to detect shared libraries,
2220 *** $file_magic_cmd, produces output that libtool cannot recognize.
2221 *** The result is that libtool may fail to recognize shared libraries
2222 *** as such. This will affect the creation of libtool libraries that
2223 *** depend on shared libraries, but programs linked with such libtool
2224 *** libraries will work regardless of this problem. Nevertheless, you
2225 *** may want to report the problem to your system manager and/or to
2226 *** bug-libtool@gnu.org
2229 fi ;;
2230 esac
2232 break
2234 done
2235 IFS="$ac_save_ifs"
2236 MAGIC_CMD="$ac_save_MAGIC_CMD"
2238 esac
2241 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2242 if test -n "$MAGIC_CMD"; then
2243 echo "$ac_t""$MAGIC_CMD" 1>&6
2244 else
2245 echo "$ac_t""no" 1>&6
2248 else
2249 MAGIC_CMD=:
2255 esac
2257 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2258 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2260 echo "configure:2261: checking for $ac_word" >&5
2261 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2262 echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264 if test -n "$RANLIB"; then
2265 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2266 else
2267 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2268 ac_dummy="$PATH"
2269 for ac_dir in $ac_dummy; do
2270 test -z "$ac_dir" && ac_dir=.
2271 if test -f $ac_dir/$ac_word; then
2272 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2273 break
2275 done
2276 IFS="$ac_save_ifs"
2279 RANLIB="$ac_cv_prog_RANLIB"
2280 if test -n "$RANLIB"; then
2281 echo "$ac_t""$RANLIB" 1>&6
2282 else
2283 echo "$ac_t""no" 1>&6
2287 if test -z "$ac_cv_prog_RANLIB"; then
2288 if test -n "$ac_tool_prefix"; then
2289 # Extract the first word of "ranlib", so it can be a program name with args.
2290 set dummy ranlib; ac_word=$2
2291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2292 echo "configure:2293: checking for $ac_word" >&5
2293 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2294 echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296 if test -n "$RANLIB"; then
2297 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2298 else
2299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2300 ac_dummy="$PATH"
2301 for ac_dir in $ac_dummy; do
2302 test -z "$ac_dir" && ac_dir=.
2303 if test -f $ac_dir/$ac_word; then
2304 ac_cv_prog_RANLIB="ranlib"
2305 break
2307 done
2308 IFS="$ac_save_ifs"
2309 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2312 RANLIB="$ac_cv_prog_RANLIB"
2313 if test -n "$RANLIB"; then
2314 echo "$ac_t""$RANLIB" 1>&6
2315 else
2316 echo "$ac_t""no" 1>&6
2319 else
2320 RANLIB=":"
2324 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2325 set dummy ${ac_tool_prefix}strip; ac_word=$2
2326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2327 echo "configure:2328: checking for $ac_word" >&5
2328 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2329 echo $ac_n "(cached) $ac_c" 1>&6
2330 else
2331 if test -n "$STRIP"; then
2332 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2333 else
2334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2335 ac_dummy="$PATH"
2336 for ac_dir in $ac_dummy; do
2337 test -z "$ac_dir" && ac_dir=.
2338 if test -f $ac_dir/$ac_word; then
2339 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2340 break
2342 done
2343 IFS="$ac_save_ifs"
2346 STRIP="$ac_cv_prog_STRIP"
2347 if test -n "$STRIP"; then
2348 echo "$ac_t""$STRIP" 1>&6
2349 else
2350 echo "$ac_t""no" 1>&6
2354 if test -z "$ac_cv_prog_STRIP"; then
2355 if test -n "$ac_tool_prefix"; then
2356 # Extract the first word of "strip", so it can be a program name with args.
2357 set dummy strip; ac_word=$2
2358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359 echo "configure:2360: checking for $ac_word" >&5
2360 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363 if test -n "$STRIP"; then
2364 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2365 else
2366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2367 ac_dummy="$PATH"
2368 for ac_dir in $ac_dummy; do
2369 test -z "$ac_dir" && ac_dir=.
2370 if test -f $ac_dir/$ac_word; then
2371 ac_cv_prog_STRIP="strip"
2372 break
2374 done
2375 IFS="$ac_save_ifs"
2376 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2379 STRIP="$ac_cv_prog_STRIP"
2380 if test -n "$STRIP"; then
2381 echo "$ac_t""$STRIP" 1>&6
2382 else
2383 echo "$ac_t""no" 1>&6
2386 else
2387 STRIP=":"
2392 # Check for any special flags to pass to ltconfig.
2393 libtool_flags="--cache-file=$cache_file"
2394 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2395 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2396 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2397 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2398 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2399 libtool_flags="$libtool_flags --enable-dlopen"
2401 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2402 if test "${enable_libtool_lock+set}" = set; then
2403 enableval="$enable_libtool_lock"
2407 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2408 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2410 # Check whether --with-pic or --without-pic was given.
2411 if test "${with_pic+set}" = set; then
2412 withval="$with_pic"
2413 pic_mode="$withval"
2414 else
2415 pic_mode=default
2418 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2419 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2421 # Some flags need to be propagated to the compiler or linker for good
2422 # libtool support.
2423 case $host in
2424 *-*-irix6*)
2425 # Find out which ABI we are using.
2426 echo '#line 2427 "configure"' > conftest.$ac_ext
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428 case `/usr/bin/file conftest.$ac_objext` in
2429 *32-bit*)
2430 LD="${LD-ld} -32"
2432 *N32*)
2433 LD="${LD-ld} -n32"
2435 *64-bit*)
2436 LD="${LD-ld} -64"
2438 esac
2440 rm -rf conftest*
2443 *-*-sco3.2v5*)
2444 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2445 SAVE_CFLAGS="$CFLAGS"
2446 CFLAGS="$CFLAGS -belf"
2447 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2448 echo "configure:2449: checking whether the C compiler needs -belf" >&5
2449 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2451 else
2453 ac_ext=c
2454 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2455 ac_cpp='$CPP $CPPFLAGS'
2456 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2457 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2458 cross_compiling=$ac_cv_prog_cc_cross
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2464 int main() {
2466 ; return 0; }
2468 if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469 rm -rf conftest*
2470 lt_cv_cc_needs_belf=yes
2471 else
2472 echo "configure: failed program was:" >&5
2473 cat conftest.$ac_ext >&5
2474 rm -rf conftest*
2475 lt_cv_cc_needs_belf=no
2477 rm -f conftest*
2478 ac_ext=c
2479 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2480 ac_cpp='$CPP $CPPFLAGS'
2481 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2482 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2483 cross_compiling=$ac_cv_prog_cc_cross
2487 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2488 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2489 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2490 CFLAGS="$SAVE_CFLAGS"
2495 esac
2497 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2498 echo "configure:2499: checking how to run the C++ preprocessor" >&5
2499 if test -z "$CXXCPP"; then
2500 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2501 echo $ac_n "(cached) $ac_c" 1>&6
2502 else
2503 ac_ext=C
2504 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2505 ac_cpp='$CXXCPP $CPPFLAGS'
2506 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2507 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2508 cross_compiling=$ac_cv_prog_cxx_cross
2509 CXXCPP="${CXX-g++} -E"
2510 cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 #include <stdlib.h>
2515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2516 { (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518 if test -z "$ac_err"; then
2520 else
2521 echo "$ac_err" >&5
2522 echo "configure: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 rm -rf conftest*
2525 CXXCPP=/lib/cpp
2527 rm -f conftest*
2528 ac_cv_prog_CXXCPP="$CXXCPP"
2529 ac_ext=c
2530 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2531 ac_cpp='$CPP $CPPFLAGS'
2532 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2533 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2534 cross_compiling=$ac_cv_prog_cc_cross
2537 CXXCPP="$ac_cv_prog_CXXCPP"
2538 echo "$ac_t""$CXXCPP" 1>&6
2541 # Save cache, so that ltconfig can load it
2542 cat > confcache <<\EOF
2543 # This file is a shell script that caches the results of configure
2544 # tests run on this system so they can be shared between configure
2545 # scripts and configure runs. It is not useful on other systems.
2546 # If it contains results you don't want to keep, you may remove or edit it.
2548 # By default, configure uses ./config.cache as the cache file,
2549 # creating it if it does not exist already. You can give configure
2550 # the --cache-file=FILE option to use a different cache file; that is
2551 # what configure does when it calls configure scripts in
2552 # subdirectories, so they share the cache.
2553 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2554 # config.status only pays attention to the cache file if you give it the
2555 # --recheck option to rerun configure.
2558 # The following way of writing the cache mishandles newlines in values,
2559 # but we know of no workaround that is simple, portable, and efficient.
2560 # So, don't put newlines in cache variables' values.
2561 # Ultrix sh set writes to stderr and can't be redirected directly,
2562 # and sets the high bit in the cache file unless we assign to the vars.
2563 (set) 2>&1 |
2564 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2565 *ac_space=\ *)
2566 # `set' does not quote correctly, so add quotes (double-quote substitution
2567 # turns \\\\ into \\, and sed turns \\ into \).
2568 sed -n \
2569 -e "s/'/'\\\\''/g" \
2570 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2573 # `set' quotes correctly as required by POSIX, so do not add quotes.
2574 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2576 esac >> confcache
2577 if cmp -s $cache_file confcache; then
2579 else
2580 if test -w $cache_file; then
2581 echo "updating cache $cache_file"
2582 cat confcache > $cache_file
2583 else
2584 echo "not updating unwritable cache $cache_file"
2587 rm -f confcache
2590 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2591 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2592 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2593 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2594 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2595 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2596 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2597 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2598 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2599 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2601 # Reload cache, that may have been modified by ltconfig
2602 if test -r "$cache_file"; then
2603 echo "loading cache $cache_file"
2604 . $cache_file
2605 else
2606 echo "creating cache $cache_file"
2607 > $cache_file
2611 # This can be used to rebuild libtool when needed
2612 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2614 # Always use our own libtool.
2615 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2617 # Redirect the config.log output again, so that the ltconfig log is not
2618 # clobbered by the next message.
2619 exec 5>>./config.log
2623 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2624 lt_save_CC="$CC"
2625 lt_save_CFLAGS="$CFLAGS"
2626 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2627 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2628 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2629 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2630 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2631 deplibs_check_method="$deplibs_check_method" \
2632 file_magic_cmd="$file_magic_cmd" \
2633 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2634 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2635 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2636 CC="$lt_save_CC"
2637 CFLAGS="$lt_save_CFLAGS"
2639 # Redirect the config.log output again, so that the ltconfig log is not
2640 # clobbered by the next message.
2641 exec 5>>./config.log
2648 subdirs="$DIRLTDL"
2651 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2652 COMPPATH=.
2653 else
2654 COMPPATH=..
2660 if test -d $srcdir/testsuite; then
2661 TESTSUBDIR_TRUE=
2662 TESTSUBDIR_FALSE='#'
2663 else
2664 TESTSUBDIR_TRUE='#'
2665 TESTSUBDIR_FALSE=
2668 # Check whether --enable-fast-character or --disable-fast-character was given.
2669 if test "${enable_fast_character+set}" = set; then
2670 enableval="$enable_fast_character"
2671 # Nothing
2673 else
2674 cat >> confdefs.h <<\EOF
2675 #define COMPACT_CHARACTER 1
2681 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2682 if test "${enable_getenv_properties+set}" = set; then
2683 enableval="$enable_getenv_properties"
2688 if test -z "$enable_getenv_properties"; then
2689 enable_getenv_properties=${enable_getenv_properties_default-yes}
2691 if test "$enable_getenv_properties" = no; then
2692 cat >> confdefs.h <<\EOF
2693 #define DISABLE_GETENV_PROPERTIES 1
2699 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2700 if test "${enable_hash_synchronization+set}" = set; then
2701 enableval="$enable_hash_synchronization"
2706 if test -z "$enable_hash_synchronization"; then
2707 enable_hash_synchronization=$enable_hash_synchronization_default
2711 LIBGCJDEBUG="false"
2713 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2714 if test "${enable_libgcj_debug+set}" = set; then
2715 enableval="$enable_libgcj_debug"
2716 if test "$enable_libgcj_debug" = yes; then
2717 cat >> confdefs.h <<\EOF
2718 #define DEBUG 1
2721 LIBGCJDEBUG="true"
2726 # Check whether --enable-interpreter or --disable-interpreter was given.
2727 if test "${enable_interpreter+set}" = set; then
2728 enableval="$enable_interpreter"
2729 if test "$enable_interpreter" = yes; then
2730 # This can also be set in configure.host.
2731 libgcj_interpreter=yes
2732 elif test "$enable_interpreter" = no; then
2733 libgcj_interpreter=no
2738 if test "$libgcj_interpreter" = yes; then
2739 cat >> confdefs.h <<\EOF
2740 #define INTERPRETER 1
2745 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2746 echo "configure:2747: checking for exception model to use" >&5
2748 ac_ext=C
2749 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2750 ac_cpp='$CXXCPP $CPPFLAGS'
2751 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2752 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2753 cross_compiling=$ac_cv_prog_cxx_cross
2755 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2756 if test "${enable_sjlj_exceptions+set}" = set; then
2757 enableval="$enable_sjlj_exceptions"
2759 else
2760 cat > conftest.$ac_ext << EOF
2761 #line 2762 "configure"
2762 struct S { ~S(); };
2763 void bar();
2764 void foo()
2766 S s;
2767 bar();
2770 old_CXXFLAGS="$CXXFLAGS"
2771 CXXFLAGS=-S
2772 if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2773 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2774 enable_sjlj_exceptions=yes
2775 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2776 enable_sjlj_exceptions=no
2779 CXXFLAGS="$old_CXXFLAGS"
2780 rm -f conftest*
2783 if test x$enable_sjlj_exceptions = xyes; then
2784 cat >> confdefs.h <<\EOF
2785 #define SJLJ_EXCEPTIONS 1
2788 ac_exception_model_name=sjlj
2789 elif test x$enable_sjlj_exceptions = xno; then
2790 ac_exception_model_name="call frame"
2791 else
2792 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2794 ac_ext=c
2795 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2796 ac_cpp='$CPP $CPPFLAGS'
2797 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2798 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2799 cross_compiling=$ac_cv_prog_cc_cross
2801 echo "$ac_t""$ac_exception_model_name" 1>&6
2803 # Check whether --enable-java-net or --disable-java-net was given.
2804 if test "${enable_java_net+set}" = set; then
2805 enableval="$enable_java_net"
2810 if test -z "$enable_java_net"; then
2811 enable_java_net=${enable_java_net_default-yes}
2813 if test "$enable_java_net" = no; then
2814 cat >> confdefs.h <<\EOF
2815 #define DISABLE_JAVA_NET 1
2820 # Check whether --with-libffi or --without-libffi was given.
2821 if test "${with_libffi+set}" = set; then
2822 withval="$with_libffi"
2824 else
2825 with_libffi=${with_libffi_default-yes}
2829 LIBFFI=
2830 LIBFFIINCS=
2831 if test "$with_libffi" != no; then
2832 cat >> confdefs.h <<\EOF
2833 #define USE_LIBFFI 1
2836 LIBFFI=../libffi/libfficonvenience.la
2837 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include'
2842 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2843 if test "${enable_jvmpi+set}" = set; then
2844 enableval="$enable_jvmpi"
2849 if test "$enable_jvmpi" != no; then
2850 cat >> confdefs.h <<\EOF
2851 #define ENABLE_JVMPI 1
2856 TARGET_ECOS="no"
2857 # Check whether --with-ecos or --without-ecos was given.
2858 if test "${with_ecos+set}" = set; then
2859 withval="$with_ecos"
2860 TARGET_ECOS="$with_ecos"
2865 case "$TARGET_ECOS" in
2867 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2868 PROCESS=${PROCESS-Posix}
2871 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2872 PROCESS=Ecos
2873 cat >> confdefs.h <<\EOF
2874 #define ECOS 1
2878 esac
2880 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2881 echo "configure:2882: checking how to run the C preprocessor" >&5
2882 # On Suns, sometimes $CPP names a directory.
2883 if test -n "$CPP" && test -d "$CPP"; then
2884 CPP=
2886 if test -z "$CPP"; then
2887 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890 # This must be in double quotes, not single quotes, because CPP may get
2891 # substituted into the Makefile and "${CC-cc}" will confuse make.
2892 CPP="${CC-cc} -E"
2893 # On the NeXT, cc -E runs the code through the compiler's parser,
2894 # not just through cpp.
2895 cat > conftest.$ac_ext <<EOF
2896 #line 2897 "configure"
2897 #include "confdefs.h"
2898 #include <assert.h>
2899 Syntax Error
2901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2902 { (eval echo configure:2903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2904 if test -z "$ac_err"; then
2906 else
2907 echo "$ac_err" >&5
2908 echo "configure: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 rm -rf conftest*
2911 CPP="${CC-cc} -E -traditional-cpp"
2912 cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915 #include <assert.h>
2916 Syntax Error
2918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2919 { (eval echo configure:2920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2921 if test -z "$ac_err"; then
2923 else
2924 echo "$ac_err" >&5
2925 echo "configure: failed program was:" >&5
2926 cat conftest.$ac_ext >&5
2927 rm -rf conftest*
2928 CPP="${CC-cc} -nologo -E"
2929 cat > conftest.$ac_ext <<EOF
2930 #line 2931 "configure"
2931 #include "confdefs.h"
2932 #include <assert.h>
2933 Syntax Error
2935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2936 { (eval echo configure:2937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2938 if test -z "$ac_err"; then
2940 else
2941 echo "$ac_err" >&5
2942 echo "configure: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 rm -rf conftest*
2945 CPP=/lib/cpp
2947 rm -f conftest*
2949 rm -f conftest*
2951 rm -f conftest*
2952 ac_cv_prog_CPP="$CPP"
2954 CPP="$ac_cv_prog_CPP"
2955 else
2956 ac_cv_prog_CPP="$CPP"
2958 echo "$ac_t""$CPP" 1>&6
2960 cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 #include <stdint.h>
2965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2966 egrep "uint32_t" >/dev/null 2>&1; then
2967 rm -rf conftest*
2968 cat >> confdefs.h <<\EOF
2969 #define HAVE_INT32_DEFINED 1
2973 rm -f conftest*
2975 cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978 #include <inttypes.h>
2980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2981 egrep "uint32_t" >/dev/null 2>&1; then
2982 rm -rf conftest*
2983 cat >> confdefs.h <<\EOF
2984 #define HAVE_INT32_DEFINED 1
2988 rm -f conftest*
2990 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2996 egrep "u_int32_t" >/dev/null 2>&1; then
2997 rm -rf conftest*
2998 cat >> confdefs.h <<\EOF
2999 #define HAVE_BSD_INT32_DEFINED 1
3003 rm -f conftest*
3005 cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008 #include <sys/config.h>
3010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3011 egrep "u_int32_t" >/dev/null 2>&1; then
3012 rm -rf conftest*
3013 cat >> confdefs.h <<\EOF
3014 #define HAVE_BSD_INT32_DEFINED 1
3018 rm -f conftest*
3022 cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025 #include <time.h>
3027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3028 egrep "mktime" >/dev/null 2>&1; then
3029 rm -rf conftest*
3030 cat >> confdefs.h <<\EOF
3031 #define HAVE_MKTIME 1
3035 rm -f conftest*
3037 cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040 #include <time.h>
3042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3043 egrep "localtime" >/dev/null 2>&1; then
3044 rm -rf conftest*
3045 cat >> confdefs.h <<\EOF
3046 #define HAVE_LOCALTIME 1
3050 rm -f conftest*
3053 test -d java || mkdir java
3054 test -d java/io || mkdir java/io
3055 test -d gnu || mkdir gnu
3058 test -d java/lang || mkdir java/lang
3062 SYSTEMSPEC=
3065 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
3068 # Check whether --with-system-zlib or --without-system-zlib was given.
3069 if test "${with_system_zlib+set}" = set; then
3070 withval="$with_system_zlib"
3074 ZLIBSPEC=
3076 ZLIBTESTSPEC=
3079 libsubdir=.libs
3081 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
3082 echo "configure:3083: checking for garbage collector to use" >&5
3083 # Check whether --enable-java-gc or --disable-java-gc was given.
3084 if test "${enable_java_gc+set}" = set; then
3085 enableval="$enable_java_gc"
3087 GC=$enableval
3088 else
3089 GC=boehm
3092 GCLIBS=
3093 GCINCS=
3094 GCDEPS=
3095 GCOBJS=
3096 GCSPEC=
3097 JC1GCSPEC=
3098 GCTESTSPEC=
3099 case "$GC" in
3100 boehm)
3101 echo "$ac_t""boehm" 1>&6
3102 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
3103 # We include the path to the boehm-gc build directory.
3104 # See Makefile.am to understand why.
3105 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
3106 GCINCS='-I$(top_srcdir)/../boehm-gc/include'
3107 GCSPEC='-lgcjgc'
3108 JC1GCSPEC='-fuse-boehm-gc'
3109 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3110 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3111 GCOBJS=boehm.lo
3112 GCHDR=boehm-gc.h
3113 cat >> confdefs.h <<\EOF
3114 #define HAVE_BOEHM_GC 1
3119 echo "$ac_t""none" 1>&6
3120 GCOBJS=nogc.lo
3121 GCHDR=no-gc.h
3124 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3126 esac
3137 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
3138 echo "configure:3139: checking for thread model used by GCC" >&5
3139 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
3140 echo "$ac_t""$THREADS" 1>&6
3142 case "$THREADS" in
3143 no | none | single)
3144 THREADS=none
3146 posix | pthreads)
3147 THREADS=posix
3148 case "$host" in
3149 *-*-linux*)
3150 cat >> confdefs.h <<\EOF
3151 #define LINUX_THREADS 1
3155 esac
3157 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
3158 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3161 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3163 esac
3165 THREADLIBS=
3166 THREADINCS=
3167 THREADDEPS=
3168 THREADOBJS=
3169 THREADH=
3170 THREADSPEC=
3171 case "$THREADS" in
3172 posix)
3173 case "$host" in
3174 *-*-cygwin*)
3175 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
3178 *-*-freebsd[1234]*)
3180 # Before FreeBSD 5, it didn't have -lpthread (or any library which
3181 # merely adds pthread_* functions) but it does have a -pthread switch
3182 # which is required at link-time to select -lc_r *instead* of -lc.
3183 THREADLIBS=-pthread
3184 # Don't set THREADSPEC here as might be expected since -pthread is
3185 # not processed when found within a spec file, it must come from
3186 # the command line. For now, the user must provide the -pthread
3187 # switch to link code compiled with gcj. In future, consider adding
3188 # support for weak references to pthread_* functions ala gthr.h API.
3189 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
3191 *-*-freebsd*)
3192 # FreeBSD 5 implements a model much closer to other modern UNIX
3193 # which support threads. However, it still does not support
3194 # -lpthread.
3195 THREADLIBS=-pthread
3196 THREADSPEC=-lc_r
3199 THREADLIBS=-lpthread
3200 THREADSPEC=-lpthread
3202 esac
3203 THREADOBJS=posix-threads.lo
3204 THREADH=posix-threads.h
3205 # MIT pthreads doesn't seem to have the mutexattr functions.
3206 # But for now we don't check for it. We just assume you aren't
3207 # using MIT pthreads.
3208 cat >> confdefs.h <<\EOF
3209 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3213 # If we're using the Boehm GC, then we happen to know that it
3214 # defines _REENTRANT, so we don't bother. Eww.
3215 if test "$GC" != boehm; then
3216 cat >> confdefs.h <<\EOF
3217 #define _REENTRANT 1
3221 cat >> confdefs.h <<\EOF
3222 #define _POSIX_PTHREAD_SEMANTICS 1
3227 none)
3228 THREADOBJS=no-threads.lo
3229 THREADH=no-threads.h
3231 esac
3239 HASH_SYNC_SPEC=
3240 # Hash synchronization is only useful with posix threads right now.
3241 if test "$enable_hash_synchronization" = yes && test "$THREADS" = "posix"; then
3242 HASH_SYNC_SPEC=-fhash-synchronization
3243 cat >> confdefs.h <<\EOF
3244 #define JV_HASH_SYNCHRONIZATION 1
3253 if test "$GCC" = yes; then
3254 USING_GCC_TRUE=
3255 USING_GCC_FALSE='#'
3256 else
3257 USING_GCC_TRUE='#'
3258 USING_GCC_FALSE=
3261 CANADIAN=no
3262 NULL_TARGET=no
3263 NATIVE=yes
3265 # We're in the tree with gcc, and need to include some of its headers.
3266 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
3268 if test -n "${with_cross_host}"; then
3269 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
3270 # may not work correctly, because the compiler may not be able to
3271 # link executables.
3273 # We assume newlib. This lets us hard-code the functions we know
3274 # we'll have.
3275 cat >> confdefs.h <<\EOF
3276 #define HAVE_MEMMOVE 1
3279 cat >> confdefs.h <<\EOF
3280 #define HAVE_MEMCPY 1
3283 cat >> confdefs.h <<\EOF
3284 #define HAVE_STRERROR 1
3287 cat >> confdefs.h <<\EOF
3288 #define HAVE_GMTIME_R 1
3291 cat >> confdefs.h <<\EOF
3292 #define HAVE_LOCALTIME_R 1
3295 cat >> confdefs.h <<\EOF
3296 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3299 cat >> confdefs.h <<\EOF
3300 #define HAVE_ALLOCA 1
3304 cat >> confdefs.h <<\EOF
3305 #define NO_GETUID 1
3309 ZLIBSPEC=-lzgcj
3310 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
3312 # If Canadian cross, then don't pick up tools from the build
3313 # directory.
3314 if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
3315 CANADIAN=yes
3316 GCC_UNWIND_INCLUDE=
3317 GCJ="${target_alias}-gcj"
3319 NATIVE=no
3320 else
3321 for ac_func in strerror ioctl select fstat open fsync sleep
3323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3324 echo "configure:3325: checking for $ac_func" >&5
3325 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3326 echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328 cat > conftest.$ac_ext <<EOF
3329 #line 3330 "configure"
3330 #include "confdefs.h"
3331 /* System header to define __stub macros and hopefully few prototypes,
3332 which can conflict with char $ac_func(); below. */
3333 #include <assert.h>
3334 /* Override any gcc2 internal prototype to avoid an error. */
3335 /* We use char because int might match the return type of a gcc2
3336 builtin and then its argument prototype would still apply. */
3337 char $ac_func();
3339 int main() {
3341 /* The GNU C library defines this for functions which it implements
3342 to always fail with ENOSYS. Some functions are actually named
3343 something starting with __ and the normal name is an alias. */
3344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3345 choke me
3346 #else
3347 $ac_func();
3348 #endif
3350 ; return 0; }
3352 if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3353 rm -rf conftest*
3354 eval "ac_cv_func_$ac_func=yes"
3355 else
3356 echo "configure: failed program was:" >&5
3357 cat conftest.$ac_ext >&5
3358 rm -rf conftest*
3359 eval "ac_cv_func_$ac_func=no"
3361 rm -f conftest*
3364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3365 echo "$ac_t""yes" 1>&6
3366 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3367 cat >> confdefs.h <<EOF
3368 #define $ac_tr_func 1
3371 else
3372 echo "$ac_t""no" 1>&6
3374 done
3376 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3379 echo "configure:3380: checking for $ac_func" >&5
3380 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3381 echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383 cat > conftest.$ac_ext <<EOF
3384 #line 3385 "configure"
3385 #include "confdefs.h"
3386 /* System header to define __stub macros and hopefully few prototypes,
3387 which can conflict with char $ac_func(); below. */
3388 #include <assert.h>
3389 /* Override any gcc2 internal prototype to avoid an error. */
3390 /* We use char because int might match the return type of a gcc2
3391 builtin and then its argument prototype would still apply. */
3392 char $ac_func();
3394 int main() {
3396 /* The GNU C library defines this for functions which it implements
3397 to always fail with ENOSYS. Some functions are actually named
3398 something starting with __ and the normal name is an alias. */
3399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3400 choke me
3401 #else
3402 $ac_func();
3403 #endif
3405 ; return 0; }
3407 if { (eval echo configure:3408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3408 rm -rf conftest*
3409 eval "ac_cv_func_$ac_func=yes"
3410 else
3411 echo "configure: failed program was:" >&5
3412 cat conftest.$ac_ext >&5
3413 rm -rf conftest*
3414 eval "ac_cv_func_$ac_func=no"
3416 rm -f conftest*
3419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3420 echo "$ac_t""yes" 1>&6
3421 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3422 cat >> confdefs.h <<EOF
3423 #define $ac_tr_func 1
3426 else
3427 echo "$ac_t""no" 1>&6
3429 done
3431 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
3433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3434 echo "configure:3435: checking for $ac_func" >&5
3435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3436 echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438 cat > conftest.$ac_ext <<EOF
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441 /* System header to define __stub macros and hopefully few prototypes,
3442 which can conflict with char $ac_func(); below. */
3443 #include <assert.h>
3444 /* Override any gcc2 internal prototype to avoid an error. */
3445 /* We use char because int might match the return type of a gcc2
3446 builtin and then its argument prototype would still apply. */
3447 char $ac_func();
3449 int main() {
3451 /* The GNU C library defines this for functions which it implements
3452 to always fail with ENOSYS. Some functions are actually named
3453 something starting with __ and the normal name is an alias. */
3454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3455 choke me
3456 #else
3457 $ac_func();
3458 #endif
3460 ; return 0; }
3462 if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3463 rm -rf conftest*
3464 eval "ac_cv_func_$ac_func=yes"
3465 else
3466 echo "configure: failed program was:" >&5
3467 cat conftest.$ac_ext >&5
3468 rm -rf conftest*
3469 eval "ac_cv_func_$ac_func=no"
3471 rm -f conftest*
3474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3475 echo "$ac_t""yes" 1>&6
3476 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3477 cat >> confdefs.h <<EOF
3478 #define $ac_tr_func 1
3481 else
3482 echo "$ac_t""no" 1>&6
3484 done
3486 for ac_func in nl_langinfo setlocale
3488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3489 echo "configure:3490: checking for $ac_func" >&5
3490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493 cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 /* System header to define __stub macros and hopefully few prototypes,
3497 which can conflict with char $ac_func(); below. */
3498 #include <assert.h>
3499 /* Override any gcc2 internal prototype to avoid an error. */
3500 /* We use char because int might match the return type of a gcc2
3501 builtin and then its argument prototype would still apply. */
3502 char $ac_func();
3504 int main() {
3506 /* The GNU C library defines this for functions which it implements
3507 to always fail with ENOSYS. Some functions are actually named
3508 something starting with __ and the normal name is an alias. */
3509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3510 choke me
3511 #else
3512 $ac_func();
3513 #endif
3515 ; return 0; }
3517 if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3518 rm -rf conftest*
3519 eval "ac_cv_func_$ac_func=yes"
3520 else
3521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3523 rm -rf conftest*
3524 eval "ac_cv_func_$ac_func=no"
3526 rm -f conftest*
3529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3530 echo "$ac_t""yes" 1>&6
3531 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3532 cat >> confdefs.h <<EOF
3533 #define $ac_tr_func 1
3536 else
3537 echo "$ac_t""no" 1>&6
3539 done
3541 for ac_func in inet_aton inet_addr
3543 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3544 echo "configure:3545: checking for $ac_func" >&5
3545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3546 echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548 cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 /* System header to define __stub macros and hopefully few prototypes,
3552 which can conflict with char $ac_func(); below. */
3553 #include <assert.h>
3554 /* Override any gcc2 internal prototype to avoid an error. */
3555 /* We use char because int might match the return type of a gcc2
3556 builtin and then its argument prototype would still apply. */
3557 char $ac_func();
3559 int main() {
3561 /* The GNU C library defines this for functions which it implements
3562 to always fail with ENOSYS. Some functions are actually named
3563 something starting with __ and the normal name is an alias. */
3564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3565 choke me
3566 #else
3567 $ac_func();
3568 #endif
3570 ; return 0; }
3572 if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3573 rm -rf conftest*
3574 eval "ac_cv_func_$ac_func=yes"
3575 else
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 rm -rf conftest*
3579 eval "ac_cv_func_$ac_func=no"
3581 rm -f conftest*
3584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3585 echo "$ac_t""yes" 1>&6
3586 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3587 cat >> confdefs.h <<EOF
3588 #define $ac_tr_func 1
3590 break
3591 else
3592 echo "$ac_t""no" 1>&6
3594 done
3596 for ac_func in inet_pton uname inet_ntoa
3598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3599 echo "configure:3600: checking for $ac_func" >&5
3600 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3601 echo $ac_n "(cached) $ac_c" 1>&6
3602 else
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 /* System header to define __stub macros and hopefully few prototypes,
3607 which can conflict with char $ac_func(); below. */
3608 #include <assert.h>
3609 /* Override any gcc2 internal prototype to avoid an error. */
3610 /* We use char because int might match the return type of a gcc2
3611 builtin and then its argument prototype would still apply. */
3612 char $ac_func();
3614 int main() {
3616 /* The GNU C library defines this for functions which it implements
3617 to always fail with ENOSYS. Some functions are actually named
3618 something starting with __ and the normal name is an alias. */
3619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3620 choke me
3621 #else
3622 $ac_func();
3623 #endif
3625 ; return 0; }
3627 if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3628 rm -rf conftest*
3629 eval "ac_cv_func_$ac_func=yes"
3630 else
3631 echo "configure: failed program was:" >&5
3632 cat conftest.$ac_ext >&5
3633 rm -rf conftest*
3634 eval "ac_cv_func_$ac_func=no"
3636 rm -f conftest*
3639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3640 echo "$ac_t""yes" 1>&6
3641 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3642 cat >> confdefs.h <<EOF
3643 #define $ac_tr_func 1
3646 else
3647 echo "$ac_t""no" 1>&6
3649 done
3651 for ac_func in backtrace fork execvp pipe sigaction
3653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3654 echo "configure:3655: checking for $ac_func" >&5
3655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3656 echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658 cat > conftest.$ac_ext <<EOF
3659 #line 3660 "configure"
3660 #include "confdefs.h"
3661 /* System header to define __stub macros and hopefully few prototypes,
3662 which can conflict with char $ac_func(); below. */
3663 #include <assert.h>
3664 /* Override any gcc2 internal prototype to avoid an error. */
3665 /* We use char because int might match the return type of a gcc2
3666 builtin and then its argument prototype would still apply. */
3667 char $ac_func();
3669 int main() {
3671 /* The GNU C library defines this for functions which it implements
3672 to always fail with ENOSYS. Some functions are actually named
3673 something starting with __ and the normal name is an alias. */
3674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3675 choke me
3676 #else
3677 $ac_func();
3678 #endif
3680 ; return 0; }
3682 if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3683 rm -rf conftest*
3684 eval "ac_cv_func_$ac_func=yes"
3685 else
3686 echo "configure: failed program was:" >&5
3687 cat conftest.$ac_ext >&5
3688 rm -rf conftest*
3689 eval "ac_cv_func_$ac_func=no"
3691 rm -f conftest*
3694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3695 echo "$ac_t""yes" 1>&6
3696 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3697 cat >> confdefs.h <<EOF
3698 #define $ac_tr_func 1
3701 else
3702 echo "$ac_t""no" 1>&6
3704 done
3706 for ac_hdr in execinfo.h unistd.h dlfcn.h
3708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3710 echo "configure:3711: checking for $ac_hdr" >&5
3711 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3712 echo $ac_n "(cached) $ac_c" 1>&6
3713 else
3714 cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <$ac_hdr>
3719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3720 { (eval echo configure:3721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3722 if test -z "$ac_err"; then
3723 rm -rf conftest*
3724 eval "ac_cv_header_$ac_safe=yes"
3725 else
3726 echo "$ac_err" >&5
3727 echo "configure: failed program was:" >&5
3728 cat conftest.$ac_ext >&5
3729 rm -rf conftest*
3730 eval "ac_cv_header_$ac_safe=no"
3732 rm -f conftest*
3734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3735 echo "$ac_t""yes" 1>&6
3736 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3737 cat >> confdefs.h <<EOF
3738 #define $ac_tr_hdr 1
3741 else
3742 echo "$ac_t""no" 1>&6
3744 done
3746 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3747 echo "configure:3748: checking for dladdr in -ldl" >&5
3748 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3750 echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752 ac_save_LIBS="$LIBS"
3753 LIBS="-ldl $LIBS"
3754 cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 /* Override any gcc2 internal prototype to avoid an error. */
3758 /* We use char because int might match the return type of a gcc2
3759 builtin and then its argument prototype would still apply. */
3760 char dladdr();
3762 int main() {
3763 dladdr()
3764 ; return 0; }
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3767 rm -rf conftest*
3768 eval "ac_cv_lib_$ac_lib_var=yes"
3769 else
3770 echo "configure: failed program was:" >&5
3771 cat conftest.$ac_ext >&5
3772 rm -rf conftest*
3773 eval "ac_cv_lib_$ac_lib_var=no"
3775 rm -f conftest*
3776 LIBS="$ac_save_LIBS"
3779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3780 echo "$ac_t""yes" 1>&6
3782 cat >> confdefs.h <<\EOF
3783 #define HAVE_DLADDR 1
3786 else
3787 echo "$ac_t""no" 1>&6
3790 for ac_file in /proc/self/exe
3793 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3794 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3795 echo "configure:3796: checking for $ac_file" >&5
3796 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3797 echo $ac_n "(cached) $ac_c" 1>&6
3798 else
3799 if test "$cross_compiling" = yes; then
3800 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3801 else
3802 if test -r $ac_file; then
3803 eval "ac_cv_file_$ac_safe=yes"
3804 else
3805 eval "ac_cv_file_$ac_safe=no"
3809 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3810 echo "$ac_t""yes" 1>&6
3811 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3812 cat >> confdefs.h <<EOF
3813 #define $ac_tr_file 1
3816 cat >> confdefs.h <<\EOF
3817 #define HAVE_PROC_SELF_EXE 1
3820 else
3821 echo "$ac_t""no" 1>&6
3824 done
3829 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3830 if test "${with_libiconv_prefix+set}" = set; then
3831 withval="$with_libiconv_prefix"
3833 for dir in `echo "$withval" | tr : ' '`; do
3834 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3835 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
3836 done
3841 echo $ac_n "checking for iconv""... $ac_c" 1>&6
3842 echo "configure:3843: checking for iconv" >&5
3843 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3844 echo $ac_n "(cached) $ac_c" 1>&6
3845 else
3847 am_cv_func_iconv="no, consider installing GNU libiconv"
3848 am_cv_lib_iconv=no
3849 cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852 #include <stdlib.h>
3853 #include <iconv.h>
3854 int main() {
3855 iconv_t cd = iconv_open("","");
3856 iconv(cd,NULL,NULL,NULL,NULL);
3857 iconv_close(cd);
3858 ; return 0; }
3860 if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3861 rm -rf conftest*
3862 am_cv_func_iconv=yes
3863 else
3864 echo "configure: failed program was:" >&5
3865 cat conftest.$ac_ext >&5
3867 rm -f conftest*
3868 if test "$am_cv_func_iconv" != yes; then
3869 am_save_LIBS="$LIBS"
3870 LIBS="$LIBS -liconv"
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 #include <stdlib.h>
3875 #include <iconv.h>
3876 int main() {
3877 iconv_t cd = iconv_open("","");
3878 iconv(cd,NULL,NULL,NULL,NULL);
3879 iconv_close(cd);
3880 ; return 0; }
3882 if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3883 rm -rf conftest*
3884 am_cv_lib_iconv=yes
3885 am_cv_func_iconv=yes
3886 else
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3890 rm -f conftest*
3891 LIBS="$am_save_LIBS"
3896 echo "$ac_t""$am_cv_func_iconv" 1>&6
3897 if test "$am_cv_func_iconv" = yes; then
3898 cat >> confdefs.h <<\EOF
3899 #define HAVE_ICONV 1
3902 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3903 echo "configure:3904: checking for iconv declaration" >&5
3904 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3905 echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3908 cat > conftest.$ac_ext <<EOF
3909 #line 3910 "configure"
3910 #include "confdefs.h"
3912 #include <stdlib.h>
3913 #include <iconv.h>
3914 extern
3915 #ifdef __cplusplus
3917 #endif
3918 #if defined(__STDC__) || defined(__cplusplus)
3919 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3920 #else
3921 size_t iconv();
3922 #endif
3924 int main() {
3926 ; return 0; }
3928 if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3929 rm -rf conftest*
3930 am_cv_proto_iconv_arg1=""
3931 else
3932 echo "configure: failed program was:" >&5
3933 cat conftest.$ac_ext >&5
3934 rm -rf conftest*
3935 am_cv_proto_iconv_arg1="const"
3937 rm -f conftest*
3938 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
3941 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
3942 echo "$ac_t""${ac_t:-
3943 }$am_cv_proto_iconv" 1>&6
3944 cat >> confdefs.h <<EOF
3945 #define ICONV_CONST $am_cv_proto_iconv_arg1
3949 LIBICONV=
3950 if test "$am_cv_lib_iconv" = yes; then
3951 LIBICONV="-liconv"
3956 for ac_func in gethostbyname_r
3958 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3959 echo "configure:3960: checking for $ac_func" >&5
3960 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3961 echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963 cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 /* System header to define __stub macros and hopefully few prototypes,
3967 which can conflict with char $ac_func(); below. */
3968 #include <assert.h>
3969 /* Override any gcc2 internal prototype to avoid an error. */
3970 /* We use char because int might match the return type of a gcc2
3971 builtin and then its argument prototype would still apply. */
3972 char $ac_func();
3974 int main() {
3976 /* The GNU C library defines this for functions which it implements
3977 to always fail with ENOSYS. Some functions are actually named
3978 something starting with __ and the normal name is an alias. */
3979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3980 choke me
3981 #else
3982 $ac_func();
3983 #endif
3985 ; return 0; }
3987 if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3988 rm -rf conftest*
3989 eval "ac_cv_func_$ac_func=yes"
3990 else
3991 echo "configure: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3993 rm -rf conftest*
3994 eval "ac_cv_func_$ac_func=no"
3996 rm -f conftest*
3999 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4000 echo "$ac_t""yes" 1>&6
4001 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4002 cat >> confdefs.h <<EOF
4003 #define $ac_tr_func 1
4006 cat >> confdefs.h <<\EOF
4007 #define HAVE_GETHOSTBYNAME_R 1
4010 # There are two different kinds of gethostbyname_r.
4011 # We look for the one that returns `int'.
4012 # Hopefully this check is robust enough.
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 #include <netdb.h>
4018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4019 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
4020 rm -rf conftest*
4022 cat >> confdefs.h <<\EOF
4023 #define GETHOSTBYNAME_R_RETURNS_INT 1
4027 rm -f conftest*
4030 case " $GCINCS " in
4031 *" -D_REENTRANT "*) ;;
4033 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
4034 echo "configure:4035: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
4035 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
4036 echo $ac_n "(cached) $ac_c" 1>&6
4037 else
4039 ac_ext=C
4040 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4041 ac_cpp='$CXXCPP $CPPFLAGS'
4042 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4043 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4044 cross_compiling=$ac_cv_prog_cxx_cross
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <netdb.h>
4050 int main() {
4051 gethostbyname_r("", 0, 0);
4052 ; return 0; }
4054 if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4055 rm -rf conftest*
4056 libjava_cv_gethostbyname_r_needs_reentrant=no
4057 else
4058 echo "configure: failed program was:" >&5
4059 cat conftest.$ac_ext >&5
4060 rm -rf conftest*
4061 CPPFLAGS_SAVE="$CPPFLAGS"
4062 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4063 cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4066 #include <netdb.h>
4067 int main() {
4068 gethostbyname_r("", 0, 0);
4069 ; return 0; }
4071 if { (eval echo configure:4072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4072 rm -rf conftest*
4073 libjava_cv_gethostbyname_r_needs_reentrant=yes
4074 else
4075 echo "configure: failed program was:" >&5
4076 cat conftest.$ac_ext >&5
4077 rm -rf conftest*
4078 libjava_cv_gethostbyname_r_needs_reentrant=fail
4080 rm -f conftest*
4081 CPPFLAGS="$CPPFLAGS_SAVE"
4084 rm -f conftest*
4085 ac_ext=c
4086 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4087 ac_cpp='$CPP $CPPFLAGS'
4088 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4089 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4090 cross_compiling=$ac_cv_prog_cc_cross
4095 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
4096 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
4097 cat >> confdefs.h <<\EOF
4098 #define _REENTRANT 1
4103 esac
4105 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
4106 echo "configure:4107: checking for struct hostent_data" >&5
4107 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
4108 echo $ac_n "(cached) $ac_c" 1>&6
4109 else
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4114 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
4115 # define _REENTRANT 1
4116 #endif
4117 #include <netdb.h>
4118 int main() {
4119 struct hostent_data data;
4120 ; return 0; }
4122 if { (eval echo configure:4123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4123 rm -rf conftest*
4124 libjava_cv_struct_hostent_data=yes
4125 else
4126 echo "configure: failed program was:" >&5
4127 cat conftest.$ac_ext >&5
4128 rm -rf conftest*
4129 libjava_cv_struct_hostent_data=no
4131 rm -f conftest*
4134 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
4135 if test "x$libjava_cv_struct_hostent_data" = xyes; then
4136 cat >> confdefs.h <<\EOF
4137 #define HAVE_STRUCT_HOSTENT_DATA 1
4142 else
4143 echo "$ac_t""no" 1>&6
4145 done
4148 # FIXME: libjava source code expects to find a prototype for
4149 # gethostbyaddr_r in netdb.h. The outer check ensures that
4150 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
4151 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
4152 # linkage check is enough, yet C++ code requires proper prototypes.)
4153 cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #include <netdb.h>
4158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4159 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
4160 rm -rf conftest*
4162 for ac_func in gethostbyaddr_r
4164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4165 echo "configure:4166: checking for $ac_func" >&5
4166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4167 echo $ac_n "(cached) $ac_c" 1>&6
4168 else
4169 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 /* System header to define __stub macros and hopefully few prototypes,
4173 which can conflict with char $ac_func(); below. */
4174 #include <assert.h>
4175 /* Override any gcc2 internal prototype to avoid an error. */
4176 /* We use char because int might match the return type of a gcc2
4177 builtin and then its argument prototype would still apply. */
4178 char $ac_func();
4180 int main() {
4182 /* The GNU C library defines this for functions which it implements
4183 to always fail with ENOSYS. Some functions are actually named
4184 something starting with __ and the normal name is an alias. */
4185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4186 choke me
4187 #else
4188 $ac_func();
4189 #endif
4191 ; return 0; }
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194 rm -rf conftest*
4195 eval "ac_cv_func_$ac_func=yes"
4196 else
4197 echo "configure: failed program was:" >&5
4198 cat conftest.$ac_ext >&5
4199 rm -rf conftest*
4200 eval "ac_cv_func_$ac_func=no"
4202 rm -f conftest*
4205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4206 echo "$ac_t""yes" 1>&6
4207 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4208 cat >> confdefs.h <<EOF
4209 #define $ac_tr_func 1
4212 cat >> confdefs.h <<\EOF
4213 #define HAVE_GETHOSTBYADDR_R 1
4216 # There are two different kinds of gethostbyaddr_r.
4217 # We look for the one that returns `int'.
4218 # Hopefully this check is robust enough.
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 #include <netdb.h>
4224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4225 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4226 rm -rf conftest*
4228 cat >> confdefs.h <<\EOF
4229 #define GETHOSTBYADDR_R_RETURNS_INT 1
4233 rm -f conftest*
4235 else
4236 echo "$ac_t""no" 1>&6
4238 done
4241 rm -f conftest*
4244 for ac_func in gethostname
4246 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4247 echo "configure:4248: checking for $ac_func" >&5
4248 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4249 echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 /* System header to define __stub macros and hopefully few prototypes,
4255 which can conflict with char $ac_func(); below. */
4256 #include <assert.h>
4257 /* Override any gcc2 internal prototype to avoid an error. */
4258 /* We use char because int might match the return type of a gcc2
4259 builtin and then its argument prototype would still apply. */
4260 char $ac_func();
4262 int main() {
4264 /* The GNU C library defines this for functions which it implements
4265 to always fail with ENOSYS. Some functions are actually named
4266 something starting with __ and the normal name is an alias. */
4267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4268 choke me
4269 #else
4270 $ac_func();
4271 #endif
4273 ; return 0; }
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276 rm -rf conftest*
4277 eval "ac_cv_func_$ac_func=yes"
4278 else
4279 echo "configure: failed program was:" >&5
4280 cat conftest.$ac_ext >&5
4281 rm -rf conftest*
4282 eval "ac_cv_func_$ac_func=no"
4284 rm -f conftest*
4287 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4288 echo "$ac_t""yes" 1>&6
4289 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4290 cat >> confdefs.h <<EOF
4291 #define $ac_tr_func 1
4294 cat >> confdefs.h <<\EOF
4295 #define HAVE_GETHOSTNAME 1
4298 cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4301 #include <unistd.h>
4303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4304 egrep "gethostname" >/dev/null 2>&1; then
4305 rm -rf conftest*
4307 cat >> confdefs.h <<\EOF
4308 #define HAVE_GETHOSTNAME_DECL 1
4312 rm -f conftest*
4314 else
4315 echo "$ac_t""no" 1>&6
4317 done
4320 # Look for these functions in the thread library, but only bother
4321 # if using POSIX threads.
4322 if test "$THREADS" = posix; then
4323 save_LIBS="$LIBS"
4324 LIBS="$LIBS $THREADLIBS"
4325 # Some POSIX thread systems don't have pthread_mutexattr_settype.
4326 # E.g., Solaris.
4327 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4330 echo "configure:4331: checking for $ac_func" >&5
4331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4332 echo $ac_n "(cached) $ac_c" 1>&6
4333 else
4334 cat > conftest.$ac_ext <<EOF
4335 #line 4336 "configure"
4336 #include "confdefs.h"
4337 /* System header to define __stub macros and hopefully few prototypes,
4338 which can conflict with char $ac_func(); below. */
4339 #include <assert.h>
4340 /* Override any gcc2 internal prototype to avoid an error. */
4341 /* We use char because int might match the return type of a gcc2
4342 builtin and then its argument prototype would still apply. */
4343 char $ac_func();
4345 int main() {
4347 /* The GNU C library defines this for functions which it implements
4348 to always fail with ENOSYS. Some functions are actually named
4349 something starting with __ and the normal name is an alias. */
4350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4351 choke me
4352 #else
4353 $ac_func();
4354 #endif
4356 ; return 0; }
4358 if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4359 rm -rf conftest*
4360 eval "ac_cv_func_$ac_func=yes"
4361 else
4362 echo "configure: failed program was:" >&5
4363 cat conftest.$ac_ext >&5
4364 rm -rf conftest*
4365 eval "ac_cv_func_$ac_func=no"
4367 rm -f conftest*
4370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4371 echo "$ac_t""yes" 1>&6
4372 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4373 cat >> confdefs.h <<EOF
4374 #define $ac_tr_func 1
4377 else
4378 echo "$ac_t""no" 1>&6
4380 done
4383 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
4384 # Solaris 7 the name librt is preferred.
4385 for ac_func in sched_yield
4387 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4388 echo "configure:4389: checking for $ac_func" >&5
4389 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4390 echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392 cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395 /* System header to define __stub macros and hopefully few prototypes,
4396 which can conflict with char $ac_func(); below. */
4397 #include <assert.h>
4398 /* Override any gcc2 internal prototype to avoid an error. */
4399 /* We use char because int might match the return type of a gcc2
4400 builtin and then its argument prototype would still apply. */
4401 char $ac_func();
4403 int main() {
4405 /* The GNU C library defines this for functions which it implements
4406 to always fail with ENOSYS. Some functions are actually named
4407 something starting with __ and the normal name is an alias. */
4408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4409 choke me
4410 #else
4411 $ac_func();
4412 #endif
4414 ; return 0; }
4416 if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4417 rm -rf conftest*
4418 eval "ac_cv_func_$ac_func=yes"
4419 else
4420 echo "configure: failed program was:" >&5
4421 cat conftest.$ac_ext >&5
4422 rm -rf conftest*
4423 eval "ac_cv_func_$ac_func=no"
4425 rm -f conftest*
4428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4429 echo "$ac_t""yes" 1>&6
4430 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4431 cat >> confdefs.h <<EOF
4432 #define $ac_tr_func 1
4435 else
4436 echo "$ac_t""no" 1>&6
4437 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4438 echo "configure:4439: checking for sched_yield in -lrt" >&5
4439 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4441 echo $ac_n "(cached) $ac_c" 1>&6
4442 else
4443 ac_save_LIBS="$LIBS"
4444 LIBS="-lrt $LIBS"
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 /* Override any gcc2 internal prototype to avoid an error. */
4449 /* We use char because int might match the return type of a gcc2
4450 builtin and then its argument prototype would still apply. */
4451 char sched_yield();
4453 int main() {
4454 sched_yield()
4455 ; return 0; }
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4458 rm -rf conftest*
4459 eval "ac_cv_lib_$ac_lib_var=yes"
4460 else
4461 echo "configure: failed program was:" >&5
4462 cat conftest.$ac_ext >&5
4463 rm -rf conftest*
4464 eval "ac_cv_lib_$ac_lib_var=no"
4466 rm -f conftest*
4467 LIBS="$ac_save_LIBS"
4470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4471 echo "$ac_t""yes" 1>&6
4473 cat >> confdefs.h <<\EOF
4474 #define HAVE_SCHED_YIELD 1
4477 THREADLIBS="$THREADLIBS -lrt"
4478 THREADSPEC="$THREADSPEC -lrt"
4479 else
4480 echo "$ac_t""no" 1>&6
4482 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4483 echo "configure:4484: checking for sched_yield in -lposix4" >&5
4484 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4485 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4486 echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488 ac_save_LIBS="$LIBS"
4489 LIBS="-lposix4 $LIBS"
4490 cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 /* Override any gcc2 internal prototype to avoid an error. */
4494 /* We use char because int might match the return type of a gcc2
4495 builtin and then its argument prototype would still apply. */
4496 char sched_yield();
4498 int main() {
4499 sched_yield()
4500 ; return 0; }
4502 if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4503 rm -rf conftest*
4504 eval "ac_cv_lib_$ac_lib_var=yes"
4505 else
4506 echo "configure: failed program was:" >&5
4507 cat conftest.$ac_ext >&5
4508 rm -rf conftest*
4509 eval "ac_cv_lib_$ac_lib_var=no"
4511 rm -f conftest*
4512 LIBS="$ac_save_LIBS"
4515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4516 echo "$ac_t""yes" 1>&6
4518 cat >> confdefs.h <<\EOF
4519 #define HAVE_SCHED_YIELD 1
4522 THREADLIBS="$THREADLIBS -lposix4"
4523 THREADSPEC="$THREADSPEC -lposix4"
4524 else
4525 echo "$ac_t""no" 1>&6
4531 done
4533 LIBS="$save_LIBS"
4535 # We can save a little space at runtime if the mutex has m_count
4536 # or __m_count. This is a nice hack for Linux.
4537 cat > conftest.$ac_ext <<EOF
4538 #line 4539 "configure"
4539 #include "confdefs.h"
4540 #include <pthread.h>
4541 int main() {
4543 extern pthread_mutex_t *mutex; int q = mutex->m_count;
4545 ; return 0; }
4547 if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4548 rm -rf conftest*
4549 cat >> confdefs.h <<\EOF
4550 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4553 else
4554 echo "configure: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 rm -rf conftest*
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 #include <pthread.h>
4562 int main() {
4564 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4566 ; return 0; }
4568 if { (eval echo configure:4569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4569 rm -rf conftest*
4570 cat >> confdefs.h <<\EOF
4571 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4574 else
4575 echo "configure: failed program was:" >&5
4576 cat conftest.$ac_ext >&5
4578 rm -f conftest*
4580 rm -f conftest*
4583 # We require a way to get the time.
4584 time_found=no
4585 for ac_func in gettimeofday time ftime
4587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4588 echo "configure:4589: checking for $ac_func" >&5
4589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4590 echo $ac_n "(cached) $ac_c" 1>&6
4591 else
4592 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 /* System header to define __stub macros and hopefully few prototypes,
4596 which can conflict with char $ac_func(); below. */
4597 #include <assert.h>
4598 /* Override any gcc2 internal prototype to avoid an error. */
4599 /* We use char because int might match the return type of a gcc2
4600 builtin and then its argument prototype would still apply. */
4601 char $ac_func();
4603 int main() {
4605 /* The GNU C library defines this for functions which it implements
4606 to always fail with ENOSYS. Some functions are actually named
4607 something starting with __ and the normal name is an alias. */
4608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4609 choke me
4610 #else
4611 $ac_func();
4612 #endif
4614 ; return 0; }
4616 if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4617 rm -rf conftest*
4618 eval "ac_cv_func_$ac_func=yes"
4619 else
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4622 rm -rf conftest*
4623 eval "ac_cv_func_$ac_func=no"
4625 rm -f conftest*
4628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4629 echo "$ac_t""yes" 1>&6
4630 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4631 cat >> confdefs.h <<EOF
4632 #define $ac_tr_func 1
4634 time_found=yes
4635 else
4636 echo "$ac_t""no" 1>&6
4638 done
4640 if test "$time_found" = no; then
4641 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4644 for ac_func in memmove
4646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_func" >&5
4648 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4649 echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651 cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 /* System header to define __stub macros and hopefully few prototypes,
4655 which can conflict with char $ac_func(); below. */
4656 #include <assert.h>
4657 /* Override any gcc2 internal prototype to avoid an error. */
4658 /* We use char because int might match the return type of a gcc2
4659 builtin and then its argument prototype would still apply. */
4660 char $ac_func();
4662 int main() {
4664 /* The GNU C library defines this for functions which it implements
4665 to always fail with ENOSYS. Some functions are actually named
4666 something starting with __ and the normal name is an alias. */
4667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4668 choke me
4669 #else
4670 $ac_func();
4671 #endif
4673 ; return 0; }
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4676 rm -rf conftest*
4677 eval "ac_cv_func_$ac_func=yes"
4678 else
4679 echo "configure: failed program was:" >&5
4680 cat conftest.$ac_ext >&5
4681 rm -rf conftest*
4682 eval "ac_cv_func_$ac_func=no"
4684 rm -f conftest*
4687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4688 echo "$ac_t""yes" 1>&6
4689 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4690 cat >> confdefs.h <<EOF
4691 #define $ac_tr_func 1
4694 else
4695 echo "$ac_t""no" 1>&6
4697 done
4700 # We require memcpy.
4701 memcpy_found=no
4702 for ac_func in memcpy
4704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4705 echo "configure:4706: checking for $ac_func" >&5
4706 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4707 echo $ac_n "(cached) $ac_c" 1>&6
4708 else
4709 cat > conftest.$ac_ext <<EOF
4710 #line 4711 "configure"
4711 #include "confdefs.h"
4712 /* System header to define __stub macros and hopefully few prototypes,
4713 which can conflict with char $ac_func(); below. */
4714 #include <assert.h>
4715 /* Override any gcc2 internal prototype to avoid an error. */
4716 /* We use char because int might match the return type of a gcc2
4717 builtin and then its argument prototype would still apply. */
4718 char $ac_func();
4720 int main() {
4722 /* The GNU C library defines this for functions which it implements
4723 to always fail with ENOSYS. Some functions are actually named
4724 something starting with __ and the normal name is an alias. */
4725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4726 choke me
4727 #else
4728 $ac_func();
4729 #endif
4731 ; return 0; }
4733 if { (eval echo configure:4734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4734 rm -rf conftest*
4735 eval "ac_cv_func_$ac_func=yes"
4736 else
4737 echo "configure: failed program was:" >&5
4738 cat conftest.$ac_ext >&5
4739 rm -rf conftest*
4740 eval "ac_cv_func_$ac_func=no"
4742 rm -f conftest*
4745 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4746 echo "$ac_t""yes" 1>&6
4747 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4748 cat >> confdefs.h <<EOF
4749 #define $ac_tr_func 1
4751 memcpy_found=yes
4752 else
4753 echo "$ac_t""no" 1>&6
4755 done
4757 if test "$memcpy_found" = no; then
4758 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4761 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4762 echo "configure:4763: checking for dlopen in -ldl" >&5
4763 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4765 echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767 ac_save_LIBS="$LIBS"
4768 LIBS="-ldl $LIBS"
4769 cat > conftest.$ac_ext <<EOF
4770 #line 4771 "configure"
4771 #include "confdefs.h"
4772 /* Override any gcc2 internal prototype to avoid an error. */
4773 /* We use char because int might match the return type of a gcc2
4774 builtin and then its argument prototype would still apply. */
4775 char dlopen();
4777 int main() {
4778 dlopen()
4779 ; return 0; }
4781 if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4782 rm -rf conftest*
4783 eval "ac_cv_lib_$ac_lib_var=yes"
4784 else
4785 echo "configure: failed program was:" >&5
4786 cat conftest.$ac_ext >&5
4787 rm -rf conftest*
4788 eval "ac_cv_lib_$ac_lib_var=no"
4790 rm -f conftest*
4791 LIBS="$ac_save_LIBS"
4794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4795 echo "$ac_t""yes" 1>&6
4797 cat >> confdefs.h <<\EOF
4798 #define HAVE_DLOPEN 1
4801 else
4802 echo "$ac_t""no" 1>&6
4806 # Some library-finding code we stole from Tcl.
4807 #--------------------------------------------------------------------
4808 # Check for the existence of the -lsocket and -lnsl libraries.
4809 # The order here is important, so that they end up in the right
4810 # order in the command line generated by make. Here are some
4811 # special considerations:
4812 # 1. Use "connect" and "accept" to check for -lsocket, and
4813 # "gethostbyname" to check for -lnsl.
4814 # 2. Use each function name only once: can't redo a check because
4815 # autoconf caches the results of the last check and won't redo it.
4816 # 3. Use -lnsl and -lsocket only if they supply procedures that
4817 # aren't already present in the normal libraries. This is because
4818 # IRIX 5.2 has libraries, but they aren't needed and they're
4819 # bogus: they goof up name resolution if used.
4820 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4821 # To get around this problem, check for both libraries together
4822 # if -lsocket doesn't work by itself.
4823 #--------------------------------------------------------------------
4825 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4826 echo "configure:4827: checking for socket libraries" >&5
4827 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4828 echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830 gcj_cv_lib_sockets=
4831 gcj_checkBoth=0
4832 unset ac_cv_func_connect
4833 echo $ac_n "checking for connect""... $ac_c" 1>&6
4834 echo "configure:4835: checking for connect" >&5
4835 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4836 echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838 cat > conftest.$ac_ext <<EOF
4839 #line 4840 "configure"
4840 #include "confdefs.h"
4841 /* System header to define __stub macros and hopefully few prototypes,
4842 which can conflict with char connect(); below. */
4843 #include <assert.h>
4844 /* Override any gcc2 internal prototype to avoid an error. */
4845 /* We use char because int might match the return type of a gcc2
4846 builtin and then its argument prototype would still apply. */
4847 char connect();
4849 int main() {
4851 /* The GNU C library defines this for functions which it implements
4852 to always fail with ENOSYS. Some functions are actually named
4853 something starting with __ and the normal name is an alias. */
4854 #if defined (__stub_connect) || defined (__stub___connect)
4855 choke me
4856 #else
4857 connect();
4858 #endif
4860 ; return 0; }
4862 if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4863 rm -rf conftest*
4864 eval "ac_cv_func_connect=yes"
4865 else
4866 echo "configure: failed program was:" >&5
4867 cat conftest.$ac_ext >&5
4868 rm -rf conftest*
4869 eval "ac_cv_func_connect=no"
4871 rm -f conftest*
4874 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4875 echo "$ac_t""yes" 1>&6
4876 gcj_checkSocket=0
4877 else
4878 echo "$ac_t""no" 1>&6
4879 gcj_checkSocket=1
4882 if test "$gcj_checkSocket" = 1; then
4883 unset ac_cv_func_connect
4884 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4885 echo "configure:4886: checking for main in -lsocket" >&5
4886 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4888 echo $ac_n "(cached) $ac_c" 1>&6
4889 else
4890 ac_save_LIBS="$LIBS"
4891 LIBS="-lsocket $LIBS"
4892 cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4896 int main() {
4897 main()
4898 ; return 0; }
4900 if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4901 rm -rf conftest*
4902 eval "ac_cv_lib_$ac_lib_var=yes"
4903 else
4904 echo "configure: failed program was:" >&5
4905 cat conftest.$ac_ext >&5
4906 rm -rf conftest*
4907 eval "ac_cv_lib_$ac_lib_var=no"
4909 rm -f conftest*
4910 LIBS="$ac_save_LIBS"
4913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4914 echo "$ac_t""yes" 1>&6
4915 gcj_cv_lib_sockets="-lsocket"
4916 else
4917 echo "$ac_t""no" 1>&6
4918 gcj_checkBoth=1
4922 if test "$gcj_checkBoth" = 1; then
4923 gcj_oldLibs=$LIBS
4924 LIBS="$LIBS -lsocket -lnsl"
4925 unset ac_cv_func_accept
4926 echo $ac_n "checking for accept""... $ac_c" 1>&6
4927 echo "configure:4928: checking for accept" >&5
4928 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4929 echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931 cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934 /* System header to define __stub macros and hopefully few prototypes,
4935 which can conflict with char accept(); below. */
4936 #include <assert.h>
4937 /* Override any gcc2 internal prototype to avoid an error. */
4938 /* We use char because int might match the return type of a gcc2
4939 builtin and then its argument prototype would still apply. */
4940 char accept();
4942 int main() {
4944 /* The GNU C library defines this for functions which it implements
4945 to always fail with ENOSYS. Some functions are actually named
4946 something starting with __ and the normal name is an alias. */
4947 #if defined (__stub_accept) || defined (__stub___accept)
4948 choke me
4949 #else
4950 accept();
4951 #endif
4953 ; return 0; }
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956 rm -rf conftest*
4957 eval "ac_cv_func_accept=yes"
4958 else
4959 echo "configure: failed program was:" >&5
4960 cat conftest.$ac_ext >&5
4961 rm -rf conftest*
4962 eval "ac_cv_func_accept=no"
4964 rm -f conftest*
4967 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4968 echo "$ac_t""yes" 1>&6
4969 gcj_checkNsl=0
4970 gcj_cv_lib_sockets="-lsocket -lnsl"
4971 else
4972 echo "$ac_t""no" 1>&6
4975 unset ac_cv_func_accept
4976 LIBS=$gcj_oldLibs
4978 unset ac_cv_func_gethostbyname
4979 gcj_oldLibs=$LIBS
4980 LIBS="$LIBS $gcj_cv_lib_sockets"
4981 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4982 echo "configure:4983: checking for gethostbyname" >&5
4983 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4984 echo $ac_n "(cached) $ac_c" 1>&6
4985 else
4986 cat > conftest.$ac_ext <<EOF
4987 #line 4988 "configure"
4988 #include "confdefs.h"
4989 /* System header to define __stub macros and hopefully few prototypes,
4990 which can conflict with char gethostbyname(); below. */
4991 #include <assert.h>
4992 /* Override any gcc2 internal prototype to avoid an error. */
4993 /* We use char because int might match the return type of a gcc2
4994 builtin and then its argument prototype would still apply. */
4995 char gethostbyname();
4997 int main() {
4999 /* The GNU C library defines this for functions which it implements
5000 to always fail with ENOSYS. Some functions are actually named
5001 something starting with __ and the normal name is an alias. */
5002 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5003 choke me
5004 #else
5005 gethostbyname();
5006 #endif
5008 ; return 0; }
5010 if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5011 rm -rf conftest*
5012 eval "ac_cv_func_gethostbyname=yes"
5013 else
5014 echo "configure: failed program was:" >&5
5015 cat conftest.$ac_ext >&5
5016 rm -rf conftest*
5017 eval "ac_cv_func_gethostbyname=no"
5019 rm -f conftest*
5022 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5023 echo "$ac_t""yes" 1>&6
5025 else
5026 echo "$ac_t""no" 1>&6
5027 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5028 echo "configure:5029: checking for main in -lnsl" >&5
5029 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
5030 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5031 echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033 ac_save_LIBS="$LIBS"
5034 LIBS="-lnsl $LIBS"
5035 cat > conftest.$ac_ext <<EOF
5036 #line 5037 "configure"
5037 #include "confdefs.h"
5039 int main() {
5040 main()
5041 ; return 0; }
5043 if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5044 rm -rf conftest*
5045 eval "ac_cv_lib_$ac_lib_var=yes"
5046 else
5047 echo "configure: failed program was:" >&5
5048 cat conftest.$ac_ext >&5
5049 rm -rf conftest*
5050 eval "ac_cv_lib_$ac_lib_var=no"
5052 rm -f conftest*
5053 LIBS="$ac_save_LIBS"
5056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5057 echo "$ac_t""yes" 1>&6
5058 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
5059 else
5060 echo "$ac_t""no" 1>&6
5065 unset ac_cv_func_gethostbyname
5066 LIBS=$gcj_oldLIBS
5070 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
5071 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
5073 if test "$with_system_zlib" = yes; then
5074 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
5075 echo "configure:5076: checking for deflate in -lz" >&5
5076 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
5077 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5078 echo $ac_n "(cached) $ac_c" 1>&6
5079 else
5080 ac_save_LIBS="$LIBS"
5081 LIBS="-lz $LIBS"
5082 cat > conftest.$ac_ext <<EOF
5083 #line 5084 "configure"
5084 #include "confdefs.h"
5085 /* Override any gcc2 internal prototype to avoid an error. */
5086 /* We use char because int might match the return type of a gcc2
5087 builtin and then its argument prototype would still apply. */
5088 char deflate();
5090 int main() {
5091 deflate()
5092 ; return 0; }
5094 if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5095 rm -rf conftest*
5096 eval "ac_cv_lib_$ac_lib_var=yes"
5097 else
5098 echo "configure: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 rm -rf conftest*
5101 eval "ac_cv_lib_$ac_lib_var=no"
5103 rm -f conftest*
5104 LIBS="$ac_save_LIBS"
5107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5108 echo "$ac_t""yes" 1>&6
5109 ZLIBSPEC=-lz
5110 else
5111 echo "$ac_t""no" 1>&6
5112 ZLIBSPEC=-lzgcj
5115 else
5116 ZLIBSPEC=-lzgcj
5117 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
5120 # On Solaris, and maybe other architectures, the Boehm collector
5121 # requires -ldl.
5122 if test "$GC" = boehm; then
5123 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
5124 echo "configure:5125: checking for main in -ldl" >&5
5125 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
5126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5127 echo $ac_n "(cached) $ac_c" 1>&6
5128 else
5129 ac_save_LIBS="$LIBS"
5130 LIBS="-ldl $LIBS"
5131 cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5135 int main() {
5136 main()
5137 ; return 0; }
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140 rm -rf conftest*
5141 eval "ac_cv_lib_$ac_lib_var=yes"
5142 else
5143 echo "configure: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 rm -rf conftest*
5146 eval "ac_cv_lib_$ac_lib_var=no"
5148 rm -f conftest*
5149 LIBS="$ac_save_LIBS"
5152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5153 echo "$ac_t""yes" 1>&6
5154 SYSTEMSPEC="$SYSTEMSPEC -ldl"
5155 else
5156 echo "$ac_t""no" 1>&6
5161 if test -z "${with_multisubdir}"; then
5162 builddotdot=.
5163 else
5165 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5168 if test -x "${builddotdot}/../../gcc/gcj"; then
5169 dir="`cd ${builddotdot}/../../gcc && pwd`"
5170 GCJ="$dir/gcj -B`pwd`/ -B$dir/"
5171 else
5172 CANADIAN=yes
5173 NULL_TARGET=yes
5174 GCJ="gcj -B`pwd`/"
5178 # Create it, so that compile/link tests don't fail
5179 test -f libgcj.spec || touch libgcj.spec
5181 # We must search the source tree for java.lang, since we still don't
5182 # have libgcj.jar nor java/lang/*.class
5183 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
5184 CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
5186 # Since some classes depend on this one, we need its source available
5187 # before we can do any GCJ compilation test :-(
5188 if test ! -f gnu/classpath/Configuration.java; then
5189 test -d gnu || mkdir gnu
5190 test -d gnu/classpath || mkdir gnu/classpath
5191 sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
5192 < $srcdir/gnu/classpath/Configuration.java.in \
5193 > gnu/classpath/Configuration.java
5194 # We do not want to redirect the output of the grep below to /dev/null,
5195 # but we add /dev/null to the input list so that grep will print the
5196 # filename of Configuration.java in case it finds any matches.
5197 if grep @ gnu/classpath/Configuration.java /dev/null; then
5198 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
5202 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
5203 set dummy ${ac_tool_prefix}gcj; ac_word=$2
5204 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5205 echo "configure:5206: checking for $ac_word" >&5
5206 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5207 echo $ac_n "(cached) $ac_c" 1>&6
5208 else
5209 if test -n "$GCJ"; then
5210 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5211 else
5212 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5213 ac_dummy="$PATH"
5214 for ac_dir in $ac_dummy; do
5215 test -z "$ac_dir" && ac_dir=.
5216 if test -f $ac_dir/$ac_word; then
5217 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
5218 break
5220 done
5221 IFS="$ac_save_ifs"
5224 GCJ="$ac_cv_prog_GCJ"
5225 if test -n "$GCJ"; then
5226 echo "$ac_t""$GCJ" 1>&6
5227 else
5228 echo "$ac_t""no" 1>&6
5232 if test -z "$ac_cv_prog_GCJ"; then
5233 if test -n "$ac_tool_prefix"; then
5234 # Extract the first word of "gcj", so it can be a program name with args.
5235 set dummy gcj; ac_word=$2
5236 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5237 echo "configure:5238: checking for $ac_word" >&5
5238 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5239 echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5241 if test -n "$GCJ"; then
5242 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5243 else
5244 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5245 ac_dummy="$PATH"
5246 for ac_dir in $ac_dummy; do
5247 test -z "$ac_dir" && ac_dir=.
5248 if test -f $ac_dir/$ac_word; then
5249 ac_cv_prog_GCJ="gcj"
5250 break
5252 done
5253 IFS="$ac_save_ifs"
5254 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
5257 GCJ="$ac_cv_prog_GCJ"
5258 if test -n "$GCJ"; then
5259 echo "$ac_t""$GCJ" 1>&6
5260 else
5261 echo "$ac_t""no" 1>&6
5264 else
5265 GCJ="no"
5269 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5273 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5274 lt_save_CC="$CC"
5275 lt_save_CFLAGS="$CFLAGS"
5276 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5277 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5278 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5279 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5280 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5281 deplibs_check_method="$deplibs_check_method" \
5282 file_magic_cmd="$file_magic_cmd" \
5283 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5284 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5285 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
5286 CC="$lt_save_CC"
5287 CFLAGS="$lt_save_CFLAGS"
5289 # Redirect the config.log output again, so that the ltconfig log is not
5290 # clobbered by the next message.
5291 exec 5>>./config.log
5296 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
5298 echo $ac_n "checking size of void *""... $ac_c" 1>&6
5299 echo "configure:5300: checking size of void *" >&5
5300 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5301 echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303 if test "$cross_compiling" = yes; then
5304 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5305 else
5306 cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 #include <stdio.h>
5310 main()
5312 FILE *f=fopen("conftestval", "w");
5313 if (!f) exit(1);
5314 fprintf(f, "%d\n", sizeof(void *));
5315 exit(0);
5318 if { (eval echo configure:5319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5319 then
5320 ac_cv_sizeof_void_p=`cat conftestval`
5321 else
5322 echo "configure: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 rm -fr conftest*
5325 ac_cv_sizeof_void_p=0
5327 rm -fr conftest*
5331 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5332 cat >> confdefs.h <<EOF
5333 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5338 ZLIBS=
5339 ZDEPS=
5340 ZINCS=
5341 if test "x$ZLIBSPEC" = "x-lzgcj"; then
5342 # We include the path to the zlib build directory.
5343 # See Makefile.am to understand why.
5344 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
5345 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
5346 ZINCS='-I$(top_srcdir)/../zlib'
5347 else
5348 ZLIBS="$ZLIBSPEC"
5358 if test "$CANADIAN" = yes; then
5359 CANADIAN_TRUE=
5360 CANADIAN_FALSE='#'
5361 else
5362 CANADIAN_TRUE='#'
5363 CANADIAN_FALSE=
5367 if test "$NULL_TARGET" = yes; then
5368 NULL_TARGET_TRUE=
5369 NULL_TARGET_FALSE='#'
5370 else
5371 NULL_TARGET_TRUE='#'
5372 NULL_TARGET_FALSE=
5376 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5377 NATIVE_TRUE=
5378 NATIVE_FALSE='#'
5379 else
5380 NATIVE_TRUE='#'
5381 NATIVE_FALSE=
5385 if test -z "$with_cross_host"; then
5386 USE_LIBDIR_TRUE=
5387 USE_LIBDIR_FALSE='#'
5388 else
5389 USE_LIBDIR_TRUE='#'
5390 USE_LIBDIR_FALSE=
5394 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5395 NEEDS_DATA_START_TRUE=
5396 NEEDS_DATA_START_FALSE='#'
5397 else
5398 NEEDS_DATA_START_TRUE='#'
5399 NEEDS_DATA_START_FALSE=
5403 # Determine gcj version number.
5405 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
5407 cat >> confdefs.h <<EOF
5408 #define GCJVERSION "$gcjvers"
5415 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5416 echo "configure:5417: checking for g++ -ffloat-store bug" >&5
5417 save_CFLAGS="$CFLAGS"
5418 CFLAGS="-x c++ -O2 -ffloat-store"
5419 cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 #include <math.h>
5423 int main() {
5425 ; return 0; }
5427 if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5428 rm -rf conftest*
5429 echo "$ac_t""no" 1>&6
5430 else
5431 echo "configure: failed program was:" >&5
5432 cat conftest.$ac_ext >&5
5433 rm -rf conftest*
5434 cat >> confdefs.h <<\EOF
5435 #define __NO_MATH_INLINES 1
5438 echo "$ac_t""yes" 1>&6
5440 rm -f conftest*
5441 CFLAGS="$save_CFLAGS"
5443 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 stdint.h langinfo.h locale.h
5445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5447 echo "configure:5448: checking for $ac_hdr" >&5
5448 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5449 echo $ac_n "(cached) $ac_c" 1>&6
5450 else
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454 #include <$ac_hdr>
5456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5457 { (eval echo configure:5458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5459 if test -z "$ac_err"; then
5460 rm -rf conftest*
5461 eval "ac_cv_header_$ac_safe=yes"
5462 else
5463 echo "$ac_err" >&5
5464 echo "configure: failed program was:" >&5
5465 cat conftest.$ac_ext >&5
5466 rm -rf conftest*
5467 eval "ac_cv_header_$ac_safe=no"
5469 rm -f conftest*
5471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5472 echo "$ac_t""yes" 1>&6
5473 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5474 cat >> confdefs.h <<EOF
5475 #define $ac_tr_hdr 1
5478 else
5479 echo "$ac_t""no" 1>&6
5481 done
5483 for ac_hdr in dirent.h
5485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5487 echo "configure:5488: checking for $ac_hdr" >&5
5488 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5489 echo $ac_n "(cached) $ac_c" 1>&6
5490 else
5491 cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494 #include <$ac_hdr>
5496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5497 { (eval echo configure:5498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5499 if test -z "$ac_err"; then
5500 rm -rf conftest*
5501 eval "ac_cv_header_$ac_safe=yes"
5502 else
5503 echo "$ac_err" >&5
5504 echo "configure: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
5506 rm -rf conftest*
5507 eval "ac_cv_header_$ac_safe=no"
5509 rm -f conftest*
5511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5512 echo "$ac_t""yes" 1>&6
5513 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5514 cat >> confdefs.h <<EOF
5515 #define $ac_tr_hdr 1
5518 else
5519 echo "$ac_t""no" 1>&6
5521 done
5523 for ac_hdr in inttypes.h
5525 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5526 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5527 echo "configure:5528: checking for $ac_hdr" >&5
5528 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5529 echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531 cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 #include <$ac_hdr>
5536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5537 { (eval echo configure:5538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5539 if test -z "$ac_err"; then
5540 rm -rf conftest*
5541 eval "ac_cv_header_$ac_safe=yes"
5542 else
5543 echo "$ac_err" >&5
5544 echo "configure: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 rm -rf conftest*
5547 eval "ac_cv_header_$ac_safe=no"
5549 rm -f conftest*
5551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5552 echo "$ac_t""yes" 1>&6
5553 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5554 cat >> confdefs.h <<EOF
5555 #define $ac_tr_hdr 1
5558 cat >> confdefs.h <<\EOF
5559 #define HAVE_INTTYPES_H 1
5562 cat >> confdefs.h <<\EOF
5563 #define JV_HAVE_INTTYPES_H 1
5567 else
5568 echo "$ac_t""no" 1>&6
5570 done
5573 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5574 echo "configure:5575: checking for ANSI C header files" >&5
5575 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577 else
5578 cat > conftest.$ac_ext <<EOF
5579 #line 5580 "configure"
5580 #include "confdefs.h"
5581 #include <stdlib.h>
5582 #include <stdarg.h>
5583 #include <string.h>
5584 #include <float.h>
5586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5587 { (eval echo configure:5588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5589 if test -z "$ac_err"; then
5590 rm -rf conftest*
5591 ac_cv_header_stdc=yes
5592 else
5593 echo "$ac_err" >&5
5594 echo "configure: failed program was:" >&5
5595 cat conftest.$ac_ext >&5
5596 rm -rf conftest*
5597 ac_cv_header_stdc=no
5599 rm -f conftest*
5601 if test $ac_cv_header_stdc = yes; then
5602 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5603 cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606 #include <string.h>
5608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5609 egrep "memchr" >/dev/null 2>&1; then
5611 else
5612 rm -rf conftest*
5613 ac_cv_header_stdc=no
5615 rm -f conftest*
5619 if test $ac_cv_header_stdc = yes; then
5620 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 #include <stdlib.h>
5626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5627 egrep "free" >/dev/null 2>&1; then
5629 else
5630 rm -rf conftest*
5631 ac_cv_header_stdc=no
5633 rm -f conftest*
5637 if test $ac_cv_header_stdc = yes; then
5638 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5639 if test "$cross_compiling" = yes; then
5641 else
5642 cat > conftest.$ac_ext <<EOF
5643 #line 5644 "configure"
5644 #include "confdefs.h"
5645 #include <ctype.h>
5646 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5647 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5648 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5649 int main () { int i; for (i = 0; i < 256; i++)
5650 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5651 exit (0); }
5654 if { (eval echo configure:5655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5655 then
5657 else
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -fr conftest*
5661 ac_cv_header_stdc=no
5663 rm -fr conftest*
5669 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5670 if test $ac_cv_header_stdc = yes; then
5671 cat >> confdefs.h <<\EOF
5672 #define STDC_HEADERS 1
5677 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5678 echo "configure:5679: checking for ssize_t" >&5
5679 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5680 echo $ac_n "(cached) $ac_c" 1>&6
5681 else
5682 cat > conftest.$ac_ext <<EOF
5683 #line 5684 "configure"
5684 #include "confdefs.h"
5685 #include <sys/types.h>
5686 #if STDC_HEADERS
5687 #include <stdlib.h>
5688 #include <stddef.h>
5689 #endif
5691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5692 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5693 rm -rf conftest*
5694 ac_cv_type_ssize_t=yes
5695 else
5696 rm -rf conftest*
5697 ac_cv_type_ssize_t=no
5699 rm -f conftest*
5702 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5703 if test $ac_cv_type_ssize_t = no; then
5704 cat >> confdefs.h <<\EOF
5705 #define ssize_t int
5711 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5712 echo "configure:5713: checking for in_addr_t" >&5
5713 cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5716 #include <sys/types.h>
5717 #if STDC_HEADERS
5718 #include <stdlib.h>
5719 #include <stddef.h>
5720 #endif
5721 #if HAVE_NETINET_IN_H
5722 #include <netinet/in.h>
5723 #endif
5724 int main() {
5725 in_addr_t foo;
5726 ; return 0; }
5728 if { (eval echo configure:5729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5729 rm -rf conftest*
5730 cat >> confdefs.h <<\EOF
5731 #define HAVE_IN_ADDR_T 1
5734 echo "$ac_t""yes" 1>&6
5735 else
5736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
5738 rm -rf conftest*
5739 echo "$ac_t""no" 1>&6
5741 rm -f conftest*
5743 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5744 echo "configure:5745: checking whether struct ip_mreq is in netinet/in.h" >&5
5745 cat > conftest.$ac_ext <<EOF
5746 #line 5747 "configure"
5747 #include "confdefs.h"
5748 #include <netinet/in.h>
5749 int main() {
5750 struct ip_mreq mreq;
5751 ; return 0; }
5753 if { (eval echo configure:5754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5754 rm -rf conftest*
5755 cat >> confdefs.h <<\EOF
5756 #define HAVE_STRUCT_IP_MREQ 1
5759 echo "$ac_t""yes" 1>&6
5760 else
5761 echo "configure: failed program was:" >&5
5762 cat conftest.$ac_ext >&5
5763 rm -rf conftest*
5764 echo "$ac_t""no" 1>&6
5766 rm -f conftest*
5768 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
5769 echo "configure:5770: checking whether struct ipv6_mreq is in netinet/in.h" >&5
5770 cat > conftest.$ac_ext <<EOF
5771 #line 5772 "configure"
5772 #include "confdefs.h"
5773 #include <netinet/in.h>
5774 int main() {
5775 struct ipv6_mreq mreq6;
5776 ; return 0; }
5778 if { (eval echo configure:5779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5779 rm -rf conftest*
5780 cat >> confdefs.h <<\EOF
5781 #define HAVE_STRUCT_IPV6_MREQ 1
5784 echo "$ac_t""yes" 1>&6
5785 else
5786 echo "configure: failed program was:" >&5
5787 cat conftest.$ac_ext >&5
5788 rm -rf conftest*
5789 echo "$ac_t""no" 1>&6
5791 rm -f conftest*
5793 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
5794 echo "configure:5795: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
5795 cat > conftest.$ac_ext <<EOF
5796 #line 5797 "configure"
5797 #include "confdefs.h"
5798 #include <netinet/in.h>
5799 int main() {
5800 struct sockaddr_in6 addr6;
5801 ; return 0; }
5803 if { (eval echo configure:5804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5804 rm -rf conftest*
5805 cat >> confdefs.h <<\EOF
5806 #define HAVE_INET6 1
5809 echo "$ac_t""yes" 1>&6
5810 else
5811 echo "configure: failed program was:" >&5
5812 cat conftest.$ac_ext >&5
5813 rm -rf conftest*
5814 echo "$ac_t""no" 1>&6
5816 rm -f conftest*
5818 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
5819 echo "configure:5820: checking for socklen_t in sys/socket.h" >&5
5820 cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 #define _POSIX_PII_SOCKET
5824 #include <sys/types.h>
5825 #include <sys/socket.h>
5826 int main() {
5827 socklen_t x = 5;
5828 ; return 0; }
5830 if { (eval echo configure:5831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5831 rm -rf conftest*
5832 cat >> confdefs.h <<\EOF
5833 #define HAVE_SOCKLEN_T 1
5836 echo "$ac_t""yes" 1>&6
5837 else
5838 echo "configure: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5840 rm -rf conftest*
5841 echo "$ac_t""no" 1>&6
5843 rm -f conftest*
5845 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
5846 echo "configure:5847: checking for tm_gmtoff in struct tm" >&5
5847 cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5850 #include <time.h>
5851 int main() {
5852 struct tm tim; tim.tm_gmtoff = 0;
5853 ; return 0; }
5855 if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5856 rm -rf conftest*
5857 cat >> confdefs.h <<\EOF
5858 #define STRUCT_TM_HAS_GMTOFF 1
5861 echo "$ac_t""yes" 1>&6
5862 else
5863 echo "configure: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5865 rm -rf conftest*
5866 echo "$ac_t""no" 1>&6
5867 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
5868 echo "configure:5869: checking for global timezone variable" >&5
5869 cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872 #include <time.h>
5873 int main() {
5874 long z2 = timezone;
5875 ; return 0; }
5877 if { (eval echo configure:5878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5878 rm -rf conftest*
5879 cat >> confdefs.h <<\EOF
5880 #define HAVE_TIMEZONE 1
5883 echo "$ac_t""yes" 1>&6
5884 else
5885 echo "configure: failed program was:" >&5
5886 cat conftest.$ac_ext >&5
5887 rm -rf conftest*
5888 echo "$ac_t""no" 1>&6
5890 rm -f conftest*
5892 rm -f conftest*
5894 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5895 # for constant arguments. Useless!
5896 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5897 echo "configure:5898: checking for working alloca.h" >&5
5898 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5899 echo $ac_n "(cached) $ac_c" 1>&6
5900 else
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 #include <alloca.h>
5905 int main() {
5906 char *p = alloca(2 * sizeof(int));
5907 ; return 0; }
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910 rm -rf conftest*
5911 ac_cv_header_alloca_h=yes
5912 else
5913 echo "configure: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5915 rm -rf conftest*
5916 ac_cv_header_alloca_h=no
5918 rm -f conftest*
5921 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5922 if test $ac_cv_header_alloca_h = yes; then
5923 cat >> confdefs.h <<\EOF
5924 #define HAVE_ALLOCA_H 1
5929 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5930 echo "configure:5931: checking for alloca" >&5
5931 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5932 echo $ac_n "(cached) $ac_c" 1>&6
5933 else
5934 cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5938 #ifdef __GNUC__
5939 # define alloca __builtin_alloca
5940 #else
5941 # ifdef _MSC_VER
5942 # include <malloc.h>
5943 # define alloca _alloca
5944 # else
5945 # if HAVE_ALLOCA_H
5946 # include <alloca.h>
5947 # else
5948 # ifdef _AIX
5949 #pragma alloca
5950 # else
5951 # ifndef alloca /* predefined by HP cc +Olibcalls */
5952 char *alloca ();
5953 # endif
5954 # endif
5955 # endif
5956 # endif
5957 #endif
5959 int main() {
5960 char *p = (char *) alloca(1);
5961 ; return 0; }
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5964 rm -rf conftest*
5965 ac_cv_func_alloca_works=yes
5966 else
5967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5969 rm -rf conftest*
5970 ac_cv_func_alloca_works=no
5972 rm -f conftest*
5975 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5976 if test $ac_cv_func_alloca_works = yes; then
5977 cat >> confdefs.h <<\EOF
5978 #define HAVE_ALLOCA 1
5983 if test $ac_cv_func_alloca_works = no; then
5984 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5985 # that cause trouble. Some versions do not even contain alloca or
5986 # contain a buggy version. If you still want to use their alloca,
5987 # use ar to extract alloca.o from them instead of compiling alloca.c.
5988 ALLOCA=alloca.${ac_objext}
5989 cat >> confdefs.h <<\EOF
5990 #define C_ALLOCA 1
5994 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5995 echo "configure:5996: checking whether alloca needs Cray hooks" >&5
5996 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5997 echo $ac_n "(cached) $ac_c" 1>&6
5998 else
5999 cat > conftest.$ac_ext <<EOF
6000 #line 6001 "configure"
6001 #include "confdefs.h"
6002 #if defined(CRAY) && ! defined(CRAY2)
6003 webecray
6004 #else
6005 wenotbecray
6006 #endif
6009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6010 egrep "webecray" >/dev/null 2>&1; then
6011 rm -rf conftest*
6012 ac_cv_os_cray=yes
6013 else
6014 rm -rf conftest*
6015 ac_cv_os_cray=no
6017 rm -f conftest*
6021 echo "$ac_t""$ac_cv_os_cray" 1>&6
6022 if test $ac_cv_os_cray = yes; then
6023 for ac_func in _getb67 GETB67 getb67; do
6024 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6025 echo "configure:6026: checking for $ac_func" >&5
6026 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6027 echo $ac_n "(cached) $ac_c" 1>&6
6028 else
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 /* System header to define __stub macros and hopefully few prototypes,
6033 which can conflict with char $ac_func(); below. */
6034 #include <assert.h>
6035 /* Override any gcc2 internal prototype to avoid an error. */
6036 /* We use char because int might match the return type of a gcc2
6037 builtin and then its argument prototype would still apply. */
6038 char $ac_func();
6040 int main() {
6042 /* The GNU C library defines this for functions which it implements
6043 to always fail with ENOSYS. Some functions are actually named
6044 something starting with __ and the normal name is an alias. */
6045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6046 choke me
6047 #else
6048 $ac_func();
6049 #endif
6051 ; return 0; }
6053 if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6054 rm -rf conftest*
6055 eval "ac_cv_func_$ac_func=yes"
6056 else
6057 echo "configure: failed program was:" >&5
6058 cat conftest.$ac_ext >&5
6059 rm -rf conftest*
6060 eval "ac_cv_func_$ac_func=no"
6062 rm -f conftest*
6065 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6066 echo "$ac_t""yes" 1>&6
6067 cat >> confdefs.h <<EOF
6068 #define CRAY_STACKSEG_END $ac_func
6071 break
6072 else
6073 echo "$ac_t""no" 1>&6
6076 done
6079 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6080 echo "configure:6081: checking stack direction for C alloca" >&5
6081 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6082 echo $ac_n "(cached) $ac_c" 1>&6
6083 else
6084 if test "$cross_compiling" = yes; then
6085 ac_cv_c_stack_direction=0
6086 else
6087 cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090 find_stack_direction ()
6092 static char *addr = 0;
6093 auto char dummy;
6094 if (addr == 0)
6096 addr = &dummy;
6097 return find_stack_direction ();
6099 else
6100 return (&dummy > addr) ? 1 : -1;
6102 main ()
6104 exit (find_stack_direction() < 0);
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6108 then
6109 ac_cv_c_stack_direction=1
6110 else
6111 echo "configure: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 rm -fr conftest*
6114 ac_cv_c_stack_direction=-1
6116 rm -fr conftest*
6121 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6122 cat >> confdefs.h <<EOF
6123 #define STACK_DIRECTION $ac_cv_c_stack_direction
6129 for ac_prog in perl
6131 # Extract the first word of "$ac_prog", so it can be a program name with args.
6132 set dummy $ac_prog; ac_word=$2
6133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6134 echo "configure:6135: checking for $ac_word" >&5
6135 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
6136 echo $ac_n "(cached) $ac_c" 1>&6
6137 else
6138 if test -n "$PERL"; then
6139 ac_cv_prog_PERL="$PERL" # Let the user override the test.
6140 else
6141 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6142 ac_dummy="$PATH"
6143 for ac_dir in $ac_dummy; do
6144 test -z "$ac_dir" && ac_dir=.
6145 if test -f $ac_dir/$ac_word; then
6146 ac_cv_prog_PERL="$ac_prog"
6147 break
6149 done
6150 IFS="$ac_save_ifs"
6153 PERL="$ac_cv_prog_PERL"
6154 if test -n "$PERL"; then
6155 echo "$ac_t""$PERL" 1>&6
6156 else
6157 echo "$ac_t""no" 1>&6
6160 test -n "$PERL" && break
6161 done
6162 test -n "$PERL" || PERL="false"
6165 SYSDEP_SOURCES=
6167 case "${host}" in
6168 i?86-*-linux*)
6169 SIGNAL_HANDLER=include/i386-signal.h
6171 sparc-sun-solaris*)
6172 SIGNAL_HANDLER=include/sparc-signal.h
6174 # ia64-*)
6175 # SYSDEP_SOURCES=sysdep/ia64.c
6176 # test -d sysdep || mkdir sysdep
6177 # ;;
6178 powerpc-*-linux*)
6179 SIGNAL_HANDLER=include/dwarf2-signal.h
6181 alpha*-*-linux*)
6182 SIGNAL_HANDLER=include/dwarf2-signal.h
6185 SIGNAL_HANDLER=include/default-signal.h
6187 esac
6189 # If we're using sjlj exceptions, forget what we just learned.
6190 if test "$enable_sjlj_exceptions" = yes; then
6191 SIGNAL_HANDLER=include/default-signal.h
6198 if test "${multilib}" = "yes"; then
6199 multilib_arg="--enable-multilib"
6200 else
6201 multilib_arg=
6204 # If we find X, set shell vars x_includes and x_libraries to the
6205 # paths, otherwise set no_x=yes.
6206 # Uses ac_ vars as temps to allow command line to override cache and checks.
6207 # --without-x overrides everything else, but does not touch the cache.
6208 echo $ac_n "checking for X""... $ac_c" 1>&6
6209 echo "configure:6210: checking for X" >&5
6211 # Check whether --with-x or --without-x was given.
6212 if test "${with_x+set}" = set; then
6213 withval="$with_x"
6217 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6218 if test "x$with_x" = xno; then
6219 # The user explicitly disabled X.
6220 have_x=disabled
6221 else
6222 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6223 # Both variables are already set.
6224 have_x=yes
6225 else
6226 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6227 echo $ac_n "(cached) $ac_c" 1>&6
6228 else
6229 # One or both of the vars are not set, and there is no cached value.
6230 ac_x_includes=NO ac_x_libraries=NO
6231 rm -fr conftestdir
6232 if mkdir conftestdir; then
6233 cd conftestdir
6234 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6235 cat > Imakefile <<'EOF'
6236 acfindx:
6237 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6239 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6240 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6241 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6242 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6243 for ac_extension in a so sl; do
6244 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6245 test -f $ac_im_libdir/libX11.$ac_extension; then
6246 ac_im_usrlibdir=$ac_im_libdir; break
6248 done
6249 # Screen out bogus values from the imake configuration. They are
6250 # bogus both because they are the default anyway, and because
6251 # using them would break gcc on systems where it needs fixed includes.
6252 case "$ac_im_incroot" in
6253 /usr/include) ;;
6254 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6255 esac
6256 case "$ac_im_usrlibdir" in
6257 /usr/lib | /lib) ;;
6258 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6259 esac
6261 cd ..
6262 rm -fr conftestdir
6265 if test "$ac_x_includes" = NO; then
6266 # Guess where to find include files, by looking for this one X11 .h file.
6267 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6269 # First, try using that file with no special directory specified.
6270 cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6273 #include <$x_direct_test_include>
6275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6276 { (eval echo configure:6277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6278 if test -z "$ac_err"; then
6279 rm -rf conftest*
6280 # We can compile using X headers with no special include directory.
6281 ac_x_includes=
6282 else
6283 echo "$ac_err" >&5
6284 echo "configure: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6286 rm -rf conftest*
6287 # Look for the header file in a standard set of common directories.
6288 # Check X11 before X11Rn because it is often a symlink to the current release.
6289 for ac_dir in \
6290 /usr/X11/include \
6291 /usr/X11R6/include \
6292 /usr/X11R5/include \
6293 /usr/X11R4/include \
6295 /usr/include/X11 \
6296 /usr/include/X11R6 \
6297 /usr/include/X11R5 \
6298 /usr/include/X11R4 \
6300 /usr/local/X11/include \
6301 /usr/local/X11R6/include \
6302 /usr/local/X11R5/include \
6303 /usr/local/X11R4/include \
6305 /usr/local/include/X11 \
6306 /usr/local/include/X11R6 \
6307 /usr/local/include/X11R5 \
6308 /usr/local/include/X11R4 \
6310 /usr/X386/include \
6311 /usr/x386/include \
6312 /usr/XFree86/include/X11 \
6314 /usr/include \
6315 /usr/local/include \
6316 /usr/unsupported/include \
6317 /usr/athena/include \
6318 /usr/local/x11r5/include \
6319 /usr/lpp/Xamples/include \
6321 /usr/openwin/include \
6322 /usr/openwin/share/include \
6325 if test -r "$ac_dir/$x_direct_test_include"; then
6326 ac_x_includes=$ac_dir
6327 break
6329 done
6331 rm -f conftest*
6332 fi # $ac_x_includes = NO
6334 if test "$ac_x_libraries" = NO; then
6335 # Check for the libraries.
6337 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6338 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6340 # See if we find them without any special options.
6341 # Don't add to $LIBS permanently.
6342 ac_save_LIBS="$LIBS"
6343 LIBS="-l$x_direct_test_library $LIBS"
6344 cat > conftest.$ac_ext <<EOF
6345 #line 6346 "configure"
6346 #include "confdefs.h"
6348 int main() {
6349 ${x_direct_test_function}()
6350 ; return 0; }
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353 rm -rf conftest*
6354 LIBS="$ac_save_LIBS"
6355 # We can link X programs with no special library path.
6356 ac_x_libraries=
6357 else
6358 echo "configure: failed program was:" >&5
6359 cat conftest.$ac_ext >&5
6360 rm -rf conftest*
6361 LIBS="$ac_save_LIBS"
6362 # First see if replacing the include by lib works.
6363 # Check X11 before X11Rn because it is often a symlink to the current release.
6364 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6365 /usr/X11/lib \
6366 /usr/X11R6/lib \
6367 /usr/X11R5/lib \
6368 /usr/X11R4/lib \
6370 /usr/lib/X11 \
6371 /usr/lib/X11R6 \
6372 /usr/lib/X11R5 \
6373 /usr/lib/X11R4 \
6375 /usr/local/X11/lib \
6376 /usr/local/X11R6/lib \
6377 /usr/local/X11R5/lib \
6378 /usr/local/X11R4/lib \
6380 /usr/local/lib/X11 \
6381 /usr/local/lib/X11R6 \
6382 /usr/local/lib/X11R5 \
6383 /usr/local/lib/X11R4 \
6385 /usr/X386/lib \
6386 /usr/x386/lib \
6387 /usr/XFree86/lib/X11 \
6389 /usr/lib \
6390 /usr/local/lib \
6391 /usr/unsupported/lib \
6392 /usr/athena/lib \
6393 /usr/local/x11r5/lib \
6394 /usr/lpp/Xamples/lib \
6395 /lib/usr/lib/X11 \
6397 /usr/openwin/lib \
6398 /usr/openwin/share/lib \
6401 for ac_extension in a so sl; do
6402 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6403 ac_x_libraries=$ac_dir
6404 break 2
6406 done
6407 done
6409 rm -f conftest*
6410 fi # $ac_x_libraries = NO
6412 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6413 # Didn't find X anywhere. Cache the known absence of X.
6414 ac_cv_have_x="have_x=no"
6415 else
6416 # Record where we found X for the cache.
6417 ac_cv_have_x="have_x=yes \
6418 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6422 eval "$ac_cv_have_x"
6423 fi # $with_x != no
6425 if test "$have_x" != yes; then
6426 echo "$ac_t""$have_x" 1>&6
6427 no_x=yes
6428 else
6429 # If each of the values was on the command line, it overrides each guess.
6430 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6431 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6432 # Update the cache value to reflect the command line values.
6433 ac_cv_have_x="have_x=yes \
6434 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6435 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6438 if test "$no_x" = yes; then
6439 # Not all programs may use this symbol, but it does not hurt to define it.
6440 cat >> confdefs.h <<\EOF
6441 #define X_DISPLAY_MISSING 1
6444 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6445 else
6446 if test -n "$x_includes"; then
6447 X_CFLAGS="$X_CFLAGS -I$x_includes"
6450 # It would also be nice to do this for all -L options, not just this one.
6451 if test -n "$x_libraries"; then
6452 X_LIBS="$X_LIBS -L$x_libraries"
6453 # For Solaris; some versions of Sun CC require a space after -R and
6454 # others require no space. Words are not sufficient . . . .
6455 case "`(uname -sr) 2>/dev/null`" in
6456 "SunOS 5"*)
6457 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6458 echo "configure:6459: checking whether -R must be followed by a space" >&5
6459 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6460 cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6464 int main() {
6466 ; return 0; }
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469 rm -rf conftest*
6470 ac_R_nospace=yes
6471 else
6472 echo "configure: failed program was:" >&5
6473 cat conftest.$ac_ext >&5
6474 rm -rf conftest*
6475 ac_R_nospace=no
6477 rm -f conftest*
6478 if test $ac_R_nospace = yes; then
6479 echo "$ac_t""no" 1>&6
6480 X_LIBS="$X_LIBS -R$x_libraries"
6481 else
6482 LIBS="$ac_xsave_LIBS -R $x_libraries"
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6487 int main() {
6489 ; return 0; }
6491 if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6492 rm -rf conftest*
6493 ac_R_space=yes
6494 else
6495 echo "configure: failed program was:" >&5
6496 cat conftest.$ac_ext >&5
6497 rm -rf conftest*
6498 ac_R_space=no
6500 rm -f conftest*
6501 if test $ac_R_space = yes; then
6502 echo "$ac_t""yes" 1>&6
6503 X_LIBS="$X_LIBS -R $x_libraries"
6504 else
6505 echo "$ac_t""neither works" 1>&6
6508 LIBS="$ac_xsave_LIBS"
6509 esac
6512 # Check for system-dependent libraries X programs must link with.
6513 # Do this before checking for the system-independent R6 libraries
6514 # (-lICE), since we may need -lsocket or whatever for X linking.
6516 if test "$ISC" = yes; then
6517 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6518 else
6519 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6520 # libraries were built with DECnet support. And karl@cs.umb.edu says
6521 # the Alpha needs dnet_stub (dnet does not exist).
6522 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6523 echo "configure:6524: checking for dnet_ntoa in -ldnet" >&5
6524 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6525 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6526 echo $ac_n "(cached) $ac_c" 1>&6
6527 else
6528 ac_save_LIBS="$LIBS"
6529 LIBS="-ldnet $LIBS"
6530 cat > conftest.$ac_ext <<EOF
6531 #line 6532 "configure"
6532 #include "confdefs.h"
6533 /* Override any gcc2 internal prototype to avoid an error. */
6534 /* We use char because int might match the return type of a gcc2
6535 builtin and then its argument prototype would still apply. */
6536 char dnet_ntoa();
6538 int main() {
6539 dnet_ntoa()
6540 ; return 0; }
6542 if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6543 rm -rf conftest*
6544 eval "ac_cv_lib_$ac_lib_var=yes"
6545 else
6546 echo "configure: failed program was:" >&5
6547 cat conftest.$ac_ext >&5
6548 rm -rf conftest*
6549 eval "ac_cv_lib_$ac_lib_var=no"
6551 rm -f conftest*
6552 LIBS="$ac_save_LIBS"
6555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6556 echo "$ac_t""yes" 1>&6
6557 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6558 else
6559 echo "$ac_t""no" 1>&6
6562 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6563 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6564 echo "configure:6565: checking for dnet_ntoa in -ldnet_stub" >&5
6565 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6566 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6567 echo $ac_n "(cached) $ac_c" 1>&6
6568 else
6569 ac_save_LIBS="$LIBS"
6570 LIBS="-ldnet_stub $LIBS"
6571 cat > conftest.$ac_ext <<EOF
6572 #line 6573 "configure"
6573 #include "confdefs.h"
6574 /* Override any gcc2 internal prototype to avoid an error. */
6575 /* We use char because int might match the return type of a gcc2
6576 builtin and then its argument prototype would still apply. */
6577 char dnet_ntoa();
6579 int main() {
6580 dnet_ntoa()
6581 ; return 0; }
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584 rm -rf conftest*
6585 eval "ac_cv_lib_$ac_lib_var=yes"
6586 else
6587 echo "configure: failed program was:" >&5
6588 cat conftest.$ac_ext >&5
6589 rm -rf conftest*
6590 eval "ac_cv_lib_$ac_lib_var=no"
6592 rm -f conftest*
6593 LIBS="$ac_save_LIBS"
6596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6597 echo "$ac_t""yes" 1>&6
6598 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6599 else
6600 echo "$ac_t""no" 1>&6
6605 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6606 # to get the SysV transport functions.
6607 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6608 # needs -lnsl.
6609 # The nsl library prevents programs from opening the X display
6610 # on Irix 5.2, according to dickey@clark.net.
6611 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6612 echo "configure:6613: checking for gethostbyname" >&5
6613 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6614 echo $ac_n "(cached) $ac_c" 1>&6
6615 else
6616 cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6619 /* System header to define __stub macros and hopefully few prototypes,
6620 which can conflict with char gethostbyname(); below. */
6621 #include <assert.h>
6622 /* Override any gcc2 internal prototype to avoid an error. */
6623 /* We use char because int might match the return type of a gcc2
6624 builtin and then its argument prototype would still apply. */
6625 char gethostbyname();
6627 int main() {
6629 /* The GNU C library defines this for functions which it implements
6630 to always fail with ENOSYS. Some functions are actually named
6631 something starting with __ and the normal name is an alias. */
6632 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6633 choke me
6634 #else
6635 gethostbyname();
6636 #endif
6638 ; return 0; }
6640 if { (eval echo configure:6641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6641 rm -rf conftest*
6642 eval "ac_cv_func_gethostbyname=yes"
6643 else
6644 echo "configure: failed program was:" >&5
6645 cat conftest.$ac_ext >&5
6646 rm -rf conftest*
6647 eval "ac_cv_func_gethostbyname=no"
6649 rm -f conftest*
6652 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6653 echo "$ac_t""yes" 1>&6
6655 else
6656 echo "$ac_t""no" 1>&6
6659 if test $ac_cv_func_gethostbyname = no; then
6660 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6661 echo "configure:6662: checking for gethostbyname in -lnsl" >&5
6662 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6663 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6664 echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666 ac_save_LIBS="$LIBS"
6667 LIBS="-lnsl $LIBS"
6668 cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6671 /* Override any gcc2 internal prototype to avoid an error. */
6672 /* We use char because int might match the return type of a gcc2
6673 builtin and then its argument prototype would still apply. */
6674 char gethostbyname();
6676 int main() {
6677 gethostbyname()
6678 ; return 0; }
6680 if { (eval echo configure:6681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6681 rm -rf conftest*
6682 eval "ac_cv_lib_$ac_lib_var=yes"
6683 else
6684 echo "configure: failed program was:" >&5
6685 cat conftest.$ac_ext >&5
6686 rm -rf conftest*
6687 eval "ac_cv_lib_$ac_lib_var=no"
6689 rm -f conftest*
6690 LIBS="$ac_save_LIBS"
6693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6694 echo "$ac_t""yes" 1>&6
6695 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6696 else
6697 echo "$ac_t""no" 1>&6
6702 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6703 # socket/setsockopt and other routines are undefined under SCO ODT
6704 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6705 # on later versions), says simon@lia.di.epfl.ch: it contains
6706 # gethostby* variants that don't use the nameserver (or something).
6707 # -lsocket must be given before -lnsl if both are needed.
6708 # We assume that if connect needs -lnsl, so does gethostbyname.
6709 echo $ac_n "checking for connect""... $ac_c" 1>&6
6710 echo "configure:6711: checking for connect" >&5
6711 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6712 echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714 cat > conftest.$ac_ext <<EOF
6715 #line 6716 "configure"
6716 #include "confdefs.h"
6717 /* System header to define __stub macros and hopefully few prototypes,
6718 which can conflict with char connect(); below. */
6719 #include <assert.h>
6720 /* Override any gcc2 internal prototype to avoid an error. */
6721 /* We use char because int might match the return type of a gcc2
6722 builtin and then its argument prototype would still apply. */
6723 char connect();
6725 int main() {
6727 /* The GNU C library defines this for functions which it implements
6728 to always fail with ENOSYS. Some functions are actually named
6729 something starting with __ and the normal name is an alias. */
6730 #if defined (__stub_connect) || defined (__stub___connect)
6731 choke me
6732 #else
6733 connect();
6734 #endif
6736 ; return 0; }
6738 if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6739 rm -rf conftest*
6740 eval "ac_cv_func_connect=yes"
6741 else
6742 echo "configure: failed program was:" >&5
6743 cat conftest.$ac_ext >&5
6744 rm -rf conftest*
6745 eval "ac_cv_func_connect=no"
6747 rm -f conftest*
6750 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6751 echo "$ac_t""yes" 1>&6
6753 else
6754 echo "$ac_t""no" 1>&6
6757 if test $ac_cv_func_connect = no; then
6758 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6759 echo "configure:6760: checking for connect in -lsocket" >&5
6760 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6762 echo $ac_n "(cached) $ac_c" 1>&6
6763 else
6764 ac_save_LIBS="$LIBS"
6765 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6766 cat > conftest.$ac_ext <<EOF
6767 #line 6768 "configure"
6768 #include "confdefs.h"
6769 /* Override any gcc2 internal prototype to avoid an error. */
6770 /* We use char because int might match the return type of a gcc2
6771 builtin and then its argument prototype would still apply. */
6772 char connect();
6774 int main() {
6775 connect()
6776 ; return 0; }
6778 if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6779 rm -rf conftest*
6780 eval "ac_cv_lib_$ac_lib_var=yes"
6781 else
6782 echo "configure: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6784 rm -rf conftest*
6785 eval "ac_cv_lib_$ac_lib_var=no"
6787 rm -f conftest*
6788 LIBS="$ac_save_LIBS"
6791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6792 echo "$ac_t""yes" 1>&6
6793 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6794 else
6795 echo "$ac_t""no" 1>&6
6800 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6801 echo $ac_n "checking for remove""... $ac_c" 1>&6
6802 echo "configure:6803: checking for remove" >&5
6803 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6804 echo $ac_n "(cached) $ac_c" 1>&6
6805 else
6806 cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 /* System header to define __stub macros and hopefully few prototypes,
6810 which can conflict with char remove(); below. */
6811 #include <assert.h>
6812 /* Override any gcc2 internal prototype to avoid an error. */
6813 /* We use char because int might match the return type of a gcc2
6814 builtin and then its argument prototype would still apply. */
6815 char remove();
6817 int main() {
6819 /* The GNU C library defines this for functions which it implements
6820 to always fail with ENOSYS. Some functions are actually named
6821 something starting with __ and the normal name is an alias. */
6822 #if defined (__stub_remove) || defined (__stub___remove)
6823 choke me
6824 #else
6825 remove();
6826 #endif
6828 ; return 0; }
6830 if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6831 rm -rf conftest*
6832 eval "ac_cv_func_remove=yes"
6833 else
6834 echo "configure: failed program was:" >&5
6835 cat conftest.$ac_ext >&5
6836 rm -rf conftest*
6837 eval "ac_cv_func_remove=no"
6839 rm -f conftest*
6842 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6843 echo "$ac_t""yes" 1>&6
6845 else
6846 echo "$ac_t""no" 1>&6
6849 if test $ac_cv_func_remove = no; then
6850 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6851 echo "configure:6852: checking for remove in -lposix" >&5
6852 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6853 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6854 echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856 ac_save_LIBS="$LIBS"
6857 LIBS="-lposix $LIBS"
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* Override any gcc2 internal prototype to avoid an error. */
6862 /* We use char because int might match the return type of a gcc2
6863 builtin and then its argument prototype would still apply. */
6864 char remove();
6866 int main() {
6867 remove()
6868 ; return 0; }
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871 rm -rf conftest*
6872 eval "ac_cv_lib_$ac_lib_var=yes"
6873 else
6874 echo "configure: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 rm -rf conftest*
6877 eval "ac_cv_lib_$ac_lib_var=no"
6879 rm -f conftest*
6880 LIBS="$ac_save_LIBS"
6883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6884 echo "$ac_t""yes" 1>&6
6885 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6886 else
6887 echo "$ac_t""no" 1>&6
6892 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6893 echo $ac_n "checking for shmat""... $ac_c" 1>&6
6894 echo "configure:6895: checking for shmat" >&5
6895 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6896 echo $ac_n "(cached) $ac_c" 1>&6
6897 else
6898 cat > conftest.$ac_ext <<EOF
6899 #line 6900 "configure"
6900 #include "confdefs.h"
6901 /* System header to define __stub macros and hopefully few prototypes,
6902 which can conflict with char shmat(); below. */
6903 #include <assert.h>
6904 /* Override any gcc2 internal prototype to avoid an error. */
6905 /* We use char because int might match the return type of a gcc2
6906 builtin and then its argument prototype would still apply. */
6907 char shmat();
6909 int main() {
6911 /* The GNU C library defines this for functions which it implements
6912 to always fail with ENOSYS. Some functions are actually named
6913 something starting with __ and the normal name is an alias. */
6914 #if defined (__stub_shmat) || defined (__stub___shmat)
6915 choke me
6916 #else
6917 shmat();
6918 #endif
6920 ; return 0; }
6922 if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6923 rm -rf conftest*
6924 eval "ac_cv_func_shmat=yes"
6925 else
6926 echo "configure: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6928 rm -rf conftest*
6929 eval "ac_cv_func_shmat=no"
6931 rm -f conftest*
6934 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6935 echo "$ac_t""yes" 1>&6
6937 else
6938 echo "$ac_t""no" 1>&6
6941 if test $ac_cv_func_shmat = no; then
6942 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6943 echo "configure:6944: checking for shmat in -lipc" >&5
6944 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6946 echo $ac_n "(cached) $ac_c" 1>&6
6947 else
6948 ac_save_LIBS="$LIBS"
6949 LIBS="-lipc $LIBS"
6950 cat > conftest.$ac_ext <<EOF
6951 #line 6952 "configure"
6952 #include "confdefs.h"
6953 /* Override any gcc2 internal prototype to avoid an error. */
6954 /* We use char because int might match the return type of a gcc2
6955 builtin and then its argument prototype would still apply. */
6956 char shmat();
6958 int main() {
6959 shmat()
6960 ; return 0; }
6962 if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6963 rm -rf conftest*
6964 eval "ac_cv_lib_$ac_lib_var=yes"
6965 else
6966 echo "configure: failed program was:" >&5
6967 cat conftest.$ac_ext >&5
6968 rm -rf conftest*
6969 eval "ac_cv_lib_$ac_lib_var=no"
6971 rm -f conftest*
6972 LIBS="$ac_save_LIBS"
6975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6976 echo "$ac_t""yes" 1>&6
6977 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6978 else
6979 echo "$ac_t""no" 1>&6
6985 # Check for libraries that X11R6 Xt/Xaw programs need.
6986 ac_save_LDFLAGS="$LDFLAGS"
6987 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6988 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6989 # check for ICE first), but we must link in the order -lSM -lICE or
6990 # we get undefined symbols. So assume we have SM if we have ICE.
6991 # These have to be linked with before -lX11, unlike the other
6992 # libraries we check for below, so use a different variable.
6993 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6994 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
6995 echo "configure:6996: checking for IceConnectionNumber in -lICE" >&5
6996 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6998 echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000 ac_save_LIBS="$LIBS"
7001 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7002 cat > conftest.$ac_ext <<EOF
7003 #line 7004 "configure"
7004 #include "confdefs.h"
7005 /* Override any gcc2 internal prototype to avoid an error. */
7006 /* We use char because int might match the return type of a gcc2
7007 builtin and then its argument prototype would still apply. */
7008 char IceConnectionNumber();
7010 int main() {
7011 IceConnectionNumber()
7012 ; return 0; }
7014 if { (eval echo configure:7015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7015 rm -rf conftest*
7016 eval "ac_cv_lib_$ac_lib_var=yes"
7017 else
7018 echo "configure: failed program was:" >&5
7019 cat conftest.$ac_ext >&5
7020 rm -rf conftest*
7021 eval "ac_cv_lib_$ac_lib_var=no"
7023 rm -f conftest*
7024 LIBS="$ac_save_LIBS"
7027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7028 echo "$ac_t""yes" 1>&6
7029 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7030 else
7031 echo "$ac_t""no" 1>&6
7034 LDFLAGS="$ac_save_LDFLAGS"
7039 # Check whether --enable-java-awt or --disable-java-awt was given.
7040 if test "${enable_java_awt+set}" = set; then
7041 enableval="$enable_java_awt"
7046 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
7047 use_xlib_awt=""
7048 use_gtk_awt=""
7050 for peer in $peerlibs ; do
7051 case $peer in
7052 xlib)
7053 if test "$no_x" = yes; then
7054 echo "*** xlib peers requested but no X library available" 1>&2
7055 exit 1
7056 else
7057 use_xlib_awt="yes"
7060 gtk)
7061 # Nothing, yet...
7064 use_xlib_awt=
7065 use_gtk_awt=
7066 break
7069 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
7070 exit 1
7071 esac
7072 done
7076 if test "$use_xlib_awt" = yes; then
7077 XLIB_AWT_TRUE=
7078 XLIB_AWT_FALSE='#'
7079 else
7080 XLIB_AWT_TRUE='#'
7081 XLIB_AWT_FALSE=
7085 if test "$use_gtk_awt" = yes; then
7086 GTK_AWT_TRUE=
7087 GTK_AWT_FALSE='#'
7088 else
7089 GTK_AWT_TRUE='#'
7090 GTK_AWT_FALSE=
7094 here=`pwd`
7097 # We get this from the environment.
7100 trap '' 1 2 15
7101 cat > confcache <<\EOF
7102 # This file is a shell script that caches the results of configure
7103 # tests run on this system so they can be shared between configure
7104 # scripts and configure runs. It is not useful on other systems.
7105 # If it contains results you don't want to keep, you may remove or edit it.
7107 # By default, configure uses ./config.cache as the cache file,
7108 # creating it if it does not exist already. You can give configure
7109 # the --cache-file=FILE option to use a different cache file; that is
7110 # what configure does when it calls configure scripts in
7111 # subdirectories, so they share the cache.
7112 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7113 # config.status only pays attention to the cache file if you give it the
7114 # --recheck option to rerun configure.
7117 # The following way of writing the cache mishandles newlines in values,
7118 # but we know of no workaround that is simple, portable, and efficient.
7119 # So, don't put newlines in cache variables' values.
7120 # Ultrix sh set writes to stderr and can't be redirected directly,
7121 # and sets the high bit in the cache file unless we assign to the vars.
7122 (set) 2>&1 |
7123 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7124 *ac_space=\ *)
7125 # `set' does not quote correctly, so add quotes (double-quote substitution
7126 # turns \\\\ into \\, and sed turns \\ into \).
7127 sed -n \
7128 -e "s/'/'\\\\''/g" \
7129 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7132 # `set' quotes correctly as required by POSIX, so do not add quotes.
7133 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7135 esac >> confcache
7136 if cmp -s $cache_file confcache; then
7138 else
7139 if test -w $cache_file; then
7140 echo "updating cache $cache_file"
7141 cat confcache > $cache_file
7142 else
7143 echo "not updating unwritable cache $cache_file"
7146 rm -f confcache
7148 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7150 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7151 # Let make expand exec_prefix.
7152 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7154 # Any assignment to VPATH causes Sun make to only execute
7155 # the first set of double-colon rules, so remove it if not needed.
7156 # If there is a colon in the path, we need to keep it.
7157 if test "x$srcdir" = x.; then
7158 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7161 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7163 DEFS=-DHAVE_CONFIG_H
7165 # Without the "./", some shells look in PATH for config.status.
7166 : ${CONFIG_STATUS=./config.status}
7168 echo creating $CONFIG_STATUS
7169 rm -f $CONFIG_STATUS
7170 cat > $CONFIG_STATUS <<EOF
7171 #! /bin/sh
7172 # Generated automatically by configure.
7173 # Run this file to recreate the current configuration.
7174 # This directory was configured as follows,
7175 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7177 # $0 $ac_configure_args
7179 # Compiler output produced by configure, useful for debugging
7180 # configure, is in ./config.log if it exists.
7182 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7183 for ac_option
7185 case "\$ac_option" in
7186 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7187 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7188 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7189 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7190 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7191 exit 0 ;;
7192 -help | --help | --hel | --he | --h)
7193 echo "\$ac_cs_usage"; exit 0 ;;
7194 *) echo "\$ac_cs_usage"; exit 1 ;;
7195 esac
7196 done
7198 ac_given_srcdir=$srcdir
7199 ac_given_INSTALL="$INSTALL"
7201 trap 'rm -fr `echo "Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile include/config.h gcj/libgcj-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7203 cat >> $CONFIG_STATUS <<EOF
7205 # Protect against being on the right side of a sed subst in config.status.
7206 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7207 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7208 $ac_vpsub
7209 $extrasub
7210 s%@SHELL@%$SHELL%g
7211 s%@CFLAGS@%$CFLAGS%g
7212 s%@CPPFLAGS@%$CPPFLAGS%g
7213 s%@CXXFLAGS@%$CXXFLAGS%g
7214 s%@FFLAGS@%$FFLAGS%g
7215 s%@DEFS@%$DEFS%g
7216 s%@LDFLAGS@%$LDFLAGS%g
7217 s%@LIBS@%$LIBS%g
7218 s%@exec_prefix@%$exec_prefix%g
7219 s%@prefix@%$prefix%g
7220 s%@program_transform_name@%$program_transform_name%g
7221 s%@bindir@%$bindir%g
7222 s%@sbindir@%$sbindir%g
7223 s%@libexecdir@%$libexecdir%g
7224 s%@datadir@%$datadir%g
7225 s%@sysconfdir@%$sysconfdir%g
7226 s%@sharedstatedir@%$sharedstatedir%g
7227 s%@localstatedir@%$localstatedir%g
7228 s%@libdir@%$libdir%g
7229 s%@includedir@%$includedir%g
7230 s%@oldincludedir@%$oldincludedir%g
7231 s%@infodir@%$infodir%g
7232 s%@mandir@%$mandir%g
7233 s%@LN_S@%$LN_S%g
7234 s%@libgcj_basedir@%$libgcj_basedir%g
7235 s%@mkinstalldirs@%$mkinstalldirs%g
7236 s%@host@%$host%g
7237 s%@host_alias@%$host_alias%g
7238 s%@host_cpu@%$host_cpu%g
7239 s%@host_vendor@%$host_vendor%g
7240 s%@host_os@%$host_os%g
7241 s%@target@%$target%g
7242 s%@target_alias@%$target_alias%g
7243 s%@target_cpu@%$target_cpu%g
7244 s%@target_vendor@%$target_vendor%g
7245 s%@target_os@%$target_os%g
7246 s%@build@%$build%g
7247 s%@build_alias@%$build_alias%g
7248 s%@build_cpu@%$build_cpu%g
7249 s%@build_vendor@%$build_vendor%g
7250 s%@build_os@%$build_os%g
7251 s%@CC@%$CC%g
7252 s%@CXX@%$CXX%g
7253 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7254 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7255 s%@INSTALL_DATA@%$INSTALL_DATA%g
7256 s%@PACKAGE@%$PACKAGE%g
7257 s%@VERSION@%$VERSION%g
7258 s%@ACLOCAL@%$ACLOCAL%g
7259 s%@AUTOCONF@%$AUTOCONF%g
7260 s%@AUTOMAKE@%$AUTOMAKE%g
7261 s%@AUTOHEADER@%$AUTOHEADER%g
7262 s%@MAKEINFO@%$MAKEINFO%g
7263 s%@SET_MAKE@%$SET_MAKE%g
7264 s%@AS@%$AS%g
7265 s%@AR@%$AR%g
7266 s%@RANLIB@%$RANLIB%g
7267 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7268 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7269 s%@MAINT@%$MAINT%g
7270 s%@EXEEXT@%$EXEEXT%g
7271 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7272 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7273 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7274 s%@INCLTDL@%$INCLTDL%g
7275 s%@LIBLTDL@%$LIBLTDL%g
7276 s%@DIRLTDL@%$DIRLTDL%g
7277 s%@OBJEXT@%$OBJEXT%g
7278 s%@STRIP@%$STRIP%g
7279 s%@LIBTOOL@%$LIBTOOL%g
7280 s%@CXXCPP@%$CXXCPP%g
7281 s%@subdirs@%$subdirs%g
7282 s%@COMPPATH@%$COMPPATH%g
7283 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7284 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7285 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7286 s%@LIBFFI@%$LIBFFI%g
7287 s%@LIBFFIINCS@%$LIBFFIINCS%g
7288 s%@CPP@%$CPP%g
7289 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7290 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7291 s%@ZLIBSPEC@%$ZLIBSPEC%g
7292 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7293 s%@GCLIBS@%$GCLIBS%g
7294 s%@GCINCS@%$GCINCS%g
7295 s%@GCDEPS@%$GCDEPS%g
7296 s%@GCOBJS@%$GCOBJS%g
7297 s%@GCSPEC@%$GCSPEC%g
7298 s%@JC1GCSPEC@%$JC1GCSPEC%g
7299 s%@GCTESTSPEC@%$GCTESTSPEC%g
7300 s%@THREADLIBS@%$THREADLIBS%g
7301 s%@THREADINCS@%$THREADINCS%g
7302 s%@THREADDEPS@%$THREADDEPS%g
7303 s%@THREADOBJS@%$THREADOBJS%g
7304 s%@THREADSPEC@%$THREADSPEC%g
7305 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7306 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7307 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7308 s%@LIBICONV@%$LIBICONV%g
7309 s%@GCJ@%$GCJ%g
7310 s%@GCJFLAGS@%$GCJFLAGS%g
7311 s%@ZLIBS@%$ZLIBS%g
7312 s%@ZDEPS@%$ZDEPS%g
7313 s%@ZINCS@%$ZINCS%g
7314 s%@DIVIDESPEC@%$DIVIDESPEC%g
7315 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7316 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7317 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7318 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7319 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7320 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7321 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7322 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
7323 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
7324 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7325 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7326 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7327 s%@GCJVERSION@%$GCJVERSION%g
7328 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7329 s%@ALLOCA@%$ALLOCA%g
7330 s%@PERL@%$PERL%g
7331 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7332 s%@X_CFLAGS@%$X_CFLAGS%g
7333 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7334 s%@X_LIBS@%$X_LIBS%g
7335 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7336 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7337 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7338 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7339 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7340 s%@here@%$here%g
7342 CEOF
7345 cat >> $CONFIG_STATUS <<\EOF
7347 # Split the substitutions into bite-sized pieces for seds with
7348 # small command number limits, like on Digital OSF/1 and HP-UX.
7349 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7350 ac_file=1 # Number of current file.
7351 ac_beg=1 # First line for current file.
7352 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7353 ac_more_lines=:
7354 ac_sed_cmds=""
7355 while $ac_more_lines; do
7356 if test $ac_beg -gt 1; then
7357 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7358 else
7359 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7361 if test ! -s conftest.s$ac_file; then
7362 ac_more_lines=false
7363 rm -f conftest.s$ac_file
7364 else
7365 if test -z "$ac_sed_cmds"; then
7366 ac_sed_cmds="sed -f conftest.s$ac_file"
7367 else
7368 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7370 ac_file=`expr $ac_file + 1`
7371 ac_beg=$ac_end
7372 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7374 done
7375 if test -z "$ac_sed_cmds"; then
7376 ac_sed_cmds=cat
7380 cat >> $CONFIG_STATUS <<EOF
7382 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7384 cat >> $CONFIG_STATUS <<\EOF
7385 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7386 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7387 case "$ac_file" in
7388 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7389 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7390 *) ac_file_in="${ac_file}.in" ;;
7391 esac
7393 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7395 # Remove last slash and all that follows it. Not all systems have dirname.
7396 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7397 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7398 # The file is in a subdirectory.
7399 test ! -d "$ac_dir" && mkdir "$ac_dir"
7400 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7401 # A "../" for each directory in $ac_dir_suffix.
7402 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7403 else
7404 ac_dir_suffix= ac_dots=
7407 case "$ac_given_srcdir" in
7408 .) srcdir=.
7409 if test -z "$ac_dots"; then top_srcdir=.
7410 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7411 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7412 *) # Relative path.
7413 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7414 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7415 esac
7417 case "$ac_given_INSTALL" in
7418 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7419 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7420 esac
7422 echo creating "$ac_file"
7423 rm -f "$ac_file"
7424 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7425 case "$ac_file" in
7426 *Makefile*) ac_comsub="1i\\
7427 # $configure_input" ;;
7428 *) ac_comsub= ;;
7429 esac
7431 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7432 sed -e "$ac_comsub
7433 s%@configure_input@%$configure_input%g
7434 s%@srcdir@%$srcdir%g
7435 s%@top_srcdir@%$top_srcdir%g
7436 s%@INSTALL@%$INSTALL%g
7437 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7438 fi; done
7439 rm -f conftest.s*
7441 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7442 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7444 # ac_d sets the value in "#define NAME VALUE" lines.
7445 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7446 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7447 ac_dC='\3'
7448 ac_dD='%g'
7449 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7450 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7451 ac_uB='\([ ]\)%\1#\2define\3'
7452 ac_uC=' '
7453 ac_uD='\4%g'
7454 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7455 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7456 ac_eB='$%\1#\2define\3'
7457 ac_eC=' '
7458 ac_eD='%g'
7460 if test "${CONFIG_HEADERS+set}" != set; then
7462 cat >> $CONFIG_STATUS <<EOF
7463 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7465 cat >> $CONFIG_STATUS <<\EOF
7467 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7468 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7469 case "$ac_file" in
7470 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7471 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7472 *) ac_file_in="${ac_file}.in" ;;
7473 esac
7475 echo creating $ac_file
7477 rm -f conftest.frag conftest.in conftest.out
7478 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7479 cat $ac_file_inputs > conftest.in
7483 # Transform confdefs.h into a sed script conftest.vals that substitutes
7484 # the proper values into config.h.in to produce config.h. And first:
7485 # Protect against being on the right side of a sed subst in config.status.
7486 # Protect against being in an unquoted here document in config.status.
7487 rm -f conftest.vals
7488 cat > conftest.hdr <<\EOF
7489 s/[\\&%]/\\&/g
7490 s%[\\$`]%\\&%g
7491 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7492 s%ac_d%ac_u%gp
7493 s%ac_u%ac_e%gp
7495 sed -n -f conftest.hdr confdefs.h > conftest.vals
7496 rm -f conftest.hdr
7498 # This sed command replaces #undef with comments. This is necessary, for
7499 # example, in the case of _POSIX_SOURCE, which is predefined and required
7500 # on some systems where configure will not decide to define it.
7501 cat >> conftest.vals <<\EOF
7502 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7505 # Break up conftest.vals because some shells have a limit on
7506 # the size of here documents, and old seds have small limits too.
7508 rm -f conftest.tail
7509 while :
7511 ac_lines=`grep -c . conftest.vals`
7512 # grep -c gives empty output for an empty file on some AIX systems.
7513 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7514 # Write a limited-size here document to conftest.frag.
7515 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7516 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7517 echo 'CEOF
7518 sed -f conftest.frag conftest.in > conftest.out
7519 rm -f conftest.in
7520 mv conftest.out conftest.in
7521 ' >> $CONFIG_STATUS
7522 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7523 rm -f conftest.vals
7524 mv conftest.tail conftest.vals
7525 done
7526 rm -f conftest.vals
7528 cat >> $CONFIG_STATUS <<\EOF
7529 rm -f conftest.frag conftest.h
7530 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7531 cat conftest.in >> conftest.h
7532 rm -f conftest.in
7533 if cmp -s $ac_file conftest.h 2>/dev/null; then
7534 echo "$ac_file is unchanged"
7535 rm -f conftest.h
7536 else
7537 # Remove last slash and all that follows it. Not all systems have dirname.
7538 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7539 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7540 # The file is in a subdirectory.
7541 test ! -d "$ac_dir" && mkdir "$ac_dir"
7543 rm -f $ac_file
7544 mv conftest.h $ac_file
7546 fi; done
7550 cat >> $CONFIG_STATUS <<EOF
7551 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
7552 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"
7555 cat >> $CONFIG_STATUS <<\EOF
7556 srcdir=$ac_given_srcdir
7557 while test -n "$ac_sources"; do
7558 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7559 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7561 echo "linking $srcdir/$ac_source to $ac_dest"
7563 if test ! -r $srcdir/$ac_source; then
7564 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7566 rm -f $ac_dest
7568 # Make relative symlinks.
7569 # Remove last slash and all that follows it. Not all systems have dirname.
7570 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7571 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7572 # The dest file is in a subdirectory.
7573 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7574 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7575 # A "../" for each directory in $ac_dest_dir_suffix.
7576 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7577 else
7578 ac_dest_dir_suffix= ac_dots=
7581 case "$srcdir" in
7582 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7583 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7584 esac
7586 # Make a symlink if possible; otherwise try a hard link.
7587 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7588 ln $srcdir/$ac_source $ac_dest; then :
7589 else
7590 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7592 done
7594 cat >> $CONFIG_STATUS <<EOF
7596 srcdir=${srcdir}
7597 host=${host}
7598 target=${target}
7599 with_multisubdir=${with_multisubdir}
7600 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7601 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7602 libgcj_basedir=${libgcj_basedir}
7603 CC="${CC}"
7604 CXX="${CXX}"
7607 cat >> $CONFIG_STATUS <<\EOF
7608 am_indx=1
7609 for am_file in include/config.h gcj/libgcj-config.h; do
7610 case " $CONFIG_HEADERS " in
7611 *" $am_file "*)
7612 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7614 esac
7615 am_indx=`expr "$am_indx" + 1`
7616 done
7617 # Only add multilib support code if we just rebuilt top-level Makefile.
7618 case " $CONFIG_FILES " in
7619 *" Makefile "*)
7620 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7622 esac
7624 # Make subdirectories and `.d' files. Look in both srcdir and
7625 # builddir for the .java files.
7626 h=`pwd`
7627 : > deps.mk
7628 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
7629 find . \( -name '*.java' -o -name '*.cc' \) -print) | \
7630 fgrep -v testsuite | \
7631 sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
7632 while read f; do
7633 echo "include $f" >> deps.mk
7634 test -f $f || {
7636 d=`echo $f | sed -e 's,/[^/]*$,,'`
7638 if test ! -d $d; then
7639 $libgcj_basedir/../mkinstalldirs $d
7641 echo > $f
7643 done
7645 exit 0
7647 chmod +x $CONFIG_STATUS
7648 rm -fr confdefs* $ac_clean_files
7649 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7651 if test "$no_recursion" != yes; then
7653 # Remove --cache-file and --srcdir arguments so they do not pile up.
7654 ac_sub_configure_args=
7655 ac_prev=
7656 for ac_arg in $ac_configure_args; do
7657 if test -n "$ac_prev"; then
7658 ac_prev=
7659 continue
7661 case "$ac_arg" in
7662 -cache-file | --cache-file | --cache-fil | --cache-fi \
7663 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7664 ac_prev=cache_file ;;
7665 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7666 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7668 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7669 ac_prev=srcdir ;;
7670 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7672 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7673 esac
7674 done
7676 for ac_config_dir in $DIRLTDL; do
7678 # Do not complain, so a configure script can configure whichever
7679 # parts of a large source tree are present.
7680 if test ! -d $srcdir/$ac_config_dir; then
7681 continue
7684 echo configuring in $ac_config_dir
7686 case "$srcdir" in
7687 .) ;;
7689 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7690 else
7691 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7694 esac
7696 ac_popdir=`pwd`
7697 cd $ac_config_dir
7699 # A "../" for each directory in /$ac_config_dir.
7700 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7702 case "$srcdir" in
7703 .) # No --srcdir option. We are building in place.
7704 ac_sub_srcdir=$srcdir ;;
7705 /*) # Absolute path.
7706 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7707 *) # Relative path.
7708 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7709 esac
7711 # Check for guested configure; otherwise get Cygnus style configure.
7712 if test -f $ac_sub_srcdir/configure; then
7713 ac_sub_configure=$ac_sub_srcdir/configure
7714 elif test -f $ac_sub_srcdir/configure.in; then
7715 ac_sub_configure=$ac_configure
7716 else
7717 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7718 ac_sub_configure=
7721 # The recursion is here.
7722 if test -n "$ac_sub_configure"; then
7724 # Make the cache file name correct relative to the subdirectory.
7725 case "$cache_file" in
7726 /*) ac_sub_cache_file=$cache_file ;;
7727 *) # Relative path.
7728 ac_sub_cache_file="$ac_dots$cache_file" ;;
7729 esac
7730 case "$ac_given_INSTALL" in
7731 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7732 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7733 esac
7735 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7736 # The eval makes quoting arguments work.
7737 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7738 then :
7739 else
7740 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7744 cd $ac_popdir
7745 done