2003-10-28 David S. Miller <davem@redhat.com>
[official-gcc.git] / libjava / configure
bloba749310edbe0a0da8f3130de47ab8dd9215ff330
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-multifile
46 allow compilation of several files at once"
47 ac_help="$ac_help
48 --enable-libgcj-debug enable runtime debugging code"
49 ac_help="$ac_help
50 --enable-interpreter enable interpreter"
51 ac_help="$ac_help
52 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
53 ac_help="$ac_help
54 --disable-java-net disable java.net"
55 ac_help="$ac_help
56 --without-libffi don't use libffi"
57 ac_help="$ac_help
58 --disable-jvmpi disable JVMPI support"
59 ac_help="$ac_help
60 --with-ecos enable runtime eCos target support"
61 ac_help="$ac_help
62 --with-system-zlib use installed libz"
63 ac_help="$ac_help
64 --with-x use the X Window System"
65 ac_help="$ac_help
66 --enable-java-awt list of AWT peer implementations to be built"
67 ac_help="$ac_help
68 --enable-java-gc=TYPE choose garbage collector [boehm]"
69 ac_help="$ac_help
70 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
71 ac_help="$ac_help
72 --disable-gtktest do not try to compile and run a test GTK+ program"
73 ac_help="$ac_help
74 --disable-glibtest do not try to compile and run a test GLIB program"
75 ac_help="$ac_help
76 --with-libart-prefix=PFX Prefix where LIBART is installed (optional)"
77 ac_help="$ac_help
78 --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)"
79 ac_help="$ac_help
80 --disable-libarttest Do not try to compile and run a test LIBART program"
82 # Initialize some variables set by options.
83 # The variables have the same names as the options, with
84 # dashes changed to underlines.
85 build=NONE
86 cache_file=./config.cache
87 exec_prefix=NONE
88 host=NONE
89 no_create=
90 nonopt=NONE
91 no_recursion=
92 prefix=NONE
93 program_prefix=NONE
94 program_suffix=NONE
95 program_transform_name=s,x,x,
96 silent=
97 site=
98 srcdir=
99 target=NONE
100 verbose=
101 x_includes=NONE
102 x_libraries=NONE
103 bindir='${exec_prefix}/bin'
104 sbindir='${exec_prefix}/sbin'
105 libexecdir='${exec_prefix}/libexec'
106 datadir='${prefix}/share'
107 sysconfdir='${prefix}/etc'
108 sharedstatedir='${prefix}/com'
109 localstatedir='${prefix}/var'
110 libdir='${exec_prefix}/lib'
111 includedir='${prefix}/include'
112 oldincludedir='/usr/include'
113 infodir='${prefix}/info'
114 mandir='${prefix}/man'
116 # Initialize some other variables.
117 subdirs=
118 MFLAGS= MAKEFLAGS=
119 SHELL=${CONFIG_SHELL-/bin/sh}
120 # Maximum number of lines to put in a shell here document.
121 ac_max_here_lines=12
123 ac_prev=
124 for ac_option
127 # If the previous option needs an argument, assign it.
128 if test -n "$ac_prev"; then
129 eval "$ac_prev=\$ac_option"
130 ac_prev=
131 continue
134 case "$ac_option" in
135 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
136 *) ac_optarg= ;;
137 esac
139 # Accept the important Cygnus configure options, so we can diagnose typos.
141 case "$ac_option" in
143 -bindir | --bindir | --bindi | --bind | --bin | --bi)
144 ac_prev=bindir ;;
145 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
146 bindir="$ac_optarg" ;;
148 -build | --build | --buil | --bui | --bu)
149 ac_prev=build ;;
150 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
151 build="$ac_optarg" ;;
153 -cache-file | --cache-file | --cache-fil | --cache-fi \
154 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
155 ac_prev=cache_file ;;
156 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
157 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
158 cache_file="$ac_optarg" ;;
160 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
161 ac_prev=datadir ;;
162 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
163 | --da=*)
164 datadir="$ac_optarg" ;;
166 -disable-* | --disable-*)
167 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
168 # Reject names that are not valid shell variable names.
169 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
170 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
172 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
173 eval "enable_${ac_feature}=no" ;;
175 -enable-* | --enable-*)
176 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
177 # Reject names that are not valid shell variable names.
178 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
179 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
181 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
182 case "$ac_option" in
183 *=*) ;;
184 *) ac_optarg=yes ;;
185 esac
186 eval "enable_${ac_feature}='$ac_optarg'" ;;
188 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
189 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
190 | --exec | --exe | --ex)
191 ac_prev=exec_prefix ;;
192 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
193 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
194 | --exec=* | --exe=* | --ex=*)
195 exec_prefix="$ac_optarg" ;;
197 -gas | --gas | --ga | --g)
198 # Obsolete; use --with-gas.
199 with_gas=yes ;;
201 -help | --help | --hel | --he)
202 # Omit some internal or obsolete options to make the list less imposing.
203 # This message is too long to be a string in the A/UX 3.1 sh.
204 cat << EOF
205 Usage: configure [options] [host]
206 Options: [defaults in brackets after descriptions]
207 Configuration:
208 --cache-file=FILE cache test results in FILE
209 --help print this message
210 --no-create do not create output files
211 --quiet, --silent do not print \`checking...' messages
212 --version print the version of autoconf that created configure
213 Directory and file names:
214 --prefix=PREFIX install architecture-independent files in PREFIX
215 [$ac_default_prefix]
216 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
217 [same as prefix]
218 --bindir=DIR user executables in DIR [EPREFIX/bin]
219 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
220 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
221 --datadir=DIR read-only architecture-independent data in DIR
222 [PREFIX/share]
223 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
224 --sharedstatedir=DIR modifiable architecture-independent data in DIR
225 [PREFIX/com]
226 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
227 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
228 --includedir=DIR C header files in DIR [PREFIX/include]
229 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
230 --infodir=DIR info documentation in DIR [PREFIX/info]
231 --mandir=DIR man documentation in DIR [PREFIX/man]
232 --srcdir=DIR find the sources in DIR [configure dir or ..]
233 --program-prefix=PREFIX prepend PREFIX to installed program names
234 --program-suffix=SUFFIX append SUFFIX to installed program names
235 --program-transform-name=PROGRAM
236 run sed PROGRAM on installed program names
238 cat << EOF
239 Host type:
240 --build=BUILD configure for building on BUILD [BUILD=HOST]
241 --host=HOST configure for HOST [guessed]
242 --target=TARGET configure for TARGET [TARGET=HOST]
243 Features and packages:
244 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
245 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
246 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
247 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
248 --x-includes=DIR X include files are in DIR
249 --x-libraries=DIR X library files are in DIR
251 if test -n "$ac_help"; then
252 echo "--enable and --with options recognized:$ac_help"
254 exit 0 ;;
256 -host | --host | --hos | --ho)
257 ac_prev=host ;;
258 -host=* | --host=* | --hos=* | --ho=*)
259 host="$ac_optarg" ;;
261 -includedir | --includedir | --includedi | --included | --include \
262 | --includ | --inclu | --incl | --inc)
263 ac_prev=includedir ;;
264 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
265 | --includ=* | --inclu=* | --incl=* | --inc=*)
266 includedir="$ac_optarg" ;;
268 -infodir | --infodir | --infodi | --infod | --info | --inf)
269 ac_prev=infodir ;;
270 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
271 infodir="$ac_optarg" ;;
273 -libdir | --libdir | --libdi | --libd)
274 ac_prev=libdir ;;
275 -libdir=* | --libdir=* | --libdi=* | --libd=*)
276 libdir="$ac_optarg" ;;
278 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
279 | --libexe | --libex | --libe)
280 ac_prev=libexecdir ;;
281 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
282 | --libexe=* | --libex=* | --libe=*)
283 libexecdir="$ac_optarg" ;;
285 -localstatedir | --localstatedir | --localstatedi | --localstated \
286 | --localstate | --localstat | --localsta | --localst \
287 | --locals | --local | --loca | --loc | --lo)
288 ac_prev=localstatedir ;;
289 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
290 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
291 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
292 localstatedir="$ac_optarg" ;;
294 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
295 ac_prev=mandir ;;
296 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
297 mandir="$ac_optarg" ;;
299 -nfp | --nfp | --nf)
300 # Obsolete; use --without-fp.
301 with_fp=no ;;
303 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
304 | --no-cr | --no-c)
305 no_create=yes ;;
307 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
308 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
309 no_recursion=yes ;;
311 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
312 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
313 | --oldin | --oldi | --old | --ol | --o)
314 ac_prev=oldincludedir ;;
315 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
316 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
317 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
318 oldincludedir="$ac_optarg" ;;
320 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
321 ac_prev=prefix ;;
322 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
323 prefix="$ac_optarg" ;;
325 -program-prefix | --program-prefix | --program-prefi | --program-pref \
326 | --program-pre | --program-pr | --program-p)
327 ac_prev=program_prefix ;;
328 -program-prefix=* | --program-prefix=* | --program-prefi=* \
329 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
330 program_prefix="$ac_optarg" ;;
332 -program-suffix | --program-suffix | --program-suffi | --program-suff \
333 | --program-suf | --program-su | --program-s)
334 ac_prev=program_suffix ;;
335 -program-suffix=* | --program-suffix=* | --program-suffi=* \
336 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
337 program_suffix="$ac_optarg" ;;
339 -program-transform-name | --program-transform-name \
340 | --program-transform-nam | --program-transform-na \
341 | --program-transform-n | --program-transform- \
342 | --program-transform | --program-transfor \
343 | --program-transfo | --program-transf \
344 | --program-trans | --program-tran \
345 | --progr-tra | --program-tr | --program-t)
346 ac_prev=program_transform_name ;;
347 -program-transform-name=* | --program-transform-name=* \
348 | --program-transform-nam=* | --program-transform-na=* \
349 | --program-transform-n=* | --program-transform-=* \
350 | --program-transform=* | --program-transfor=* \
351 | --program-transfo=* | --program-transf=* \
352 | --program-trans=* | --program-tran=* \
353 | --progr-tra=* | --program-tr=* | --program-t=*)
354 program_transform_name="$ac_optarg" ;;
356 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
357 | -silent | --silent | --silen | --sile | --sil)
358 silent=yes ;;
360 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
361 ac_prev=sbindir ;;
362 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
363 | --sbi=* | --sb=*)
364 sbindir="$ac_optarg" ;;
366 -sharedstatedir | --sharedstatedir | --sharedstatedi \
367 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
368 | --sharedst | --shareds | --shared | --share | --shar \
369 | --sha | --sh)
370 ac_prev=sharedstatedir ;;
371 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
372 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
373 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
374 | --sha=* | --sh=*)
375 sharedstatedir="$ac_optarg" ;;
377 -site | --site | --sit)
378 ac_prev=site ;;
379 -site=* | --site=* | --sit=*)
380 site="$ac_optarg" ;;
382 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
383 ac_prev=srcdir ;;
384 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
385 srcdir="$ac_optarg" ;;
387 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
388 | --syscon | --sysco | --sysc | --sys | --sy)
389 ac_prev=sysconfdir ;;
390 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
391 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
392 sysconfdir="$ac_optarg" ;;
394 -target | --target | --targe | --targ | --tar | --ta | --t)
395 ac_prev=target ;;
396 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
397 target="$ac_optarg" ;;
399 -v | -verbose | --verbose | --verbos | --verbo | --verb)
400 verbose=yes ;;
402 -version | --version | --versio | --versi | --vers)
403 echo "configure generated by autoconf version 2.13"
404 exit 0 ;;
406 -with-* | --with-*)
407 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
408 # Reject names that are not valid shell variable names.
409 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
410 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
412 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 case "$ac_option" in
414 *=*) ;;
415 *) ac_optarg=yes ;;
416 esac
417 eval "with_${ac_package}='$ac_optarg'" ;;
419 -without-* | --without-*)
420 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
421 # Reject names that are not valid shell variable names.
422 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
423 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425 ac_package=`echo $ac_package| sed 's/-/_/g'`
426 eval "with_${ac_package}=no" ;;
428 --x)
429 # Obsolete; use --with-x.
430 with_x=yes ;;
432 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
433 | --x-incl | --x-inc | --x-in | --x-i)
434 ac_prev=x_includes ;;
435 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
436 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
437 x_includes="$ac_optarg" ;;
439 -x-libraries | --x-libraries | --x-librarie | --x-librari \
440 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
441 ac_prev=x_libraries ;;
442 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
443 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
444 x_libraries="$ac_optarg" ;;
446 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
450 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
451 echo "configure: warning: $ac_option: invalid host type" 1>&2
453 if test "x$nonopt" != xNONE; then
454 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
456 nonopt="$ac_option"
459 esac
460 done
462 if test -n "$ac_prev"; then
463 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
466 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
468 # File descriptor usage:
469 # 0 standard input
470 # 1 file creation
471 # 2 errors and warnings
472 # 3 some systems may open it to /dev/tty
473 # 4 used on the Kubota Titan
474 # 6 checking for... messages and results
475 # 5 compiler messages saved in config.log
476 if test "$silent" = yes; then
477 exec 6>/dev/null
478 else
479 exec 6>&1
481 exec 5>./config.log
483 echo "\
484 This file contains any messages produced by compilers while
485 running configure, to aid debugging if configure makes a mistake.
486 " 1>&5
488 # Strip out --no-create and --no-recursion so they do not pile up.
489 # Also quote any args containing shell metacharacters.
490 ac_configure_args=
491 for ac_arg
493 case "$ac_arg" in
494 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
495 | --no-cr | --no-c) ;;
496 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
497 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
498 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
499 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
500 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
501 esac
502 done
504 # NLS nuisances.
505 # Only set these to C if already set. These must not be set unconditionally
506 # because not all systems understand e.g. LANG=C (notably SCO).
507 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
508 # Non-C LC_CTYPE values break the ctype check.
509 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
510 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
511 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
512 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
514 # confdefs.h avoids OS command line length limits that DEFS can exceed.
515 rm -rf conftest* confdefs.h
516 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
517 echo > confdefs.h
519 # A filename unique to this package, relative to the directory that
520 # configure is in, which we can look for to find out if srcdir is correct.
521 ac_unique_file=java/lang/System.java
523 # Find the source files, if location was not specified.
524 if test -z "$srcdir"; then
525 ac_srcdir_defaulted=yes
526 # Try the directory containing this script, then its parent.
527 ac_prog=$0
528 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
529 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
530 srcdir=$ac_confdir
531 if test ! -r $srcdir/$ac_unique_file; then
532 srcdir=..
534 else
535 ac_srcdir_defaulted=no
537 if test ! -r $srcdir/$ac_unique_file; then
538 if test "$ac_srcdir_defaulted" = yes; then
539 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
540 else
541 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
544 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
546 # Prefer explicitly selected file to automatically selected ones.
547 if test -z "$CONFIG_SITE"; then
548 if test "x$prefix" != xNONE; then
549 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
550 else
551 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
554 for ac_site_file in $CONFIG_SITE; do
555 if test -r "$ac_site_file"; then
556 echo "loading site script $ac_site_file"
557 . "$ac_site_file"
559 done
561 if test -r "$cache_file"; then
562 echo "loading cache $cache_file"
563 . $cache_file
564 else
565 echo "creating cache $cache_file"
566 > $cache_file
569 ac_ext=c
570 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
571 ac_cpp='$CPP $CPPFLAGS'
572 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
573 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
574 cross_compiling=$ac_cv_prog_cc_cross
576 ac_exeext=
577 ac_objext=o
578 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
579 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
580 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
581 ac_n= ac_c='
582 ' ac_t=' '
583 else
584 ac_n=-n ac_c= ac_t=
586 else
587 ac_n= ac_c='\c' ac_t=
592 # This works around the fact that libtool configuration may change LD
593 # for this particular configuration, but some shells, instead of
594 # keeping the changes in LD private, export them just because LD is
595 # exported.
596 ORIGINAL_LD_FOR_MULTILIBS=$LD
598 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
599 echo "configure:600: checking whether ln -s works" >&5
600 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
601 echo $ac_n "(cached) $ac_c" 1>&6
602 else
603 rm -f conftestdata
604 if ln -s X conftestdata 2>/dev/null
605 then
606 rm -f conftestdata
607 ac_cv_prog_LN_S="ln -s"
608 else
609 ac_cv_prog_LN_S=ln
612 LN_S="$ac_cv_prog_LN_S"
613 if test "$ac_cv_prog_LN_S" = "ln -s"; then
614 echo "$ac_t""yes" 1>&6
615 else
616 echo "$ac_t""no" 1>&6
620 # Check whether --with-target-subdir or --without-target-subdir was given.
621 if test "${with_target_subdir+set}" = set; then
622 withval="$with_target_subdir"
626 # Check whether --with-cross-host or --without-cross-host was given.
627 if test "${with_cross_host+set}" = set; then
628 withval="$with_cross_host"
633 # Check whether --with-newlib or --without-newlib was given.
634 if test "${with_newlib+set}" = set; then
635 withval="$with_newlib"
640 # Find a good install program. We prefer a C program (faster),
641 # so one script is as good as another. But avoid the broken or
642 # incompatible versions:
643 # SysV /etc/install, /usr/sbin/install
644 # SunOS /usr/etc/install
645 # IRIX /sbin/install
646 # AIX /bin/install
647 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
648 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
649 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
650 # ./install, which can be erroneously created by make from ./install.sh.
651 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
652 echo "configure:653: checking for a BSD compatible install" >&5
653 if test -z "$INSTALL"; then
654 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
655 echo $ac_n "(cached) $ac_c" 1>&6
656 else
657 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
658 for ac_dir in $PATH; do
659 # Account for people who put trailing slashes in PATH elements.
660 case "$ac_dir/" in
661 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
663 # OSF1 and SCO ODT 3.0 have their own names for install.
664 # Don't use installbsd from OSF since it installs stuff as root
665 # by default.
666 for ac_prog in ginstall scoinst install; do
667 if test -f $ac_dir/$ac_prog; then
668 if test $ac_prog = install &&
669 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
670 # AIX install. It has an incompatible calling convention.
672 else
673 ac_cv_path_install="$ac_dir/$ac_prog -c"
674 break 2
677 done
679 esac
680 done
681 IFS="$ac_save_IFS"
684 if test "${ac_cv_path_install+set}" = set; then
685 INSTALL="$ac_cv_path_install"
686 else
687 # As a last resort, use the slow shell script. We don't cache a
688 # path for INSTALL within a source directory, because that will
689 # break other packages using the cache if that directory is
690 # removed, or if the path is relative.
691 INSTALL="$ac_install_sh"
694 echo "$ac_t""$INSTALL" 1>&6
696 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
697 # It thinks the first close brace ends the variable substitution.
698 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
700 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
702 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
704 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
705 echo "configure:706: checking whether build environment is sane" >&5
706 # Just in case
707 sleep 1
708 echo timestamp > conftestfile
709 # Do `set' in a subshell so we don't clobber the current shell's
710 # arguments. Must try -L first in case configure is actually a
711 # symlink; some systems play weird games with the mod time of symlinks
712 # (eg FreeBSD returns the mod time of the symlink's containing
713 # directory).
714 if (
715 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
716 if test "$*" = "X"; then
717 # -L didn't work.
718 set X `ls -t $srcdir/configure conftestfile`
720 if test "$*" != "X $srcdir/configure conftestfile" \
721 && test "$*" != "X conftestfile $srcdir/configure"; then
723 # If neither matched, then we have a broken ls. This can happen
724 # if, for instance, CONFIG_SHELL is bash and it inherits a
725 # broken ls alias from the environment. This has actually
726 # happened. Such a system could not be considered "sane".
727 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
728 alias in your environment" 1>&2; exit 1; }
731 test "$2" = conftestfile
733 then
734 # Ok.
736 else
737 { echo "configure: error: newly created file is older than distributed files!
738 Check your system clock" 1>&2; exit 1; }
740 rm -f conftest*
741 echo "$ac_t""yes" 1>&6
742 if test "$program_transform_name" = s,x,x,; then
743 program_transform_name=
744 else
745 # Double any \ or $. echo might interpret backslashes.
746 cat <<\EOF_SED > conftestsed
747 s,\\,\\\\,g; s,\$,$$,g
748 EOF_SED
749 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
750 rm -f conftestsed
752 test "$program_prefix" != NONE &&
753 program_transform_name="s,^,${program_prefix},; $program_transform_name"
754 # Use a double $ so make ignores it.
755 test "$program_suffix" != NONE &&
756 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
758 # sed with no file args requires a program.
759 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
761 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
762 echo "configure:763: checking whether ${MAKE-make} sets \${MAKE}" >&5
763 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
764 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766 else
767 cat > conftestmake <<\EOF
768 all:
769 @echo 'ac_maketemp="${MAKE}"'
771 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
772 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
773 if test -n "$ac_maketemp"; then
774 eval ac_cv_prog_make_${ac_make}_set=yes
775 else
776 eval ac_cv_prog_make_${ac_make}_set=no
778 rm -f conftestmake
780 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
781 echo "$ac_t""yes" 1>&6
782 SET_MAKE=
783 else
784 echo "$ac_t""no" 1>&6
785 SET_MAKE="MAKE=${MAKE-make}"
788 if test $host != $build; then
789 ac_tool_prefix=${host_alias}-
790 else
791 ac_tool_prefix=
794 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
795 echo "configure:796: checking for Cygwin environment" >&5
796 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
797 echo $ac_n "(cached) $ac_c" 1>&6
798 else
799 cat > conftest.$ac_ext <<EOF
800 #line 801 "configure"
801 #include "confdefs.h"
803 int main() {
805 #ifndef __CYGWIN__
806 #define __CYGWIN__ __CYGWIN32__
807 #endif
808 return __CYGWIN__;
809 ; return 0; }
811 if { (eval echo configure:812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
812 rm -rf conftest*
813 ac_cv_cygwin=yes
814 else
815 echo "configure: failed program was:" >&5
816 cat conftest.$ac_ext >&5
817 rm -rf conftest*
818 ac_cv_cygwin=no
820 rm -f conftest*
821 rm -f conftest*
824 echo "$ac_t""$ac_cv_cygwin" 1>&6
825 CYGWIN=
826 test "$ac_cv_cygwin" = yes && CYGWIN=yes
827 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
828 echo "configure:829: checking for mingw32 environment" >&5
829 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
830 echo $ac_n "(cached) $ac_c" 1>&6
831 else
832 cat > conftest.$ac_ext <<EOF
833 #line 834 "configure"
834 #include "confdefs.h"
836 int main() {
837 return __MINGW32__;
838 ; return 0; }
840 if { (eval echo configure:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
841 rm -rf conftest*
842 ac_cv_mingw32=yes
843 else
844 echo "configure: failed program was:" >&5
845 cat conftest.$ac_ext >&5
846 rm -rf conftest*
847 ac_cv_mingw32=no
849 rm -f conftest*
850 rm -f conftest*
853 echo "$ac_t""$ac_cv_mingw32" 1>&6
854 MINGW32=
855 test "$ac_cv_mingw32" = yes && MINGW32=yes
857 # Check whether --enable-multilib or --disable-multilib was given.
858 if test "${enable_multilib+set}" = set; then
859 enableval="$enable_multilib"
860 case "${enableval}" in
861 yes) multilib=yes ;;
862 no) multilib=no ;;
863 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
864 esac
865 else
866 multilib=yes
870 # When building with srcdir == objdir, links to the source files will
871 # be created in directories within the target_subdir. We have to
872 # adjust toplevel_srcdir accordingly, so that configure finds
873 # install-sh and other auxiliary files that live in the top-level
874 # source directory.
875 if test "${srcdir}" = "."; then
876 if test -z "${with_target_subdir}"; then
877 toprel=".."
878 else
879 if test "${with_target_subdir}" != "."; then
880 toprel="${with_multisrctop}../.."
881 else
882 toprel="${with_multisrctop}.."
885 else
886 toprel=".."
889 libgcj_basedir=$srcdir/$toprel/./libjava
892 ac_aux_dir=
893 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
894 if test -f $ac_dir/install-sh; then
895 ac_aux_dir=$ac_dir
896 ac_install_sh="$ac_aux_dir/install-sh -c"
897 break
898 elif test -f $ac_dir/install.sh; then
899 ac_aux_dir=$ac_dir
900 ac_install_sh="$ac_aux_dir/install.sh -c"
901 break
903 done
904 if test -z "$ac_aux_dir"; then
905 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
907 ac_config_guess=$ac_aux_dir/config.guess
908 ac_config_sub=$ac_aux_dir/config.sub
909 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
911 if :; then :; else
912 # This overrides the previous occurrence for automake, but not for
913 # autoconf, which is exactly what we want.
914 ac_aux_dir=
915 for ac_dir in .. $srcdir/..; do
916 if test -f $ac_dir/install-sh; then
917 ac_aux_dir=$ac_dir
918 ac_install_sh="$ac_aux_dir/install-sh -c"
919 break
920 elif test -f $ac_dir/install.sh; then
921 ac_aux_dir=$ac_dir
922 ac_install_sh="$ac_aux_dir/install.sh -c"
923 break
925 done
926 if test -z "$ac_aux_dir"; then
927 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
929 ac_config_guess=$ac_aux_dir/config.guess
930 ac_config_sub=$ac_aux_dir/config.sub
931 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
935 # This works around an automake problem.
936 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
940 # Do some error checking and defaulting for the host and target type.
941 # The inputs are:
942 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
944 # The rules are:
945 # 1. You are not allowed to specify --host, --target, and nonopt at the
946 # same time.
947 # 2. Host defaults to nonopt.
948 # 3. If nonopt is not specified, then host defaults to the current host,
949 # as determined by config.guess.
950 # 4. Target and build default to nonopt.
951 # 5. If nonopt is not specified, then target and build default to host.
953 # The aliases save the names the user supplied, while $host etc.
954 # will get canonicalized.
955 case $host---$target---$nonopt in
956 NONE---*---* | *---NONE---* | *---*---NONE) ;;
957 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
958 esac
961 # Make sure we can run config.sub.
962 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
963 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
966 echo $ac_n "checking host system type""... $ac_c" 1>&6
967 echo "configure:968: checking host system type" >&5
969 host_alias=$host
970 case "$host_alias" in
971 NONE)
972 case $nonopt in
973 NONE)
974 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
975 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
976 fi ;;
977 *) host_alias=$nonopt ;;
978 esac ;;
979 esac
981 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
982 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
983 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
984 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
985 echo "$ac_t""$host" 1>&6
987 echo $ac_n "checking target system type""... $ac_c" 1>&6
988 echo "configure:989: checking target system type" >&5
990 target_alias=$target
991 case "$target_alias" in
992 NONE)
993 case $nonopt in
994 NONE) target_alias=$host_alias ;;
995 *) target_alias=$nonopt ;;
996 esac ;;
997 esac
999 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1000 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1001 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1002 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1003 echo "$ac_t""$target" 1>&6
1005 echo $ac_n "checking build system type""... $ac_c" 1>&6
1006 echo "configure:1007: checking build system type" >&5
1008 build_alias=$build
1009 case "$build_alias" in
1010 NONE)
1011 case $nonopt in
1012 NONE) build_alias=$host_alias ;;
1013 *) build_alias=$nonopt ;;
1014 esac ;;
1015 esac
1017 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1018 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1019 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1020 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1021 echo "$ac_t""$build" 1>&6
1023 test "$host_alias" != "$target_alias" &&
1024 test "$program_prefix$program_suffix$program_transform_name" = \
1025 NONENONEs,x,x, &&
1026 program_prefix=${target_alias}-
1032 # Extract the first word of "gcc", so it can be a program name with args.
1033 set dummy gcc; ac_word=$2
1034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1035 echo "configure:1036: checking for $ac_word" >&5
1036 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1037 echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039 if test -n "$CC"; then
1040 ac_cv_prog_CC="$CC" # Let the user override the test.
1041 else
1042 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1043 ac_dummy="$PATH"
1044 for ac_dir in $ac_dummy; do
1045 test -z "$ac_dir" && ac_dir=.
1046 if test -f $ac_dir/$ac_word; then
1047 ac_cv_prog_CC="gcc"
1048 break
1050 done
1051 IFS="$ac_save_ifs"
1054 CC="$ac_cv_prog_CC"
1055 if test -n "$CC"; then
1056 echo "$ac_t""$CC" 1>&6
1057 else
1058 echo "$ac_t""no" 1>&6
1061 if test -z "$CC"; then
1062 # Extract the first word of "cc", so it can be a program name with args.
1063 set dummy cc; ac_word=$2
1064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1065 echo "configure:1066: checking for $ac_word" >&5
1066 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1067 echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069 if test -n "$CC"; then
1070 ac_cv_prog_CC="$CC" # Let the user override the test.
1071 else
1072 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1073 ac_prog_rejected=no
1074 ac_dummy="$PATH"
1075 for ac_dir in $ac_dummy; do
1076 test -z "$ac_dir" && ac_dir=.
1077 if test -f $ac_dir/$ac_word; then
1078 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1079 ac_prog_rejected=yes
1080 continue
1082 ac_cv_prog_CC="cc"
1083 break
1085 done
1086 IFS="$ac_save_ifs"
1087 if test $ac_prog_rejected = yes; then
1088 # We found a bogon in the path, so make sure we never use it.
1089 set dummy $ac_cv_prog_CC
1090 shift
1091 if test $# -gt 0; then
1092 # We chose a different compiler from the bogus one.
1093 # However, it has the same basename, so the bogon will be chosen
1094 # first if we set CC to just the basename; use the full file name.
1095 shift
1096 set dummy "$ac_dir/$ac_word" "$@"
1097 shift
1098 ac_cv_prog_CC="$@"
1103 CC="$ac_cv_prog_CC"
1104 if test -n "$CC"; then
1105 echo "$ac_t""$CC" 1>&6
1106 else
1107 echo "$ac_t""no" 1>&6
1110 if test -z "$CC"; then
1111 case "`uname -s`" in
1112 *win32* | *WIN32*)
1113 # Extract the first word of "cl", so it can be a program name with args.
1114 set dummy cl; ac_word=$2
1115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1116 echo "configure:1117: checking for $ac_word" >&5
1117 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1118 echo $ac_n "(cached) $ac_c" 1>&6
1119 else
1120 if test -n "$CC"; then
1121 ac_cv_prog_CC="$CC" # Let the user override the test.
1122 else
1123 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1124 ac_dummy="$PATH"
1125 for ac_dir in $ac_dummy; do
1126 test -z "$ac_dir" && ac_dir=.
1127 if test -f $ac_dir/$ac_word; then
1128 ac_cv_prog_CC="cl"
1129 break
1131 done
1132 IFS="$ac_save_ifs"
1135 CC="$ac_cv_prog_CC"
1136 if test -n "$CC"; then
1137 echo "$ac_t""$CC" 1>&6
1138 else
1139 echo "$ac_t""no" 1>&6
1142 esac
1144 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1148 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1149 echo "configure:1150: checking whether we are using GNU C" >&5
1150 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1151 echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153 cat > conftest.c <<EOF
1154 #ifdef __GNUC__
1155 yes;
1156 #endif
1158 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1159 ac_cv_prog_gcc=yes
1160 else
1161 ac_cv_prog_gcc=no
1165 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1167 if test $ac_cv_prog_gcc = yes; then
1168 GCC=yes
1169 else
1170 GCC=
1173 ac_test_CFLAGS="${CFLAGS+set}"
1174 ac_save_CFLAGS="$CFLAGS"
1175 CFLAGS=
1176 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1177 echo "configure:1178: checking whether ${CC-cc} accepts -g" >&5
1178 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180 else
1181 echo 'void f(){}' > conftest.c
1182 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1183 ac_cv_prog_cc_g=yes
1184 else
1185 ac_cv_prog_cc_g=no
1187 rm -f conftest*
1191 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1192 if test "$ac_test_CFLAGS" = set; then
1193 CFLAGS="$ac_save_CFLAGS"
1194 elif test $ac_cv_prog_cc_g = yes; then
1195 if test "$GCC" = yes; then
1196 CFLAGS="-g -O2"
1197 else
1198 CFLAGS="-g"
1200 else
1201 if test "$GCC" = yes; then
1202 CFLAGS="-O2"
1203 else
1204 CFLAGS=
1209 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
1210 # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
1211 # different definition of CXX than other directories, since we don't
1212 # depend on libstdc++-v3 having already been built.
1216 # Use glibjava_CXX so that we do not cause CXX to be cached with the
1217 # flags that come in CXX while configuring libjava. They're different
1218 # from those used for all other target libraries. If CXX is set in
1219 # the environment, respect that here.
1220 glibjava_CXX=$CXX
1221 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1223 # Extract the first word of "$ac_prog", so it can be a program name with args.
1224 set dummy $ac_prog; ac_word=$2
1225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1226 echo "configure:1227: checking for $ac_word" >&5
1227 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
1228 echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230 if test -n "$glibjava_CXX"; then
1231 ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test.
1232 else
1233 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1234 ac_dummy="$PATH"
1235 for ac_dir in $ac_dummy; do
1236 test -z "$ac_dir" && ac_dir=.
1237 if test -f $ac_dir/$ac_word; then
1238 ac_cv_prog_glibjava_CXX="$ac_prog"
1239 break
1241 done
1242 IFS="$ac_save_ifs"
1245 glibjava_CXX="$ac_cv_prog_glibjava_CXX"
1246 if test -n "$glibjava_CXX"; then
1247 echo "$ac_t""$glibjava_CXX" 1>&6
1248 else
1249 echo "$ac_t""no" 1>&6
1252 test -n "$glibjava_CXX" && break
1253 done
1254 test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1257 CXX=$glibjava_CXX
1258 test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1260 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1261 echo "configure:1262: checking whether we are using GNU C++" >&5
1262 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265 cat > conftest.C <<EOF
1266 #ifdef __GNUC__
1267 yes;
1268 #endif
1270 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1271 ac_cv_prog_gxx=yes
1272 else
1273 ac_cv_prog_gxx=no
1277 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1279 if test $ac_cv_prog_gxx = yes; then
1280 GXX=yes
1281 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1282 ac_save_CXXFLAGS="$CXXFLAGS"
1283 CXXFLAGS=
1284 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1285 echo "configure:1286: checking whether ${CXX-g++} accepts -g" >&5
1286 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1287 echo $ac_n "(cached) $ac_c" 1>&6
1288 else
1289 echo 'void f(){}' > conftest.cc
1290 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1291 ac_cv_prog_cxx_g=yes
1292 else
1293 ac_cv_prog_cxx_g=no
1295 rm -f conftest*
1299 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1300 if test "$ac_test_CXXFLAGS" = set; then
1301 CXXFLAGS="$ac_save_CXXFLAGS"
1302 elif test $ac_cv_prog_cxx_g = yes; then
1303 CXXFLAGS="-g -O2"
1304 else
1305 CXXFLAGS="-O2"
1307 else
1308 GXX=
1309 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1313 version=0.0.7
1315 PACKAGE=libjava
1317 VERSION=$version
1319 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1320 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1322 cat >> confdefs.h <<EOF
1323 #define PACKAGE "$PACKAGE"
1326 cat >> confdefs.h <<EOF
1327 #define VERSION "$VERSION"
1332 missing_dir=`cd $ac_aux_dir && pwd`
1333 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1334 echo "configure:1335: checking for working aclocal" >&5
1335 # Run test in a subshell; some versions of sh will print an error if
1336 # an executable is not found, even if stderr is redirected.
1337 # Redirect stdin to placate older versions of autoconf. Sigh.
1338 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1339 ACLOCAL=aclocal
1340 echo "$ac_t""found" 1>&6
1341 else
1342 ACLOCAL="$missing_dir/missing aclocal"
1343 echo "$ac_t""missing" 1>&6
1346 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1347 echo "configure:1348: checking for working autoconf" >&5
1348 # Run test in a subshell; some versions of sh will print an error if
1349 # an executable is not found, even if stderr is redirected.
1350 # Redirect stdin to placate older versions of autoconf. Sigh.
1351 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1352 AUTOCONF=autoconf
1353 echo "$ac_t""found" 1>&6
1354 else
1355 AUTOCONF="$missing_dir/missing autoconf"
1356 echo "$ac_t""missing" 1>&6
1359 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1360 echo "configure:1361: checking for working automake" >&5
1361 # Run test in a subshell; some versions of sh will print an error if
1362 # an executable is not found, even if stderr is redirected.
1363 # Redirect stdin to placate older versions of autoconf. Sigh.
1364 if (automake --version) < /dev/null > /dev/null 2>&1; then
1365 AUTOMAKE=automake
1366 echo "$ac_t""found" 1>&6
1367 else
1368 AUTOMAKE="$missing_dir/missing automake"
1369 echo "$ac_t""missing" 1>&6
1372 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1373 echo "configure:1374: checking for working autoheader" >&5
1374 # Run test in a subshell; some versions of sh will print an error if
1375 # an executable is not found, even if stderr is redirected.
1376 # Redirect stdin to placate older versions of autoconf. Sigh.
1377 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1378 AUTOHEADER=autoheader
1379 echo "$ac_t""found" 1>&6
1380 else
1381 AUTOHEADER="$missing_dir/missing autoheader"
1382 echo "$ac_t""missing" 1>&6
1385 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1386 echo "configure:1387: checking for working makeinfo" >&5
1387 # Run test in a subshell; some versions of sh will print an error if
1388 # an executable is not found, even if stderr is redirected.
1389 # Redirect stdin to placate older versions of autoconf. Sigh.
1390 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1391 MAKEINFO=makeinfo
1392 echo "$ac_t""found" 1>&6
1393 else
1394 MAKEINFO="$missing_dir/missing makeinfo"
1395 echo "$ac_t""missing" 1>&6
1400 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1401 set dummy ${ac_tool_prefix}as; ac_word=$2
1402 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1403 echo "configure:1404: checking for $ac_word" >&5
1404 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1405 echo $ac_n "(cached) $ac_c" 1>&6
1406 else
1407 if test -n "$AS"; then
1408 ac_cv_prog_AS="$AS" # Let the user override the test.
1409 else
1410 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1411 ac_dummy="$PATH"
1412 for ac_dir in $ac_dummy; do
1413 test -z "$ac_dir" && ac_dir=.
1414 if test -f $ac_dir/$ac_word; then
1415 ac_cv_prog_AS="${ac_tool_prefix}as"
1416 break
1418 done
1419 IFS="$ac_save_ifs"
1420 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1423 AS="$ac_cv_prog_AS"
1424 if test -n "$AS"; then
1425 echo "$ac_t""$AS" 1>&6
1426 else
1427 echo "$ac_t""no" 1>&6
1432 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1433 set dummy ${ac_tool_prefix}ar; ac_word=$2
1434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1435 echo "configure:1436: checking for $ac_word" >&5
1436 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1437 echo $ac_n "(cached) $ac_c" 1>&6
1438 else
1439 if test -n "$AR"; then
1440 ac_cv_prog_AR="$AR" # Let the user override the test.
1441 else
1442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445 test -z "$ac_dir" && ac_dir=.
1446 if test -f $ac_dir/$ac_word; then
1447 ac_cv_prog_AR="${ac_tool_prefix}ar"
1448 break
1450 done
1451 IFS="$ac_save_ifs"
1452 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1455 AR="$ac_cv_prog_AR"
1456 if test -n "$AR"; then
1457 echo "$ac_t""$AR" 1>&6
1458 else
1459 echo "$ac_t""no" 1>&6
1464 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1465 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1467 echo "configure:1468: checking for $ac_word" >&5
1468 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1469 echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471 if test -n "$RANLIB"; then
1472 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1473 else
1474 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1475 ac_dummy="$PATH"
1476 for ac_dir in $ac_dummy; do
1477 test -z "$ac_dir" && ac_dir=.
1478 if test -f $ac_dir/$ac_word; then
1479 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1480 break
1482 done
1483 IFS="$ac_save_ifs"
1486 RANLIB="$ac_cv_prog_RANLIB"
1487 if test -n "$RANLIB"; then
1488 echo "$ac_t""$RANLIB" 1>&6
1489 else
1490 echo "$ac_t""no" 1>&6
1494 if test -z "$ac_cv_prog_RANLIB"; then
1495 if test -n "$ac_tool_prefix"; then
1496 # Extract the first word of "ranlib", so it can be a program name with args.
1497 set dummy ranlib; ac_word=$2
1498 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1499 echo "configure:1500: checking for $ac_word" >&5
1500 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1501 echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503 if test -n "$RANLIB"; then
1504 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1505 else
1506 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1507 ac_dummy="$PATH"
1508 for ac_dir in $ac_dummy; do
1509 test -z "$ac_dir" && ac_dir=.
1510 if test -f $ac_dir/$ac_word; then
1511 ac_cv_prog_RANLIB="ranlib"
1512 break
1514 done
1515 IFS="$ac_save_ifs"
1516 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1519 RANLIB="$ac_cv_prog_RANLIB"
1520 if test -n "$RANLIB"; then
1521 echo "$ac_t""$RANLIB" 1>&6
1522 else
1523 echo "$ac_t""no" 1>&6
1526 else
1527 RANLIB=":"
1532 # Find a good install program. We prefer a C program (faster),
1533 # so one script is as good as another. But avoid the broken or
1534 # incompatible versions:
1535 # SysV /etc/install, /usr/sbin/install
1536 # SunOS /usr/etc/install
1537 # IRIX /sbin/install
1538 # AIX /bin/install
1539 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1540 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1541 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1542 # ./install, which can be erroneously created by make from ./install.sh.
1543 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1544 echo "configure:1545: checking for a BSD compatible install" >&5
1545 if test -z "$INSTALL"; then
1546 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548 else
1549 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1550 for ac_dir in $PATH; do
1551 # Account for people who put trailing slashes in PATH elements.
1552 case "$ac_dir/" in
1553 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1555 # OSF1 and SCO ODT 3.0 have their own names for install.
1556 # Don't use installbsd from OSF since it installs stuff as root
1557 # by default.
1558 for ac_prog in ginstall scoinst install; do
1559 if test -f $ac_dir/$ac_prog; then
1560 if test $ac_prog = install &&
1561 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1562 # AIX install. It has an incompatible calling convention.
1564 else
1565 ac_cv_path_install="$ac_dir/$ac_prog -c"
1566 break 2
1569 done
1571 esac
1572 done
1573 IFS="$ac_save_IFS"
1576 if test "${ac_cv_path_install+set}" = set; then
1577 INSTALL="$ac_cv_path_install"
1578 else
1579 # As a last resort, use the slow shell script. We don't cache a
1580 # path for INSTALL within a source directory, because that will
1581 # break other packages using the cache if that directory is
1582 # removed, or if the path is relative.
1583 INSTALL="$ac_install_sh"
1586 echo "$ac_t""$INSTALL" 1>&6
1588 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1589 # It thinks the first close brace ends the variable substitution.
1590 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1592 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1594 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1597 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1598 echo "configure:1599: checking whether to enable maintainer-specific portions of Makefiles" >&5
1599 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1600 if test "${enable_maintainer_mode+set}" = set; then
1601 enableval="$enable_maintainer_mode"
1602 USE_MAINTAINER_MODE=$enableval
1603 else
1604 USE_MAINTAINER_MODE=no
1607 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1610 if test $USE_MAINTAINER_MODE = yes; then
1611 MAINTAINER_MODE_TRUE=
1612 MAINTAINER_MODE_FALSE='#'
1613 else
1614 MAINTAINER_MODE_TRUE='#'
1615 MAINTAINER_MODE_FALSE=
1617 MAINT=$MAINTAINER_MODE_TRUE
1623 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1624 echo "configure:1625: checking for executable suffix" >&5
1625 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627 else
1628 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1629 ac_cv_exeext=.exe
1630 else
1631 rm -f conftest*
1632 echo 'int main () { return 0; }' > conftest.$ac_ext
1633 ac_cv_exeext=
1634 if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1635 for file in conftest.*; do
1636 case $file in
1637 *.c | *.o | *.obj) ;;
1638 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1639 esac
1640 done
1641 else
1642 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1644 rm -f conftest*
1645 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1649 EXEEXT=""
1650 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1651 echo "$ac_t""${ac_cv_exeext}" 1>&6
1652 ac_exeext=$EXEEXT
1655 # configure.host sets the following important variables
1656 # libgcj_cflags - host specific C compiler flags
1657 # libgcj_cxxflags - host specific C++ compiler flags
1658 # libgcj_javaflags - host specific Java compiler flags
1660 libgcj_cflags=
1661 libgcj_cxxflags=
1662 libgcj_javaflags=
1664 . ${srcdir}/configure.host
1666 LIBGCJ_CFLAGS="${libgcj_cflags}"
1667 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1668 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1678 # Only use libltdl for non-newlib builds.
1679 if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
1680 case $enable_ltdl_convenience in
1681 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1682 "") enable_ltdl_convenience=yes
1683 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1684 esac
1685 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1686 INCLTDL='-I${top_srcdir}/''libltdl'
1689 DIRLTDL=libltdl
1690 cat >> confdefs.h <<\EOF
1691 #define USE_LTDL 1
1694 # Sigh. Libtool's macro doesn't do the right thing.
1695 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1696 # FIXME: this is a hack.
1697 sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
1698 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1703 # Check whether --enable-shared or --disable-shared was given.
1704 if test "${enable_shared+set}" = set; then
1705 enableval="$enable_shared"
1706 p=${PACKAGE-default}
1707 case $enableval in
1708 yes) enable_shared=yes ;;
1709 no) enable_shared=no ;;
1711 enable_shared=no
1712 # Look at the argument we got. We use all the common list separators.
1713 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1714 for pkg in $enableval; do
1715 if test "X$pkg" = "X$p"; then
1716 enable_shared=yes
1718 done
1719 IFS="$ac_save_ifs"
1721 esac
1722 else
1723 enable_shared=yes
1726 # Check whether --enable-static or --disable-static was given.
1727 if test "${enable_static+set}" = set; then
1728 enableval="$enable_static"
1729 p=${PACKAGE-default}
1730 case $enableval in
1731 yes) enable_static=yes ;;
1732 no) enable_static=no ;;
1734 enable_static=no
1735 # Look at the argument we got. We use all the common list separators.
1736 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1737 for pkg in $enableval; do
1738 if test "X$pkg" = "X$p"; then
1739 enable_static=yes
1741 done
1742 IFS="$ac_save_ifs"
1744 esac
1745 else
1746 enable_static=yes
1749 # Check whether --enable-fast-install or --disable-fast-install was given.
1750 if test "${enable_fast_install+set}" = set; then
1751 enableval="$enable_fast_install"
1752 p=${PACKAGE-default}
1753 case $enableval in
1754 yes) enable_fast_install=yes ;;
1755 no) enable_fast_install=no ;;
1757 enable_fast_install=no
1758 # Look at the argument we got. We use all the common list separators.
1759 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1760 for pkg in $enableval; do
1761 if test "X$pkg" = "X$p"; then
1762 enable_fast_install=yes
1764 done
1765 IFS="$ac_save_ifs"
1767 esac
1768 else
1769 enable_fast_install=yes
1772 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1773 if test "${with_gnu_ld+set}" = set; then
1774 withval="$with_gnu_ld"
1775 test "$withval" = no || with_gnu_ld=yes
1776 else
1777 with_gnu_ld=no
1780 ac_prog=ld
1781 if test "$GCC" = yes; then
1782 # Check if gcc -print-prog-name=ld gives a path.
1783 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1784 echo "configure:1785: checking for ld used by GCC" >&5
1785 case $host in
1786 *-*-mingw*)
1787 # gcc leaves a trailing carriage return which upsets mingw
1788 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1790 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1791 esac
1792 case $ac_prog in
1793 # Accept absolute paths.
1794 [\\/]* | [A-Za-z]:[\\/]*)
1795 re_direlt='/[^/][^/]*/\.\./'
1796 # Canonicalize the path of ld
1797 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1798 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1799 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1800 done
1801 test -z "$LD" && LD="$ac_prog"
1804 # If it fails, then pretend we aren't using GCC.
1805 ac_prog=ld
1808 # If it is relative, then search for the first ld in PATH.
1809 with_gnu_ld=unknown
1811 esac
1812 elif test "$with_gnu_ld" = yes; then
1813 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1814 echo "configure:1815: checking for GNU ld" >&5
1815 else
1816 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1817 echo "configure:1818: checking for non-GNU ld" >&5
1819 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1820 echo $ac_n "(cached) $ac_c" 1>&6
1821 else
1822 if test -z "$LD"; then
1823 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1824 for ac_dir in $PATH; do
1825 test -z "$ac_dir" && ac_dir=.
1826 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1827 lt_cv_path_LD="$ac_dir/$ac_prog"
1828 # Check to see if the program is GNU ld. I'd rather use --version,
1829 # but apparently some GNU ld's only accept -v.
1830 # Break only if it was the GNU/non-GNU ld that we prefer.
1831 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1832 test "$with_gnu_ld" != no && break
1833 else
1834 test "$with_gnu_ld" != yes && break
1837 done
1838 IFS="$ac_save_ifs"
1839 else
1840 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1844 LD="$lt_cv_path_LD"
1845 if test -n "$LD"; then
1846 echo "$ac_t""$LD" 1>&6
1847 else
1848 echo "$ac_t""no" 1>&6
1850 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1851 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1852 echo "configure:1853: checking if the linker ($LD) is GNU ld" >&5
1853 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1857 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1858 lt_cv_prog_gnu_ld=yes
1859 else
1860 lt_cv_prog_gnu_ld=no
1864 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1865 with_gnu_ld=$lt_cv_prog_gnu_ld
1868 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1869 echo "configure:1870: checking for $LD option to reload object files" >&5
1870 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1871 echo $ac_n "(cached) $ac_c" 1>&6
1872 else
1873 lt_cv_ld_reload_flag='-r'
1876 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1877 reload_flag=$lt_cv_ld_reload_flag
1878 test -n "$reload_flag" && reload_flag=" $reload_flag"
1880 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1881 echo "configure:1882: checking for BSD-compatible nm" >&5
1882 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1883 echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885 if test -n "$NM"; then
1886 # Let the user override the test.
1887 lt_cv_path_NM="$NM"
1888 else
1889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1890 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1891 test -z "$ac_dir" && ac_dir=.
1892 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1893 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1894 # Check to see if the nm accepts a BSD-compat flag.
1895 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1896 # nm: unknown option "B" ignored
1897 # Tru64's nm complains that /dev/null is an invalid object file
1898 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1899 lt_cv_path_NM="$tmp_nm -B"
1900 break
1901 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1902 lt_cv_path_NM="$tmp_nm -p"
1903 break
1904 else
1905 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1906 continue # so that we can try to find one that supports BSD flags
1909 done
1910 IFS="$ac_save_ifs"
1911 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1915 NM="$lt_cv_path_NM"
1916 echo "$ac_t""$NM" 1>&6
1918 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1919 echo "configure:1920: checking how to recognise dependant libraries" >&5
1920 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1921 echo $ac_n "(cached) $ac_c" 1>&6
1922 else
1923 lt_cv_file_magic_cmd='$MAGIC_CMD'
1924 lt_cv_file_magic_test_file=
1925 lt_cv_deplibs_check_method='unknown'
1926 # Need to set the preceding variable on all platforms that support
1927 # interlibrary dependencies.
1928 # 'none' -- dependencies not supported.
1929 # `unknown' -- same as none, but documents that we really don't know.
1930 # 'pass_all' -- all dependencies passed with no checks.
1931 # 'test_compile' -- check by making test program.
1932 # 'file_magic [regex]' -- check by looking for files in library path
1933 # which responds to the $file_magic_cmd with a given egrep regex.
1934 # If you have `file' or equivalent on your system and you're not sure
1935 # whether `pass_all' will *always* work, you probably want this one.
1937 case $host_os in
1938 aix*)
1939 lt_cv_deplibs_check_method=pass_all
1942 beos*)
1943 lt_cv_deplibs_check_method=pass_all
1946 bsdi4*)
1947 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1948 lt_cv_file_magic_cmd='/usr/bin/file -L'
1949 lt_cv_file_magic_test_file=/shlib/libc.so
1952 cygwin* | mingw* |pw32*)
1953 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1954 lt_cv_file_magic_cmd='$OBJDUMP -f'
1957 darwin* | rhapsody*)
1958 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1959 lt_cv_file_magic_cmd='/usr/bin/file -L'
1960 case "$host_os" in
1961 rhapsody* | darwin1.012)
1962 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1964 *) # Darwin 1.3 on
1965 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1967 esac
1970 freebsd* )
1971 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1972 case $host_cpu in
1973 i*86 )
1974 # Not sure whether the presence of OpenBSD here was a mistake.
1975 # Let's accept both of them until this is cleared up.
1976 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1977 lt_cv_file_magic_cmd=/usr/bin/file
1978 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1980 esac
1981 else
1982 lt_cv_deplibs_check_method=pass_all
1986 gnu*)
1987 lt_cv_deplibs_check_method=pass_all
1990 hpux10.20*|hpux11*)
1991 case $host_cpu in
1992 hppa*)
1993 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1994 lt_cv_file_magic_cmd=/usr/bin/file
1995 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1997 ia64*)
1998 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1999 lt_cv_file_magic_cmd=/usr/bin/file
2000 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2002 esac
2005 irix5* | irix6*)
2006 case $host_os in
2007 irix5*)
2008 # this will be overridden with pass_all, but let us keep it just in case
2009 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2012 case $LD in
2013 *-32|*"-32 ") libmagic=32-bit;;
2014 *-n32|*"-n32 ") libmagic=N32;;
2015 *-64|*"-64 ") libmagic=64-bit;;
2016 *) libmagic=never-match;;
2017 esac
2018 # this will be overridden with pass_all, but let us keep it just in case
2019 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2021 esac
2022 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2023 lt_cv_deplibs_check_method=pass_all
2026 # This must be Linux ELF.
2027 linux-gnu*)
2028 case $host_cpu in
2029 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2030 lt_cv_deplibs_check_method=pass_all ;;
2032 # glibc up to 2.1.1 does not perform some relocations on ARM
2033 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2034 esac
2035 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2038 netbsd*)
2039 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2040 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2041 else
2042 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2046 newsos6)
2047 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2048 lt_cv_file_magic_cmd=/usr/bin/file
2049 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2052 osf3* | osf4* | osf5*)
2053 # this will be overridden with pass_all, but let us keep it just in case
2054 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2055 lt_cv_file_magic_test_file=/shlib/libc.so
2056 lt_cv_deplibs_check_method=pass_all
2059 sco3.2v5*)
2060 lt_cv_deplibs_check_method=pass_all
2063 solaris*)
2064 lt_cv_deplibs_check_method=pass_all
2065 lt_cv_file_magic_test_file=/lib/libc.so
2068 sysv5uw[78]* | sysv4*uw2*)
2069 lt_cv_deplibs_check_method=pass_all
2072 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2073 case $host_vendor in
2074 ncr)
2075 lt_cv_deplibs_check_method=pass_all
2077 motorola)
2078 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]'
2079 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2081 esac
2083 esac
2087 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2088 file_magic_cmd=$lt_cv_file_magic_cmd
2089 deplibs_check_method=$lt_cv_deplibs_check_method
2091 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2092 echo "configure:2093: checking for object suffix" >&5
2093 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2094 echo $ac_n "(cached) $ac_c" 1>&6
2095 else
2096 rm -f conftest*
2097 echo 'int i = 1;' > conftest.$ac_ext
2098 if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2099 for ac_file in conftest.*; do
2100 case $ac_file in
2101 *.c) ;;
2102 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2103 esac
2104 done
2105 else
2106 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2108 rm -f conftest*
2111 echo "$ac_t""$ac_cv_objext" 1>&6
2112 OBJEXT=$ac_cv_objext
2113 ac_objext=$ac_cv_objext
2115 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2117 # Only perform the check for file, if the check method requires it
2118 case $deplibs_check_method in
2119 file_magic*)
2120 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2121 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2122 echo "configure:2123: checking for ${ac_tool_prefix}file" >&5
2123 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126 case $MAGIC_CMD in
2128 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2130 ?:/*)
2131 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2134 ac_save_MAGIC_CMD="$MAGIC_CMD"
2135 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2136 ac_dummy="/usr/bin:$PATH"
2137 for ac_dir in $ac_dummy; do
2138 test -z "$ac_dir" && ac_dir=.
2139 if test -f $ac_dir/${ac_tool_prefix}file; then
2140 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2141 if test -n "$file_magic_test_file"; then
2142 case $deplibs_check_method in
2143 "file_magic "*)
2144 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2145 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2146 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2147 egrep "$file_magic_regex" > /dev/null; then
2149 else
2150 cat <<EOF 1>&2
2152 *** Warning: the command libtool uses to detect shared libraries,
2153 *** $file_magic_cmd, produces output that libtool cannot recognize.
2154 *** The result is that libtool may fail to recognize shared libraries
2155 *** as such. This will affect the creation of libtool libraries that
2156 *** depend on shared libraries, but programs linked with such libtool
2157 *** libraries will work regardless of this problem. Nevertheless, you
2158 *** may want to report the problem to your system manager and/or to
2159 *** bug-libtool@gnu.org
2162 fi ;;
2163 esac
2165 break
2167 done
2168 IFS="$ac_save_ifs"
2169 MAGIC_CMD="$ac_save_MAGIC_CMD"
2171 esac
2174 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2175 if test -n "$MAGIC_CMD"; then
2176 echo "$ac_t""$MAGIC_CMD" 1>&6
2177 else
2178 echo "$ac_t""no" 1>&6
2181 if test -z "$lt_cv_path_MAGIC_CMD"; then
2182 if test -n "$ac_tool_prefix"; then
2183 echo $ac_n "checking for file""... $ac_c" 1>&6
2184 echo "configure:2185: checking for file" >&5
2185 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2186 echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188 case $MAGIC_CMD in
2190 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2192 ?:/*)
2193 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2196 ac_save_MAGIC_CMD="$MAGIC_CMD"
2197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2198 ac_dummy="/usr/bin:$PATH"
2199 for ac_dir in $ac_dummy; do
2200 test -z "$ac_dir" && ac_dir=.
2201 if test -f $ac_dir/file; then
2202 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2203 if test -n "$file_magic_test_file"; then
2204 case $deplibs_check_method in
2205 "file_magic "*)
2206 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2207 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2208 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2209 egrep "$file_magic_regex" > /dev/null; then
2211 else
2212 cat <<EOF 1>&2
2214 *** Warning: the command libtool uses to detect shared libraries,
2215 *** $file_magic_cmd, produces output that libtool cannot recognize.
2216 *** The result is that libtool may fail to recognize shared libraries
2217 *** as such. This will affect the creation of libtool libraries that
2218 *** depend on shared libraries, but programs linked with such libtool
2219 *** libraries will work regardless of this problem. Nevertheless, you
2220 *** may want to report the problem to your system manager and/or to
2221 *** bug-libtool@gnu.org
2224 fi ;;
2225 esac
2227 break
2229 done
2230 IFS="$ac_save_ifs"
2231 MAGIC_CMD="$ac_save_MAGIC_CMD"
2233 esac
2236 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2237 if test -n "$MAGIC_CMD"; then
2238 echo "$ac_t""$MAGIC_CMD" 1>&6
2239 else
2240 echo "$ac_t""no" 1>&6
2243 else
2244 MAGIC_CMD=:
2250 esac
2252 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2253 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2255 echo "configure:2256: checking for $ac_word" >&5
2256 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2257 echo $ac_n "(cached) $ac_c" 1>&6
2258 else
2259 if test -n "$RANLIB"; then
2260 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2261 else
2262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2263 ac_dummy="$PATH"
2264 for ac_dir in $ac_dummy; do
2265 test -z "$ac_dir" && ac_dir=.
2266 if test -f $ac_dir/$ac_word; then
2267 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2268 break
2270 done
2271 IFS="$ac_save_ifs"
2274 RANLIB="$ac_cv_prog_RANLIB"
2275 if test -n "$RANLIB"; then
2276 echo "$ac_t""$RANLIB" 1>&6
2277 else
2278 echo "$ac_t""no" 1>&6
2282 if test -z "$ac_cv_prog_RANLIB"; then
2283 if test -n "$ac_tool_prefix"; then
2284 # Extract the first word of "ranlib", so it can be a program name with args.
2285 set dummy ranlib; ac_word=$2
2286 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2287 echo "configure:2288: checking for $ac_word" >&5
2288 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2289 echo $ac_n "(cached) $ac_c" 1>&6
2290 else
2291 if test -n "$RANLIB"; then
2292 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2293 else
2294 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2295 ac_dummy="$PATH"
2296 for ac_dir in $ac_dummy; do
2297 test -z "$ac_dir" && ac_dir=.
2298 if test -f $ac_dir/$ac_word; then
2299 ac_cv_prog_RANLIB="ranlib"
2300 break
2302 done
2303 IFS="$ac_save_ifs"
2304 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2307 RANLIB="$ac_cv_prog_RANLIB"
2308 if test -n "$RANLIB"; then
2309 echo "$ac_t""$RANLIB" 1>&6
2310 else
2311 echo "$ac_t""no" 1>&6
2314 else
2315 RANLIB=":"
2319 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2320 set dummy ${ac_tool_prefix}strip; ac_word=$2
2321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2322 echo "configure:2323: checking for $ac_word" >&5
2323 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2324 echo $ac_n "(cached) $ac_c" 1>&6
2325 else
2326 if test -n "$STRIP"; then
2327 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2328 else
2329 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2330 ac_dummy="$PATH"
2331 for ac_dir in $ac_dummy; do
2332 test -z "$ac_dir" && ac_dir=.
2333 if test -f $ac_dir/$ac_word; then
2334 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2335 break
2337 done
2338 IFS="$ac_save_ifs"
2341 STRIP="$ac_cv_prog_STRIP"
2342 if test -n "$STRIP"; then
2343 echo "$ac_t""$STRIP" 1>&6
2344 else
2345 echo "$ac_t""no" 1>&6
2349 if test -z "$ac_cv_prog_STRIP"; then
2350 if test -n "$ac_tool_prefix"; then
2351 # Extract the first word of "strip", so it can be a program name with args.
2352 set dummy strip; ac_word=$2
2353 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2354 echo "configure:2355: checking for $ac_word" >&5
2355 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2356 echo $ac_n "(cached) $ac_c" 1>&6
2357 else
2358 if test -n "$STRIP"; then
2359 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2360 else
2361 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2362 ac_dummy="$PATH"
2363 for ac_dir in $ac_dummy; do
2364 test -z "$ac_dir" && ac_dir=.
2365 if test -f $ac_dir/$ac_word; then
2366 ac_cv_prog_STRIP="strip"
2367 break
2369 done
2370 IFS="$ac_save_ifs"
2371 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2374 STRIP="$ac_cv_prog_STRIP"
2375 if test -n "$STRIP"; then
2376 echo "$ac_t""$STRIP" 1>&6
2377 else
2378 echo "$ac_t""no" 1>&6
2381 else
2382 STRIP=":"
2387 # Check for any special flags to pass to ltconfig.
2388 libtool_flags="--cache-file=$cache_file"
2389 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2390 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2391 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2392 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2393 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2394 libtool_flags="$libtool_flags --enable-dlopen"
2396 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2397 if test "${enable_libtool_lock+set}" = set; then
2398 enableval="$enable_libtool_lock"
2402 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2403 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2405 # Check whether --with-pic or --without-pic was given.
2406 if test "${with_pic+set}" = set; then
2407 withval="$with_pic"
2408 pic_mode="$withval"
2409 else
2410 pic_mode=default
2413 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2414 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2416 # Some flags need to be propagated to the compiler or linker for good
2417 # libtool support.
2418 case $host in
2419 *-*-irix6*)
2420 # Find out which ABI we are using.
2421 echo '#line 2422 "configure"' > conftest.$ac_ext
2422 if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2423 if test "$lt_cv_prog_gnu_ld" = yes; then
2424 case `/usr/bin/file conftest.$ac_objext` in
2425 *32-bit*)
2426 LD="${LD-ld} -melf32bsmip"
2428 *N32*)
2429 LD="${LD-ld} -melf32bmipn32"
2431 *64-bit*)
2432 LD="${LD-ld} -melf64bmip"
2434 esac
2435 else
2436 case `/usr/bin/file conftest.$ac_objext` in
2437 *32-bit*)
2438 LD="${LD-ld} -32"
2440 *N32*)
2441 LD="${LD-ld} -n32"
2443 *64-bit*)
2444 LD="${LD-ld} -64"
2446 esac
2449 rm -rf conftest*
2452 ia64-*-hpux*)
2453 # Find out which ABI we are using.
2454 echo 'int i;' > conftest.$ac_ext
2455 if { (eval echo configure:2456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2456 case "`/usr/bin/file conftest.o`" in
2457 *ELF-32*)
2458 HPUX_IA64_MODE="32"
2460 *ELF-64*)
2461 HPUX_IA64_MODE="64"
2463 esac
2465 rm -rf conftest*
2468 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2469 # Find out which ABI we are using.
2470 echo 'int i;' > conftest.$ac_ext
2471 if { (eval echo configure:2472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2472 case "`/usr/bin/file conftest.o`" in
2473 *32-bit*)
2474 case $host in
2475 x86_64-*linux*)
2476 LD="${LD-ld} -m elf_i386"
2478 ppc64-*linux*|powerpc64-*linux*)
2479 LD="${LD-ld} -m elf32ppclinux"
2481 s390x-*linux*)
2482 LD="${LD-ld} -m elf_s390"
2484 sparc64-*linux*)
2485 LD="${LD-ld} -m elf32_sparc"
2487 esac
2489 *64-bit*)
2490 case $host in
2491 x86_64-*linux*)
2492 LD="${LD-ld} -m elf_x86_64"
2494 ppc*-*linux*|powerpc*-*linux*)
2495 LD="${LD-ld} -m elf64ppc"
2497 s390*-*linux*)
2498 LD="${LD-ld} -m elf64_s390"
2500 sparc*-*linux*)
2501 LD="${LD-ld} -m elf64_sparc"
2503 esac
2505 esac
2507 rm -rf conftest*
2510 *-*-sco3.2v5*)
2511 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2512 SAVE_CFLAGS="$CFLAGS"
2513 CFLAGS="$CFLAGS -belf"
2514 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2515 echo "configure:2516: checking whether the C compiler needs -belf" >&5
2516 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2520 ac_ext=c
2521 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2522 ac_cpp='$CPP $CPPFLAGS'
2523 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2524 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2525 cross_compiling=$ac_cv_prog_cc_cross
2527 cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2531 int main() {
2533 ; return 0; }
2535 if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2536 rm -rf conftest*
2537 lt_cv_cc_needs_belf=yes
2538 else
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 rm -rf conftest*
2542 lt_cv_cc_needs_belf=no
2544 rm -f conftest*
2545 ac_ext=c
2546 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2547 ac_cpp='$CPP $CPPFLAGS'
2548 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2549 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2550 cross_compiling=$ac_cv_prog_cc_cross
2554 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2555 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2556 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2557 CFLAGS="$SAVE_CFLAGS"
2562 esac
2564 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2565 echo "configure:2566: checking how to run the C++ preprocessor" >&5
2566 if test -z "$CXXCPP"; then
2567 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2568 echo $ac_n "(cached) $ac_c" 1>&6
2569 else
2570 ac_ext=C
2571 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2572 ac_cpp='$CXXCPP $CPPFLAGS'
2573 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2574 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2575 cross_compiling=$ac_cv_prog_cxx_cross
2576 CXXCPP="${CXX-g++} -E"
2577 cat > conftest.$ac_ext <<EOF
2578 #line 2579 "configure"
2579 #include "confdefs.h"
2580 #include <stdlib.h>
2582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2583 { (eval echo configure:2584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2585 if test -z "$ac_err"; then
2587 else
2588 echo "$ac_err" >&5
2589 echo "configure: failed program was:" >&5
2590 cat conftest.$ac_ext >&5
2591 rm -rf conftest*
2592 CXXCPP=/lib/cpp
2594 rm -f conftest*
2595 ac_cv_prog_CXXCPP="$CXXCPP"
2596 ac_ext=c
2597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2598 ac_cpp='$CPP $CPPFLAGS'
2599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2601 cross_compiling=$ac_cv_prog_cc_cross
2604 CXXCPP="$ac_cv_prog_CXXCPP"
2605 echo "$ac_t""$CXXCPP" 1>&6
2608 # Save cache, so that ltconfig can load it
2609 cat > confcache <<\EOF
2610 # This file is a shell script that caches the results of configure
2611 # tests run on this system so they can be shared between configure
2612 # scripts and configure runs. It is not useful on other systems.
2613 # If it contains results you don't want to keep, you may remove or edit it.
2615 # By default, configure uses ./config.cache as the cache file,
2616 # creating it if it does not exist already. You can give configure
2617 # the --cache-file=FILE option to use a different cache file; that is
2618 # what configure does when it calls configure scripts in
2619 # subdirectories, so they share the cache.
2620 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2621 # config.status only pays attention to the cache file if you give it the
2622 # --recheck option to rerun configure.
2625 # The following way of writing the cache mishandles newlines in values,
2626 # but we know of no workaround that is simple, portable, and efficient.
2627 # So, don't put newlines in cache variables' values.
2628 # Ultrix sh set writes to stderr and can't be redirected directly,
2629 # and sets the high bit in the cache file unless we assign to the vars.
2630 (set) 2>&1 |
2631 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2632 *ac_space=\ *)
2633 # `set' does not quote correctly, so add quotes (double-quote substitution
2634 # turns \\\\ into \\, and sed turns \\ into \).
2635 sed -n \
2636 -e "s/'/'\\\\''/g" \
2637 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2640 # `set' quotes correctly as required by POSIX, so do not add quotes.
2641 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2643 esac >> confcache
2644 if cmp -s $cache_file confcache; then
2646 else
2647 if test -w $cache_file; then
2648 echo "updating cache $cache_file"
2649 cat confcache > $cache_file
2650 else
2651 echo "not updating unwritable cache $cache_file"
2654 rm -f confcache
2657 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2658 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2659 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2660 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2661 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2662 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2663 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2664 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2665 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2666 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2668 # Reload cache, that may have been modified by ltconfig
2669 if test -r "$cache_file"; then
2670 echo "loading cache $cache_file"
2671 . $cache_file
2672 else
2673 echo "creating cache $cache_file"
2674 > $cache_file
2678 # This can be used to rebuild libtool when needed
2679 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2681 # Always use our own libtool.
2682 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2684 # Redirect the config.log output again, so that the ltconfig log is not
2685 # clobbered by the next message.
2686 exec 5>>./config.log
2690 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2691 lt_save_CC="$CC"
2692 lt_save_CFLAGS="$CFLAGS"
2693 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2694 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2695 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2696 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2697 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2698 deplibs_check_method="$deplibs_check_method" \
2699 file_magic_cmd="$file_magic_cmd" \
2700 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2701 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2702 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2703 CC="$lt_save_CC"
2704 CFLAGS="$lt_save_CFLAGS"
2706 # Redirect the config.log output again, so that the ltconfig log is not
2707 # clobbered by the next message.
2708 exec 5>>./config.log
2715 subdirs="$DIRLTDL"
2718 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2719 COMPPATH=.
2720 else
2721 COMPPATH=..
2727 if test -d $srcdir/testsuite; then
2728 TESTSUBDIR_TRUE=
2729 TESTSUBDIR_FALSE='#'
2730 else
2731 TESTSUBDIR_TRUE='#'
2732 TESTSUBDIR_FALSE=
2735 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2736 if test "${enable_getenv_properties+set}" = set; then
2737 enableval="$enable_getenv_properties"
2742 if test -z "$enable_getenv_properties"; then
2743 enable_getenv_properties=${enable_getenv_properties_default-yes}
2745 if test "$enable_getenv_properties" = no; then
2746 cat >> confdefs.h <<\EOF
2747 #define DISABLE_GETENV_PROPERTIES 1
2752 if test -z "$enable_main_args"; then
2753 enable_main_args=${enable_main_args_default-yes}
2755 if test "$enable_main_args" = no; then
2756 cat >> confdefs.h <<\EOF
2757 #define DISABLE_MAIN_ARGS 1
2763 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2764 if test "${enable_hash_synchronization+set}" = set; then
2765 enableval="$enable_hash_synchronization"
2770 if test -z "$enable_hash_synchronization"; then
2771 enable_hash_synchronization=$enable_hash_synchronization_default
2774 # Do we allow intermodule optimizations (i.e. compiling many files at once)?
2775 # Check whether --enable-libgcj-multifile or --disable-libgcj-multifile was given.
2776 if test "${enable_libgcj_multifile+set}" = set; then
2777 enableval="$enable_libgcj_multifile"
2778 case "${enableval}" in
2779 yes) enable_libgcj_multifile=yes ;;
2780 no) enable_libgcj_multifile=no ;;
2781 *) { echo "configure: error: bad value ${enableval} for --enable-libgcj-multifile" 1>&2; exit 1; } ;;
2782 esac
2783 else
2784 enable_libgcj_multifile=no
2789 if test "$enable_libgcj_multifile" = yes; then
2790 ONESTEP_TRUE=
2791 ONESTEP_FALSE='#'
2792 else
2793 ONESTEP_TRUE='#'
2794 ONESTEP_FALSE=
2797 if test "${slow_pthread_self}" = "yes"; then
2798 cat >> confdefs.h <<\EOF
2799 #define SLOW_PTHREAD_SELF 1
2805 LIBGCJDEBUG="false"
2807 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2808 if test "${enable_libgcj_debug+set}" = set; then
2809 enableval="$enable_libgcj_debug"
2810 if test "$enable_libgcj_debug" = yes; then
2811 cat >> confdefs.h <<\EOF
2812 #define DEBUG 1
2815 LIBGCJDEBUG="true"
2820 # Check whether --enable-interpreter or --disable-interpreter was given.
2821 if test "${enable_interpreter+set}" = set; then
2822 enableval="$enable_interpreter"
2823 if test "$enable_interpreter" = yes; then
2824 # This can also be set in configure.host.
2825 libgcj_interpreter=yes
2826 elif test "$enable_interpreter" = no; then
2827 libgcj_interpreter=no
2832 if test "$libgcj_interpreter" = yes; then
2833 cat >> confdefs.h <<\EOF
2834 #define INTERPRETER 1
2838 INTERPRETER="$libgcj_interpreter"
2841 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2842 echo "configure:2843: checking for exception model to use" >&5
2844 ac_ext=C
2845 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2846 ac_cpp='$CXXCPP $CPPFLAGS'
2847 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2848 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2849 cross_compiling=$ac_cv_prog_cxx_cross
2851 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2852 if test "${enable_sjlj_exceptions+set}" = set; then
2853 enableval="$enable_sjlj_exceptions"
2855 else
2856 cat > conftest.$ac_ext << EOF
2857 #line 2858 "configure"
2858 struct S { ~S(); };
2859 void bar();
2860 void foo()
2862 S s;
2863 bar();
2866 old_CXXFLAGS="$CXXFLAGS"
2867 CXXFLAGS=-S
2868 if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2869 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2870 enable_sjlj_exceptions=yes
2871 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2872 enable_sjlj_exceptions=no
2875 CXXFLAGS="$old_CXXFLAGS"
2876 rm -f conftest*
2879 if test x$enable_sjlj_exceptions = xyes; then
2880 cat >> confdefs.h <<\EOF
2881 #define SJLJ_EXCEPTIONS 1
2884 ac_exception_model_name=sjlj
2885 elif test x$enable_sjlj_exceptions = xno; then
2886 ac_exception_model_name="call frame"
2887 else
2888 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2890 ac_ext=c
2891 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2892 ac_cpp='$CPP $CPPFLAGS'
2893 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2894 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2895 cross_compiling=$ac_cv_prog_cc_cross
2897 echo "$ac_t""$ac_exception_model_name" 1>&6
2899 # If we are non using SJLJ exceptions, and this host does not have support
2900 # for unwinding from a signal handler, enable checked dereferences and divides.
2901 if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2902 CHECKREFSPEC=-fcheck-references
2903 DIVIDESPEC=-fuse-divide-subroutine
2904 EXCEPTIONSPEC=
2907 # Check whether --enable-java-net or --disable-java-net was given.
2908 if test "${enable_java_net+set}" = set; then
2909 enableval="$enable_java_net"
2914 if test -z "$enable_java_net"; then
2915 enable_java_net=${enable_java_net_default-yes}
2917 if test "$enable_java_net" = no; then
2918 cat >> confdefs.h <<\EOF
2919 #define DISABLE_JAVA_NET 1
2924 # Check whether --with-libffi or --without-libffi was given.
2925 if test "${with_libffi+set}" = set; then
2926 withval="$with_libffi"
2928 else
2929 with_libffi=${with_libffi_default-yes}
2933 LIBFFI=
2934 LIBFFIINCS=
2935 if test "$with_libffi" != no; then
2936 cat >> confdefs.h <<\EOF
2937 #define USE_LIBFFI 1
2940 LIBFFI=../libffi/libffi_convenience.la
2941 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
2946 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2947 if test "${enable_jvmpi+set}" = set; then
2948 enableval="$enable_jvmpi"
2953 if test "$enable_jvmpi" != no; then
2954 cat >> confdefs.h <<\EOF
2955 #define ENABLE_JVMPI 1
2960 TARGET_ECOS=${PROCESS-"no"}
2961 # Check whether --with-ecos or --without-ecos was given.
2962 if test "${with_ecos+set}" = set; then
2963 withval="$with_ecos"
2964 TARGET_ECOS="$with_ecos"
2969 EXTRA_CC_FILES=
2972 PLATFORMOBJS=
2973 case "$TARGET_ECOS" in
2974 no) case "$host" in
2975 *mingw*)
2976 PLATFORM=Win32
2977 PLATFORMNET=Win32
2978 PLATFORMOBJS=win32.lo
2979 PLATFORMH=win32.h
2981 echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6
2982 echo "configure:2983: checking whether 'ld' is at least 2.13" >&5
2983 LD_PROG=`$CC --print-prog-name=ld`
2984 LD_VERSION=`$LD_PROG --version`
2985 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
2986 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
2987 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
2988 LD_OK="ok"
2989 else
2990 if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
2991 LD_OK="ok"
2994 if test "x$LD_OK" != x; then
2995 echo "$ac_t""yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
2996 else
2997 echo "$ac_t""no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
2998 echo "configure: warning: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." 1>&2
2999 cat >> confdefs.h <<\EOF
3000 #define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1
3006 PLATFORM=Posix
3007 PLATFORMNET=Posix
3008 PLATFORMOBJS=posix.lo
3009 PLATFORMH=posix.h
3011 esac
3014 PLATFORM=Ecos
3015 PLATFORMNET=NoNet
3016 cat >> confdefs.h <<\EOF
3017 #define ECOS 1
3020 PLATFORMOBJS=posix.lo
3021 PLATFORMH=posix.h
3023 esac
3027 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3028 echo "configure:3029: checking how to run the C preprocessor" >&5
3029 # On Suns, sometimes $CPP names a directory.
3030 if test -n "$CPP" && test -d "$CPP"; then
3031 CPP=
3033 if test -z "$CPP"; then
3034 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3035 echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037 # This must be in double quotes, not single quotes, because CPP may get
3038 # substituted into the Makefile and "${CC-cc}" will confuse make.
3039 CPP="${CC-cc} -E"
3040 # On the NeXT, cc -E runs the code through the compiler's parser,
3041 # not just through cpp.
3042 cat > conftest.$ac_ext <<EOF
3043 #line 3044 "configure"
3044 #include "confdefs.h"
3045 #include <assert.h>
3046 Syntax Error
3048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3049 { (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3051 if test -z "$ac_err"; then
3053 else
3054 echo "$ac_err" >&5
3055 echo "configure: failed program was:" >&5
3056 cat conftest.$ac_ext >&5
3057 rm -rf conftest*
3058 CPP="${CC-cc} -E -traditional-cpp"
3059 cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062 #include <assert.h>
3063 Syntax Error
3065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3066 { (eval echo configure:3067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3068 if test -z "$ac_err"; then
3070 else
3071 echo "$ac_err" >&5
3072 echo "configure: failed program was:" >&5
3073 cat conftest.$ac_ext >&5
3074 rm -rf conftest*
3075 CPP="${CC-cc} -nologo -E"
3076 cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 #include <assert.h>
3080 Syntax Error
3082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3083 { (eval echo configure:3084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3085 if test -z "$ac_err"; then
3087 else
3088 echo "$ac_err" >&5
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091 rm -rf conftest*
3092 CPP=/lib/cpp
3094 rm -f conftest*
3096 rm -f conftest*
3098 rm -f conftest*
3099 ac_cv_prog_CPP="$CPP"
3101 CPP="$ac_cv_prog_CPP"
3102 else
3103 ac_cv_prog_CPP="$CPP"
3105 echo "$ac_t""$CPP" 1>&6
3107 cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 #include <stdint.h>
3112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3113 egrep "uint32_t" >/dev/null 2>&1; then
3114 rm -rf conftest*
3115 cat >> confdefs.h <<\EOF
3116 #define HAVE_INT32_DEFINED 1
3120 rm -f conftest*
3122 cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 #include <inttypes.h>
3127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3128 egrep "uint32_t" >/dev/null 2>&1; then
3129 rm -rf conftest*
3130 cat >> confdefs.h <<\EOF
3131 #define HAVE_INT32_DEFINED 1
3135 rm -f conftest*
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <sys/types.h>
3142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3143 egrep "u_int32_t" >/dev/null 2>&1; then
3144 rm -rf conftest*
3145 cat >> confdefs.h <<\EOF
3146 #define HAVE_BSD_INT32_DEFINED 1
3150 rm -f conftest*
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 #include <sys/config.h>
3157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3158 egrep "u_int32_t" >/dev/null 2>&1; then
3159 rm -rf conftest*
3160 cat >> confdefs.h <<\EOF
3161 #define HAVE_BSD_INT32_DEFINED 1
3165 rm -f conftest*
3169 cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <time.h>
3174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3175 egrep "mktime" >/dev/null 2>&1; then
3176 rm -rf conftest*
3177 cat >> confdefs.h <<\EOF
3178 #define HAVE_MKTIME 1
3182 rm -f conftest*
3184 cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187 #include <time.h>
3189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3190 egrep "localtime" >/dev/null 2>&1; then
3191 rm -rf conftest*
3192 cat >> confdefs.h <<\EOF
3193 #define HAVE_LOCALTIME 1
3197 rm -f conftest*
3200 test -d java || mkdir java
3201 test -d java/io || mkdir java/io
3202 test -d gnu || mkdir gnu
3206 test -d java/lang || mkdir java/lang
3210 test -d java/net || mkdir java/net
3214 test -d gnu/java || mkdir gnu/java
3215 test -d gnu/java/net || mkdir gnu/java/net
3219 case "${host}" in
3220 *mingw*)
3221 SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3224 SYSTEMSPEC=
3226 esac
3229 LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
3232 # Check whether --with-system-zlib or --without-system-zlib was given.
3233 if test "${with_system_zlib+set}" = set; then
3234 withval="$with_system_zlib"
3238 ZLIBSPEC=
3240 ZLIBTESTSPEC=
3243 # If we find X, set shell vars x_includes and x_libraries to the
3244 # paths, otherwise set no_x=yes.
3245 # Uses ac_ vars as temps to allow command line to override cache and checks.
3246 # --without-x overrides everything else, but does not touch the cache.
3247 echo $ac_n "checking for X""... $ac_c" 1>&6
3248 echo "configure:3249: checking for X" >&5
3250 # Check whether --with-x or --without-x was given.
3251 if test "${with_x+set}" = set; then
3252 withval="$with_x"
3256 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3257 if test "x$with_x" = xno; then
3258 # The user explicitly disabled X.
3259 have_x=disabled
3260 else
3261 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3262 # Both variables are already set.
3263 have_x=yes
3264 else
3265 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3266 echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268 # One or both of the vars are not set, and there is no cached value.
3269 ac_x_includes=NO ac_x_libraries=NO
3270 rm -fr conftestdir
3271 if mkdir conftestdir; then
3272 cd conftestdir
3273 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3274 cat > Imakefile <<'EOF'
3275 acfindx:
3276 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3278 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3279 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3280 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3281 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3282 for ac_extension in a so sl; do
3283 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3284 test -f $ac_im_libdir/libX11.$ac_extension; then
3285 ac_im_usrlibdir=$ac_im_libdir; break
3287 done
3288 # Screen out bogus values from the imake configuration. They are
3289 # bogus both because they are the default anyway, and because
3290 # using them would break gcc on systems where it needs fixed includes.
3291 case "$ac_im_incroot" in
3292 /usr/include) ;;
3293 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3294 esac
3295 case "$ac_im_usrlibdir" in
3296 /usr/lib | /lib) ;;
3297 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3298 esac
3300 cd ..
3301 rm -fr conftestdir
3304 if test "$ac_x_includes" = NO; then
3305 # Guess where to find include files, by looking for this one X11 .h file.
3306 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3308 # First, try using that file with no special directory specified.
3309 cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 #include <$x_direct_test_include>
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318 rm -rf conftest*
3319 # We can compile using X headers with no special include directory.
3320 ac_x_includes=
3321 else
3322 echo "$ac_err" >&5
3323 echo "configure: failed program was:" >&5
3324 cat conftest.$ac_ext >&5
3325 rm -rf conftest*
3326 # Look for the header file in a standard set of common directories.
3327 # Check X11 before X11Rn because it is often a symlink to the current release.
3328 for ac_dir in \
3329 /usr/X11/include \
3330 /usr/X11R6/include \
3331 /usr/X11R5/include \
3332 /usr/X11R4/include \
3334 /usr/include/X11 \
3335 /usr/include/X11R6 \
3336 /usr/include/X11R5 \
3337 /usr/include/X11R4 \
3339 /usr/local/X11/include \
3340 /usr/local/X11R6/include \
3341 /usr/local/X11R5/include \
3342 /usr/local/X11R4/include \
3344 /usr/local/include/X11 \
3345 /usr/local/include/X11R6 \
3346 /usr/local/include/X11R5 \
3347 /usr/local/include/X11R4 \
3349 /usr/X386/include \
3350 /usr/x386/include \
3351 /usr/XFree86/include/X11 \
3353 /usr/include \
3354 /usr/local/include \
3355 /usr/unsupported/include \
3356 /usr/athena/include \
3357 /usr/local/x11r5/include \
3358 /usr/lpp/Xamples/include \
3360 /usr/openwin/include \
3361 /usr/openwin/share/include \
3364 if test -r "$ac_dir/$x_direct_test_include"; then
3365 ac_x_includes=$ac_dir
3366 break
3368 done
3370 rm -f conftest*
3371 fi # $ac_x_includes = NO
3373 if test "$ac_x_libraries" = NO; then
3374 # Check for the libraries.
3376 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3377 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3379 # See if we find them without any special options.
3380 # Don't add to $LIBS permanently.
3381 ac_save_LIBS="$LIBS"
3382 LIBS="-l$x_direct_test_library $LIBS"
3383 cat > conftest.$ac_ext <<EOF
3384 #line 3385 "configure"
3385 #include "confdefs.h"
3387 int main() {
3388 ${x_direct_test_function}()
3389 ; return 0; }
3391 if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392 rm -rf conftest*
3393 LIBS="$ac_save_LIBS"
3394 # We can link X programs with no special library path.
3395 ac_x_libraries=
3396 else
3397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3399 rm -rf conftest*
3400 LIBS="$ac_save_LIBS"
3401 # First see if replacing the include by lib works.
3402 # Check X11 before X11Rn because it is often a symlink to the current release.
3403 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3404 /usr/X11/lib \
3405 /usr/X11R6/lib \
3406 /usr/X11R5/lib \
3407 /usr/X11R4/lib \
3409 /usr/lib/X11 \
3410 /usr/lib/X11R6 \
3411 /usr/lib/X11R5 \
3412 /usr/lib/X11R4 \
3414 /usr/local/X11/lib \
3415 /usr/local/X11R6/lib \
3416 /usr/local/X11R5/lib \
3417 /usr/local/X11R4/lib \
3419 /usr/local/lib/X11 \
3420 /usr/local/lib/X11R6 \
3421 /usr/local/lib/X11R5 \
3422 /usr/local/lib/X11R4 \
3424 /usr/X386/lib \
3425 /usr/x386/lib \
3426 /usr/XFree86/lib/X11 \
3428 /usr/lib \
3429 /usr/local/lib \
3430 /usr/unsupported/lib \
3431 /usr/athena/lib \
3432 /usr/local/x11r5/lib \
3433 /usr/lpp/Xamples/lib \
3434 /lib/usr/lib/X11 \
3436 /usr/openwin/lib \
3437 /usr/openwin/share/lib \
3440 for ac_extension in a so sl; do
3441 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3442 ac_x_libraries=$ac_dir
3443 break 2
3445 done
3446 done
3448 rm -f conftest*
3449 fi # $ac_x_libraries = NO
3451 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3452 # Didn't find X anywhere. Cache the known absence of X.
3453 ac_cv_have_x="have_x=no"
3454 else
3455 # Record where we found X for the cache.
3456 ac_cv_have_x="have_x=yes \
3457 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3461 eval "$ac_cv_have_x"
3462 fi # $with_x != no
3464 if test "$have_x" != yes; then
3465 echo "$ac_t""$have_x" 1>&6
3466 no_x=yes
3467 else
3468 # If each of the values was on the command line, it overrides each guess.
3469 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3470 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3471 # Update the cache value to reflect the command line values.
3472 ac_cv_have_x="have_x=yes \
3473 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3474 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3477 if test "$no_x" = yes; then
3478 # Not all programs may use this symbol, but it does not hurt to define it.
3479 cat >> confdefs.h <<\EOF
3480 #define X_DISPLAY_MISSING 1
3483 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3484 else
3485 if test -n "$x_includes"; then
3486 X_CFLAGS="$X_CFLAGS -I$x_includes"
3489 # It would also be nice to do this for all -L options, not just this one.
3490 if test -n "$x_libraries"; then
3491 X_LIBS="$X_LIBS -L$x_libraries"
3492 # For Solaris; some versions of Sun CC require a space after -R and
3493 # others require no space. Words are not sufficient . . . .
3494 case "`(uname -sr) 2>/dev/null`" in
3495 "SunOS 5"*)
3496 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3497 echo "configure:3498: checking whether -R must be followed by a space" >&5
3498 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3499 cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3503 int main() {
3505 ; return 0; }
3507 if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3508 rm -rf conftest*
3509 ac_R_nospace=yes
3510 else
3511 echo "configure: failed program was:" >&5
3512 cat conftest.$ac_ext >&5
3513 rm -rf conftest*
3514 ac_R_nospace=no
3516 rm -f conftest*
3517 if test $ac_R_nospace = yes; then
3518 echo "$ac_t""no" 1>&6
3519 X_LIBS="$X_LIBS -R$x_libraries"
3520 else
3521 LIBS="$ac_xsave_LIBS -R $x_libraries"
3522 cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3526 int main() {
3528 ; return 0; }
3530 if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3531 rm -rf conftest*
3532 ac_R_space=yes
3533 else
3534 echo "configure: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3536 rm -rf conftest*
3537 ac_R_space=no
3539 rm -f conftest*
3540 if test $ac_R_space = yes; then
3541 echo "$ac_t""yes" 1>&6
3542 X_LIBS="$X_LIBS -R $x_libraries"
3543 else
3544 echo "$ac_t""neither works" 1>&6
3547 LIBS="$ac_xsave_LIBS"
3548 esac
3551 # Check for system-dependent libraries X programs must link with.
3552 # Do this before checking for the system-independent R6 libraries
3553 # (-lICE), since we may need -lsocket or whatever for X linking.
3555 if test "$ISC" = yes; then
3556 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3557 else
3558 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3559 # libraries were built with DECnet support. And karl@cs.umb.edu says
3560 # the Alpha needs dnet_stub (dnet does not exist).
3561 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3562 echo "configure:3563: checking for dnet_ntoa in -ldnet" >&5
3563 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3565 echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567 ac_save_LIBS="$LIBS"
3568 LIBS="-ldnet $LIBS"
3569 cat > conftest.$ac_ext <<EOF
3570 #line 3571 "configure"
3571 #include "confdefs.h"
3572 /* Override any gcc2 internal prototype to avoid an error. */
3573 /* We use char because int might match the return type of a gcc2
3574 builtin and then its argument prototype would still apply. */
3575 char dnet_ntoa();
3577 int main() {
3578 dnet_ntoa()
3579 ; return 0; }
3581 if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3582 rm -rf conftest*
3583 eval "ac_cv_lib_$ac_lib_var=yes"
3584 else
3585 echo "configure: failed program was:" >&5
3586 cat conftest.$ac_ext >&5
3587 rm -rf conftest*
3588 eval "ac_cv_lib_$ac_lib_var=no"
3590 rm -f conftest*
3591 LIBS="$ac_save_LIBS"
3594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3595 echo "$ac_t""yes" 1>&6
3596 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3597 else
3598 echo "$ac_t""no" 1>&6
3601 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3602 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3603 echo "configure:3604: checking for dnet_ntoa in -ldnet_stub" >&5
3604 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3605 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3606 echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608 ac_save_LIBS="$LIBS"
3609 LIBS="-ldnet_stub $LIBS"
3610 cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 /* Override any gcc2 internal prototype to avoid an error. */
3614 /* We use char because int might match the return type of a gcc2
3615 builtin and then its argument prototype would still apply. */
3616 char dnet_ntoa();
3618 int main() {
3619 dnet_ntoa()
3620 ; return 0; }
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623 rm -rf conftest*
3624 eval "ac_cv_lib_$ac_lib_var=yes"
3625 else
3626 echo "configure: failed program was:" >&5
3627 cat conftest.$ac_ext >&5
3628 rm -rf conftest*
3629 eval "ac_cv_lib_$ac_lib_var=no"
3631 rm -f conftest*
3632 LIBS="$ac_save_LIBS"
3635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3636 echo "$ac_t""yes" 1>&6
3637 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3638 else
3639 echo "$ac_t""no" 1>&6
3644 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3645 # to get the SysV transport functions.
3646 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3647 # needs -lnsl.
3648 # The nsl library prevents programs from opening the X display
3649 # on Irix 5.2, according to dickey@clark.net.
3650 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3651 echo "configure:3652: checking for gethostbyname" >&5
3652 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3653 echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655 cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 /* System header to define __stub macros and hopefully few prototypes,
3659 which can conflict with char gethostbyname(); below. */
3660 #include <assert.h>
3661 /* Override any gcc2 internal prototype to avoid an error. */
3662 /* We use char because int might match the return type of a gcc2
3663 builtin and then its argument prototype would still apply. */
3664 char gethostbyname();
3666 int main() {
3668 /* The GNU C library defines this for functions which it implements
3669 to always fail with ENOSYS. Some functions are actually named
3670 something starting with __ and the normal name is an alias. */
3671 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3672 choke me
3673 #else
3674 gethostbyname();
3675 #endif
3677 ; return 0; }
3679 if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3680 rm -rf conftest*
3681 eval "ac_cv_func_gethostbyname=yes"
3682 else
3683 echo "configure: failed program was:" >&5
3684 cat conftest.$ac_ext >&5
3685 rm -rf conftest*
3686 eval "ac_cv_func_gethostbyname=no"
3688 rm -f conftest*
3691 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3692 echo "$ac_t""yes" 1>&6
3694 else
3695 echo "$ac_t""no" 1>&6
3698 if test $ac_cv_func_gethostbyname = no; then
3699 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3700 echo "configure:3701: checking for gethostbyname in -lnsl" >&5
3701 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3703 echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705 ac_save_LIBS="$LIBS"
3706 LIBS="-lnsl $LIBS"
3707 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 /* Override any gcc2 internal prototype to avoid an error. */
3711 /* We use char because int might match the return type of a gcc2
3712 builtin and then its argument prototype would still apply. */
3713 char gethostbyname();
3715 int main() {
3716 gethostbyname()
3717 ; return 0; }
3719 if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3720 rm -rf conftest*
3721 eval "ac_cv_lib_$ac_lib_var=yes"
3722 else
3723 echo "configure: failed program was:" >&5
3724 cat conftest.$ac_ext >&5
3725 rm -rf conftest*
3726 eval "ac_cv_lib_$ac_lib_var=no"
3728 rm -f conftest*
3729 LIBS="$ac_save_LIBS"
3732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3733 echo "$ac_t""yes" 1>&6
3734 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3735 else
3736 echo "$ac_t""no" 1>&6
3741 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3742 # socket/setsockopt and other routines are undefined under SCO ODT
3743 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3744 # on later versions), says simon@lia.di.epfl.ch: it contains
3745 # gethostby* variants that don't use the nameserver (or something).
3746 # -lsocket must be given before -lnsl if both are needed.
3747 # We assume that if connect needs -lnsl, so does gethostbyname.
3748 echo $ac_n "checking for connect""... $ac_c" 1>&6
3749 echo "configure:3750: checking for connect" >&5
3750 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3751 echo $ac_n "(cached) $ac_c" 1>&6
3752 else
3753 cat > conftest.$ac_ext <<EOF
3754 #line 3755 "configure"
3755 #include "confdefs.h"
3756 /* System header to define __stub macros and hopefully few prototypes,
3757 which can conflict with char connect(); below. */
3758 #include <assert.h>
3759 /* Override any gcc2 internal prototype to avoid an error. */
3760 /* We use char because int might match the return type of a gcc2
3761 builtin and then its argument prototype would still apply. */
3762 char connect();
3764 int main() {
3766 /* The GNU C library defines this for functions which it implements
3767 to always fail with ENOSYS. Some functions are actually named
3768 something starting with __ and the normal name is an alias. */
3769 #if defined (__stub_connect) || defined (__stub___connect)
3770 choke me
3771 #else
3772 connect();
3773 #endif
3775 ; return 0; }
3777 if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3778 rm -rf conftest*
3779 eval "ac_cv_func_connect=yes"
3780 else
3781 echo "configure: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 rm -rf conftest*
3784 eval "ac_cv_func_connect=no"
3786 rm -f conftest*
3789 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3790 echo "$ac_t""yes" 1>&6
3792 else
3793 echo "$ac_t""no" 1>&6
3796 if test $ac_cv_func_connect = no; then
3797 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3798 echo "configure:3799: checking for connect in -lsocket" >&5
3799 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803 ac_save_LIBS="$LIBS"
3804 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808 /* Override any gcc2 internal prototype to avoid an error. */
3809 /* We use char because int might match the return type of a gcc2
3810 builtin and then its argument prototype would still apply. */
3811 char connect();
3813 int main() {
3814 connect()
3815 ; return 0; }
3817 if { (eval echo configure:3818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3818 rm -rf conftest*
3819 eval "ac_cv_lib_$ac_lib_var=yes"
3820 else
3821 echo "configure: failed program was:" >&5
3822 cat conftest.$ac_ext >&5
3823 rm -rf conftest*
3824 eval "ac_cv_lib_$ac_lib_var=no"
3826 rm -f conftest*
3827 LIBS="$ac_save_LIBS"
3830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3831 echo "$ac_t""yes" 1>&6
3832 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3833 else
3834 echo "$ac_t""no" 1>&6
3839 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3840 echo $ac_n "checking for remove""... $ac_c" 1>&6
3841 echo "configure:3842: checking for remove" >&5
3842 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3843 echo $ac_n "(cached) $ac_c" 1>&6
3844 else
3845 cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848 /* System header to define __stub macros and hopefully few prototypes,
3849 which can conflict with char remove(); below. */
3850 #include <assert.h>
3851 /* Override any gcc2 internal prototype to avoid an error. */
3852 /* We use char because int might match the return type of a gcc2
3853 builtin and then its argument prototype would still apply. */
3854 char remove();
3856 int main() {
3858 /* The GNU C library defines this for functions which it implements
3859 to always fail with ENOSYS. Some functions are actually named
3860 something starting with __ and the normal name is an alias. */
3861 #if defined (__stub_remove) || defined (__stub___remove)
3862 choke me
3863 #else
3864 remove();
3865 #endif
3867 ; return 0; }
3869 if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3870 rm -rf conftest*
3871 eval "ac_cv_func_remove=yes"
3872 else
3873 echo "configure: failed program was:" >&5
3874 cat conftest.$ac_ext >&5
3875 rm -rf conftest*
3876 eval "ac_cv_func_remove=no"
3878 rm -f conftest*
3881 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3882 echo "$ac_t""yes" 1>&6
3884 else
3885 echo "$ac_t""no" 1>&6
3888 if test $ac_cv_func_remove = no; then
3889 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3890 echo "configure:3891: checking for remove in -lposix" >&5
3891 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3892 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3893 echo $ac_n "(cached) $ac_c" 1>&6
3894 else
3895 ac_save_LIBS="$LIBS"
3896 LIBS="-lposix $LIBS"
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 /* Override any gcc2 internal prototype to avoid an error. */
3901 /* We use char because int might match the return type of a gcc2
3902 builtin and then its argument prototype would still apply. */
3903 char remove();
3905 int main() {
3906 remove()
3907 ; return 0; }
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3910 rm -rf conftest*
3911 eval "ac_cv_lib_$ac_lib_var=yes"
3912 else
3913 echo "configure: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3915 rm -rf conftest*
3916 eval "ac_cv_lib_$ac_lib_var=no"
3918 rm -f conftest*
3919 LIBS="$ac_save_LIBS"
3922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3923 echo "$ac_t""yes" 1>&6
3924 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3925 else
3926 echo "$ac_t""no" 1>&6
3931 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3932 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3933 echo "configure:3934: checking for shmat" >&5
3934 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3935 echo $ac_n "(cached) $ac_c" 1>&6
3936 else
3937 cat > conftest.$ac_ext <<EOF
3938 #line 3939 "configure"
3939 #include "confdefs.h"
3940 /* System header to define __stub macros and hopefully few prototypes,
3941 which can conflict with char shmat(); below. */
3942 #include <assert.h>
3943 /* Override any gcc2 internal prototype to avoid an error. */
3944 /* We use char because int might match the return type of a gcc2
3945 builtin and then its argument prototype would still apply. */
3946 char shmat();
3948 int main() {
3950 /* The GNU C library defines this for functions which it implements
3951 to always fail with ENOSYS. Some functions are actually named
3952 something starting with __ and the normal name is an alias. */
3953 #if defined (__stub_shmat) || defined (__stub___shmat)
3954 choke me
3955 #else
3956 shmat();
3957 #endif
3959 ; return 0; }
3961 if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3962 rm -rf conftest*
3963 eval "ac_cv_func_shmat=yes"
3964 else
3965 echo "configure: failed program was:" >&5
3966 cat conftest.$ac_ext >&5
3967 rm -rf conftest*
3968 eval "ac_cv_func_shmat=no"
3970 rm -f conftest*
3973 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3974 echo "$ac_t""yes" 1>&6
3976 else
3977 echo "$ac_t""no" 1>&6
3980 if test $ac_cv_func_shmat = no; then
3981 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3982 echo "configure:3983: checking for shmat in -lipc" >&5
3983 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3985 echo $ac_n "(cached) $ac_c" 1>&6
3986 else
3987 ac_save_LIBS="$LIBS"
3988 LIBS="-lipc $LIBS"
3989 cat > conftest.$ac_ext <<EOF
3990 #line 3991 "configure"
3991 #include "confdefs.h"
3992 /* Override any gcc2 internal prototype to avoid an error. */
3993 /* We use char because int might match the return type of a gcc2
3994 builtin and then its argument prototype would still apply. */
3995 char shmat();
3997 int main() {
3998 shmat()
3999 ; return 0; }
4001 if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4002 rm -rf conftest*
4003 eval "ac_cv_lib_$ac_lib_var=yes"
4004 else
4005 echo "configure: failed program was:" >&5
4006 cat conftest.$ac_ext >&5
4007 rm -rf conftest*
4008 eval "ac_cv_lib_$ac_lib_var=no"
4010 rm -f conftest*
4011 LIBS="$ac_save_LIBS"
4014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4015 echo "$ac_t""yes" 1>&6
4016 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
4017 else
4018 echo "$ac_t""no" 1>&6
4024 # Check for libraries that X11R6 Xt/Xaw programs need.
4025 ac_save_LDFLAGS="$LDFLAGS"
4026 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
4027 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
4028 # check for ICE first), but we must link in the order -lSM -lICE or
4029 # we get undefined symbols. So assume we have SM if we have ICE.
4030 # These have to be linked with before -lX11, unlike the other
4031 # libraries we check for below, so use a different variable.
4032 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
4033 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
4034 echo "configure:4035: checking for IceConnectionNumber in -lICE" >&5
4035 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
4036 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4037 echo $ac_n "(cached) $ac_c" 1>&6
4038 else
4039 ac_save_LIBS="$LIBS"
4040 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
4041 cat > conftest.$ac_ext <<EOF
4042 #line 4043 "configure"
4043 #include "confdefs.h"
4044 /* Override any gcc2 internal prototype to avoid an error. */
4045 /* We use char because int might match the return type of a gcc2
4046 builtin and then its argument prototype would still apply. */
4047 char IceConnectionNumber();
4049 int main() {
4050 IceConnectionNumber()
4051 ; return 0; }
4053 if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4054 rm -rf conftest*
4055 eval "ac_cv_lib_$ac_lib_var=yes"
4056 else
4057 echo "configure: failed program was:" >&5
4058 cat conftest.$ac_ext >&5
4059 rm -rf conftest*
4060 eval "ac_cv_lib_$ac_lib_var=no"
4062 rm -f conftest*
4063 LIBS="$ac_save_LIBS"
4066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4067 echo "$ac_t""yes" 1>&6
4068 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4069 else
4070 echo "$ac_t""no" 1>&6
4073 LDFLAGS="$ac_save_LDFLAGS"
4078 # Check whether --enable-java-awt or --disable-java-awt was given.
4079 if test "${enable_java_awt+set}" = set; then
4080 enableval="$enable_java_awt"
4085 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
4086 use_xlib_awt=""
4087 use_gtk_awt=""
4088 # The default toolkit to use is the first one specified.
4089 TOOLKIT=
4092 for peer in $peerlibs ; do
4093 case $peer in
4094 xlib)
4095 if test "$no_x" = yes; then
4096 echo "*** xlib peers requested but no X library available" 1>&2
4097 exit 1
4098 else
4099 use_xlib_awt="yes"
4100 if test -z "$TOOLKIT"; then
4101 TOOLKIT=gnu.awt.xlib.XToolkit
4105 gtk)
4106 if test "$no_x" = yes; then
4107 echo "*** xlib peers requested but no X library available" 1>&2
4108 exit 1
4109 else
4110 use_gtk_awt=yes
4111 if test -z "$TOOLKIT"; then
4112 TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
4114 test -d jniinclude || mkdir jniinclude
4118 use_xlib_awt=
4119 use_gtk_awt=
4120 break
4123 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
4124 exit 1
4125 esac
4126 done
4130 if test "$use_xlib_awt" = yes; then
4131 XLIB_AWT_TRUE=
4132 XLIB_AWT_FALSE='#'
4133 else
4134 XLIB_AWT_TRUE='#'
4135 XLIB_AWT_FALSE=
4139 if test "$use_gtk_awt" = yes; then
4140 GTK_AWT_TRUE=
4141 GTK_AWT_FALSE='#'
4142 else
4143 GTK_AWT_TRUE='#'
4144 GTK_AWT_FALSE=
4148 libsubdir=.libs
4150 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
4151 echo "configure:4152: checking for garbage collector to use" >&5
4152 # Check whether --enable-java-gc or --disable-java-gc was given.
4153 if test "${enable_java_gc+set}" = set; then
4154 enableval="$enable_java_gc"
4156 GC=$enableval
4157 else
4158 GC=boehm
4161 GCLIBS=
4162 GCINCS=
4163 GCDEPS=
4164 GCOBJS=
4165 GCSPEC=
4166 JC1GCSPEC=
4167 GCTESTSPEC=
4168 case "$GC" in
4169 boehm)
4170 echo "$ac_t""boehm" 1>&6
4171 GCLIBS=../boehm-gc/libgcjgc_convenience.la
4172 JC1GCSPEC='-fuse-boehm-gc'
4173 GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
4175 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 THREADCXXFLAGS=
4233 THREADLDFLAGS=
4234 THREADLIBS=
4235 THREADINCS=
4236 THREADDEPS=
4237 THREADOBJS=
4238 THREADH=
4239 THREADSPEC=
4240 case "$THREADS" in
4241 posix)
4242 case "$host" in
4243 *-*-cygwin*)
4244 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
4247 *-*-freebsd[1234]*)
4249 # Before FreeBSD 5, it didn't have -lpthread (or any library which
4250 # merely adds pthread_* functions) but it does have a -pthread switch
4251 # which is required at link-time to select -lc_r *instead* of -lc.
4252 THREADLDFLAGS=-pthread
4253 # Don't set THREADSPEC here as might be expected since -pthread is
4254 # not processed when found within a spec file, it must come from
4255 # the command line. For now, the user must provide the -pthread
4256 # switch to link code compiled with gcj. In future, consider adding
4257 # support for weak references to pthread_* functions ala gthr.h API.
4258 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
4260 *-*-freebsd*)
4261 # FreeBSD 5 implements a model much closer to other modern UNIX
4262 # which support threads. However, it still does not support
4263 # -lpthread.
4264 THREADLDFLAGS=-pthread
4265 THREADSPEC=-lc_r
4267 alpha*-dec-osf*)
4268 THREADCXXFLAGS=-pthread
4269 # boehm-gc needs some functions from librt, so link that too.
4270 THREADLIBS='-lpthread -lrt'
4271 THREADSPEC='-lpthread -lrt'
4274 THREADLIBS=-lpthread
4275 THREADSPEC=-lpthread
4277 esac
4278 THREADOBJS=posix-threads.lo
4279 THREADH=posix-threads.h
4280 # MIT pthreads doesn't seem to have the mutexattr functions.
4281 # But for now we don't check for it. We just assume you aren't
4282 # using MIT pthreads.
4283 cat >> confdefs.h <<\EOF
4284 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4288 # If we're using the Boehm GC, then we happen to know that it
4289 # defines _REENTRANT, so we don't bother. Eww.
4290 if test "$GC" != boehm; then
4291 cat >> confdefs.h <<\EOF
4292 #define _REENTRANT 1
4296 cat >> confdefs.h <<\EOF
4297 #define _POSIX_PTHREAD_SEMANTICS 1
4302 win32)
4303 THREADOBJS=win32-threads.lo
4304 THREADH=win32-threads.h
4307 none)
4308 THREADOBJS=no-threads.lo
4309 THREADH=no-threads.h
4311 esac
4321 if test -d sysdep; then true; else mkdir sysdep; fi
4324 HASH_SYNC_SPEC=
4325 # Hash synchronization is only useful with posix threads right now.
4326 if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then
4327 HASH_SYNC_SPEC=-fhash-synchronization
4328 cat >> confdefs.h <<\EOF
4329 #define JV_HASH_SYNCHRONIZATION 1
4338 if test "$GCC" = yes; then
4339 USING_GCC_TRUE=
4340 USING_GCC_FALSE='#'
4341 else
4342 USING_GCC_TRUE='#'
4343 USING_GCC_FALSE=
4346 CANADIAN=no
4347 NULL_TARGET=no
4348 NATIVE=yes
4350 # We're in the tree with gcc, and need to include some of its headers.
4351 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
4353 # Figure out where generated headers like libgcj-config.h get installed.
4354 gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
4355 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4356 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4357 tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include
4361 if test "x${with_newlib}" = "xyes"; then
4362 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
4363 # may not work correctly, because the compiler may not be able to
4364 # link executables.
4366 # We assume newlib. This lets us hard-code the functions we know
4367 # we'll have.
4368 cat >> confdefs.h <<\EOF
4369 #define HAVE_MEMMOVE 1
4372 cat >> confdefs.h <<\EOF
4373 #define HAVE_MEMCPY 1
4376 cat >> confdefs.h <<\EOF
4377 #define HAVE_STRERROR 1
4380 cat >> confdefs.h <<\EOF
4381 #define HAVE_TIME 1
4384 cat >> confdefs.h <<\EOF
4385 #define HAVE_GMTIME_R 1
4388 cat >> confdefs.h <<\EOF
4389 #define HAVE_LOCALTIME_R 1
4392 cat >> confdefs.h <<\EOF
4393 #define HAVE_USLEEP_DECL 1
4396 cat >> confdefs.h <<\EOF
4397 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4400 cat >> confdefs.h <<\EOF
4401 #define HAVE_ALLOCA 1
4405 cat >> confdefs.h <<\EOF
4406 #define NO_GETUID 1
4409 PLATFORMNET=NoNet
4410 else
4411 for ac_func in strerror ioctl select fstat open fsync sleep opendir
4413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4414 echo "configure:4415: checking for $ac_func" >&5
4415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4416 echo $ac_n "(cached) $ac_c" 1>&6
4417 else
4418 cat > conftest.$ac_ext <<EOF
4419 #line 4420 "configure"
4420 #include "confdefs.h"
4421 /* System header to define __stub macros and hopefully few prototypes,
4422 which can conflict with char $ac_func(); below. */
4423 #include <assert.h>
4424 /* Override any gcc2 internal prototype to avoid an error. */
4425 /* We use char because int might match the return type of a gcc2
4426 builtin and then its argument prototype would still apply. */
4427 char $ac_func();
4429 int main() {
4431 /* The GNU C library defines this for functions which it implements
4432 to always fail with ENOSYS. Some functions are actually named
4433 something starting with __ and the normal name is an alias. */
4434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4435 choke me
4436 #else
4437 $ac_func();
4438 #endif
4440 ; return 0; }
4442 if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4443 rm -rf conftest*
4444 eval "ac_cv_func_$ac_func=yes"
4445 else
4446 echo "configure: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
4448 rm -rf conftest*
4449 eval "ac_cv_func_$ac_func=no"
4451 rm -f conftest*
4454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4455 echo "$ac_t""yes" 1>&6
4456 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4457 cat >> confdefs.h <<EOF
4458 #define $ac_tr_func 1
4461 else
4462 echo "$ac_t""no" 1>&6
4464 done
4466 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
4468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4469 echo "configure:4470: checking for $ac_func" >&5
4470 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4471 echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473 cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 /* System header to define __stub macros and hopefully few prototypes,
4477 which can conflict with char $ac_func(); below. */
4478 #include <assert.h>
4479 /* Override any gcc2 internal prototype to avoid an error. */
4480 /* We use char because int might match the return type of a gcc2
4481 builtin and then its argument prototype would still apply. */
4482 char $ac_func();
4484 int main() {
4486 /* The GNU C library defines this for functions which it implements
4487 to always fail with ENOSYS. Some functions are actually named
4488 something starting with __ and the normal name is an alias. */
4489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4490 choke me
4491 #else
4492 $ac_func();
4493 #endif
4495 ; return 0; }
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4498 rm -rf conftest*
4499 eval "ac_cv_func_$ac_func=yes"
4500 else
4501 echo "configure: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 rm -rf conftest*
4504 eval "ac_cv_func_$ac_func=no"
4506 rm -f conftest*
4509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4510 echo "$ac_t""yes" 1>&6
4511 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4512 cat >> confdefs.h <<EOF
4513 #define $ac_tr_func 1
4516 else
4517 echo "$ac_t""no" 1>&6
4519 done
4521 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
4523 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4524 echo "configure:4525: checking for $ac_func" >&5
4525 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4526 echo $ac_n "(cached) $ac_c" 1>&6
4527 else
4528 cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531 /* System header to define __stub macros and hopefully few prototypes,
4532 which can conflict with char $ac_func(); below. */
4533 #include <assert.h>
4534 /* Override any gcc2 internal prototype to avoid an error. */
4535 /* We use char because int might match the return type of a gcc2
4536 builtin and then its argument prototype would still apply. */
4537 char $ac_func();
4539 int main() {
4541 /* The GNU C library defines this for functions which it implements
4542 to always fail with ENOSYS. Some functions are actually named
4543 something starting with __ and the normal name is an alias. */
4544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4545 choke me
4546 #else
4547 $ac_func();
4548 #endif
4550 ; return 0; }
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4553 rm -rf conftest*
4554 eval "ac_cv_func_$ac_func=yes"
4555 else
4556 echo "configure: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 rm -rf conftest*
4559 eval "ac_cv_func_$ac_func=no"
4561 rm -f conftest*
4564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4565 echo "$ac_t""yes" 1>&6
4566 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4567 cat >> confdefs.h <<EOF
4568 #define $ac_tr_func 1
4571 else
4572 echo "$ac_t""no" 1>&6
4574 done
4576 for ac_func in nl_langinfo setlocale
4578 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4579 echo "configure:4580: checking for $ac_func" >&5
4580 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4581 echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* System header to define __stub macros and hopefully few prototypes,
4587 which can conflict with char $ac_func(); below. */
4588 #include <assert.h>
4589 /* Override any gcc2 internal prototype to avoid an error. */
4590 /* We use char because int might match the return type of a gcc2
4591 builtin and then its argument prototype would still apply. */
4592 char $ac_func();
4594 int main() {
4596 /* The GNU C library defines this for functions which it implements
4597 to always fail with ENOSYS. Some functions are actually named
4598 something starting with __ and the normal name is an alias. */
4599 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4600 choke me
4601 #else
4602 $ac_func();
4603 #endif
4605 ; return 0; }
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4608 rm -rf conftest*
4609 eval "ac_cv_func_$ac_func=yes"
4610 else
4611 echo "configure: failed program was:" >&5
4612 cat conftest.$ac_ext >&5
4613 rm -rf conftest*
4614 eval "ac_cv_func_$ac_func=no"
4616 rm -f conftest*
4619 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4620 echo "$ac_t""yes" 1>&6
4621 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4622 cat >> confdefs.h <<EOF
4623 #define $ac_tr_func 1
4626 else
4627 echo "$ac_t""no" 1>&6
4629 done
4631 for ac_func in inet_aton inet_addr
4633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4634 echo "configure:4635: checking for $ac_func" >&5
4635 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4636 echo $ac_n "(cached) $ac_c" 1>&6
4637 else
4638 cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 /* System header to define __stub macros and hopefully few prototypes,
4642 which can conflict with char $ac_func(); below. */
4643 #include <assert.h>
4644 /* Override any gcc2 internal prototype to avoid an error. */
4645 /* We use char because int might match the return type of a gcc2
4646 builtin and then its argument prototype would still apply. */
4647 char $ac_func();
4649 int main() {
4651 /* The GNU C library defines this for functions which it implements
4652 to always fail with ENOSYS. Some functions are actually named
4653 something starting with __ and the normal name is an alias. */
4654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4655 choke me
4656 #else
4657 $ac_func();
4658 #endif
4660 ; return 0; }
4662 if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4663 rm -rf conftest*
4664 eval "ac_cv_func_$ac_func=yes"
4665 else
4666 echo "configure: failed program was:" >&5
4667 cat conftest.$ac_ext >&5
4668 rm -rf conftest*
4669 eval "ac_cv_func_$ac_func=no"
4671 rm -f conftest*
4674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4675 echo "$ac_t""yes" 1>&6
4676 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4677 cat >> confdefs.h <<EOF
4678 #define $ac_tr_func 1
4680 break
4681 else
4682 echo "$ac_t""no" 1>&6
4684 done
4686 for ac_func in inet_pton uname inet_ntoa
4688 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4689 echo "configure:4690: checking for $ac_func" >&5
4690 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4691 echo $ac_n "(cached) $ac_c" 1>&6
4692 else
4693 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696 /* System header to define __stub macros and hopefully few prototypes,
4697 which can conflict with char $ac_func(); below. */
4698 #include <assert.h>
4699 /* Override any gcc2 internal prototype to avoid an error. */
4700 /* We use char because int might match the return type of a gcc2
4701 builtin and then its argument prototype would still apply. */
4702 char $ac_func();
4704 int main() {
4706 /* The GNU C library defines this for functions which it implements
4707 to always fail with ENOSYS. Some functions are actually named
4708 something starting with __ and the normal name is an alias. */
4709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4710 choke me
4711 #else
4712 $ac_func();
4713 #endif
4715 ; return 0; }
4717 if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718 rm -rf conftest*
4719 eval "ac_cv_func_$ac_func=yes"
4720 else
4721 echo "configure: failed program was:" >&5
4722 cat conftest.$ac_ext >&5
4723 rm -rf conftest*
4724 eval "ac_cv_func_$ac_func=no"
4726 rm -f conftest*
4729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4730 echo "$ac_t""yes" 1>&6
4731 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4732 cat >> confdefs.h <<EOF
4733 #define $ac_tr_func 1
4736 else
4737 echo "$ac_t""no" 1>&6
4739 done
4741 for ac_func in fork execvp pipe sigaction ftruncate
4743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4744 echo "configure:4745: checking for $ac_func" >&5
4745 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4746 echo $ac_n "(cached) $ac_c" 1>&6
4747 else
4748 cat > conftest.$ac_ext <<EOF
4749 #line 4750 "configure"
4750 #include "confdefs.h"
4751 /* System header to define __stub macros and hopefully few prototypes,
4752 which can conflict with char $ac_func(); below. */
4753 #include <assert.h>
4754 /* Override any gcc2 internal prototype to avoid an error. */
4755 /* We use char because int might match the return type of a gcc2
4756 builtin and then its argument prototype would still apply. */
4757 char $ac_func();
4759 int main() {
4761 /* The GNU C library defines this for functions which it implements
4762 to always fail with ENOSYS. Some functions are actually named
4763 something starting with __ and the normal name is an alias. */
4764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4765 choke me
4766 #else
4767 $ac_func();
4768 #endif
4770 ; return 0; }
4772 if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773 rm -rf conftest*
4774 eval "ac_cv_func_$ac_func=yes"
4775 else
4776 echo "configure: failed program was:" >&5
4777 cat conftest.$ac_ext >&5
4778 rm -rf conftest*
4779 eval "ac_cv_func_$ac_func=no"
4781 rm -f conftest*
4784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4785 echo "$ac_t""yes" 1>&6
4786 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4787 cat >> confdefs.h <<EOF
4788 #define $ac_tr_func 1
4791 else
4792 echo "$ac_t""no" 1>&6
4794 done
4796 for ac_hdr in execinfo.h unistd.h dlfcn.h
4798 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4799 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4800 echo "configure:4801: checking for $ac_hdr" >&5
4801 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4802 echo $ac_n "(cached) $ac_c" 1>&6
4803 else
4804 cat > conftest.$ac_ext <<EOF
4805 #line 4806 "configure"
4806 #include "confdefs.h"
4807 #include <$ac_hdr>
4809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4810 { (eval echo configure:4811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4812 if test -z "$ac_err"; then
4813 rm -rf conftest*
4814 eval "ac_cv_header_$ac_safe=yes"
4815 else
4816 echo "$ac_err" >&5
4817 echo "configure: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 rm -rf conftest*
4820 eval "ac_cv_header_$ac_safe=no"
4822 rm -f conftest*
4824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4825 echo "$ac_t""yes" 1>&6
4826 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4827 cat >> confdefs.h <<EOF
4828 #define $ac_tr_hdr 1
4831 else
4832 echo "$ac_t""no" 1>&6
4834 done
4836 echo $ac_n "checking for backtrace""... $ac_c" 1>&6
4837 echo "configure:4838: checking for backtrace" >&5
4838 if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then
4839 echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841 cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844 /* System header to define __stub macros and hopefully few prototypes,
4845 which can conflict with char backtrace(); below. */
4846 #include <assert.h>
4847 /* Override any gcc2 internal prototype to avoid an error. */
4848 /* We use char because int might match the return type of a gcc2
4849 builtin and then its argument prototype would still apply. */
4850 char backtrace();
4852 int main() {
4854 /* The GNU C library defines this for functions which it implements
4855 to always fail with ENOSYS. Some functions are actually named
4856 something starting with __ and the normal name is an alias. */
4857 #if defined (__stub_backtrace) || defined (__stub___backtrace)
4858 choke me
4859 #else
4860 backtrace();
4861 #endif
4863 ; return 0; }
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866 rm -rf conftest*
4867 eval "ac_cv_func_backtrace=yes"
4868 else
4869 echo "configure: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4871 rm -rf conftest*
4872 eval "ac_cv_func_backtrace=no"
4874 rm -f conftest*
4877 if eval "test \"`echo '$ac_cv_func_'backtrace`\" = yes"; then
4878 echo "$ac_t""yes" 1>&6
4880 case "$host" in
4881 ia64-*-linux*)
4882 # Has broken backtrace()
4884 mips*-*-linux*)
4885 # Has broken backtrace(), but we supply our own.
4886 if test -d sysdep; then true; else mkdir -p sysdep; fi
4887 EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc"
4888 cat >> confdefs.h <<\EOF
4889 #define HAVE_BACKTRACE 1
4894 cat >> confdefs.h <<\EOF
4895 #define HAVE_BACKTRACE 1
4899 esac
4901 else
4902 echo "$ac_t""no" 1>&6
4904 case "$host" in
4905 *mingw*)
4906 # Has backtrace() defined in libgcj itself
4907 cat >> confdefs.h <<\EOF
4908 #define HAVE_BACKTRACE 1
4912 esac
4917 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
4918 echo "configure:4919: checking for dladdr in -ldl" >&5
4919 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
4920 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4921 echo $ac_n "(cached) $ac_c" 1>&6
4922 else
4923 ac_save_LIBS="$LIBS"
4924 LIBS="-ldl $LIBS"
4925 cat > conftest.$ac_ext <<EOF
4926 #line 4927 "configure"
4927 #include "confdefs.h"
4928 /* Override any gcc2 internal prototype to avoid an error. */
4929 /* We use char because int might match the return type of a gcc2
4930 builtin and then its argument prototype would still apply. */
4931 char dladdr();
4933 int main() {
4934 dladdr()
4935 ; return 0; }
4937 if { (eval echo configure:4938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4938 rm -rf conftest*
4939 eval "ac_cv_lib_$ac_lib_var=yes"
4940 else
4941 echo "configure: failed program was:" >&5
4942 cat conftest.$ac_ext >&5
4943 rm -rf conftest*
4944 eval "ac_cv_lib_$ac_lib_var=no"
4946 rm -f conftest*
4947 LIBS="$ac_save_LIBS"
4950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4951 echo "$ac_t""yes" 1>&6
4953 if test "x${disable_dladdr}" = "xyes"; then
4954 #Broken dladdr().
4955 true
4956 else
4957 cat >> confdefs.h <<\EOF
4958 #define HAVE_DLADDR 1
4963 else
4964 echo "$ac_t""no" 1>&6
4967 if test x"$build" = x"$host"; then
4968 for ac_file in /proc/self/exe
4971 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
4972 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
4973 echo "configure:4974: checking for $ac_file" >&5
4974 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
4975 echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977 if test "$cross_compiling" = yes; then
4978 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
4979 else
4980 if test -r $ac_file; then
4981 eval "ac_cv_file_$ac_safe=yes"
4982 else
4983 eval "ac_cv_file_$ac_safe=no"
4987 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
4988 echo "$ac_t""yes" 1>&6
4989 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4990 cat >> confdefs.h <<EOF
4991 #define $ac_tr_file 1
4994 cat >> confdefs.h <<\EOF
4995 #define HAVE_PROC_SELF_EXE 1
4998 else
4999 echo "$ac_t""no" 1>&6
5002 done
5004 else
5005 case $host in
5006 *-linux*)
5007 cat >> confdefs.h <<\EOF
5008 #define HAVE_PROC_SELF_EXE 1
5012 esac
5017 am_cv_lib_iconv_ldpath=
5018 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5019 if test "${with_libiconv_prefix+set}" = set; then
5020 withval="$with_libiconv_prefix"
5022 for dir in `echo "$withval" | tr : ' '`; do
5023 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5024 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5025 done
5030 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5031 echo "configure:5032: checking for iconv" >&5
5032 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5033 echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5036 am_cv_func_iconv="no, consider installing GNU libiconv"
5037 am_cv_lib_iconv=no
5038 cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041 #include <stdlib.h>
5042 #include <iconv.h>
5043 int main() {
5044 iconv_t cd = iconv_open("","");
5045 iconv(cd,NULL,NULL,NULL,NULL);
5046 iconv_close(cd);
5047 ; return 0; }
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050 rm -rf conftest*
5051 am_cv_func_iconv=yes
5052 else
5053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
5056 rm -f conftest*
5057 if test "$am_cv_func_iconv" != yes; then
5058 am_save_LIBS="$LIBS"
5059 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5060 cat > conftest.$ac_ext <<EOF
5061 #line 5062 "configure"
5062 #include "confdefs.h"
5063 #include <stdlib.h>
5064 #include <iconv.h>
5065 int main() {
5066 iconv_t cd = iconv_open("","");
5067 iconv(cd,NULL,NULL,NULL,NULL);
5068 iconv_close(cd);
5069 ; return 0; }
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072 rm -rf conftest*
5073 am_cv_lib_iconv=yes
5074 am_cv_func_iconv=yes
5075 else
5076 echo "configure: failed program was:" >&5
5077 cat conftest.$ac_ext >&5
5079 rm -f conftest*
5080 LIBS="$am_save_LIBS"
5085 echo "$ac_t""$am_cv_func_iconv" 1>&6
5086 if test "$am_cv_func_iconv" = yes; then
5087 cat >> confdefs.h <<\EOF
5088 #define HAVE_ICONV 1
5091 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5092 echo "configure:5093: checking for iconv declaration" >&5
5093 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5094 echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5101 #include <stdlib.h>
5102 #include <iconv.h>
5103 extern
5104 #ifdef __cplusplus
5106 #endif
5107 #if defined(__STDC__) || defined(__cplusplus)
5108 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5109 #else
5110 size_t iconv();
5111 #endif
5113 int main() {
5115 ; return 0; }
5117 if { (eval echo configure:5118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5118 rm -rf conftest*
5119 am_cv_proto_iconv_arg1=""
5120 else
5121 echo "configure: failed program was:" >&5
5122 cat conftest.$ac_ext >&5
5123 rm -rf conftest*
5124 am_cv_proto_iconv_arg1="const"
5126 rm -f conftest*
5127 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);"
5130 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5131 echo "$ac_t""${ac_t:-
5132 }$am_cv_proto_iconv" 1>&6
5133 cat >> confdefs.h <<EOF
5134 #define ICONV_CONST $am_cv_proto_iconv_arg1
5138 LIBICONV=
5139 if test "$am_cv_lib_iconv" = yes; then
5140 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5144 for ac_hdr in locale.h
5146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5148 echo "configure:5149: checking for $ac_hdr" >&5
5149 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5150 echo $ac_n "(cached) $ac_c" 1>&6
5151 else
5152 cat > conftest.$ac_ext <<EOF
5153 #line 5154 "configure"
5154 #include "confdefs.h"
5155 #include <$ac_hdr>
5157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5158 { (eval echo configure:5159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5160 if test -z "$ac_err"; then
5161 rm -rf conftest*
5162 eval "ac_cv_header_$ac_safe=yes"
5163 else
5164 echo "$ac_err" >&5
5165 echo "configure: failed program was:" >&5
5166 cat conftest.$ac_ext >&5
5167 rm -rf conftest*
5168 eval "ac_cv_header_$ac_safe=no"
5170 rm -f conftest*
5172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5173 echo "$ac_t""yes" 1>&6
5174 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5175 cat >> confdefs.h <<EOF
5176 #define $ac_tr_hdr 1
5179 else
5180 echo "$ac_t""no" 1>&6
5182 done
5184 if test $ac_cv_header_locale_h = yes; then
5185 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5186 echo "configure:5187: checking for LC_MESSAGES" >&5
5187 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5188 echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190 cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193 #include <locale.h>
5194 int main() {
5195 return LC_MESSAGES
5196 ; return 0; }
5198 if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5199 rm -rf conftest*
5200 am_cv_val_LC_MESSAGES=yes
5201 else
5202 echo "configure: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 rm -rf conftest*
5205 am_cv_val_LC_MESSAGES=no
5207 rm -f conftest*
5210 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5211 if test $am_cv_val_LC_MESSAGES = yes; then
5212 cat >> confdefs.h <<\EOF
5213 #define HAVE_LC_MESSAGES 1
5218 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5219 echo "configure:5220: checking whether struct tm is in sys/time.h or time.h" >&5
5220 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5221 echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223 cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226 #include <sys/types.h>
5227 #include <time.h>
5228 int main() {
5229 struct tm *tp; tp->tm_sec;
5230 ; return 0; }
5232 if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5233 rm -rf conftest*
5234 ac_cv_struct_tm=time.h
5235 else
5236 echo "configure: failed program was:" >&5
5237 cat conftest.$ac_ext >&5
5238 rm -rf conftest*
5239 ac_cv_struct_tm=sys/time.h
5241 rm -f conftest*
5244 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5245 if test $ac_cv_struct_tm = sys/time.h; then
5246 cat >> confdefs.h <<\EOF
5247 #define TM_IN_SYS_TIME 1
5252 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5253 echo "configure:5254: checking for tm_zone in struct tm" >&5
5254 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5255 echo $ac_n "(cached) $ac_c" 1>&6
5256 else
5257 cat > conftest.$ac_ext <<EOF
5258 #line 5259 "configure"
5259 #include "confdefs.h"
5260 #include <sys/types.h>
5261 #include <$ac_cv_struct_tm>
5262 int main() {
5263 struct tm tm; tm.tm_zone;
5264 ; return 0; }
5266 if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5267 rm -rf conftest*
5268 ac_cv_struct_tm_zone=yes
5269 else
5270 echo "configure: failed program was:" >&5
5271 cat conftest.$ac_ext >&5
5272 rm -rf conftest*
5273 ac_cv_struct_tm_zone=no
5275 rm -f conftest*
5278 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5279 if test "$ac_cv_struct_tm_zone" = yes; then
5280 cat >> confdefs.h <<\EOF
5281 #define HAVE_TM_ZONE 1
5284 else
5285 echo $ac_n "checking for tzname""... $ac_c" 1>&6
5286 echo "configure:5287: checking for tzname" >&5
5287 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5288 echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290 cat > conftest.$ac_ext <<EOF
5291 #line 5292 "configure"
5292 #include "confdefs.h"
5293 #include <time.h>
5294 #ifndef tzname /* For SGI. */
5295 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
5296 #endif
5297 int main() {
5298 atoi(*tzname);
5299 ; return 0; }
5301 if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5302 rm -rf conftest*
5303 ac_cv_var_tzname=yes
5304 else
5305 echo "configure: failed program was:" >&5
5306 cat conftest.$ac_ext >&5
5307 rm -rf conftest*
5308 ac_cv_var_tzname=no
5310 rm -f conftest*
5313 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5314 if test $ac_cv_var_tzname = yes; then
5315 cat >> confdefs.h <<\EOF
5316 #define HAVE_TZNAME 1
5323 for ac_func in gethostbyname_r
5325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5326 echo "configure:5327: checking for $ac_func" >&5
5327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5328 echo $ac_n "(cached) $ac_c" 1>&6
5329 else
5330 cat > conftest.$ac_ext <<EOF
5331 #line 5332 "configure"
5332 #include "confdefs.h"
5333 /* System header to define __stub macros and hopefully few prototypes,
5334 which can conflict with char $ac_func(); below. */
5335 #include <assert.h>
5336 /* Override any gcc2 internal prototype to avoid an error. */
5337 /* We use char because int might match the return type of a gcc2
5338 builtin and then its argument prototype would still apply. */
5339 char $ac_func();
5341 int main() {
5343 /* The GNU C library defines this for functions which it implements
5344 to always fail with ENOSYS. Some functions are actually named
5345 something starting with __ and the normal name is an alias. */
5346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5347 choke me
5348 #else
5349 $ac_func();
5350 #endif
5352 ; return 0; }
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355 rm -rf conftest*
5356 eval "ac_cv_func_$ac_func=yes"
5357 else
5358 echo "configure: failed program was:" >&5
5359 cat conftest.$ac_ext >&5
5360 rm -rf conftest*
5361 eval "ac_cv_func_$ac_func=no"
5363 rm -f conftest*
5366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5367 echo "$ac_t""yes" 1>&6
5368 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5369 cat >> confdefs.h <<EOF
5370 #define $ac_tr_func 1
5373 cat >> confdefs.h <<\EOF
5374 #define HAVE_GETHOSTBYNAME_R 1
5377 # There are two different kinds of gethostbyname_r.
5378 # We look for the one that returns `int'.
5379 # Hopefully this check is robust enough.
5380 cat > conftest.$ac_ext <<EOF
5381 #line 5382 "configure"
5382 #include "confdefs.h"
5383 #include <netdb.h>
5385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5386 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
5387 rm -rf conftest*
5389 cat >> confdefs.h <<\EOF
5390 #define GETHOSTBYNAME_R_RETURNS_INT 1
5394 rm -f conftest*
5397 case " $GCINCS " in
5398 *" -D_REENTRANT "*) ;;
5400 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
5401 echo "configure:5402: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
5402 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
5403 echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5406 ac_ext=C
5407 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5408 ac_cpp='$CXXCPP $CPPFLAGS'
5409 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5410 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5411 cross_compiling=$ac_cv_prog_cxx_cross
5413 cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416 #include <netdb.h>
5417 int main() {
5418 gethostbyname_r("", 0, 0);
5419 ; return 0; }
5421 if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5422 rm -rf conftest*
5423 libjava_cv_gethostbyname_r_needs_reentrant=no
5424 else
5425 echo "configure: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
5427 rm -rf conftest*
5428 CPPFLAGS_SAVE="$CPPFLAGS"
5429 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5430 cat > conftest.$ac_ext <<EOF
5431 #line 5432 "configure"
5432 #include "confdefs.h"
5433 #include <netdb.h>
5434 int main() {
5435 gethostbyname_r("", 0, 0);
5436 ; return 0; }
5438 if { (eval echo configure:5439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5439 rm -rf conftest*
5440 libjava_cv_gethostbyname_r_needs_reentrant=yes
5441 else
5442 echo "configure: failed program was:" >&5
5443 cat conftest.$ac_ext >&5
5444 rm -rf conftest*
5445 libjava_cv_gethostbyname_r_needs_reentrant=fail
5447 rm -f conftest*
5448 CPPFLAGS="$CPPFLAGS_SAVE"
5451 rm -f conftest*
5452 ac_ext=c
5453 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5454 ac_cpp='$CPP $CPPFLAGS'
5455 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5456 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5457 cross_compiling=$ac_cv_prog_cc_cross
5462 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
5463 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
5464 cat >> confdefs.h <<\EOF
5465 #define _REENTRANT 1
5470 esac
5472 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
5473 echo "configure:5474: checking for struct hostent_data" >&5
5474 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
5475 echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477 cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5481 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
5482 # define _REENTRANT 1
5483 #endif
5484 #include <netdb.h>
5485 int main() {
5486 struct hostent_data data;
5487 ; return 0; }
5489 if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5490 rm -rf conftest*
5491 libjava_cv_struct_hostent_data=yes
5492 else
5493 echo "configure: failed program was:" >&5
5494 cat conftest.$ac_ext >&5
5495 rm -rf conftest*
5496 libjava_cv_struct_hostent_data=no
5498 rm -f conftest*
5501 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
5502 if test "x$libjava_cv_struct_hostent_data" = xyes; then
5503 cat >> confdefs.h <<\EOF
5504 #define HAVE_STRUCT_HOSTENT_DATA 1
5509 else
5510 echo "$ac_t""no" 1>&6
5512 done
5515 # FIXME: libjava source code expects to find a prototype for
5516 # gethostbyaddr_r in netdb.h. The outer check ensures that
5517 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
5518 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
5519 # linkage check is enough, yet C++ code requires proper prototypes.)
5520 cat > conftest.$ac_ext <<EOF
5521 #line 5522 "configure"
5522 #include "confdefs.h"
5523 #include <netdb.h>
5525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5526 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
5527 rm -rf conftest*
5529 for ac_func in gethostbyaddr_r
5531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5532 echo "configure:5533: checking for $ac_func" >&5
5533 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5534 echo $ac_n "(cached) $ac_c" 1>&6
5535 else
5536 cat > conftest.$ac_ext <<EOF
5537 #line 5538 "configure"
5538 #include "confdefs.h"
5539 /* System header to define __stub macros and hopefully few prototypes,
5540 which can conflict with char $ac_func(); below. */
5541 #include <assert.h>
5542 /* Override any gcc2 internal prototype to avoid an error. */
5543 /* We use char because int might match the return type of a gcc2
5544 builtin and then its argument prototype would still apply. */
5545 char $ac_func();
5547 int main() {
5549 /* The GNU C library defines this for functions which it implements
5550 to always fail with ENOSYS. Some functions are actually named
5551 something starting with __ and the normal name is an alias. */
5552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5553 choke me
5554 #else
5555 $ac_func();
5556 #endif
5558 ; return 0; }
5560 if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5561 rm -rf conftest*
5562 eval "ac_cv_func_$ac_func=yes"
5563 else
5564 echo "configure: failed program was:" >&5
5565 cat conftest.$ac_ext >&5
5566 rm -rf conftest*
5567 eval "ac_cv_func_$ac_func=no"
5569 rm -f conftest*
5572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5573 echo "$ac_t""yes" 1>&6
5574 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5575 cat >> confdefs.h <<EOF
5576 #define $ac_tr_func 1
5579 cat >> confdefs.h <<\EOF
5580 #define HAVE_GETHOSTBYADDR_R 1
5583 # There are two different kinds of gethostbyaddr_r.
5584 # We look for the one that returns `int'.
5585 # Hopefully this check is robust enough.
5586 cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 #include <netdb.h>
5591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5592 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
5593 rm -rf conftest*
5595 cat >> confdefs.h <<\EOF
5596 #define GETHOSTBYADDR_R_RETURNS_INT 1
5600 rm -f conftest*
5602 else
5603 echo "$ac_t""no" 1>&6
5605 done
5608 rm -f conftest*
5611 for ac_func in gethostname
5613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5614 echo "configure:5615: checking for $ac_func" >&5
5615 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5616 echo $ac_n "(cached) $ac_c" 1>&6
5617 else
5618 cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621 /* System header to define __stub macros and hopefully few prototypes,
5622 which can conflict with char $ac_func(); below. */
5623 #include <assert.h>
5624 /* Override any gcc2 internal prototype to avoid an error. */
5625 /* We use char because int might match the return type of a gcc2
5626 builtin and then its argument prototype would still apply. */
5627 char $ac_func();
5629 int main() {
5631 /* The GNU C library defines this for functions which it implements
5632 to always fail with ENOSYS. Some functions are actually named
5633 something starting with __ and the normal name is an alias. */
5634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5635 choke me
5636 #else
5637 $ac_func();
5638 #endif
5640 ; return 0; }
5642 if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5643 rm -rf conftest*
5644 eval "ac_cv_func_$ac_func=yes"
5645 else
5646 echo "configure: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 rm -rf conftest*
5649 eval "ac_cv_func_$ac_func=no"
5651 rm -f conftest*
5654 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5655 echo "$ac_t""yes" 1>&6
5656 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5657 cat >> confdefs.h <<EOF
5658 #define $ac_tr_func 1
5661 cat >> confdefs.h <<\EOF
5662 #define HAVE_GETHOSTNAME 1
5665 cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 #include <unistd.h>
5670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5671 egrep "gethostname" >/dev/null 2>&1; then
5672 rm -rf conftest*
5674 cat >> confdefs.h <<\EOF
5675 #define HAVE_GETHOSTNAME_DECL 1
5679 rm -f conftest*
5681 else
5682 echo "$ac_t""no" 1>&6
5684 done
5687 for ac_func in usleep
5689 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5690 echo "configure:5691: checking for $ac_func" >&5
5691 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5692 echo $ac_n "(cached) $ac_c" 1>&6
5693 else
5694 cat > conftest.$ac_ext <<EOF
5695 #line 5696 "configure"
5696 #include "confdefs.h"
5697 /* System header to define __stub macros and hopefully few prototypes,
5698 which can conflict with char $ac_func(); below. */
5699 #include <assert.h>
5700 /* Override any gcc2 internal prototype to avoid an error. */
5701 /* We use char because int might match the return type of a gcc2
5702 builtin and then its argument prototype would still apply. */
5703 char $ac_func();
5705 int main() {
5707 /* The GNU C library defines this for functions which it implements
5708 to always fail with ENOSYS. Some functions are actually named
5709 something starting with __ and the normal name is an alias. */
5710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5711 choke me
5712 #else
5713 $ac_func();
5714 #endif
5716 ; return 0; }
5718 if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5719 rm -rf conftest*
5720 eval "ac_cv_func_$ac_func=yes"
5721 else
5722 echo "configure: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 rm -rf conftest*
5725 eval "ac_cv_func_$ac_func=no"
5727 rm -f conftest*
5730 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5731 echo "$ac_t""yes" 1>&6
5732 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5733 cat >> confdefs.h <<EOF
5734 #define $ac_tr_func 1
5737 cat > conftest.$ac_ext <<EOF
5738 #line 5739 "configure"
5739 #include "confdefs.h"
5740 #include <unistd.h>
5742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5743 egrep "usleep" >/dev/null 2>&1; then
5744 rm -rf conftest*
5746 cat >> confdefs.h <<\EOF
5747 #define HAVE_USLEEP_DECL 1
5751 rm -f conftest*
5753 else
5754 echo "$ac_t""no" 1>&6
5756 done
5759 # Look for these functions in the thread library, but only bother
5760 # if using POSIX threads.
5761 if test "$THREADS" = posix; then
5762 save_LIBS="$LIBS"
5763 LIBS="$LIBS $THREADLIBS"
5764 # Some POSIX thread systems don't have pthread_mutexattr_settype.
5765 # E.g., Solaris.
5766 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
5768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5769 echo "configure:5770: checking for $ac_func" >&5
5770 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5771 echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5773 cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776 /* System header to define __stub macros and hopefully few prototypes,
5777 which can conflict with char $ac_func(); below. */
5778 #include <assert.h>
5779 /* Override any gcc2 internal prototype to avoid an error. */
5780 /* We use char because int might match the return type of a gcc2
5781 builtin and then its argument prototype would still apply. */
5782 char $ac_func();
5784 int main() {
5786 /* The GNU C library defines this for functions which it implements
5787 to always fail with ENOSYS. Some functions are actually named
5788 something starting with __ and the normal name is an alias. */
5789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5790 choke me
5791 #else
5792 $ac_func();
5793 #endif
5795 ; return 0; }
5797 if { (eval echo configure:5798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5798 rm -rf conftest*
5799 eval "ac_cv_func_$ac_func=yes"
5800 else
5801 echo "configure: failed program was:" >&5
5802 cat conftest.$ac_ext >&5
5803 rm -rf conftest*
5804 eval "ac_cv_func_$ac_func=no"
5806 rm -f conftest*
5809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5810 echo "$ac_t""yes" 1>&6
5811 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5812 cat >> confdefs.h <<EOF
5813 #define $ac_tr_func 1
5816 else
5817 echo "$ac_t""no" 1>&6
5819 done
5822 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
5823 # Solaris 7 the name librt is preferred.
5824 for ac_func in sched_yield
5826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5827 echo "configure:5828: checking for $ac_func" >&5
5828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5829 echo $ac_n "(cached) $ac_c" 1>&6
5830 else
5831 cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 /* System header to define __stub macros and hopefully few prototypes,
5835 which can conflict with char $ac_func(); below. */
5836 #include <assert.h>
5837 /* Override any gcc2 internal prototype to avoid an error. */
5838 /* We use char because int might match the return type of a gcc2
5839 builtin and then its argument prototype would still apply. */
5840 char $ac_func();
5842 int main() {
5844 /* The GNU C library defines this for functions which it implements
5845 to always fail with ENOSYS. Some functions are actually named
5846 something starting with __ and the normal name is an alias. */
5847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5848 choke me
5849 #else
5850 $ac_func();
5851 #endif
5853 ; return 0; }
5855 if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5856 rm -rf conftest*
5857 eval "ac_cv_func_$ac_func=yes"
5858 else
5859 echo "configure: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
5861 rm -rf conftest*
5862 eval "ac_cv_func_$ac_func=no"
5864 rm -f conftest*
5867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5868 echo "$ac_t""yes" 1>&6
5869 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5870 cat >> confdefs.h <<EOF
5871 #define $ac_tr_func 1
5874 else
5875 echo "$ac_t""no" 1>&6
5876 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5877 echo "configure:5878: checking for sched_yield in -lrt" >&5
5878 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5880 echo $ac_n "(cached) $ac_c" 1>&6
5881 else
5882 ac_save_LIBS="$LIBS"
5883 LIBS="-lrt $LIBS"
5884 cat > conftest.$ac_ext <<EOF
5885 #line 5886 "configure"
5886 #include "confdefs.h"
5887 /* Override any gcc2 internal prototype to avoid an error. */
5888 /* We use char because int might match the return type of a gcc2
5889 builtin and then its argument prototype would still apply. */
5890 char sched_yield();
5892 int main() {
5893 sched_yield()
5894 ; return 0; }
5896 if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5897 rm -rf conftest*
5898 eval "ac_cv_lib_$ac_lib_var=yes"
5899 else
5900 echo "configure: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 rm -rf conftest*
5903 eval "ac_cv_lib_$ac_lib_var=no"
5905 rm -f conftest*
5906 LIBS="$ac_save_LIBS"
5909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5910 echo "$ac_t""yes" 1>&6
5912 cat >> confdefs.h <<\EOF
5913 #define HAVE_SCHED_YIELD 1
5916 THREADLIBS="$THREADLIBS -lrt"
5917 THREADSPEC="$THREADSPEC -lrt"
5918 else
5919 echo "$ac_t""no" 1>&6
5921 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
5922 echo "configure:5923: checking for sched_yield in -lposix4" >&5
5923 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
5924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5925 echo $ac_n "(cached) $ac_c" 1>&6
5926 else
5927 ac_save_LIBS="$LIBS"
5928 LIBS="-lposix4 $LIBS"
5929 cat > conftest.$ac_ext <<EOF
5930 #line 5931 "configure"
5931 #include "confdefs.h"
5932 /* Override any gcc2 internal prototype to avoid an error. */
5933 /* We use char because int might match the return type of a gcc2
5934 builtin and then its argument prototype would still apply. */
5935 char sched_yield();
5937 int main() {
5938 sched_yield()
5939 ; return 0; }
5941 if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5942 rm -rf conftest*
5943 eval "ac_cv_lib_$ac_lib_var=yes"
5944 else
5945 echo "configure: failed program was:" >&5
5946 cat conftest.$ac_ext >&5
5947 rm -rf conftest*
5948 eval "ac_cv_lib_$ac_lib_var=no"
5950 rm -f conftest*
5951 LIBS="$ac_save_LIBS"
5954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5955 echo "$ac_t""yes" 1>&6
5957 cat >> confdefs.h <<\EOF
5958 #define HAVE_SCHED_YIELD 1
5961 THREADLIBS="$THREADLIBS -lposix4"
5962 THREADSPEC="$THREADSPEC -lposix4"
5963 else
5964 echo "$ac_t""no" 1>&6
5970 done
5972 LIBS="$save_LIBS"
5974 # We can save a little space at runtime if the mutex has m_count
5975 # or __m_count. This is a nice hack for Linux.
5976 cat > conftest.$ac_ext <<EOF
5977 #line 5978 "configure"
5978 #include "confdefs.h"
5979 #include <pthread.h>
5980 int main() {
5982 extern pthread_mutex_t *mutex; int q = mutex->m_count;
5984 ; return 0; }
5986 if { (eval echo configure:5987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5987 rm -rf conftest*
5988 cat >> confdefs.h <<\EOF
5989 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
5992 else
5993 echo "configure: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 rm -rf conftest*
5997 cat > conftest.$ac_ext <<EOF
5998 #line 5999 "configure"
5999 #include "confdefs.h"
6000 #include <pthread.h>
6001 int main() {
6003 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
6005 ; return 0; }
6007 if { (eval echo configure:6008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6008 rm -rf conftest*
6009 cat >> confdefs.h <<\EOF
6010 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
6013 else
6014 echo "configure: failed program was:" >&5
6015 cat conftest.$ac_ext >&5
6017 rm -f conftest*
6019 rm -f conftest*
6022 # We require a way to get the time.
6023 time_found=no
6024 for ac_func in gettimeofday time ftime
6026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6027 echo "configure:6028: checking for $ac_func" >&5
6028 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6029 echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031 cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 /* System header to define __stub macros and hopefully few prototypes,
6035 which can conflict with char $ac_func(); below. */
6036 #include <assert.h>
6037 /* Override any gcc2 internal prototype to avoid an error. */
6038 /* We use char because int might match the return type of a gcc2
6039 builtin and then its argument prototype would still apply. */
6040 char $ac_func();
6042 int main() {
6044 /* The GNU C library defines this for functions which it implements
6045 to always fail with ENOSYS. Some functions are actually named
6046 something starting with __ and the normal name is an alias. */
6047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6048 choke me
6049 #else
6050 $ac_func();
6051 #endif
6053 ; return 0; }
6055 if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6056 rm -rf conftest*
6057 eval "ac_cv_func_$ac_func=yes"
6058 else
6059 echo "configure: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6061 rm -rf conftest*
6062 eval "ac_cv_func_$ac_func=no"
6064 rm -f conftest*
6067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6068 echo "$ac_t""yes" 1>&6
6069 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6070 cat >> confdefs.h <<EOF
6071 #define $ac_tr_func 1
6073 time_found=yes
6074 else
6075 echo "$ac_t""no" 1>&6
6077 done
6079 if test "$time_found" = no; then
6080 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
6083 for ac_func in memmove
6085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6086 echo "configure:6087: checking for $ac_func" >&5
6087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6088 echo $ac_n "(cached) $ac_c" 1>&6
6089 else
6090 cat > conftest.$ac_ext <<EOF
6091 #line 6092 "configure"
6092 #include "confdefs.h"
6093 /* System header to define __stub macros and hopefully few prototypes,
6094 which can conflict with char $ac_func(); below. */
6095 #include <assert.h>
6096 /* Override any gcc2 internal prototype to avoid an error. */
6097 /* We use char because int might match the return type of a gcc2
6098 builtin and then its argument prototype would still apply. */
6099 char $ac_func();
6101 int main() {
6103 /* The GNU C library defines this for functions which it implements
6104 to always fail with ENOSYS. Some functions are actually named
6105 something starting with __ and the normal name is an alias. */
6106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6107 choke me
6108 #else
6109 $ac_func();
6110 #endif
6112 ; return 0; }
6114 if { (eval echo configure:6115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6115 rm -rf conftest*
6116 eval "ac_cv_func_$ac_func=yes"
6117 else
6118 echo "configure: failed program was:" >&5
6119 cat conftest.$ac_ext >&5
6120 rm -rf conftest*
6121 eval "ac_cv_func_$ac_func=no"
6123 rm -f conftest*
6126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6127 echo "$ac_t""yes" 1>&6
6128 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6129 cat >> confdefs.h <<EOF
6130 #define $ac_tr_func 1
6133 else
6134 echo "$ac_t""no" 1>&6
6136 done
6139 # We require memcpy.
6140 memcpy_found=no
6141 for ac_func in memcpy
6143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6144 echo "configure:6145: checking for $ac_func" >&5
6145 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 $ac_func(); 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 $ac_func();
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_$ac_func) || defined (__stub___$ac_func)
6165 choke me
6166 #else
6167 $ac_func();
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_$ac_func=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_$ac_func=no"
6181 rm -f conftest*
6184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6185 echo "$ac_t""yes" 1>&6
6186 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6187 cat >> confdefs.h <<EOF
6188 #define $ac_tr_func 1
6190 memcpy_found=yes
6191 else
6192 echo "$ac_t""no" 1>&6
6194 done
6196 if test "$memcpy_found" = no; then
6197 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
6200 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6201 echo "configure:6202: checking for dlopen in -ldl" >&5
6202 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6204 echo $ac_n "(cached) $ac_c" 1>&6
6205 else
6206 ac_save_LIBS="$LIBS"
6207 LIBS="-ldl $LIBS"
6208 cat > conftest.$ac_ext <<EOF
6209 #line 6210 "configure"
6210 #include "confdefs.h"
6211 /* Override any gcc2 internal prototype to avoid an error. */
6212 /* We use char because int might match the return type of a gcc2
6213 builtin and then its argument prototype would still apply. */
6214 char dlopen();
6216 int main() {
6217 dlopen()
6218 ; return 0; }
6220 if { (eval echo configure:6221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6221 rm -rf conftest*
6222 eval "ac_cv_lib_$ac_lib_var=yes"
6223 else
6224 echo "configure: failed program was:" >&5
6225 cat conftest.$ac_ext >&5
6226 rm -rf conftest*
6227 eval "ac_cv_lib_$ac_lib_var=no"
6229 rm -f conftest*
6230 LIBS="$ac_save_LIBS"
6233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6234 echo "$ac_t""yes" 1>&6
6236 cat >> confdefs.h <<\EOF
6237 #define HAVE_DLOPEN 1
6240 else
6241 echo "$ac_t""no" 1>&6
6245 # Some library-finding code we stole from Tcl.
6246 #--------------------------------------------------------------------
6247 # Check for the existence of the -lsocket and -lnsl libraries.
6248 # The order here is important, so that they end up in the right
6249 # order in the command line generated by make. Here are some
6250 # special considerations:
6251 # 1. Use "connect" and "accept" to check for -lsocket, and
6252 # "gethostbyname" to check for -lnsl.
6253 # 2. Use each function name only once: can't redo a check because
6254 # autoconf caches the results of the last check and won't redo it.
6255 # 3. Use -lnsl and -lsocket only if they supply procedures that
6256 # aren't already present in the normal libraries. This is because
6257 # IRIX 5.2 has libraries, but they aren't needed and they're
6258 # bogus: they goof up name resolution if used.
6259 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
6260 # To get around this problem, check for both libraries together
6261 # if -lsocket doesn't work by itself.
6262 #--------------------------------------------------------------------
6264 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
6265 echo "configure:6266: checking for socket libraries" >&5
6266 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
6267 echo $ac_n "(cached) $ac_c" 1>&6
6268 else
6269 gcj_cv_lib_sockets=
6270 gcj_checkBoth=0
6271 unset ac_cv_func_connect
6272 echo $ac_n "checking for connect""... $ac_c" 1>&6
6273 echo "configure:6274: checking for connect" >&5
6274 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6275 echo $ac_n "(cached) $ac_c" 1>&6
6276 else
6277 cat > conftest.$ac_ext <<EOF
6278 #line 6279 "configure"
6279 #include "confdefs.h"
6280 /* System header to define __stub macros and hopefully few prototypes,
6281 which can conflict with char connect(); below. */
6282 #include <assert.h>
6283 /* Override any gcc2 internal prototype to avoid an error. */
6284 /* We use char because int might match the return type of a gcc2
6285 builtin and then its argument prototype would still apply. */
6286 char connect();
6288 int main() {
6290 /* The GNU C library defines this for functions which it implements
6291 to always fail with ENOSYS. Some functions are actually named
6292 something starting with __ and the normal name is an alias. */
6293 #if defined (__stub_connect) || defined (__stub___connect)
6294 choke me
6295 #else
6296 connect();
6297 #endif
6299 ; return 0; }
6301 if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6302 rm -rf conftest*
6303 eval "ac_cv_func_connect=yes"
6304 else
6305 echo "configure: failed program was:" >&5
6306 cat conftest.$ac_ext >&5
6307 rm -rf conftest*
6308 eval "ac_cv_func_connect=no"
6310 rm -f conftest*
6313 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6314 echo "$ac_t""yes" 1>&6
6315 gcj_checkSocket=0
6316 else
6317 echo "$ac_t""no" 1>&6
6318 gcj_checkSocket=1
6321 if test "$gcj_checkSocket" = 1; then
6322 unset ac_cv_func_connect
6323 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
6324 echo "configure:6325: checking for main in -lsocket" >&5
6325 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
6326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6327 echo $ac_n "(cached) $ac_c" 1>&6
6328 else
6329 ac_save_LIBS="$LIBS"
6330 LIBS="-lsocket $LIBS"
6331 cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6335 int main() {
6336 main()
6337 ; return 0; }
6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6340 rm -rf conftest*
6341 eval "ac_cv_lib_$ac_lib_var=yes"
6342 else
6343 echo "configure: failed program was:" >&5
6344 cat conftest.$ac_ext >&5
6345 rm -rf conftest*
6346 eval "ac_cv_lib_$ac_lib_var=no"
6348 rm -f conftest*
6349 LIBS="$ac_save_LIBS"
6352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6353 echo "$ac_t""yes" 1>&6
6354 gcj_cv_lib_sockets="-lsocket"
6355 else
6356 echo "$ac_t""no" 1>&6
6357 gcj_checkBoth=1
6361 if test "$gcj_checkBoth" = 1; then
6362 gcj_oldLibs=$LIBS
6363 LIBS="$LIBS -lsocket -lnsl"
6364 unset ac_cv_func_accept
6365 echo $ac_n "checking for accept""... $ac_c" 1>&6
6366 echo "configure:6367: checking for accept" >&5
6367 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
6368 echo $ac_n "(cached) $ac_c" 1>&6
6369 else
6370 cat > conftest.$ac_ext <<EOF
6371 #line 6372 "configure"
6372 #include "confdefs.h"
6373 /* System header to define __stub macros and hopefully few prototypes,
6374 which can conflict with char accept(); below. */
6375 #include <assert.h>
6376 /* Override any gcc2 internal prototype to avoid an error. */
6377 /* We use char because int might match the return type of a gcc2
6378 builtin and then its argument prototype would still apply. */
6379 char accept();
6381 int main() {
6383 /* The GNU C library defines this for functions which it implements
6384 to always fail with ENOSYS. Some functions are actually named
6385 something starting with __ and the normal name is an alias. */
6386 #if defined (__stub_accept) || defined (__stub___accept)
6387 choke me
6388 #else
6389 accept();
6390 #endif
6392 ; return 0; }
6394 if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6395 rm -rf conftest*
6396 eval "ac_cv_func_accept=yes"
6397 else
6398 echo "configure: failed program was:" >&5
6399 cat conftest.$ac_ext >&5
6400 rm -rf conftest*
6401 eval "ac_cv_func_accept=no"
6403 rm -f conftest*
6406 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
6407 echo "$ac_t""yes" 1>&6
6408 gcj_checkNsl=0
6409 gcj_cv_lib_sockets="-lsocket -lnsl"
6410 else
6411 echo "$ac_t""no" 1>&6
6414 unset ac_cv_func_accept
6415 LIBS=$gcj_oldLibs
6417 unset ac_cv_func_gethostbyname
6418 gcj_oldLibs=$LIBS
6419 LIBS="$LIBS $gcj_cv_lib_sockets"
6420 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6421 echo "configure:6422: checking for gethostbyname" >&5
6422 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6423 echo $ac_n "(cached) $ac_c" 1>&6
6424 else
6425 cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428 /* System header to define __stub macros and hopefully few prototypes,
6429 which can conflict with char gethostbyname(); below. */
6430 #include <assert.h>
6431 /* Override any gcc2 internal prototype to avoid an error. */
6432 /* We use char because int might match the return type of a gcc2
6433 builtin and then its argument prototype would still apply. */
6434 char gethostbyname();
6436 int main() {
6438 /* The GNU C library defines this for functions which it implements
6439 to always fail with ENOSYS. Some functions are actually named
6440 something starting with __ and the normal name is an alias. */
6441 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6442 choke me
6443 #else
6444 gethostbyname();
6445 #endif
6447 ; return 0; }
6449 if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6450 rm -rf conftest*
6451 eval "ac_cv_func_gethostbyname=yes"
6452 else
6453 echo "configure: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6455 rm -rf conftest*
6456 eval "ac_cv_func_gethostbyname=no"
6458 rm -f conftest*
6461 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6462 echo "$ac_t""yes" 1>&6
6464 else
6465 echo "$ac_t""no" 1>&6
6466 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
6467 echo "configure:6468: checking for main in -lnsl" >&5
6468 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
6469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6470 echo $ac_n "(cached) $ac_c" 1>&6
6471 else
6472 ac_save_LIBS="$LIBS"
6473 LIBS="-lnsl $LIBS"
6474 cat > conftest.$ac_ext <<EOF
6475 #line 6476 "configure"
6476 #include "confdefs.h"
6478 int main() {
6479 main()
6480 ; return 0; }
6482 if { (eval echo configure:6483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6483 rm -rf conftest*
6484 eval "ac_cv_lib_$ac_lib_var=yes"
6485 else
6486 echo "configure: failed program was:" >&5
6487 cat conftest.$ac_ext >&5
6488 rm -rf conftest*
6489 eval "ac_cv_lib_$ac_lib_var=no"
6491 rm -f conftest*
6492 LIBS="$ac_save_LIBS"
6495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6496 echo "$ac_t""yes" 1>&6
6497 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
6498 else
6499 echo "$ac_t""no" 1>&6
6504 unset ac_cv_func_gethostbyname
6505 LIBS=$gcj_oldLIBS
6509 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
6510 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
6512 if test "$with_system_zlib" = yes; then
6513 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
6514 echo "configure:6515: checking for deflate in -lz" >&5
6515 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
6516 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6517 echo $ac_n "(cached) $ac_c" 1>&6
6518 else
6519 ac_save_LIBS="$LIBS"
6520 LIBS="-lz $LIBS"
6521 cat > conftest.$ac_ext <<EOF
6522 #line 6523 "configure"
6523 #include "confdefs.h"
6524 /* Override any gcc2 internal prototype to avoid an error. */
6525 /* We use char because int might match the return type of a gcc2
6526 builtin and then its argument prototype would still apply. */
6527 char deflate();
6529 int main() {
6530 deflate()
6531 ; return 0; }
6533 if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6534 rm -rf conftest*
6535 eval "ac_cv_lib_$ac_lib_var=yes"
6536 else
6537 echo "configure: failed program was:" >&5
6538 cat conftest.$ac_ext >&5
6539 rm -rf conftest*
6540 eval "ac_cv_lib_$ac_lib_var=no"
6542 rm -f conftest*
6543 LIBS="$ac_save_LIBS"
6546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6547 echo "$ac_t""yes" 1>&6
6548 ZLIBSPEC=-lz
6549 else
6550 echo "$ac_t""no" 1>&6
6551 ZLIBSPEC=
6556 # Test for Gtk stuff, if asked for.
6557 if test "$use_gtk_awt" = yes; then
6558 # Check whether --enable-gtktest or --disable-gtktest was given.
6559 if test "${enable_gtktest+set}" = set; then
6560 enableval="$enable_gtktest"
6562 else
6563 enable_gtktest=yes
6567 pkg_config_args=gtk+-2.0
6568 for module in .
6570 case "$module" in
6571 gthread)
6572 pkg_config_args="$pkg_config_args gthread-2.0"
6574 esac
6575 done
6577 no_gtk=""
6579 # Extract the first word of "pkg-config", so it can be a program name with args.
6580 set dummy pkg-config; ac_word=$2
6581 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6582 echo "configure:6583: checking for $ac_word" >&5
6583 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6584 echo $ac_n "(cached) $ac_c" 1>&6
6585 else
6586 case "$PKG_CONFIG" in
6588 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6590 ?:/*)
6591 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6594 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6595 ac_dummy="$PATH"
6596 for ac_dir in $ac_dummy; do
6597 test -z "$ac_dir" && ac_dir=.
6598 if test -f $ac_dir/$ac_word; then
6599 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6600 break
6602 done
6603 IFS="$ac_save_ifs"
6604 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6606 esac
6608 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6609 if test -n "$PKG_CONFIG"; then
6610 echo "$ac_t""$PKG_CONFIG" 1>&6
6611 else
6612 echo "$ac_t""no" 1>&6
6616 if test x$PKG_CONFIG != xno ; then
6617 if pkg-config --atleast-pkgconfig-version 0.7 ; then
6619 else
6620 echo *** pkg-config too old; version 0.7 or better required.
6621 no_gtk=yes
6622 PKG_CONFIG=no
6624 else
6625 no_gtk=yes
6628 min_gtk_version=2.0.0
6629 echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6
6630 echo "configure:6631: checking for GTK+ - version >= $min_gtk_version" >&5
6632 if test x$PKG_CONFIG != xno ; then
6633 ## don't try to run the test against uninstalled libtool libs
6634 if $PKG_CONFIG --uninstalled $pkg_config_args; then
6635 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
6636 enable_gtktest=no
6639 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
6641 else
6642 no_gtk=yes
6646 if test x"$no_gtk" = x ; then
6647 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
6648 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
6649 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6650 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6651 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6652 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6653 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6654 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6655 if test "x$enable_gtktest" = "xyes" ; then
6656 ac_save_CFLAGS="$CFLAGS"
6657 ac_save_LIBS="$LIBS"
6658 CFLAGS="$CFLAGS $GTK_CFLAGS"
6659 LIBS="$GTK_LIBS $LIBS"
6660 rm -f conf.gtktest
6661 if test "$cross_compiling" = yes; then
6662 echo $ac_n "cross compiling; assumed OK... $ac_c"
6663 else
6664 cat > conftest.$ac_ext <<EOF
6665 #line 6666 "configure"
6666 #include "confdefs.h"
6668 #include <gtk/gtk.h>
6669 #include <stdio.h>
6670 #include <stdlib.h>
6672 int
6673 main ()
6675 int major, minor, micro;
6676 char *tmp_version;
6678 system ("touch conf.gtktest");
6680 /* HP/UX 9 (%@#!) writes to sscanf strings */
6681 tmp_version = g_strdup("$min_gtk_version");
6682 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6683 printf("%s, bad version string\n", "$min_gtk_version");
6684 exit(1);
6687 if ((gtk_major_version != $gtk_config_major_version) ||
6688 (gtk_minor_version != $gtk_config_minor_version) ||
6689 (gtk_micro_version != $gtk_config_micro_version))
6691 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
6692 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
6693 gtk_major_version, gtk_minor_version, gtk_micro_version);
6694 printf ("*** was found! If pkg-config was correct, then it is best\n");
6695 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
6696 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6697 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6698 printf("*** required on your system.\n");
6699 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
6700 printf("*** to point to the correct configuration files\n");
6702 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
6703 (gtk_minor_version != GTK_MINOR_VERSION) ||
6704 (gtk_micro_version != GTK_MICRO_VERSION))
6706 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
6707 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
6708 printf("*** library (version %d.%d.%d)\n",
6709 gtk_major_version, gtk_minor_version, gtk_micro_version);
6711 else
6713 if ((gtk_major_version > major) ||
6714 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
6715 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
6717 return 0;
6719 else
6721 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
6722 gtk_major_version, gtk_minor_version, gtk_micro_version);
6723 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
6724 major, minor, micro);
6725 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
6726 printf("***\n");
6727 printf("*** If you have already installed a sufficiently new version, this error\n");
6728 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
6729 printf("*** being found. The easiest way to fix this is to remove the old version\n");
6730 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
6731 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
6732 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
6733 printf("*** so that the correct libraries are found at run-time))\n");
6736 return 1;
6740 if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6741 then
6743 else
6744 echo "configure: failed program was:" >&5
6745 cat conftest.$ac_ext >&5
6746 rm -fr conftest*
6747 no_gtk=yes
6749 rm -fr conftest*
6752 CFLAGS="$ac_save_CFLAGS"
6753 LIBS="$ac_save_LIBS"
6756 if test "x$no_gtk" = x ; then
6757 echo "$ac_t""yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" 1>&6
6759 else
6760 echo "$ac_t""no" 1>&6
6761 if test "$PKG_CONFIG" = "no" ; then
6762 echo "*** A new enough version of pkg-config was not found."
6763 echo "*** See http://pkgconfig.sourceforge.net"
6764 else
6765 if test -f conf.gtktest ; then
6767 else
6768 echo "*** Could not run GTK+ test program, checking why..."
6769 ac_save_CFLAGS="$CFLAGS"
6770 ac_save_LIBS="$LIBS"
6771 CFLAGS="$CFLAGS $GTK_CFLAGS"
6772 LIBS="$LIBS $GTK_LIBS"
6773 cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6777 #include <gtk/gtk.h>
6778 #include <stdio.h>
6780 int main() {
6781 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
6782 ; return 0; }
6784 if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6785 rm -rf conftest*
6786 echo "*** The test program compiled, but did not run. This usually means"
6787 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
6788 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
6789 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
6790 echo "*** to the installed location Also, make sure you have run ldconfig if that"
6791 echo "*** is required on your system"
6792 echo "***"
6793 echo "*** If you have an old version installed, it is best to remove it, although"
6794 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
6795 else
6796 echo "configure: failed program was:" >&5
6797 cat conftest.$ac_ext >&5
6798 rm -rf conftest*
6799 echo "*** The test program failed to compile or link. See the file config.log for the"
6800 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
6802 rm -f conftest*
6803 CFLAGS="$ac_save_CFLAGS"
6804 LIBS="$ac_save_LIBS"
6807 GTK_CFLAGS=""
6808 GTK_LIBS=""
6809 exit 1
6813 rm -f conf.gtktest
6815 # Check whether --enable-glibtest or --disable-glibtest was given.
6816 if test "${enable_glibtest+set}" = set; then
6817 enableval="$enable_glibtest"
6819 else
6820 enable_glibtest=yes
6824 pkg_config_args=glib-2.0
6825 for module in . gthread
6827 case "$module" in
6828 gmodule)
6829 pkg_config_args="$pkg_config_args gmodule-2.0"
6831 gobject)
6832 pkg_config_args="$pkg_config_args gobject-2.0"
6834 gthread)
6835 pkg_config_args="$pkg_config_args gthread-2.0"
6837 esac
6838 done
6840 # Extract the first word of "pkg-config", so it can be a program name with args.
6841 set dummy pkg-config; ac_word=$2
6842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6843 echo "configure:6844: checking for $ac_word" >&5
6844 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6845 echo $ac_n "(cached) $ac_c" 1>&6
6846 else
6847 case "$PKG_CONFIG" in
6849 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6851 ?:/*)
6852 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6855 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6856 ac_dummy="$PATH"
6857 for ac_dir in $ac_dummy; do
6858 test -z "$ac_dir" && ac_dir=.
6859 if test -f $ac_dir/$ac_word; then
6860 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6861 break
6863 done
6864 IFS="$ac_save_ifs"
6865 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6867 esac
6869 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6870 if test -n "$PKG_CONFIG"; then
6871 echo "$ac_t""$PKG_CONFIG" 1>&6
6872 else
6873 echo "$ac_t""no" 1>&6
6877 no_glib=""
6879 if test x$PKG_CONFIG != xno ; then
6880 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
6882 else
6883 echo *** pkg-config too old; version 0.7 or better required.
6884 no_glib=yes
6885 PKG_CONFIG=no
6887 else
6888 no_glib=yes
6891 min_glib_version=2.0.0
6892 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
6893 echo "configure:6894: checking for GLIB - version >= $min_glib_version" >&5
6895 if test x$PKG_CONFIG != xno ; then
6896 ## don't try to run the test against uninstalled libtool libs
6897 if $PKG_CONFIG --uninstalled $pkg_config_args; then
6898 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
6899 enable_glibtest=no
6902 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
6904 else
6905 no_glib=yes
6909 if test x"$no_glib" = x ; then
6910 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
6911 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
6912 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
6914 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
6915 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
6916 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
6917 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6918 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
6919 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6920 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
6921 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6922 if test "x$enable_glibtest" = "xyes" ; then
6923 ac_save_CFLAGS="$CFLAGS"
6924 ac_save_LIBS="$LIBS"
6925 CFLAGS="$CFLAGS $GLIB_CFLAGS"
6926 LIBS="$GLIB_LIBS $LIBS"
6927 rm -f conf.glibtest
6928 if test "$cross_compiling" = yes; then
6929 echo $ac_n "cross compiling; assumed OK... $ac_c"
6930 else
6931 cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6935 #include <glib.h>
6936 #include <stdio.h>
6937 #include <stdlib.h>
6939 int
6940 main ()
6942 int major, minor, micro;
6943 char *tmp_version;
6945 system ("touch conf.glibtest");
6947 /* HP/UX 9 (%@#!) writes to sscanf strings */
6948 tmp_version = g_strdup("$min_glib_version");
6949 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6950 printf("%s, bad version string\n", "$min_glib_version");
6951 exit(1);
6954 if ((glib_major_version != $glib_config_major_version) ||
6955 (glib_minor_version != $glib_config_minor_version) ||
6956 (glib_micro_version != $glib_config_micro_version))
6958 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
6959 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
6960 glib_major_version, glib_minor_version, glib_micro_version);
6961 printf ("*** was found! If pkg-config was correct, then it is best\n");
6962 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
6963 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6964 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6965 printf("*** required on your system.\n");
6966 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
6967 printf("*** to point to the correct configuration files\n");
6969 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
6970 (glib_minor_version != GLIB_MINOR_VERSION) ||
6971 (glib_micro_version != GLIB_MICRO_VERSION))
6973 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
6974 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
6975 printf("*** library (version %d.%d.%d)\n",
6976 glib_major_version, glib_minor_version, glib_micro_version);
6978 else
6980 if ((glib_major_version > major) ||
6981 ((glib_major_version == major) && (glib_minor_version > minor)) ||
6982 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
6984 return 0;
6986 else
6988 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
6989 glib_major_version, glib_minor_version, glib_micro_version);
6990 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
6991 major, minor, micro);
6992 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
6993 printf("***\n");
6994 printf("*** If you have already installed a sufficiently new version, this error\n");
6995 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
6996 printf("*** being found. The easiest way to fix this is to remove the old version\n");
6997 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
6998 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
6999 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
7000 printf("*** so that the correct libraries are found at run-time))\n");
7003 return 1;
7007 if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7008 then
7010 else
7011 echo "configure: failed program was:" >&5
7012 cat conftest.$ac_ext >&5
7013 rm -fr conftest*
7014 no_glib=yes
7016 rm -fr conftest*
7019 CFLAGS="$ac_save_CFLAGS"
7020 LIBS="$ac_save_LIBS"
7023 if test "x$no_glib" = x ; then
7024 echo "$ac_t""yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" 1>&6
7026 else
7027 echo "$ac_t""no" 1>&6
7028 if test "$PKG_CONFIG" = "no" ; then
7029 echo "*** A new enough version of pkg-config was not found."
7030 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
7031 else
7032 if test -f conf.glibtest ; then
7034 else
7035 echo "*** Could not run GLIB test program, checking why..."
7036 ac_save_CFLAGS="$CFLAGS"
7037 ac_save_LIBS="$LIBS"
7038 CFLAGS="$CFLAGS $GLIB_CFLAGS"
7039 LIBS="$LIBS $GLIB_LIBS"
7040 cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7044 #include <glib.h>
7045 #include <stdio.h>
7047 int main() {
7048 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
7049 ; return 0; }
7051 if { (eval echo configure:7052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7052 rm -rf conftest*
7053 echo "*** The test program compiled, but did not run. This usually means"
7054 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
7055 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
7056 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7057 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7058 echo "*** is required on your system"
7059 echo "***"
7060 echo "*** If you have an old version installed, it is best to remove it, although"
7061 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7062 else
7063 echo "configure: failed program was:" >&5
7064 cat conftest.$ac_ext >&5
7065 rm -rf conftest*
7066 echo "*** The test program failed to compile or link. See the file config.log for the"
7067 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
7069 rm -f conftest*
7070 CFLAGS="$ac_save_CFLAGS"
7071 LIBS="$ac_save_LIBS"
7074 GLIB_CFLAGS=""
7075 GLIB_LIBS=""
7076 GLIB_GENMARSHAL=""
7077 GOBJECT_QUERY=""
7078 GLIB_MKENUMS=""
7079 exit 1
7086 rm -f conf.glibtest
7088 enable_libarttest=no
7089 # Check whether --with-libart-prefix or --without-libart-prefix was given.
7090 if test "${with_libart_prefix+set}" = set; then
7091 withval="$with_libart_prefix"
7092 libart_prefix="$withval"
7093 else
7094 libart_prefix=""
7097 # Check whether --with-libart-exec-prefix or --without-libart-exec-prefix was given.
7098 if test "${with_libart_exec_prefix+set}" = set; then
7099 withval="$with_libart_exec_prefix"
7100 libart_exec_prefix="$withval"
7101 else
7102 libart_exec_prefix=""
7105 # Check whether --enable-libarttest or --disable-libarttest was given.
7106 if test "${enable_libarttest+set}" = set; then
7107 enableval="$enable_libarttest"
7109 else
7110 enable_libarttest=yes
7114 if test x$libart_exec_prefix != x ; then
7115 libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
7116 if test x${LIBART_CONFIG+set} != xset ; then
7117 LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
7120 if test x$libart_prefix != x ; then
7121 libart_args="$libart_args --prefix=$libart_prefix"
7122 if test x${LIBART_CONFIG+set} != xset ; then
7123 LIBART_CONFIG=$libart_prefix/bin/libart-config
7127 # Extract the first word of "libart2-config", so it can be a program name with args.
7128 set dummy libart2-config; ac_word=$2
7129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7130 echo "configure:7131: checking for $ac_word" >&5
7131 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then
7132 echo $ac_n "(cached) $ac_c" 1>&6
7133 else
7134 case "$LIBART_CONFIG" in
7136 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path.
7138 ?:/*)
7139 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path.
7142 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7143 ac_dummy="$PATH"
7144 for ac_dir in $ac_dummy; do
7145 test -z "$ac_dir" && ac_dir=.
7146 if test -f $ac_dir/$ac_word; then
7147 ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word"
7148 break
7150 done
7151 IFS="$ac_save_ifs"
7152 test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no"
7154 esac
7156 LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG"
7157 if test -n "$LIBART_CONFIG"; then
7158 echo "$ac_t""$LIBART_CONFIG" 1>&6
7159 else
7160 echo "$ac_t""no" 1>&6
7163 if test "$LIBART_CONFIG" = "no" ; then
7164 # Extract the first word of "libart-config", so it can be a program name with args.
7165 set dummy libart-config; ac_word=$2
7166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7167 echo "configure:7168: checking for $ac_word" >&5
7168 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then
7169 echo $ac_n "(cached) $ac_c" 1>&6
7170 else
7171 case "$LIBART_CONFIG" in
7173 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path.
7175 ?:/*)
7176 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path.
7179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7180 ac_dummy="$PATH"
7181 for ac_dir in $ac_dummy; do
7182 test -z "$ac_dir" && ac_dir=.
7183 if test -f $ac_dir/$ac_word; then
7184 ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word"
7185 break
7187 done
7188 IFS="$ac_save_ifs"
7189 test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no"
7191 esac
7193 LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG"
7194 if test -n "$LIBART_CONFIG"; then
7195 echo "$ac_t""$LIBART_CONFIG" 1>&6
7196 else
7197 echo "$ac_t""no" 1>&6
7201 min_libart_version=2.1.0
7202 echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6
7203 echo "configure:7204: checking for LIBART - version >= $min_libart_version" >&5
7204 no_libart=""
7205 if test "$LIBART_CONFIG" = "no" ; then
7206 no_libart=yes
7207 else
7208 LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
7209 LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
7211 libart_major_version=`$LIBART_CONFIG $libart_args --version | \
7212 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
7213 libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
7214 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
7215 libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
7216 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
7217 if test "x$enable_libarttest" = "xyes" ; then
7218 ac_save_CFLAGS="$CFLAGS"
7219 ac_save_LIBS="$LIBS"
7220 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7221 LIBS="$LIBS $LIBART_LIBS"
7222 rm -f conf.libarttest
7223 if test "$cross_compiling" = yes; then
7224 echo $ac_n "cross compiling; assumed OK... $ac_c"
7225 else
7226 cat > conftest.$ac_ext <<EOF
7227 #line 7228 "configure"
7228 #include "confdefs.h"
7230 #include <stdio.h>
7231 #include <stdlib.h>
7232 #include <string.h>
7233 #include <libart_lgpl/libart.h>
7235 char*
7236 my_strdup (char *str)
7238 char *new_str;
7240 if (str)
7242 new_str = malloc ((strlen (str) + 1) * sizeof(char));
7243 strcpy (new_str, str);
7245 else
7246 new_str = NULL;
7248 return new_str;
7251 int main ()
7253 int major, minor, micro;
7254 char *tmp_version;
7256 system ("touch conf.libarttest");
7258 /* HP/UX 9 (%@#!) writes to sscanf strings */
7259 tmp_version = my_strdup("$min_libart_version");
7260 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
7261 printf("%s, bad version string\n", "$min_libart_version");
7262 exit(1);
7265 if (($libart_major_version > major) ||
7266 (($libart_major_version == major) && ($libart_minor_version > minor)) ||
7267 (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro)))
7269 return 0;
7271 else
7273 printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version);
7274 printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro);
7275 printf("*** best to upgrade to the required version.\n");
7276 printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n");
7277 printf("*** to point to the correct copy of libart-config, and remove the file\n");
7278 printf("*** config.cache before re-running configure\n");
7279 return 1;
7285 if { (eval echo configure:7286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7286 then
7288 else
7289 echo "configure: failed program was:" >&5
7290 cat conftest.$ac_ext >&5
7291 rm -fr conftest*
7292 no_libart=yes
7294 rm -fr conftest*
7297 CFLAGS="$ac_save_CFLAGS"
7298 LIBS="$ac_save_LIBS"
7301 if test "x$no_libart" = x ; then
7302 echo "$ac_t""yes" 1>&6
7304 else
7305 echo "$ac_t""no" 1>&6
7306 if test "$LIBART_CONFIG" = "no" ; then
7307 echo "*** The libart-config script installed by LIBART could not be found"
7308 echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in"
7309 echo "*** your path, or set the LIBART_CONFIG environment variable to the"
7310 echo "*** full path to libart-config."
7311 else
7312 if test -f conf.libarttest ; then
7314 else
7315 echo "*** Could not run LIBART test program, checking why..."
7316 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7317 LIBS="$LIBS $LIBART_LIBS"
7318 cat > conftest.$ac_ext <<EOF
7319 #line 7320 "configure"
7320 #include "confdefs.h"
7322 #include <stdio.h>
7323 #include <libart_lgpl/libart.h>
7325 int main() {
7326 return 0;
7327 ; return 0; }
7329 if { (eval echo configure:7330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7330 rm -rf conftest*
7331 echo "*** The test program compiled, but did not run. This usually means"
7332 echo "*** that the run-time linker is not finding LIBART or finding the wrong"
7333 echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your"
7334 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7335 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7336 echo "*** is required on your system"
7337 echo "***"
7338 echo "*** If you have an old version installed, it is best to remove it, although"
7339 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7340 else
7341 echo "configure: failed program was:" >&5
7342 cat conftest.$ac_ext >&5
7343 rm -rf conftest*
7344 echo "*** The test program failed to compile or link. See the file config.log for the"
7345 echo "*** exact error that occured. This usually means LIBART was incorrectly installed"
7346 echo "*** or that you have moved LIBART since it was installed. In the latter case, you"
7347 echo "*** may want to edit the libart-config script: $LIBART_CONFIG"
7349 rm -f conftest*
7350 CFLAGS="$ac_save_CFLAGS"
7351 LIBS="$ac_save_LIBS"
7354 LIBART_CFLAGS=""
7355 LIBART_LIBS=""
7356 exit 1
7360 rm -f conf.libarttest
7364 # On Solaris, and maybe other architectures, the Boehm collector
7365 # requires -ldl.
7366 if test "$GC" = boehm; then
7367 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
7368 echo "configure:7369: checking for main in -ldl" >&5
7369 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
7370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7371 echo $ac_n "(cached) $ac_c" 1>&6
7372 else
7373 ac_save_LIBS="$LIBS"
7374 LIBS="-ldl $LIBS"
7375 cat > conftest.$ac_ext <<EOF
7376 #line 7377 "configure"
7377 #include "confdefs.h"
7379 int main() {
7380 main()
7381 ; return 0; }
7383 if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7384 rm -rf conftest*
7385 eval "ac_cv_lib_$ac_lib_var=yes"
7386 else
7387 echo "configure: failed program was:" >&5
7388 cat conftest.$ac_ext >&5
7389 rm -rf conftest*
7390 eval "ac_cv_lib_$ac_lib_var=no"
7392 rm -f conftest*
7393 LIBS="$ac_save_LIBS"
7396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7397 echo "$ac_t""yes" 1>&6
7398 SYSTEMSPEC="$SYSTEMSPEC -ldl"
7399 else
7400 echo "$ac_t""no" 1>&6
7406 if test -z "${with_multisubdir}"; then
7407 builddotdot=.
7408 else
7410 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
7414 # Which gcj do we use?
7415 which_gcj=default
7416 built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
7417 if test -n "${with_cross_host}"; then
7418 # We are being configured with a cross compiler. We can't
7419 # use ac_exeext, because that is for the target platform.
7420 NATIVE=no
7421 cross_host_exeext=
7422 case "${with_cross_host}" in
7423 *mingw* | *cygwin*)
7424 cross_host_exeext=.exe
7426 esac
7427 if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
7428 if test x"$build_alias" = x"$with_cross_host"; then
7429 # Ordinary cross (host!=target and host=build)
7430 which_gcj=built
7431 else
7432 # Canadian cross (host!=target and host!=build)
7433 which_gcj=cross
7435 else
7436 which_gcj=cross
7438 else
7439 # We are being configured with a native or crossed-native compiler
7440 if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
7441 if test x"$build" = x"$host"; then
7442 # True native build (host=target and host=build)
7443 which_gcj=built
7444 else
7445 # Crossed-native build (host=target and host!=build)
7446 which_gcj=cross
7448 else
7449 which_gcj=path
7452 case "${which_gcj}" in
7453 built)
7454 GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
7456 cross)
7457 # See the comment in Makefile.am about CANADIAN being a misnomer
7458 CANADIAN=yes
7459 NULL_TARGET=no
7460 if test "x${with_newlib}" = "xyes"; then
7461 # FIXME (comment): Why is this needed?
7462 GCC_UNWIND_INCLUDE=
7463 GCJ="${target_alias}-gcj"
7464 else
7465 GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/"
7468 path)
7469 # See the comment in Makefile.am about CANADIAN being a misnomer
7470 CANADIAN=yes
7471 NULL_TARGET=yes
7472 GCJ="gcj -B`${PWDCMD-pwd}`/"
7474 esac
7476 # Create it, so that compile/link tests don't fail
7477 test -f libgcj.spec || touch libgcj.spec
7479 # We must search the source tree for java.lang, since we still don't
7480 # have libgcj.jar nor java/lang/*.class
7481 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
7482 CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`"
7484 # Since some classes depend on this one, we need its source available
7485 # before we can do any GCJ compilation test :-(
7486 if test ! -f gnu/classpath/Configuration.java; then
7487 test -d gnu || mkdir gnu
7488 test -d gnu/classpath || mkdir gnu/classpath
7489 sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
7490 -e 's,@TOOLKIT@,$TOOLKIT,' \
7491 < $srcdir/gnu/classpath/Configuration.java.in \
7492 > gnu/classpath/Configuration.java
7493 # We do not want to redirect the output of the grep below to /dev/null,
7494 # but we add /dev/null to the input list so that grep will print the
7495 # filename of Configuration.java in case it finds any matches.
7496 if grep @ gnu/classpath/Configuration.java /dev/null; then
7497 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
7501 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
7502 set dummy ${ac_tool_prefix}gcj; ac_word=$2
7503 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7504 echo "configure:7505: checking for $ac_word" >&5
7505 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7506 echo $ac_n "(cached) $ac_c" 1>&6
7507 else
7508 if test -n "$GCJ"; then
7509 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7510 else
7511 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7512 ac_dummy="$PATH"
7513 for ac_dir in $ac_dummy; do
7514 test -z "$ac_dir" && ac_dir=.
7515 if test -f $ac_dir/$ac_word; then
7516 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
7517 break
7519 done
7520 IFS="$ac_save_ifs"
7523 GCJ="$ac_cv_prog_GCJ"
7524 if test -n "$GCJ"; then
7525 echo "$ac_t""$GCJ" 1>&6
7526 else
7527 echo "$ac_t""no" 1>&6
7531 if test -z "$ac_cv_prog_GCJ"; then
7532 if test -n "$ac_tool_prefix"; then
7533 # Extract the first word of "gcj", so it can be a program name with args.
7534 set dummy gcj; ac_word=$2
7535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7536 echo "configure:7537: checking for $ac_word" >&5
7537 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7538 echo $ac_n "(cached) $ac_c" 1>&6
7539 else
7540 if test -n "$GCJ"; then
7541 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7542 else
7543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7544 ac_dummy="$PATH"
7545 for ac_dir in $ac_dummy; do
7546 test -z "$ac_dir" && ac_dir=.
7547 if test -f $ac_dir/$ac_word; then
7548 ac_cv_prog_GCJ="gcj"
7549 break
7551 done
7552 IFS="$ac_save_ifs"
7553 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
7556 GCJ="$ac_cv_prog_GCJ"
7557 if test -n "$GCJ"; then
7558 echo "$ac_t""$GCJ" 1>&6
7559 else
7560 echo "$ac_t""no" 1>&6
7563 else
7564 GCJ="no"
7568 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7572 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
7573 lt_save_CC="$CC"
7574 lt_save_CFLAGS="$CFLAGS"
7575 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
7576 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
7577 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
7578 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
7579 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
7580 deplibs_check_method="$deplibs_check_method" \
7581 file_magic_cmd="$file_magic_cmd" \
7582 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
7583 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
7584 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
7585 CC="$lt_save_CC"
7586 CFLAGS="$lt_save_CFLAGS"
7588 # Redirect the config.log output again, so that the ltconfig log is not
7589 # clobbered by the next message.
7590 exec 5>>./config.log
7595 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
7597 echo $ac_n "checking size of void *""... $ac_c" 1>&6
7598 echo "configure:7599: checking size of void *" >&5
7599 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
7600 echo $ac_n "(cached) $ac_c" 1>&6
7601 else
7602 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
7603 cat > conftest.$ac_ext <<EOF
7604 #line 7605 "configure"
7605 #include "confdefs.h"
7606 #include "confdefs.h"
7607 #include <sys/types.h>
7610 int main() {
7611 switch (0) case 0: case (sizeof (void *) == $ac_size):;
7612 ; return 0; }
7614 if { (eval echo configure:7615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7615 rm -rf conftest*
7616 ac_cv_sizeof_void_p=$ac_size
7617 else
7618 echo "configure: failed program was:" >&5
7619 cat conftest.$ac_ext >&5
7621 rm -f conftest*
7622 if test x$ac_cv_sizeof_void_p != x ; then break; fi
7623 done
7627 if test x$ac_cv_sizeof_void_p = x ; then
7628 { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
7630 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
7631 cat >> confdefs.h <<EOF
7632 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
7637 ZLIBS=
7638 SYS_ZLIBS=
7639 ZINCS=
7641 if test -z "$ZLIBSPEC"; then
7642 # Use zlib from the GCC tree.
7643 ZINCS='-I$(top_srcdir)/../zlib'
7644 ZLIBS=../zlib/libzgcj_convenience.la
7645 else
7646 # System's zlib.
7647 SYS_ZLIBS="$ZLIBSPEC"
7659 if test "$CANADIAN" = yes; then
7660 CANADIAN_TRUE=
7661 CANADIAN_FALSE='#'
7662 else
7663 CANADIAN_TRUE='#'
7664 CANADIAN_FALSE=
7668 if test "$NULL_TARGET" = yes; then
7669 NULL_TARGET_TRUE=
7670 NULL_TARGET_FALSE='#'
7671 else
7672 NULL_TARGET_TRUE='#'
7673 NULL_TARGET_FALSE=
7677 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
7678 NATIVE_TRUE=
7679 NATIVE_FALSE='#'
7680 else
7681 NATIVE_TRUE='#'
7682 NATIVE_FALSE=
7686 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
7687 NEEDS_DATA_START_TRUE=
7688 NEEDS_DATA_START_FALSE='#'
7689 else
7690 NEEDS_DATA_START_TRUE='#'
7691 NEEDS_DATA_START_FALSE=
7695 if test -n "$with_cross_host" &&
7696 test x"$with_cross_host" != x"no"; then
7697 toolexecdir='$(exec_prefix)/$(target_alias)'
7698 toolexecmainlibdir='$(toolexecdir)/lib'
7699 else
7700 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
7701 toolexecmainlibdir='$(libdir)'
7703 multi_os_directory=`$CC -print-multi-os-directory`
7704 case $multi_os_directory in
7705 .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
7706 *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
7707 esac
7712 # Determine gcj version number.
7714 gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
7716 GCJVERSION=$gcjversion
7718 cat >> confdefs.h <<EOF
7719 #define GCJVERSION "$GCJVERSION"
7723 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
7725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7727 echo "configure:7728: checking for $ac_hdr" >&5
7728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7729 echo $ac_n "(cached) $ac_c" 1>&6
7730 else
7731 cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 #include <$ac_hdr>
7736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7737 { (eval echo configure:7738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7739 if test -z "$ac_err"; then
7740 rm -rf conftest*
7741 eval "ac_cv_header_$ac_safe=yes"
7742 else
7743 echo "$ac_err" >&5
7744 echo "configure: failed program was:" >&5
7745 cat conftest.$ac_ext >&5
7746 rm -rf conftest*
7747 eval "ac_cv_header_$ac_safe=no"
7749 rm -f conftest*
7751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7752 echo "$ac_t""yes" 1>&6
7753 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7754 cat >> confdefs.h <<EOF
7755 #define $ac_tr_hdr 1
7758 else
7759 echo "$ac_t""no" 1>&6
7761 done
7763 for ac_hdr in dirent.h
7765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7767 echo "configure:7768: checking for $ac_hdr" >&5
7768 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7769 echo $ac_n "(cached) $ac_c" 1>&6
7770 else
7771 cat > conftest.$ac_ext <<EOF
7772 #line 7773 "configure"
7773 #include "confdefs.h"
7774 #include <$ac_hdr>
7776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7777 { (eval echo configure:7778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7779 if test -z "$ac_err"; then
7780 rm -rf conftest*
7781 eval "ac_cv_header_$ac_safe=yes"
7782 else
7783 echo "$ac_err" >&5
7784 echo "configure: failed program was:" >&5
7785 cat conftest.$ac_ext >&5
7786 rm -rf conftest*
7787 eval "ac_cv_header_$ac_safe=no"
7789 rm -f conftest*
7791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7792 echo "$ac_t""yes" 1>&6
7793 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7794 cat >> confdefs.h <<EOF
7795 #define $ac_tr_hdr 1
7798 else
7799 echo "$ac_t""no" 1>&6
7801 done
7803 for ac_hdr in inttypes.h
7805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7806 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7807 echo "configure:7808: checking for $ac_hdr" >&5
7808 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7809 echo $ac_n "(cached) $ac_c" 1>&6
7810 else
7811 cat > conftest.$ac_ext <<EOF
7812 #line 7813 "configure"
7813 #include "confdefs.h"
7814 #include <$ac_hdr>
7816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7817 { (eval echo configure:7818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7819 if test -z "$ac_err"; then
7820 rm -rf conftest*
7821 eval "ac_cv_header_$ac_safe=yes"
7822 else
7823 echo "$ac_err" >&5
7824 echo "configure: failed program was:" >&5
7825 cat conftest.$ac_ext >&5
7826 rm -rf conftest*
7827 eval "ac_cv_header_$ac_safe=no"
7829 rm -f conftest*
7831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7832 echo "$ac_t""yes" 1>&6
7833 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7834 cat >> confdefs.h <<EOF
7835 #define $ac_tr_hdr 1
7838 cat >> confdefs.h <<\EOF
7839 #define HAVE_INTTYPES_H 1
7842 cat >> confdefs.h <<\EOF
7843 #define JV_HAVE_INTTYPES_H 1
7847 else
7848 echo "$ac_t""no" 1>&6
7850 done
7852 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7853 echo "configure:7854: checking for sys/wait.h that is POSIX.1 compatible" >&5
7854 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7855 echo $ac_n "(cached) $ac_c" 1>&6
7856 else
7857 cat > conftest.$ac_ext <<EOF
7858 #line 7859 "configure"
7859 #include "confdefs.h"
7860 #include <sys/types.h>
7861 #include <sys/wait.h>
7862 #ifndef WEXITSTATUS
7863 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7864 #endif
7865 #ifndef WIFEXITED
7866 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7867 #endif
7868 int main() {
7869 int s;
7870 wait (&s);
7871 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7872 ; return 0; }
7874 if { (eval echo configure:7875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7875 rm -rf conftest*
7876 ac_cv_header_sys_wait_h=yes
7877 else
7878 echo "configure: failed program was:" >&5
7879 cat conftest.$ac_ext >&5
7880 rm -rf conftest*
7881 ac_cv_header_sys_wait_h=no
7883 rm -f conftest*
7886 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7887 if test $ac_cv_header_sys_wait_h = yes; then
7888 cat >> confdefs.h <<\EOF
7889 #define HAVE_SYS_WAIT_H 1
7895 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7896 echo "configure:7897: checking for ANSI C header files" >&5
7897 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7898 echo $ac_n "(cached) $ac_c" 1>&6
7899 else
7900 cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 #include <stdlib.h>
7904 #include <stdarg.h>
7905 #include <string.h>
7906 #include <float.h>
7908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7909 { (eval echo configure:7910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7911 if test -z "$ac_err"; then
7912 rm -rf conftest*
7913 ac_cv_header_stdc=yes
7914 else
7915 echo "$ac_err" >&5
7916 echo "configure: failed program was:" >&5
7917 cat conftest.$ac_ext >&5
7918 rm -rf conftest*
7919 ac_cv_header_stdc=no
7921 rm -f conftest*
7923 if test $ac_cv_header_stdc = yes; then
7924 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7925 cat > conftest.$ac_ext <<EOF
7926 #line 7927 "configure"
7927 #include "confdefs.h"
7928 #include <string.h>
7930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7931 egrep "memchr" >/dev/null 2>&1; then
7933 else
7934 rm -rf conftest*
7935 ac_cv_header_stdc=no
7937 rm -f conftest*
7941 if test $ac_cv_header_stdc = yes; then
7942 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7943 cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946 #include <stdlib.h>
7948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7949 egrep "free" >/dev/null 2>&1; then
7951 else
7952 rm -rf conftest*
7953 ac_cv_header_stdc=no
7955 rm -f conftest*
7959 if test $ac_cv_header_stdc = yes; then
7960 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7961 if test "$cross_compiling" = yes; then
7963 else
7964 cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 #include <ctype.h>
7968 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7969 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7970 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7971 int main () { int i; for (i = 0; i < 256; i++)
7972 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7973 exit (0); }
7976 if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7977 then
7979 else
7980 echo "configure: failed program was:" >&5
7981 cat conftest.$ac_ext >&5
7982 rm -fr conftest*
7983 ac_cv_header_stdc=no
7985 rm -fr conftest*
7991 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7992 if test $ac_cv_header_stdc = yes; then
7993 cat >> confdefs.h <<\EOF
7994 #define STDC_HEADERS 1
7999 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
8000 echo "configure:8001: checking for ssize_t" >&5
8001 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
8002 echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004 cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007 #include <sys/types.h>
8008 #if STDC_HEADERS
8009 #include <stdlib.h>
8010 #include <stddef.h>
8011 #endif
8013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8014 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8015 rm -rf conftest*
8016 ac_cv_type_ssize_t=yes
8017 else
8018 rm -rf conftest*
8019 ac_cv_type_ssize_t=no
8021 rm -f conftest*
8024 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
8025 if test $ac_cv_type_ssize_t = no; then
8026 cat >> confdefs.h <<\EOF
8027 #define ssize_t int
8033 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
8034 echo "configure:8035: checking for in_addr_t" >&5
8035 cat > conftest.$ac_ext <<EOF
8036 #line 8037 "configure"
8037 #include "confdefs.h"
8038 #include <sys/types.h>
8039 #if STDC_HEADERS
8040 #include <stdlib.h>
8041 #include <stddef.h>
8042 #endif
8043 #if HAVE_NETINET_IN_H
8044 #include <netinet/in.h>
8045 #endif
8046 int main() {
8047 in_addr_t foo;
8048 ; return 0; }
8050 if { (eval echo configure:8051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8051 rm -rf conftest*
8052 cat >> confdefs.h <<\EOF
8053 #define HAVE_IN_ADDR_T 1
8056 echo "$ac_t""yes" 1>&6
8057 else
8058 echo "configure: failed program was:" >&5
8059 cat conftest.$ac_ext >&5
8060 rm -rf conftest*
8061 echo "$ac_t""no" 1>&6
8063 rm -f conftest*
8065 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
8066 echo "configure:8067: checking whether struct ip_mreq is in netinet/in.h" >&5
8067 cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8070 #include <netinet/in.h>
8071 int main() {
8072 struct ip_mreq mreq;
8073 ; return 0; }
8075 if { (eval echo configure:8076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8076 rm -rf conftest*
8077 cat >> confdefs.h <<\EOF
8078 #define HAVE_STRUCT_IP_MREQ 1
8081 echo "$ac_t""yes" 1>&6
8082 else
8083 echo "configure: failed program was:" >&5
8084 cat conftest.$ac_ext >&5
8085 rm -rf conftest*
8086 echo "$ac_t""no" 1>&6
8088 rm -f conftest*
8090 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
8091 echo "configure:8092: checking whether struct ipv6_mreq is in netinet/in.h" >&5
8092 cat > conftest.$ac_ext <<EOF
8093 #line 8094 "configure"
8094 #include "confdefs.h"
8095 #include <netinet/in.h>
8096 int main() {
8097 struct ipv6_mreq mreq6;
8098 ; return 0; }
8100 if { (eval echo configure:8101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8101 rm -rf conftest*
8102 cat >> confdefs.h <<\EOF
8103 #define HAVE_STRUCT_IPV6_MREQ 1
8106 echo "$ac_t""yes" 1>&6
8107 else
8108 echo "configure: failed program was:" >&5
8109 cat conftest.$ac_ext >&5
8110 rm -rf conftest*
8111 echo "$ac_t""no" 1>&6
8113 rm -f conftest*
8115 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
8116 echo "configure:8117: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
8117 cat > conftest.$ac_ext <<EOF
8118 #line 8119 "configure"
8119 #include "confdefs.h"
8120 #include <netinet/in.h>
8121 int main() {
8122 struct sockaddr_in6 addr6;
8123 ; return 0; }
8125 if { (eval echo configure:8126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8126 rm -rf conftest*
8127 cat >> confdefs.h <<\EOF
8128 #define HAVE_INET6 1
8131 echo "$ac_t""yes" 1>&6
8132 else
8133 echo "configure: failed program was:" >&5
8134 cat conftest.$ac_ext >&5
8135 rm -rf conftest*
8136 echo "$ac_t""no" 1>&6
8138 rm -f conftest*
8140 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
8141 echo "configure:8142: checking for socklen_t in sys/socket.h" >&5
8142 cat > conftest.$ac_ext <<EOF
8143 #line 8144 "configure"
8144 #include "confdefs.h"
8145 #define _POSIX_PII_SOCKET
8146 #include <sys/types.h>
8147 #include <sys/socket.h>
8148 int main() {
8149 socklen_t x = 5;
8150 ; return 0; }
8152 if { (eval echo configure:8153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8153 rm -rf conftest*
8154 cat >> confdefs.h <<\EOF
8155 #define HAVE_SOCKLEN_T 1
8158 echo "$ac_t""yes" 1>&6
8159 else
8160 echo "configure: failed program was:" >&5
8161 cat conftest.$ac_ext >&5
8162 rm -rf conftest*
8163 echo "$ac_t""no" 1>&6
8165 rm -f conftest*
8167 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
8168 echo "configure:8169: checking for tm_gmtoff in struct tm" >&5
8169 cat > conftest.$ac_ext <<EOF
8170 #line 8171 "configure"
8171 #include "confdefs.h"
8172 #include <time.h>
8173 int main() {
8174 struct tm tim; tim.tm_gmtoff = 0;
8175 ; return 0; }
8177 if { (eval echo configure:8178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8178 rm -rf conftest*
8179 cat >> confdefs.h <<\EOF
8180 #define STRUCT_TM_HAS_GMTOFF 1
8183 echo "$ac_t""yes" 1>&6
8184 else
8185 echo "configure: failed program was:" >&5
8186 cat conftest.$ac_ext >&5
8187 rm -rf conftest*
8188 echo "$ac_t""no" 1>&6
8189 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
8190 echo "configure:8191: checking for global timezone variable" >&5
8191 cat > conftest.$ac_ext <<EOF
8192 #line 8193 "configure"
8193 #include "confdefs.h"
8194 #include <time.h>
8195 int main() {
8196 void i(){long z2 = 2*timezone;}
8197 ; return 0; }
8199 if { (eval echo configure:8200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8200 rm -rf conftest*
8201 cat >> confdefs.h <<\EOF
8202 #define HAVE_TIMEZONE 1
8205 echo "$ac_t""yes" 1>&6
8206 else
8207 echo "configure: failed program was:" >&5
8208 cat conftest.$ac_ext >&5
8209 rm -rf conftest*
8210 echo "$ac_t""no" 1>&6
8211 echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6
8212 echo "configure:8213: checking for global _timezone variable" >&5
8213 cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 #include <time.h>
8217 int main() {
8218 long z2 = _timezone;
8219 ; return 0; }
8221 if { (eval echo configure:8222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8222 rm -rf conftest*
8223 cat >> confdefs.h <<\EOF
8224 #define HAVE_UNDERSCORE_TIMEZONE 1
8227 echo "$ac_t""yes" 1>&6
8228 else
8229 echo "configure: failed program was:" >&5
8230 cat conftest.$ac_ext >&5
8231 rm -rf conftest*
8232 echo "$ac_t""no" 1>&6
8234 rm -f conftest*
8236 rm -f conftest*
8238 rm -f conftest*
8240 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8241 # for constant arguments. Useless!
8242 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8243 echo "configure:8244: checking for working alloca.h" >&5
8244 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8245 echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247 cat > conftest.$ac_ext <<EOF
8248 #line 8249 "configure"
8249 #include "confdefs.h"
8250 #include <alloca.h>
8251 int main() {
8252 char *p = alloca(2 * sizeof(int));
8253 ; return 0; }
8255 if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8256 rm -rf conftest*
8257 ac_cv_header_alloca_h=yes
8258 else
8259 echo "configure: failed program was:" >&5
8260 cat conftest.$ac_ext >&5
8261 rm -rf conftest*
8262 ac_cv_header_alloca_h=no
8264 rm -f conftest*
8267 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8268 if test $ac_cv_header_alloca_h = yes; then
8269 cat >> confdefs.h <<\EOF
8270 #define HAVE_ALLOCA_H 1
8275 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8276 echo "configure:8277: checking for alloca" >&5
8277 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8278 echo $ac_n "(cached) $ac_c" 1>&6
8279 else
8280 cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8284 #ifdef __GNUC__
8285 # define alloca __builtin_alloca
8286 #else
8287 # ifdef _MSC_VER
8288 # include <malloc.h>
8289 # define alloca _alloca
8290 # else
8291 # if HAVE_ALLOCA_H
8292 # include <alloca.h>
8293 # else
8294 # ifdef _AIX
8295 #pragma alloca
8296 # else
8297 # ifndef alloca /* predefined by HP cc +Olibcalls */
8298 char *alloca ();
8299 # endif
8300 # endif
8301 # endif
8302 # endif
8303 #endif
8305 int main() {
8306 char *p = (char *) alloca(1);
8307 ; return 0; }
8309 if { (eval echo configure:8310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8310 rm -rf conftest*
8311 ac_cv_func_alloca_works=yes
8312 else
8313 echo "configure: failed program was:" >&5
8314 cat conftest.$ac_ext >&5
8315 rm -rf conftest*
8316 ac_cv_func_alloca_works=no
8318 rm -f conftest*
8321 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8322 if test $ac_cv_func_alloca_works = yes; then
8323 cat >> confdefs.h <<\EOF
8324 #define HAVE_ALLOCA 1
8329 if test $ac_cv_func_alloca_works = no; then
8330 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8331 # that cause trouble. Some versions do not even contain alloca or
8332 # contain a buggy version. If you still want to use their alloca,
8333 # use ar to extract alloca.o from them instead of compiling alloca.c.
8334 ALLOCA=alloca.${ac_objext}
8335 cat >> confdefs.h <<\EOF
8336 #define C_ALLOCA 1
8340 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8341 echo "configure:8342: checking whether alloca needs Cray hooks" >&5
8342 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8343 echo $ac_n "(cached) $ac_c" 1>&6
8344 else
8345 cat > conftest.$ac_ext <<EOF
8346 #line 8347 "configure"
8347 #include "confdefs.h"
8348 #if defined(CRAY) && ! defined(CRAY2)
8349 webecray
8350 #else
8351 wenotbecray
8352 #endif
8355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8356 egrep "webecray" >/dev/null 2>&1; then
8357 rm -rf conftest*
8358 ac_cv_os_cray=yes
8359 else
8360 rm -rf conftest*
8361 ac_cv_os_cray=no
8363 rm -f conftest*
8367 echo "$ac_t""$ac_cv_os_cray" 1>&6
8368 if test $ac_cv_os_cray = yes; then
8369 for ac_func in _getb67 GETB67 getb67; do
8370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8371 echo "configure:8372: checking for $ac_func" >&5
8372 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8373 echo $ac_n "(cached) $ac_c" 1>&6
8374 else
8375 cat > conftest.$ac_ext <<EOF
8376 #line 8377 "configure"
8377 #include "confdefs.h"
8378 /* System header to define __stub macros and hopefully few prototypes,
8379 which can conflict with char $ac_func(); below. */
8380 #include <assert.h>
8381 /* Override any gcc2 internal prototype to avoid an error. */
8382 /* We use char because int might match the return type of a gcc2
8383 builtin and then its argument prototype would still apply. */
8384 char $ac_func();
8386 int main() {
8388 /* The GNU C library defines this for functions which it implements
8389 to always fail with ENOSYS. Some functions are actually named
8390 something starting with __ and the normal name is an alias. */
8391 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8392 choke me
8393 #else
8394 $ac_func();
8395 #endif
8397 ; return 0; }
8399 if { (eval echo configure:8400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8400 rm -rf conftest*
8401 eval "ac_cv_func_$ac_func=yes"
8402 else
8403 echo "configure: failed program was:" >&5
8404 cat conftest.$ac_ext >&5
8405 rm -rf conftest*
8406 eval "ac_cv_func_$ac_func=no"
8408 rm -f conftest*
8411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8412 echo "$ac_t""yes" 1>&6
8413 cat >> confdefs.h <<EOF
8414 #define CRAY_STACKSEG_END $ac_func
8417 break
8418 else
8419 echo "$ac_t""no" 1>&6
8422 done
8425 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8426 echo "configure:8427: checking stack direction for C alloca" >&5
8427 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8428 echo $ac_n "(cached) $ac_c" 1>&6
8429 else
8430 if test "$cross_compiling" = yes; then
8431 ac_cv_c_stack_direction=0
8432 else
8433 cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436 find_stack_direction ()
8438 static char *addr = 0;
8439 auto char dummy;
8440 if (addr == 0)
8442 addr = &dummy;
8443 return find_stack_direction ();
8445 else
8446 return (&dummy > addr) ? 1 : -1;
8448 main ()
8450 exit (find_stack_direction() < 0);
8453 if { (eval echo configure:8454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8454 then
8455 ac_cv_c_stack_direction=1
8456 else
8457 echo "configure: failed program was:" >&5
8458 cat conftest.$ac_ext >&5
8459 rm -fr conftest*
8460 ac_cv_c_stack_direction=-1
8462 rm -fr conftest*
8467 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8468 cat >> confdefs.h <<EOF
8469 #define STACK_DIRECTION $ac_cv_c_stack_direction
8474 for ac_hdr in unistd.h
8476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8478 echo "configure:8479: checking for $ac_hdr" >&5
8479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8480 echo $ac_n "(cached) $ac_c" 1>&6
8481 else
8482 cat > conftest.$ac_ext <<EOF
8483 #line 8484 "configure"
8484 #include "confdefs.h"
8485 #include <$ac_hdr>
8487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8488 { (eval echo configure:8489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8490 if test -z "$ac_err"; then
8491 rm -rf conftest*
8492 eval "ac_cv_header_$ac_safe=yes"
8493 else
8494 echo "$ac_err" >&5
8495 echo "configure: failed program was:" >&5
8496 cat conftest.$ac_ext >&5
8497 rm -rf conftest*
8498 eval "ac_cv_header_$ac_safe=no"
8500 rm -f conftest*
8502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8503 echo "$ac_t""yes" 1>&6
8504 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8505 cat >> confdefs.h <<EOF
8506 #define $ac_tr_hdr 1
8509 else
8510 echo "$ac_t""no" 1>&6
8512 done
8514 for ac_func in getpagesize
8516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8517 echo "configure:8518: checking for $ac_func" >&5
8518 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8519 echo $ac_n "(cached) $ac_c" 1>&6
8520 else
8521 cat > conftest.$ac_ext <<EOF
8522 #line 8523 "configure"
8523 #include "confdefs.h"
8524 /* System header to define __stub macros and hopefully few prototypes,
8525 which can conflict with char $ac_func(); below. */
8526 #include <assert.h>
8527 /* Override any gcc2 internal prototype to avoid an error. */
8528 /* We use char because int might match the return type of a gcc2
8529 builtin and then its argument prototype would still apply. */
8530 char $ac_func();
8532 int main() {
8534 /* The GNU C library defines this for functions which it implements
8535 to always fail with ENOSYS. Some functions are actually named
8536 something starting with __ and the normal name is an alias. */
8537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8538 choke me
8539 #else
8540 $ac_func();
8541 #endif
8543 ; return 0; }
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8546 rm -rf conftest*
8547 eval "ac_cv_func_$ac_func=yes"
8548 else
8549 echo "configure: failed program was:" >&5
8550 cat conftest.$ac_ext >&5
8551 rm -rf conftest*
8552 eval "ac_cv_func_$ac_func=no"
8554 rm -f conftest*
8557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8558 echo "$ac_t""yes" 1>&6
8559 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8560 cat >> confdefs.h <<EOF
8561 #define $ac_tr_func 1
8564 else
8565 echo "$ac_t""no" 1>&6
8567 done
8569 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
8570 echo "configure:8571: checking for working mmap" >&5
8571 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
8572 echo $ac_n "(cached) $ac_c" 1>&6
8573 else
8574 if test "$cross_compiling" = yes; then
8575 ac_cv_func_mmap_fixed_mapped=no
8576 else
8577 cat > conftest.$ac_ext <<EOF
8578 #line 8579 "configure"
8579 #include "confdefs.h"
8581 /* Thanks to Mike Haertel and Jim Avera for this test.
8582 Here is a matrix of mmap possibilities:
8583 mmap private not fixed
8584 mmap private fixed at somewhere currently unmapped
8585 mmap private fixed at somewhere already mapped
8586 mmap shared not fixed
8587 mmap shared fixed at somewhere currently unmapped
8588 mmap shared fixed at somewhere already mapped
8589 For private mappings, we should verify that changes cannot be read()
8590 back from the file, nor mmap's back from the file at a different
8591 address. (There have been systems where private was not correctly
8592 implemented like the infamous i386 svr4.0, and systems where the
8593 VM page cache was not coherent with the filesystem buffer cache
8594 like early versions of FreeBSD and possibly contemporary NetBSD.)
8595 For shared mappings, we should conversely verify that changes get
8596 propogated back to all the places they're supposed to be.
8598 Grep wants private fixed already mapped.
8599 The main things grep needs to know about mmap are:
8600 * does it exist and is it safe to write into the mmap'd area
8601 * how to use it (BSD variants) */
8602 #include <sys/types.h>
8603 #include <fcntl.h>
8604 #include <sys/mman.h>
8606 /* This mess was copied from the GNU getpagesize.h. */
8607 #ifndef HAVE_GETPAGESIZE
8608 # ifdef HAVE_UNISTD_H
8609 # include <unistd.h>
8610 # endif
8612 /* Assume that all systems that can run configure have sys/param.h. */
8613 # ifndef HAVE_SYS_PARAM_H
8614 # define HAVE_SYS_PARAM_H 1
8615 # endif
8617 # ifdef _SC_PAGESIZE
8618 # define getpagesize() sysconf(_SC_PAGESIZE)
8619 # else /* no _SC_PAGESIZE */
8620 # ifdef HAVE_SYS_PARAM_H
8621 # include <sys/param.h>
8622 # ifdef EXEC_PAGESIZE
8623 # define getpagesize() EXEC_PAGESIZE
8624 # else /* no EXEC_PAGESIZE */
8625 # ifdef NBPG
8626 # define getpagesize() NBPG * CLSIZE
8627 # ifndef CLSIZE
8628 # define CLSIZE 1
8629 # endif /* no CLSIZE */
8630 # else /* no NBPG */
8631 # ifdef NBPC
8632 # define getpagesize() NBPC
8633 # else /* no NBPC */
8634 # ifdef PAGESIZE
8635 # define getpagesize() PAGESIZE
8636 # endif /* PAGESIZE */
8637 # endif /* no NBPC */
8638 # endif /* no NBPG */
8639 # endif /* no EXEC_PAGESIZE */
8640 # else /* no HAVE_SYS_PARAM_H */
8641 # define getpagesize() 8192 /* punt totally */
8642 # endif /* no HAVE_SYS_PARAM_H */
8643 # endif /* no _SC_PAGESIZE */
8645 #endif /* no HAVE_GETPAGESIZE */
8647 #ifdef __cplusplus
8648 extern "C" { void *malloc(unsigned); }
8649 #else
8650 char *malloc();
8651 #endif
8654 main()
8656 char *data, *data2, *data3;
8657 int i, pagesize;
8658 int fd;
8660 pagesize = getpagesize();
8663 * First, make a file with some known garbage in it.
8665 data = malloc(pagesize);
8666 if (!data)
8667 exit(1);
8668 for (i = 0; i < pagesize; ++i)
8669 *(data + i) = rand();
8670 umask(0);
8671 fd = creat("conftestmmap", 0600);
8672 if (fd < 0)
8673 exit(1);
8674 if (write(fd, data, pagesize) != pagesize)
8675 exit(1);
8676 close(fd);
8679 * Next, try to mmap the file at a fixed address which
8680 * already has something else allocated at it. If we can,
8681 * also make sure that we see the same garbage.
8683 fd = open("conftestmmap", O_RDWR);
8684 if (fd < 0)
8685 exit(1);
8686 data2 = malloc(2 * pagesize);
8687 if (!data2)
8688 exit(1);
8689 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8690 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
8691 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8692 exit(1);
8693 for (i = 0; i < pagesize; ++i)
8694 if (*(data + i) != *(data2 + i))
8695 exit(1);
8698 * Finally, make sure that changes to the mapped area
8699 * do not percolate back to the file as seen by read().
8700 * (This is a bug on some variants of i386 svr4.0.)
8702 for (i = 0; i < pagesize; ++i)
8703 *(data2 + i) = *(data2 + i) + 1;
8704 data3 = malloc(pagesize);
8705 if (!data3)
8706 exit(1);
8707 if (read(fd, data3, pagesize) != pagesize)
8708 exit(1);
8709 for (i = 0; i < pagesize; ++i)
8710 if (*(data + i) != *(data3 + i))
8711 exit(1);
8712 close(fd);
8713 unlink("conftestmmap");
8714 exit(0);
8718 if { (eval echo configure:8719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8719 then
8720 ac_cv_func_mmap_fixed_mapped=yes
8721 else
8722 echo "configure: failed program was:" >&5
8723 cat conftest.$ac_ext >&5
8724 rm -fr conftest*
8725 ac_cv_func_mmap_fixed_mapped=no
8727 rm -fr conftest*
8732 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
8733 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8734 cat >> confdefs.h <<\EOF
8735 #define HAVE_MMAP 1
8741 for ac_prog in perl
8743 # Extract the first word of "$ac_prog", so it can be a program name with args.
8744 set dummy $ac_prog; ac_word=$2
8745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8746 echo "configure:8747: checking for $ac_word" >&5
8747 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
8748 echo $ac_n "(cached) $ac_c" 1>&6
8749 else
8750 if test -n "$PERL"; then
8751 ac_cv_prog_PERL="$PERL" # Let the user override the test.
8752 else
8753 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8754 ac_dummy="$PATH"
8755 for ac_dir in $ac_dummy; do
8756 test -z "$ac_dir" && ac_dir=.
8757 if test -f $ac_dir/$ac_word; then
8758 ac_cv_prog_PERL="$ac_prog"
8759 break
8761 done
8762 IFS="$ac_save_ifs"
8765 PERL="$ac_cv_prog_PERL"
8766 if test -n "$PERL"; then
8767 echo "$ac_t""$PERL" 1>&6
8768 else
8769 echo "$ac_t""no" 1>&6
8772 test -n "$PERL" && break
8773 done
8774 test -n "$PERL" || PERL="false"
8777 SYSDEP_SOURCES=
8779 case "${host}" in
8780 i?86-*-linux*)
8781 SIGNAL_HANDLER=include/i386-signal.h
8783 sparc*-sun-solaris*)
8784 SIGNAL_HANDLER=include/sparc-signal.h
8786 # ia64-*)
8787 # SYSDEP_SOURCES=sysdep/ia64.c
8788 # test -d sysdep || mkdir sysdep
8789 # ;;
8790 ia64-*-linux*)
8791 SIGNAL_HANDLER=include/dwarf2-signal.h
8793 powerpc-*-linux*)
8794 SIGNAL_HANDLER=include/powerpc-signal.h
8796 alpha*-*-linux*)
8797 SIGNAL_HANDLER=include/dwarf2-signal.h
8799 s390*-*-linux*)
8800 SIGNAL_HANDLER=include/s390-signal.h
8802 x86_64*-*-linux*)
8803 SIGNAL_HANDLER=include/x86_64-signal.h
8805 sparc*-*-linux*)
8806 SIGNAL_HANDLER=include/dwarf2-signal.h
8808 sh-*-linux* | sh[34]*-*-linux*)
8809 SIGNAL_HANDLER=include/dwarf2-signal.h
8811 *mingw*)
8812 SIGNAL_HANDLER=include/win32-signal.h
8814 mips*-*-linux*)
8815 SIGNAL_HANDLER=include/mips-signal.h
8818 SIGNAL_HANDLER=include/default-signal.h
8820 esac
8822 # If we're using sjlj exceptions, forget what we just learned.
8823 if test "$enable_sjlj_exceptions" = yes; then
8824 SIGNAL_HANDLER=include/default-signal.h
8827 # Define here any compiler flags that you need in order to make backtrace() work.
8828 BACKTRACESPEC=
8829 case "${host}" in
8830 x86_64*-*-linux*)
8831 BACKTRACESPEC=-fno-omit-frame-pointer
8833 esac
8840 if test "${multilib}" = "yes"; then
8841 multilib_arg="--enable-multilib"
8842 else
8843 multilib_arg=
8848 here=`${PWDCMD-pwd}`
8851 # We get this from the environment.
8854 trap '' 1 2 15
8855 cat > confcache <<\EOF
8856 # This file is a shell script that caches the results of configure
8857 # tests run on this system so they can be shared between configure
8858 # scripts and configure runs. It is not useful on other systems.
8859 # If it contains results you don't want to keep, you may remove or edit it.
8861 # By default, configure uses ./config.cache as the cache file,
8862 # creating it if it does not exist already. You can give configure
8863 # the --cache-file=FILE option to use a different cache file; that is
8864 # what configure does when it calls configure scripts in
8865 # subdirectories, so they share the cache.
8866 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8867 # config.status only pays attention to the cache file if you give it the
8868 # --recheck option to rerun configure.
8871 # The following way of writing the cache mishandles newlines in values,
8872 # but we know of no workaround that is simple, portable, and efficient.
8873 # So, don't put newlines in cache variables' values.
8874 # Ultrix sh set writes to stderr and can't be redirected directly,
8875 # and sets the high bit in the cache file unless we assign to the vars.
8876 (set) 2>&1 |
8877 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8878 *ac_space=\ *)
8879 # `set' does not quote correctly, so add quotes (double-quote substitution
8880 # turns \\\\ into \\, and sed turns \\ into \).
8881 sed -n \
8882 -e "s/'/'\\\\''/g" \
8883 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8886 # `set' quotes correctly as required by POSIX, so do not add quotes.
8887 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8889 esac >> confcache
8890 if cmp -s $cache_file confcache; then
8892 else
8893 if test -w $cache_file; then
8894 echo "updating cache $cache_file"
8895 cat confcache > $cache_file
8896 else
8897 echo "not updating unwritable cache $cache_file"
8900 rm -f confcache
8902 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8904 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8905 # Let make expand exec_prefix.
8906 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8908 # Any assignment to VPATH causes Sun make to only execute
8909 # the first set of double-colon rules, so remove it if not needed.
8910 # If there is a colon in the path, we need to keep it.
8911 if test "x$srcdir" = x.; then
8912 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8915 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8917 DEFS=-DHAVE_CONFIG_H
8919 # Without the "./", some shells look in PATH for config.status.
8920 : ${CONFIG_STATUS=./config.status}
8922 echo creating $CONFIG_STATUS
8923 rm -f $CONFIG_STATUS
8924 cat > $CONFIG_STATUS <<EOF
8925 #! /bin/sh
8926 # Generated automatically by configure.
8927 # Run this file to recreate the current configuration.
8928 # This directory was configured as follows,
8929 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8931 # $0 $ac_configure_args
8933 # Compiler output produced by configure, useful for debugging
8934 # configure, is in ./config.log if it exists.
8936 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8937 for ac_option
8939 case "\$ac_option" in
8940 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8941 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8942 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8943 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8944 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8945 exit 0 ;;
8946 -help | --help | --hel | --he | --h)
8947 echo "\$ac_cs_usage"; exit 0 ;;
8948 *) echo "\$ac_cs_usage"; exit 1 ;;
8949 esac
8950 done
8952 ac_given_srcdir=$srcdir
8953 ac_given_INSTALL="$INSTALL"
8955 trap 'rm -fr `echo "Makefile libgcj.pc 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
8957 cat >> $CONFIG_STATUS <<EOF
8959 # Protect against being on the right side of a sed subst in config.status.
8960 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8961 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8962 $ac_vpsub
8963 $extrasub
8964 s%@SHELL@%$SHELL%g
8965 s%@CFLAGS@%$CFLAGS%g
8966 s%@CPPFLAGS@%$CPPFLAGS%g
8967 s%@CXXFLAGS@%$CXXFLAGS%g
8968 s%@FFLAGS@%$FFLAGS%g
8969 s%@DEFS@%$DEFS%g
8970 s%@LDFLAGS@%$LDFLAGS%g
8971 s%@LIBS@%$LIBS%g
8972 s%@exec_prefix@%$exec_prefix%g
8973 s%@prefix@%$prefix%g
8974 s%@program_transform_name@%$program_transform_name%g
8975 s%@bindir@%$bindir%g
8976 s%@sbindir@%$sbindir%g
8977 s%@libexecdir@%$libexecdir%g
8978 s%@datadir@%$datadir%g
8979 s%@sysconfdir@%$sysconfdir%g
8980 s%@sharedstatedir@%$sharedstatedir%g
8981 s%@localstatedir@%$localstatedir%g
8982 s%@libdir@%$libdir%g
8983 s%@includedir@%$includedir%g
8984 s%@oldincludedir@%$oldincludedir%g
8985 s%@infodir@%$infodir%g
8986 s%@mandir@%$mandir%g
8987 s%@LN_S@%$LN_S%g
8988 s%@libgcj_basedir@%$libgcj_basedir%g
8989 s%@mkinstalldirs@%$mkinstalldirs%g
8990 s%@host@%$host%g
8991 s%@host_alias@%$host_alias%g
8992 s%@host_cpu@%$host_cpu%g
8993 s%@host_vendor@%$host_vendor%g
8994 s%@host_os@%$host_os%g
8995 s%@target@%$target%g
8996 s%@target_alias@%$target_alias%g
8997 s%@target_cpu@%$target_cpu%g
8998 s%@target_vendor@%$target_vendor%g
8999 s%@target_os@%$target_os%g
9000 s%@build@%$build%g
9001 s%@build_alias@%$build_alias%g
9002 s%@build_cpu@%$build_cpu%g
9003 s%@build_vendor@%$build_vendor%g
9004 s%@build_os@%$build_os%g
9005 s%@CC@%$CC%g
9006 s%@glibjava_CXX@%$glibjava_CXX%g
9007 s%@CXX@%$CXX%g
9008 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9009 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9010 s%@INSTALL_DATA@%$INSTALL_DATA%g
9011 s%@PACKAGE@%$PACKAGE%g
9012 s%@VERSION@%$VERSION%g
9013 s%@ACLOCAL@%$ACLOCAL%g
9014 s%@AUTOCONF@%$AUTOCONF%g
9015 s%@AUTOMAKE@%$AUTOMAKE%g
9016 s%@AUTOHEADER@%$AUTOHEADER%g
9017 s%@MAKEINFO@%$MAKEINFO%g
9018 s%@SET_MAKE@%$SET_MAKE%g
9019 s%@AS@%$AS%g
9020 s%@AR@%$AR%g
9021 s%@RANLIB@%$RANLIB%g
9022 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
9023 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
9024 s%@MAINT@%$MAINT%g
9025 s%@EXEEXT@%$EXEEXT%g
9026 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
9027 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
9028 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
9029 s%@INCLTDL@%$INCLTDL%g
9030 s%@LIBLTDL@%$LIBLTDL%g
9031 s%@DIRLTDL@%$DIRLTDL%g
9032 s%@OBJEXT@%$OBJEXT%g
9033 s%@STRIP@%$STRIP%g
9034 s%@LIBTOOL@%$LIBTOOL%g
9035 s%@CXXCPP@%$CXXCPP%g
9036 s%@subdirs@%$subdirs%g
9037 s%@COMPPATH@%$COMPPATH%g
9038 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
9039 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
9040 s%@ONESTEP_TRUE@%$ONESTEP_TRUE%g
9041 s%@ONESTEP_FALSE@%$ONESTEP_FALSE%g
9042 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
9043 s%@INTERPRETER@%$INTERPRETER%g
9044 s%@LIBFFI@%$LIBFFI%g
9045 s%@LIBFFIINCS@%$LIBFFIINCS%g
9046 s%@EXTRA_CC_FILES@%$EXTRA_CC_FILES%g
9047 s%@PLATFORMOBJS@%$PLATFORMOBJS%g
9048 s%@CPP@%$CPP%g
9049 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
9050 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
9051 s%@ZLIBSPEC@%$ZLIBSPEC%g
9052 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
9053 s%@X_CFLAGS@%$X_CFLAGS%g
9054 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9055 s%@X_LIBS@%$X_LIBS%g
9056 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9057 s%@TOOLKIT@%$TOOLKIT%g
9058 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
9059 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
9060 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
9061 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
9062 s%@GCLIBS@%$GCLIBS%g
9063 s%@GCINCS@%$GCINCS%g
9064 s%@GCDEPS@%$GCDEPS%g
9065 s%@GCOBJS@%$GCOBJS%g
9066 s%@GCSPEC@%$GCSPEC%g
9067 s%@JC1GCSPEC@%$JC1GCSPEC%g
9068 s%@GCTESTSPEC@%$GCTESTSPEC%g
9069 s%@THREADLIBS@%$THREADLIBS%g
9070 s%@THREADINCS@%$THREADINCS%g
9071 s%@THREADDEPS@%$THREADDEPS%g
9072 s%@THREADOBJS@%$THREADOBJS%g
9073 s%@THREADSPEC@%$THREADSPEC%g
9074 s%@THREADLDFLAGS@%$THREADLDFLAGS%g
9075 s%@THREADCXXFLAGS@%$THREADCXXFLAGS%g
9076 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
9077 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
9078 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
9079 s%@tool_include_dir@%$tool_include_dir%g
9080 s%@gcc_version@%$gcc_version%g
9081 s%@LIBICONV@%$LIBICONV%g
9082 s%@PKG_CONFIG@%$PKG_CONFIG%g
9083 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
9084 s%@GTK_LIBS@%$GTK_LIBS%g
9085 s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
9086 s%@GLIB_LIBS@%$GLIB_LIBS%g
9087 s%@GLIB_GENMARSHAL@%$GLIB_GENMARSHAL%g
9088 s%@GOBJECT_QUERY@%$GOBJECT_QUERY%g
9089 s%@GLIB_MKENUMS@%$GLIB_MKENUMS%g
9090 s%@LIBART_CONFIG@%$LIBART_CONFIG%g
9091 s%@LIBART_CFLAGS@%$LIBART_CFLAGS%g
9092 s%@LIBART_LIBS@%$LIBART_LIBS%g
9093 s%@GCJ@%$GCJ%g
9094 s%@GCJFLAGS@%$GCJFLAGS%g
9095 s%@ZLIBS@%$ZLIBS%g
9096 s%@SYS_ZLIBS@%$SYS_ZLIBS%g
9097 s%@ZINCS@%$ZINCS%g
9098 s%@DIVIDESPEC@%$DIVIDESPEC%g
9099 s%@CHECKREFSPEC@%$CHECKREFSPEC%g
9100 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
9101 s%@IEEESPEC@%$IEEESPEC%g
9102 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
9103 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
9104 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
9105 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
9106 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
9107 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
9108 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
9109 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
9110 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
9111 s%@toolexecdir@%$toolexecdir%g
9112 s%@toolexecmainlibdir@%$toolexecmainlibdir%g
9113 s%@toolexeclibdir@%$toolexeclibdir%g
9114 s%@GCJVERSION@%$GCJVERSION%g
9115 s%@ALLOCA@%$ALLOCA%g
9116 s%@PERL@%$PERL%g
9117 s%@BACKTRACESPEC@%$BACKTRACESPEC%g
9118 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
9119 s%@here@%$here%g
9121 CEOF
9124 cat >> $CONFIG_STATUS <<\EOF
9126 # Split the substitutions into bite-sized pieces for seds with
9127 # small command number limits, like on Digital OSF/1 and HP-UX.
9128 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9129 ac_file=1 # Number of current file.
9130 ac_beg=1 # First line for current file.
9131 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9132 ac_more_lines=:
9133 ac_sed_cmds=""
9134 while $ac_more_lines; do
9135 if test $ac_beg -gt 1; then
9136 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9137 else
9138 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9140 if test ! -s conftest.s$ac_file; then
9141 ac_more_lines=false
9142 rm -f conftest.s$ac_file
9143 else
9144 if test -z "$ac_sed_cmds"; then
9145 ac_sed_cmds="sed -f conftest.s$ac_file"
9146 else
9147 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9149 ac_file=`expr $ac_file + 1`
9150 ac_beg=$ac_end
9151 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9153 done
9154 if test -z "$ac_sed_cmds"; then
9155 ac_sed_cmds=cat
9159 cat >> $CONFIG_STATUS <<EOF
9161 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
9163 cat >> $CONFIG_STATUS <<\EOF
9164 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9165 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9166 case "$ac_file" in
9167 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9168 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9169 *) ac_file_in="${ac_file}.in" ;;
9170 esac
9172 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9174 # Remove last slash and all that follows it. Not all systems have dirname.
9175 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9176 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9177 # The file is in a subdirectory.
9178 test ! -d "$ac_dir" && mkdir "$ac_dir"
9179 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9180 # A "../" for each directory in $ac_dir_suffix.
9181 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9182 else
9183 ac_dir_suffix= ac_dots=
9186 case "$ac_given_srcdir" in
9187 .) srcdir=.
9188 if test -z "$ac_dots"; then top_srcdir=.
9189 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9190 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9191 *) # Relative path.
9192 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9193 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9194 esac
9196 case "$ac_given_INSTALL" in
9197 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9198 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9199 esac
9201 echo creating "$ac_file"
9202 rm -f "$ac_file"
9203 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9204 case "$ac_file" in
9205 *Makefile*) ac_comsub="1i\\
9206 # $configure_input" ;;
9207 *) ac_comsub= ;;
9208 esac
9210 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9211 sed -e "$ac_comsub
9212 s%@configure_input@%$configure_input%g
9213 s%@srcdir@%$srcdir%g
9214 s%@top_srcdir@%$top_srcdir%g
9215 s%@INSTALL@%$INSTALL%g
9216 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9217 fi; done
9218 rm -f conftest.s*
9220 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9221 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9223 # ac_d sets the value in "#define NAME VALUE" lines.
9224 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9225 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9226 ac_dC='\3'
9227 ac_dD='%g'
9228 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9229 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9230 ac_uB='\([ ]\)%\1#\2define\3'
9231 ac_uC=' '
9232 ac_uD='\4%g'
9233 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9234 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9235 ac_eB='$%\1#\2define\3'
9236 ac_eC=' '
9237 ac_eD='%g'
9239 if test "${CONFIG_HEADERS+set}" != set; then
9241 cat >> $CONFIG_STATUS <<EOF
9242 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
9244 cat >> $CONFIG_STATUS <<\EOF
9246 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9247 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9248 case "$ac_file" in
9249 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9250 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9251 *) ac_file_in="${ac_file}.in" ;;
9252 esac
9254 echo creating $ac_file
9256 rm -f conftest.frag conftest.in conftest.out
9257 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9258 cat $ac_file_inputs > conftest.in
9262 # Transform confdefs.h into a sed script conftest.vals that substitutes
9263 # the proper values into config.h.in to produce config.h. And first:
9264 # Protect against being on the right side of a sed subst in config.status.
9265 # Protect against being in an unquoted here document in config.status.
9266 rm -f conftest.vals
9267 cat > conftest.hdr <<\EOF
9268 s/[\\&%]/\\&/g
9269 s%[\\$`]%\\&%g
9270 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9271 s%ac_d%ac_u%gp
9272 s%ac_u%ac_e%gp
9274 sed -n -f conftest.hdr confdefs.h > conftest.vals
9275 rm -f conftest.hdr
9277 # This sed command replaces #undef with comments. This is necessary, for
9278 # example, in the case of _POSIX_SOURCE, which is predefined and required
9279 # on some systems where configure will not decide to define it.
9280 cat >> conftest.vals <<\EOF
9281 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9284 # Break up conftest.vals because some shells have a limit on
9285 # the size of here documents, and old seds have small limits too.
9287 rm -f conftest.tail
9288 while :
9290 ac_lines=`grep -c . conftest.vals`
9291 # grep -c gives empty output for an empty file on some AIX systems.
9292 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9293 # Write a limited-size here document to conftest.frag.
9294 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9295 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9296 echo 'CEOF
9297 sed -f conftest.frag conftest.in > conftest.out
9298 rm -f conftest.in
9299 mv conftest.out conftest.in
9300 ' >> $CONFIG_STATUS
9301 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9302 rm -f conftest.vals
9303 mv conftest.tail conftest.vals
9304 done
9305 rm -f conftest.vals
9307 cat >> $CONFIG_STATUS <<\EOF
9308 rm -f conftest.frag conftest.h
9309 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9310 cat conftest.in >> conftest.h
9311 rm -f conftest.in
9312 if cmp -s $ac_file conftest.h 2>/dev/null; then
9313 echo "$ac_file is unchanged"
9314 rm -f conftest.h
9315 else
9316 # Remove last slash and all that follows it. Not all systems have dirname.
9317 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9318 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9319 # The file is in a subdirectory.
9320 test ! -d "$ac_dir" && mkdir "$ac_dir"
9322 rm -f $ac_file
9323 mv conftest.h $ac_file
9325 fi; done
9329 cat >> $CONFIG_STATUS <<EOF
9330 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 gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER"
9331 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 gnu/java/net/natPlainSocketImpl.cc gnu/java/net/natPlainDatagramSocketImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h"
9334 cat >> $CONFIG_STATUS <<\EOF
9335 srcdir=$ac_given_srcdir
9336 while test -n "$ac_sources"; do
9337 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9338 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9340 echo "linking $srcdir/$ac_source to $ac_dest"
9342 if test ! -r $srcdir/$ac_source; then
9343 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9345 rm -f $ac_dest
9347 # Make relative symlinks.
9348 # Remove last slash and all that follows it. Not all systems have dirname.
9349 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9350 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9351 # The dest file is in a subdirectory.
9352 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9353 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9354 # A "../" for each directory in $ac_dest_dir_suffix.
9355 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9356 else
9357 ac_dest_dir_suffix= ac_dots=
9360 case "$srcdir" in
9361 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9362 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9363 esac
9365 # Make a symlink if possible; otherwise try a hard link.
9366 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9367 ln $srcdir/$ac_source $ac_dest; then :
9368 else
9369 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9371 done
9373 cat >> $CONFIG_STATUS <<EOF
9375 srcdir=${srcdir}
9376 host=${host}
9377 target=${target}
9378 with_multisubdir=${with_multisubdir}
9379 ac_configure_args="${multilib_arg} ${ac_configure_args}"
9380 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9381 libgcj_basedir=${libgcj_basedir}
9382 CC="${CC}"
9383 CXX="${CXX}"
9384 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9387 cat >> $CONFIG_STATUS <<\EOF
9388 am_indx=1
9389 for am_file in include/config.h gcj/libgcj-config.h; do
9390 case " $CONFIG_HEADERS " in
9391 *" $am_file "*)
9392 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
9394 esac
9395 am_indx=`expr "$am_indx" + 1`
9396 done
9397 # Only add multilib support code if we just rebuilt top-level Makefile.
9398 case " $CONFIG_FILES " in
9399 *" Makefile "*)
9400 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
9401 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
9403 esac
9405 # Make subdirectories and `.d' files. Look in both srcdir and
9406 # builddir for the .java files.
9407 h=`${PWDCMD-pwd}`
9408 : > deps.mk
9409 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ;
9410 find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \
9411 fgrep -v testsuite | \
9412 sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \
9413 while read f; do
9414 echo "include $f" >> deps.mk
9415 test -f $f || {
9417 d=`echo $f | sed -e 's,/[^/]*$,,'`
9419 if test ! -d $d; then
9420 $libgcj_basedir/../mkinstalldirs $d
9422 echo > $f
9424 done
9426 exit 0
9428 chmod +x $CONFIG_STATUS
9429 rm -fr confdefs* $ac_clean_files
9430 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9432 if test "$no_recursion" != yes; then
9434 # Remove --cache-file and --srcdir arguments so they do not pile up.
9435 ac_sub_configure_args=
9436 ac_prev=
9437 for ac_arg in $ac_configure_args; do
9438 if test -n "$ac_prev"; then
9439 ac_prev=
9440 continue
9442 case "$ac_arg" in
9443 -cache-file | --cache-file | --cache-fil | --cache-fi \
9444 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9445 ac_prev=cache_file ;;
9446 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9447 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9449 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9450 ac_prev=srcdir ;;
9451 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9453 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9454 esac
9455 done
9457 for ac_config_dir in $DIRLTDL; do
9459 # Do not complain, so a configure script can configure whichever
9460 # parts of a large source tree are present.
9461 if test ! -d $srcdir/$ac_config_dir; then
9462 continue
9465 echo configuring in $ac_config_dir
9467 case "$srcdir" in
9468 .) ;;
9470 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9471 else
9472 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9475 esac
9477 ac_popdir=`pwd`
9478 cd $ac_config_dir
9480 # A "../" for each directory in /$ac_config_dir.
9481 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9483 case "$srcdir" in
9484 .) # No --srcdir option. We are building in place.
9485 ac_sub_srcdir=$srcdir ;;
9486 /*) # Absolute path.
9487 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9488 *) # Relative path.
9489 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9490 esac
9492 # Check for guested configure; otherwise get Cygnus style configure.
9493 if test -f $ac_sub_srcdir/configure; then
9494 ac_sub_configure=$ac_sub_srcdir/configure
9495 elif test -f $ac_sub_srcdir/configure.in; then
9496 ac_sub_configure=$ac_configure
9497 else
9498 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9499 ac_sub_configure=
9502 # The recursion is here.
9503 if test -n "$ac_sub_configure"; then
9505 # Make the cache file name correct relative to the subdirectory.
9506 case "$cache_file" in
9507 /*) ac_sub_cache_file=$cache_file ;;
9508 *) # Relative path.
9509 ac_sub_cache_file="$ac_dots$cache_file" ;;
9510 esac
9511 case "$ac_given_INSTALL" in
9512 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9513 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9514 esac
9516 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9517 # The eval makes quoting arguments work.
9518 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9519 then :
9520 else
9521 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9525 cd $ac_popdir
9526 done