* config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Remove definition of
[official-gcc.git] / libjava / configure
blob2e5b34dc1121ecdd26ebe34a35129f88130f0e8b
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 --with-newlib Configuring with newlib"
21 ac_help="$ac_help
22 --enable-multilib build many library versions (default)"
23 ac_help="$ac_help
24 --enable-maintainer-mode enable make rules and dependencies not useful
25 (and sometimes confusing) to the casual installer"
26 ac_help="$ac_help
27 --enable-shared[=PKGS] build shared libraries [default=yes]"
28 ac_help="$ac_help
29 --enable-static[=PKGS] build static libraries [default=yes]"
30 ac_help="$ac_help
31 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
32 ac_help="$ac_help
33 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
34 ac_help="$ac_help
35 --disable-libtool-lock avoid locking (might break parallel builds)"
36 ac_help="$ac_help
37 --with-pic try to use only PIC/non-PIC objects [default=use both]"
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 --with-x use the X Window System"
62 ac_help="$ac_help
63 --enable-java-awt list of AWT peer implementations to be built"
64 ac_help="$ac_help
65 --enable-java-gc=TYPE choose garbage collector [boehm]"
66 ac_help="$ac_help
67 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
68 ac_help="$ac_help
69 --with-gtk-prefix=PFX Prefix where GTK is installed (optional)"
70 ac_help="$ac_help
71 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
72 ac_help="$ac_help
73 --disable-gtktest Do not try to compile and run a test GTK program"
74 ac_help="$ac_help
75 --with-glib-prefix=PFX Prefix where GLIB is installed (optional)"
76 ac_help="$ac_help
77 --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)"
78 ac_help="$ac_help
79 --disable-glibtest Do not try to compile and run a test GLIB program"
80 ac_help="$ac_help
81 --with-libart-prefix=PFX Prefix where LIBART is installed (optional)"
82 ac_help="$ac_help
83 --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)"
84 ac_help="$ac_help
85 --disable-libarttest Do not try to compile and run a test LIBART program"
87 # Initialize some variables set by options.
88 # The variables have the same names as the options, with
89 # dashes changed to underlines.
90 build=NONE
91 cache_file=./config.cache
92 exec_prefix=NONE
93 host=NONE
94 no_create=
95 nonopt=NONE
96 no_recursion=
97 prefix=NONE
98 program_prefix=NONE
99 program_suffix=NONE
100 program_transform_name=s,x,x,
101 silent=
102 site=
103 srcdir=
104 target=NONE
105 verbose=
106 x_includes=NONE
107 x_libraries=NONE
108 bindir='${exec_prefix}/bin'
109 sbindir='${exec_prefix}/sbin'
110 libexecdir='${exec_prefix}/libexec'
111 datadir='${prefix}/share'
112 sysconfdir='${prefix}/etc'
113 sharedstatedir='${prefix}/com'
114 localstatedir='${prefix}/var'
115 libdir='${exec_prefix}/lib'
116 includedir='${prefix}/include'
117 oldincludedir='/usr/include'
118 infodir='${prefix}/info'
119 mandir='${prefix}/man'
121 # Initialize some other variables.
122 subdirs=
123 MFLAGS= MAKEFLAGS=
124 SHELL=${CONFIG_SHELL-/bin/sh}
125 # Maximum number of lines to put in a shell here document.
126 ac_max_here_lines=12
128 ac_prev=
129 for ac_option
132 # If the previous option needs an argument, assign it.
133 if test -n "$ac_prev"; then
134 eval "$ac_prev=\$ac_option"
135 ac_prev=
136 continue
139 case "$ac_option" in
140 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
141 *) ac_optarg= ;;
142 esac
144 # Accept the important Cygnus configure options, so we can diagnose typos.
146 case "$ac_option" in
148 -bindir | --bindir | --bindi | --bind | --bin | --bi)
149 ac_prev=bindir ;;
150 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
151 bindir="$ac_optarg" ;;
153 -build | --build | --buil | --bui | --bu)
154 ac_prev=build ;;
155 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
156 build="$ac_optarg" ;;
158 -cache-file | --cache-file | --cache-fil | --cache-fi \
159 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
160 ac_prev=cache_file ;;
161 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
162 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
163 cache_file="$ac_optarg" ;;
165 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
166 ac_prev=datadir ;;
167 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
168 | --da=*)
169 datadir="$ac_optarg" ;;
171 -disable-* | --disable-*)
172 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
173 # Reject names that are not valid shell variable names.
174 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
175 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
177 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178 eval "enable_${ac_feature}=no" ;;
180 -enable-* | --enable-*)
181 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
182 # Reject names that are not valid shell variable names.
183 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
184 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
186 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187 case "$ac_option" in
188 *=*) ;;
189 *) ac_optarg=yes ;;
190 esac
191 eval "enable_${ac_feature}='$ac_optarg'" ;;
193 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
194 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
195 | --exec | --exe | --ex)
196 ac_prev=exec_prefix ;;
197 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
198 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
199 | --exec=* | --exe=* | --ex=*)
200 exec_prefix="$ac_optarg" ;;
202 -gas | --gas | --ga | --g)
203 # Obsolete; use --with-gas.
204 with_gas=yes ;;
206 -help | --help | --hel | --he)
207 # Omit some internal or obsolete options to make the list less imposing.
208 # This message is too long to be a string in the A/UX 3.1 sh.
209 cat << EOF
210 Usage: configure [options] [host]
211 Options: [defaults in brackets after descriptions]
212 Configuration:
213 --cache-file=FILE cache test results in FILE
214 --help print this message
215 --no-create do not create output files
216 --quiet, --silent do not print \`checking...' messages
217 --version print the version of autoconf that created configure
218 Directory and file names:
219 --prefix=PREFIX install architecture-independent files in PREFIX
220 [$ac_default_prefix]
221 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
222 [same as prefix]
223 --bindir=DIR user executables in DIR [EPREFIX/bin]
224 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
225 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
226 --datadir=DIR read-only architecture-independent data in DIR
227 [PREFIX/share]
228 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
229 --sharedstatedir=DIR modifiable architecture-independent data in DIR
230 [PREFIX/com]
231 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
232 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
233 --includedir=DIR C header files in DIR [PREFIX/include]
234 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
235 --infodir=DIR info documentation in DIR [PREFIX/info]
236 --mandir=DIR man documentation in DIR [PREFIX/man]
237 --srcdir=DIR find the sources in DIR [configure dir or ..]
238 --program-prefix=PREFIX prepend PREFIX to installed program names
239 --program-suffix=SUFFIX append SUFFIX to installed program names
240 --program-transform-name=PROGRAM
241 run sed PROGRAM on installed program names
243 cat << EOF
244 Host type:
245 --build=BUILD configure for building on BUILD [BUILD=HOST]
246 --host=HOST configure for HOST [guessed]
247 --target=TARGET configure for TARGET [TARGET=HOST]
248 Features and packages:
249 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
250 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
251 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
252 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
253 --x-includes=DIR X include files are in DIR
254 --x-libraries=DIR X library files are in DIR
256 if test -n "$ac_help"; then
257 echo "--enable and --with options recognized:$ac_help"
259 exit 0 ;;
261 -host | --host | --hos | --ho)
262 ac_prev=host ;;
263 -host=* | --host=* | --hos=* | --ho=*)
264 host="$ac_optarg" ;;
266 -includedir | --includedir | --includedi | --included | --include \
267 | --includ | --inclu | --incl | --inc)
268 ac_prev=includedir ;;
269 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
270 | --includ=* | --inclu=* | --incl=* | --inc=*)
271 includedir="$ac_optarg" ;;
273 -infodir | --infodir | --infodi | --infod | --info | --inf)
274 ac_prev=infodir ;;
275 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
276 infodir="$ac_optarg" ;;
278 -libdir | --libdir | --libdi | --libd)
279 ac_prev=libdir ;;
280 -libdir=* | --libdir=* | --libdi=* | --libd=*)
281 libdir="$ac_optarg" ;;
283 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
284 | --libexe | --libex | --libe)
285 ac_prev=libexecdir ;;
286 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
287 | --libexe=* | --libex=* | --libe=*)
288 libexecdir="$ac_optarg" ;;
290 -localstatedir | --localstatedir | --localstatedi | --localstated \
291 | --localstate | --localstat | --localsta | --localst \
292 | --locals | --local | --loca | --loc | --lo)
293 ac_prev=localstatedir ;;
294 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
295 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
296 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
297 localstatedir="$ac_optarg" ;;
299 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
300 ac_prev=mandir ;;
301 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 mandir="$ac_optarg" ;;
304 -nfp | --nfp | --nf)
305 # Obsolete; use --without-fp.
306 with_fp=no ;;
308 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 | --no-cr | --no-c)
310 no_create=yes ;;
312 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
314 no_recursion=yes ;;
316 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
317 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
318 | --oldin | --oldi | --old | --ol | --o)
319 ac_prev=oldincludedir ;;
320 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
321 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
322 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
323 oldincludedir="$ac_optarg" ;;
325 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
326 ac_prev=prefix ;;
327 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
328 prefix="$ac_optarg" ;;
330 -program-prefix | --program-prefix | --program-prefi | --program-pref \
331 | --program-pre | --program-pr | --program-p)
332 ac_prev=program_prefix ;;
333 -program-prefix=* | --program-prefix=* | --program-prefi=* \
334 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
335 program_prefix="$ac_optarg" ;;
337 -program-suffix | --program-suffix | --program-suffi | --program-suff \
338 | --program-suf | --program-su | --program-s)
339 ac_prev=program_suffix ;;
340 -program-suffix=* | --program-suffix=* | --program-suffi=* \
341 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
342 program_suffix="$ac_optarg" ;;
344 -program-transform-name | --program-transform-name \
345 | --program-transform-nam | --program-transform-na \
346 | --program-transform-n | --program-transform- \
347 | --program-transform | --program-transfor \
348 | --program-transfo | --program-transf \
349 | --program-trans | --program-tran \
350 | --progr-tra | --program-tr | --program-t)
351 ac_prev=program_transform_name ;;
352 -program-transform-name=* | --program-transform-name=* \
353 | --program-transform-nam=* | --program-transform-na=* \
354 | --program-transform-n=* | --program-transform-=* \
355 | --program-transform=* | --program-transfor=* \
356 | --program-transfo=* | --program-transf=* \
357 | --program-trans=* | --program-tran=* \
358 | --progr-tra=* | --program-tr=* | --program-t=*)
359 program_transform_name="$ac_optarg" ;;
361 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
362 | -silent | --silent | --silen | --sile | --sil)
363 silent=yes ;;
365 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
366 ac_prev=sbindir ;;
367 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
368 | --sbi=* | --sb=*)
369 sbindir="$ac_optarg" ;;
371 -sharedstatedir | --sharedstatedir | --sharedstatedi \
372 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
373 | --sharedst | --shareds | --shared | --share | --shar \
374 | --sha | --sh)
375 ac_prev=sharedstatedir ;;
376 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
377 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
378 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
379 | --sha=* | --sh=*)
380 sharedstatedir="$ac_optarg" ;;
382 -site | --site | --sit)
383 ac_prev=site ;;
384 -site=* | --site=* | --sit=*)
385 site="$ac_optarg" ;;
387 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
388 ac_prev=srcdir ;;
389 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
390 srcdir="$ac_optarg" ;;
392 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
393 | --syscon | --sysco | --sysc | --sys | --sy)
394 ac_prev=sysconfdir ;;
395 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
396 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
397 sysconfdir="$ac_optarg" ;;
399 -target | --target | --targe | --targ | --tar | --ta | --t)
400 ac_prev=target ;;
401 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
402 target="$ac_optarg" ;;
404 -v | -verbose | --verbose | --verbos | --verbo | --verb)
405 verbose=yes ;;
407 -version | --version | --versio | --versi | --vers)
408 echo "configure generated by autoconf version 2.13"
409 exit 0 ;;
411 -with-* | --with-*)
412 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
413 # Reject names that are not valid shell variable names.
414 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
415 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
417 ac_package=`echo $ac_package| sed 's/-/_/g'`
418 case "$ac_option" in
419 *=*) ;;
420 *) ac_optarg=yes ;;
421 esac
422 eval "with_${ac_package}='$ac_optarg'" ;;
424 -without-* | --without-*)
425 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
426 # Reject names that are not valid shell variable names.
427 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
428 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
430 ac_package=`echo $ac_package| sed 's/-/_/g'`
431 eval "with_${ac_package}=no" ;;
433 --x)
434 # Obsolete; use --with-x.
435 with_x=yes ;;
437 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
438 | --x-incl | --x-inc | --x-in | --x-i)
439 ac_prev=x_includes ;;
440 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
441 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
442 x_includes="$ac_optarg" ;;
444 -x-libraries | --x-libraries | --x-librarie | --x-librari \
445 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
446 ac_prev=x_libraries ;;
447 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
448 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
449 x_libraries="$ac_optarg" ;;
451 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
455 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
456 echo "configure: warning: $ac_option: invalid host type" 1>&2
458 if test "x$nonopt" != xNONE; then
459 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
461 nonopt="$ac_option"
464 esac
465 done
467 if test -n "$ac_prev"; then
468 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
471 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
473 # File descriptor usage:
474 # 0 standard input
475 # 1 file creation
476 # 2 errors and warnings
477 # 3 some systems may open it to /dev/tty
478 # 4 used on the Kubota Titan
479 # 6 checking for... messages and results
480 # 5 compiler messages saved in config.log
481 if test "$silent" = yes; then
482 exec 6>/dev/null
483 else
484 exec 6>&1
486 exec 5>./config.log
488 echo "\
489 This file contains any messages produced by compilers while
490 running configure, to aid debugging if configure makes a mistake.
491 " 1>&5
493 # Strip out --no-create and --no-recursion so they do not pile up.
494 # Also quote any args containing shell metacharacters.
495 ac_configure_args=
496 for ac_arg
498 case "$ac_arg" in
499 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
500 | --no-cr | --no-c) ;;
501 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
502 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
503 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
504 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
505 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
506 esac
507 done
509 # NLS nuisances.
510 # Only set these to C if already set. These must not be set unconditionally
511 # because not all systems understand e.g. LANG=C (notably SCO).
512 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
513 # Non-C LC_CTYPE values break the ctype check.
514 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
515 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
516 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
517 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
519 # confdefs.h avoids OS command line length limits that DEFS can exceed.
520 rm -rf conftest* confdefs.h
521 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
522 echo > confdefs.h
524 # A filename unique to this package, relative to the directory that
525 # configure is in, which we can look for to find out if srcdir is correct.
526 ac_unique_file=java/lang/System.java
528 # Find the source files, if location was not specified.
529 if test -z "$srcdir"; then
530 ac_srcdir_defaulted=yes
531 # Try the directory containing this script, then its parent.
532 ac_prog=$0
533 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
534 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
535 srcdir=$ac_confdir
536 if test ! -r $srcdir/$ac_unique_file; then
537 srcdir=..
539 else
540 ac_srcdir_defaulted=no
542 if test ! -r $srcdir/$ac_unique_file; then
543 if test "$ac_srcdir_defaulted" = yes; then
544 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
545 else
546 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
549 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
551 # Prefer explicitly selected file to automatically selected ones.
552 if test -z "$CONFIG_SITE"; then
553 if test "x$prefix" != xNONE; then
554 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
555 else
556 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
559 for ac_site_file in $CONFIG_SITE; do
560 if test -r "$ac_site_file"; then
561 echo "loading site script $ac_site_file"
562 . "$ac_site_file"
564 done
566 if test -r "$cache_file"; then
567 echo "loading cache $cache_file"
568 . $cache_file
569 else
570 echo "creating cache $cache_file"
571 > $cache_file
574 ac_ext=c
575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
576 ac_cpp='$CPP $CPPFLAGS'
577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
578 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
579 cross_compiling=$ac_cv_prog_cc_cross
581 ac_exeext=
582 ac_objext=o
583 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
584 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
585 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
586 ac_n= ac_c='
587 ' ac_t=' '
588 else
589 ac_n=-n ac_c= ac_t=
591 else
592 ac_n= ac_c='\c' ac_t=
597 # This works around the fact that libtool configuration may change LD
598 # for this particular configuration, but some shells, instead of
599 # keeping the changes in LD private, export them just because LD is
600 # exported.
601 ORIGINAL_LD_FOR_MULTILIBS=$LD
603 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
604 echo "configure:605: checking whether ln -s works" >&5
605 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
606 echo $ac_n "(cached) $ac_c" 1>&6
607 else
608 rm -f conftestdata
609 if ln -s X conftestdata 2>/dev/null
610 then
611 rm -f conftestdata
612 ac_cv_prog_LN_S="ln -s"
613 else
614 ac_cv_prog_LN_S=ln
617 LN_S="$ac_cv_prog_LN_S"
618 if test "$ac_cv_prog_LN_S" = "ln -s"; then
619 echo "$ac_t""yes" 1>&6
620 else
621 echo "$ac_t""no" 1>&6
625 # Check whether --with-target-subdir or --without-target-subdir was given.
626 if test "${with_target_subdir+set}" = set; then
627 withval="$with_target_subdir"
631 # Check whether --with-cross-host or --without-cross-host was given.
632 if test "${with_cross_host+set}" = set; then
633 withval="$with_cross_host"
638 # Check whether --with-newlib or --without-newlib was given.
639 if test "${with_newlib+set}" = set; then
640 withval="$with_newlib"
645 # Find a good install program. We prefer a C program (faster),
646 # so one script is as good as another. But avoid the broken or
647 # incompatible versions:
648 # SysV /etc/install, /usr/sbin/install
649 # SunOS /usr/etc/install
650 # IRIX /sbin/install
651 # AIX /bin/install
652 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
653 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
654 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
655 # ./install, which can be erroneously created by make from ./install.sh.
656 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
657 echo "configure:658: checking for a BSD compatible install" >&5
658 if test -z "$INSTALL"; then
659 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
660 echo $ac_n "(cached) $ac_c" 1>&6
661 else
662 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
663 for ac_dir in $PATH; do
664 # Account for people who put trailing slashes in PATH elements.
665 case "$ac_dir/" in
666 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
668 # OSF1 and SCO ODT 3.0 have their own names for install.
669 # Don't use installbsd from OSF since it installs stuff as root
670 # by default.
671 for ac_prog in ginstall scoinst install; do
672 if test -f $ac_dir/$ac_prog; then
673 if test $ac_prog = install &&
674 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
675 # AIX install. It has an incompatible calling convention.
677 else
678 ac_cv_path_install="$ac_dir/$ac_prog -c"
679 break 2
682 done
684 esac
685 done
686 IFS="$ac_save_IFS"
689 if test "${ac_cv_path_install+set}" = set; then
690 INSTALL="$ac_cv_path_install"
691 else
692 # As a last resort, use the slow shell script. We don't cache a
693 # path for INSTALL within a source directory, because that will
694 # break other packages using the cache if that directory is
695 # removed, or if the path is relative.
696 INSTALL="$ac_install_sh"
699 echo "$ac_t""$INSTALL" 1>&6
701 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
702 # It thinks the first close brace ends the variable substitution.
703 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
705 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
707 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
709 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
710 echo "configure:711: checking whether build environment is sane" >&5
711 # Just in case
712 sleep 1
713 echo timestamp > conftestfile
714 # Do `set' in a subshell so we don't clobber the current shell's
715 # arguments. Must try -L first in case configure is actually a
716 # symlink; some systems play weird games with the mod time of symlinks
717 # (eg FreeBSD returns the mod time of the symlink's containing
718 # directory).
719 if (
720 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
721 if test "$*" = "X"; then
722 # -L didn't work.
723 set X `ls -t $srcdir/configure conftestfile`
725 if test "$*" != "X $srcdir/configure conftestfile" \
726 && test "$*" != "X conftestfile $srcdir/configure"; then
728 # If neither matched, then we have a broken ls. This can happen
729 # if, for instance, CONFIG_SHELL is bash and it inherits a
730 # broken ls alias from the environment. This has actually
731 # happened. Such a system could not be considered "sane".
732 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
733 alias in your environment" 1>&2; exit 1; }
736 test "$2" = conftestfile
738 then
739 # Ok.
741 else
742 { echo "configure: error: newly created file is older than distributed files!
743 Check your system clock" 1>&2; exit 1; }
745 rm -f conftest*
746 echo "$ac_t""yes" 1>&6
747 if test "$program_transform_name" = s,x,x,; then
748 program_transform_name=
749 else
750 # Double any \ or $. echo might interpret backslashes.
751 cat <<\EOF_SED > conftestsed
752 s,\\,\\\\,g; s,\$,$$,g
753 EOF_SED
754 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
755 rm -f conftestsed
757 test "$program_prefix" != NONE &&
758 program_transform_name="s,^,${program_prefix},; $program_transform_name"
759 # Use a double $ so make ignores it.
760 test "$program_suffix" != NONE &&
761 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
763 # sed with no file args requires a program.
764 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
766 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
767 echo "configure:768: checking whether ${MAKE-make} sets \${MAKE}" >&5
768 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
769 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
770 echo $ac_n "(cached) $ac_c" 1>&6
771 else
772 cat > conftestmake <<\EOF
773 all:
774 @echo 'ac_maketemp="${MAKE}"'
776 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
777 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
778 if test -n "$ac_maketemp"; then
779 eval ac_cv_prog_make_${ac_make}_set=yes
780 else
781 eval ac_cv_prog_make_${ac_make}_set=no
783 rm -f conftestmake
785 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
786 echo "$ac_t""yes" 1>&6
787 SET_MAKE=
788 else
789 echo "$ac_t""no" 1>&6
790 SET_MAKE="MAKE=${MAKE-make}"
793 if test $host != $build; then
794 ac_tool_prefix=${host_alias}-
795 else
796 ac_tool_prefix=
799 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
800 echo "configure:801: checking for Cygwin environment" >&5
801 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
803 else
804 cat > conftest.$ac_ext <<EOF
805 #line 806 "configure"
806 #include "confdefs.h"
808 int main() {
810 #ifndef __CYGWIN__
811 #define __CYGWIN__ __CYGWIN32__
812 #endif
813 return __CYGWIN__;
814 ; return 0; }
816 if { (eval echo configure:817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
817 rm -rf conftest*
818 ac_cv_cygwin=yes
819 else
820 echo "configure: failed program was:" >&5
821 cat conftest.$ac_ext >&5
822 rm -rf conftest*
823 ac_cv_cygwin=no
825 rm -f conftest*
826 rm -f conftest*
829 echo "$ac_t""$ac_cv_cygwin" 1>&6
830 CYGWIN=
831 test "$ac_cv_cygwin" = yes && CYGWIN=yes
832 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
833 echo "configure:834: checking for mingw32 environment" >&5
834 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836 else
837 cat > conftest.$ac_ext <<EOF
838 #line 839 "configure"
839 #include "confdefs.h"
841 int main() {
842 return __MINGW32__;
843 ; return 0; }
845 if { (eval echo configure:846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
846 rm -rf conftest*
847 ac_cv_mingw32=yes
848 else
849 echo "configure: failed program was:" >&5
850 cat conftest.$ac_ext >&5
851 rm -rf conftest*
852 ac_cv_mingw32=no
854 rm -f conftest*
855 rm -f conftest*
858 echo "$ac_t""$ac_cv_mingw32" 1>&6
859 MINGW32=
860 test "$ac_cv_mingw32" = yes && MINGW32=yes
862 # Check whether --enable-multilib or --disable-multilib was given.
863 if test "${enable_multilib+set}" = set; then
864 enableval="$enable_multilib"
865 case "${enableval}" in
866 yes) multilib=yes ;;
867 no) multilib=no ;;
868 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
869 esac
870 else
871 multilib=yes
875 # When building with srcdir == objdir, links to the source files will
876 # be created in directories within the target_subdir. We have to
877 # adjust toplevel_srcdir accordingly, so that configure finds
878 # install-sh and other auxiliary files that live in the top-level
879 # source directory.
880 if test "${srcdir}" = "."; then
881 if test -z "${with_target_subdir}"; then
882 toprel=".."
883 else
884 if test "${with_target_subdir}" != "."; then
885 toprel="${with_multisrctop}../.."
886 else
887 toprel="${with_multisrctop}.."
890 else
891 toprel=".."
894 libgcj_basedir=$srcdir/$toprel/./libjava
897 ac_aux_dir=
898 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
899 if test -f $ac_dir/install-sh; then
900 ac_aux_dir=$ac_dir
901 ac_install_sh="$ac_aux_dir/install-sh -c"
902 break
903 elif test -f $ac_dir/install.sh; then
904 ac_aux_dir=$ac_dir
905 ac_install_sh="$ac_aux_dir/install.sh -c"
906 break
908 done
909 if test -z "$ac_aux_dir"; then
910 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
912 ac_config_guess=$ac_aux_dir/config.guess
913 ac_config_sub=$ac_aux_dir/config.sub
914 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
916 if :; then :; else
917 # This overrides the previous occurrence for automake, but not for
918 # autoconf, which is exactly what we want.
919 ac_aux_dir=
920 for ac_dir in .. $srcdir/..; do
921 if test -f $ac_dir/install-sh; then
922 ac_aux_dir=$ac_dir
923 ac_install_sh="$ac_aux_dir/install-sh -c"
924 break
925 elif test -f $ac_dir/install.sh; then
926 ac_aux_dir=$ac_dir
927 ac_install_sh="$ac_aux_dir/install.sh -c"
928 break
930 done
931 if test -z "$ac_aux_dir"; then
932 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
934 ac_config_guess=$ac_aux_dir/config.guess
935 ac_config_sub=$ac_aux_dir/config.sub
936 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
940 # This works around an automake problem.
941 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
945 # Do some error checking and defaulting for the host and target type.
946 # The inputs are:
947 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
949 # The rules are:
950 # 1. You are not allowed to specify --host, --target, and nonopt at the
951 # same time.
952 # 2. Host defaults to nonopt.
953 # 3. If nonopt is not specified, then host defaults to the current host,
954 # as determined by config.guess.
955 # 4. Target and build default to nonopt.
956 # 5. If nonopt is not specified, then target and build default to host.
958 # The aliases save the names the user supplied, while $host etc.
959 # will get canonicalized.
960 case $host---$target---$nonopt in
961 NONE---*---* | *---NONE---* | *---*---NONE) ;;
962 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
963 esac
966 # Make sure we can run config.sub.
967 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
968 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
971 echo $ac_n "checking host system type""... $ac_c" 1>&6
972 echo "configure:973: checking host system type" >&5
974 host_alias=$host
975 case "$host_alias" in
976 NONE)
977 case $nonopt in
978 NONE)
979 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
980 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
981 fi ;;
982 *) host_alias=$nonopt ;;
983 esac ;;
984 esac
986 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
987 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
988 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
989 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
990 echo "$ac_t""$host" 1>&6
992 echo $ac_n "checking target system type""... $ac_c" 1>&6
993 echo "configure:994: checking target system type" >&5
995 target_alias=$target
996 case "$target_alias" in
997 NONE)
998 case $nonopt in
999 NONE) target_alias=$host_alias ;;
1000 *) target_alias=$nonopt ;;
1001 esac ;;
1002 esac
1004 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1005 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1006 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1007 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1008 echo "$ac_t""$target" 1>&6
1010 echo $ac_n "checking build system type""... $ac_c" 1>&6
1011 echo "configure:1012: checking build system type" >&5
1013 build_alias=$build
1014 case "$build_alias" in
1015 NONE)
1016 case $nonopt in
1017 NONE) build_alias=$host_alias ;;
1018 *) build_alias=$nonopt ;;
1019 esac ;;
1020 esac
1022 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1023 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1024 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1025 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1026 echo "$ac_t""$build" 1>&6
1028 test "$host_alias" != "$target_alias" &&
1029 test "$program_prefix$program_suffix$program_transform_name" = \
1030 NONENONEs,x,x, &&
1031 program_prefix=${target_alias}-
1037 # Extract the first word of "gcc", so it can be a program name with args.
1038 set dummy gcc; ac_word=$2
1039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1040 echo "configure:1041: checking for $ac_word" >&5
1041 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1042 echo $ac_n "(cached) $ac_c" 1>&6
1043 else
1044 if test -n "$CC"; then
1045 ac_cv_prog_CC="$CC" # Let the user override the test.
1046 else
1047 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1048 ac_dummy="$PATH"
1049 for ac_dir in $ac_dummy; do
1050 test -z "$ac_dir" && ac_dir=.
1051 if test -f $ac_dir/$ac_word; then
1052 ac_cv_prog_CC="gcc"
1053 break
1055 done
1056 IFS="$ac_save_ifs"
1059 CC="$ac_cv_prog_CC"
1060 if test -n "$CC"; then
1061 echo "$ac_t""$CC" 1>&6
1062 else
1063 echo "$ac_t""no" 1>&6
1066 if test -z "$CC"; then
1067 # Extract the first word of "cc", so it can be a program name with args.
1068 set dummy cc; ac_word=$2
1069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1070 echo "configure:1071: checking for $ac_word" >&5
1071 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074 if test -n "$CC"; then
1075 ac_cv_prog_CC="$CC" # Let the user override the test.
1076 else
1077 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1078 ac_prog_rejected=no
1079 ac_dummy="$PATH"
1080 for ac_dir in $ac_dummy; do
1081 test -z "$ac_dir" && ac_dir=.
1082 if test -f $ac_dir/$ac_word; then
1083 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1084 ac_prog_rejected=yes
1085 continue
1087 ac_cv_prog_CC="cc"
1088 break
1090 done
1091 IFS="$ac_save_ifs"
1092 if test $ac_prog_rejected = yes; then
1093 # We found a bogon in the path, so make sure we never use it.
1094 set dummy $ac_cv_prog_CC
1095 shift
1096 if test $# -gt 0; then
1097 # We chose a different compiler from the bogus one.
1098 # However, it has the same basename, so the bogon will be chosen
1099 # first if we set CC to just the basename; use the full file name.
1100 shift
1101 set dummy "$ac_dir/$ac_word" "$@"
1102 shift
1103 ac_cv_prog_CC="$@"
1108 CC="$ac_cv_prog_CC"
1109 if test -n "$CC"; then
1110 echo "$ac_t""$CC" 1>&6
1111 else
1112 echo "$ac_t""no" 1>&6
1115 if test -z "$CC"; then
1116 case "`uname -s`" in
1117 *win32* | *WIN32*)
1118 # Extract the first word of "cl", so it can be a program name with args.
1119 set dummy cl; ac_word=$2
1120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1121 echo "configure:1122: checking for $ac_word" >&5
1122 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1123 echo $ac_n "(cached) $ac_c" 1>&6
1124 else
1125 if test -n "$CC"; then
1126 ac_cv_prog_CC="$CC" # Let the user override the test.
1127 else
1128 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1129 ac_dummy="$PATH"
1130 for ac_dir in $ac_dummy; do
1131 test -z "$ac_dir" && ac_dir=.
1132 if test -f $ac_dir/$ac_word; then
1133 ac_cv_prog_CC="cl"
1134 break
1136 done
1137 IFS="$ac_save_ifs"
1140 CC="$ac_cv_prog_CC"
1141 if test -n "$CC"; then
1142 echo "$ac_t""$CC" 1>&6
1143 else
1144 echo "$ac_t""no" 1>&6
1147 esac
1149 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1153 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1154 echo "configure:1155: checking whether we are using GNU C" >&5
1155 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157 else
1158 cat > conftest.c <<EOF
1159 #ifdef __GNUC__
1160 yes;
1161 #endif
1163 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1164 ac_cv_prog_gcc=yes
1165 else
1166 ac_cv_prog_gcc=no
1170 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1172 if test $ac_cv_prog_gcc = yes; then
1173 GCC=yes
1174 else
1175 GCC=
1178 ac_test_CFLAGS="${CFLAGS+set}"
1179 ac_save_CFLAGS="$CFLAGS"
1180 CFLAGS=
1181 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1182 echo "configure:1183: checking whether ${CC-cc} accepts -g" >&5
1183 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1184 echo $ac_n "(cached) $ac_c" 1>&6
1185 else
1186 echo 'void f(){}' > conftest.c
1187 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1188 ac_cv_prog_cc_g=yes
1189 else
1190 ac_cv_prog_cc_g=no
1192 rm -f conftest*
1196 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1197 if test "$ac_test_CFLAGS" = set; then
1198 CFLAGS="$ac_save_CFLAGS"
1199 elif test $ac_cv_prog_cc_g = yes; then
1200 if test "$GCC" = yes; then
1201 CFLAGS="-g -O2"
1202 else
1203 CFLAGS="-g"
1205 else
1206 if test "$GCC" = yes; then
1207 CFLAGS="-O2"
1208 else
1209 CFLAGS=
1214 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
1215 # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
1216 # different definition of CXX than other directories, since we don't
1217 # depend on libstdc++-v3 having already been built.
1221 # Use glibjava_CXX so that we do not cause CXX to be cached with the
1222 # flags that come in CXX while configuring libjava. They're different
1223 # from those used for all other target libraries. If CXX is set in
1224 # the environment, respect that here.
1225 glibjava_CXX=$CXX
1226 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1228 # Extract the first word of "$ac_prog", so it can be a program name with args.
1229 set dummy $ac_prog; ac_word=$2
1230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231 echo "configure:1232: checking for $ac_word" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235 if test -n "$glibjava_CXX"; then
1236 ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test.
1237 else
1238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1239 ac_dummy="$PATH"
1240 for ac_dir in $ac_dummy; do
1241 test -z "$ac_dir" && ac_dir=.
1242 if test -f $ac_dir/$ac_word; then
1243 ac_cv_prog_glibjava_CXX="$ac_prog"
1244 break
1246 done
1247 IFS="$ac_save_ifs"
1250 glibjava_CXX="$ac_cv_prog_glibjava_CXX"
1251 if test -n "$glibjava_CXX"; then
1252 echo "$ac_t""$glibjava_CXX" 1>&6
1253 else
1254 echo "$ac_t""no" 1>&6
1257 test -n "$glibjava_CXX" && break
1258 done
1259 test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1262 CXX=$glibjava_CXX
1263 test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1265 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1266 echo "configure:1267: checking whether we are using GNU C++" >&5
1267 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1268 echo $ac_n "(cached) $ac_c" 1>&6
1269 else
1270 cat > conftest.C <<EOF
1271 #ifdef __GNUC__
1272 yes;
1273 #endif
1275 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1276 ac_cv_prog_gxx=yes
1277 else
1278 ac_cv_prog_gxx=no
1282 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1284 if test $ac_cv_prog_gxx = yes; then
1285 GXX=yes
1286 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1287 ac_save_CXXFLAGS="$CXXFLAGS"
1288 CXXFLAGS=
1289 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1290 echo "configure:1291: checking whether ${CXX-g++} accepts -g" >&5
1291 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1292 echo $ac_n "(cached) $ac_c" 1>&6
1293 else
1294 echo 'void f(){}' > conftest.cc
1295 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1296 ac_cv_prog_cxx_g=yes
1297 else
1298 ac_cv_prog_cxx_g=no
1300 rm -f conftest*
1304 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1305 if test "$ac_test_CXXFLAGS" = set; then
1306 CXXFLAGS="$ac_save_CXXFLAGS"
1307 elif test $ac_cv_prog_cxx_g = yes; then
1308 CXXFLAGS="-g -O2"
1309 else
1310 CXXFLAGS="-O2"
1312 else
1313 GXX=
1314 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1318 version=0.0.7
1320 PACKAGE=libjava
1322 VERSION=$version
1324 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1325 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1327 cat >> confdefs.h <<EOF
1328 #define PACKAGE "$PACKAGE"
1331 cat >> confdefs.h <<EOF
1332 #define VERSION "$VERSION"
1337 missing_dir=`cd $ac_aux_dir && pwd`
1338 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1339 echo "configure:1340: checking for working aclocal" >&5
1340 # Run test in a subshell; some versions of sh will print an error if
1341 # an executable is not found, even if stderr is redirected.
1342 # Redirect stdin to placate older versions of autoconf. Sigh.
1343 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1344 ACLOCAL=aclocal
1345 echo "$ac_t""found" 1>&6
1346 else
1347 ACLOCAL="$missing_dir/missing aclocal"
1348 echo "$ac_t""missing" 1>&6
1351 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1352 echo "configure:1353: checking for working autoconf" >&5
1353 # Run test in a subshell; some versions of sh will print an error if
1354 # an executable is not found, even if stderr is redirected.
1355 # Redirect stdin to placate older versions of autoconf. Sigh.
1356 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1357 AUTOCONF=autoconf
1358 echo "$ac_t""found" 1>&6
1359 else
1360 AUTOCONF="$missing_dir/missing autoconf"
1361 echo "$ac_t""missing" 1>&6
1364 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1365 echo "configure:1366: checking for working automake" >&5
1366 # Run test in a subshell; some versions of sh will print an error if
1367 # an executable is not found, even if stderr is redirected.
1368 # Redirect stdin to placate older versions of autoconf. Sigh.
1369 if (automake --version) < /dev/null > /dev/null 2>&1; then
1370 AUTOMAKE=automake
1371 echo "$ac_t""found" 1>&6
1372 else
1373 AUTOMAKE="$missing_dir/missing automake"
1374 echo "$ac_t""missing" 1>&6
1377 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1378 echo "configure:1379: checking for working autoheader" >&5
1379 # Run test in a subshell; some versions of sh will print an error if
1380 # an executable is not found, even if stderr is redirected.
1381 # Redirect stdin to placate older versions of autoconf. Sigh.
1382 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1383 AUTOHEADER=autoheader
1384 echo "$ac_t""found" 1>&6
1385 else
1386 AUTOHEADER="$missing_dir/missing autoheader"
1387 echo "$ac_t""missing" 1>&6
1390 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1391 echo "configure:1392: checking for working makeinfo" >&5
1392 # Run test in a subshell; some versions of sh will print an error if
1393 # an executable is not found, even if stderr is redirected.
1394 # Redirect stdin to placate older versions of autoconf. Sigh.
1395 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1396 MAKEINFO=makeinfo
1397 echo "$ac_t""found" 1>&6
1398 else
1399 MAKEINFO="$missing_dir/missing makeinfo"
1400 echo "$ac_t""missing" 1>&6
1405 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
1406 # run it explicitly here, it will be run implicitly before
1407 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1408 # be run before AC_CANONICAL_HOST.
1409 echo $ac_n "checking build system type""... $ac_c" 1>&6
1410 echo "configure:1411: checking build system type" >&5
1412 build_alias=$build
1413 case "$build_alias" in
1414 NONE)
1415 case $nonopt in
1416 NONE) build_alias=$host_alias ;;
1417 *) build_alias=$nonopt ;;
1418 esac ;;
1419 esac
1421 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1422 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1423 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1424 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1425 echo "$ac_t""$build" 1>&6
1428 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1429 set dummy ${ac_tool_prefix}as; ac_word=$2
1430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1431 echo "configure:1432: checking for $ac_word" >&5
1432 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1433 echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435 if test -n "$AS"; then
1436 ac_cv_prog_AS="$AS" # Let the user override the test.
1437 else
1438 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1439 ac_dummy="$PATH"
1440 for ac_dir in $ac_dummy; do
1441 test -z "$ac_dir" && ac_dir=.
1442 if test -f $ac_dir/$ac_word; then
1443 ac_cv_prog_AS="${ac_tool_prefix}as"
1444 break
1446 done
1447 IFS="$ac_save_ifs"
1448 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1451 AS="$ac_cv_prog_AS"
1452 if test -n "$AS"; then
1453 echo "$ac_t""$AS" 1>&6
1454 else
1455 echo "$ac_t""no" 1>&6
1460 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1461 set dummy ${ac_tool_prefix}ar; ac_word=$2
1462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1463 echo "configure:1464: checking for $ac_word" >&5
1464 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1465 echo $ac_n "(cached) $ac_c" 1>&6
1466 else
1467 if test -n "$AR"; then
1468 ac_cv_prog_AR="$AR" # Let the user override the test.
1469 else
1470 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1471 ac_dummy="$PATH"
1472 for ac_dir in $ac_dummy; do
1473 test -z "$ac_dir" && ac_dir=.
1474 if test -f $ac_dir/$ac_word; then
1475 ac_cv_prog_AR="${ac_tool_prefix}ar"
1476 break
1478 done
1479 IFS="$ac_save_ifs"
1480 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1483 AR="$ac_cv_prog_AR"
1484 if test -n "$AR"; then
1485 echo "$ac_t""$AR" 1>&6
1486 else
1487 echo "$ac_t""no" 1>&6
1492 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1493 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1495 echo "configure:1496: checking for $ac_word" >&5
1496 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1497 echo $ac_n "(cached) $ac_c" 1>&6
1498 else
1499 if test -n "$RANLIB"; then
1500 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1501 else
1502 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1503 ac_dummy="$PATH"
1504 for ac_dir in $ac_dummy; do
1505 test -z "$ac_dir" && ac_dir=.
1506 if test -f $ac_dir/$ac_word; then
1507 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1508 break
1510 done
1511 IFS="$ac_save_ifs"
1514 RANLIB="$ac_cv_prog_RANLIB"
1515 if test -n "$RANLIB"; then
1516 echo "$ac_t""$RANLIB" 1>&6
1517 else
1518 echo "$ac_t""no" 1>&6
1522 if test -z "$ac_cv_prog_RANLIB"; then
1523 if test -n "$ac_tool_prefix"; then
1524 # Extract the first word of "ranlib", so it can be a program name with args.
1525 set dummy ranlib; ac_word=$2
1526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1527 echo "configure:1528: checking for $ac_word" >&5
1528 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1529 echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531 if test -n "$RANLIB"; then
1532 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1533 else
1534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1535 ac_dummy="$PATH"
1536 for ac_dir in $ac_dummy; do
1537 test -z "$ac_dir" && ac_dir=.
1538 if test -f $ac_dir/$ac_word; then
1539 ac_cv_prog_RANLIB="ranlib"
1540 break
1542 done
1543 IFS="$ac_save_ifs"
1544 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1547 RANLIB="$ac_cv_prog_RANLIB"
1548 if test -n "$RANLIB"; then
1549 echo "$ac_t""$RANLIB" 1>&6
1550 else
1551 echo "$ac_t""no" 1>&6
1554 else
1555 RANLIB=":"
1560 # Find a good install program. We prefer a C program (faster),
1561 # so one script is as good as another. But avoid the broken or
1562 # incompatible versions:
1563 # SysV /etc/install, /usr/sbin/install
1564 # SunOS /usr/etc/install
1565 # IRIX /sbin/install
1566 # AIX /bin/install
1567 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1568 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1569 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1570 # ./install, which can be erroneously created by make from ./install.sh.
1571 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1572 echo "configure:1573: checking for a BSD compatible install" >&5
1573 if test -z "$INSTALL"; then
1574 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1575 echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1578 for ac_dir in $PATH; do
1579 # Account for people who put trailing slashes in PATH elements.
1580 case "$ac_dir/" in
1581 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1583 # OSF1 and SCO ODT 3.0 have their own names for install.
1584 # Don't use installbsd from OSF since it installs stuff as root
1585 # by default.
1586 for ac_prog in ginstall scoinst install; do
1587 if test -f $ac_dir/$ac_prog; then
1588 if test $ac_prog = install &&
1589 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1590 # AIX install. It has an incompatible calling convention.
1592 else
1593 ac_cv_path_install="$ac_dir/$ac_prog -c"
1594 break 2
1597 done
1599 esac
1600 done
1601 IFS="$ac_save_IFS"
1604 if test "${ac_cv_path_install+set}" = set; then
1605 INSTALL="$ac_cv_path_install"
1606 else
1607 # As a last resort, use the slow shell script. We don't cache a
1608 # path for INSTALL within a source directory, because that will
1609 # break other packages using the cache if that directory is
1610 # removed, or if the path is relative.
1611 INSTALL="$ac_install_sh"
1614 echo "$ac_t""$INSTALL" 1>&6
1616 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1617 # It thinks the first close brace ends the variable substitution.
1618 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1620 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1622 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1625 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1626 echo "configure:1627: checking whether to enable maintainer-specific portions of Makefiles" >&5
1627 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1628 if test "${enable_maintainer_mode+set}" = set; then
1629 enableval="$enable_maintainer_mode"
1630 USE_MAINTAINER_MODE=$enableval
1631 else
1632 USE_MAINTAINER_MODE=no
1635 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1638 if test $USE_MAINTAINER_MODE = yes; then
1639 MAINTAINER_MODE_TRUE=
1640 MAINTAINER_MODE_FALSE='#'
1641 else
1642 MAINTAINER_MODE_TRUE='#'
1643 MAINTAINER_MODE_FALSE=
1645 MAINT=$MAINTAINER_MODE_TRUE
1651 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1652 echo "configure:1653: checking for executable suffix" >&5
1653 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1655 else
1656 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1657 ac_cv_exeext=.exe
1658 else
1659 rm -f conftest*
1660 echo 'int main () { return 0; }' > conftest.$ac_ext
1661 ac_cv_exeext=
1662 if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1663 for file in conftest.*; do
1664 case $file in
1665 *.c | *.o | *.obj) ;;
1666 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1667 esac
1668 done
1669 else
1670 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1672 rm -f conftest*
1673 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1677 EXEEXT=""
1678 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1679 echo "$ac_t""${ac_cv_exeext}" 1>&6
1680 ac_exeext=$EXEEXT
1683 # configure.host sets the following important variables
1684 # libgcj_cflags - host specific C compiler flags
1685 # libgcj_cxxflags - host specific C++ compiler flags
1686 # libgcj_javaflags - host specific Java compiler flags
1688 libgcj_cflags=
1689 libgcj_cxxflags=
1690 libgcj_javaflags=
1692 . ${srcdir}/configure.host
1694 LIBGCJ_CFLAGS="${libgcj_cflags}"
1695 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1696 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1706 # Only use libltdl for native builds.
1707 if test -z "${with_cross_host}"; then
1708 case $enable_ltdl_convenience in
1709 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1710 "") enable_ltdl_convenience=yes
1711 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1712 esac
1713 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1714 INCLTDL='-I${top_srcdir}/''libltdl'
1717 DIRLTDL=libltdl
1718 cat >> confdefs.h <<\EOF
1719 #define USE_LTDL 1
1722 # Sigh. Libtool's macro doesn't do the right thing.
1723 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1724 # FIXME: this is a hack.
1725 sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
1726 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1731 # Check whether --enable-shared or --disable-shared was given.
1732 if test "${enable_shared+set}" = set; then
1733 enableval="$enable_shared"
1734 p=${PACKAGE-default}
1735 case $enableval in
1736 yes) enable_shared=yes ;;
1737 no) enable_shared=no ;;
1739 enable_shared=no
1740 # Look at the argument we got. We use all the common list separators.
1741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1742 for pkg in $enableval; do
1743 if test "X$pkg" = "X$p"; then
1744 enable_shared=yes
1746 done
1747 IFS="$ac_save_ifs"
1749 esac
1750 else
1751 enable_shared=yes
1754 # Check whether --enable-static or --disable-static was given.
1755 if test "${enable_static+set}" = set; then
1756 enableval="$enable_static"
1757 p=${PACKAGE-default}
1758 case $enableval in
1759 yes) enable_static=yes ;;
1760 no) enable_static=no ;;
1762 enable_static=no
1763 # Look at the argument we got. We use all the common list separators.
1764 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1765 for pkg in $enableval; do
1766 if test "X$pkg" = "X$p"; then
1767 enable_static=yes
1769 done
1770 IFS="$ac_save_ifs"
1772 esac
1773 else
1774 enable_static=yes
1777 # Check whether --enable-fast-install or --disable-fast-install was given.
1778 if test "${enable_fast_install+set}" = set; then
1779 enableval="$enable_fast_install"
1780 p=${PACKAGE-default}
1781 case $enableval in
1782 yes) enable_fast_install=yes ;;
1783 no) enable_fast_install=no ;;
1785 enable_fast_install=no
1786 # Look at the argument we got. We use all the common list separators.
1787 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1788 for pkg in $enableval; do
1789 if test "X$pkg" = "X$p"; then
1790 enable_fast_install=yes
1792 done
1793 IFS="$ac_save_ifs"
1795 esac
1796 else
1797 enable_fast_install=yes
1800 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1801 if test "${with_gnu_ld+set}" = set; then
1802 withval="$with_gnu_ld"
1803 test "$withval" = no || with_gnu_ld=yes
1804 else
1805 with_gnu_ld=no
1808 ac_prog=ld
1809 if test "$GCC" = yes; then
1810 # Check if gcc -print-prog-name=ld gives a path.
1811 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1812 echo "configure:1813: checking for ld used by GCC" >&5
1813 case $host in
1814 *-*-mingw*)
1815 # gcc leaves a trailing carriage return which upsets mingw
1816 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1818 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1819 esac
1820 case $ac_prog in
1821 # Accept absolute paths.
1822 [\\/]* | [A-Za-z]:[\\/]*)
1823 re_direlt='/[^/][^/]*/\.\./'
1824 # Canonicalize the path of ld
1825 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1826 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1827 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1828 done
1829 test -z "$LD" && LD="$ac_prog"
1832 # If it fails, then pretend we aren't using GCC.
1833 ac_prog=ld
1836 # If it is relative, then search for the first ld in PATH.
1837 with_gnu_ld=unknown
1839 esac
1840 elif test "$with_gnu_ld" = yes; then
1841 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1842 echo "configure:1843: checking for GNU ld" >&5
1843 else
1844 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1845 echo "configure:1846: checking for non-GNU ld" >&5
1847 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1848 echo $ac_n "(cached) $ac_c" 1>&6
1849 else
1850 if test -z "$LD"; then
1851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1852 for ac_dir in $PATH; do
1853 test -z "$ac_dir" && ac_dir=.
1854 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1855 lt_cv_path_LD="$ac_dir/$ac_prog"
1856 # Check to see if the program is GNU ld. I'd rather use --version,
1857 # but apparently some GNU ld's only accept -v.
1858 # Break only if it was the GNU/non-GNU ld that we prefer.
1859 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1860 test "$with_gnu_ld" != no && break
1861 else
1862 test "$with_gnu_ld" != yes && break
1865 done
1866 IFS="$ac_save_ifs"
1867 else
1868 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1872 LD="$lt_cv_path_LD"
1873 if test -n "$LD"; then
1874 echo "$ac_t""$LD" 1>&6
1875 else
1876 echo "$ac_t""no" 1>&6
1878 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1879 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1880 echo "configure:1881: checking if the linker ($LD) is GNU ld" >&5
1881 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1882 echo $ac_n "(cached) $ac_c" 1>&6
1883 else
1884 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1885 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1886 lt_cv_prog_gnu_ld=yes
1887 else
1888 lt_cv_prog_gnu_ld=no
1892 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1893 with_gnu_ld=$lt_cv_prog_gnu_ld
1896 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1897 echo "configure:1898: checking for $LD option to reload object files" >&5
1898 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1900 else
1901 lt_cv_ld_reload_flag='-r'
1904 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1905 reload_flag=$lt_cv_ld_reload_flag
1906 test -n "$reload_flag" && reload_flag=" $reload_flag"
1908 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1909 echo "configure:1910: checking for BSD-compatible nm" >&5
1910 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1911 echo $ac_n "(cached) $ac_c" 1>&6
1912 else
1913 if test -n "$NM"; then
1914 # Let the user override the test.
1915 lt_cv_path_NM="$NM"
1916 else
1917 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1918 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1919 test -z "$ac_dir" && ac_dir=.
1920 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1921 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1922 # Check to see if the nm accepts a BSD-compat flag.
1923 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1924 # nm: unknown option "B" ignored
1925 # Tru64's nm complains that /dev/null is an invalid object file
1926 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1927 lt_cv_path_NM="$tmp_nm -B"
1928 break
1929 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1930 lt_cv_path_NM="$tmp_nm -p"
1931 break
1932 else
1933 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1934 continue # so that we can try to find one that supports BSD flags
1937 done
1938 IFS="$ac_save_ifs"
1939 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1943 NM="$lt_cv_path_NM"
1944 echo "$ac_t""$NM" 1>&6
1946 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1947 echo "configure:1948: checking how to recognise dependant libraries" >&5
1948 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1949 echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951 lt_cv_file_magic_cmd='$MAGIC_CMD'
1952 lt_cv_file_magic_test_file=
1953 lt_cv_deplibs_check_method='unknown'
1954 # Need to set the preceding variable on all platforms that support
1955 # interlibrary dependencies.
1956 # 'none' -- dependencies not supported.
1957 # `unknown' -- same as none, but documents that we really don't know.
1958 # 'pass_all' -- all dependencies passed with no checks.
1959 # 'test_compile' -- check by making test program.
1960 # 'file_magic [regex]' -- check by looking for files in library path
1961 # which responds to the $file_magic_cmd with a given egrep regex.
1962 # If you have `file' or equivalent on your system and you're not sure
1963 # whether `pass_all' will *always* work, you probably want this one.
1965 case $host_os in
1966 aix*)
1967 lt_cv_deplibs_check_method=pass_all
1970 beos*)
1971 lt_cv_deplibs_check_method=pass_all
1974 bsdi4*)
1975 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1976 lt_cv_file_magic_cmd='/usr/bin/file -L'
1977 lt_cv_file_magic_test_file=/shlib/libc.so
1980 cygwin* | mingw* |pw32*)
1981 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1982 lt_cv_file_magic_cmd='$OBJDUMP -f'
1985 darwin* | rhapsody*)
1986 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1987 lt_cv_file_magic_cmd='/usr/bin/file -L'
1988 case "$host_os" in
1989 rhapsody* | darwin1.012)
1990 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1992 *) # Darwin 1.3 on
1993 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1995 esac
1998 freebsd* )
1999 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2000 case $host_cpu in
2001 i*86 )
2002 # Not sure whether the presence of OpenBSD here was a mistake.
2003 # Let's accept both of them until this is cleared up.
2004 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
2005 lt_cv_file_magic_cmd=/usr/bin/file
2006 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2008 esac
2009 else
2010 lt_cv_deplibs_check_method=pass_all
2014 gnu*)
2015 lt_cv_deplibs_check_method=pass_all
2018 hpux10.20*|hpux11*)
2019 case $host_cpu in
2020 hppa*)
2021 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2022 lt_cv_file_magic_cmd=/usr/bin/file
2023 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2025 ia64*)
2026 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
2027 lt_cv_file_magic_cmd=/usr/bin/file
2028 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2030 esac
2033 irix5* | irix6*)
2034 case $host_os in
2035 irix5*)
2036 # this will be overridden with pass_all, but let us keep it just in case
2037 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2040 case $LD in
2041 *-32|*"-32 ") libmagic=32-bit;;
2042 *-n32|*"-n32 ") libmagic=N32;;
2043 *-64|*"-64 ") libmagic=64-bit;;
2044 *) libmagic=never-match;;
2045 esac
2046 # this will be overridden with pass_all, but let us keep it just in case
2047 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2049 esac
2050 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2051 lt_cv_deplibs_check_method=pass_all
2054 # This must be Linux ELF.
2055 linux-gnu*)
2056 case $host_cpu in
2057 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2058 lt_cv_deplibs_check_method=pass_all ;;
2060 # glibc up to 2.1.1 does not perform some relocations on ARM
2061 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2062 esac
2063 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2066 netbsd*)
2067 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2068 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2069 else
2070 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2074 newsos6)
2075 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2076 lt_cv_file_magic_cmd=/usr/bin/file
2077 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2080 osf3* | osf4* | osf5*)
2081 # this will be overridden with pass_all, but let us keep it just in case
2082 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2083 lt_cv_file_magic_test_file=/shlib/libc.so
2084 lt_cv_deplibs_check_method=pass_all
2087 sco3.2v5*)
2088 lt_cv_deplibs_check_method=pass_all
2091 solaris*)
2092 lt_cv_deplibs_check_method=pass_all
2093 lt_cv_file_magic_test_file=/lib/libc.so
2096 sysv5uw[78]* | sysv4*uw2*)
2097 lt_cv_deplibs_check_method=pass_all
2100 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2101 case $host_vendor in
2102 ncr)
2103 lt_cv_deplibs_check_method=pass_all
2105 motorola)
2106 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]'
2107 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2109 esac
2111 esac
2115 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2116 file_magic_cmd=$lt_cv_file_magic_cmd
2117 deplibs_check_method=$lt_cv_deplibs_check_method
2119 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2120 echo "configure:2121: checking for object suffix" >&5
2121 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2122 echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124 rm -f conftest*
2125 echo 'int i = 1;' > conftest.$ac_ext
2126 if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2127 for ac_file in conftest.*; do
2128 case $ac_file in
2129 *.c) ;;
2130 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2131 esac
2132 done
2133 else
2134 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2136 rm -f conftest*
2139 echo "$ac_t""$ac_cv_objext" 1>&6
2140 OBJEXT=$ac_cv_objext
2141 ac_objext=$ac_cv_objext
2143 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2145 # Only perform the check for file, if the check method requires it
2146 case $deplibs_check_method in
2147 file_magic*)
2148 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2149 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2150 echo "configure:2151: checking for ${ac_tool_prefix}file" >&5
2151 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2152 echo $ac_n "(cached) $ac_c" 1>&6
2153 else
2154 case $MAGIC_CMD in
2156 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2158 ?:/*)
2159 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2162 ac_save_MAGIC_CMD="$MAGIC_CMD"
2163 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2164 ac_dummy="/usr/bin:$PATH"
2165 for ac_dir in $ac_dummy; do
2166 test -z "$ac_dir" && ac_dir=.
2167 if test -f $ac_dir/${ac_tool_prefix}file; then
2168 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2169 if test -n "$file_magic_test_file"; then
2170 case $deplibs_check_method in
2171 "file_magic "*)
2172 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2173 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2174 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2175 egrep "$file_magic_regex" > /dev/null; then
2177 else
2178 cat <<EOF 1>&2
2180 *** Warning: the command libtool uses to detect shared libraries,
2181 *** $file_magic_cmd, produces output that libtool cannot recognize.
2182 *** The result is that libtool may fail to recognize shared libraries
2183 *** as such. This will affect the creation of libtool libraries that
2184 *** depend on shared libraries, but programs linked with such libtool
2185 *** libraries will work regardless of this problem. Nevertheless, you
2186 *** may want to report the problem to your system manager and/or to
2187 *** bug-libtool@gnu.org
2190 fi ;;
2191 esac
2193 break
2195 done
2196 IFS="$ac_save_ifs"
2197 MAGIC_CMD="$ac_save_MAGIC_CMD"
2199 esac
2202 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2203 if test -n "$MAGIC_CMD"; then
2204 echo "$ac_t""$MAGIC_CMD" 1>&6
2205 else
2206 echo "$ac_t""no" 1>&6
2209 if test -z "$lt_cv_path_MAGIC_CMD"; then
2210 if test -n "$ac_tool_prefix"; then
2211 echo $ac_n "checking for file""... $ac_c" 1>&6
2212 echo "configure:2213: checking for file" >&5
2213 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2214 echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216 case $MAGIC_CMD in
2218 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2220 ?:/*)
2221 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2224 ac_save_MAGIC_CMD="$MAGIC_CMD"
2225 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2226 ac_dummy="/usr/bin:$PATH"
2227 for ac_dir in $ac_dummy; do
2228 test -z "$ac_dir" && ac_dir=.
2229 if test -f $ac_dir/file; then
2230 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2231 if test -n "$file_magic_test_file"; then
2232 case $deplibs_check_method in
2233 "file_magic "*)
2234 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2235 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2236 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2237 egrep "$file_magic_regex" > /dev/null; then
2239 else
2240 cat <<EOF 1>&2
2242 *** Warning: the command libtool uses to detect shared libraries,
2243 *** $file_magic_cmd, produces output that libtool cannot recognize.
2244 *** The result is that libtool may fail to recognize shared libraries
2245 *** as such. This will affect the creation of libtool libraries that
2246 *** depend on shared libraries, but programs linked with such libtool
2247 *** libraries will work regardless of this problem. Nevertheless, you
2248 *** may want to report the problem to your system manager and/or to
2249 *** bug-libtool@gnu.org
2252 fi ;;
2253 esac
2255 break
2257 done
2258 IFS="$ac_save_ifs"
2259 MAGIC_CMD="$ac_save_MAGIC_CMD"
2261 esac
2264 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2265 if test -n "$MAGIC_CMD"; then
2266 echo "$ac_t""$MAGIC_CMD" 1>&6
2267 else
2268 echo "$ac_t""no" 1>&6
2271 else
2272 MAGIC_CMD=:
2278 esac
2280 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2281 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2282 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2283 echo "configure:2284: checking for $ac_word" >&5
2284 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2285 echo $ac_n "(cached) $ac_c" 1>&6
2286 else
2287 if test -n "$RANLIB"; then
2288 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2289 else
2290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2291 ac_dummy="$PATH"
2292 for ac_dir in $ac_dummy; do
2293 test -z "$ac_dir" && ac_dir=.
2294 if test -f $ac_dir/$ac_word; then
2295 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2296 break
2298 done
2299 IFS="$ac_save_ifs"
2302 RANLIB="$ac_cv_prog_RANLIB"
2303 if test -n "$RANLIB"; then
2304 echo "$ac_t""$RANLIB" 1>&6
2305 else
2306 echo "$ac_t""no" 1>&6
2310 if test -z "$ac_cv_prog_RANLIB"; then
2311 if test -n "$ac_tool_prefix"; then
2312 # Extract the first word of "ranlib", so it can be a program name with args.
2313 set dummy ranlib; ac_word=$2
2314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2315 echo "configure:2316: checking for $ac_word" >&5
2316 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2317 echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319 if test -n "$RANLIB"; then
2320 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2321 else
2322 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2323 ac_dummy="$PATH"
2324 for ac_dir in $ac_dummy; do
2325 test -z "$ac_dir" && ac_dir=.
2326 if test -f $ac_dir/$ac_word; then
2327 ac_cv_prog_RANLIB="ranlib"
2328 break
2330 done
2331 IFS="$ac_save_ifs"
2332 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2335 RANLIB="$ac_cv_prog_RANLIB"
2336 if test -n "$RANLIB"; then
2337 echo "$ac_t""$RANLIB" 1>&6
2338 else
2339 echo "$ac_t""no" 1>&6
2342 else
2343 RANLIB=":"
2347 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2348 set dummy ${ac_tool_prefix}strip; ac_word=$2
2349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2350 echo "configure:2351: checking for $ac_word" >&5
2351 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354 if test -n "$STRIP"; then
2355 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2356 else
2357 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2358 ac_dummy="$PATH"
2359 for ac_dir in $ac_dummy; do
2360 test -z "$ac_dir" && ac_dir=.
2361 if test -f $ac_dir/$ac_word; then
2362 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2363 break
2365 done
2366 IFS="$ac_save_ifs"
2369 STRIP="$ac_cv_prog_STRIP"
2370 if test -n "$STRIP"; then
2371 echo "$ac_t""$STRIP" 1>&6
2372 else
2373 echo "$ac_t""no" 1>&6
2377 if test -z "$ac_cv_prog_STRIP"; then
2378 if test -n "$ac_tool_prefix"; then
2379 # Extract the first word of "strip", so it can be a program name with args.
2380 set dummy strip; ac_word=$2
2381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2382 echo "configure:2383: checking for $ac_word" >&5
2383 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2384 echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386 if test -n "$STRIP"; then
2387 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2388 else
2389 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2390 ac_dummy="$PATH"
2391 for ac_dir in $ac_dummy; do
2392 test -z "$ac_dir" && ac_dir=.
2393 if test -f $ac_dir/$ac_word; then
2394 ac_cv_prog_STRIP="strip"
2395 break
2397 done
2398 IFS="$ac_save_ifs"
2399 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2402 STRIP="$ac_cv_prog_STRIP"
2403 if test -n "$STRIP"; then
2404 echo "$ac_t""$STRIP" 1>&6
2405 else
2406 echo "$ac_t""no" 1>&6
2409 else
2410 STRIP=":"
2415 # Check for any special flags to pass to ltconfig.
2416 libtool_flags="--cache-file=$cache_file"
2417 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2418 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2419 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2420 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2421 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2422 libtool_flags="$libtool_flags --enable-dlopen"
2424 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2425 if test "${enable_libtool_lock+set}" = set; then
2426 enableval="$enable_libtool_lock"
2430 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2431 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2433 # Check whether --with-pic or --without-pic was given.
2434 if test "${with_pic+set}" = set; then
2435 withval="$with_pic"
2436 pic_mode="$withval"
2437 else
2438 pic_mode=default
2441 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2442 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2444 # Some flags need to be propagated to the compiler or linker for good
2445 # libtool support.
2446 case $host in
2447 *-*-irix6*)
2448 # Find out which ABI we are using.
2449 echo '#line 2450 "configure"' > conftest.$ac_ext
2450 if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2451 if test "$lt_cv_prog_gnu_ld" = yes; then
2452 case `/usr/bin/file conftest.$ac_objext` in
2453 *32-bit*)
2454 LD="${LD-ld} -melf32bsmip"
2456 *N32*)
2457 LD="${LD-ld} -melf32bmipn32"
2459 *64-bit*)
2460 LD="${LD-ld} -melf64bmip"
2462 esac
2463 else
2464 case `/usr/bin/file conftest.$ac_objext` in
2465 *32-bit*)
2466 LD="${LD-ld} -32"
2468 *N32*)
2469 LD="${LD-ld} -n32"
2471 *64-bit*)
2472 LD="${LD-ld} -64"
2474 esac
2477 rm -rf conftest*
2480 ia64-*-hpux*)
2481 # Find out which ABI we are using.
2482 echo 'int i;' > conftest.$ac_ext
2483 if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2484 case "`/usr/bin/file conftest.o`" in
2485 *ELF-32*)
2486 HPUX_IA64_MODE="32"
2488 *ELF-64*)
2489 HPUX_IA64_MODE="64"
2491 esac
2493 rm -rf conftest*
2496 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2497 # Find out which ABI we are using.
2498 echo 'int i;' > conftest.$ac_ext
2499 if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2500 case "`/usr/bin/file conftest.o`" in
2501 *32-bit*)
2502 case $host in
2503 x86_64-*linux*)
2504 LD="${LD-ld} -m elf_i386"
2506 ppc64-*linux*)
2507 LD="${LD-ld} -m elf32ppclinux"
2509 s390x-*linux*)
2510 LD="${LD-ld} -m elf_s390"
2512 sparc64-*linux*)
2513 LD="${LD-ld} -m elf32_sparc"
2515 esac
2517 *64-bit*)
2518 case $host in
2519 x86_64-*linux*)
2520 LD="${LD-ld} -m elf_x86_64"
2522 ppc*-*linux*|powerpc*-*linux*)
2523 LD="${LD-ld} -m elf64ppc"
2525 s390*-*linux*)
2526 LD="${LD-ld} -m elf64_s390"
2528 sparc*-*linux*)
2529 LD="${LD-ld} -m elf64_sparc"
2531 esac
2533 esac
2535 rm -rf conftest*
2538 *-*-sco3.2v5*)
2539 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2540 SAVE_CFLAGS="$CFLAGS"
2541 CFLAGS="$CFLAGS -belf"
2542 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2543 echo "configure:2544: checking whether the C compiler needs -belf" >&5
2544 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2545 echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2548 ac_ext=c
2549 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2550 ac_cpp='$CPP $CPPFLAGS'
2551 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2552 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2553 cross_compiling=$ac_cv_prog_cc_cross
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2559 int main() {
2561 ; return 0; }
2563 if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2564 rm -rf conftest*
2565 lt_cv_cc_needs_belf=yes
2566 else
2567 echo "configure: failed program was:" >&5
2568 cat conftest.$ac_ext >&5
2569 rm -rf conftest*
2570 lt_cv_cc_needs_belf=no
2572 rm -f conftest*
2573 ac_ext=c
2574 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2575 ac_cpp='$CPP $CPPFLAGS'
2576 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2577 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2578 cross_compiling=$ac_cv_prog_cc_cross
2582 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2583 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2584 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2585 CFLAGS="$SAVE_CFLAGS"
2590 esac
2592 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2593 echo "configure:2594: checking how to run the C++ preprocessor" >&5
2594 if test -z "$CXXCPP"; then
2595 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2596 echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598 ac_ext=C
2599 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2600 ac_cpp='$CXXCPP $CPPFLAGS'
2601 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2602 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2603 cross_compiling=$ac_cv_prog_cxx_cross
2604 CXXCPP="${CXX-g++} -E"
2605 cat > conftest.$ac_ext <<EOF
2606 #line 2607 "configure"
2607 #include "confdefs.h"
2608 #include <stdlib.h>
2610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2611 { (eval echo configure:2612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2613 if test -z "$ac_err"; then
2615 else
2616 echo "$ac_err" >&5
2617 echo "configure: failed program was:" >&5
2618 cat conftest.$ac_ext >&5
2619 rm -rf conftest*
2620 CXXCPP=/lib/cpp
2622 rm -f conftest*
2623 ac_cv_prog_CXXCPP="$CXXCPP"
2624 ac_ext=c
2625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2626 ac_cpp='$CPP $CPPFLAGS'
2627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2629 cross_compiling=$ac_cv_prog_cc_cross
2632 CXXCPP="$ac_cv_prog_CXXCPP"
2633 echo "$ac_t""$CXXCPP" 1>&6
2636 # Save cache, so that ltconfig can load it
2637 cat > confcache <<\EOF
2638 # This file is a shell script that caches the results of configure
2639 # tests run on this system so they can be shared between configure
2640 # scripts and configure runs. It is not useful on other systems.
2641 # If it contains results you don't want to keep, you may remove or edit it.
2643 # By default, configure uses ./config.cache as the cache file,
2644 # creating it if it does not exist already. You can give configure
2645 # the --cache-file=FILE option to use a different cache file; that is
2646 # what configure does when it calls configure scripts in
2647 # subdirectories, so they share the cache.
2648 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2649 # config.status only pays attention to the cache file if you give it the
2650 # --recheck option to rerun configure.
2653 # The following way of writing the cache mishandles newlines in values,
2654 # but we know of no workaround that is simple, portable, and efficient.
2655 # So, don't put newlines in cache variables' values.
2656 # Ultrix sh set writes to stderr and can't be redirected directly,
2657 # and sets the high bit in the cache file unless we assign to the vars.
2658 (set) 2>&1 |
2659 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2660 *ac_space=\ *)
2661 # `set' does not quote correctly, so add quotes (double-quote substitution
2662 # turns \\\\ into \\, and sed turns \\ into \).
2663 sed -n \
2664 -e "s/'/'\\\\''/g" \
2665 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2668 # `set' quotes correctly as required by POSIX, so do not add quotes.
2669 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2671 esac >> confcache
2672 if cmp -s $cache_file confcache; then
2674 else
2675 if test -w $cache_file; then
2676 echo "updating cache $cache_file"
2677 cat confcache > $cache_file
2678 else
2679 echo "not updating unwritable cache $cache_file"
2682 rm -f confcache
2685 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2686 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2687 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2688 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2689 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2690 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2691 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2692 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2693 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2694 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2696 # Reload cache, that may have been modified by ltconfig
2697 if test -r "$cache_file"; then
2698 echo "loading cache $cache_file"
2699 . $cache_file
2700 else
2701 echo "creating cache $cache_file"
2702 > $cache_file
2706 # This can be used to rebuild libtool when needed
2707 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2709 # Always use our own libtool.
2710 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2712 # Redirect the config.log output again, so that the ltconfig log is not
2713 # clobbered by the next message.
2714 exec 5>>./config.log
2718 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2719 lt_save_CC="$CC"
2720 lt_save_CFLAGS="$CFLAGS"
2721 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2722 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2723 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2724 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2725 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2726 deplibs_check_method="$deplibs_check_method" \
2727 file_magic_cmd="$file_magic_cmd" \
2728 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2729 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2730 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2731 CC="$lt_save_CC"
2732 CFLAGS="$lt_save_CFLAGS"
2734 # Redirect the config.log output again, so that the ltconfig log is not
2735 # clobbered by the next message.
2736 exec 5>>./config.log
2743 subdirs="$DIRLTDL"
2746 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2747 COMPPATH=.
2748 else
2749 COMPPATH=..
2755 if test -d $srcdir/testsuite; then
2756 TESTSUBDIR_TRUE=
2757 TESTSUBDIR_FALSE='#'
2758 else
2759 TESTSUBDIR_TRUE='#'
2760 TESTSUBDIR_FALSE=
2763 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2764 if test "${enable_getenv_properties+set}" = set; then
2765 enableval="$enable_getenv_properties"
2770 if test -z "$enable_getenv_properties"; then
2771 enable_getenv_properties=${enable_getenv_properties_default-yes}
2773 if test "$enable_getenv_properties" = no; then
2774 cat >> confdefs.h <<\EOF
2775 #define DISABLE_GETENV_PROPERTIES 1
2780 if test -z "$enable_main_args"; then
2781 enable_main_args=${enable_main_args_default-yes}
2783 if test "$enable_main_args" = no; then
2784 cat >> confdefs.h <<\EOF
2785 #define DISABLE_MAIN_ARGS 1
2791 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2792 if test "${enable_hash_synchronization+set}" = set; then
2793 enableval="$enable_hash_synchronization"
2798 if test -z "$enable_hash_synchronization"; then
2799 enable_hash_synchronization=$enable_hash_synchronization_default
2802 if test "${slow_pthread_self}" = "yes"; then
2803 cat >> confdefs.h <<\EOF
2804 #define SLOW_PTHREAD_SELF 1
2810 LIBGCJDEBUG="false"
2812 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2813 if test "${enable_libgcj_debug+set}" = set; then
2814 enableval="$enable_libgcj_debug"
2815 if test "$enable_libgcj_debug" = yes; then
2816 cat >> confdefs.h <<\EOF
2817 #define DEBUG 1
2820 LIBGCJDEBUG="true"
2825 # Check whether --enable-interpreter or --disable-interpreter was given.
2826 if test "${enable_interpreter+set}" = set; then
2827 enableval="$enable_interpreter"
2828 if test "$enable_interpreter" = yes; then
2829 # This can also be set in configure.host.
2830 libgcj_interpreter=yes
2831 elif test "$enable_interpreter" = no; then
2832 libgcj_interpreter=no
2837 if test "$libgcj_interpreter" = yes; then
2838 cat >> confdefs.h <<\EOF
2839 #define INTERPRETER 1
2843 INTERPRETER="$libgcj_interpreter"
2846 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2847 echo "configure:2848: checking for exception model to use" >&5
2849 ac_ext=C
2850 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2851 ac_cpp='$CXXCPP $CPPFLAGS'
2852 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2853 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2854 cross_compiling=$ac_cv_prog_cxx_cross
2856 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2857 if test "${enable_sjlj_exceptions+set}" = set; then
2858 enableval="$enable_sjlj_exceptions"
2860 else
2861 cat > conftest.$ac_ext << EOF
2862 #line 2863 "configure"
2863 struct S { ~S(); };
2864 void bar();
2865 void foo()
2867 S s;
2868 bar();
2871 old_CXXFLAGS="$CXXFLAGS"
2872 CXXFLAGS=-S
2873 if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2874 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2875 enable_sjlj_exceptions=yes
2876 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2877 enable_sjlj_exceptions=no
2880 CXXFLAGS="$old_CXXFLAGS"
2881 rm -f conftest*
2884 if test x$enable_sjlj_exceptions = xyes; then
2885 cat >> confdefs.h <<\EOF
2886 #define SJLJ_EXCEPTIONS 1
2889 ac_exception_model_name=sjlj
2890 elif test x$enable_sjlj_exceptions = xno; then
2891 ac_exception_model_name="call frame"
2892 else
2893 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2895 ac_ext=c
2896 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2897 ac_cpp='$CPP $CPPFLAGS'
2898 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2899 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2900 cross_compiling=$ac_cv_prog_cc_cross
2902 echo "$ac_t""$ac_exception_model_name" 1>&6
2904 # If we are non using SJLJ exceptions, and this host does not have support
2905 # for unwinding from a signal handler, enable checked dereferences and divides.
2906 if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2907 CHECKREFSPEC=-fcheck-references
2908 DIVIDESPEC=-fuse-divide-subroutine
2909 EXCEPTIONSPEC=
2912 # Check whether --enable-java-net or --disable-java-net was given.
2913 if test "${enable_java_net+set}" = set; then
2914 enableval="$enable_java_net"
2919 if test -z "$enable_java_net"; then
2920 enable_java_net=${enable_java_net_default-yes}
2922 if test "$enable_java_net" = no; then
2923 cat >> confdefs.h <<\EOF
2924 #define DISABLE_JAVA_NET 1
2929 # Check whether --with-libffi or --without-libffi was given.
2930 if test "${with_libffi+set}" = set; then
2931 withval="$with_libffi"
2933 else
2934 with_libffi=${with_libffi_default-yes}
2938 LIBFFI=
2939 LIBFFIINCS=
2940 if test "$with_libffi" != no; then
2941 cat >> confdefs.h <<\EOF
2942 #define USE_LIBFFI 1
2945 LIBFFI=../libffi/libffi_convenience.la
2946 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
2951 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2952 if test "${enable_jvmpi+set}" = set; then
2953 enableval="$enable_jvmpi"
2958 if test "$enable_jvmpi" != no; then
2959 cat >> confdefs.h <<\EOF
2960 #define ENABLE_JVMPI 1
2965 TARGET_ECOS=${PROCESS-"no"}
2966 # Check whether --with-ecos or --without-ecos was given.
2967 if test "${with_ecos+set}" = set; then
2968 withval="$with_ecos"
2969 TARGET_ECOS="$with_ecos"
2974 PLATFORMOBJS=
2975 case "$TARGET_ECOS" in
2976 no) case "$host" in
2977 *mingw*)
2978 PLATFORM=Win32
2979 PLATFORMNET=Win32
2980 PLATFORMOBJS=win32.lo
2981 PLATFORMH=win32.h
2983 echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6
2984 echo "configure:2985: checking whether 'ld' is at least 2.13" >&5
2985 LD_PROG=`$CC --print-prog-name=ld`
2986 LD_VERSION=`$LD_PROG --version`
2987 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
2988 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
2989 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
2990 LD_OK="ok"
2991 else
2992 if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
2993 LD_OK="ok"
2996 if test "x$LD_OK" != x; then
2997 echo "$ac_t""yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
2998 else
2999 echo "$ac_t""no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
3000 echo "configure: warning: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." 1>&2
3001 cat >> confdefs.h <<\EOF
3002 #define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1
3008 PLATFORM=Posix
3009 PLATFORMNET=Posix
3010 PLATFORMOBJS=posix.lo
3011 PLATFORMH=posix.h
3013 esac
3016 PLATFORM=Ecos
3017 PLATFORMNET=NoNet
3018 cat >> confdefs.h <<\EOF
3019 #define ECOS 1
3022 PLATFORMOBJS=posix.lo
3023 PLATFORMH=posix.h
3025 esac
3029 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3030 echo "configure:3031: checking how to run the C preprocessor" >&5
3031 # On Suns, sometimes $CPP names a directory.
3032 if test -n "$CPP" && test -d "$CPP"; then
3033 CPP=
3035 if test -z "$CPP"; then
3036 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
3038 else
3039 # This must be in double quotes, not single quotes, because CPP may get
3040 # substituted into the Makefile and "${CC-cc}" will confuse make.
3041 CPP="${CC-cc} -E"
3042 # On the NeXT, cc -E runs the code through the compiler's parser,
3043 # not just through cpp.
3044 cat > conftest.$ac_ext <<EOF
3045 #line 3046 "configure"
3046 #include "confdefs.h"
3047 #include <assert.h>
3048 Syntax Error
3050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3051 { (eval echo configure:3052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3053 if test -z "$ac_err"; then
3055 else
3056 echo "$ac_err" >&5
3057 echo "configure: failed program was:" >&5
3058 cat conftest.$ac_ext >&5
3059 rm -rf conftest*
3060 CPP="${CC-cc} -E -traditional-cpp"
3061 cat > conftest.$ac_ext <<EOF
3062 #line 3063 "configure"
3063 #include "confdefs.h"
3064 #include <assert.h>
3065 Syntax Error
3067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3068 { (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3070 if test -z "$ac_err"; then
3072 else
3073 echo "$ac_err" >&5
3074 echo "configure: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3076 rm -rf conftest*
3077 CPP="${CC-cc} -nologo -E"
3078 cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081 #include <assert.h>
3082 Syntax Error
3084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3085 { (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3087 if test -z "$ac_err"; then
3089 else
3090 echo "$ac_err" >&5
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 rm -rf conftest*
3094 CPP=/lib/cpp
3096 rm -f conftest*
3098 rm -f conftest*
3100 rm -f conftest*
3101 ac_cv_prog_CPP="$CPP"
3103 CPP="$ac_cv_prog_CPP"
3104 else
3105 ac_cv_prog_CPP="$CPP"
3107 echo "$ac_t""$CPP" 1>&6
3109 cat > conftest.$ac_ext <<EOF
3110 #line 3111 "configure"
3111 #include "confdefs.h"
3112 #include <stdint.h>
3114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3115 egrep "uint32_t" >/dev/null 2>&1; then
3116 rm -rf conftest*
3117 cat >> confdefs.h <<\EOF
3118 #define HAVE_INT32_DEFINED 1
3122 rm -f conftest*
3124 cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127 #include <inttypes.h>
3129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3130 egrep "uint32_t" >/dev/null 2>&1; then
3131 rm -rf conftest*
3132 cat >> confdefs.h <<\EOF
3133 #define HAVE_INT32_DEFINED 1
3137 rm -f conftest*
3139 cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142 #include <sys/types.h>
3144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3145 egrep "u_int32_t" >/dev/null 2>&1; then
3146 rm -rf conftest*
3147 cat >> confdefs.h <<\EOF
3148 #define HAVE_BSD_INT32_DEFINED 1
3152 rm -f conftest*
3154 cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157 #include <sys/config.h>
3159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3160 egrep "u_int32_t" >/dev/null 2>&1; then
3161 rm -rf conftest*
3162 cat >> confdefs.h <<\EOF
3163 #define HAVE_BSD_INT32_DEFINED 1
3167 rm -f conftest*
3171 cat > conftest.$ac_ext <<EOF
3172 #line 3173 "configure"
3173 #include "confdefs.h"
3174 #include <time.h>
3176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3177 egrep "mktime" >/dev/null 2>&1; then
3178 rm -rf conftest*
3179 cat >> confdefs.h <<\EOF
3180 #define HAVE_MKTIME 1
3184 rm -f conftest*
3186 cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189 #include <time.h>
3191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3192 egrep "localtime" >/dev/null 2>&1; then
3193 rm -rf conftest*
3194 cat >> confdefs.h <<\EOF
3195 #define HAVE_LOCALTIME 1
3199 rm -f conftest*
3202 test -d java || mkdir java
3203 test -d java/io || mkdir java/io
3204 test -d gnu || mkdir gnu
3208 test -d java/lang || mkdir java/lang
3212 test -d java/net || mkdir java/net
3218 case "${host}" in
3219 *mingw*)
3220 SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3223 SYSTEMSPEC=
3225 esac
3228 LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
3231 # Check whether --with-system-zlib or --without-system-zlib was given.
3232 if test "${with_system_zlib+set}" = set; then
3233 withval="$with_system_zlib"
3237 ZLIBSPEC=
3239 ZLIBTESTSPEC=
3242 # If we find X, set shell vars x_includes and x_libraries to the
3243 # paths, otherwise set no_x=yes.
3244 # Uses ac_ vars as temps to allow command line to override cache and checks.
3245 # --without-x overrides everything else, but does not touch the cache.
3246 echo $ac_n "checking for X""... $ac_c" 1>&6
3247 echo "configure:3248: checking for X" >&5
3249 # Check whether --with-x or --without-x was given.
3250 if test "${with_x+set}" = set; then
3251 withval="$with_x"
3255 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3256 if test "x$with_x" = xno; then
3257 # The user explicitly disabled X.
3258 have_x=disabled
3259 else
3260 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3261 # Both variables are already set.
3262 have_x=yes
3263 else
3264 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3265 echo $ac_n "(cached) $ac_c" 1>&6
3266 else
3267 # One or both of the vars are not set, and there is no cached value.
3268 ac_x_includes=NO ac_x_libraries=NO
3269 rm -fr conftestdir
3270 if mkdir conftestdir; then
3271 cd conftestdir
3272 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3273 cat > Imakefile <<'EOF'
3274 acfindx:
3275 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3277 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3278 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3279 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3280 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3281 for ac_extension in a so sl; do
3282 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3283 test -f $ac_im_libdir/libX11.$ac_extension; then
3284 ac_im_usrlibdir=$ac_im_libdir; break
3286 done
3287 # Screen out bogus values from the imake configuration. They are
3288 # bogus both because they are the default anyway, and because
3289 # using them would break gcc on systems where it needs fixed includes.
3290 case "$ac_im_incroot" in
3291 /usr/include) ;;
3292 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3293 esac
3294 case "$ac_im_usrlibdir" in
3295 /usr/lib | /lib) ;;
3296 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3297 esac
3299 cd ..
3300 rm -fr conftestdir
3303 if test "$ac_x_includes" = NO; then
3304 # Guess where to find include files, by looking for this one X11 .h file.
3305 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3307 # First, try using that file with no special directory specified.
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <$x_direct_test_include>
3313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3314 { (eval echo configure:3315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3316 if test -z "$ac_err"; then
3317 rm -rf conftest*
3318 # We can compile using X headers with no special include directory.
3319 ac_x_includes=
3320 else
3321 echo "$ac_err" >&5
3322 echo "configure: failed program was:" >&5
3323 cat conftest.$ac_ext >&5
3324 rm -rf conftest*
3325 # Look for the header file in a standard set of common directories.
3326 # Check X11 before X11Rn because it is often a symlink to the current release.
3327 for ac_dir in \
3328 /usr/X11/include \
3329 /usr/X11R6/include \
3330 /usr/X11R5/include \
3331 /usr/X11R4/include \
3333 /usr/include/X11 \
3334 /usr/include/X11R6 \
3335 /usr/include/X11R5 \
3336 /usr/include/X11R4 \
3338 /usr/local/X11/include \
3339 /usr/local/X11R6/include \
3340 /usr/local/X11R5/include \
3341 /usr/local/X11R4/include \
3343 /usr/local/include/X11 \
3344 /usr/local/include/X11R6 \
3345 /usr/local/include/X11R5 \
3346 /usr/local/include/X11R4 \
3348 /usr/X386/include \
3349 /usr/x386/include \
3350 /usr/XFree86/include/X11 \
3352 /usr/include \
3353 /usr/local/include \
3354 /usr/unsupported/include \
3355 /usr/athena/include \
3356 /usr/local/x11r5/include \
3357 /usr/lpp/Xamples/include \
3359 /usr/openwin/include \
3360 /usr/openwin/share/include \
3363 if test -r "$ac_dir/$x_direct_test_include"; then
3364 ac_x_includes=$ac_dir
3365 break
3367 done
3369 rm -f conftest*
3370 fi # $ac_x_includes = NO
3372 if test "$ac_x_libraries" = NO; then
3373 # Check for the libraries.
3375 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3376 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3378 # See if we find them without any special options.
3379 # Don't add to $LIBS permanently.
3380 ac_save_LIBS="$LIBS"
3381 LIBS="-l$x_direct_test_library $LIBS"
3382 cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3386 int main() {
3387 ${x_direct_test_function}()
3388 ; return 0; }
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3391 rm -rf conftest*
3392 LIBS="$ac_save_LIBS"
3393 # We can link X programs with no special library path.
3394 ac_x_libraries=
3395 else
3396 echo "configure: failed program was:" >&5
3397 cat conftest.$ac_ext >&5
3398 rm -rf conftest*
3399 LIBS="$ac_save_LIBS"
3400 # First see if replacing the include by lib works.
3401 # Check X11 before X11Rn because it is often a symlink to the current release.
3402 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3403 /usr/X11/lib \
3404 /usr/X11R6/lib \
3405 /usr/X11R5/lib \
3406 /usr/X11R4/lib \
3408 /usr/lib/X11 \
3409 /usr/lib/X11R6 \
3410 /usr/lib/X11R5 \
3411 /usr/lib/X11R4 \
3413 /usr/local/X11/lib \
3414 /usr/local/X11R6/lib \
3415 /usr/local/X11R5/lib \
3416 /usr/local/X11R4/lib \
3418 /usr/local/lib/X11 \
3419 /usr/local/lib/X11R6 \
3420 /usr/local/lib/X11R5 \
3421 /usr/local/lib/X11R4 \
3423 /usr/X386/lib \
3424 /usr/x386/lib \
3425 /usr/XFree86/lib/X11 \
3427 /usr/lib \
3428 /usr/local/lib \
3429 /usr/unsupported/lib \
3430 /usr/athena/lib \
3431 /usr/local/x11r5/lib \
3432 /usr/lpp/Xamples/lib \
3433 /lib/usr/lib/X11 \
3435 /usr/openwin/lib \
3436 /usr/openwin/share/lib \
3439 for ac_extension in a so sl; do
3440 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3441 ac_x_libraries=$ac_dir
3442 break 2
3444 done
3445 done
3447 rm -f conftest*
3448 fi # $ac_x_libraries = NO
3450 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3451 # Didn't find X anywhere. Cache the known absence of X.
3452 ac_cv_have_x="have_x=no"
3453 else
3454 # Record where we found X for the cache.
3455 ac_cv_have_x="have_x=yes \
3456 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3460 eval "$ac_cv_have_x"
3461 fi # $with_x != no
3463 if test "$have_x" != yes; then
3464 echo "$ac_t""$have_x" 1>&6
3465 no_x=yes
3466 else
3467 # If each of the values was on the command line, it overrides each guess.
3468 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3469 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3470 # Update the cache value to reflect the command line values.
3471 ac_cv_have_x="have_x=yes \
3472 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3473 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3476 if test "$no_x" = yes; then
3477 # Not all programs may use this symbol, but it does not hurt to define it.
3478 cat >> confdefs.h <<\EOF
3479 #define X_DISPLAY_MISSING 1
3482 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3483 else
3484 if test -n "$x_includes"; then
3485 X_CFLAGS="$X_CFLAGS -I$x_includes"
3488 # It would also be nice to do this for all -L options, not just this one.
3489 if test -n "$x_libraries"; then
3490 X_LIBS="$X_LIBS -L$x_libraries"
3491 # For Solaris; some versions of Sun CC require a space after -R and
3492 # others require no space. Words are not sufficient . . . .
3493 case "`(uname -sr) 2>/dev/null`" in
3494 "SunOS 5"*)
3495 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3496 echo "configure:3497: checking whether -R must be followed by a space" >&5
3497 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3498 cat > conftest.$ac_ext <<EOF
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3502 int main() {
3504 ; return 0; }
3506 if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3507 rm -rf conftest*
3508 ac_R_nospace=yes
3509 else
3510 echo "configure: failed program was:" >&5
3511 cat conftest.$ac_ext >&5
3512 rm -rf conftest*
3513 ac_R_nospace=no
3515 rm -f conftest*
3516 if test $ac_R_nospace = yes; then
3517 echo "$ac_t""no" 1>&6
3518 X_LIBS="$X_LIBS -R$x_libraries"
3519 else
3520 LIBS="$ac_xsave_LIBS -R $x_libraries"
3521 cat > conftest.$ac_ext <<EOF
3522 #line 3523 "configure"
3523 #include "confdefs.h"
3525 int main() {
3527 ; return 0; }
3529 if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3530 rm -rf conftest*
3531 ac_R_space=yes
3532 else
3533 echo "configure: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
3535 rm -rf conftest*
3536 ac_R_space=no
3538 rm -f conftest*
3539 if test $ac_R_space = yes; then
3540 echo "$ac_t""yes" 1>&6
3541 X_LIBS="$X_LIBS -R $x_libraries"
3542 else
3543 echo "$ac_t""neither works" 1>&6
3546 LIBS="$ac_xsave_LIBS"
3547 esac
3550 # Check for system-dependent libraries X programs must link with.
3551 # Do this before checking for the system-independent R6 libraries
3552 # (-lICE), since we may need -lsocket or whatever for X linking.
3554 if test "$ISC" = yes; then
3555 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3556 else
3557 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3558 # libraries were built with DECnet support. And karl@cs.umb.edu says
3559 # the Alpha needs dnet_stub (dnet does not exist).
3560 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3561 echo "configure:3562: checking for dnet_ntoa in -ldnet" >&5
3562 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3564 echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566 ac_save_LIBS="$LIBS"
3567 LIBS="-ldnet $LIBS"
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* Override any gcc2 internal prototype to avoid an error. */
3572 /* We use char because int might match the return type of a gcc2
3573 builtin and then its argument prototype would still apply. */
3574 char dnet_ntoa();
3576 int main() {
3577 dnet_ntoa()
3578 ; return 0; }
3580 if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3581 rm -rf conftest*
3582 eval "ac_cv_lib_$ac_lib_var=yes"
3583 else
3584 echo "configure: failed program was:" >&5
3585 cat conftest.$ac_ext >&5
3586 rm -rf conftest*
3587 eval "ac_cv_lib_$ac_lib_var=no"
3589 rm -f conftest*
3590 LIBS="$ac_save_LIBS"
3593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3594 echo "$ac_t""yes" 1>&6
3595 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3596 else
3597 echo "$ac_t""no" 1>&6
3600 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3601 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3602 echo "configure:3603: checking for dnet_ntoa in -ldnet_stub" >&5
3603 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3605 echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607 ac_save_LIBS="$LIBS"
3608 LIBS="-ldnet_stub $LIBS"
3609 cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 /* Override any gcc2 internal prototype to avoid an error. */
3613 /* We use char because int might match the return type of a gcc2
3614 builtin and then its argument prototype would still apply. */
3615 char dnet_ntoa();
3617 int main() {
3618 dnet_ntoa()
3619 ; return 0; }
3621 if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3622 rm -rf conftest*
3623 eval "ac_cv_lib_$ac_lib_var=yes"
3624 else
3625 echo "configure: failed program was:" >&5
3626 cat conftest.$ac_ext >&5
3627 rm -rf conftest*
3628 eval "ac_cv_lib_$ac_lib_var=no"
3630 rm -f conftest*
3631 LIBS="$ac_save_LIBS"
3634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3635 echo "$ac_t""yes" 1>&6
3636 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3637 else
3638 echo "$ac_t""no" 1>&6
3643 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3644 # to get the SysV transport functions.
3645 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3646 # needs -lnsl.
3647 # The nsl library prevents programs from opening the X display
3648 # on Irix 5.2, according to dickey@clark.net.
3649 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3650 echo "configure:3651: checking for gethostbyname" >&5
3651 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3652 echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654 cat > conftest.$ac_ext <<EOF
3655 #line 3656 "configure"
3656 #include "confdefs.h"
3657 /* System header to define __stub macros and hopefully few prototypes,
3658 which can conflict with char gethostbyname(); below. */
3659 #include <assert.h>
3660 /* Override any gcc2 internal prototype to avoid an error. */
3661 /* We use char because int might match the return type of a gcc2
3662 builtin and then its argument prototype would still apply. */
3663 char gethostbyname();
3665 int main() {
3667 /* The GNU C library defines this for functions which it implements
3668 to always fail with ENOSYS. Some functions are actually named
3669 something starting with __ and the normal name is an alias. */
3670 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3671 choke me
3672 #else
3673 gethostbyname();
3674 #endif
3676 ; return 0; }
3678 if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3679 rm -rf conftest*
3680 eval "ac_cv_func_gethostbyname=yes"
3681 else
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
3684 rm -rf conftest*
3685 eval "ac_cv_func_gethostbyname=no"
3687 rm -f conftest*
3690 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3691 echo "$ac_t""yes" 1>&6
3693 else
3694 echo "$ac_t""no" 1>&6
3697 if test $ac_cv_func_gethostbyname = no; then
3698 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3699 echo "configure:3700: checking for gethostbyname in -lnsl" >&5
3700 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3702 echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704 ac_save_LIBS="$LIBS"
3705 LIBS="-lnsl $LIBS"
3706 cat > conftest.$ac_ext <<EOF
3707 #line 3708 "configure"
3708 #include "confdefs.h"
3709 /* Override any gcc2 internal prototype to avoid an error. */
3710 /* We use char because int might match the return type of a gcc2
3711 builtin and then its argument prototype would still apply. */
3712 char gethostbyname();
3714 int main() {
3715 gethostbyname()
3716 ; return 0; }
3718 if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3719 rm -rf conftest*
3720 eval "ac_cv_lib_$ac_lib_var=yes"
3721 else
3722 echo "configure: failed program was:" >&5
3723 cat conftest.$ac_ext >&5
3724 rm -rf conftest*
3725 eval "ac_cv_lib_$ac_lib_var=no"
3727 rm -f conftest*
3728 LIBS="$ac_save_LIBS"
3731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3733 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3734 else
3735 echo "$ac_t""no" 1>&6
3740 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3741 # socket/setsockopt and other routines are undefined under SCO ODT
3742 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3743 # on later versions), says simon@lia.di.epfl.ch: it contains
3744 # gethostby* variants that don't use the nameserver (or something).
3745 # -lsocket must be given before -lnsl if both are needed.
3746 # We assume that if connect needs -lnsl, so does gethostbyname.
3747 echo $ac_n "checking for connect""... $ac_c" 1>&6
3748 echo "configure:3749: checking for connect" >&5
3749 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3750 echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752 cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 /* System header to define __stub macros and hopefully few prototypes,
3756 which can conflict with char connect(); below. */
3757 #include <assert.h>
3758 /* Override any gcc2 internal prototype to avoid an error. */
3759 /* We use char because int might match the return type of a gcc2
3760 builtin and then its argument prototype would still apply. */
3761 char connect();
3763 int main() {
3765 /* The GNU C library defines this for functions which it implements
3766 to always fail with ENOSYS. Some functions are actually named
3767 something starting with __ and the normal name is an alias. */
3768 #if defined (__stub_connect) || defined (__stub___connect)
3769 choke me
3770 #else
3771 connect();
3772 #endif
3774 ; return 0; }
3776 if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3777 rm -rf conftest*
3778 eval "ac_cv_func_connect=yes"
3779 else
3780 echo "configure: failed program was:" >&5
3781 cat conftest.$ac_ext >&5
3782 rm -rf conftest*
3783 eval "ac_cv_func_connect=no"
3785 rm -f conftest*
3788 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3789 echo "$ac_t""yes" 1>&6
3791 else
3792 echo "$ac_t""no" 1>&6
3795 if test $ac_cv_func_connect = no; then
3796 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3797 echo "configure:3798: checking for connect in -lsocket" >&5
3798 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3799 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3800 echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802 ac_save_LIBS="$LIBS"
3803 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3804 cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 /* Override any gcc2 internal prototype to avoid an error. */
3808 /* We use char because int might match the return type of a gcc2
3809 builtin and then its argument prototype would still apply. */
3810 char connect();
3812 int main() {
3813 connect()
3814 ; return 0; }
3816 if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3817 rm -rf conftest*
3818 eval "ac_cv_lib_$ac_lib_var=yes"
3819 else
3820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822 rm -rf conftest*
3823 eval "ac_cv_lib_$ac_lib_var=no"
3825 rm -f conftest*
3826 LIBS="$ac_save_LIBS"
3829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3830 echo "$ac_t""yes" 1>&6
3831 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3832 else
3833 echo "$ac_t""no" 1>&6
3838 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3839 echo $ac_n "checking for remove""... $ac_c" 1>&6
3840 echo "configure:3841: checking for remove" >&5
3841 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3842 echo $ac_n "(cached) $ac_c" 1>&6
3843 else
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 /* System header to define __stub macros and hopefully few prototypes,
3848 which can conflict with char remove(); below. */
3849 #include <assert.h>
3850 /* Override any gcc2 internal prototype to avoid an error. */
3851 /* We use char because int might match the return type of a gcc2
3852 builtin and then its argument prototype would still apply. */
3853 char remove();
3855 int main() {
3857 /* The GNU C library defines this for functions which it implements
3858 to always fail with ENOSYS. Some functions are actually named
3859 something starting with __ and the normal name is an alias. */
3860 #if defined (__stub_remove) || defined (__stub___remove)
3861 choke me
3862 #else
3863 remove();
3864 #endif
3866 ; return 0; }
3868 if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3869 rm -rf conftest*
3870 eval "ac_cv_func_remove=yes"
3871 else
3872 echo "configure: failed program was:" >&5
3873 cat conftest.$ac_ext >&5
3874 rm -rf conftest*
3875 eval "ac_cv_func_remove=no"
3877 rm -f conftest*
3880 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3881 echo "$ac_t""yes" 1>&6
3883 else
3884 echo "$ac_t""no" 1>&6
3887 if test $ac_cv_func_remove = no; then
3888 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3889 echo "configure:3890: checking for remove in -lposix" >&5
3890 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3892 echo $ac_n "(cached) $ac_c" 1>&6
3893 else
3894 ac_save_LIBS="$LIBS"
3895 LIBS="-lposix $LIBS"
3896 cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899 /* Override any gcc2 internal prototype to avoid an error. */
3900 /* We use char because int might match the return type of a gcc2
3901 builtin and then its argument prototype would still apply. */
3902 char remove();
3904 int main() {
3905 remove()
3906 ; return 0; }
3908 if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3909 rm -rf conftest*
3910 eval "ac_cv_lib_$ac_lib_var=yes"
3911 else
3912 echo "configure: failed program was:" >&5
3913 cat conftest.$ac_ext >&5
3914 rm -rf conftest*
3915 eval "ac_cv_lib_$ac_lib_var=no"
3917 rm -f conftest*
3918 LIBS="$ac_save_LIBS"
3921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3922 echo "$ac_t""yes" 1>&6
3923 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3924 else
3925 echo "$ac_t""no" 1>&6
3930 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3931 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3932 echo "configure:3933: checking for shmat" >&5
3933 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3934 echo $ac_n "(cached) $ac_c" 1>&6
3935 else
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 /* System header to define __stub macros and hopefully few prototypes,
3940 which can conflict with char shmat(); below. */
3941 #include <assert.h>
3942 /* Override any gcc2 internal prototype to avoid an error. */
3943 /* We use char because int might match the return type of a gcc2
3944 builtin and then its argument prototype would still apply. */
3945 char shmat();
3947 int main() {
3949 /* The GNU C library defines this for functions which it implements
3950 to always fail with ENOSYS. Some functions are actually named
3951 something starting with __ and the normal name is an alias. */
3952 #if defined (__stub_shmat) || defined (__stub___shmat)
3953 choke me
3954 #else
3955 shmat();
3956 #endif
3958 ; return 0; }
3960 if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3961 rm -rf conftest*
3962 eval "ac_cv_func_shmat=yes"
3963 else
3964 echo "configure: failed program was:" >&5
3965 cat conftest.$ac_ext >&5
3966 rm -rf conftest*
3967 eval "ac_cv_func_shmat=no"
3969 rm -f conftest*
3972 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3973 echo "$ac_t""yes" 1>&6
3975 else
3976 echo "$ac_t""no" 1>&6
3979 if test $ac_cv_func_shmat = no; then
3980 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3981 echo "configure:3982: checking for shmat in -lipc" >&5
3982 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3983 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3984 echo $ac_n "(cached) $ac_c" 1>&6
3985 else
3986 ac_save_LIBS="$LIBS"
3987 LIBS="-lipc $LIBS"
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 /* Override any gcc2 internal prototype to avoid an error. */
3992 /* We use char because int might match the return type of a gcc2
3993 builtin and then its argument prototype would still apply. */
3994 char shmat();
3996 int main() {
3997 shmat()
3998 ; return 0; }
4000 if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4001 rm -rf conftest*
4002 eval "ac_cv_lib_$ac_lib_var=yes"
4003 else
4004 echo "configure: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006 rm -rf conftest*
4007 eval "ac_cv_lib_$ac_lib_var=no"
4009 rm -f conftest*
4010 LIBS="$ac_save_LIBS"
4013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4014 echo "$ac_t""yes" 1>&6
4015 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
4016 else
4017 echo "$ac_t""no" 1>&6
4023 # Check for libraries that X11R6 Xt/Xaw programs need.
4024 ac_save_LDFLAGS="$LDFLAGS"
4025 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
4026 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
4027 # check for ICE first), but we must link in the order -lSM -lICE or
4028 # we get undefined symbols. So assume we have SM if we have ICE.
4029 # These have to be linked with before -lX11, unlike the other
4030 # libraries we check for below, so use a different variable.
4031 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
4032 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
4033 echo "configure:4034: checking for IceConnectionNumber in -lICE" >&5
4034 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
4035 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4036 echo $ac_n "(cached) $ac_c" 1>&6
4037 else
4038 ac_save_LIBS="$LIBS"
4039 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
4040 cat > conftest.$ac_ext <<EOF
4041 #line 4042 "configure"
4042 #include "confdefs.h"
4043 /* Override any gcc2 internal prototype to avoid an error. */
4044 /* We use char because int might match the return type of a gcc2
4045 builtin and then its argument prototype would still apply. */
4046 char IceConnectionNumber();
4048 int main() {
4049 IceConnectionNumber()
4050 ; return 0; }
4052 if { (eval echo configure:4053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4053 rm -rf conftest*
4054 eval "ac_cv_lib_$ac_lib_var=yes"
4055 else
4056 echo "configure: failed program was:" >&5
4057 cat conftest.$ac_ext >&5
4058 rm -rf conftest*
4059 eval "ac_cv_lib_$ac_lib_var=no"
4061 rm -f conftest*
4062 LIBS="$ac_save_LIBS"
4065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4066 echo "$ac_t""yes" 1>&6
4067 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4068 else
4069 echo "$ac_t""no" 1>&6
4072 LDFLAGS="$ac_save_LDFLAGS"
4077 # Check whether --enable-java-awt or --disable-java-awt was given.
4078 if test "${enable_java_awt+set}" = set; then
4079 enableval="$enable_java_awt"
4084 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
4085 use_xlib_awt=""
4086 use_gtk_awt=""
4087 # The default toolkit to use is the first one specified.
4088 TOOLKIT=
4091 for peer in $peerlibs ; do
4092 case $peer in
4093 xlib)
4094 if test "$no_x" = yes; then
4095 echo "*** xlib peers requested but no X library available" 1>&2
4096 exit 1
4097 else
4098 use_xlib_awt="yes"
4099 if test -z "$TOOLKIT"; then
4100 TOOLKIT=gnu.awt.xlib.XToolkit
4104 gtk)
4105 if test "$no_x" = yes; then
4106 echo "*** xlib peers requested but no X library available" 1>&2
4107 exit 1
4108 else
4109 use_gtk_awt=yes
4110 if test -z "$TOOLKIT"; then
4111 TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
4113 test -d jniinclude || mkdir jniinclude
4117 use_xlib_awt=
4118 use_gtk_awt=
4119 break
4122 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
4123 exit 1
4124 esac
4125 done
4129 if test "$use_xlib_awt" = yes; then
4130 XLIB_AWT_TRUE=
4131 XLIB_AWT_FALSE='#'
4132 else
4133 XLIB_AWT_TRUE='#'
4134 XLIB_AWT_FALSE=
4138 if test "$use_gtk_awt" = yes; then
4139 GTK_AWT_TRUE=
4140 GTK_AWT_FALSE='#'
4141 else
4142 GTK_AWT_TRUE='#'
4143 GTK_AWT_FALSE=
4147 libsubdir=.libs
4149 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
4150 echo "configure:4151: checking for garbage collector to use" >&5
4151 # Check whether --enable-java-gc or --disable-java-gc was given.
4152 if test "${enable_java_gc+set}" = set; then
4153 enableval="$enable_java_gc"
4155 GC=$enableval
4156 else
4157 GC=boehm
4160 GCLIBS=
4161 GCINCS=
4162 GCDEPS=
4163 GCOBJS=
4164 GCSPEC=
4165 JC1GCSPEC=
4166 GCTESTSPEC=
4167 case "$GC" in
4168 boehm)
4169 echo "$ac_t""boehm" 1>&6
4170 GCLIBS=../boehm-gc/libgcjgc_convenience.la
4171 GCINCS='-I$(top_srcdir)/../boehm-gc/include'
4172 JC1GCSPEC='-fuse-boehm-gc'
4173 GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
4175 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
4176 GCOBJS=boehm.lo
4177 GCHDR=boehm-gc.h
4178 cat >> confdefs.h <<\EOF
4179 #define HAVE_BOEHM_GC 1
4184 echo "$ac_t""none" 1>&6
4185 GCOBJS=nogc.lo
4186 GCHDR=no-gc.h
4189 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
4191 esac
4202 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
4203 echo "configure:4204: checking for thread model used by GCC" >&5
4204 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
4205 echo "$ac_t""$THREADS" 1>&6
4207 case "$THREADS" in
4208 no | none | single)
4209 THREADS=none
4211 posix | pthreads)
4212 THREADS=posix
4213 case "$host" in
4214 *-*-linux*)
4215 cat >> confdefs.h <<\EOF
4216 #define LINUX_THREADS 1
4220 esac
4222 win32)
4224 decosf1 | irix | mach | os2 | solaris | dce | vxworks)
4225 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
4228 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
4230 esac
4232 THREADLDFLAGS=
4233 THREADLIBS=
4234 THREADINCS=
4235 THREADDEPS=
4236 THREADOBJS=
4237 THREADH=
4238 THREADSPEC=
4239 case "$THREADS" in
4240 posix)
4241 case "$host" in
4242 *-*-cygwin*)
4243 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
4246 *-*-freebsd[1234]*)
4248 # Before FreeBSD 5, it didn't have -lpthread (or any library which
4249 # merely adds pthread_* functions) but it does have a -pthread switch
4250 # which is required at link-time to select -lc_r *instead* of -lc.
4251 THREADLDFLAGS=-pthread
4252 # Don't set THREADSPEC here as might be expected since -pthread is
4253 # not processed when found within a spec file, it must come from
4254 # the command line. For now, the user must provide the -pthread
4255 # switch to link code compiled with gcj. In future, consider adding
4256 # support for weak references to pthread_* functions ala gthr.h API.
4257 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
4259 *-*-freebsd*)
4260 # FreeBSD 5 implements a model much closer to other modern UNIX
4261 # which support threads. However, it still does not support
4262 # -lpthread.
4263 THREADLDFLAGS=-pthread
4264 THREADSPEC=-lc_r
4267 THREADLIBS=-lpthread
4268 THREADSPEC=-lpthread
4270 esac
4271 THREADOBJS=posix-threads.lo
4272 THREADH=posix-threads.h
4273 # MIT pthreads doesn't seem to have the mutexattr functions.
4274 # But for now we don't check for it. We just assume you aren't
4275 # using MIT pthreads.
4276 cat >> confdefs.h <<\EOF
4277 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4281 # If we're using the Boehm GC, then we happen to know that it
4282 # defines _REENTRANT, so we don't bother. Eww.
4283 if test "$GC" != boehm; then
4284 cat >> confdefs.h <<\EOF
4285 #define _REENTRANT 1
4289 cat >> confdefs.h <<\EOF
4290 #define _POSIX_PTHREAD_SEMANTICS 1
4295 win32)
4296 THREADOBJS=win32-threads.lo
4297 THREADH=win32-threads.h
4300 none)
4301 THREADOBJS=no-threads.lo
4302 THREADH=no-threads.h
4304 esac
4313 if test -d sysdep; then true; else mkdir sysdep; fi
4316 HASH_SYNC_SPEC=
4317 # Hash synchronization is only useful with posix threads right now.
4318 if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then
4319 HASH_SYNC_SPEC=-fhash-synchronization
4320 cat >> confdefs.h <<\EOF
4321 #define JV_HASH_SYNCHRONIZATION 1
4330 if test "$GCC" = yes; then
4331 USING_GCC_TRUE=
4332 USING_GCC_FALSE='#'
4333 else
4334 USING_GCC_TRUE='#'
4335 USING_GCC_FALSE=
4338 CANADIAN=no
4339 NULL_TARGET=no
4340 NATIVE=yes
4342 # We're in the tree with gcc, and need to include some of its headers.
4343 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
4345 # Figure out where generated headers like libgcj-config.h get installed.
4346 gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
4347 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4348 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4349 tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include
4353 if test "x${with_newlib}" = "xyes"; then
4354 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
4355 # may not work correctly, because the compiler may not be able to
4356 # link executables.
4358 # We assume newlib. This lets us hard-code the functions we know
4359 # we'll have.
4360 cat >> confdefs.h <<\EOF
4361 #define HAVE_MEMMOVE 1
4364 cat >> confdefs.h <<\EOF
4365 #define HAVE_MEMCPY 1
4368 cat >> confdefs.h <<\EOF
4369 #define HAVE_STRERROR 1
4372 cat >> confdefs.h <<\EOF
4373 #define HAVE_TIME 1
4376 cat >> confdefs.h <<\EOF
4377 #define HAVE_GMTIME_R 1
4380 cat >> confdefs.h <<\EOF
4381 #define HAVE_LOCALTIME_R 1
4384 cat >> confdefs.h <<\EOF
4385 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4388 cat >> confdefs.h <<\EOF
4389 #define HAVE_ALLOCA 1
4393 cat >> confdefs.h <<\EOF
4394 #define NO_GETUID 1
4398 # If Canadian cross, then don't pick up tools from the build
4399 # directory.
4400 if test x"$build" != x"$with_cross_host" \
4401 && test x"$build" != x"$target"; then
4402 CANADIAN=yes
4403 GCC_UNWIND_INCLUDE=
4404 GCJ="${target_alias}-gcj"
4406 NATIVE=no
4407 PLATFORMNET=NoNet
4408 else
4409 for ac_func in strerror ioctl select fstat open fsync sleep opendir
4411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4412 echo "configure:4413: checking for $ac_func" >&5
4413 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4414 echo $ac_n "(cached) $ac_c" 1>&6
4415 else
4416 cat > conftest.$ac_ext <<EOF
4417 #line 4418 "configure"
4418 #include "confdefs.h"
4419 /* System header to define __stub macros and hopefully few prototypes,
4420 which can conflict with char $ac_func(); below. */
4421 #include <assert.h>
4422 /* Override any gcc2 internal prototype to avoid an error. */
4423 /* We use char because int might match the return type of a gcc2
4424 builtin and then its argument prototype would still apply. */
4425 char $ac_func();
4427 int main() {
4429 /* The GNU C library defines this for functions which it implements
4430 to always fail with ENOSYS. Some functions are actually named
4431 something starting with __ and the normal name is an alias. */
4432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4433 choke me
4434 #else
4435 $ac_func();
4436 #endif
4438 ; return 0; }
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441 rm -rf conftest*
4442 eval "ac_cv_func_$ac_func=yes"
4443 else
4444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4446 rm -rf conftest*
4447 eval "ac_cv_func_$ac_func=no"
4449 rm -f conftest*
4452 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4453 echo "$ac_t""yes" 1>&6
4454 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4455 cat >> confdefs.h <<EOF
4456 #define $ac_tr_func 1
4459 else
4460 echo "$ac_t""no" 1>&6
4462 done
4464 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
4466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4467 echo "configure:4468: checking for $ac_func" >&5
4468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4469 echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 /* System header to define __stub macros and hopefully few prototypes,
4475 which can conflict with char $ac_func(); below. */
4476 #include <assert.h>
4477 /* Override any gcc2 internal prototype to avoid an error. */
4478 /* We use char because int might match the return type of a gcc2
4479 builtin and then its argument prototype would still apply. */
4480 char $ac_func();
4482 int main() {
4484 /* The GNU C library defines this for functions which it implements
4485 to always fail with ENOSYS. Some functions are actually named
4486 something starting with __ and the normal name is an alias. */
4487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4488 choke me
4489 #else
4490 $ac_func();
4491 #endif
4493 ; return 0; }
4495 if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4496 rm -rf conftest*
4497 eval "ac_cv_func_$ac_func=yes"
4498 else
4499 echo "configure: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4501 rm -rf conftest*
4502 eval "ac_cv_func_$ac_func=no"
4504 rm -f conftest*
4507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4508 echo "$ac_t""yes" 1>&6
4509 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4510 cat >> confdefs.h <<EOF
4511 #define $ac_tr_func 1
4514 else
4515 echo "$ac_t""no" 1>&6
4517 done
4519 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
4521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4522 echo "configure:4523: checking for $ac_func" >&5
4523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4524 echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526 cat > conftest.$ac_ext <<EOF
4527 #line 4528 "configure"
4528 #include "confdefs.h"
4529 /* System header to define __stub macros and hopefully few prototypes,
4530 which can conflict with char $ac_func(); below. */
4531 #include <assert.h>
4532 /* Override any gcc2 internal prototype to avoid an error. */
4533 /* We use char because int might match the return type of a gcc2
4534 builtin and then its argument prototype would still apply. */
4535 char $ac_func();
4537 int main() {
4539 /* The GNU C library defines this for functions which it implements
4540 to always fail with ENOSYS. Some functions are actually named
4541 something starting with __ and the normal name is an alias. */
4542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4543 choke me
4544 #else
4545 $ac_func();
4546 #endif
4548 ; return 0; }
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551 rm -rf conftest*
4552 eval "ac_cv_func_$ac_func=yes"
4553 else
4554 echo "configure: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 rm -rf conftest*
4557 eval "ac_cv_func_$ac_func=no"
4559 rm -f conftest*
4562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4563 echo "$ac_t""yes" 1>&6
4564 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4565 cat >> confdefs.h <<EOF
4566 #define $ac_tr_func 1
4569 else
4570 echo "$ac_t""no" 1>&6
4572 done
4574 for ac_func in nl_langinfo setlocale
4576 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4577 echo "configure:4578: checking for $ac_func" >&5
4578 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4579 echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 /* System header to define __stub macros and hopefully few prototypes,
4585 which can conflict with char $ac_func(); below. */
4586 #include <assert.h>
4587 /* Override any gcc2 internal prototype to avoid an error. */
4588 /* We use char because int might match the return type of a gcc2
4589 builtin and then its argument prototype would still apply. */
4590 char $ac_func();
4592 int main() {
4594 /* The GNU C library defines this for functions which it implements
4595 to always fail with ENOSYS. Some functions are actually named
4596 something starting with __ and the normal name is an alias. */
4597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4598 choke me
4599 #else
4600 $ac_func();
4601 #endif
4603 ; return 0; }
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606 rm -rf conftest*
4607 eval "ac_cv_func_$ac_func=yes"
4608 else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_func_$ac_func=no"
4614 rm -f conftest*
4617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4618 echo "$ac_t""yes" 1>&6
4619 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4620 cat >> confdefs.h <<EOF
4621 #define $ac_tr_func 1
4624 else
4625 echo "$ac_t""no" 1>&6
4627 done
4629 for ac_func in inet_aton inet_addr
4631 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4632 echo "configure:4633: checking for $ac_func" >&5
4633 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4634 echo $ac_n "(cached) $ac_c" 1>&6
4635 else
4636 cat > conftest.$ac_ext <<EOF
4637 #line 4638 "configure"
4638 #include "confdefs.h"
4639 /* System header to define __stub macros and hopefully few prototypes,
4640 which can conflict with char $ac_func(); below. */
4641 #include <assert.h>
4642 /* Override any gcc2 internal prototype to avoid an error. */
4643 /* We use char because int might match the return type of a gcc2
4644 builtin and then its argument prototype would still apply. */
4645 char $ac_func();
4647 int main() {
4649 /* The GNU C library defines this for functions which it implements
4650 to always fail with ENOSYS. Some functions are actually named
4651 something starting with __ and the normal name is an alias. */
4652 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4653 choke me
4654 #else
4655 $ac_func();
4656 #endif
4658 ; return 0; }
4660 if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4661 rm -rf conftest*
4662 eval "ac_cv_func_$ac_func=yes"
4663 else
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 rm -rf conftest*
4667 eval "ac_cv_func_$ac_func=no"
4669 rm -f conftest*
4672 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4673 echo "$ac_t""yes" 1>&6
4674 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4675 cat >> confdefs.h <<EOF
4676 #define $ac_tr_func 1
4678 break
4679 else
4680 echo "$ac_t""no" 1>&6
4682 done
4684 for ac_func in inet_pton uname inet_ntoa
4686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_func" >&5
4688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4689 echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691 cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 /* System header to define __stub macros and hopefully few prototypes,
4695 which can conflict with char $ac_func(); below. */
4696 #include <assert.h>
4697 /* Override any gcc2 internal prototype to avoid an error. */
4698 /* We use char because int might match the return type of a gcc2
4699 builtin and then its argument prototype would still apply. */
4700 char $ac_func();
4702 int main() {
4704 /* The GNU C library defines this for functions which it implements
4705 to always fail with ENOSYS. Some functions are actually named
4706 something starting with __ and the normal name is an alias. */
4707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4708 choke me
4709 #else
4710 $ac_func();
4711 #endif
4713 ; return 0; }
4715 if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4716 rm -rf conftest*
4717 eval "ac_cv_func_$ac_func=yes"
4718 else
4719 echo "configure: failed program was:" >&5
4720 cat conftest.$ac_ext >&5
4721 rm -rf conftest*
4722 eval "ac_cv_func_$ac_func=no"
4724 rm -f conftest*
4727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4728 echo "$ac_t""yes" 1>&6
4729 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4730 cat >> confdefs.h <<EOF
4731 #define $ac_tr_func 1
4734 else
4735 echo "$ac_t""no" 1>&6
4737 done
4739 for ac_func in fork execvp pipe sigaction ftruncate
4741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_func" >&5
4743 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746 cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749 /* System header to define __stub macros and hopefully few prototypes,
4750 which can conflict with char $ac_func(); below. */
4751 #include <assert.h>
4752 /* Override any gcc2 internal prototype to avoid an error. */
4753 /* We use char because int might match the return type of a gcc2
4754 builtin and then its argument prototype would still apply. */
4755 char $ac_func();
4757 int main() {
4759 /* The GNU C library defines this for functions which it implements
4760 to always fail with ENOSYS. Some functions are actually named
4761 something starting with __ and the normal name is an alias. */
4762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4763 choke me
4764 #else
4765 $ac_func();
4766 #endif
4768 ; return 0; }
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4771 rm -rf conftest*
4772 eval "ac_cv_func_$ac_func=yes"
4773 else
4774 echo "configure: failed program was:" >&5
4775 cat conftest.$ac_ext >&5
4776 rm -rf conftest*
4777 eval "ac_cv_func_$ac_func=no"
4779 rm -f conftest*
4782 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4783 echo "$ac_t""yes" 1>&6
4784 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4785 cat >> confdefs.h <<EOF
4786 #define $ac_tr_func 1
4789 else
4790 echo "$ac_t""no" 1>&6
4792 done
4794 for ac_hdr in execinfo.h unistd.h dlfcn.h
4796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4798 echo "configure:4799: checking for $ac_hdr" >&5
4799 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4800 echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802 cat > conftest.$ac_ext <<EOF
4803 #line 4804 "configure"
4804 #include "confdefs.h"
4805 #include <$ac_hdr>
4807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4808 { (eval echo configure:4809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4810 if test -z "$ac_err"; then
4811 rm -rf conftest*
4812 eval "ac_cv_header_$ac_safe=yes"
4813 else
4814 echo "$ac_err" >&5
4815 echo "configure: failed program was:" >&5
4816 cat conftest.$ac_ext >&5
4817 rm -rf conftest*
4818 eval "ac_cv_header_$ac_safe=no"
4820 rm -f conftest*
4822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4823 echo "$ac_t""yes" 1>&6
4824 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4825 cat >> confdefs.h <<EOF
4826 #define $ac_tr_hdr 1
4829 else
4830 echo "$ac_t""no" 1>&6
4832 done
4834 echo $ac_n "checking for backtrace""... $ac_c" 1>&6
4835 echo "configure:4836: checking for backtrace" >&5
4836 if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then
4837 echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839 cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842 /* System header to define __stub macros and hopefully few prototypes,
4843 which can conflict with char backtrace(); below. */
4844 #include <assert.h>
4845 /* Override any gcc2 internal prototype to avoid an error. */
4846 /* We use char because int might match the return type of a gcc2
4847 builtin and then its argument prototype would still apply. */
4848 char backtrace();
4850 int main() {
4852 /* The GNU C library defines this for functions which it implements
4853 to always fail with ENOSYS. Some functions are actually named
4854 something starting with __ and the normal name is an alias. */
4855 #if defined (__stub_backtrace) || defined (__stub___backtrace)
4856 choke me
4857 #else
4858 backtrace();
4859 #endif
4861 ; return 0; }
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4864 rm -rf conftest*
4865 eval "ac_cv_func_backtrace=yes"
4866 else
4867 echo "configure: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869 rm -rf conftest*
4870 eval "ac_cv_func_backtrace=no"
4872 rm -f conftest*
4875 if eval "test \"`echo '$ac_cv_func_'backtrace`\" = yes"; then
4876 echo "$ac_t""yes" 1>&6
4878 case "$host" in
4879 ia64-*-linux*)
4880 # Has broken backtrace()
4883 cat >> confdefs.h <<\EOF
4884 #define HAVE_BACKTRACE 1
4888 esac
4890 else
4891 echo "$ac_t""no" 1>&6
4893 case "$host" in
4894 *mingw*)
4895 # Has backtrace() defined in libgcj itself
4896 cat >> confdefs.h <<\EOF
4897 #define HAVE_BACKTRACE 1
4901 esac
4906 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
4907 echo "configure:4908: checking for dladdr in -ldl" >&5
4908 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
4909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4910 echo $ac_n "(cached) $ac_c" 1>&6
4911 else
4912 ac_save_LIBS="$LIBS"
4913 LIBS="-ldl $LIBS"
4914 cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 /* Override any gcc2 internal prototype to avoid an error. */
4918 /* We use char because int might match the return type of a gcc2
4919 builtin and then its argument prototype would still apply. */
4920 char dladdr();
4922 int main() {
4923 dladdr()
4924 ; return 0; }
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927 rm -rf conftest*
4928 eval "ac_cv_lib_$ac_lib_var=yes"
4929 else
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932 rm -rf conftest*
4933 eval "ac_cv_lib_$ac_lib_var=no"
4935 rm -f conftest*
4936 LIBS="$ac_save_LIBS"
4939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4940 echo "$ac_t""yes" 1>&6
4942 cat >> confdefs.h <<\EOF
4943 #define HAVE_DLADDR 1
4946 else
4947 echo "$ac_t""no" 1>&6
4950 if test x"$build" = x"$host"; then
4951 for ac_file in /proc/self/exe
4954 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
4955 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
4956 echo "configure:4957: checking for $ac_file" >&5
4957 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
4958 echo $ac_n "(cached) $ac_c" 1>&6
4959 else
4960 if test "$cross_compiling" = yes; then
4961 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
4962 else
4963 if test -r $ac_file; then
4964 eval "ac_cv_file_$ac_safe=yes"
4965 else
4966 eval "ac_cv_file_$ac_safe=no"
4970 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
4971 echo "$ac_t""yes" 1>&6
4972 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4973 cat >> confdefs.h <<EOF
4974 #define $ac_tr_file 1
4977 cat >> confdefs.h <<\EOF
4978 #define HAVE_PROC_SELF_EXE 1
4981 else
4982 echo "$ac_t""no" 1>&6
4985 done
4987 else
4988 case $host in
4989 *-linux*)
4990 cat >> confdefs.h <<\EOF
4991 #define HAVE_PROC_SELF_EXE 1
4995 esac
5000 am_cv_lib_iconv_ldpath=
5001 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5002 if test "${with_libiconv_prefix+set}" = set; then
5003 withval="$with_libiconv_prefix"
5005 for dir in `echo "$withval" | tr : ' '`; do
5006 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5007 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5008 done
5013 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5014 echo "configure:5015: checking for iconv" >&5
5015 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5016 echo $ac_n "(cached) $ac_c" 1>&6
5017 else
5019 am_cv_func_iconv="no, consider installing GNU libiconv"
5020 am_cv_lib_iconv=no
5021 cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 #include <stdlib.h>
5025 #include <iconv.h>
5026 int main() {
5027 iconv_t cd = iconv_open("","");
5028 iconv(cd,NULL,NULL,NULL,NULL);
5029 iconv_close(cd);
5030 ; return 0; }
5032 if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5033 rm -rf conftest*
5034 am_cv_func_iconv=yes
5035 else
5036 echo "configure: failed program was:" >&5
5037 cat conftest.$ac_ext >&5
5039 rm -f conftest*
5040 if test "$am_cv_func_iconv" != yes; then
5041 am_save_LIBS="$LIBS"
5042 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5043 cat > conftest.$ac_ext <<EOF
5044 #line 5045 "configure"
5045 #include "confdefs.h"
5046 #include <stdlib.h>
5047 #include <iconv.h>
5048 int main() {
5049 iconv_t cd = iconv_open("","");
5050 iconv(cd,NULL,NULL,NULL,NULL);
5051 iconv_close(cd);
5052 ; return 0; }
5054 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5055 rm -rf conftest*
5056 am_cv_lib_iconv=yes
5057 am_cv_func_iconv=yes
5058 else
5059 echo "configure: failed program was:" >&5
5060 cat conftest.$ac_ext >&5
5062 rm -f conftest*
5063 LIBS="$am_save_LIBS"
5068 echo "$ac_t""$am_cv_func_iconv" 1>&6
5069 if test "$am_cv_func_iconv" = yes; then
5070 cat >> confdefs.h <<\EOF
5071 #define HAVE_ICONV 1
5074 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5075 echo "configure:5076: checking for iconv declaration" >&5
5076 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5077 echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5080 cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5084 #include <stdlib.h>
5085 #include <iconv.h>
5086 extern
5087 #ifdef __cplusplus
5089 #endif
5090 #if defined(__STDC__) || defined(__cplusplus)
5091 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5092 #else
5093 size_t iconv();
5094 #endif
5096 int main() {
5098 ; return 0; }
5100 if { (eval echo configure:5101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5101 rm -rf conftest*
5102 am_cv_proto_iconv_arg1=""
5103 else
5104 echo "configure: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
5106 rm -rf conftest*
5107 am_cv_proto_iconv_arg1="const"
5109 rm -f conftest*
5110 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);"
5113 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5114 echo "$ac_t""${ac_t:-
5115 }$am_cv_proto_iconv" 1>&6
5116 cat >> confdefs.h <<EOF
5117 #define ICONV_CONST $am_cv_proto_iconv_arg1
5121 LIBICONV=
5122 if test "$am_cv_lib_iconv" = yes; then
5123 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5127 if test $ac_cv_header_locale_h = yes; then
5128 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5129 echo "configure:5130: checking for LC_MESSAGES" >&5
5130 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5131 echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136 #include <locale.h>
5137 int main() {
5138 return LC_MESSAGES
5139 ; return 0; }
5141 if { (eval echo configure:5142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5142 rm -rf conftest*
5143 am_cv_val_LC_MESSAGES=yes
5144 else
5145 echo "configure: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 rm -rf conftest*
5148 am_cv_val_LC_MESSAGES=no
5150 rm -f conftest*
5153 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5154 if test $am_cv_val_LC_MESSAGES = yes; then
5155 cat >> confdefs.h <<\EOF
5156 #define HAVE_LC_MESSAGES 1
5161 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5162 echo "configure:5163: checking whether struct tm is in sys/time.h or time.h" >&5
5163 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5164 echo $ac_n "(cached) $ac_c" 1>&6
5165 else
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169 #include <sys/types.h>
5170 #include <time.h>
5171 int main() {
5172 struct tm *tp; tp->tm_sec;
5173 ; return 0; }
5175 if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5176 rm -rf conftest*
5177 ac_cv_struct_tm=time.h
5178 else
5179 echo "configure: failed program was:" >&5
5180 cat conftest.$ac_ext >&5
5181 rm -rf conftest*
5182 ac_cv_struct_tm=sys/time.h
5184 rm -f conftest*
5187 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5188 if test $ac_cv_struct_tm = sys/time.h; then
5189 cat >> confdefs.h <<\EOF
5190 #define TM_IN_SYS_TIME 1
5195 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5196 echo "configure:5197: checking for tm_zone in struct tm" >&5
5197 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5198 echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200 cat > conftest.$ac_ext <<EOF
5201 #line 5202 "configure"
5202 #include "confdefs.h"
5203 #include <sys/types.h>
5204 #include <$ac_cv_struct_tm>
5205 int main() {
5206 struct tm tm; tm.tm_zone;
5207 ; return 0; }
5209 if { (eval echo configure:5210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5210 rm -rf conftest*
5211 ac_cv_struct_tm_zone=yes
5212 else
5213 echo "configure: failed program was:" >&5
5214 cat conftest.$ac_ext >&5
5215 rm -rf conftest*
5216 ac_cv_struct_tm_zone=no
5218 rm -f conftest*
5221 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5222 if test "$ac_cv_struct_tm_zone" = yes; then
5223 cat >> confdefs.h <<\EOF
5224 #define HAVE_TM_ZONE 1
5227 else
5228 echo $ac_n "checking for tzname""... $ac_c" 1>&6
5229 echo "configure:5230: checking for tzname" >&5
5230 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 #include <time.h>
5237 #ifndef tzname /* For SGI. */
5238 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
5239 #endif
5240 int main() {
5241 atoi(*tzname);
5242 ; return 0; }
5244 if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5245 rm -rf conftest*
5246 ac_cv_var_tzname=yes
5247 else
5248 echo "configure: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5250 rm -rf conftest*
5251 ac_cv_var_tzname=no
5253 rm -f conftest*
5256 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5257 if test $ac_cv_var_tzname = yes; then
5258 cat >> confdefs.h <<\EOF
5259 #define HAVE_TZNAME 1
5266 for ac_func in gethostbyname_r
5268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5269 echo "configure:5270: checking for $ac_func" >&5
5270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5271 echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273 cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* System header to define __stub macros and hopefully few prototypes,
5277 which can conflict with char $ac_func(); below. */
5278 #include <assert.h>
5279 /* Override any gcc2 internal prototype to avoid an error. */
5280 /* We use char because int might match the return type of a gcc2
5281 builtin and then its argument prototype would still apply. */
5282 char $ac_func();
5284 int main() {
5286 /* The GNU C library defines this for functions which it implements
5287 to always fail with ENOSYS. Some functions are actually named
5288 something starting with __ and the normal name is an alias. */
5289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5290 choke me
5291 #else
5292 $ac_func();
5293 #endif
5295 ; return 0; }
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5298 rm -rf conftest*
5299 eval "ac_cv_func_$ac_func=yes"
5300 else
5301 echo "configure: failed program was:" >&5
5302 cat conftest.$ac_ext >&5
5303 rm -rf conftest*
5304 eval "ac_cv_func_$ac_func=no"
5306 rm -f conftest*
5309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5310 echo "$ac_t""yes" 1>&6
5311 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5312 cat >> confdefs.h <<EOF
5313 #define $ac_tr_func 1
5316 cat >> confdefs.h <<\EOF
5317 #define HAVE_GETHOSTBYNAME_R 1
5320 # There are two different kinds of gethostbyname_r.
5321 # We look for the one that returns `int'.
5322 # Hopefully this check is robust enough.
5323 cat > conftest.$ac_ext <<EOF
5324 #line 5325 "configure"
5325 #include "confdefs.h"
5326 #include <netdb.h>
5328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5329 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
5330 rm -rf conftest*
5332 cat >> confdefs.h <<\EOF
5333 #define GETHOSTBYNAME_R_RETURNS_INT 1
5337 rm -f conftest*
5340 case " $GCINCS " in
5341 *" -D_REENTRANT "*) ;;
5343 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
5344 echo "configure:5345: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
5345 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
5346 echo $ac_n "(cached) $ac_c" 1>&6
5347 else
5349 ac_ext=C
5350 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5351 ac_cpp='$CXXCPP $CPPFLAGS'
5352 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5353 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5354 cross_compiling=$ac_cv_prog_cxx_cross
5356 cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359 #include <netdb.h>
5360 int main() {
5361 gethostbyname_r("", 0, 0);
5362 ; return 0; }
5364 if { (eval echo configure:5365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5365 rm -rf conftest*
5366 libjava_cv_gethostbyname_r_needs_reentrant=no
5367 else
5368 echo "configure: failed program was:" >&5
5369 cat conftest.$ac_ext >&5
5370 rm -rf conftest*
5371 CPPFLAGS_SAVE="$CPPFLAGS"
5372 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376 #include <netdb.h>
5377 int main() {
5378 gethostbyname_r("", 0, 0);
5379 ; return 0; }
5381 if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5382 rm -rf conftest*
5383 libjava_cv_gethostbyname_r_needs_reentrant=yes
5384 else
5385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5387 rm -rf conftest*
5388 libjava_cv_gethostbyname_r_needs_reentrant=fail
5390 rm -f conftest*
5391 CPPFLAGS="$CPPFLAGS_SAVE"
5394 rm -f conftest*
5395 ac_ext=c
5396 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5397 ac_cpp='$CPP $CPPFLAGS'
5398 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5399 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5400 cross_compiling=$ac_cv_prog_cc_cross
5405 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
5406 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
5407 cat >> confdefs.h <<\EOF
5408 #define _REENTRANT 1
5413 esac
5415 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
5416 echo "configure:5417: checking for struct hostent_data" >&5
5417 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
5418 echo $ac_n "(cached) $ac_c" 1>&6
5419 else
5420 cat > conftest.$ac_ext <<EOF
5421 #line 5422 "configure"
5422 #include "confdefs.h"
5424 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
5425 # define _REENTRANT 1
5426 #endif
5427 #include <netdb.h>
5428 int main() {
5429 struct hostent_data data;
5430 ; return 0; }
5432 if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5433 rm -rf conftest*
5434 libjava_cv_struct_hostent_data=yes
5435 else
5436 echo "configure: failed program was:" >&5
5437 cat conftest.$ac_ext >&5
5438 rm -rf conftest*
5439 libjava_cv_struct_hostent_data=no
5441 rm -f conftest*
5444 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
5445 if test "x$libjava_cv_struct_hostent_data" = xyes; then
5446 cat >> confdefs.h <<\EOF
5447 #define HAVE_STRUCT_HOSTENT_DATA 1
5452 else
5453 echo "$ac_t""no" 1>&6
5455 done
5458 # FIXME: libjava source code expects to find a prototype for
5459 # gethostbyaddr_r in netdb.h. The outer check ensures that
5460 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
5461 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
5462 # linkage check is enough, yet C++ code requires proper prototypes.)
5463 cat > conftest.$ac_ext <<EOF
5464 #line 5465 "configure"
5465 #include "confdefs.h"
5466 #include <netdb.h>
5468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
5470 rm -rf conftest*
5472 for ac_func in gethostbyaddr_r
5474 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5475 echo "configure:5476: checking for $ac_func" >&5
5476 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5478 else
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 /* System header to define __stub macros and hopefully few prototypes,
5483 which can conflict with char $ac_func(); below. */
5484 #include <assert.h>
5485 /* Override any gcc2 internal prototype to avoid an error. */
5486 /* We use char because int might match the return type of a gcc2
5487 builtin and then its argument prototype would still apply. */
5488 char $ac_func();
5490 int main() {
5492 /* The GNU C library defines this for functions which it implements
5493 to always fail with ENOSYS. Some functions are actually named
5494 something starting with __ and the normal name is an alias. */
5495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5496 choke me
5497 #else
5498 $ac_func();
5499 #endif
5501 ; return 0; }
5503 if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5504 rm -rf conftest*
5505 eval "ac_cv_func_$ac_func=yes"
5506 else
5507 echo "configure: failed program was:" >&5
5508 cat conftest.$ac_ext >&5
5509 rm -rf conftest*
5510 eval "ac_cv_func_$ac_func=no"
5512 rm -f conftest*
5515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5516 echo "$ac_t""yes" 1>&6
5517 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5518 cat >> confdefs.h <<EOF
5519 #define $ac_tr_func 1
5522 cat >> confdefs.h <<\EOF
5523 #define HAVE_GETHOSTBYADDR_R 1
5526 # There are two different kinds of gethostbyaddr_r.
5527 # We look for the one that returns `int'.
5528 # Hopefully this check is robust enough.
5529 cat > conftest.$ac_ext <<EOF
5530 #line 5531 "configure"
5531 #include "confdefs.h"
5532 #include <netdb.h>
5534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5535 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
5536 rm -rf conftest*
5538 cat >> confdefs.h <<\EOF
5539 #define GETHOSTBYADDR_R_RETURNS_INT 1
5543 rm -f conftest*
5545 else
5546 echo "$ac_t""no" 1>&6
5548 done
5551 rm -f conftest*
5554 for ac_func in gethostname
5556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5557 echo "configure:5558: checking for $ac_func" >&5
5558 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5559 echo $ac_n "(cached) $ac_c" 1>&6
5560 else
5561 cat > conftest.$ac_ext <<EOF
5562 #line 5563 "configure"
5563 #include "confdefs.h"
5564 /* System header to define __stub macros and hopefully few prototypes,
5565 which can conflict with char $ac_func(); below. */
5566 #include <assert.h>
5567 /* Override any gcc2 internal prototype to avoid an error. */
5568 /* We use char because int might match the return type of a gcc2
5569 builtin and then its argument prototype would still apply. */
5570 char $ac_func();
5572 int main() {
5574 /* The GNU C library defines this for functions which it implements
5575 to always fail with ENOSYS. Some functions are actually named
5576 something starting with __ and the normal name is an alias. */
5577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5578 choke me
5579 #else
5580 $ac_func();
5581 #endif
5583 ; return 0; }
5585 if { (eval echo configure:5586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5586 rm -rf conftest*
5587 eval "ac_cv_func_$ac_func=yes"
5588 else
5589 echo "configure: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5591 rm -rf conftest*
5592 eval "ac_cv_func_$ac_func=no"
5594 rm -f conftest*
5597 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5598 echo "$ac_t""yes" 1>&6
5599 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5600 cat >> confdefs.h <<EOF
5601 #define $ac_tr_func 1
5604 cat >> confdefs.h <<\EOF
5605 #define HAVE_GETHOSTNAME 1
5608 cat > conftest.$ac_ext <<EOF
5609 #line 5610 "configure"
5610 #include "confdefs.h"
5611 #include <unistd.h>
5613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5614 egrep "gethostname" >/dev/null 2>&1; then
5615 rm -rf conftest*
5617 cat >> confdefs.h <<\EOF
5618 #define HAVE_GETHOSTNAME_DECL 1
5622 rm -f conftest*
5624 else
5625 echo "$ac_t""no" 1>&6
5627 done
5630 # Look for these functions in the thread library, but only bother
5631 # if using POSIX threads.
5632 if test "$THREADS" = posix; then
5633 save_LIBS="$LIBS"
5634 LIBS="$LIBS $THREADLIBS"
5635 # Some POSIX thread systems don't have pthread_mutexattr_settype.
5636 # E.g., Solaris.
5637 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
5639 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5640 echo "configure:5641: checking for $ac_func" >&5
5641 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5642 echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644 cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647 /* System header to define __stub macros and hopefully few prototypes,
5648 which can conflict with char $ac_func(); below. */
5649 #include <assert.h>
5650 /* Override any gcc2 internal prototype to avoid an error. */
5651 /* We use char because int might match the return type of a gcc2
5652 builtin and then its argument prototype would still apply. */
5653 char $ac_func();
5655 int main() {
5657 /* The GNU C library defines this for functions which it implements
5658 to always fail with ENOSYS. Some functions are actually named
5659 something starting with __ and the normal name is an alias. */
5660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5661 choke me
5662 #else
5663 $ac_func();
5664 #endif
5666 ; return 0; }
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669 rm -rf conftest*
5670 eval "ac_cv_func_$ac_func=yes"
5671 else
5672 echo "configure: failed program was:" >&5
5673 cat conftest.$ac_ext >&5
5674 rm -rf conftest*
5675 eval "ac_cv_func_$ac_func=no"
5677 rm -f conftest*
5680 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5681 echo "$ac_t""yes" 1>&6
5682 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5683 cat >> confdefs.h <<EOF
5684 #define $ac_tr_func 1
5687 else
5688 echo "$ac_t""no" 1>&6
5690 done
5693 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
5694 # Solaris 7 the name librt is preferred.
5695 for ac_func in sched_yield
5697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5698 echo "configure:5699: checking for $ac_func" >&5
5699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5700 echo $ac_n "(cached) $ac_c" 1>&6
5701 else
5702 cat > conftest.$ac_ext <<EOF
5703 #line 5704 "configure"
5704 #include "confdefs.h"
5705 /* System header to define __stub macros and hopefully few prototypes,
5706 which can conflict with char $ac_func(); below. */
5707 #include <assert.h>
5708 /* Override any gcc2 internal prototype to avoid an error. */
5709 /* We use char because int might match the return type of a gcc2
5710 builtin and then its argument prototype would still apply. */
5711 char $ac_func();
5713 int main() {
5715 /* The GNU C library defines this for functions which it implements
5716 to always fail with ENOSYS. Some functions are actually named
5717 something starting with __ and the normal name is an alias. */
5718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5719 choke me
5720 #else
5721 $ac_func();
5722 #endif
5724 ; return 0; }
5726 if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5727 rm -rf conftest*
5728 eval "ac_cv_func_$ac_func=yes"
5729 else
5730 echo "configure: failed program was:" >&5
5731 cat conftest.$ac_ext >&5
5732 rm -rf conftest*
5733 eval "ac_cv_func_$ac_func=no"
5735 rm -f conftest*
5738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5739 echo "$ac_t""yes" 1>&6
5740 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5741 cat >> confdefs.h <<EOF
5742 #define $ac_tr_func 1
5745 else
5746 echo "$ac_t""no" 1>&6
5747 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5748 echo "configure:5749: checking for sched_yield in -lrt" >&5
5749 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5751 echo $ac_n "(cached) $ac_c" 1>&6
5752 else
5753 ac_save_LIBS="$LIBS"
5754 LIBS="-lrt $LIBS"
5755 cat > conftest.$ac_ext <<EOF
5756 #line 5757 "configure"
5757 #include "confdefs.h"
5758 /* Override any gcc2 internal prototype to avoid an error. */
5759 /* We use char because int might match the return type of a gcc2
5760 builtin and then its argument prototype would still apply. */
5761 char sched_yield();
5763 int main() {
5764 sched_yield()
5765 ; return 0; }
5767 if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5768 rm -rf conftest*
5769 eval "ac_cv_lib_$ac_lib_var=yes"
5770 else
5771 echo "configure: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 rm -rf conftest*
5774 eval "ac_cv_lib_$ac_lib_var=no"
5776 rm -f conftest*
5777 LIBS="$ac_save_LIBS"
5780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5781 echo "$ac_t""yes" 1>&6
5783 cat >> confdefs.h <<\EOF
5784 #define HAVE_SCHED_YIELD 1
5787 THREADLIBS="$THREADLIBS -lrt"
5788 THREADSPEC="$THREADSPEC -lrt"
5789 else
5790 echo "$ac_t""no" 1>&6
5792 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
5793 echo "configure:5794: checking for sched_yield in -lposix4" >&5
5794 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
5795 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5796 echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798 ac_save_LIBS="$LIBS"
5799 LIBS="-lposix4 $LIBS"
5800 cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803 /* Override any gcc2 internal prototype to avoid an error. */
5804 /* We use char because int might match the return type of a gcc2
5805 builtin and then its argument prototype would still apply. */
5806 char sched_yield();
5808 int main() {
5809 sched_yield()
5810 ; return 0; }
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5813 rm -rf conftest*
5814 eval "ac_cv_lib_$ac_lib_var=yes"
5815 else
5816 echo "configure: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 rm -rf conftest*
5819 eval "ac_cv_lib_$ac_lib_var=no"
5821 rm -f conftest*
5822 LIBS="$ac_save_LIBS"
5825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5826 echo "$ac_t""yes" 1>&6
5828 cat >> confdefs.h <<\EOF
5829 #define HAVE_SCHED_YIELD 1
5832 THREADLIBS="$THREADLIBS -lposix4"
5833 THREADSPEC="$THREADSPEC -lposix4"
5834 else
5835 echo "$ac_t""no" 1>&6
5841 done
5843 LIBS="$save_LIBS"
5845 # We can save a little space at runtime if the mutex has m_count
5846 # or __m_count. This is a nice hack for Linux.
5847 cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5850 #include <pthread.h>
5851 int main() {
5853 extern pthread_mutex_t *mutex; int q = mutex->m_count;
5855 ; return 0; }
5857 if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5858 rm -rf conftest*
5859 cat >> confdefs.h <<\EOF
5860 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
5863 else
5864 echo "configure: failed program was:" >&5
5865 cat conftest.$ac_ext >&5
5866 rm -rf conftest*
5868 cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871 #include <pthread.h>
5872 int main() {
5874 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
5876 ; return 0; }
5878 if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5879 rm -rf conftest*
5880 cat >> confdefs.h <<\EOF
5881 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
5884 else
5885 echo "configure: failed program was:" >&5
5886 cat conftest.$ac_ext >&5
5888 rm -f conftest*
5890 rm -f conftest*
5893 # We require a way to get the time.
5894 time_found=no
5895 for ac_func in gettimeofday time ftime
5897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5898 echo "configure:5899: checking for $ac_func" >&5
5899 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5900 echo $ac_n "(cached) $ac_c" 1>&6
5901 else
5902 cat > conftest.$ac_ext <<EOF
5903 #line 5904 "configure"
5904 #include "confdefs.h"
5905 /* System header to define __stub macros and hopefully few prototypes,
5906 which can conflict with char $ac_func(); below. */
5907 #include <assert.h>
5908 /* Override any gcc2 internal prototype to avoid an error. */
5909 /* We use char because int might match the return type of a gcc2
5910 builtin and then its argument prototype would still apply. */
5911 char $ac_func();
5913 int main() {
5915 /* The GNU C library defines this for functions which it implements
5916 to always fail with ENOSYS. Some functions are actually named
5917 something starting with __ and the normal name is an alias. */
5918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5919 choke me
5920 #else
5921 $ac_func();
5922 #endif
5924 ; return 0; }
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927 rm -rf conftest*
5928 eval "ac_cv_func_$ac_func=yes"
5929 else
5930 echo "configure: failed program was:" >&5
5931 cat conftest.$ac_ext >&5
5932 rm -rf conftest*
5933 eval "ac_cv_func_$ac_func=no"
5935 rm -f conftest*
5938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5939 echo "$ac_t""yes" 1>&6
5940 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5941 cat >> confdefs.h <<EOF
5942 #define $ac_tr_func 1
5944 time_found=yes
5945 else
5946 echo "$ac_t""no" 1>&6
5948 done
5950 if test "$time_found" = no; then
5951 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
5954 for ac_func in memmove
5956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5957 echo "configure:5958: checking for $ac_func" >&5
5958 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5959 echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 /* System header to define __stub macros and hopefully few prototypes,
5965 which can conflict with char $ac_func(); below. */
5966 #include <assert.h>
5967 /* Override any gcc2 internal prototype to avoid an error. */
5968 /* We use char because int might match the return type of a gcc2
5969 builtin and then its argument prototype would still apply. */
5970 char $ac_func();
5972 int main() {
5974 /* The GNU C library defines this for functions which it implements
5975 to always fail with ENOSYS. Some functions are actually named
5976 something starting with __ and the normal name is an alias. */
5977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5978 choke me
5979 #else
5980 $ac_func();
5981 #endif
5983 ; return 0; }
5985 if { (eval echo configure:5986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5986 rm -rf conftest*
5987 eval "ac_cv_func_$ac_func=yes"
5988 else
5989 echo "configure: failed program was:" >&5
5990 cat conftest.$ac_ext >&5
5991 rm -rf conftest*
5992 eval "ac_cv_func_$ac_func=no"
5994 rm -f conftest*
5997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5998 echo "$ac_t""yes" 1>&6
5999 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6000 cat >> confdefs.h <<EOF
6001 #define $ac_tr_func 1
6004 else
6005 echo "$ac_t""no" 1>&6
6007 done
6010 # We require memcpy.
6011 memcpy_found=no
6012 for ac_func in memcpy
6014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6015 echo "configure:6016: checking for $ac_func" >&5
6016 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6017 echo $ac_n "(cached) $ac_c" 1>&6
6018 else
6019 cat > conftest.$ac_ext <<EOF
6020 #line 6021 "configure"
6021 #include "confdefs.h"
6022 /* System header to define __stub macros and hopefully few prototypes,
6023 which can conflict with char $ac_func(); below. */
6024 #include <assert.h>
6025 /* Override any gcc2 internal prototype to avoid an error. */
6026 /* We use char because int might match the return type of a gcc2
6027 builtin and then its argument prototype would still apply. */
6028 char $ac_func();
6030 int main() {
6032 /* The GNU C library defines this for functions which it implements
6033 to always fail with ENOSYS. Some functions are actually named
6034 something starting with __ and the normal name is an alias. */
6035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6036 choke me
6037 #else
6038 $ac_func();
6039 #endif
6041 ; return 0; }
6043 if { (eval echo configure:6044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6044 rm -rf conftest*
6045 eval "ac_cv_func_$ac_func=yes"
6046 else
6047 echo "configure: failed program was:" >&5
6048 cat conftest.$ac_ext >&5
6049 rm -rf conftest*
6050 eval "ac_cv_func_$ac_func=no"
6052 rm -f conftest*
6055 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6056 echo "$ac_t""yes" 1>&6
6057 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6058 cat >> confdefs.h <<EOF
6059 #define $ac_tr_func 1
6061 memcpy_found=yes
6062 else
6063 echo "$ac_t""no" 1>&6
6065 done
6067 if test "$memcpy_found" = no; then
6068 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
6071 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6072 echo "configure:6073: checking for dlopen in -ldl" >&5
6073 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6074 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6075 echo $ac_n "(cached) $ac_c" 1>&6
6076 else
6077 ac_save_LIBS="$LIBS"
6078 LIBS="-ldl $LIBS"
6079 cat > conftest.$ac_ext <<EOF
6080 #line 6081 "configure"
6081 #include "confdefs.h"
6082 /* Override any gcc2 internal prototype to avoid an error. */
6083 /* We use char because int might match the return type of a gcc2
6084 builtin and then its argument prototype would still apply. */
6085 char dlopen();
6087 int main() {
6088 dlopen()
6089 ; return 0; }
6091 if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6092 rm -rf conftest*
6093 eval "ac_cv_lib_$ac_lib_var=yes"
6094 else
6095 echo "configure: failed program was:" >&5
6096 cat conftest.$ac_ext >&5
6097 rm -rf conftest*
6098 eval "ac_cv_lib_$ac_lib_var=no"
6100 rm -f conftest*
6101 LIBS="$ac_save_LIBS"
6104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6105 echo "$ac_t""yes" 1>&6
6107 cat >> confdefs.h <<\EOF
6108 #define HAVE_DLOPEN 1
6111 else
6112 echo "$ac_t""no" 1>&6
6116 # Some library-finding code we stole from Tcl.
6117 #--------------------------------------------------------------------
6118 # Check for the existence of the -lsocket and -lnsl libraries.
6119 # The order here is important, so that they end up in the right
6120 # order in the command line generated by make. Here are some
6121 # special considerations:
6122 # 1. Use "connect" and "accept" to check for -lsocket, and
6123 # "gethostbyname" to check for -lnsl.
6124 # 2. Use each function name only once: can't redo a check because
6125 # autoconf caches the results of the last check and won't redo it.
6126 # 3. Use -lnsl and -lsocket only if they supply procedures that
6127 # aren't already present in the normal libraries. This is because
6128 # IRIX 5.2 has libraries, but they aren't needed and they're
6129 # bogus: they goof up name resolution if used.
6130 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
6131 # To get around this problem, check for both libraries together
6132 # if -lsocket doesn't work by itself.
6133 #--------------------------------------------------------------------
6135 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
6136 echo "configure:6137: checking for socket libraries" >&5
6137 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
6138 echo $ac_n "(cached) $ac_c" 1>&6
6139 else
6140 gcj_cv_lib_sockets=
6141 gcj_checkBoth=0
6142 unset ac_cv_func_connect
6143 echo $ac_n "checking for connect""... $ac_c" 1>&6
6144 echo "configure:6145: checking for connect" >&5
6145 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6146 echo $ac_n "(cached) $ac_c" 1>&6
6147 else
6148 cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 /* System header to define __stub macros and hopefully few prototypes,
6152 which can conflict with char connect(); below. */
6153 #include <assert.h>
6154 /* Override any gcc2 internal prototype to avoid an error. */
6155 /* We use char because int might match the return type of a gcc2
6156 builtin and then its argument prototype would still apply. */
6157 char connect();
6159 int main() {
6161 /* The GNU C library defines this for functions which it implements
6162 to always fail with ENOSYS. Some functions are actually named
6163 something starting with __ and the normal name is an alias. */
6164 #if defined (__stub_connect) || defined (__stub___connect)
6165 choke me
6166 #else
6167 connect();
6168 #endif
6170 ; return 0; }
6172 if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6173 rm -rf conftest*
6174 eval "ac_cv_func_connect=yes"
6175 else
6176 echo "configure: failed program was:" >&5
6177 cat conftest.$ac_ext >&5
6178 rm -rf conftest*
6179 eval "ac_cv_func_connect=no"
6181 rm -f conftest*
6184 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6185 echo "$ac_t""yes" 1>&6
6186 gcj_checkSocket=0
6187 else
6188 echo "$ac_t""no" 1>&6
6189 gcj_checkSocket=1
6192 if test "$gcj_checkSocket" = 1; then
6193 unset ac_cv_func_connect
6194 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
6195 echo "configure:6196: checking for main in -lsocket" >&5
6196 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
6197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6198 echo $ac_n "(cached) $ac_c" 1>&6
6199 else
6200 ac_save_LIBS="$LIBS"
6201 LIBS="-lsocket $LIBS"
6202 cat > conftest.$ac_ext <<EOF
6203 #line 6204 "configure"
6204 #include "confdefs.h"
6206 int main() {
6207 main()
6208 ; return 0; }
6210 if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6211 rm -rf conftest*
6212 eval "ac_cv_lib_$ac_lib_var=yes"
6213 else
6214 echo "configure: failed program was:" >&5
6215 cat conftest.$ac_ext >&5
6216 rm -rf conftest*
6217 eval "ac_cv_lib_$ac_lib_var=no"
6219 rm -f conftest*
6220 LIBS="$ac_save_LIBS"
6223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6224 echo "$ac_t""yes" 1>&6
6225 gcj_cv_lib_sockets="-lsocket"
6226 else
6227 echo "$ac_t""no" 1>&6
6228 gcj_checkBoth=1
6232 if test "$gcj_checkBoth" = 1; then
6233 gcj_oldLibs=$LIBS
6234 LIBS="$LIBS -lsocket -lnsl"
6235 unset ac_cv_func_accept
6236 echo $ac_n "checking for accept""... $ac_c" 1>&6
6237 echo "configure:6238: checking for accept" >&5
6238 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
6239 echo $ac_n "(cached) $ac_c" 1>&6
6240 else
6241 cat > conftest.$ac_ext <<EOF
6242 #line 6243 "configure"
6243 #include "confdefs.h"
6244 /* System header to define __stub macros and hopefully few prototypes,
6245 which can conflict with char accept(); below. */
6246 #include <assert.h>
6247 /* Override any gcc2 internal prototype to avoid an error. */
6248 /* We use char because int might match the return type of a gcc2
6249 builtin and then its argument prototype would still apply. */
6250 char accept();
6252 int main() {
6254 /* The GNU C library defines this for functions which it implements
6255 to always fail with ENOSYS. Some functions are actually named
6256 something starting with __ and the normal name is an alias. */
6257 #if defined (__stub_accept) || defined (__stub___accept)
6258 choke me
6259 #else
6260 accept();
6261 #endif
6263 ; return 0; }
6265 if { (eval echo configure:6266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6266 rm -rf conftest*
6267 eval "ac_cv_func_accept=yes"
6268 else
6269 echo "configure: failed program was:" >&5
6270 cat conftest.$ac_ext >&5
6271 rm -rf conftest*
6272 eval "ac_cv_func_accept=no"
6274 rm -f conftest*
6277 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
6278 echo "$ac_t""yes" 1>&6
6279 gcj_checkNsl=0
6280 gcj_cv_lib_sockets="-lsocket -lnsl"
6281 else
6282 echo "$ac_t""no" 1>&6
6285 unset ac_cv_func_accept
6286 LIBS=$gcj_oldLibs
6288 unset ac_cv_func_gethostbyname
6289 gcj_oldLibs=$LIBS
6290 LIBS="$LIBS $gcj_cv_lib_sockets"
6291 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6292 echo "configure:6293: checking for gethostbyname" >&5
6293 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6294 echo $ac_n "(cached) $ac_c" 1>&6
6295 else
6296 cat > conftest.$ac_ext <<EOF
6297 #line 6298 "configure"
6298 #include "confdefs.h"
6299 /* System header to define __stub macros and hopefully few prototypes,
6300 which can conflict with char gethostbyname(); below. */
6301 #include <assert.h>
6302 /* Override any gcc2 internal prototype to avoid an error. */
6303 /* We use char because int might match the return type of a gcc2
6304 builtin and then its argument prototype would still apply. */
6305 char gethostbyname();
6307 int main() {
6309 /* The GNU C library defines this for functions which it implements
6310 to always fail with ENOSYS. Some functions are actually named
6311 something starting with __ and the normal name is an alias. */
6312 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6313 choke me
6314 #else
6315 gethostbyname();
6316 #endif
6318 ; return 0; }
6320 if { (eval echo configure:6321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6321 rm -rf conftest*
6322 eval "ac_cv_func_gethostbyname=yes"
6323 else
6324 echo "configure: failed program was:" >&5
6325 cat conftest.$ac_ext >&5
6326 rm -rf conftest*
6327 eval "ac_cv_func_gethostbyname=no"
6329 rm -f conftest*
6332 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6333 echo "$ac_t""yes" 1>&6
6335 else
6336 echo "$ac_t""no" 1>&6
6337 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
6338 echo "configure:6339: checking for main in -lnsl" >&5
6339 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
6340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6341 echo $ac_n "(cached) $ac_c" 1>&6
6342 else
6343 ac_save_LIBS="$LIBS"
6344 LIBS="-lnsl $LIBS"
6345 cat > conftest.$ac_ext <<EOF
6346 #line 6347 "configure"
6347 #include "confdefs.h"
6349 int main() {
6350 main()
6351 ; return 0; }
6353 if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6354 rm -rf conftest*
6355 eval "ac_cv_lib_$ac_lib_var=yes"
6356 else
6357 echo "configure: failed program was:" >&5
6358 cat conftest.$ac_ext >&5
6359 rm -rf conftest*
6360 eval "ac_cv_lib_$ac_lib_var=no"
6362 rm -f conftest*
6363 LIBS="$ac_save_LIBS"
6366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6367 echo "$ac_t""yes" 1>&6
6368 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
6369 else
6370 echo "$ac_t""no" 1>&6
6375 unset ac_cv_func_gethostbyname
6376 LIBS=$gcj_oldLIBS
6380 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
6381 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
6383 if test "$with_system_zlib" = yes; then
6384 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
6385 echo "configure:6386: checking for deflate in -lz" >&5
6386 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
6387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6388 echo $ac_n "(cached) $ac_c" 1>&6
6389 else
6390 ac_save_LIBS="$LIBS"
6391 LIBS="-lz $LIBS"
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 /* Override any gcc2 internal prototype to avoid an error. */
6396 /* We use char because int might match the return type of a gcc2
6397 builtin and then its argument prototype would still apply. */
6398 char deflate();
6400 int main() {
6401 deflate()
6402 ; return 0; }
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405 rm -rf conftest*
6406 eval "ac_cv_lib_$ac_lib_var=yes"
6407 else
6408 echo "configure: failed program was:" >&5
6409 cat conftest.$ac_ext >&5
6410 rm -rf conftest*
6411 eval "ac_cv_lib_$ac_lib_var=no"
6413 rm -f conftest*
6414 LIBS="$ac_save_LIBS"
6417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6418 echo "$ac_t""yes" 1>&6
6419 ZLIBSPEC=-lz
6420 else
6421 echo "$ac_t""no" 1>&6
6422 ZLIBSPEC=
6427 # Test for Gtk stuff, if asked for.
6428 if test "$use_gtk_awt" = yes; then
6429 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
6430 if test "${with_gtk_prefix+set}" = set; then
6431 withval="$with_gtk_prefix"
6432 gtk_config_prefix="$withval"
6433 else
6434 gtk_config_prefix=""
6437 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
6438 if test "${with_gtk_exec_prefix+set}" = set; then
6439 withval="$with_gtk_exec_prefix"
6440 gtk_config_exec_prefix="$withval"
6441 else
6442 gtk_config_exec_prefix=""
6445 # Check whether --enable-gtktest or --disable-gtktest was given.
6446 if test "${enable_gtktest+set}" = set; then
6447 enableval="$enable_gtktest"
6449 else
6450 enable_gtktest=yes
6454 for module in .
6456 case "$module" in
6457 gthread)
6458 gtk_config_args="$gtk_config_args gthread"
6460 esac
6461 done
6463 if test x$gtk_config_exec_prefix != x ; then
6464 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
6465 if test x${GTK_CONFIG+set} != xset ; then
6466 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
6469 if test x$gtk_config_prefix != x ; then
6470 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
6471 if test x${GTK_CONFIG+set} != xset ; then
6472 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
6476 # Extract the first word of "gtk-config", so it can be a program name with args.
6477 set dummy gtk-config; ac_word=$2
6478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6479 echo "configure:6480: checking for $ac_word" >&5
6480 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
6481 echo $ac_n "(cached) $ac_c" 1>&6
6482 else
6483 case "$GTK_CONFIG" in
6485 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
6487 ?:/*)
6488 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
6491 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6492 ac_dummy="$PATH"
6493 for ac_dir in $ac_dummy; do
6494 test -z "$ac_dir" && ac_dir=.
6495 if test -f $ac_dir/$ac_word; then
6496 ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
6497 break
6499 done
6500 IFS="$ac_save_ifs"
6501 test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
6503 esac
6505 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
6506 if test -n "$GTK_CONFIG"; then
6507 echo "$ac_t""$GTK_CONFIG" 1>&6
6508 else
6509 echo "$ac_t""no" 1>&6
6512 min_gtk_version=1.2.4
6513 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
6514 echo "configure:6515: checking for GTK - version >= $min_gtk_version" >&5
6515 no_gtk=""
6516 if test "$GTK_CONFIG" = "no" ; then
6517 no_gtk=yes
6518 else
6519 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
6520 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
6521 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
6522 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6523 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
6524 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6525 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
6526 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6527 if test "x$enable_gtktest" = "xyes" ; then
6528 ac_save_CFLAGS="$CFLAGS"
6529 ac_save_LIBS="$LIBS"
6530 CFLAGS="$CFLAGS $GTK_CFLAGS"
6531 LIBS="$GTK_LIBS $LIBS"
6532 rm -f conf.gtktest
6533 if test "$cross_compiling" = yes; then
6534 echo $ac_n "cross compiling; assumed OK... $ac_c"
6535 else
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6540 #include <gtk/gtk.h>
6541 #include <stdio.h>
6542 #include <stdlib.h>
6544 int
6545 main ()
6547 int major, minor, micro;
6548 char *tmp_version;
6550 system ("touch conf.gtktest");
6552 /* HP/UX 9 (%@#!) writes to sscanf strings */
6553 tmp_version = g_strdup("$min_gtk_version");
6554 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6555 printf("%s, bad version string\n", "$min_gtk_version");
6556 exit(1);
6559 if ((gtk_major_version != $gtk_config_major_version) ||
6560 (gtk_minor_version != $gtk_config_minor_version) ||
6561 (gtk_micro_version != $gtk_config_micro_version))
6563 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
6564 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
6565 gtk_major_version, gtk_minor_version, gtk_micro_version);
6566 printf ("*** was found! If gtk-config was correct, then it is best\n");
6567 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
6568 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6569 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6570 printf("*** required on your system.\n");
6571 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
6572 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
6573 printf("*** before re-running configure\n");
6575 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
6576 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
6577 (gtk_minor_version != GTK_MINOR_VERSION) ||
6578 (gtk_micro_version != GTK_MICRO_VERSION))
6580 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
6581 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
6582 printf("*** library (version %d.%d.%d)\n",
6583 gtk_major_version, gtk_minor_version, gtk_micro_version);
6585 #endif /* defined (GTK_MAJOR_VERSION) ... */
6586 else
6588 if ((gtk_major_version > major) ||
6589 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
6590 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
6592 return 0;
6594 else
6596 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
6597 gtk_major_version, gtk_minor_version, gtk_micro_version);
6598 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
6599 major, minor, micro);
6600 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
6601 printf("***\n");
6602 printf("*** If you have already installed a sufficiently new version, this error\n");
6603 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
6604 printf("*** being found. The easiest way to fix this is to remove the old version\n");
6605 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
6606 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
6607 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
6608 printf("*** so that the correct libraries are found at run-time))\n");
6611 return 1;
6615 if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6616 then
6618 else
6619 echo "configure: failed program was:" >&5
6620 cat conftest.$ac_ext >&5
6621 rm -fr conftest*
6622 no_gtk=yes
6624 rm -fr conftest*
6627 CFLAGS="$ac_save_CFLAGS"
6628 LIBS="$ac_save_LIBS"
6631 if test "x$no_gtk" = x ; then
6632 echo "$ac_t""yes" 1>&6
6634 else
6635 echo "$ac_t""no" 1>&6
6636 if test "$GTK_CONFIG" = "no" ; then
6637 echo "*** The gtk-config script installed by GTK could not be found"
6638 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
6639 echo "*** your path, or set the GTK_CONFIG environment variable to the"
6640 echo "*** full path to gtk-config."
6641 else
6642 if test -f conf.gtktest ; then
6644 else
6645 echo "*** Could not run GTK test program, checking why..."
6646 CFLAGS="$CFLAGS $GTK_CFLAGS"
6647 LIBS="$LIBS $GTK_LIBS"
6648 cat > conftest.$ac_ext <<EOF
6649 #line 6650 "configure"
6650 #include "confdefs.h"
6652 #include <gtk/gtk.h>
6653 #include <stdio.h>
6655 int main() {
6656 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
6657 ; return 0; }
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660 rm -rf conftest*
6661 echo "*** The test program compiled, but did not run. This usually means"
6662 echo "*** that the run-time linker is not finding GTK or finding the wrong"
6663 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
6664 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
6665 echo "*** to the installed location Also, make sure you have run ldconfig if that"
6666 echo "*** is required on your system"
6667 echo "***"
6668 echo "*** If you have an old version installed, it is best to remove it, although"
6669 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
6670 echo "***"
6671 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
6672 echo "*** came with the system with the command"
6673 echo "***"
6674 echo "*** rpm --erase --nodeps gtk gtk-devel"
6675 else
6676 echo "configure: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 rm -rf conftest*
6679 echo "*** The test program failed to compile or link. See the file config.log for the"
6680 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
6681 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
6682 echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
6684 rm -f conftest*
6685 CFLAGS="$ac_save_CFLAGS"
6686 LIBS="$ac_save_LIBS"
6689 GTK_CFLAGS=""
6690 GTK_LIBS=""
6691 exit 1
6695 rm -f conf.gtktest
6697 # Check whether --with-glib-prefix or --without-glib-prefix was given.
6698 if test "${with_glib_prefix+set}" = set; then
6699 withval="$with_glib_prefix"
6700 glib_config_prefix="$withval"
6701 else
6702 glib_config_prefix=""
6705 # Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
6706 if test "${with_glib_exec_prefix+set}" = set; then
6707 withval="$with_glib_exec_prefix"
6708 glib_config_exec_prefix="$withval"
6709 else
6710 glib_config_exec_prefix=""
6713 # Check whether --enable-glibtest or --disable-glibtest was given.
6714 if test "${enable_glibtest+set}" = set; then
6715 enableval="$enable_glibtest"
6717 else
6718 enable_glibtest=yes
6722 if test x$glib_config_exec_prefix != x ; then
6723 glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
6724 if test x${GLIB_CONFIG+set} != xset ; then
6725 GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
6728 if test x$glib_config_prefix != x ; then
6729 glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
6730 if test x${GLIB_CONFIG+set} != xset ; then
6731 GLIB_CONFIG=$glib_config_prefix/bin/glib-config
6735 for module in . gthread
6737 case "$module" in
6738 gmodule)
6739 glib_config_args="$glib_config_args gmodule"
6741 gthread)
6742 glib_config_args="$glib_config_args gthread"
6744 esac
6745 done
6747 # Extract the first word of "glib-config", so it can be a program name with args.
6748 set dummy glib-config; ac_word=$2
6749 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6750 echo "configure:6751: checking for $ac_word" >&5
6751 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
6752 echo $ac_n "(cached) $ac_c" 1>&6
6753 else
6754 case "$GLIB_CONFIG" in
6756 ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
6758 ?:/*)
6759 ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
6762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6763 ac_dummy="$PATH"
6764 for ac_dir in $ac_dummy; do
6765 test -z "$ac_dir" && ac_dir=.
6766 if test -f $ac_dir/$ac_word; then
6767 ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word"
6768 break
6770 done
6771 IFS="$ac_save_ifs"
6772 test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
6774 esac
6776 GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
6777 if test -n "$GLIB_CONFIG"; then
6778 echo "$ac_t""$GLIB_CONFIG" 1>&6
6779 else
6780 echo "$ac_t""no" 1>&6
6783 min_glib_version=1.2.4
6784 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
6785 echo "configure:6786: checking for GLIB - version >= $min_glib_version" >&5
6786 no_glib=""
6787 if test "$GLIB_CONFIG" = "no" ; then
6788 no_glib=yes
6789 else
6790 GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
6791 GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
6792 glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
6793 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6794 glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
6795 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6796 glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
6797 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6798 if test "x$enable_glibtest" = "xyes" ; then
6799 ac_save_CFLAGS="$CFLAGS"
6800 ac_save_LIBS="$LIBS"
6801 CFLAGS="$CFLAGS $GLIB_CFLAGS"
6802 LIBS="$GLIB_LIBS $LIBS"
6803 rm -f conf.glibtest
6804 if test "$cross_compiling" = yes; then
6805 echo $ac_n "cross compiling; assumed OK... $ac_c"
6806 else
6807 cat > conftest.$ac_ext <<EOF
6808 #line 6809 "configure"
6809 #include "confdefs.h"
6811 #include <glib.h>
6812 #include <stdio.h>
6813 #include <stdlib.h>
6815 int
6816 main ()
6818 int major, minor, micro;
6819 char *tmp_version;
6821 system ("touch conf.glibtest");
6823 /* HP/UX 9 (%@#!) writes to sscanf strings */
6824 tmp_version = g_strdup("$min_glib_version");
6825 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6826 printf("%s, bad version string\n", "$min_glib_version");
6827 exit(1);
6830 if ((glib_major_version != $glib_config_major_version) ||
6831 (glib_minor_version != $glib_config_minor_version) ||
6832 (glib_micro_version != $glib_config_micro_version))
6834 printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
6835 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
6836 glib_major_version, glib_minor_version, glib_micro_version);
6837 printf ("*** was found! If glib-config was correct, then it is best\n");
6838 printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
6839 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6840 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6841 printf("*** required on your system.\n");
6842 printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
6843 printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
6844 printf("*** before re-running configure\n");
6846 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
6847 (glib_minor_version != GLIB_MINOR_VERSION) ||
6848 (glib_micro_version != GLIB_MICRO_VERSION))
6850 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
6851 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
6852 printf("*** library (version %d.%d.%d)\n",
6853 glib_major_version, glib_minor_version, glib_micro_version);
6855 else
6857 if ((glib_major_version > major) ||
6858 ((glib_major_version == major) && (glib_minor_version > minor)) ||
6859 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
6861 return 0;
6863 else
6865 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
6866 glib_major_version, glib_minor_version, glib_micro_version);
6867 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
6868 major, minor, micro);
6869 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
6870 printf("***\n");
6871 printf("*** If you have already installed a sufficiently new version, this error\n");
6872 printf("*** probably means that the wrong copy of the glib-config shell script is\n");
6873 printf("*** being found. The easiest way to fix this is to remove the old version\n");
6874 printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
6875 printf("*** correct copy of glib-config. (In this case, you will have to\n");
6876 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
6877 printf("*** so that the correct libraries are found at run-time))\n");
6880 return 1;
6884 if { (eval echo configure:6885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6885 then
6887 else
6888 echo "configure: failed program was:" >&5
6889 cat conftest.$ac_ext >&5
6890 rm -fr conftest*
6891 no_glib=yes
6893 rm -fr conftest*
6896 CFLAGS="$ac_save_CFLAGS"
6897 LIBS="$ac_save_LIBS"
6900 if test "x$no_glib" = x ; then
6901 echo "$ac_t""yes" 1>&6
6903 else
6904 echo "$ac_t""no" 1>&6
6905 if test "$GLIB_CONFIG" = "no" ; then
6906 echo "*** The glib-config script installed by GLIB could not be found"
6907 echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
6908 echo "*** your path, or set the GLIB_CONFIG environment variable to the"
6909 echo "*** full path to glib-config."
6910 else
6911 if test -f conf.glibtest ; then
6913 else
6914 echo "*** Could not run GLIB test program, checking why..."
6915 CFLAGS="$CFLAGS $GLIB_CFLAGS"
6916 LIBS="$LIBS $GLIB_LIBS"
6917 cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6921 #include <glib.h>
6922 #include <stdio.h>
6924 int main() {
6925 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
6926 ; return 0; }
6928 if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6929 rm -rf conftest*
6930 echo "*** The test program compiled, but did not run. This usually means"
6931 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
6932 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
6933 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
6934 echo "*** to the installed location Also, make sure you have run ldconfig if that"
6935 echo "*** is required on your system"
6936 echo "***"
6937 echo "*** If you have an old version installed, it is best to remove it, although"
6938 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
6939 echo "***"
6940 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
6941 echo "*** came with the system with the command"
6942 echo "***"
6943 echo "*** rpm --erase --nodeps gtk gtk-devel"
6944 else
6945 echo "configure: failed program was:" >&5
6946 cat conftest.$ac_ext >&5
6947 rm -rf conftest*
6948 echo "*** The test program failed to compile or link. See the file config.log for the"
6949 echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
6950 echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
6951 echo "*** may want to edit the glib-config script: $GLIB_CONFIG"
6953 rm -f conftest*
6954 CFLAGS="$ac_save_CFLAGS"
6955 LIBS="$ac_save_LIBS"
6958 GLIB_CFLAGS=""
6959 GLIB_LIBS=""
6960 exit 1
6964 rm -f conf.glibtest
6966 enable_libarttest=no
6967 # Check whether --with-libart-prefix or --without-libart-prefix was given.
6968 if test "${with_libart_prefix+set}" = set; then
6969 withval="$with_libart_prefix"
6970 libart_prefix="$withval"
6971 else
6972 libart_prefix=""
6975 # Check whether --with-libart-exec-prefix or --without-libart-exec-prefix was given.
6976 if test "${with_libart_exec_prefix+set}" = set; then
6977 withval="$with_libart_exec_prefix"
6978 libart_exec_prefix="$withval"
6979 else
6980 libart_exec_prefix=""
6983 # Check whether --enable-libarttest or --disable-libarttest was given.
6984 if test "${enable_libarttest+set}" = set; then
6985 enableval="$enable_libarttest"
6987 else
6988 enable_libarttest=yes
6992 if test x$libart_exec_prefix != x ; then
6993 libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
6994 if test x${LIBART_CONFIG+set} != xset ; then
6995 LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
6998 if test x$libart_prefix != x ; then
6999 libart_args="$libart_args --prefix=$libart_prefix"
7000 if test x${LIBART_CONFIG+set} != xset ; then
7001 LIBART_CONFIG=$libart_prefix/bin/libart-config
7005 # Extract the first word of "libart-config", so it can be a program name with args.
7006 set dummy libart-config; ac_word=$2
7007 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7008 echo "configure:7009: checking for $ac_word" >&5
7009 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then
7010 echo $ac_n "(cached) $ac_c" 1>&6
7011 else
7012 case "$LIBART_CONFIG" in
7014 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path.
7016 ?:/*)
7017 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path.
7020 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7021 ac_dummy="$PATH"
7022 for ac_dir in $ac_dummy; do
7023 test -z "$ac_dir" && ac_dir=.
7024 if test -f $ac_dir/$ac_word; then
7025 ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word"
7026 break
7028 done
7029 IFS="$ac_save_ifs"
7030 test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no"
7032 esac
7034 LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG"
7035 if test -n "$LIBART_CONFIG"; then
7036 echo "$ac_t""$LIBART_CONFIG" 1>&6
7037 else
7038 echo "$ac_t""no" 1>&6
7041 min_libart_version=2.1.0
7042 echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6
7043 echo "configure:7044: checking for LIBART - version >= $min_libart_version" >&5
7044 no_libart=""
7045 if test "$LIBART_CONFIG" = "no" ; then
7046 no_libart=yes
7047 else
7048 LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
7049 LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
7051 libart_major_version=`$LIBART_CONFIG $libart_args --version | \
7052 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
7053 libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
7054 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
7055 libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
7056 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
7057 if test "x$enable_libarttest" = "xyes" ; then
7058 ac_save_CFLAGS="$CFLAGS"
7059 ac_save_LIBS="$LIBS"
7060 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7061 LIBS="$LIBS $LIBART_LIBS"
7062 rm -f conf.libarttest
7063 if test "$cross_compiling" = yes; then
7064 echo $ac_n "cross compiling; assumed OK... $ac_c"
7065 else
7066 cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7070 #include <stdio.h>
7071 #include <stdlib.h>
7072 #include <string.h>
7073 #include <libart_lgpl/libart.h>
7075 char*
7076 my_strdup (char *str)
7078 char *new_str;
7080 if (str)
7082 new_str = malloc ((strlen (str) + 1) * sizeof(char));
7083 strcpy (new_str, str);
7085 else
7086 new_str = NULL;
7088 return new_str;
7091 int main ()
7093 int major, minor, micro;
7094 char *tmp_version;
7096 system ("touch conf.libarttest");
7098 /* HP/UX 9 (%@#!) writes to sscanf strings */
7099 tmp_version = my_strdup("$min_libart_version");
7100 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
7101 printf("%s, bad version string\n", "$min_libart_version");
7102 exit(1);
7105 if (($libart_major_version > major) ||
7106 (($libart_major_version == major) && ($libart_minor_version > minor)) ||
7107 (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro)))
7109 return 0;
7111 else
7113 printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version);
7114 printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro);
7115 printf("*** best to upgrade to the required version.\n");
7116 printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n");
7117 printf("*** to point to the correct copy of libart-config, and remove the file\n");
7118 printf("*** config.cache before re-running configure\n");
7119 return 1;
7125 if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7126 then
7128 else
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 rm -fr conftest*
7132 no_libart=yes
7134 rm -fr conftest*
7137 CFLAGS="$ac_save_CFLAGS"
7138 LIBS="$ac_save_LIBS"
7141 if test "x$no_libart" = x ; then
7142 echo "$ac_t""yes" 1>&6
7144 else
7145 echo "$ac_t""no" 1>&6
7146 if test "$LIBART_CONFIG" = "no" ; then
7147 echo "*** The libart-config script installed by LIBART could not be found"
7148 echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in"
7149 echo "*** your path, or set the LIBART_CONFIG environment variable to the"
7150 echo "*** full path to libart-config."
7151 else
7152 if test -f conf.libarttest ; then
7154 else
7155 echo "*** Could not run LIBART test program, checking why..."
7156 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7157 LIBS="$LIBS $LIBART_LIBS"
7158 cat > conftest.$ac_ext <<EOF
7159 #line 7160 "configure"
7160 #include "confdefs.h"
7162 #include <stdio.h>
7163 #include <libart_lgpl/libart.h>
7165 int main() {
7166 return 0;
7167 ; return 0; }
7169 if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7170 rm -rf conftest*
7171 echo "*** The test program compiled, but did not run. This usually means"
7172 echo "*** that the run-time linker is not finding LIBART or finding the wrong"
7173 echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your"
7174 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7175 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7176 echo "*** is required on your system"
7177 echo "***"
7178 echo "*** If you have an old version installed, it is best to remove it, although"
7179 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7180 else
7181 echo "configure: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7183 rm -rf conftest*
7184 echo "*** The test program failed to compile or link. See the file config.log for the"
7185 echo "*** exact error that occured. This usually means LIBART was incorrectly installed"
7186 echo "*** or that you have moved LIBART since it was installed. In the latter case, you"
7187 echo "*** may want to edit the libart-config script: $LIBART_CONFIG"
7189 rm -f conftest*
7190 CFLAGS="$ac_save_CFLAGS"
7191 LIBS="$ac_save_LIBS"
7194 LIBART_CFLAGS=""
7195 LIBART_LIBS=""
7196 exit 1
7200 rm -f conf.libarttest
7204 # On Solaris, and maybe other architectures, the Boehm collector
7205 # requires -ldl.
7206 if test "$GC" = boehm; then
7207 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
7208 echo "configure:7209: checking for main in -ldl" >&5
7209 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
7210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7211 echo $ac_n "(cached) $ac_c" 1>&6
7212 else
7213 ac_save_LIBS="$LIBS"
7214 LIBS="-ldl $LIBS"
7215 cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7219 int main() {
7220 main()
7221 ; return 0; }
7223 if { (eval echo configure:7224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7224 rm -rf conftest*
7225 eval "ac_cv_lib_$ac_lib_var=yes"
7226 else
7227 echo "configure: failed program was:" >&5
7228 cat conftest.$ac_ext >&5
7229 rm -rf conftest*
7230 eval "ac_cv_lib_$ac_lib_var=no"
7232 rm -f conftest*
7233 LIBS="$ac_save_LIBS"
7236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7237 echo "$ac_t""yes" 1>&6
7238 SYSTEMSPEC="$SYSTEMSPEC -ldl"
7239 else
7240 echo "$ac_t""no" 1>&6
7245 if test -z "${with_multisubdir}"; then
7246 builddotdot=.
7247 else
7249 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
7252 if test -x "${builddotdot}/../../gcc/gcj"; then
7253 dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
7254 GCJ="$dir/gcj -B`${PWDCMD-pwd}`/ -B$dir/"
7255 else
7256 CANADIAN=yes
7257 NULL_TARGET=yes
7258 GCJ="gcj -B`${PWDCMD-pwd}`/"
7262 # Create it, so that compile/link tests don't fail
7263 test -f libgcj.spec || touch libgcj.spec
7265 # We must search the source tree for java.lang, since we still don't
7266 # have libgcj.jar nor java/lang/*.class
7267 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
7268 CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`"
7270 # Since some classes depend on this one, we need its source available
7271 # before we can do any GCJ compilation test :-(
7272 if test ! -f gnu/classpath/Configuration.java; then
7273 test -d gnu || mkdir gnu
7274 test -d gnu/classpath || mkdir gnu/classpath
7275 sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
7276 -e 's,@TOOLKIT@,$TOOLKIT,' \
7277 < $srcdir/gnu/classpath/Configuration.java.in \
7278 > gnu/classpath/Configuration.java
7279 # We do not want to redirect the output of the grep below to /dev/null,
7280 # but we add /dev/null to the input list so that grep will print the
7281 # filename of Configuration.java in case it finds any matches.
7282 if grep @ gnu/classpath/Configuration.java /dev/null; then
7283 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
7287 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
7288 set dummy ${ac_tool_prefix}gcj; ac_word=$2
7289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7290 echo "configure:7291: checking for $ac_word" >&5
7291 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7292 echo $ac_n "(cached) $ac_c" 1>&6
7293 else
7294 if test -n "$GCJ"; then
7295 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7296 else
7297 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7298 ac_dummy="$PATH"
7299 for ac_dir in $ac_dummy; do
7300 test -z "$ac_dir" && ac_dir=.
7301 if test -f $ac_dir/$ac_word; then
7302 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
7303 break
7305 done
7306 IFS="$ac_save_ifs"
7309 GCJ="$ac_cv_prog_GCJ"
7310 if test -n "$GCJ"; then
7311 echo "$ac_t""$GCJ" 1>&6
7312 else
7313 echo "$ac_t""no" 1>&6
7317 if test -z "$ac_cv_prog_GCJ"; then
7318 if test -n "$ac_tool_prefix"; then
7319 # Extract the first word of "gcj", so it can be a program name with args.
7320 set dummy gcj; ac_word=$2
7321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7322 echo "configure:7323: checking for $ac_word" >&5
7323 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7324 echo $ac_n "(cached) $ac_c" 1>&6
7325 else
7326 if test -n "$GCJ"; then
7327 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7328 else
7329 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7330 ac_dummy="$PATH"
7331 for ac_dir in $ac_dummy; do
7332 test -z "$ac_dir" && ac_dir=.
7333 if test -f $ac_dir/$ac_word; then
7334 ac_cv_prog_GCJ="gcj"
7335 break
7337 done
7338 IFS="$ac_save_ifs"
7339 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
7342 GCJ="$ac_cv_prog_GCJ"
7343 if test -n "$GCJ"; then
7344 echo "$ac_t""$GCJ" 1>&6
7345 else
7346 echo "$ac_t""no" 1>&6
7349 else
7350 GCJ="no"
7354 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7358 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
7359 lt_save_CC="$CC"
7360 lt_save_CFLAGS="$CFLAGS"
7361 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
7362 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
7363 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
7364 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
7365 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
7366 deplibs_check_method="$deplibs_check_method" \
7367 file_magic_cmd="$file_magic_cmd" \
7368 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
7369 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
7370 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
7371 CC="$lt_save_CC"
7372 CFLAGS="$lt_save_CFLAGS"
7374 # Redirect the config.log output again, so that the ltconfig log is not
7375 # clobbered by the next message.
7376 exec 5>>./config.log
7381 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
7383 echo $ac_n "checking size of void *""... $ac_c" 1>&6
7384 echo "configure:7385: checking size of void *" >&5
7385 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
7386 echo $ac_n "(cached) $ac_c" 1>&6
7387 else
7388 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
7389 cat > conftest.$ac_ext <<EOF
7390 #line 7391 "configure"
7391 #include "confdefs.h"
7392 #include "confdefs.h"
7393 #include <sys/types.h>
7396 int main() {
7397 switch (0) case 0: case (sizeof (void *) == $ac_size):;
7398 ; return 0; }
7400 if { (eval echo configure:7401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7401 rm -rf conftest*
7402 ac_cv_sizeof_void_p=$ac_size
7403 else
7404 echo "configure: failed program was:" >&5
7405 cat conftest.$ac_ext >&5
7407 rm -f conftest*
7408 if test x$ac_cv_sizeof_void_p != x ; then break; fi
7409 done
7413 if test x$ac_cv_sizeof_void_p = x ; then
7414 { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
7416 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
7417 cat >> confdefs.h <<EOF
7418 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
7423 ZLIBS=
7424 SYS_ZLIBS=
7425 ZINCS=
7427 if test -z "$ZLIBSPEC"; then
7428 # Use zlib from the GCC tree.
7429 ZINCS='-I$(top_srcdir)/../zlib'
7430 ZLIBS=../zlib/libzgcj_convenience.la
7431 else
7432 # System's zlib.
7433 SYS_ZLIBS="$ZLIBSPEC"
7445 if test "$CANADIAN" = yes; then
7446 CANADIAN_TRUE=
7447 CANADIAN_FALSE='#'
7448 else
7449 CANADIAN_TRUE='#'
7450 CANADIAN_FALSE=
7454 if test "$NULL_TARGET" = yes; then
7455 NULL_TARGET_TRUE=
7456 NULL_TARGET_FALSE='#'
7457 else
7458 NULL_TARGET_TRUE='#'
7459 NULL_TARGET_FALSE=
7463 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
7464 NATIVE_TRUE=
7465 NATIVE_FALSE='#'
7466 else
7467 NATIVE_TRUE='#'
7468 NATIVE_FALSE=
7472 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
7473 NEEDS_DATA_START_TRUE=
7474 NEEDS_DATA_START_FALSE='#'
7475 else
7476 NEEDS_DATA_START_TRUE='#'
7477 NEEDS_DATA_START_FALSE=
7481 if test -n "$with_cross_host" &&
7482 test x"$with_cross_host" != x"no"; then
7483 toolexecdir='$(exec_prefix)/$(target_alias)'
7484 toolexecmainlibdir='$(toolexecdir)/lib'
7485 else
7486 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
7487 toolexecmainlibdir='$(libdir)'
7489 multi_os_directory=`$CC -print-multi-os-directory`
7490 case $multi_os_directory in
7491 .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
7492 *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
7493 esac
7498 # Determine gcj version number.
7500 gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
7502 GCJVERSION=$gcjversion
7504 cat >> confdefs.h <<EOF
7505 #define GCJVERSION "$GCJVERSION"
7509 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
7510 echo "configure:7511: checking for g++ -ffloat-store bug" >&5
7511 save_CFLAGS="$CFLAGS"
7512 CFLAGS="-x c++ -O2 -ffloat-store"
7513 cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516 #include <math.h>
7517 int main() {
7519 ; return 0; }
7521 if { (eval echo configure:7522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7522 rm -rf conftest*
7523 echo "$ac_t""no" 1>&6
7524 else
7525 echo "configure: failed program was:" >&5
7526 cat conftest.$ac_ext >&5
7527 rm -rf conftest*
7528 cat >> confdefs.h <<\EOF
7529 #define __NO_MATH_INLINES 1
7532 echo "$ac_t""yes" 1>&6
7534 rm -f conftest*
7535 CFLAGS="$save_CFLAGS"
7537 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 net/if.h pwd.h sys/config.h stdint.h langinfo.h locale.h
7539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7541 echo "configure:7542: checking for $ac_hdr" >&5
7542 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7543 echo $ac_n "(cached) $ac_c" 1>&6
7544 else
7545 cat > conftest.$ac_ext <<EOF
7546 #line 7547 "configure"
7547 #include "confdefs.h"
7548 #include <$ac_hdr>
7550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7551 { (eval echo configure:7552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7553 if test -z "$ac_err"; then
7554 rm -rf conftest*
7555 eval "ac_cv_header_$ac_safe=yes"
7556 else
7557 echo "$ac_err" >&5
7558 echo "configure: failed program was:" >&5
7559 cat conftest.$ac_ext >&5
7560 rm -rf conftest*
7561 eval "ac_cv_header_$ac_safe=no"
7563 rm -f conftest*
7565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7566 echo "$ac_t""yes" 1>&6
7567 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7568 cat >> confdefs.h <<EOF
7569 #define $ac_tr_hdr 1
7572 else
7573 echo "$ac_t""no" 1>&6
7575 done
7577 for ac_hdr in dirent.h
7579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7581 echo "configure:7582: checking for $ac_hdr" >&5
7582 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7583 echo $ac_n "(cached) $ac_c" 1>&6
7584 else
7585 cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 #include <$ac_hdr>
7590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7591 { (eval echo configure:7592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7593 if test -z "$ac_err"; then
7594 rm -rf conftest*
7595 eval "ac_cv_header_$ac_safe=yes"
7596 else
7597 echo "$ac_err" >&5
7598 echo "configure: failed program was:" >&5
7599 cat conftest.$ac_ext >&5
7600 rm -rf conftest*
7601 eval "ac_cv_header_$ac_safe=no"
7603 rm -f conftest*
7605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7606 echo "$ac_t""yes" 1>&6
7607 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7608 cat >> confdefs.h <<EOF
7609 #define $ac_tr_hdr 1
7612 else
7613 echo "$ac_t""no" 1>&6
7615 done
7617 for ac_hdr in inttypes.h
7619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7621 echo "configure:7622: checking for $ac_hdr" >&5
7622 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7623 echo $ac_n "(cached) $ac_c" 1>&6
7624 else
7625 cat > conftest.$ac_ext <<EOF
7626 #line 7627 "configure"
7627 #include "confdefs.h"
7628 #include <$ac_hdr>
7630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7631 { (eval echo configure:7632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7633 if test -z "$ac_err"; then
7634 rm -rf conftest*
7635 eval "ac_cv_header_$ac_safe=yes"
7636 else
7637 echo "$ac_err" >&5
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7640 rm -rf conftest*
7641 eval "ac_cv_header_$ac_safe=no"
7643 rm -f conftest*
7645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7646 echo "$ac_t""yes" 1>&6
7647 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7648 cat >> confdefs.h <<EOF
7649 #define $ac_tr_hdr 1
7652 cat >> confdefs.h <<\EOF
7653 #define HAVE_INTTYPES_H 1
7656 cat >> confdefs.h <<\EOF
7657 #define JV_HAVE_INTTYPES_H 1
7661 else
7662 echo "$ac_t""no" 1>&6
7664 done
7666 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7667 echo "configure:7668: checking for sys/wait.h that is POSIX.1 compatible" >&5
7668 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7669 echo $ac_n "(cached) $ac_c" 1>&6
7670 else
7671 cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674 #include <sys/types.h>
7675 #include <sys/wait.h>
7676 #ifndef WEXITSTATUS
7677 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7678 #endif
7679 #ifndef WIFEXITED
7680 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7681 #endif
7682 int main() {
7683 int s;
7684 wait (&s);
7685 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7686 ; return 0; }
7688 if { (eval echo configure:7689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7689 rm -rf conftest*
7690 ac_cv_header_sys_wait_h=yes
7691 else
7692 echo "configure: failed program was:" >&5
7693 cat conftest.$ac_ext >&5
7694 rm -rf conftest*
7695 ac_cv_header_sys_wait_h=no
7697 rm -f conftest*
7700 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7701 if test $ac_cv_header_sys_wait_h = yes; then
7702 cat >> confdefs.h <<\EOF
7703 #define HAVE_SYS_WAIT_H 1
7709 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7710 echo "configure:7711: checking for ANSI C header files" >&5
7711 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7712 echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714 cat > conftest.$ac_ext <<EOF
7715 #line 7716 "configure"
7716 #include "confdefs.h"
7717 #include <stdlib.h>
7718 #include <stdarg.h>
7719 #include <string.h>
7720 #include <float.h>
7722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7723 { (eval echo configure:7724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7725 if test -z "$ac_err"; then
7726 rm -rf conftest*
7727 ac_cv_header_stdc=yes
7728 else
7729 echo "$ac_err" >&5
7730 echo "configure: failed program was:" >&5
7731 cat conftest.$ac_ext >&5
7732 rm -rf conftest*
7733 ac_cv_header_stdc=no
7735 rm -f conftest*
7737 if test $ac_cv_header_stdc = yes; then
7738 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7739 cat > conftest.$ac_ext <<EOF
7740 #line 7741 "configure"
7741 #include "confdefs.h"
7742 #include <string.h>
7744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7745 egrep "memchr" >/dev/null 2>&1; then
7747 else
7748 rm -rf conftest*
7749 ac_cv_header_stdc=no
7751 rm -f conftest*
7755 if test $ac_cv_header_stdc = yes; then
7756 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7757 cat > conftest.$ac_ext <<EOF
7758 #line 7759 "configure"
7759 #include "confdefs.h"
7760 #include <stdlib.h>
7762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7763 egrep "free" >/dev/null 2>&1; then
7765 else
7766 rm -rf conftest*
7767 ac_cv_header_stdc=no
7769 rm -f conftest*
7773 if test $ac_cv_header_stdc = yes; then
7774 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7775 if test "$cross_compiling" = yes; then
7777 else
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 #include <ctype.h>
7782 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7783 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7784 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7785 int main () { int i; for (i = 0; i < 256; i++)
7786 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7787 exit (0); }
7790 if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7791 then
7793 else
7794 echo "configure: failed program was:" >&5
7795 cat conftest.$ac_ext >&5
7796 rm -fr conftest*
7797 ac_cv_header_stdc=no
7799 rm -fr conftest*
7805 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7806 if test $ac_cv_header_stdc = yes; then
7807 cat >> confdefs.h <<\EOF
7808 #define STDC_HEADERS 1
7813 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
7814 echo "configure:7815: checking for ssize_t" >&5
7815 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
7816 echo $ac_n "(cached) $ac_c" 1>&6
7817 else
7818 cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 #include <sys/types.h>
7822 #if STDC_HEADERS
7823 #include <stdlib.h>
7824 #include <stddef.h>
7825 #endif
7827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7828 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7829 rm -rf conftest*
7830 ac_cv_type_ssize_t=yes
7831 else
7832 rm -rf conftest*
7833 ac_cv_type_ssize_t=no
7835 rm -f conftest*
7838 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
7839 if test $ac_cv_type_ssize_t = no; then
7840 cat >> confdefs.h <<\EOF
7841 #define ssize_t int
7847 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
7848 echo "configure:7849: checking for in_addr_t" >&5
7849 cat > conftest.$ac_ext <<EOF
7850 #line 7851 "configure"
7851 #include "confdefs.h"
7852 #include <sys/types.h>
7853 #if STDC_HEADERS
7854 #include <stdlib.h>
7855 #include <stddef.h>
7856 #endif
7857 #if HAVE_NETINET_IN_H
7858 #include <netinet/in.h>
7859 #endif
7860 int main() {
7861 in_addr_t foo;
7862 ; return 0; }
7864 if { (eval echo configure:7865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7865 rm -rf conftest*
7866 cat >> confdefs.h <<\EOF
7867 #define HAVE_IN_ADDR_T 1
7870 echo "$ac_t""yes" 1>&6
7871 else
7872 echo "configure: failed program was:" >&5
7873 cat conftest.$ac_ext >&5
7874 rm -rf conftest*
7875 echo "$ac_t""no" 1>&6
7877 rm -f conftest*
7879 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
7880 echo "configure:7881: checking whether struct ip_mreq is in netinet/in.h" >&5
7881 cat > conftest.$ac_ext <<EOF
7882 #line 7883 "configure"
7883 #include "confdefs.h"
7884 #include <netinet/in.h>
7885 int main() {
7886 struct ip_mreq mreq;
7887 ; return 0; }
7889 if { (eval echo configure:7890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7890 rm -rf conftest*
7891 cat >> confdefs.h <<\EOF
7892 #define HAVE_STRUCT_IP_MREQ 1
7895 echo "$ac_t""yes" 1>&6
7896 else
7897 echo "configure: failed program was:" >&5
7898 cat conftest.$ac_ext >&5
7899 rm -rf conftest*
7900 echo "$ac_t""no" 1>&6
7902 rm -f conftest*
7904 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
7905 echo "configure:7906: checking whether struct ipv6_mreq is in netinet/in.h" >&5
7906 cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 #include <netinet/in.h>
7910 int main() {
7911 struct ipv6_mreq mreq6;
7912 ; return 0; }
7914 if { (eval echo configure:7915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7915 rm -rf conftest*
7916 cat >> confdefs.h <<\EOF
7917 #define HAVE_STRUCT_IPV6_MREQ 1
7920 echo "$ac_t""yes" 1>&6
7921 else
7922 echo "configure: failed program was:" >&5
7923 cat conftest.$ac_ext >&5
7924 rm -rf conftest*
7925 echo "$ac_t""no" 1>&6
7927 rm -f conftest*
7929 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
7930 echo "configure:7931: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
7931 cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 #include <netinet/in.h>
7935 int main() {
7936 struct sockaddr_in6 addr6;
7937 ; return 0; }
7939 if { (eval echo configure:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7940 rm -rf conftest*
7941 cat >> confdefs.h <<\EOF
7942 #define HAVE_INET6 1
7945 echo "$ac_t""yes" 1>&6
7946 else
7947 echo "configure: failed program was:" >&5
7948 cat conftest.$ac_ext >&5
7949 rm -rf conftest*
7950 echo "$ac_t""no" 1>&6
7952 rm -f conftest*
7954 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
7955 echo "configure:7956: checking for socklen_t in sys/socket.h" >&5
7956 cat > conftest.$ac_ext <<EOF
7957 #line 7958 "configure"
7958 #include "confdefs.h"
7959 #define _POSIX_PII_SOCKET
7960 #include <sys/types.h>
7961 #include <sys/socket.h>
7962 int main() {
7963 socklen_t x = 5;
7964 ; return 0; }
7966 if { (eval echo configure:7967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7967 rm -rf conftest*
7968 cat >> confdefs.h <<\EOF
7969 #define HAVE_SOCKLEN_T 1
7972 echo "$ac_t""yes" 1>&6
7973 else
7974 echo "configure: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7976 rm -rf conftest*
7977 echo "$ac_t""no" 1>&6
7979 rm -f conftest*
7981 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
7982 echo "configure:7983: checking for tm_gmtoff in struct tm" >&5
7983 cat > conftest.$ac_ext <<EOF
7984 #line 7985 "configure"
7985 #include "confdefs.h"
7986 #include <time.h>
7987 int main() {
7988 struct tm tim; tim.tm_gmtoff = 0;
7989 ; return 0; }
7991 if { (eval echo configure:7992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7992 rm -rf conftest*
7993 cat >> confdefs.h <<\EOF
7994 #define STRUCT_TM_HAS_GMTOFF 1
7997 echo "$ac_t""yes" 1>&6
7998 else
7999 echo "configure: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8001 rm -rf conftest*
8002 echo "$ac_t""no" 1>&6
8003 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
8004 echo "configure:8005: checking for global timezone variable" >&5
8005 cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008 #include <time.h>
8009 int main() {
8010 void i(){long z2 = 2*timezone;}
8011 ; return 0; }
8013 if { (eval echo configure:8014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8014 rm -rf conftest*
8015 cat >> confdefs.h <<\EOF
8016 #define HAVE_TIMEZONE 1
8019 echo "$ac_t""yes" 1>&6
8020 else
8021 echo "configure: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 rm -rf conftest*
8024 echo "$ac_t""no" 1>&6
8025 echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6
8026 echo "configure:8027: checking for global _timezone variable" >&5
8027 cat > conftest.$ac_ext <<EOF
8028 #line 8029 "configure"
8029 #include "confdefs.h"
8030 #include <time.h>
8031 int main() {
8032 long z2 = _timezone;
8033 ; return 0; }
8035 if { (eval echo configure:8036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8036 rm -rf conftest*
8037 cat >> confdefs.h <<\EOF
8038 #define HAVE_UNDERSCORE_TIMEZONE 1
8041 echo "$ac_t""yes" 1>&6
8042 else
8043 echo "configure: failed program was:" >&5
8044 cat conftest.$ac_ext >&5
8045 rm -rf conftest*
8046 echo "$ac_t""no" 1>&6
8048 rm -f conftest*
8050 rm -f conftest*
8052 rm -f conftest*
8054 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8055 # for constant arguments. Useless!
8056 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8057 echo "configure:8058: checking for working alloca.h" >&5
8058 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8059 echo $ac_n "(cached) $ac_c" 1>&6
8060 else
8061 cat > conftest.$ac_ext <<EOF
8062 #line 8063 "configure"
8063 #include "confdefs.h"
8064 #include <alloca.h>
8065 int main() {
8066 char *p = alloca(2 * sizeof(int));
8067 ; return 0; }
8069 if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8070 rm -rf conftest*
8071 ac_cv_header_alloca_h=yes
8072 else
8073 echo "configure: failed program was:" >&5
8074 cat conftest.$ac_ext >&5
8075 rm -rf conftest*
8076 ac_cv_header_alloca_h=no
8078 rm -f conftest*
8081 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8082 if test $ac_cv_header_alloca_h = yes; then
8083 cat >> confdefs.h <<\EOF
8084 #define HAVE_ALLOCA_H 1
8089 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8090 echo "configure:8091: checking for alloca" >&5
8091 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8092 echo $ac_n "(cached) $ac_c" 1>&6
8093 else
8094 cat > conftest.$ac_ext <<EOF
8095 #line 8096 "configure"
8096 #include "confdefs.h"
8098 #ifdef __GNUC__
8099 # define alloca __builtin_alloca
8100 #else
8101 # ifdef _MSC_VER
8102 # include <malloc.h>
8103 # define alloca _alloca
8104 # else
8105 # if HAVE_ALLOCA_H
8106 # include <alloca.h>
8107 # else
8108 # ifdef _AIX
8109 #pragma alloca
8110 # else
8111 # ifndef alloca /* predefined by HP cc +Olibcalls */
8112 char *alloca ();
8113 # endif
8114 # endif
8115 # endif
8116 # endif
8117 #endif
8119 int main() {
8120 char *p = (char *) alloca(1);
8121 ; return 0; }
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8124 rm -rf conftest*
8125 ac_cv_func_alloca_works=yes
8126 else
8127 echo "configure: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8129 rm -rf conftest*
8130 ac_cv_func_alloca_works=no
8132 rm -f conftest*
8135 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8136 if test $ac_cv_func_alloca_works = yes; then
8137 cat >> confdefs.h <<\EOF
8138 #define HAVE_ALLOCA 1
8143 if test $ac_cv_func_alloca_works = no; then
8144 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8145 # that cause trouble. Some versions do not even contain alloca or
8146 # contain a buggy version. If you still want to use their alloca,
8147 # use ar to extract alloca.o from them instead of compiling alloca.c.
8148 ALLOCA=alloca.${ac_objext}
8149 cat >> confdefs.h <<\EOF
8150 #define C_ALLOCA 1
8154 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8155 echo "configure:8156: checking whether alloca needs Cray hooks" >&5
8156 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8157 echo $ac_n "(cached) $ac_c" 1>&6
8158 else
8159 cat > conftest.$ac_ext <<EOF
8160 #line 8161 "configure"
8161 #include "confdefs.h"
8162 #if defined(CRAY) && ! defined(CRAY2)
8163 webecray
8164 #else
8165 wenotbecray
8166 #endif
8169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8170 egrep "webecray" >/dev/null 2>&1; then
8171 rm -rf conftest*
8172 ac_cv_os_cray=yes
8173 else
8174 rm -rf conftest*
8175 ac_cv_os_cray=no
8177 rm -f conftest*
8181 echo "$ac_t""$ac_cv_os_cray" 1>&6
8182 if test $ac_cv_os_cray = yes; then
8183 for ac_func in _getb67 GETB67 getb67; do
8184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8185 echo "configure:8186: checking for $ac_func" >&5
8186 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8187 echo $ac_n "(cached) $ac_c" 1>&6
8188 else
8189 cat > conftest.$ac_ext <<EOF
8190 #line 8191 "configure"
8191 #include "confdefs.h"
8192 /* System header to define __stub macros and hopefully few prototypes,
8193 which can conflict with char $ac_func(); below. */
8194 #include <assert.h>
8195 /* Override any gcc2 internal prototype to avoid an error. */
8196 /* We use char because int might match the return type of a gcc2
8197 builtin and then its argument prototype would still apply. */
8198 char $ac_func();
8200 int main() {
8202 /* The GNU C library defines this for functions which it implements
8203 to always fail with ENOSYS. Some functions are actually named
8204 something starting with __ and the normal name is an alias. */
8205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8206 choke me
8207 #else
8208 $ac_func();
8209 #endif
8211 ; return 0; }
8213 if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8214 rm -rf conftest*
8215 eval "ac_cv_func_$ac_func=yes"
8216 else
8217 echo "configure: failed program was:" >&5
8218 cat conftest.$ac_ext >&5
8219 rm -rf conftest*
8220 eval "ac_cv_func_$ac_func=no"
8222 rm -f conftest*
8225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8226 echo "$ac_t""yes" 1>&6
8227 cat >> confdefs.h <<EOF
8228 #define CRAY_STACKSEG_END $ac_func
8231 break
8232 else
8233 echo "$ac_t""no" 1>&6
8236 done
8239 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8240 echo "configure:8241: checking stack direction for C alloca" >&5
8241 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8242 echo $ac_n "(cached) $ac_c" 1>&6
8243 else
8244 if test "$cross_compiling" = yes; then
8245 ac_cv_c_stack_direction=0
8246 else
8247 cat > conftest.$ac_ext <<EOF
8248 #line 8249 "configure"
8249 #include "confdefs.h"
8250 find_stack_direction ()
8252 static char *addr = 0;
8253 auto char dummy;
8254 if (addr == 0)
8256 addr = &dummy;
8257 return find_stack_direction ();
8259 else
8260 return (&dummy > addr) ? 1 : -1;
8262 main ()
8264 exit (find_stack_direction() < 0);
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8268 then
8269 ac_cv_c_stack_direction=1
8270 else
8271 echo "configure: failed program was:" >&5
8272 cat conftest.$ac_ext >&5
8273 rm -fr conftest*
8274 ac_cv_c_stack_direction=-1
8276 rm -fr conftest*
8281 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8282 cat >> confdefs.h <<EOF
8283 #define STACK_DIRECTION $ac_cv_c_stack_direction
8288 for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
8290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8292 echo "configure:8293: checking for $ac_hdr" >&5
8293 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8294 echo $ac_n "(cached) $ac_c" 1>&6
8295 else
8296 cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299 #include <$ac_hdr>
8301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8302 { (eval echo configure:8303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8304 if test -z "$ac_err"; then
8305 rm -rf conftest*
8306 eval "ac_cv_header_$ac_safe=yes"
8307 else
8308 echo "$ac_err" >&5
8309 echo "configure: failed program was:" >&5
8310 cat conftest.$ac_ext >&5
8311 rm -rf conftest*
8312 eval "ac_cv_header_$ac_safe=no"
8314 rm -f conftest*
8316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8317 echo "$ac_t""yes" 1>&6
8318 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8319 cat >> confdefs.h <<EOF
8320 #define $ac_tr_hdr 1
8323 else
8324 echo "$ac_t""no" 1>&6
8326 done
8328 for ac_func in getpagesize
8330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8331 echo "configure:8332: checking for $ac_func" >&5
8332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8333 echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335 cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 /* System header to define __stub macros and hopefully few prototypes,
8339 which can conflict with char $ac_func(); below. */
8340 #include <assert.h>
8341 /* Override any gcc2 internal prototype to avoid an error. */
8342 /* We use char because int might match the return type of a gcc2
8343 builtin and then its argument prototype would still apply. */
8344 char $ac_func();
8346 int main() {
8348 /* The GNU C library defines this for functions which it implements
8349 to always fail with ENOSYS. Some functions are actually named
8350 something starting with __ and the normal name is an alias. */
8351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8352 choke me
8353 #else
8354 $ac_func();
8355 #endif
8357 ; return 0; }
8359 if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8360 rm -rf conftest*
8361 eval "ac_cv_func_$ac_func=yes"
8362 else
8363 echo "configure: failed program was:" >&5
8364 cat conftest.$ac_ext >&5
8365 rm -rf conftest*
8366 eval "ac_cv_func_$ac_func=no"
8368 rm -f conftest*
8371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8372 echo "$ac_t""yes" 1>&6
8373 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8374 cat >> confdefs.h <<EOF
8375 #define $ac_tr_func 1
8378 else
8379 echo "$ac_t""no" 1>&6
8381 done
8383 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
8384 echo "configure:8385: checking for working mmap" >&5
8385 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
8386 echo $ac_n "(cached) $ac_c" 1>&6
8387 else
8388 if test "$cross_compiling" = yes; then
8389 ac_cv_func_mmap_fixed_mapped=no
8390 else
8391 cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8395 /* Thanks to Mike Haertel and Jim Avera for this test.
8396 Here is a matrix of mmap possibilities:
8397 mmap private not fixed
8398 mmap private fixed at somewhere currently unmapped
8399 mmap private fixed at somewhere already mapped
8400 mmap shared not fixed
8401 mmap shared fixed at somewhere currently unmapped
8402 mmap shared fixed at somewhere already mapped
8403 For private mappings, we should verify that changes cannot be read()
8404 back from the file, nor mmap's back from the file at a different
8405 address. (There have been systems where private was not correctly
8406 implemented like the infamous i386 svr4.0, and systems where the
8407 VM page cache was not coherent with the filesystem buffer cache
8408 like early versions of FreeBSD and possibly contemporary NetBSD.)
8409 For shared mappings, we should conversely verify that changes get
8410 propogated back to all the places they're supposed to be.
8412 Grep wants private fixed already mapped.
8413 The main things grep needs to know about mmap are:
8414 * does it exist and is it safe to write into the mmap'd area
8415 * how to use it (BSD variants) */
8416 #include <sys/types.h>
8417 #include <fcntl.h>
8418 #include <sys/mman.h>
8420 #if HAVE_SYS_TYPES_H
8421 # include <sys/types.h>
8422 #endif
8424 #if HAVE_STDLIB_H
8425 # include <stdlib.h>
8426 #endif
8428 #if HAVE_SYS_STAT_H
8429 # include <sys/stat.h>
8430 #endif
8432 #if HAVE_UNISTD_H
8433 # include <unistd.h>
8434 #endif
8436 /* This mess was copied from the GNU getpagesize.h. */
8437 #ifndef HAVE_GETPAGESIZE
8439 /* Assume that all systems that can run configure have sys/param.h. */
8440 # ifndef HAVE_SYS_PARAM_H
8441 # define HAVE_SYS_PARAM_H 1
8442 # endif
8444 # ifdef _SC_PAGESIZE
8445 # define getpagesize() sysconf(_SC_PAGESIZE)
8446 # else /* no _SC_PAGESIZE */
8447 # ifdef HAVE_SYS_PARAM_H
8448 # include <sys/param.h>
8449 # ifdef EXEC_PAGESIZE
8450 # define getpagesize() EXEC_PAGESIZE
8451 # else /* no EXEC_PAGESIZE */
8452 # ifdef NBPG
8453 # define getpagesize() NBPG * CLSIZE
8454 # ifndef CLSIZE
8455 # define CLSIZE 1
8456 # endif /* no CLSIZE */
8457 # else /* no NBPG */
8458 # ifdef NBPC
8459 # define getpagesize() NBPC
8460 # else /* no NBPC */
8461 # ifdef PAGESIZE
8462 # define getpagesize() PAGESIZE
8463 # endif /* PAGESIZE */
8464 # endif /* no NBPC */
8465 # endif /* no NBPG */
8466 # endif /* no EXEC_PAGESIZE */
8467 # else /* no HAVE_SYS_PARAM_H */
8468 # define getpagesize() 8192 /* punt totally */
8469 # endif /* no HAVE_SYS_PARAM_H */
8470 # endif /* no _SC_PAGESIZE */
8472 #endif /* no HAVE_GETPAGESIZE */
8474 #ifdef __cplusplus
8475 extern "C" { void *malloc(unsigned); }
8476 #else
8477 char *malloc();
8478 #endif
8481 main()
8483 char *data, *data2, *data3;
8484 int i, pagesize;
8485 int fd;
8487 pagesize = getpagesize();
8490 * First, make a file with some known garbage in it.
8492 data = malloc(pagesize);
8493 if (!data)
8494 exit(1);
8495 for (i = 0; i < pagesize; ++i)
8496 *(data + i) = rand();
8497 umask(0);
8498 fd = creat("conftestmmap", 0600);
8499 if (fd < 0)
8500 exit(1);
8501 if (write(fd, data, pagesize) != pagesize)
8502 exit(1);
8503 close(fd);
8506 * Next, try to mmap the file at a fixed address which
8507 * already has something else allocated at it. If we can,
8508 * also make sure that we see the same garbage.
8510 fd = open("conftestmmap", O_RDWR);
8511 if (fd < 0)
8512 exit(1);
8513 data2 = malloc(2 * pagesize);
8514 if (!data2)
8515 exit(1);
8516 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8517 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
8518 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8519 exit(1);
8520 for (i = 0; i < pagesize; ++i)
8521 if (*(data + i) != *(data2 + i))
8522 exit(1);
8525 * Finally, make sure that changes to the mapped area
8526 * do not percolate back to the file as seen by read().
8527 * (This is a bug on some variants of i386 svr4.0.)
8529 for (i = 0; i < pagesize; ++i)
8530 *(data2 + i) = *(data2 + i) + 1;
8531 data3 = malloc(pagesize);
8532 if (!data3)
8533 exit(1);
8534 if (read(fd, data3, pagesize) != pagesize)
8535 exit(1);
8536 for (i = 0; i < pagesize; ++i)
8537 if (*(data + i) != *(data3 + i))
8538 exit(1);
8539 close(fd);
8540 unlink("conftestmmap");
8541 exit(0);
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8546 then
8547 ac_cv_func_mmap_fixed_mapped=yes
8548 else
8549 echo "configure: failed program was:" >&5
8550 cat conftest.$ac_ext >&5
8551 rm -fr conftest*
8552 ac_cv_func_mmap_fixed_mapped=no
8554 rm -fr conftest*
8559 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
8560 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8561 cat >> confdefs.h <<\EOF
8562 #define HAVE_MMAP 1
8568 for ac_prog in perl
8570 # Extract the first word of "$ac_prog", so it can be a program name with args.
8571 set dummy $ac_prog; ac_word=$2
8572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8573 echo "configure:8574: checking for $ac_word" >&5
8574 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
8575 echo $ac_n "(cached) $ac_c" 1>&6
8576 else
8577 if test -n "$PERL"; then
8578 ac_cv_prog_PERL="$PERL" # Let the user override the test.
8579 else
8580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8581 ac_dummy="$PATH"
8582 for ac_dir in $ac_dummy; do
8583 test -z "$ac_dir" && ac_dir=.
8584 if test -f $ac_dir/$ac_word; then
8585 ac_cv_prog_PERL="$ac_prog"
8586 break
8588 done
8589 IFS="$ac_save_ifs"
8592 PERL="$ac_cv_prog_PERL"
8593 if test -n "$PERL"; then
8594 echo "$ac_t""$PERL" 1>&6
8595 else
8596 echo "$ac_t""no" 1>&6
8599 test -n "$PERL" && break
8600 done
8601 test -n "$PERL" || PERL="false"
8604 SYSDEP_SOURCES=
8606 case "${host}" in
8607 i?86-*-linux*)
8608 SIGNAL_HANDLER=include/i386-signal.h
8610 sparc*-sun-solaris*)
8611 SIGNAL_HANDLER=include/sparc-signal.h
8613 # ia64-*)
8614 # SYSDEP_SOURCES=sysdep/ia64.c
8615 # test -d sysdep || mkdir sysdep
8616 # ;;
8617 ia64-*-linux*)
8618 SIGNAL_HANDLER=include/dwarf2-signal.h
8620 powerpc-*-linux*)
8621 SIGNAL_HANDLER=include/dwarf2-signal.h
8623 alpha*-*-linux*)
8624 SIGNAL_HANDLER=include/dwarf2-signal.h
8626 s390*-*-linux*)
8627 SIGNAL_HANDLER=include/s390-signal.h
8629 x86_64*-*-linux*)
8630 SIGNAL_HANDLER=include/x86_64-signal.h
8632 sparc*-*-linux*)
8633 SIGNAL_HANDLER=include/dwarf2-signal.h
8635 sh-*-linux* | sh[34]*-*-linux*)
8636 SIGNAL_HANDLER=include/dwarf2-signal.h
8638 *mingw*)
8639 SIGNAL_HANDLER=include/win32-signal.h
8642 SIGNAL_HANDLER=include/default-signal.h
8644 esac
8646 # If we're using sjlj exceptions, forget what we just learned.
8647 if test "$enable_sjlj_exceptions" = yes; then
8648 SIGNAL_HANDLER=include/default-signal.h
8651 # Define here any compiler flags that you need in order to make backtrace() work.
8652 BACKTRACESPEC=
8653 case "${host}" in
8654 x86_64*-*-linux*)
8655 BACKTRACESPEC=-fno-omit-frame-pointer
8657 esac
8664 if test "${multilib}" = "yes"; then
8665 multilib_arg="--enable-multilib"
8666 else
8667 multilib_arg=
8672 here=`${PWDCMD-pwd}`
8675 # We get this from the environment.
8678 trap '' 1 2 15
8679 cat > confcache <<\EOF
8680 # This file is a shell script that caches the results of configure
8681 # tests run on this system so they can be shared between configure
8682 # scripts and configure runs. It is not useful on other systems.
8683 # If it contains results you don't want to keep, you may remove or edit it.
8685 # By default, configure uses ./config.cache as the cache file,
8686 # creating it if it does not exist already. You can give configure
8687 # the --cache-file=FILE option to use a different cache file; that is
8688 # what configure does when it calls configure scripts in
8689 # subdirectories, so they share the cache.
8690 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8691 # config.status only pays attention to the cache file if you give it the
8692 # --recheck option to rerun configure.
8695 # The following way of writing the cache mishandles newlines in values,
8696 # but we know of no workaround that is simple, portable, and efficient.
8697 # So, don't put newlines in cache variables' values.
8698 # Ultrix sh set writes to stderr and can't be redirected directly,
8699 # and sets the high bit in the cache file unless we assign to the vars.
8700 (set) 2>&1 |
8701 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8702 *ac_space=\ *)
8703 # `set' does not quote correctly, so add quotes (double-quote substitution
8704 # turns \\\\ into \\, and sed turns \\ into \).
8705 sed -n \
8706 -e "s/'/'\\\\''/g" \
8707 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8710 # `set' quotes correctly as required by POSIX, so do not add quotes.
8711 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8713 esac >> confcache
8714 if cmp -s $cache_file confcache; then
8716 else
8717 if test -w $cache_file; then
8718 echo "updating cache $cache_file"
8719 cat confcache > $cache_file
8720 else
8721 echo "not updating unwritable cache $cache_file"
8724 rm -f confcache
8726 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8728 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8729 # Let make expand exec_prefix.
8730 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8732 # Any assignment to VPATH causes Sun make to only execute
8733 # the first set of double-colon rules, so remove it if not needed.
8734 # If there is a colon in the path, we need to keep it.
8735 if test "x$srcdir" = x.; then
8736 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8739 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8741 DEFS=-DHAVE_CONFIG_H
8743 # Without the "./", some shells look in PATH for config.status.
8744 : ${CONFIG_STATUS=./config.status}
8746 echo creating $CONFIG_STATUS
8747 rm -f $CONFIG_STATUS
8748 cat > $CONFIG_STATUS <<EOF
8749 #! /bin/sh
8750 # Generated automatically by configure.
8751 # Run this file to recreate the current configuration.
8752 # This directory was configured as follows,
8753 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8755 # $0 $ac_configure_args
8757 # Compiler output produced by configure, useful for debugging
8758 # configure, is in ./config.log if it exists.
8760 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8761 for ac_option
8763 case "\$ac_option" in
8764 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8765 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8766 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8767 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8768 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8769 exit 0 ;;
8770 -help | --help | --hel | --he | --h)
8771 echo "\$ac_cs_usage"; exit 0 ;;
8772 *) echo "\$ac_cs_usage"; exit 1 ;;
8773 esac
8774 done
8776 ac_given_srcdir=$srcdir
8777 ac_given_INSTALL="$INSTALL"
8779 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
8781 cat >> $CONFIG_STATUS <<EOF
8783 # Protect against being on the right side of a sed subst in config.status.
8784 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8785 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8786 $ac_vpsub
8787 $extrasub
8788 s%@SHELL@%$SHELL%g
8789 s%@CFLAGS@%$CFLAGS%g
8790 s%@CPPFLAGS@%$CPPFLAGS%g
8791 s%@CXXFLAGS@%$CXXFLAGS%g
8792 s%@FFLAGS@%$FFLAGS%g
8793 s%@DEFS@%$DEFS%g
8794 s%@LDFLAGS@%$LDFLAGS%g
8795 s%@LIBS@%$LIBS%g
8796 s%@exec_prefix@%$exec_prefix%g
8797 s%@prefix@%$prefix%g
8798 s%@program_transform_name@%$program_transform_name%g
8799 s%@bindir@%$bindir%g
8800 s%@sbindir@%$sbindir%g
8801 s%@libexecdir@%$libexecdir%g
8802 s%@datadir@%$datadir%g
8803 s%@sysconfdir@%$sysconfdir%g
8804 s%@sharedstatedir@%$sharedstatedir%g
8805 s%@localstatedir@%$localstatedir%g
8806 s%@libdir@%$libdir%g
8807 s%@includedir@%$includedir%g
8808 s%@oldincludedir@%$oldincludedir%g
8809 s%@infodir@%$infodir%g
8810 s%@mandir@%$mandir%g
8811 s%@LN_S@%$LN_S%g
8812 s%@libgcj_basedir@%$libgcj_basedir%g
8813 s%@mkinstalldirs@%$mkinstalldirs%g
8814 s%@host@%$host%g
8815 s%@host_alias@%$host_alias%g
8816 s%@host_cpu@%$host_cpu%g
8817 s%@host_vendor@%$host_vendor%g
8818 s%@host_os@%$host_os%g
8819 s%@target@%$target%g
8820 s%@target_alias@%$target_alias%g
8821 s%@target_cpu@%$target_cpu%g
8822 s%@target_vendor@%$target_vendor%g
8823 s%@target_os@%$target_os%g
8824 s%@build@%$build%g
8825 s%@build_alias@%$build_alias%g
8826 s%@build_cpu@%$build_cpu%g
8827 s%@build_vendor@%$build_vendor%g
8828 s%@build_os@%$build_os%g
8829 s%@CC@%$CC%g
8830 s%@glibjava_CXX@%$glibjava_CXX%g
8831 s%@CXX@%$CXX%g
8832 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8833 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8834 s%@INSTALL_DATA@%$INSTALL_DATA%g
8835 s%@PACKAGE@%$PACKAGE%g
8836 s%@VERSION@%$VERSION%g
8837 s%@ACLOCAL@%$ACLOCAL%g
8838 s%@AUTOCONF@%$AUTOCONF%g
8839 s%@AUTOMAKE@%$AUTOMAKE%g
8840 s%@AUTOHEADER@%$AUTOHEADER%g
8841 s%@MAKEINFO@%$MAKEINFO%g
8842 s%@SET_MAKE@%$SET_MAKE%g
8843 s%@AS@%$AS%g
8844 s%@AR@%$AR%g
8845 s%@RANLIB@%$RANLIB%g
8846 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
8847 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
8848 s%@MAINT@%$MAINT%g
8849 s%@EXEEXT@%$EXEEXT%g
8850 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
8851 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
8852 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
8853 s%@INCLTDL@%$INCLTDL%g
8854 s%@LIBLTDL@%$LIBLTDL%g
8855 s%@DIRLTDL@%$DIRLTDL%g
8856 s%@OBJEXT@%$OBJEXT%g
8857 s%@STRIP@%$STRIP%g
8858 s%@LIBTOOL@%$LIBTOOL%g
8859 s%@CXXCPP@%$CXXCPP%g
8860 s%@subdirs@%$subdirs%g
8861 s%@COMPPATH@%$COMPPATH%g
8862 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
8863 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
8864 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
8865 s%@INTERPRETER@%$INTERPRETER%g
8866 s%@LIBFFI@%$LIBFFI%g
8867 s%@LIBFFIINCS@%$LIBFFIINCS%g
8868 s%@PLATFORMOBJS@%$PLATFORMOBJS%g
8869 s%@CPP@%$CPP%g
8870 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
8871 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
8872 s%@ZLIBSPEC@%$ZLIBSPEC%g
8873 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
8874 s%@X_CFLAGS@%$X_CFLAGS%g
8875 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
8876 s%@X_LIBS@%$X_LIBS%g
8877 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
8878 s%@TOOLKIT@%$TOOLKIT%g
8879 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
8880 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
8881 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
8882 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
8883 s%@GCLIBS@%$GCLIBS%g
8884 s%@GCINCS@%$GCINCS%g
8885 s%@GCDEPS@%$GCDEPS%g
8886 s%@GCOBJS@%$GCOBJS%g
8887 s%@GCSPEC@%$GCSPEC%g
8888 s%@JC1GCSPEC@%$JC1GCSPEC%g
8889 s%@GCTESTSPEC@%$GCTESTSPEC%g
8890 s%@THREADLIBS@%$THREADLIBS%g
8891 s%@THREADINCS@%$THREADINCS%g
8892 s%@THREADDEPS@%$THREADDEPS%g
8893 s%@THREADOBJS@%$THREADOBJS%g
8894 s%@THREADSPEC@%$THREADSPEC%g
8895 s%@THREADLDFLAGS@%$THREADLDFLAGS%g
8896 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
8897 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
8898 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
8899 s%@tool_include_dir@%$tool_include_dir%g
8900 s%@gcc_version@%$gcc_version%g
8901 s%@LIBICONV@%$LIBICONV%g
8902 s%@GTK_CONFIG@%$GTK_CONFIG%g
8903 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
8904 s%@GTK_LIBS@%$GTK_LIBS%g
8905 s%@GLIB_CONFIG@%$GLIB_CONFIG%g
8906 s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
8907 s%@GLIB_LIBS@%$GLIB_LIBS%g
8908 s%@LIBART_CONFIG@%$LIBART_CONFIG%g
8909 s%@LIBART_CFLAGS@%$LIBART_CFLAGS%g
8910 s%@LIBART_LIBS@%$LIBART_LIBS%g
8911 s%@GCJ@%$GCJ%g
8912 s%@GCJFLAGS@%$GCJFLAGS%g
8913 s%@ZLIBS@%$ZLIBS%g
8914 s%@SYS_ZLIBS@%$SYS_ZLIBS%g
8915 s%@ZINCS@%$ZINCS%g
8916 s%@DIVIDESPEC@%$DIVIDESPEC%g
8917 s%@CHECKREFSPEC@%$CHECKREFSPEC%g
8918 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
8919 s%@IEEESPEC@%$IEEESPEC%g
8920 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
8921 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
8922 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
8923 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
8924 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
8925 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
8926 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
8927 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
8928 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
8929 s%@toolexecdir@%$toolexecdir%g
8930 s%@toolexecmainlibdir@%$toolexecmainlibdir%g
8931 s%@toolexeclibdir@%$toolexeclibdir%g
8932 s%@GCJVERSION@%$GCJVERSION%g
8933 s%@ALLOCA@%$ALLOCA%g
8934 s%@PERL@%$PERL%g
8935 s%@BACKTRACESPEC@%$BACKTRACESPEC%g
8936 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
8937 s%@here@%$here%g
8939 CEOF
8942 cat >> $CONFIG_STATUS <<\EOF
8944 # Split the substitutions into bite-sized pieces for seds with
8945 # small command number limits, like on Digital OSF/1 and HP-UX.
8946 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8947 ac_file=1 # Number of current file.
8948 ac_beg=1 # First line for current file.
8949 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8950 ac_more_lines=:
8951 ac_sed_cmds=""
8952 while $ac_more_lines; do
8953 if test $ac_beg -gt 1; then
8954 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8955 else
8956 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8958 if test ! -s conftest.s$ac_file; then
8959 ac_more_lines=false
8960 rm -f conftest.s$ac_file
8961 else
8962 if test -z "$ac_sed_cmds"; then
8963 ac_sed_cmds="sed -f conftest.s$ac_file"
8964 else
8965 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8967 ac_file=`expr $ac_file + 1`
8968 ac_beg=$ac_end
8969 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8971 done
8972 if test -z "$ac_sed_cmds"; then
8973 ac_sed_cmds=cat
8977 cat >> $CONFIG_STATUS <<EOF
8979 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
8981 cat >> $CONFIG_STATUS <<\EOF
8982 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8983 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8984 case "$ac_file" in
8985 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8986 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8987 *) ac_file_in="${ac_file}.in" ;;
8988 esac
8990 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8992 # Remove last slash and all that follows it. Not all systems have dirname.
8993 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8994 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8995 # The file is in a subdirectory.
8996 test ! -d "$ac_dir" && mkdir "$ac_dir"
8997 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8998 # A "../" for each directory in $ac_dir_suffix.
8999 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9000 else
9001 ac_dir_suffix= ac_dots=
9004 case "$ac_given_srcdir" in
9005 .) srcdir=.
9006 if test -z "$ac_dots"; then top_srcdir=.
9007 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9008 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9009 *) # Relative path.
9010 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9011 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9012 esac
9014 case "$ac_given_INSTALL" in
9015 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9016 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9017 esac
9019 echo creating "$ac_file"
9020 rm -f "$ac_file"
9021 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9022 case "$ac_file" in
9023 *Makefile*) ac_comsub="1i\\
9024 # $configure_input" ;;
9025 *) ac_comsub= ;;
9026 esac
9028 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9029 sed -e "$ac_comsub
9030 s%@configure_input@%$configure_input%g
9031 s%@srcdir@%$srcdir%g
9032 s%@top_srcdir@%$top_srcdir%g
9033 s%@INSTALL@%$INSTALL%g
9034 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9035 fi; done
9036 rm -f conftest.s*
9038 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9039 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9041 # ac_d sets the value in "#define NAME VALUE" lines.
9042 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9043 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9044 ac_dC='\3'
9045 ac_dD='%g'
9046 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9047 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9048 ac_uB='\([ ]\)%\1#\2define\3'
9049 ac_uC=' '
9050 ac_uD='\4%g'
9051 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9052 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9053 ac_eB='$%\1#\2define\3'
9054 ac_eC=' '
9055 ac_eD='%g'
9057 if test "${CONFIG_HEADERS+set}" != set; then
9059 cat >> $CONFIG_STATUS <<EOF
9060 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
9062 cat >> $CONFIG_STATUS <<\EOF
9064 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9065 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9066 case "$ac_file" in
9067 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9068 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9069 *) ac_file_in="${ac_file}.in" ;;
9070 esac
9072 echo creating $ac_file
9074 rm -f conftest.frag conftest.in conftest.out
9075 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9076 cat $ac_file_inputs > conftest.in
9080 # Transform confdefs.h into a sed script conftest.vals that substitutes
9081 # the proper values into config.h.in to produce config.h. And first:
9082 # Protect against being on the right side of a sed subst in config.status.
9083 # Protect against being in an unquoted here document in config.status.
9084 rm -f conftest.vals
9085 cat > conftest.hdr <<\EOF
9086 s/[\\&%]/\\&/g
9087 s%[\\$`]%\\&%g
9088 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9089 s%ac_d%ac_u%gp
9090 s%ac_u%ac_e%gp
9092 sed -n -f conftest.hdr confdefs.h > conftest.vals
9093 rm -f conftest.hdr
9095 # This sed command replaces #undef with comments. This is necessary, for
9096 # example, in the case of _POSIX_SOURCE, which is predefined and required
9097 # on some systems where configure will not decide to define it.
9098 cat >> conftest.vals <<\EOF
9099 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9102 # Break up conftest.vals because some shells have a limit on
9103 # the size of here documents, and old seds have small limits too.
9105 rm -f conftest.tail
9106 while :
9108 ac_lines=`grep -c . conftest.vals`
9109 # grep -c gives empty output for an empty file on some AIX systems.
9110 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9111 # Write a limited-size here document to conftest.frag.
9112 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9113 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9114 echo 'CEOF
9115 sed -f conftest.frag conftest.in > conftest.out
9116 rm -f conftest.in
9117 mv conftest.out conftest.in
9118 ' >> $CONFIG_STATUS
9119 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9120 rm -f conftest.vals
9121 mv conftest.tail conftest.vals
9122 done
9123 rm -f conftest.vals
9125 cat >> $CONFIG_STATUS <<\EOF
9126 rm -f conftest.frag conftest.h
9127 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9128 cat conftest.in >> conftest.h
9129 rm -f conftest.in
9130 if cmp -s $ac_file conftest.h 2>/dev/null; then
9131 echo "$ac_file is unchanged"
9132 rm -f conftest.h
9133 else
9134 # Remove last slash and all that follows it. Not all systems have dirname.
9135 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9136 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9137 # The file is in a subdirectory.
9138 test ! -d "$ac_dir" && mkdir "$ac_dir"
9140 rm -f $ac_file
9141 mv conftest.h $ac_file
9143 fi; done
9147 cat >> $CONFIG_STATUS <<EOF
9148 ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc java/net/natInetAddress${PLATFORMNET}.cc java/net/natNetworkInterface${PLATFORMNET}.cc java/net/natPlainSocketImpl${PLATFORMNET}.cc java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER"
9149 ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc java/net/natInetAddress.cc java/net/natNetworkInterface.cc java/net/natPlainSocketImpl.cc java/net/natPlainDatagramSocketImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h"
9152 cat >> $CONFIG_STATUS <<\EOF
9153 srcdir=$ac_given_srcdir
9154 while test -n "$ac_sources"; do
9155 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9156 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9158 echo "linking $srcdir/$ac_source to $ac_dest"
9160 if test ! -r $srcdir/$ac_source; then
9161 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9163 rm -f $ac_dest
9165 # Make relative symlinks.
9166 # Remove last slash and all that follows it. Not all systems have dirname.
9167 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9168 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9169 # The dest file is in a subdirectory.
9170 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9171 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9172 # A "../" for each directory in $ac_dest_dir_suffix.
9173 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9174 else
9175 ac_dest_dir_suffix= ac_dots=
9178 case "$srcdir" in
9179 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9180 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9181 esac
9183 # Make a symlink if possible; otherwise try a hard link.
9184 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9185 ln $srcdir/$ac_source $ac_dest; then :
9186 else
9187 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9189 done
9191 cat >> $CONFIG_STATUS <<EOF
9193 srcdir=${srcdir}
9194 host=${host}
9195 target=${target}
9196 with_multisubdir=${with_multisubdir}
9197 ac_configure_args="${multilib_arg} ${ac_configure_args}"
9198 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9199 libgcj_basedir=${libgcj_basedir}
9200 CC="${CC}"
9201 CXX="${CXX}"
9202 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9205 cat >> $CONFIG_STATUS <<\EOF
9206 am_indx=1
9207 for am_file in include/config.h gcj/libgcj-config.h; do
9208 case " $CONFIG_HEADERS " in
9209 *" $am_file "*)
9210 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
9212 esac
9213 am_indx=`expr "$am_indx" + 1`
9214 done
9215 # Only add multilib support code if we just rebuilt top-level Makefile.
9216 case " $CONFIG_FILES " in
9217 *" Makefile "*)
9218 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
9219 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
9221 esac
9223 # Make subdirectories and `.d' files. Look in both srcdir and
9224 # builddir for the .java files.
9225 h=`${PWDCMD-pwd}`
9226 : > deps.mk
9227 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ;
9228 find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \
9229 fgrep -v testsuite | \
9230 sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \
9231 while read f; do
9232 echo "include $f" >> deps.mk
9233 test -f $f || {
9235 d=`echo $f | sed -e 's,/[^/]*$,,'`
9237 if test ! -d $d; then
9238 $libgcj_basedir/../mkinstalldirs $d
9240 echo > $f
9242 done
9244 exit 0
9246 chmod +x $CONFIG_STATUS
9247 rm -fr confdefs* $ac_clean_files
9248 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9250 if test "$no_recursion" != yes; then
9252 # Remove --cache-file and --srcdir arguments so they do not pile up.
9253 ac_sub_configure_args=
9254 ac_prev=
9255 for ac_arg in $ac_configure_args; do
9256 if test -n "$ac_prev"; then
9257 ac_prev=
9258 continue
9260 case "$ac_arg" in
9261 -cache-file | --cache-file | --cache-fil | --cache-fi \
9262 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9263 ac_prev=cache_file ;;
9264 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9265 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9267 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9268 ac_prev=srcdir ;;
9269 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9271 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9272 esac
9273 done
9275 for ac_config_dir in $DIRLTDL; do
9277 # Do not complain, so a configure script can configure whichever
9278 # parts of a large source tree are present.
9279 if test ! -d $srcdir/$ac_config_dir; then
9280 continue
9283 echo configuring in $ac_config_dir
9285 case "$srcdir" in
9286 .) ;;
9288 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9289 else
9290 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9293 esac
9295 ac_popdir=`pwd`
9296 cd $ac_config_dir
9298 # A "../" for each directory in /$ac_config_dir.
9299 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9301 case "$srcdir" in
9302 .) # No --srcdir option. We are building in place.
9303 ac_sub_srcdir=$srcdir ;;
9304 /*) # Absolute path.
9305 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9306 *) # Relative path.
9307 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9308 esac
9310 # Check for guested configure; otherwise get Cygnus style configure.
9311 if test -f $ac_sub_srcdir/configure; then
9312 ac_sub_configure=$ac_sub_srcdir/configure
9313 elif test -f $ac_sub_srcdir/configure.in; then
9314 ac_sub_configure=$ac_configure
9315 else
9316 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9317 ac_sub_configure=
9320 # The recursion is here.
9321 if test -n "$ac_sub_configure"; then
9323 # Make the cache file name correct relative to the subdirectory.
9324 case "$cache_file" in
9325 /*) ac_sub_cache_file=$cache_file ;;
9326 *) # Relative path.
9327 ac_sub_cache_file="$ac_dots$cache_file" ;;
9328 esac
9329 case "$ac_given_INSTALL" in
9330 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9331 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9332 esac
9334 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9335 # The eval makes quoting arguments work.
9336 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9337 then :
9338 else
9339 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9343 cd $ac_popdir
9344 done